From cb2f90e9ffccedd26ded16f19de1bb1b761b4cb1 Mon Sep 17 00:00:00 2001 From: Frando Date: Mon, 13 Oct 2025 10:34:43 +0000 Subject: [PATCH] deploy: 22d394816084267d37c54077b5cbe6730264d812 --- pr/3367/docs/bulk/all.html | 2 +- pr/3367/docs/bulk/fn.collect_and_print.html | 2 +- pr/3367/docs/bulk/fn.main.html | 2 +- pr/3367/docs/bulk/fn.run_iroh.html | 2 +- pr/3367/docs/bulk/fn.run_quinn.html | 2 +- pr/3367/docs/bulk/fn.run_s2n.html | 2 +- pr/3367/docs/bulk/index.html | 2 +- pr/3367/docs/help.html | 2 +- pr/3367/docs/iroh/all.html | 2 +- .../defaults/constant.DEFAULT_HTTPS_PORT.html | 2 +- .../defaults/constant.DEFAULT_HTTP_PORT.html | 2 +- .../constant.DEFAULT_METRICS_PORT.html | 2 +- .../constant.DEFAULT_RELAY_QUIC_PORT.html | 2 +- pr/3367/docs/iroh/defaults/index.html | 2 +- .../prod/constant.AP_RELAY_HOSTNAME.html | 2 +- .../prod/constant.EU_RELAY_HOSTNAME.html | 2 +- .../prod/constant.NA_RELAY_HOSTNAME.html | 2 +- .../prod/fn.default_ap_relay_node.html | 2 +- .../prod/fn.default_eu_relay_node.html | 2 +- .../prod/fn.default_na_relay_node.html | 2 +- .../defaults/prod/fn.default_relay_map.html | 2 +- pr/3367/docs/iroh/defaults/prod/index.html | 2 +- .../staging/constant.EU_RELAY_HOSTNAME.html | 2 +- .../staging/constant.NA_RELAY_HOSTNAME.html | 2 +- .../staging/fn.default_eu_relay_node.html | 2 +- .../staging/fn.default_na_relay_node.html | 2 +- .../staging/fn.default_relay_map.html | 2 +- pr/3367/docs/iroh/defaults/staging/index.html | 2 +- .../dns/constant.N0_DNS_NODE_ORIGIN_PROD.html | 2 +- .../constant.N0_DNS_NODE_ORIGIN_STAGING.html | 2 +- pr/3367/docs/iroh/discovery/dns/index.html | 2 +- .../discovery/dns/struct.DnsDiscovery.html | 35 +- .../dns/struct.DnsDiscoveryBuilder.html | 27 +- .../iroh/discovery/enum.DiscoveryError.html | 41 +- .../discovery/enum.IntoDiscoveryError.html | 41 +- .../docs/iroh/discovery/enum.ParseError.html | 39 +- pr/3367/docs/iroh/discovery/index.html | 10 +- .../iroh/discovery/mdns/constant.NAME.html | 2 +- .../discovery/mdns/enum.DiscoveryEvent.html | 56 + pr/3367/docs/iroh/discovery/mdns/index.html | 43 +- .../docs/iroh/discovery/mdns/sidebar-items.js | 2 +- .../discovery/mdns/struct.MdnsDiscovery.html | 52 +- .../mdns/struct.MdnsDiscoveryBuilder.html | 42 +- .../pkarr/constant.DEFAULT_PKARR_TTL.html | 2 +- .../constant.DEFAULT_REPUBLISH_INTERVAL.html | 2 +- .../constant.N0_DNS_PKARR_RELAY_PROD.html | 2 +- .../constant.N0_DNS_PKARR_RELAY_STAGING.html | 2 +- .../docs/iroh/discovery/pkarr/dht/index.html | 2 +- .../discovery/pkarr/dht/struct.Builder.html | 50 +- .../pkarr/dht/struct.DhtDiscovery.html | 43 +- .../iroh/discovery/pkarr/enum.PkarrError.html | 37 +- pr/3367/docs/iroh/discovery/pkarr/index.html | 2 +- .../pkarr/struct.PkarrPublisher.html | 47 +- .../pkarr/struct.PkarrPublisherBuilder.html | 37 +- .../pkarr/struct.PkarrRelayClient.html | 45 +- .../discovery/pkarr/struct.PkarrResolver.html | 45 +- .../pkarr/struct.PkarrResolverBuilder.html | 33 +- pr/3367/docs/iroh/discovery/sidebar-items.js | 2 +- .../iroh/discovery/static_provider/index.html | 2 +- .../struct.StaticProvider.html | 73 +- .../discovery/struct.ConcurrentDiscovery.html | 54 +- .../discovery/struct.DiscoveryContext.html | 35 +- .../iroh/discovery/struct.DiscoveryItem.html | 68 +- .../docs/iroh/discovery/struct.Lagged.html | 43 - .../docs/iroh/discovery/struct.NodeData.html | 61 +- .../docs/iroh/discovery/struct.NodeInfo.html | 80 +- .../docs/iroh/discovery/struct.UserData.html | 63 +- .../docs/iroh/discovery/trait.Discovery.html | 29 +- .../iroh/discovery/trait.IntoDiscovery.html | 6 +- .../dns/constant.N0_DNS_NODE_ORIGIN_PROD.html | 2 +- .../constant.N0_DNS_NODE_ORIGIN_STAGING.html | 2 +- pr/3367/docs/iroh/dns/index.html | 2 +- pr/3367/docs/iroh/dns/struct.DnsResolver.html | 112 +- .../constant.ENV_FORCE_STAGING_RELAYS.html | 2 +- .../iroh/endpoint/enum.AddNodeAddrError.html | 37 +- .../docs/iroh/endpoint/enum.AlpnError.html | 37 +- .../docs/iroh/endpoint/enum.BindError.html | 42 +- .../docs/iroh/endpoint/enum.ConnectError.html | 37 +- .../endpoint/enum.ConnectWithOptsError.html | 37 +- .../iroh/endpoint/enum.ConnectionError.html | 41 +- .../iroh/endpoint/enum.ConnectionType.html | 51 +- .../docs/iroh/endpoint/enum.ControlMsg.html | 51 +- .../iroh/endpoint/enum.DirectAddrType.html | 59 +- .../endpoint/enum.GetMappingAddressError.html | 35 +- .../iroh/endpoint/enum.PathSelection.html | 41 +- .../docs/iroh/endpoint/enum.ReadError.html | 41 +- .../iroh/endpoint/enum.ReadExactError.html | 41 +- .../iroh/endpoint/enum.ReadToEndError.html | 41 +- .../docs/iroh/endpoint/enum.RelayMode.html | 41 +- .../docs/iroh/endpoint/enum.ResetError.html | 41 +- .../iroh/endpoint/enum.SendDatagramError.html | 41 +- pr/3367/docs/iroh/endpoint/enum.Source.html | 56 +- .../docs/iroh/endpoint/enum.StoppedError.html | 41 +- .../docs/iroh/endpoint/enum.WriteError.html | 41 +- .../iroh/endpoint/fn.default_relay_mode.html | 2 +- .../iroh/endpoint/fn.force_staging_infra.html | 2 +- pr/3367/docs/iroh/endpoint/index.html | 4 +- pr/3367/docs/iroh/endpoint/sidebar-items.js | 2 +- pr/3367/docs/iroh/endpoint/struct.Accept.html | 62 +- .../docs/iroh/endpoint/struct.AcceptBi.html | 62 +- .../docs/iroh/endpoint/struct.AcceptUni.html | 62 +- .../endpoint/struct.AckFrequencyConfig.html | 35 +- .../endpoint/struct.ApplicationClose.html | 41 +- .../docs/iroh/endpoint/struct.Builder.html | 83 +- pr/3367/docs/iroh/endpoint/struct.Chunk.html | 31 +- .../iroh/endpoint/struct.ClosedStream.html | 41 +- .../iroh/endpoint/struct.ConnectOptions.html | 41 +- .../docs/iroh/endpoint/struct.Connecting.html | 72 +- .../docs/iroh/endpoint/struct.Connection.html | 81 +- .../iroh/endpoint/struct.ConnectionClose.html | 41 +- .../iroh/endpoint/struct.ConnectionStats.html | 35 +- .../iroh/endpoint/struct.CryptoError.html | 27 +- .../docs/iroh/endpoint/struct.DirectAddr.html | 55 +- .../iroh/endpoint/struct.DirectAddrInfo.html | 50 +- .../docs/iroh/endpoint/struct.Endpoint.html | 219 +- .../struct.ExportKeyingMaterialError.html | 31 +- .../docs/iroh/endpoint/struct.FrameStats.html | 35 +- .../docs/iroh/endpoint/struct.Incoming.html | 45 +- .../iroh/endpoint/struct.IncomingFuture.html | 66 +- .../endpoint/struct.MtuDiscoveryConfig.html | 35 +- pr/3367/docs/iroh/endpoint/struct.OpenBi.html | 62 +- .../docs/iroh/endpoint/struct.OpenUni.html | 62 +- .../docs/iroh/endpoint/struct.PathStats.html | 35 +- .../iroh/endpoint/struct.ReadDatagram.html | 62 +- .../docs/iroh/endpoint/struct.RecvStream.html | 27 +- .../docs/iroh/endpoint/struct.RemoteInfo.html | 70 - .../endpoint/struct.RemoteNodeIdError.html | 35 +- .../docs/iroh/endpoint/struct.RetryError.html | 33 +- .../docs/iroh/endpoint/struct.SendStream.html | 27 +- .../iroh/endpoint/struct.ServerConfig.html | 39 +- .../docs/iroh/endpoint/struct.StreamId.html | 57 +- .../iroh/endpoint/struct.TransportConfig.html | 33 +- .../iroh/endpoint/struct.TransportError.html | 41 +- .../endpoint/struct.TransportErrorCode.html | 43 +- .../docs/iroh/endpoint/struct.UdpStats.html | 35 +- .../endpoint/struct.UnsupportedVersion.html | 27 +- pr/3367/docs/iroh/endpoint/struct.VarInt.html | 59 +- .../endpoint/struct.WeakConnectionHandle.html | 27 +- .../docs/iroh/endpoint/struct.Written.html | 37 +- .../iroh/endpoint/struct.ZeroRttAccepted.html | 60 +- pr/3367/docs/iroh/endpoint/trait.AeadKey.html | 2 +- .../docs/iroh/endpoint/trait.Controller.html | 2 +- .../endpoint/trait.ControllerFactory.html | 2 +- .../endpoint/trait.CryptoServerConfig.html | 2 +- .../endpoint/trait.HandshakeTokenKey.html | 2 +- pr/3367/docs/iroh/enum.KeyParsingError.html | 39 +- pr/3367/docs/iroh/enum.RelayProtocol.html | 43 - pr/3367/docs/iroh/index.html | 8 +- .../node_state/struct.RemoteInfo.html | 11 - pr/3367/docs/iroh/metrics/index.html | 2 +- .../iroh/metrics/struct.EndpointMetrics.html | 43 +- .../iroh/metrics/struct.MagicsockMetrics.html | 49 +- .../iroh/metrics/struct.PortmapMetrics.html | 41 +- .../iroh/metrics/struct.RelayMetrics.html | 35 +- .../iroh/net_report/constant.TIMEOUT.html | 2 + .../defaults/timeouts/constant.TIMEOUT.html | 11 + pr/3367/docs/iroh/net_report/enum.Probe.html | 55 +- pr/3367/docs/iroh/net_report/index.html | 4 +- pr/3367/docs/iroh/net_report/sidebar-items.js | 2 +- .../docs/iroh/net_report/struct.Metrics.html | 37 +- .../docs/iroh/net_report/struct.Options.html | 45 +- .../iroh/net_report/struct.QuicConfig.html | 35 +- .../net_report/struct.RelayLatencies.html | 46 +- .../docs/iroh/net_report/struct.Report.html | 52 +- .../node_info/constant.IROH_TXT_NAME.html | 2 +- .../iroh/node_info/enum.DecodingError.html | 39 +- .../iroh/node_info/enum.EncodingError.html | 39 +- .../docs/iroh/node_info/enum.ParseError.html | 39 +- pr/3367/docs/iroh/node_info/index.html | 4 +- pr/3367/docs/iroh/node_info/sidebar-items.js | 2 +- .../struct.MaxLengthExceededError.html | 37 +- .../docs/iroh/node_info/struct.NodeData.html | 61 +- .../docs/iroh/node_info/struct.NodeInfo.html | 80 +- .../docs/iroh/node_info/struct.UserData.html | 63 +- .../docs/iroh/node_info/trait.NodeIdExt.html | 8 +- .../docs/iroh/protocol/enum.AcceptError.html | 39 +- pr/3367/docs/iroh/protocol/index.html | 5 +- .../iroh/protocol/struct.AccessLimit.html | 47 +- pr/3367/docs/iroh/protocol/struct.Router.html | 44 +- .../iroh/protocol/struct.RouterBuilder.html | 37 +- .../protocol/trait.DynProtocolHandler.html | 10 +- .../iroh/protocol/trait.ProtocolHandler.html | 14 +- pr/3367/docs/iroh/sidebar-items.js | 2 +- pr/3367/docs/iroh/struct.NodeAddr.html | 84 +- pr/3367/docs/iroh/struct.PublicKey.html | 91 +- pr/3367/docs/iroh/struct.RelayMap.html | 43 +- pr/3367/docs/iroh/struct.RelayNode.html | 71 +- pr/3367/docs/iroh/struct.RelayUrl.html | 182 +- .../docs/iroh/struct.RelayUrlParseError.html | 37 +- pr/3367/docs/iroh/struct.SecretKey.html | 63 +- .../iroh/test_utils/fn.run_relay_server.html | 2 +- .../test_utils/fn.run_relay_server_with.html | 4 +- pr/3367/docs/iroh/test_utils/index.html | 2 +- .../test_utils/struct.CleanupDropGuard.html | 27 +- .../test_utils/struct.DnsPkarrServer.html | 33 +- pr/3367/docs/iroh/trait.Watcher.html | 16 +- pr/3367/docs/iroh/type.NodeId.html | 4 +- pr/3367/docs/iroh_base/all.html | 2 +- .../docs/iroh_base/enum.KeyParsingError.html | 28 +- pr/3367/docs/iroh_base/index.html | 2 +- pr/3367/docs/iroh_base/struct.NodeAddr.html | 54 +- pr/3367/docs/iroh_base/struct.PublicKey.html | 68 +- pr/3367/docs/iroh_base/struct.RelayUrl.html | 157 +- .../iroh_base/struct.RelayUrlParseError.html | 24 +- pr/3367/docs/iroh_base/struct.SecretKey.html | 48 +- pr/3367/docs/iroh_base/struct.Signature.html | 47 +- .../iroh_base/ticket/enum.ParseError.html | 24 +- pr/3367/docs/iroh_base/ticket/index.html | 2 +- .../iroh_base/ticket/struct.NodeTicket.html | 44 +- .../docs/iroh_base/ticket/trait.Ticket.html | 4 +- pr/3367/docs/iroh_base/type.NodeId.html | 4 +- .../docs/iroh_base/type.SignatureError.html | 4 +- pr/3367/docs/iroh_bench/all.html | 2 +- pr/3367/docs/iroh_bench/enum.Commands.html | 35 +- .../iroh_bench/enum.ConnectionSelector.html | 31 +- .../iroh_bench/enum.EndpointSelector.html | 31 +- .../docs/iroh_bench/fn.client_handler.html | 2 +- .../fn.configure_tracing_subscriber.html | 2 +- pr/3367/docs/iroh_bench/fn.rt.html | 2 +- pr/3367/docs/iroh_bench/index.html | 2 +- .../docs/iroh_bench/iroh/constant.ALPN.html | 2 +- pr/3367/docs/iroh_bench/iroh/fn.client.html | 6 +- .../iroh_bench/iroh/fn.connect_client.html | 8 +- .../iroh/fn.handle_client_stream.html | 4 +- pr/3367/docs/iroh_bench/iroh/fn.server.html | 2 +- .../iroh_bench/iroh/fn.server_endpoint.html | 6 +- .../iroh_bench/iroh/fn.transport_config.html | 2 +- pr/3367/docs/iroh_bench/iroh/index.html | 2 +- .../docs/iroh_bench/quinn/constant.ALPN.html | 2 +- pr/3367/docs/iroh_bench/quinn/fn.client.html | 2 +- .../iroh_bench/quinn/fn.connect_client.html | 2 +- .../quinn/fn.handle_client_stream.html | 2 +- pr/3367/docs/iroh_bench/quinn/fn.server.html | 2 +- .../iroh_bench/quinn/fn.server_endpoint.html | 2 +- .../iroh_bench/quinn/fn.transport_config.html | 2 +- pr/3367/docs/iroh_bench/quinn/index.html | 2 +- pr/3367/docs/iroh_bench/s2n/index.html | 2 +- pr/3367/docs/iroh_bench/s2n/struct.Opt.html | 35 +- .../iroh_bench/stats/fn.throughput_bps.html | 2 +- pr/3367/docs/iroh_bench/stats/index.html | 2 +- .../docs/iroh_bench/stats/struct.Stats.html | 27 +- .../iroh_bench/stats/struct.StreamStats.html | 27 +- .../stats/struct.TransferResult.html | 27 +- .../docs/iroh_bench/struct.ClientStats.html | 27 +- pr/3367/docs/iroh_bench/struct.Opt.html | 35 +- pr/3367/docs/iroh_dns_server/all.html | 2 +- .../config/enum.BootstrapOption.html | 38 +- .../docs/iroh_dns_server/config/index.html | 2 +- .../iroh_dns_server/config/struct.Config.html | 38 +- .../config/struct.MainlineConfig.html | 38 +- .../config/struct.MetricsConfig.html | 38 +- .../config/struct.StoreConfig.html | 44 +- pr/3367/docs/iroh_dns_server/dns/index.html | 2 +- .../iroh_dns_server/dns/struct.DnsConfig.html | 44 +- .../dns/struct.DnsHandler.html | 36 +- .../iroh_dns_server/dns/struct.DnsServer.html | 28 +- .../iroh_dns_server/dns/struct.Handle.html | 36 +- .../iroh_dns_server/http/enum.CertMode.html | 52 +- .../http/enum.RateLimitConfig.html | 44 +- pr/3367/docs/iroh_dns_server/http/index.html | 2 +- .../http/struct.HttpConfig.html | 44 +- .../http/struct.HttpServer.html | 28 +- .../http/struct.HttpsConfig.html | 44 +- pr/3367/docs/iroh_dns_server/index.html | 2 +- .../docs/iroh_dns_server/metrics/index.html | 2 +- .../metrics/struct.Metrics.html | 28 +- .../fn.run_with_config_until_ctrl_c.html | 2 +- .../docs/iroh_dns_server/server/index.html | 2 +- .../iroh_dns_server/server/struct.Server.html | 28 +- pr/3367/docs/iroh_dns_server/state/index.html | 2 +- .../state/struct.AppState.html | 36 +- .../iroh_dns_server/struct.ZoneStore.html | 38 +- pr/3367/docs/iroh_relay/all.html | 2 +- .../client/conn/enum.ReceivedMessage.html | 11 - .../client/conn/enum.SendMessage.html | 11 - .../iroh_relay/client/enum.ConnectError.html | 43 +- .../iroh_relay/client/enum.DialError.html | 41 +- .../client/enum.ReceivedMessage.html | 70 - .../iroh_relay/client/enum.RecvError.html | 63 +- .../iroh_relay/client/enum.SendError.html | 48 +- .../iroh_relay/client/enum.SendMessage.html | 61 - .../fn.make_dangerous_client_config.html | 2 +- pr/3367/docs/iroh_relay/client/index.html | 4 +- .../docs/iroh_relay/client/sidebar-items.js | 2 +- .../docs/iroh_relay/client/struct.Client.html | 122 +- .../client/struct.ClientBuilder.html | 54 +- .../iroh_relay/client/struct.ClientSink.html | 56 +- .../client/struct.ClientStream.html | 93 +- .../defaults/constant.DEFAULT_HTTPS_PORT.html | 2 +- .../defaults/constant.DEFAULT_HTTP_PORT.html | 2 +- .../constant.DEFAULT_KEY_CACHE_CAPACITY.html | 2 +- .../constant.DEFAULT_METRICS_PORT.html | 2 +- .../constant.DEFAULT_RELAY_QUIC_PORT.html | 2 +- pr/3367/docs/iroh_relay/defaults/index.html | 2 +- .../dns/constant.N0_DNS_NODE_ORIGIN_PROD.html | 2 +- .../constant.N0_DNS_NODE_ORIGIN_STAGING.html | 2 +- .../docs/iroh_relay/dns/enum.DnsError.html | 37 +- .../docs/iroh_relay/dns/enum.DnsProtocol.html | 54 + .../dns}/enum.LookupError.html | 49 +- pr/3367/docs/iroh_relay/dns/index.html | 4 +- pr/3367/docs/iroh_relay/dns/sidebar-items.js | 2 +- .../docs/iroh_relay/dns/struct.Builder.html | 46 + .../iroh_relay/dns/struct.DnsResolver.html | 110 +- .../iroh_relay/dns/struct.StaggeredError.html | 35 +- pr/3367/docs/iroh_relay/dns/struct.TXT.html | 31 - .../docs/iroh_relay/dns/struct.TxtLookup.html | 29 - .../iroh_relay/dns/struct.TxtRecordData.html | 45 + .../docs/iroh_relay/dns/trait.Resolver.html | 38 + pr/3367/docs/iroh_relay/dns/type.BoxIter.html | 2 + .../http/constant.CLIENT_AUTH_HEADER.html | 2 + .../iroh_relay/http/constant.RELAY_PATH.html | 2 +- .../http/constant.RELAY_PROBE_PATH.html | 2 +- .../http/constant.RELAY_PROTOCOL_VERSION.html | 4 + .../docs/iroh_relay/http/enum.Protocol.html | 42 - pr/3367/docs/iroh_relay/http/index.html | 6 +- pr/3367/docs/iroh_relay/http/sidebar-items.js | 2 +- pr/3367/docs/iroh_relay/index.html | 6 +- .../node_info/constant.IROH_TXT_NAME.html | 2 +- .../node_info/enum.DecodingError.html | 37 +- .../node_info/enum.EncodingError.html | 37 +- .../node_info/enum.LookupError.html | 50 - .../iroh_relay/node_info/enum.ParseError.html | 37 +- pr/3367/docs/iroh_relay/node_info/index.html | 10 +- .../iroh_relay/node_info/sidebar-items.js | 2 +- .../struct.MaxLengthExceededError.html | 35 +- .../iroh_relay/node_info/struct.NodeData.html | 69 +- .../iroh_relay/node_info/struct.NodeInfo.html | 90 +- .../iroh_relay/node_info/struct.UserData.html | 61 +- .../iroh_relay/node_info/trait.NodeIdExt.html | 12 +- .../protos/common/enum.FrameType.html | 77 + .../protos/common/enum.FrameTypeError.html | 53 + .../docs/iroh_relay/protos/common/index.html | 4 + .../iroh_relay/protos/common/sidebar-items.js | 1 + .../protos/disco/constant.MAGIC.html | 2 +- .../disco/fn.looks_like_disco_wrapper.html | 2 +- .../docs/iroh_relay/protos/disco/index.html | 2 +- .../protos/handshake/enum.Error.html | 81 + .../iroh_relay/protos/handshake/index.html | 22 + .../protos/handshake/sidebar-items.js | 1 + pr/3367/docs/iroh_relay/protos/index.html | 7 +- .../relay/constant.MAX_PACKET_SIZE.html | 2 +- .../protos/relay/enum.ClientToRelayMsg.html | 83 + .../iroh_relay/protos/relay/enum.Error.html | 89 + .../protos/relay/enum.FrameType.html | 70 - .../protos/relay/enum.RecvError.html | 80 - .../protos/relay/enum.RelayToClientMsg.html | 78 + .../protos/relay/enum.SendError.html | 56 - .../docs/iroh_relay/protos/relay/index.html | 21 +- .../iroh_relay/protos/relay/sidebar-items.js | 2 +- .../protos/relay/struct.Datagrams.html | 60 + .../docs/iroh_relay/protos/sidebar-items.js | 2 +- .../docs/iroh_relay/protos/streams/index.html | 3 + .../protos/streams/sidebar-items.js | 1 + .../quic/constant.ALPN_QUIC_ADDR_DISC.html | 2 +- .../constant.QUIC_ADDR_DISC_CLOSE_CODE.html | 2 +- .../constant.QUIC_ADDR_DISC_CLOSE_REASON.html | 2 +- pr/3367/docs/iroh_relay/quic/enum.Error.html | 33 +- pr/3367/docs/iroh_relay/quic/index.html | 2 +- .../iroh_relay/quic/struct.QuicClient.html | 35 +- ...constant.DEFAULT_CERT_RELOAD_INTERVAL.html | 2 +- .../docs/iroh_relay/server/enum.Access.html | 39 +- .../iroh_relay/server/enum.AccessConfig.html | 35 +- .../iroh_relay/server/enum.CertConfig.html | 29 +- .../iroh_relay/server/enum.SpawnError.html | 35 +- .../server/enum.SupervisorError.html | 37 +- pr/3367/docs/iroh_relay/server/index.html | 2 +- .../server/struct.ClientRateLimit.html | 35 +- .../docs/iroh_relay/server/struct.Limits.html | 29 +- .../iroh_relay/server/struct.Metrics.html | 35 +- .../iroh_relay/server/struct.QuicConfig.html | 29 +- .../iroh_relay/server/struct.RelayConfig.html | 31 +- .../server/struct.RelayMetrics.html | 35 +- .../server/struct.ReloadingResolver.html | 29 +- .../docs/iroh_relay/server/struct.Server.html | 49 +- .../server/struct.ServerConfig.html | 31 +- .../iroh_relay/server/struct.TlsConfig.html | 31 +- .../server/testing/fn.quic_config.html | 2 +- .../server/testing/fn.relay_config.html | 2 +- .../fn.self_signed_tls_certs_and_config.html | 2 +- .../server/testing/fn.server_config.html | 2 +- .../server/testing/fn.tls_config.html | 2 +- .../docs/iroh_relay/server/testing/index.html | 2 +- .../docs/iroh_relay/struct.PingTracker.html | 27 +- pr/3367/docs/iroh_relay/struct.RelayMap.html | 51 +- pr/3367/docs/iroh_relay/struct.RelayNode.html | 69 +- .../iroh_relay/struct.RelayQuicConfig.html | 61 +- pr/3367/docs/search-index.js | 4 - pr/3367/docs/search.desc/bulk/bulk-desc-0-.js | 1 - pr/3367/docs/search.desc/iroh/iroh-desc-0-.js | 1 - .../iroh_base/iroh_base-desc-0-.js | 1 - .../iroh_bench/iroh_bench-desc-0-.js | 1 - .../iroh_dns_server-desc-0-.js | 1 - .../iroh_relay/iroh_relay-desc-0-.js | 1 - pr/3367/docs/search.index/009d20612824.js | 1 + pr/3367/docs/search.index/0122bc9b92b1.js | 1 + pr/3367/docs/search.index/0122e3c0d8e7.js | 1 + pr/3367/docs/search.index/01a69fea799b.js | 1 + pr/3367/docs/search.index/033d0297065a.js | 1 + pr/3367/docs/search.index/0527f3bb1d37.js | 1 + pr/3367/docs/search.index/059e007d44ac.js | 1 + pr/3367/docs/search.index/05e9b5ef0fa0.js | 1 + pr/3367/docs/search.index/060b036e628a.js | 1 + pr/3367/docs/search.index/066b883e6d3f.js | 1 + pr/3367/docs/search.index/066d117574ad.js | 1 + pr/3367/docs/search.index/0689e9887e3c.js | 1 + pr/3367/docs/search.index/06e9545614b8.js | 1 + pr/3367/docs/search.index/07c43c8fd166.js | 1 + pr/3367/docs/search.index/0808a659bf22.js | 1 + pr/3367/docs/search.index/0859302c02f9.js | 1 + pr/3367/docs/search.index/09277f481421.js | 1 + pr/3367/docs/search.index/094164d31ba7.js | 1 + pr/3367/docs/search.index/095bde4dfe6a.js | 1 + pr/3367/docs/search.index/0a18328ba50a.js | 1 + pr/3367/docs/search.index/0a46168a9c61.js | 1 + pr/3367/docs/search.index/0b1ab219f1b5.js | 1 + pr/3367/docs/search.index/0b5f2bdd28cb.js | 1 + pr/3367/docs/search.index/0b82f5d55668.js | 1 + pr/3367/docs/search.index/0bafe33b4b3d.js | 1 + pr/3367/docs/search.index/0bd1150d9918.js | 1 + pr/3367/docs/search.index/0c792a6bf372.js | 1 + pr/3367/docs/search.index/0d2097bf4d0d.js | 1 + pr/3367/docs/search.index/0d23c31f1857.js | 1 + pr/3367/docs/search.index/0ec7f231d92c.js | 1 + pr/3367/docs/search.index/0f24afa3b583.js | 1 + pr/3367/docs/search.index/10956c5d106a.js | 1 + pr/3367/docs/search.index/1117fccae43c.js | 1 + pr/3367/docs/search.index/1167a31a3b2c.js | 1 + pr/3367/docs/search.index/11857f78dc42.js | 1 + pr/3367/docs/search.index/122635a9d1f2.js | 1 + pr/3367/docs/search.index/12640ce03ec3.js | 1 + pr/3367/docs/search.index/1387d9b70733.js | 1 + pr/3367/docs/search.index/13f436dd1a89.js | 1 + pr/3367/docs/search.index/13f5a28590ba.js | 1 + pr/3367/docs/search.index/1405c94ad5a1.js | 1 + pr/3367/docs/search.index/144c1e5ca499.js | 1 + pr/3367/docs/search.index/15154c5a0c07.js | 1 + pr/3367/docs/search.index/152185296c58.js | 1 + pr/3367/docs/search.index/15395a0b1cab.js | 1 + pr/3367/docs/search.index/15af1715de34.js | 1 + pr/3367/docs/search.index/168c90ab1eac.js | 1 + pr/3367/docs/search.index/177e9047a949.js | 1 + pr/3367/docs/search.index/17dc0d39ea4c.js | 1 + pr/3367/docs/search.index/180fd1b736e6.js | 1 + pr/3367/docs/search.index/181cee09dbfd.js | 1 + pr/3367/docs/search.index/1828c63cb5eb.js | 1 + pr/3367/docs/search.index/18b0f64900c6.js | 1 + pr/3367/docs/search.index/19230ca54f08.js | 1 + pr/3367/docs/search.index/1c0b3a05c267.js | 1 + pr/3367/docs/search.index/1c2be8241d46.js | 1 + pr/3367/docs/search.index/1cae2e6bab46.js | 1 + pr/3367/docs/search.index/1de7774e957d.js | 1 + pr/3367/docs/search.index/1e16849da0f4.js | 1 + pr/3367/docs/search.index/1ff1669124ff.js | 1 + pr/3367/docs/search.index/202ee8ed5c1b.js | 1 + pr/3367/docs/search.index/205ae3b958da.js | 1 + pr/3367/docs/search.index/21fff7495201.js | 1 + pr/3367/docs/search.index/2278700d791d.js | 1 + pr/3367/docs/search.index/237c954227a8.js | 1 + pr/3367/docs/search.index/23bfc129cb27.js | 1 + pr/3367/docs/search.index/24cce4f7d1a8.js | 1 + pr/3367/docs/search.index/25b0eb496f36.js | 1 + pr/3367/docs/search.index/25bb83d41259.js | 1 + pr/3367/docs/search.index/25f2248e37b0.js | 1 + pr/3367/docs/search.index/2637f960d29a.js | 1 + pr/3367/docs/search.index/266d2a2746a7.js | 1 + pr/3367/docs/search.index/266f6ec56a8c.js | 1 + pr/3367/docs/search.index/276c8e8c0d06.js | 1 + pr/3367/docs/search.index/277157212f78.js | 1 + pr/3367/docs/search.index/27c6d4d52a18.js | 1 + pr/3367/docs/search.index/27e30083cf08.js | 1 + pr/3367/docs/search.index/283e86585e60.js | 1 + pr/3367/docs/search.index/290b514604c2.js | 1 + pr/3367/docs/search.index/2935fb158147.js | 1 + pr/3367/docs/search.index/2953647cde0d.js | 1 + pr/3367/docs/search.index/2963dbe6343a.js | 1 + pr/3367/docs/search.index/29ffdf834871.js | 1 + pr/3367/docs/search.index/2b0cb4045433.js | 1 + pr/3367/docs/search.index/2b5b9ba6e7b8.js | 1 + pr/3367/docs/search.index/2b5d1e7f49ec.js | 1 + pr/3367/docs/search.index/2bec31d48a42.js | 1 + pr/3367/docs/search.index/2cba34e439d7.js | 1 + pr/3367/docs/search.index/2cc89c599382.js | 1 + pr/3367/docs/search.index/2d42e48fe501.js | 1 + pr/3367/docs/search.index/2d5415483f4a.js | 1 + pr/3367/docs/search.index/2d70d64be50a.js | 1 + pr/3367/docs/search.index/2e4662473246.js | 1 + pr/3367/docs/search.index/2ea52f60e4c6.js | 1 + pr/3367/docs/search.index/2ee3edb33798.js | 1 + pr/3367/docs/search.index/304771dc1af7.js | 1 + pr/3367/docs/search.index/30b4a65e652d.js | 1 + pr/3367/docs/search.index/30d87768308a.js | 1 + pr/3367/docs/search.index/311f6ce98ccf.js | 1 + pr/3367/docs/search.index/31269b47306b.js | 1 + pr/3367/docs/search.index/31a52d7a0e9a.js | 1 + pr/3367/docs/search.index/3253ef7adb23.js | 1 + pr/3367/docs/search.index/32a749494be1.js | 1 + pr/3367/docs/search.index/33e8be1d9a8d.js | 1 + pr/3367/docs/search.index/341524ab7d8a.js | 1 + pr/3367/docs/search.index/34d3eb51eb99.js | 1 + pr/3367/docs/search.index/34f2dd59f3e3.js | 1 + pr/3367/docs/search.index/350e4014b645.js | 1 + pr/3367/docs/search.index/3540a76be9c5.js | 1 + pr/3367/docs/search.index/3552e31b4f71.js | 1 + pr/3367/docs/search.index/35fad3125401.js | 1 + pr/3367/docs/search.index/36b2fc8c11cc.js | 1 + pr/3367/docs/search.index/3790c66c7911.js | 1 + pr/3367/docs/search.index/37cdc118ed47.js | 1 + pr/3367/docs/search.index/3ade3645693a.js | 1 + pr/3367/docs/search.index/3b8b0c20d9b5.js | 1 + pr/3367/docs/search.index/3bbf0a1a75da.js | 1 + pr/3367/docs/search.index/3c4b3a331ceb.js | 1 + pr/3367/docs/search.index/3c4ea0cf5ffc.js | 1 + pr/3367/docs/search.index/3c5f555f1103.js | 1 + pr/3367/docs/search.index/3c8a16a3bee3.js | 1 + pr/3367/docs/search.index/3ecf659738e3.js | 1 + pr/3367/docs/search.index/3f3a716a6a29.js | 1 + pr/3367/docs/search.index/3f794cad0802.js | 1 + pr/3367/docs/search.index/3fb5c77caaa6.js | 1 + pr/3367/docs/search.index/410fc24e7a7c.js | 1 + pr/3367/docs/search.index/413722c968b9.js | 1 + pr/3367/docs/search.index/4165995c34cc.js | 1 + pr/3367/docs/search.index/4306ca4dd218.js | 1 + pr/3367/docs/search.index/443a604d2eca.js | 1 + pr/3367/docs/search.index/4504c6541a07.js | 1 + pr/3367/docs/search.index/454d4ba77f84.js | 1 + pr/3367/docs/search.index/45a9f431e761.js | 1 + pr/3367/docs/search.index/4623f04a6d79.js | 1 + pr/3367/docs/search.index/472747a6178e.js | 1 + pr/3367/docs/search.index/472c117bf1de.js | 1 + pr/3367/docs/search.index/477f4bc417b1.js | 1 + pr/3367/docs/search.index/47e0f7387cee.js | 1 + pr/3367/docs/search.index/47fab9f046de.js | 1 + pr/3367/docs/search.index/485b8bb1de89.js | 1 + pr/3367/docs/search.index/4a0f95af0b92.js | 1 + pr/3367/docs/search.index/4af3e1d598fa.js | 1 + pr/3367/docs/search.index/4b9264582700.js | 1 + pr/3367/docs/search.index/4c0b6e27d444.js | 1 + pr/3367/docs/search.index/4ca19230a3bc.js | 1 + pr/3367/docs/search.index/4d4e18c38a5b.js | 1 + pr/3367/docs/search.index/4e93f92ac054.js | 1 + pr/3367/docs/search.index/4f08f1a62681.js | 1 + pr/3367/docs/search.index/4f115e55d3fa.js | 1 + pr/3367/docs/search.index/4f62d817b363.js | 1 + pr/3367/docs/search.index/5155720b73f0.js | 1 + pr/3367/docs/search.index/536495994aac.js | 1 + pr/3367/docs/search.index/53e7f740bdcf.js | 1 + pr/3367/docs/search.index/5423b3831267.js | 1 + pr/3367/docs/search.index/545eafbf0be8.js | 1 + pr/3367/docs/search.index/546fd9350b68.js | 1 + pr/3367/docs/search.index/5507011d8f7d.js | 1 + pr/3367/docs/search.index/55a8e7b70fe8.js | 1 + pr/3367/docs/search.index/55bcc26466ab.js | 1 + pr/3367/docs/search.index/5615dd876959.js | 1 + pr/3367/docs/search.index/568655a45f90.js | 1 + pr/3367/docs/search.index/56eff1f778ff.js | 1 + pr/3367/docs/search.index/56f2bb2028e9.js | 1 + pr/3367/docs/search.index/575bf97e83e5.js | 1 + pr/3367/docs/search.index/57ad8a0a9d6f.js | 1 + pr/3367/docs/search.index/57c6b1822fcb.js | 1 + pr/3367/docs/search.index/590c69904c3a.js | 1 + pr/3367/docs/search.index/59a6c2ebd501.js | 1 + pr/3367/docs/search.index/5a4efa70326b.js | 1 + pr/3367/docs/search.index/5a7ee23cbc41.js | 1 + pr/3367/docs/search.index/5ac6c7bf1d5c.js | 1 + pr/3367/docs/search.index/5ae743af5768.js | 1 + pr/3367/docs/search.index/5af434536ad0.js | 1 + pr/3367/docs/search.index/5b4d7c34bc10.js | 1 + pr/3367/docs/search.index/5c1b63a3d242.js | 1 + pr/3367/docs/search.index/5c3a8909d56b.js | 1 + pr/3367/docs/search.index/5d210a6ea76b.js | 1 + pr/3367/docs/search.index/5d36fca2c08b.js | 1 + pr/3367/docs/search.index/5d8b23bc9c20.js | 1 + pr/3367/docs/search.index/5e00b2e97a8d.js | 1 + pr/3367/docs/search.index/5e6fb814b055.js | 1 + pr/3367/docs/search.index/5ed7710af0dc.js | 1 + pr/3367/docs/search.index/5eea27eafe19.js | 1 + pr/3367/docs/search.index/5f988263debd.js | 1 + pr/3367/docs/search.index/608434208057.js | 1 + pr/3367/docs/search.index/612e3413c39a.js | 1 + pr/3367/docs/search.index/617baaa0041b.js | 1 + pr/3367/docs/search.index/62584d2c8c84.js | 1 + pr/3367/docs/search.index/631977bc4a93.js | 1 + pr/3367/docs/search.index/64b86b725f9f.js | 1 + pr/3367/docs/search.index/6667e297d709.js | 1 + pr/3367/docs/search.index/673f9d002d44.js | 1 + pr/3367/docs/search.index/67bbee2489cb.js | 1 + pr/3367/docs/search.index/67bc12d79593.js | 1 + pr/3367/docs/search.index/681f1c5fa6c3.js | 1 + pr/3367/docs/search.index/694923bc1837.js | 1 + pr/3367/docs/search.index/6adfa2d470e2.js | 1 + pr/3367/docs/search.index/6b4c08938677.js | 1 + pr/3367/docs/search.index/6b73884074e2.js | 1 + pr/3367/docs/search.index/6ba935847153.js | 1 + pr/3367/docs/search.index/6bbb9e83aaf9.js | 1 + pr/3367/docs/search.index/6d569a951fed.js | 1 + pr/3367/docs/search.index/6d9dc6990f11.js | 1 + pr/3367/docs/search.index/6e24177b5956.js | 1 + pr/3367/docs/search.index/6fc90deed12a.js | 1 + pr/3367/docs/search.index/708ecbd29119.js | 1 + pr/3367/docs/search.index/7130ced0589b.js | 1 + pr/3367/docs/search.index/71c0a7edf2e2.js | 1 + pr/3367/docs/search.index/72c312cad641.js | 1 + pr/3367/docs/search.index/738fb6316a26.js | 1 + pr/3367/docs/search.index/73c3866a8ade.js | 1 + pr/3367/docs/search.index/73dad749a23e.js | 1 + pr/3367/docs/search.index/73e213d1266d.js | 1 + pr/3367/docs/search.index/741f7ab64068.js | 1 + pr/3367/docs/search.index/7444602978bc.js | 1 + pr/3367/docs/search.index/74b83b96b911.js | 1 + pr/3367/docs/search.index/7576217634bd.js | 1 + pr/3367/docs/search.index/76a78bceb8c8.js | 1 + pr/3367/docs/search.index/76fa5eb7c0e7.js | 1 + pr/3367/docs/search.index/772467e18e07.js | 1 + pr/3367/docs/search.index/7759138efa61.js | 1 + pr/3367/docs/search.index/777bedcf9532.js | 1 + pr/3367/docs/search.index/77e145438903.js | 1 + pr/3367/docs/search.index/77e1da522e36.js | 1 + pr/3367/docs/search.index/790a03d5ac22.js | 1 + pr/3367/docs/search.index/79b7bbdd44be.js | 1 + pr/3367/docs/search.index/7a4e850f5494.js | 1 + pr/3367/docs/search.index/7b1758c4b2b2.js | 1 + pr/3367/docs/search.index/7bd9c1aac951.js | 1 + pr/3367/docs/search.index/7be17057425f.js | 1 + pr/3367/docs/search.index/7bed45f8a353.js | 1 + pr/3367/docs/search.index/7bf7fc8ab6f3.js | 1 + pr/3367/docs/search.index/7cbfa11bb9fa.js | 1 + pr/3367/docs/search.index/7cf1ecc28f90.js | 1 + pr/3367/docs/search.index/7d50302474a6.js | 1 + pr/3367/docs/search.index/7e0396ca6090.js | 1 + pr/3367/docs/search.index/7e24de05e932.js | 1 + pr/3367/docs/search.index/7ea42766f407.js | 1 + pr/3367/docs/search.index/7faf8f6da58d.js | 1 + .../docs/search.index/alias/a762150c532c.js | 1 + .../search.index/crateNames/c4c174243285.js | 1 + .../docs/search.index/desc/bf20fd5d6ec0.js | 1 + .../docs/search.index/entry/f787478b550d.js | 1 + .../search.index/function/0115eda9b6ed.js | 1 + .../generic_inverted_index/b07d705b456a.js | 1 + .../docs/search.index/name/d00df074fb9f.js | 1 + .../normalizedName/6a7a83122975.js | 1 + .../docs/search.index/path/10e9b1fcf710.js | 1 + pr/3367/docs/search.index/root.js | 1 + .../docs/search.index/type/e54ec13a96e4.js | 1 + pr/3367/docs/settings.html | 2 +- pr/3367/docs/src-files.js | 5 +- pr/3367/docs/src/bulk/bulk.rs.html | 6 +- pr/3367/docs/src/iroh/defaults.rs.html | 8 +- pr/3367/docs/src/iroh/disco.rs.html | 222 +- pr/3367/docs/src/iroh/discovery.rs.html | 2287 +++--- pr/3367/docs/src/iroh/discovery/dns.rs.html | 4 +- pr/3367/docs/src/iroh/discovery/mdns.rs.html | 1300 ++-- pr/3367/docs/src/iroh/discovery/pkarr.rs.html | 1088 +-- .../docs/src/iroh/discovery/pkarr/dht.rs.html | 711 +- .../iroh/discovery/static_provider.rs.html | 465 +- pr/3367/docs/src/iroh/dns.rs.html | 2 +- pr/3367/docs/src/iroh/endpoint.rs.html | 6221 ++++++++-------- .../docs/src/iroh/endpoint/rtt_actor.rs.html | 8 +- pr/3367/docs/src/iroh/key.rs.html | 290 +- pr/3367/docs/src/iroh/lib.rs.html | 10 +- pr/3367/docs/src/iroh/magicsock.rs.html | 6584 +++++++++-------- .../docs/src/iroh/magicsock/metrics.rs.html | 27 +- .../docs/src/iroh/magicsock/node_map.rs.html | 1802 ++--- .../iroh/magicsock/node_map/best_addr.rs.html | 221 - .../magicsock/node_map/node_state.rs.html | 3428 +++++---- .../magicsock/node_map/path_state.rs.html | 640 +- .../magicsock/node_map/path_validity.rs.html | 398 + .../iroh/magicsock/node_map/udp_paths.rs.html | 409 +- .../src/iroh/magicsock/transports.rs.html | 14 +- .../src/iroh/magicsock/transports/ip.rs.html | 249 +- .../iroh/magicsock/transports/relay.rs.html | 834 ++- .../magicsock/transports/relay/actor.rs.html | 3210 ++++---- pr/3367/docs/src/iroh/metrics.rs.html | 2 +- pr/3367/docs/src/iroh/net_report.rs.html | 2137 +++--- .../docs/src/iroh/net_report/defaults.rs.html | 53 +- .../iroh/net_report/ip_mapped_addrs.rs.html | 6 +- .../docs/src/iroh/net_report/metrics.rs.html | 2 +- .../docs/src/iroh/net_report/options.rs.html | 4 +- .../docs/src/iroh/net_report/probes.rs.html | 2 +- .../docs/src/iroh/net_report/report.rs.html | 415 +- .../src/iroh/net_report/reportgen.rs.html | 1673 ++--- pr/3367/docs/src/iroh/protocol.rs.html | 1298 ++-- pr/3367/docs/src/iroh/test_utils.rs.html | 30 +- pr/3367/docs/src/iroh/tls.rs.html | 8 +- pr/3367/docs/src/iroh/tls/name.rs.html | 40 +- pr/3367/docs/src/iroh/tls/resolver.rs.html | 6 +- pr/3367/docs/src/iroh/tls/verifier.rs.html | 14 +- pr/3367/docs/src/iroh/util.rs.html | 55 +- pr/3367/docs/src/iroh_base/key.rs.html | 806 +- pr/3367/docs/src/iroh_base/lib.rs.html | 4 +- pr/3367/docs/src/iroh_base/node_addr.rs.html | 4 +- pr/3367/docs/src/iroh_base/relay_url.rs.html | 2 +- pr/3367/docs/src/iroh_base/ticket.rs.html | 2 +- .../docs/src/iroh_base/ticket/node.rs.html | 369 +- pr/3367/docs/src/iroh_bench/iroh.rs.html | 565 +- pr/3367/docs/src/iroh_bench/lib.rs.html | 2 +- pr/3367/docs/src/iroh_bench/quinn.rs.html | 10 +- pr/3367/docs/src/iroh_bench/s2n.rs.html | 2 +- pr/3367/docs/src/iroh_bench/stats.rs.html | 2 +- .../docs/src/iroh_dns_server/config.rs.html | 2 +- pr/3367/docs/src/iroh_dns_server/dns.rs.html | 10 +- .../dns/node_authority.rs.html | 4 +- pr/3367/docs/src/iroh_dns_server/http.rs.html | 18 +- .../docs/src/iroh_dns_server/http/doh.rs.html | 12 +- .../iroh_dns_server/http/doh/extract.rs.html | 6 +- .../iroh_dns_server/http/doh/response.rs.html | 2 +- .../src/iroh_dns_server/http/error.rs.html | 12 +- .../src/iroh_dns_server/http/pkarr.rs.html | 4 +- .../http/rate_limiting.rs.html | 30 +- .../docs/src/iroh_dns_server/http/tls.rs.html | 12 +- pr/3367/docs/src/iroh_dns_server/lib.rs.html | 485 +- .../docs/src/iroh_dns_server/metrics.rs.html | 2 +- .../docs/src/iroh_dns_server/server.rs.html | 2 +- .../docs/src/iroh_dns_server/state.rs.html | 2 +- .../docs/src/iroh_dns_server/store.rs.html | 4 +- .../store/signed_packets.rs.html | 489 +- pr/3367/docs/src/iroh_dns_server/util.rs.html | 8 +- pr/3367/docs/src/iroh_relay/client.rs.html | 892 ++- .../docs/src/iroh_relay/client/conn.rs.html | 636 +- .../src/iroh_relay/client/streams.rs.html | 469 +- .../docs/src/iroh_relay/client/tls.rs.html | 766 +- .../docs/src/iroh_relay/client/util.rs.html | 4 +- pr/3367/docs/src/iroh_relay/defaults.rs.html | 2 +- pr/3367/docs/src/iroh_relay/dns.rs.html | 1443 ++-- pr/3367/docs/src/iroh_relay/http.rs.html | 78 +- pr/3367/docs/src/iroh_relay/key_cache.rs.html | 4 +- pr/3367/docs/src/iroh_relay/lib.rs.html | 34 +- pr/3367/docs/src/iroh_relay/node_info.rs.html | 1514 ++-- .../docs/src/iroh_relay/ping_tracker.rs.html | 2 +- pr/3367/docs/src/iroh_relay/protos.rs.html | 9 +- .../docs/src/iroh_relay/protos/common.rs.html | 111 + .../docs/src/iroh_relay/protos/disco.rs.html | 2 +- .../src/iroh_relay/protos/handshake.rs.html | 823 +++ .../docs/src/iroh_relay/protos/relay.rs.html | 1721 ++--- .../src/iroh_relay/protos/streams.rs.html | 166 + pr/3367/docs/src/iroh_relay/quic.rs.html | 32 +- pr/3367/docs/src/iroh_relay/relay_map.rs.html | 2 +- pr/3367/docs/src/iroh_relay/server.rs.html | 2149 +++--- .../docs/src/iroh_relay/server/client.rs.html | 1712 ++--- .../src/iroh_relay/server/clients.rs.html | 555 +- .../src/iroh_relay/server/http_server.rs.html | 2625 +++---- .../src/iroh_relay/server/metrics.rs.html | 39 +- .../src/iroh_relay/server/resolver.rs.html | 2 +- .../src/iroh_relay/server/streams.rs.html | 744 +- .../src/iroh_relay/server/testing.rs.html | 4 +- ...HT-565f0803.txt => COPYRIGHT-7fb11f4e.txt} | 21 + .../static.files/favicon-32x32-6580c154.png | Bin 1125 -> 0 bytes .../static.files/favicon-32x32-eab170b8.png | Bin 0 -> 690 bytes pr/3367/docs/static.files/main-5332ae0c.js | 11 - pr/3367/docs/static.files/main-ce535bd0.js | 24 + .../docs/static.files/noscript-263c88ec.css | 1 + .../docs/static.files/noscript-893ab5e7.css | 1 - .../docs/static.files/rustdoc-6c3ea77c.css | 63 - .../docs/static.files/rustdoc-ca0dd0c4.css | 86 + .../static.files/scrape-examples-2bbcccac.js | 1 + .../static.files/scrape-examples-5e967b76.js | 1 - pr/3367/docs/static.files/search-8d3311b9.js | 5 + pr/3367/docs/static.files/search-f7327375.js | 6 - .../docs/static.files/settings-6dad6058.js | 17 - .../docs/static.files/settings-c38705f0.js | 17 + .../docs/static.files/src-script-813739b1.js | 1 + .../docs/static.files/src-script-b8d3f215.js | 1 - pr/3367/docs/static.files/storage-3a5871a4.js | 23 - pr/3367/docs/static.files/storage-e2aeef58.js | 27 + .../docs/static.files/stringdex-828709d0.js | 2 + .../docs/trait.impl/core/clone/trait.Clone.js | 4 +- pr/3367/docs/trait.impl/core/cmp/trait.Eq.js | 4 +- .../trait.impl/core/cmp/trait.PartialEq.js | 4 +- .../trait.impl/core/convert/trait.From.js | 4 +- .../trait.impl/core/convert/trait.TryFrom.js | 4 +- .../trait.impl/core/default/trait.Default.js | 4 +- .../docs/trait.impl/core/error/trait.Error.js | 4 +- .../docs/trait.impl/core/fmt/trait.Debug.js | 4 +- .../docs/trait.impl/core/fmt/trait.Display.js | 4 +- .../docs/trait.impl/core/hash/trait.Hash.js | 4 +- .../iter/traits/collect/trait.FromIterator.js | 4 +- .../iter/traits/collect/trait.IntoIterator.js | 9 - .../docs/trait.impl/core/marker/trait.Copy.js | 4 +- .../trait.impl/core/marker/trait.Freeze.js | 4 +- .../docs/trait.impl/core/marker/trait.Send.js | 4 +- .../core/marker/trait.StructuralPartialEq.js | 4 +- .../docs/trait.impl/core/marker/trait.Sync.js | 4 +- .../trait.impl/core/marker/trait.Unpin.js | 4 +- .../core/marker/trait.UnsafeUnpin.js | 9 + .../trait.impl/core/ops/deref/trait.Deref.js | 4 +- .../panic/unwind_safe/trait.RefUnwindSafe.js | 4 +- .../panic/unwind_safe/trait.UnwindSafe.js | 4 +- .../trait.impl/futures_sink/trait.Sink.js | 4 +- ...Primitive.js => trait.TryFromPrimitive.js} | 4 +- .../trait.impl/serde/de/trait.Deserialize.js | 9 - .../trait.impl/serde/ser/trait.Serialize.js | 9 - .../serde_core/de/trait.Deserialize.js | 9 + .../serde_core/ser/trait.Serialize.js | 9 + .../trait.impl/snafu/trait.ErrorCompat.js | 4 +- .../docs/type.impl/alloc/boxed/struct.Box.js | 9 + .../docs/type.impl/iroh/struct.PublicKey.js | 4 +- .../type.impl/iroh_base/struct.PublicKey.js | 4 +- .../type.impl/signature/error/struct.Error.js | 4 +- 797 files changed, 35294 insertions(+), 32112 deletions(-) create mode 100644 pr/3367/docs/iroh/discovery/mdns/enum.DiscoveryEvent.html delete mode 100644 pr/3367/docs/iroh/discovery/struct.Lagged.html delete mode 100644 pr/3367/docs/iroh/endpoint/struct.RemoteInfo.html delete mode 100644 pr/3367/docs/iroh/enum.RelayProtocol.html delete mode 100644 pr/3367/docs/iroh/magicsock/node_map/node_state/struct.RemoteInfo.html create mode 100644 pr/3367/docs/iroh/net_report/constant.TIMEOUT.html create mode 100644 pr/3367/docs/iroh/net_report/defaults/timeouts/constant.TIMEOUT.html delete mode 100644 pr/3367/docs/iroh_relay/client/conn/enum.ReceivedMessage.html delete mode 100644 pr/3367/docs/iroh_relay/client/conn/enum.SendMessage.html delete mode 100644 pr/3367/docs/iroh_relay/client/enum.ReceivedMessage.html delete mode 100644 pr/3367/docs/iroh_relay/client/enum.SendMessage.html create mode 100644 pr/3367/docs/iroh_relay/dns/enum.DnsProtocol.html rename pr/3367/docs/{iroh/node_info => iroh_relay/dns}/enum.LookupError.html (56%) create mode 100644 pr/3367/docs/iroh_relay/dns/struct.Builder.html delete mode 100644 pr/3367/docs/iroh_relay/dns/struct.TXT.html delete mode 100644 pr/3367/docs/iroh_relay/dns/struct.TxtLookup.html create mode 100644 pr/3367/docs/iroh_relay/dns/struct.TxtRecordData.html create mode 100644 pr/3367/docs/iroh_relay/dns/trait.Resolver.html create mode 100644 pr/3367/docs/iroh_relay/dns/type.BoxIter.html create mode 100644 pr/3367/docs/iroh_relay/http/constant.CLIENT_AUTH_HEADER.html create mode 100644 pr/3367/docs/iroh_relay/http/constant.RELAY_PROTOCOL_VERSION.html delete mode 100644 pr/3367/docs/iroh_relay/http/enum.Protocol.html delete mode 100644 pr/3367/docs/iroh_relay/node_info/enum.LookupError.html create mode 100644 pr/3367/docs/iroh_relay/protos/common/enum.FrameType.html create mode 100644 pr/3367/docs/iroh_relay/protos/common/enum.FrameTypeError.html create mode 100644 pr/3367/docs/iroh_relay/protos/common/index.html create mode 100644 pr/3367/docs/iroh_relay/protos/common/sidebar-items.js create mode 100644 pr/3367/docs/iroh_relay/protos/handshake/enum.Error.html create mode 100644 pr/3367/docs/iroh_relay/protos/handshake/index.html create mode 100644 pr/3367/docs/iroh_relay/protos/handshake/sidebar-items.js create mode 100644 pr/3367/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html create mode 100644 pr/3367/docs/iroh_relay/protos/relay/enum.Error.html delete mode 100644 pr/3367/docs/iroh_relay/protos/relay/enum.FrameType.html delete mode 100644 pr/3367/docs/iroh_relay/protos/relay/enum.RecvError.html create mode 100644 pr/3367/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html delete mode 100644 pr/3367/docs/iroh_relay/protos/relay/enum.SendError.html create mode 100644 pr/3367/docs/iroh_relay/protos/relay/struct.Datagrams.html create mode 100644 pr/3367/docs/iroh_relay/protos/streams/index.html create mode 100644 pr/3367/docs/iroh_relay/protos/streams/sidebar-items.js delete mode 100644 pr/3367/docs/search-index.js delete mode 100644 pr/3367/docs/search.desc/bulk/bulk-desc-0-.js delete mode 100644 pr/3367/docs/search.desc/iroh/iroh-desc-0-.js delete mode 100644 pr/3367/docs/search.desc/iroh_base/iroh_base-desc-0-.js delete mode 100644 pr/3367/docs/search.desc/iroh_bench/iroh_bench-desc-0-.js delete mode 100644 pr/3367/docs/search.desc/iroh_dns_server/iroh_dns_server-desc-0-.js delete mode 100644 pr/3367/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js create mode 100644 pr/3367/docs/search.index/009d20612824.js create mode 100644 pr/3367/docs/search.index/0122bc9b92b1.js create mode 100644 pr/3367/docs/search.index/0122e3c0d8e7.js create mode 100644 pr/3367/docs/search.index/01a69fea799b.js create mode 100644 pr/3367/docs/search.index/033d0297065a.js create mode 100644 pr/3367/docs/search.index/0527f3bb1d37.js create mode 100644 pr/3367/docs/search.index/059e007d44ac.js create mode 100644 pr/3367/docs/search.index/05e9b5ef0fa0.js create mode 100644 pr/3367/docs/search.index/060b036e628a.js create mode 100644 pr/3367/docs/search.index/066b883e6d3f.js create mode 100644 pr/3367/docs/search.index/066d117574ad.js create mode 100644 pr/3367/docs/search.index/0689e9887e3c.js create mode 100644 pr/3367/docs/search.index/06e9545614b8.js create mode 100644 pr/3367/docs/search.index/07c43c8fd166.js create mode 100644 pr/3367/docs/search.index/0808a659bf22.js create mode 100644 pr/3367/docs/search.index/0859302c02f9.js create mode 100644 pr/3367/docs/search.index/09277f481421.js create mode 100644 pr/3367/docs/search.index/094164d31ba7.js create mode 100644 pr/3367/docs/search.index/095bde4dfe6a.js create mode 100644 pr/3367/docs/search.index/0a18328ba50a.js create mode 100644 pr/3367/docs/search.index/0a46168a9c61.js create mode 100644 pr/3367/docs/search.index/0b1ab219f1b5.js create mode 100644 pr/3367/docs/search.index/0b5f2bdd28cb.js create mode 100644 pr/3367/docs/search.index/0b82f5d55668.js create mode 100644 pr/3367/docs/search.index/0bafe33b4b3d.js create mode 100644 pr/3367/docs/search.index/0bd1150d9918.js create mode 100644 pr/3367/docs/search.index/0c792a6bf372.js create mode 100644 pr/3367/docs/search.index/0d2097bf4d0d.js create mode 100644 pr/3367/docs/search.index/0d23c31f1857.js create mode 100644 pr/3367/docs/search.index/0ec7f231d92c.js create mode 100644 pr/3367/docs/search.index/0f24afa3b583.js create mode 100644 pr/3367/docs/search.index/10956c5d106a.js create mode 100644 pr/3367/docs/search.index/1117fccae43c.js create mode 100644 pr/3367/docs/search.index/1167a31a3b2c.js create mode 100644 pr/3367/docs/search.index/11857f78dc42.js create mode 100644 pr/3367/docs/search.index/122635a9d1f2.js create mode 100644 pr/3367/docs/search.index/12640ce03ec3.js create mode 100644 pr/3367/docs/search.index/1387d9b70733.js create mode 100644 pr/3367/docs/search.index/13f436dd1a89.js create mode 100644 pr/3367/docs/search.index/13f5a28590ba.js create mode 100644 pr/3367/docs/search.index/1405c94ad5a1.js create mode 100644 pr/3367/docs/search.index/144c1e5ca499.js create mode 100644 pr/3367/docs/search.index/15154c5a0c07.js create mode 100644 pr/3367/docs/search.index/152185296c58.js create mode 100644 pr/3367/docs/search.index/15395a0b1cab.js create mode 100644 pr/3367/docs/search.index/15af1715de34.js create mode 100644 pr/3367/docs/search.index/168c90ab1eac.js create mode 100644 pr/3367/docs/search.index/177e9047a949.js create mode 100644 pr/3367/docs/search.index/17dc0d39ea4c.js create mode 100644 pr/3367/docs/search.index/180fd1b736e6.js create mode 100644 pr/3367/docs/search.index/181cee09dbfd.js create mode 100644 pr/3367/docs/search.index/1828c63cb5eb.js create mode 100644 pr/3367/docs/search.index/18b0f64900c6.js create mode 100644 pr/3367/docs/search.index/19230ca54f08.js create mode 100644 pr/3367/docs/search.index/1c0b3a05c267.js create mode 100644 pr/3367/docs/search.index/1c2be8241d46.js create mode 100644 pr/3367/docs/search.index/1cae2e6bab46.js create mode 100644 pr/3367/docs/search.index/1de7774e957d.js create mode 100644 pr/3367/docs/search.index/1e16849da0f4.js create mode 100644 pr/3367/docs/search.index/1ff1669124ff.js create mode 100644 pr/3367/docs/search.index/202ee8ed5c1b.js create mode 100644 pr/3367/docs/search.index/205ae3b958da.js create mode 100644 pr/3367/docs/search.index/21fff7495201.js create mode 100644 pr/3367/docs/search.index/2278700d791d.js create mode 100644 pr/3367/docs/search.index/237c954227a8.js create mode 100644 pr/3367/docs/search.index/23bfc129cb27.js create mode 100644 pr/3367/docs/search.index/24cce4f7d1a8.js create mode 100644 pr/3367/docs/search.index/25b0eb496f36.js create mode 100644 pr/3367/docs/search.index/25bb83d41259.js create mode 100644 pr/3367/docs/search.index/25f2248e37b0.js create mode 100644 pr/3367/docs/search.index/2637f960d29a.js create mode 100644 pr/3367/docs/search.index/266d2a2746a7.js create mode 100644 pr/3367/docs/search.index/266f6ec56a8c.js create mode 100644 pr/3367/docs/search.index/276c8e8c0d06.js create mode 100644 pr/3367/docs/search.index/277157212f78.js create mode 100644 pr/3367/docs/search.index/27c6d4d52a18.js create mode 100644 pr/3367/docs/search.index/27e30083cf08.js create mode 100644 pr/3367/docs/search.index/283e86585e60.js create mode 100644 pr/3367/docs/search.index/290b514604c2.js create mode 100644 pr/3367/docs/search.index/2935fb158147.js create mode 100644 pr/3367/docs/search.index/2953647cde0d.js create mode 100644 pr/3367/docs/search.index/2963dbe6343a.js create mode 100644 pr/3367/docs/search.index/29ffdf834871.js create mode 100644 pr/3367/docs/search.index/2b0cb4045433.js create mode 100644 pr/3367/docs/search.index/2b5b9ba6e7b8.js create mode 100644 pr/3367/docs/search.index/2b5d1e7f49ec.js create mode 100644 pr/3367/docs/search.index/2bec31d48a42.js create mode 100644 pr/3367/docs/search.index/2cba34e439d7.js create mode 100644 pr/3367/docs/search.index/2cc89c599382.js create mode 100644 pr/3367/docs/search.index/2d42e48fe501.js create mode 100644 pr/3367/docs/search.index/2d5415483f4a.js create mode 100644 pr/3367/docs/search.index/2d70d64be50a.js create mode 100644 pr/3367/docs/search.index/2e4662473246.js create mode 100644 pr/3367/docs/search.index/2ea52f60e4c6.js create mode 100644 pr/3367/docs/search.index/2ee3edb33798.js create mode 100644 pr/3367/docs/search.index/304771dc1af7.js create mode 100644 pr/3367/docs/search.index/30b4a65e652d.js create mode 100644 pr/3367/docs/search.index/30d87768308a.js create mode 100644 pr/3367/docs/search.index/311f6ce98ccf.js create mode 100644 pr/3367/docs/search.index/31269b47306b.js create mode 100644 pr/3367/docs/search.index/31a52d7a0e9a.js create mode 100644 pr/3367/docs/search.index/3253ef7adb23.js create mode 100644 pr/3367/docs/search.index/32a749494be1.js create mode 100644 pr/3367/docs/search.index/33e8be1d9a8d.js create mode 100644 pr/3367/docs/search.index/341524ab7d8a.js create mode 100644 pr/3367/docs/search.index/34d3eb51eb99.js create mode 100644 pr/3367/docs/search.index/34f2dd59f3e3.js create mode 100644 pr/3367/docs/search.index/350e4014b645.js create mode 100644 pr/3367/docs/search.index/3540a76be9c5.js create mode 100644 pr/3367/docs/search.index/3552e31b4f71.js create mode 100644 pr/3367/docs/search.index/35fad3125401.js create mode 100644 pr/3367/docs/search.index/36b2fc8c11cc.js create mode 100644 pr/3367/docs/search.index/3790c66c7911.js create mode 100644 pr/3367/docs/search.index/37cdc118ed47.js create mode 100644 pr/3367/docs/search.index/3ade3645693a.js create mode 100644 pr/3367/docs/search.index/3b8b0c20d9b5.js create mode 100644 pr/3367/docs/search.index/3bbf0a1a75da.js create mode 100644 pr/3367/docs/search.index/3c4b3a331ceb.js create mode 100644 pr/3367/docs/search.index/3c4ea0cf5ffc.js create mode 100644 pr/3367/docs/search.index/3c5f555f1103.js create mode 100644 pr/3367/docs/search.index/3c8a16a3bee3.js create mode 100644 pr/3367/docs/search.index/3ecf659738e3.js create mode 100644 pr/3367/docs/search.index/3f3a716a6a29.js create mode 100644 pr/3367/docs/search.index/3f794cad0802.js create mode 100644 pr/3367/docs/search.index/3fb5c77caaa6.js create mode 100644 pr/3367/docs/search.index/410fc24e7a7c.js create mode 100644 pr/3367/docs/search.index/413722c968b9.js create mode 100644 pr/3367/docs/search.index/4165995c34cc.js create mode 100644 pr/3367/docs/search.index/4306ca4dd218.js create mode 100644 pr/3367/docs/search.index/443a604d2eca.js create mode 100644 pr/3367/docs/search.index/4504c6541a07.js create mode 100644 pr/3367/docs/search.index/454d4ba77f84.js create mode 100644 pr/3367/docs/search.index/45a9f431e761.js create mode 100644 pr/3367/docs/search.index/4623f04a6d79.js create mode 100644 pr/3367/docs/search.index/472747a6178e.js create mode 100644 pr/3367/docs/search.index/472c117bf1de.js create mode 100644 pr/3367/docs/search.index/477f4bc417b1.js create mode 100644 pr/3367/docs/search.index/47e0f7387cee.js create mode 100644 pr/3367/docs/search.index/47fab9f046de.js create mode 100644 pr/3367/docs/search.index/485b8bb1de89.js create mode 100644 pr/3367/docs/search.index/4a0f95af0b92.js create mode 100644 pr/3367/docs/search.index/4af3e1d598fa.js create mode 100644 pr/3367/docs/search.index/4b9264582700.js create mode 100644 pr/3367/docs/search.index/4c0b6e27d444.js create mode 100644 pr/3367/docs/search.index/4ca19230a3bc.js create mode 100644 pr/3367/docs/search.index/4d4e18c38a5b.js create mode 100644 pr/3367/docs/search.index/4e93f92ac054.js create mode 100644 pr/3367/docs/search.index/4f08f1a62681.js create mode 100644 pr/3367/docs/search.index/4f115e55d3fa.js create mode 100644 pr/3367/docs/search.index/4f62d817b363.js create mode 100644 pr/3367/docs/search.index/5155720b73f0.js create mode 100644 pr/3367/docs/search.index/536495994aac.js create mode 100644 pr/3367/docs/search.index/53e7f740bdcf.js create mode 100644 pr/3367/docs/search.index/5423b3831267.js create mode 100644 pr/3367/docs/search.index/545eafbf0be8.js create mode 100644 pr/3367/docs/search.index/546fd9350b68.js create mode 100644 pr/3367/docs/search.index/5507011d8f7d.js create mode 100644 pr/3367/docs/search.index/55a8e7b70fe8.js create mode 100644 pr/3367/docs/search.index/55bcc26466ab.js create mode 100644 pr/3367/docs/search.index/5615dd876959.js create mode 100644 pr/3367/docs/search.index/568655a45f90.js create mode 100644 pr/3367/docs/search.index/56eff1f778ff.js create mode 100644 pr/3367/docs/search.index/56f2bb2028e9.js create mode 100644 pr/3367/docs/search.index/575bf97e83e5.js create mode 100644 pr/3367/docs/search.index/57ad8a0a9d6f.js create mode 100644 pr/3367/docs/search.index/57c6b1822fcb.js create mode 100644 pr/3367/docs/search.index/590c69904c3a.js create mode 100644 pr/3367/docs/search.index/59a6c2ebd501.js create mode 100644 pr/3367/docs/search.index/5a4efa70326b.js create mode 100644 pr/3367/docs/search.index/5a7ee23cbc41.js create mode 100644 pr/3367/docs/search.index/5ac6c7bf1d5c.js create mode 100644 pr/3367/docs/search.index/5ae743af5768.js create mode 100644 pr/3367/docs/search.index/5af434536ad0.js create mode 100644 pr/3367/docs/search.index/5b4d7c34bc10.js create mode 100644 pr/3367/docs/search.index/5c1b63a3d242.js create mode 100644 pr/3367/docs/search.index/5c3a8909d56b.js create mode 100644 pr/3367/docs/search.index/5d210a6ea76b.js create mode 100644 pr/3367/docs/search.index/5d36fca2c08b.js create mode 100644 pr/3367/docs/search.index/5d8b23bc9c20.js create mode 100644 pr/3367/docs/search.index/5e00b2e97a8d.js create mode 100644 pr/3367/docs/search.index/5e6fb814b055.js create mode 100644 pr/3367/docs/search.index/5ed7710af0dc.js create mode 100644 pr/3367/docs/search.index/5eea27eafe19.js create mode 100644 pr/3367/docs/search.index/5f988263debd.js create mode 100644 pr/3367/docs/search.index/608434208057.js create mode 100644 pr/3367/docs/search.index/612e3413c39a.js create mode 100644 pr/3367/docs/search.index/617baaa0041b.js create mode 100644 pr/3367/docs/search.index/62584d2c8c84.js create mode 100644 pr/3367/docs/search.index/631977bc4a93.js create mode 100644 pr/3367/docs/search.index/64b86b725f9f.js create mode 100644 pr/3367/docs/search.index/6667e297d709.js create mode 100644 pr/3367/docs/search.index/673f9d002d44.js create mode 100644 pr/3367/docs/search.index/67bbee2489cb.js create mode 100644 pr/3367/docs/search.index/67bc12d79593.js create mode 100644 pr/3367/docs/search.index/681f1c5fa6c3.js create mode 100644 pr/3367/docs/search.index/694923bc1837.js create mode 100644 pr/3367/docs/search.index/6adfa2d470e2.js create mode 100644 pr/3367/docs/search.index/6b4c08938677.js create mode 100644 pr/3367/docs/search.index/6b73884074e2.js create mode 100644 pr/3367/docs/search.index/6ba935847153.js create mode 100644 pr/3367/docs/search.index/6bbb9e83aaf9.js create mode 100644 pr/3367/docs/search.index/6d569a951fed.js create mode 100644 pr/3367/docs/search.index/6d9dc6990f11.js create mode 100644 pr/3367/docs/search.index/6e24177b5956.js create mode 100644 pr/3367/docs/search.index/6fc90deed12a.js create mode 100644 pr/3367/docs/search.index/708ecbd29119.js create mode 100644 pr/3367/docs/search.index/7130ced0589b.js create mode 100644 pr/3367/docs/search.index/71c0a7edf2e2.js create mode 100644 pr/3367/docs/search.index/72c312cad641.js create mode 100644 pr/3367/docs/search.index/738fb6316a26.js create mode 100644 pr/3367/docs/search.index/73c3866a8ade.js create mode 100644 pr/3367/docs/search.index/73dad749a23e.js create mode 100644 pr/3367/docs/search.index/73e213d1266d.js create mode 100644 pr/3367/docs/search.index/741f7ab64068.js create mode 100644 pr/3367/docs/search.index/7444602978bc.js create mode 100644 pr/3367/docs/search.index/74b83b96b911.js create mode 100644 pr/3367/docs/search.index/7576217634bd.js create mode 100644 pr/3367/docs/search.index/76a78bceb8c8.js create mode 100644 pr/3367/docs/search.index/76fa5eb7c0e7.js create mode 100644 pr/3367/docs/search.index/772467e18e07.js create mode 100644 pr/3367/docs/search.index/7759138efa61.js create mode 100644 pr/3367/docs/search.index/777bedcf9532.js create mode 100644 pr/3367/docs/search.index/77e145438903.js create mode 100644 pr/3367/docs/search.index/77e1da522e36.js create mode 100644 pr/3367/docs/search.index/790a03d5ac22.js create mode 100644 pr/3367/docs/search.index/79b7bbdd44be.js create mode 100644 pr/3367/docs/search.index/7a4e850f5494.js create mode 100644 pr/3367/docs/search.index/7b1758c4b2b2.js create mode 100644 pr/3367/docs/search.index/7bd9c1aac951.js create mode 100644 pr/3367/docs/search.index/7be17057425f.js create mode 100644 pr/3367/docs/search.index/7bed45f8a353.js create mode 100644 pr/3367/docs/search.index/7bf7fc8ab6f3.js create mode 100644 pr/3367/docs/search.index/7cbfa11bb9fa.js create mode 100644 pr/3367/docs/search.index/7cf1ecc28f90.js create mode 100644 pr/3367/docs/search.index/7d50302474a6.js create mode 100644 pr/3367/docs/search.index/7e0396ca6090.js create mode 100644 pr/3367/docs/search.index/7e24de05e932.js create mode 100644 pr/3367/docs/search.index/7ea42766f407.js create mode 100644 pr/3367/docs/search.index/7faf8f6da58d.js create mode 100644 pr/3367/docs/search.index/alias/a762150c532c.js create mode 100644 pr/3367/docs/search.index/crateNames/c4c174243285.js create mode 100644 pr/3367/docs/search.index/desc/bf20fd5d6ec0.js create mode 100644 pr/3367/docs/search.index/entry/f787478b550d.js create mode 100644 pr/3367/docs/search.index/function/0115eda9b6ed.js create mode 100644 pr/3367/docs/search.index/generic_inverted_index/b07d705b456a.js create mode 100644 pr/3367/docs/search.index/name/d00df074fb9f.js create mode 100644 pr/3367/docs/search.index/normalizedName/6a7a83122975.js create mode 100644 pr/3367/docs/search.index/path/10e9b1fcf710.js create mode 100644 pr/3367/docs/search.index/root.js create mode 100644 pr/3367/docs/search.index/type/e54ec13a96e4.js delete mode 100644 pr/3367/docs/src/iroh/magicsock/node_map/best_addr.rs.html create mode 100644 pr/3367/docs/src/iroh/magicsock/node_map/path_validity.rs.html create mode 100644 pr/3367/docs/src/iroh_relay/protos/common.rs.html create mode 100644 pr/3367/docs/src/iroh_relay/protos/handshake.rs.html create mode 100644 pr/3367/docs/src/iroh_relay/protos/streams.rs.html rename pr/3367/docs/static.files/{COPYRIGHT-565f0803.txt => COPYRIGHT-7fb11f4e.txt} (67%) delete mode 100644 pr/3367/docs/static.files/favicon-32x32-6580c154.png create mode 100644 pr/3367/docs/static.files/favicon-32x32-eab170b8.png delete mode 100644 pr/3367/docs/static.files/main-5332ae0c.js create mode 100644 pr/3367/docs/static.files/main-ce535bd0.js create mode 100644 pr/3367/docs/static.files/noscript-263c88ec.css delete mode 100644 pr/3367/docs/static.files/noscript-893ab5e7.css delete mode 100644 pr/3367/docs/static.files/rustdoc-6c3ea77c.css create mode 100644 pr/3367/docs/static.files/rustdoc-ca0dd0c4.css create mode 100644 pr/3367/docs/static.files/scrape-examples-2bbcccac.js delete mode 100644 pr/3367/docs/static.files/scrape-examples-5e967b76.js create mode 100644 pr/3367/docs/static.files/search-8d3311b9.js delete mode 100644 pr/3367/docs/static.files/search-f7327375.js delete mode 100644 pr/3367/docs/static.files/settings-6dad6058.js create mode 100644 pr/3367/docs/static.files/settings-c38705f0.js create mode 100644 pr/3367/docs/static.files/src-script-813739b1.js delete mode 100644 pr/3367/docs/static.files/src-script-b8d3f215.js delete mode 100644 pr/3367/docs/static.files/storage-3a5871a4.js create mode 100644 pr/3367/docs/static.files/storage-e2aeef58.js create mode 100644 pr/3367/docs/static.files/stringdex-828709d0.js delete mode 100644 pr/3367/docs/trait.impl/core/iter/traits/collect/trait.IntoIterator.js create mode 100644 pr/3367/docs/trait.impl/core/marker/trait.UnsafeUnpin.js rename pr/3367/docs/trait.impl/num_enum/{trait.FromPrimitive.js => trait.TryFromPrimitive.js} (54%) delete mode 100644 pr/3367/docs/trait.impl/serde/de/trait.Deserialize.js delete mode 100644 pr/3367/docs/trait.impl/serde/ser/trait.Serialize.js create mode 100644 pr/3367/docs/trait.impl/serde_core/de/trait.Deserialize.js create mode 100644 pr/3367/docs/trait.impl/serde_core/ser/trait.Serialize.js create mode 100644 pr/3367/docs/type.impl/alloc/boxed/struct.Box.js diff --git a/pr/3367/docs/bulk/all.html b/pr/3367/docs/bulk/all.html index 66e5de58d7..930b0162e9 100644 --- a/pr/3367/docs/bulk/all.html +++ b/pr/3367/docs/bulk/all.html @@ -1 +1 @@ -List of all items in this crate
\ No newline at end of file +List of all items in this crate

All

\ No newline at end of file diff --git a/pr/3367/docs/bulk/fn.collect_and_print.html b/pr/3367/docs/bulk/fn.collect_and_print.html index cba910419f..cde9768477 100644 --- a/pr/3367/docs/bulk/fn.collect_and_print.html +++ b/pr/3367/docs/bulk/fn.collect_and_print.html @@ -1,4 +1,4 @@ -collect_and_print in bulk - Rust

Function collect_and_print

Source
pub(crate) fn collect_and_print(
+collect_and_print in bulk - Rust

collect_and_print

Function collect_and_print 

Source
pub(crate) fn collect_and_print(
     category: &'static str,
     metrics: &dyn MetricsGroup,
 )
\ No newline at end of file diff --git a/pr/3367/docs/bulk/fn.main.html b/pr/3367/docs/bulk/fn.main.html index 313eec13a9..bdcbc9d93d 100644 --- a/pr/3367/docs/bulk/fn.main.html +++ b/pr/3367/docs/bulk/fn.main.html @@ -1 +1 @@ -main in bulk - Rust

Function main

Source
pub(crate) fn main()
\ No newline at end of file +main in bulk - Rust

main

Function main 

Source
pub(crate) fn main()
\ No newline at end of file diff --git a/pr/3367/docs/bulk/fn.run_iroh.html b/pr/3367/docs/bulk/fn.run_iroh.html index 16750338d4..fde510737e 100644 --- a/pr/3367/docs/bulk/fn.run_iroh.html +++ b/pr/3367/docs/bulk/fn.run_iroh.html @@ -1 +1 @@ -run_iroh in bulk - Rust

Function run_iroh

Source
pub fn run_iroh(opt: Opt) -> Result<()>
\ No newline at end of file +run_iroh in bulk - Rust

run_iroh

Function run_iroh 

Source
pub fn run_iroh(opt: Opt) -> Result<()>
\ No newline at end of file diff --git a/pr/3367/docs/bulk/fn.run_quinn.html b/pr/3367/docs/bulk/fn.run_quinn.html index 75a1136701..730c09cdca 100644 --- a/pr/3367/docs/bulk/fn.run_quinn.html +++ b/pr/3367/docs/bulk/fn.run_quinn.html @@ -1 +1 @@ -run_quinn in bulk - Rust

Function run_quinn

Source
pub fn run_quinn(opt: Opt) -> Result<()>
\ No newline at end of file +run_quinn in bulk - Rust

run_quinn

Function run_quinn 

Source
pub fn run_quinn(opt: Opt) -> Result<()>
\ No newline at end of file diff --git a/pr/3367/docs/bulk/fn.run_s2n.html b/pr/3367/docs/bulk/fn.run_s2n.html index c7470c49c1..98d8e693d9 100644 --- a/pr/3367/docs/bulk/fn.run_s2n.html +++ b/pr/3367/docs/bulk/fn.run_s2n.html @@ -1 +1 @@ -run_s2n in bulk - Rust

Function run_s2n

Source
pub fn run_s2n(_opt: Opt) -> Result<()>
\ No newline at end of file +run_s2n in bulk - Rust

run_s2n

Function run_s2n 

Source
pub fn run_s2n(_opt: Opt) -> Result<()>
\ No newline at end of file diff --git a/pr/3367/docs/bulk/index.html b/pr/3367/docs/bulk/index.html index ba5189e35b..e099e917d3 100644 --- a/pr/3367/docs/bulk/index.html +++ b/pr/3367/docs/bulk/index.html @@ -1 +1 @@ -bulk - Rust

Crate bulk

Source

Functions§

collect_and_print 🔒
main 🔒
run_iroh
run_quinn
run_s2n
\ No newline at end of file +bulk - Rust

Crate bulk

Crate bulk 

Source

Functions§

collect_and_print 🔒
main 🔒
run_iroh
run_quinn
run_s2n
\ No newline at end of file diff --git a/pr/3367/docs/help.html b/pr/3367/docs/help.html index 47be7dd0a4..f35afe481b 100644 --- a/pr/3367/docs/help.html +++ b/pr/3367/docs/help.html @@ -1 +1 @@ -Help

Rustdoc help

Back
\ No newline at end of file +Help

All

Rustdoc help

Back
\ No newline at end of file diff --git a/pr/3367/docs/iroh/all.html b/pr/3367/docs/iroh/all.html index 6dbd6b522a..b94d475932 100644 --- a/pr/3367/docs/iroh/all.html +++ b/pr/3367/docs/iroh/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Type Aliases

Constants

\ No newline at end of file +List of all items in this crate

All

List of all items

Structs

Enums

Traits

Functions

Type Aliases

Constants

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTPS_PORT.html b/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTPS_PORT.html index 35d8309ab3..af8f38eb5a 100644 --- a/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTPS_PORT.html +++ b/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTPS_PORT.html @@ -1,2 +1,2 @@ -DEFAULT_HTTPS_PORT in iroh::defaults - Rust

Constant DEFAULT_HTTPS_PORT

Source
pub const DEFAULT_HTTPS_PORT: u16 = 443;
Expand description

The default HTTPS port used by the Relay server.

+DEFAULT_HTTPS_PORT in iroh::defaults - Rust

DEFAULT_HTTPS_PORT

Constant DEFAULT_HTTPS_PORT 

Source
pub const DEFAULT_HTTPS_PORT: u16 = 443;
Expand description

The default HTTPS port used by the Relay server.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTP_PORT.html b/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTP_PORT.html index c6ae131c0c..b865b4d03c 100644 --- a/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTP_PORT.html +++ b/pr/3367/docs/iroh/defaults/constant.DEFAULT_HTTP_PORT.html @@ -1,2 +1,2 @@ -DEFAULT_HTTP_PORT in iroh::defaults - Rust

Constant DEFAULT_HTTP_PORT

Source
pub const DEFAULT_HTTP_PORT: u16 = 80;
Expand description

The default HTTP port used by the Relay server.

+DEFAULT_HTTP_PORT in iroh::defaults - Rust

DEFAULT_HTTP_PORT

Constant DEFAULT_HTTP_PORT 

Source
pub const DEFAULT_HTTP_PORT: u16 = 80;
Expand description

The default HTTP port used by the Relay server.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/constant.DEFAULT_METRICS_PORT.html b/pr/3367/docs/iroh/defaults/constant.DEFAULT_METRICS_PORT.html index afc3d0cf4d..5b00c2d48b 100644 --- a/pr/3367/docs/iroh/defaults/constant.DEFAULT_METRICS_PORT.html +++ b/pr/3367/docs/iroh/defaults/constant.DEFAULT_METRICS_PORT.html @@ -1,2 +1,2 @@ -DEFAULT_METRICS_PORT in iroh::defaults - Rust

Constant DEFAULT_METRICS_PORT

Source
pub const DEFAULT_METRICS_PORT: u16 = 9090;
Expand description

The default metrics port used by the Relay server.

+DEFAULT_METRICS_PORT in iroh::defaults - Rust

DEFAULT_METRICS_PORT

Constant DEFAULT_METRICS_PORT 

Source
pub const DEFAULT_METRICS_PORT: u16 = 9090;
Expand description

The default metrics port used by the Relay server.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html b/pr/3367/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html index 0e14fe5969..869ca7512d 100644 --- a/pr/3367/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html +++ b/pr/3367/docs/iroh/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust

Constant DEFAULT_RELAY_QUIC_PORT

Source
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16
Expand description

The default QUIC port used by the Relay server to accept QUIC connections +DEFAULT_RELAY_QUIC_PORT in iroh::defaults - Rust

DEFAULT_RELAY_QUIC_PORT

Constant DEFAULT_RELAY_QUIC_PORT 

Source
pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842; // 7_842u16
Expand description

The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery

The port is “QUIC” typed on a phone keypad. The default QUIC port used by the Relay server to accept QUIC connections diff --git a/pr/3367/docs/iroh/defaults/index.html b/pr/3367/docs/iroh/defaults/index.html index fbd737977f..0efcaf3f5b 100644 --- a/pr/3367/docs/iroh/defaults/index.html +++ b/pr/3367/docs/iroh/defaults/index.html @@ -1,3 +1,3 @@ -iroh::defaults - Rust

Module defaults

Source
Expand description

Default values used in iroh

+iroh::defaults - Rust

Module defaults

Module defaults 

Source
Expand description

Default values used in iroh

Modules§

prod
Production configuration.
staging
Staging configuration.

Constants§

DEFAULT_HTTPS_PORT
The default HTTPS port used by the Relay server.
DEFAULT_HTTP_PORT
The default HTTP port used by the Relay server.
DEFAULT_METRICS_PORT
The default metrics port used by the Relay server.
DEFAULT_RELAY_QUIC_PORT
The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery
\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/constant.AP_RELAY_HOSTNAME.html b/pr/3367/docs/iroh/defaults/prod/constant.AP_RELAY_HOSTNAME.html index 925c8eaf72..df5a35f602 100644 --- a/pr/3367/docs/iroh/defaults/prod/constant.AP_RELAY_HOSTNAME.html +++ b/pr/3367/docs/iroh/defaults/prod/constant.AP_RELAY_HOSTNAME.html @@ -1,2 +1,2 @@ -AP_RELAY_HOSTNAME in iroh::defaults::prod - Rust

Constant AP_RELAY_HOSTNAME

Source
pub const AP_RELAY_HOSTNAME: &str = "aps1-1.relay.iroh.network.";
Expand description

Hostname of the default Asia-Pacific relay.

+AP_RELAY_HOSTNAME in iroh::defaults::prod - Rust

AP_RELAY_HOSTNAME

Constant AP_RELAY_HOSTNAME 

Source
pub const AP_RELAY_HOSTNAME: &str = "aps1-1.relay.n0.iroh-canary.iroh.link.";
Expand description

Hostname of the default Asia-Pacific relay.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/constant.EU_RELAY_HOSTNAME.html b/pr/3367/docs/iroh/defaults/prod/constant.EU_RELAY_HOSTNAME.html index 432a14d65a..79eb9db315 100644 --- a/pr/3367/docs/iroh/defaults/prod/constant.EU_RELAY_HOSTNAME.html +++ b/pr/3367/docs/iroh/defaults/prod/constant.EU_RELAY_HOSTNAME.html @@ -1,2 +1,2 @@ -EU_RELAY_HOSTNAME in iroh::defaults::prod - Rust

Constant EU_RELAY_HOSTNAME

Source
pub const EU_RELAY_HOSTNAME: &str = "euw1-1.relay.iroh.network.";
Expand description

Hostname of the default EU relay.

+EU_RELAY_HOSTNAME in iroh::defaults::prod - Rust

EU_RELAY_HOSTNAME

Constant EU_RELAY_HOSTNAME 

Source
pub const EU_RELAY_HOSTNAME: &str = "euc1-1.relay.n0.iroh-canary.iroh.link.";
Expand description

Hostname of the default EU relay.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/constant.NA_RELAY_HOSTNAME.html b/pr/3367/docs/iroh/defaults/prod/constant.NA_RELAY_HOSTNAME.html index b506886ee6..f689c36742 100644 --- a/pr/3367/docs/iroh/defaults/prod/constant.NA_RELAY_HOSTNAME.html +++ b/pr/3367/docs/iroh/defaults/prod/constant.NA_RELAY_HOSTNAME.html @@ -1,2 +1,2 @@ -NA_RELAY_HOSTNAME in iroh::defaults::prod - Rust

Constant NA_RELAY_HOSTNAME

Source
pub const NA_RELAY_HOSTNAME: &str = "use1-1.relay.iroh.network.";
Expand description

Hostname of the default NA relay.

+NA_RELAY_HOSTNAME in iroh::defaults::prod - Rust

NA_RELAY_HOSTNAME

Constant NA_RELAY_HOSTNAME 

Source
pub const NA_RELAY_HOSTNAME: &str = "use1-1.relay.n0.iroh-canary.iroh.link.";
Expand description

Hostname of the default NA relay.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/fn.default_ap_relay_node.html b/pr/3367/docs/iroh/defaults/prod/fn.default_ap_relay_node.html index 82cc1f58bc..6052cff046 100644 --- a/pr/3367/docs/iroh/defaults/prod/fn.default_ap_relay_node.html +++ b/pr/3367/docs/iroh/defaults/prod/fn.default_ap_relay_node.html @@ -1,2 +1,2 @@ -default_ap_relay_node in iroh::defaults::prod - Rust

Function default_ap_relay_node

Source
pub fn default_ap_relay_node() -> RelayNode
Expand description

Get the default RelayNode for Asia-Pacific

+default_ap_relay_node in iroh::defaults::prod - Rust

default_ap_relay_node

Function default_ap_relay_node 

Source
pub fn default_ap_relay_node() -> RelayNode
Expand description

Get the default RelayNode for Asia-Pacific

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/fn.default_eu_relay_node.html b/pr/3367/docs/iroh/defaults/prod/fn.default_eu_relay_node.html index d88254055a..ee70a0c8b9 100644 --- a/pr/3367/docs/iroh/defaults/prod/fn.default_eu_relay_node.html +++ b/pr/3367/docs/iroh/defaults/prod/fn.default_eu_relay_node.html @@ -1,2 +1,2 @@ -default_eu_relay_node in iroh::defaults::prod - Rust

Function default_eu_relay_node

Source
pub fn default_eu_relay_node() -> RelayNode
Expand description

Get the default RelayNode for EU.

+default_eu_relay_node in iroh::defaults::prod - Rust

default_eu_relay_node

Function default_eu_relay_node 

Source
pub fn default_eu_relay_node() -> RelayNode
Expand description

Get the default RelayNode for EU.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/fn.default_na_relay_node.html b/pr/3367/docs/iroh/defaults/prod/fn.default_na_relay_node.html index d448f7a3a0..871a2f8c3b 100644 --- a/pr/3367/docs/iroh/defaults/prod/fn.default_na_relay_node.html +++ b/pr/3367/docs/iroh/defaults/prod/fn.default_na_relay_node.html @@ -1,2 +1,2 @@ -default_na_relay_node in iroh::defaults::prod - Rust

Function default_na_relay_node

Source
pub fn default_na_relay_node() -> RelayNode
Expand description

Get the default RelayNode for NA.

+default_na_relay_node in iroh::defaults::prod - Rust

default_na_relay_node

Function default_na_relay_node 

Source
pub fn default_na_relay_node() -> RelayNode
Expand description

Get the default RelayNode for NA.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/fn.default_relay_map.html b/pr/3367/docs/iroh/defaults/prod/fn.default_relay_map.html index b2209c3a86..9f56df52cb 100644 --- a/pr/3367/docs/iroh/defaults/prod/fn.default_relay_map.html +++ b/pr/3367/docs/iroh/defaults/prod/fn.default_relay_map.html @@ -1,2 +1,2 @@ -default_relay_map in iroh::defaults::prod - Rust

Function default_relay_map

Source
pub fn default_relay_map() -> RelayMap
Expand description

Get the default RelayMap.

+default_relay_map in iroh::defaults::prod - Rust

default_relay_map

Function default_relay_map 

Source
pub fn default_relay_map() -> RelayMap
Expand description

Get the default RelayMap.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/prod/index.html b/pr/3367/docs/iroh/defaults/prod/index.html index 8826a90db3..847ee08012 100644 --- a/pr/3367/docs/iroh/defaults/prod/index.html +++ b/pr/3367/docs/iroh/defaults/prod/index.html @@ -1,2 +1,2 @@ -iroh::defaults::prod - Rust

Module prod

Source
Expand description

Production configuration.

+iroh::defaults::prod - Rust

Module prod

Module prod 

Source
Expand description

Production configuration.

Constants§

AP_RELAY_HOSTNAME
Hostname of the default Asia-Pacific relay.
EU_RELAY_HOSTNAME
Hostname of the default EU relay.
NA_RELAY_HOSTNAME
Hostname of the default NA relay.

Functions§

default_ap_relay_node
Get the default RelayNode for Asia-Pacific
default_eu_relay_node
Get the default RelayNode for EU.
default_na_relay_node
Get the default RelayNode for NA.
default_relay_map
Get the default RelayMap.
\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/staging/constant.EU_RELAY_HOSTNAME.html b/pr/3367/docs/iroh/defaults/staging/constant.EU_RELAY_HOSTNAME.html index e4bb055c7c..139bd2d019 100644 --- a/pr/3367/docs/iroh/defaults/staging/constant.EU_RELAY_HOSTNAME.html +++ b/pr/3367/docs/iroh/defaults/staging/constant.EU_RELAY_HOSTNAME.html @@ -1,2 +1,2 @@ -EU_RELAY_HOSTNAME in iroh::defaults::staging - Rust

Constant EU_RELAY_HOSTNAME

Source
pub const EU_RELAY_HOSTNAME: &str = "staging-euw1-1.relay.iroh.network.";
Expand description

Hostname of the default EU relay.

+EU_RELAY_HOSTNAME in iroh::defaults::staging - Rust

EU_RELAY_HOSTNAME

Constant EU_RELAY_HOSTNAME 

Source
pub const EU_RELAY_HOSTNAME: &str = "staging-euw1-1.relay.iroh.network.";
Expand description

Hostname of the default EU relay.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/staging/constant.NA_RELAY_HOSTNAME.html b/pr/3367/docs/iroh/defaults/staging/constant.NA_RELAY_HOSTNAME.html index c6820f9d51..8d2802ffc4 100644 --- a/pr/3367/docs/iroh/defaults/staging/constant.NA_RELAY_HOSTNAME.html +++ b/pr/3367/docs/iroh/defaults/staging/constant.NA_RELAY_HOSTNAME.html @@ -1,2 +1,2 @@ -NA_RELAY_HOSTNAME in iroh::defaults::staging - Rust

Constant NA_RELAY_HOSTNAME

Source
pub const NA_RELAY_HOSTNAME: &str = "staging-use1-1.relay.iroh.network.";
Expand description

Hostname of the default NA relay.

+NA_RELAY_HOSTNAME in iroh::defaults::staging - Rust

NA_RELAY_HOSTNAME

Constant NA_RELAY_HOSTNAME 

Source
pub const NA_RELAY_HOSTNAME: &str = "staging-use1-1.relay.iroh.network.";
Expand description

Hostname of the default NA relay.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/staging/fn.default_eu_relay_node.html b/pr/3367/docs/iroh/defaults/staging/fn.default_eu_relay_node.html index 4c0f35cc93..4fdf66bada 100644 --- a/pr/3367/docs/iroh/defaults/staging/fn.default_eu_relay_node.html +++ b/pr/3367/docs/iroh/defaults/staging/fn.default_eu_relay_node.html @@ -1,2 +1,2 @@ -default_eu_relay_node in iroh::defaults::staging - Rust

Function default_eu_relay_node

Source
pub fn default_eu_relay_node() -> RelayNode
Expand description

Get the default RelayNode for EU.

+default_eu_relay_node in iroh::defaults::staging - Rust

default_eu_relay_node

Function default_eu_relay_node 

Source
pub fn default_eu_relay_node() -> RelayNode
Expand description

Get the default RelayNode for EU.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/staging/fn.default_na_relay_node.html b/pr/3367/docs/iroh/defaults/staging/fn.default_na_relay_node.html index a6841bd360..cc867a7ddb 100644 --- a/pr/3367/docs/iroh/defaults/staging/fn.default_na_relay_node.html +++ b/pr/3367/docs/iroh/defaults/staging/fn.default_na_relay_node.html @@ -1,2 +1,2 @@ -default_na_relay_node in iroh::defaults::staging - Rust

Function default_na_relay_node

Source
pub fn default_na_relay_node() -> RelayNode
Expand description

Get the default RelayNode for NA.

+default_na_relay_node in iroh::defaults::staging - Rust

default_na_relay_node

Function default_na_relay_node 

Source
pub fn default_na_relay_node() -> RelayNode
Expand description

Get the default RelayNode for NA.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/staging/fn.default_relay_map.html b/pr/3367/docs/iroh/defaults/staging/fn.default_relay_map.html index 261052a24f..7ce7dd90f3 100644 --- a/pr/3367/docs/iroh/defaults/staging/fn.default_relay_map.html +++ b/pr/3367/docs/iroh/defaults/staging/fn.default_relay_map.html @@ -1,2 +1,2 @@ -default_relay_map in iroh::defaults::staging - Rust

Function default_relay_map

Source
pub fn default_relay_map() -> RelayMap
Expand description

Get the default RelayMap.

+default_relay_map in iroh::defaults::staging - Rust

default_relay_map

Function default_relay_map 

Source
pub fn default_relay_map() -> RelayMap
Expand description

Get the default RelayMap.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/defaults/staging/index.html b/pr/3367/docs/iroh/defaults/staging/index.html index 008cf7ebca..fc4f70f426 100644 --- a/pr/3367/docs/iroh/defaults/staging/index.html +++ b/pr/3367/docs/iroh/defaults/staging/index.html @@ -1,4 +1,4 @@ -iroh::defaults::staging - Rust

Module staging

Source
Expand description

Staging configuration.

+iroh::defaults::staging - Rust

Module staging

Module staging 

Source
Expand description

Staging configuration.

Used by tests and might have incompatible changes deployed

Note: we have staging servers in EU and NA, but no corresponding staging server for AP at this time.

Constants§

EU_RELAY_HOSTNAME
Hostname of the default EU relay.
NA_RELAY_HOSTNAME
Hostname of the default NA relay.

Functions§

default_eu_relay_node
Get the default RelayNode for EU.
default_na_relay_node
Get the default RelayNode for NA.
default_relay_map
Get the default RelayMap.
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html index 2c3e3183f6..8f2a9b2406 100644 --- a/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html +++ b/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html @@ -1,2 +1,2 @@ -N0_DNS_NODE_ORIGIN_PROD in iroh::discovery::dns - Rust

Constant N0_DNS_NODE_ORIGIN_PROD

Source
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for production.

+N0_DNS_NODE_ORIGIN_PROD in iroh::discovery::dns - Rust

N0_DNS_NODE_ORIGIN_PROD

Constant N0_DNS_NODE_ORIGIN_PROD 

Source
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for production.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html index 26cea1431a..dd623c4a09 100644 --- a/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html +++ b/pr/3367/docs/iroh/discovery/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html @@ -1,2 +1,2 @@ -N0_DNS_NODE_ORIGIN_STAGING in iroh::discovery::dns - Rust

Constant N0_DNS_NODE_ORIGIN_STAGING

Source
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for testing.

+N0_DNS_NODE_ORIGIN_STAGING in iroh::discovery::dns - Rust

N0_DNS_NODE_ORIGIN_STAGING

Constant N0_DNS_NODE_ORIGIN_STAGING 

Source
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for testing.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/dns/index.html b/pr/3367/docs/iroh/discovery/dns/index.html index 5626f5d18d..704a20d146 100644 --- a/pr/3367/docs/iroh/discovery/dns/index.html +++ b/pr/3367/docs/iroh/discovery/dns/index.html @@ -1,2 +1,2 @@ -iroh::discovery::dns - Rust

Module dns

Source
Available on non-wasm_browser only.
Expand description

DNS node discovery for iroh

+iroh::discovery::dns - Rust

Module dns

Module dns 

Source
Available on non-wasm_browser only.
Expand description

DNS node discovery for iroh

Structs§

DnsDiscovery
DNS node discovery
DnsDiscoveryBuilder
Builder for DnsDiscovery.

Constants§

N0_DNS_NODE_ORIGIN_PROD
The n0 testing DNS node origin, for production.
N0_DNS_NODE_ORIGIN_STAGING
The n0 testing DNS node origin, for testing.
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscovery.html b/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscovery.html index e0a0538fd9..6f73b0d3a0 100644 --- a/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscovery.html +++ b/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscovery.html @@ -1,10 +1,10 @@ -DnsDiscovery in iroh::discovery::dns - Rust

Struct DnsDiscovery

Source
pub struct DnsDiscovery { /* private fields */ }
Available on non-wasm_browser only.
Expand description

DNS node discovery

+DnsDiscovery in iroh::discovery::dns - Rust

DnsDiscovery

Struct DnsDiscovery 

Source
pub struct DnsDiscovery { /* private fields */ }
Available on non-wasm_browser only.
Expand description

DNS node discovery

When asked to resolve a NodeId, this service performs a lookup in the Domain Name System (DNS).

It uses the Endpoint’s DNS resolver to query for TXT records under the domain _iroh.<z32-node-id>.<origin-domain>:

  • _iroh: is the record name
  • -
  • <z32-node-id> is the NodeId encoded in [z-base-32] format
  • +
  • <z32-node-id> is the NodeId encoded in z-base-32 format
  • <origin-domain> is the node origin domain as set in DnsDiscovery::builder.

Each TXT record returned from the query is expected to contain a string in the format <name>=<value>. @@ -25,7 +25,7 @@ service for testing purposes.

Trait Implementations§

Source§

impl Debug for DnsDiscovery

Source§

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

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

impl Discovery for DnsDiscovery

Source§

fn resolve( &self, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism. 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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -33,24 +33,31 @@ service for testing purposes.

class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static,
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscoveryBuilder.html b/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscoveryBuilder.html index 75ca94ccdd..ceea0dcfdf 100644 --- a/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscoveryBuilder.html +++ b/pr/3367/docs/iroh/discovery/dns/struct.DnsDiscoveryBuilder.html @@ -1,4 +1,4 @@ -DnsDiscoveryBuilder in iroh::discovery::dns - Rust

Struct DnsDiscoveryBuilder

Source
pub struct DnsDiscoveryBuilder { /* private fields */ }
Available on non-wasm_browser only.
Expand description

Builder for DnsDiscovery.

+DnsDiscoveryBuilder in iroh::discovery::dns - Rust

DnsDiscoveryBuilder

Struct DnsDiscoveryBuilder 

Source
pub struct DnsDiscoveryBuilder { /* private fields */ }
Available on non-wasm_browser only.
Expand description

Implementations§

Source§

impl DnsDiscoveryBuilder

Source

pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

Sets the DNS resolver to use.

Source

pub fn build(self) -> DnsDiscovery

Builds a DnsDiscovery with the passed DnsResolver.

@@ -13,20 +13,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static,
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/enum.DiscoveryError.html b/pr/3367/docs/iroh/discovery/enum.DiscoveryError.html index 13e8f324fa..4935b13468 100644 --- a/pr/3367/docs/iroh/discovery/enum.DiscoveryError.html +++ b/pr/3367/docs/iroh/discovery/enum.DiscoveryError.html @@ -1,4 +1,4 @@ -DiscoveryError in iroh::discovery - Rust

Enum DiscoveryError

Source
#[non_exhaustive]
pub enum DiscoveryError { +DiscoveryError in iroh::discovery - Rust

DiscoveryError

Enum DiscoveryError 

Source
#[non_exhaustive]
pub enum DiscoveryError { NoServiceConfigured { backtrace: Option<Backtrace>, span_trace: SpanTrace, @@ -15,19 +15,19 @@ span_trace: SpanTrace, }, }
Expand description

Discovery errors

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NoServiceConfigured

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NoResults

Fields

§node_id: NodeId
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

User

Fields

§provenance: &'static str
§source: Box<dyn Error + Send + Sync + 'static>
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Implementations§

Source§

impl DiscoveryError

Source

pub fn from_err<T: Error + Send + Sync + 'static>( +

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

NoServiceConfigured

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NoResults

Fields

§node_id: NodeId
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

User

Fields

§provenance: &'static str
§source: Box<dyn Error + Send + Sync + 'static>
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Implementations§

Source§

impl DiscoveryError

Source

pub fn from_err<T: Error + Send + Sync + 'static>( provenance: &'static str, source: T, ) -> Self

Creates a new user error from an arbitrary error type.

-
Source

pub fn from_err_box( +

Source

pub fn from_err_box( provenance: &'static str, source: Box<dyn Error + Send + Sync + 'static>, ) -> Self

Creates a new user error from an arbitrary boxed error type.

-

Trait Implementations§

Source§

impl Debug for DiscoveryError

Source§

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

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

impl Display for DiscoveryError

Source§

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

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

impl Error for DiscoveryError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for DiscoveryError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +

Trait Implementations§

Source§

impl Debug for DiscoveryError

Source§

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

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

impl Display for DiscoveryError

Source§

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

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

impl Error for DiscoveryError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for DiscoveryError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<PkarrError> for DiscoveryError

Source§

fn from(err: PkarrError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<PkarrError> for DiscoveryError

Source§

fn from(err: PkarrError) -> Self

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -38,22 +38,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static,
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/enum.IntoDiscoveryError.html b/pr/3367/docs/iroh/discovery/enum.IntoDiscoveryError.html index 3fa506d9e9..a02902e990 100644 --- a/pr/3367/docs/iroh/discovery/enum.IntoDiscoveryError.html +++ b/pr/3367/docs/iroh/discovery/enum.IntoDiscoveryError.html @@ -1,4 +1,4 @@ -IntoDiscoveryError in iroh::discovery - Rust

Enum IntoDiscoveryError

Source
#[non_exhaustive]
pub enum IntoDiscoveryError { +IntoDiscoveryError in iroh::discovery - Rust

IntoDiscoveryError

Enum IntoDiscoveryError 

Source
#[non_exhaustive]
pub enum IntoDiscoveryError { User { provenance: &'static str, source: Box<dyn Error + Send + Sync + 'static>, @@ -6,19 +6,19 @@ span_trace: SpanTrace, }, }
Expand description

IntoDiscovery errors

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

User

Fields

§provenance: &'static str
§source: Box<dyn Error + Send + Sync + 'static>
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Implementations§

Source§

impl IntoDiscoveryError

Source

pub fn from_err<T: Error + Send + Sync + 'static>( +

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

User

Fields

§provenance: &'static str
§source: Box<dyn Error + Send + Sync + 'static>
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Implementations§

Source§

impl IntoDiscoveryError

Source

pub fn from_err<T: Error + Send + Sync + 'static>( provenance: &'static str, source: T, ) -> Self

Creates a new user error from an arbitrary error type.

-
Source

pub fn from_err_box( +

Source

pub fn from_err_box( provenance: &'static str, source: Box<dyn Error + Send + Sync + 'static>, ) -> Self

Creates a new user error from an arbitrary boxed error type.

-

Trait Implementations§

Source§

impl Debug for IntoDiscoveryError

Source§

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

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

impl Display for IntoDiscoveryError

Source§

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

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

impl Error for IntoDiscoveryError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for IntoDiscoveryError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +

Trait Implementations§

Source§

impl Debug for IntoDiscoveryError

Source§

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

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

impl Display for IntoDiscoveryError

Source§

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

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

impl Error for IntoDiscoveryError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for IntoDiscoveryError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<IntoDiscoveryError> for BindError

Source§

fn from(error: IntoDiscoveryError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. 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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -29,22 +29,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/enum.ParseError.html b/pr/3367/docs/iroh/discovery/enum.ParseError.html index 0f91471eb0..e4791fb759 100644 --- a/pr/3367/docs/iroh/discovery/enum.ParseError.html +++ b/pr/3367/docs/iroh/discovery/enum.ParseError.html @@ -1,4 +1,4 @@ -ParseError in iroh::discovery - Rust

Enum ParseError

Source
#[non_exhaustive]
pub enum ParseError { +ParseError in iroh::discovery - Rust

ParseError

Enum ParseError 

Source
#[non_exhaustive]
pub enum ParseError { UnexpectedFormat { s: String, backtrace: Option<Backtrace>, @@ -29,14 +29,14 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedFormat

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

AttrFromString

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NumLabels

Fields

§num_labels: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Utf8

Fields

§source: Utf8Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NotAnIrohRecord

Fields

§label: String
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

DecodingError

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for ParseError

Source§

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

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

impl Display for ParseError

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedFormat

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

AttrFromString

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NumLabels

Fields

§num_labels: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Utf8

Fields

§source: Utf8Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NotAnIrohRecord

Fields

§label: String
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

DecodingError

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for ParseError

Source§

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

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

impl Display for ParseError

Source§

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

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

impl Error for ParseError

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for ParseError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +) -> Result<(), Error>

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

impl Error for ParseError

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for ParseError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<DecodingError> for ParseError

Source§

fn from(error: DecodingError) -> ParseError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<DecodingError> for ParseError

Source§

fn from(error: DecodingError) -> ParseError

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -47,22 +47,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/index.html b/pr/3367/docs/iroh/discovery/index.html index 6d6c0215b7..62b6fa607f 100644 --- a/pr/3367/docs/iroh/discovery/index.html +++ b/pr/3367/docs/iroh/discovery/index.html @@ -1,11 +1,10 @@ -iroh::discovery - Rust

Module discovery

Source
Expand description

Node address discovery.

+iroh::discovery - Rust

Module discovery

Module discovery 

Source
Expand description

Node address discovery.

To connect to an iroh node a NodeAddr is needed, which may contain a RelayUrl or one or more direct addresses in addition to the NodeId.

Since there is a conversion from NodeId to NodeAddr, you can also use connect directly with a NodeId.

For this to work however, the endpoint has to get the addressing information by -other means. This can be done by manually calling Endpoint::add_node_addr, -but that still requires knowing the other addressing information.

+other means.

Node discovery is an automated system for an Endpoint to retrieve this addressing information. Each iroh node will automatically publish their own addressing information. Usually this means publishing which RelayUrl to use for their @@ -56,8 +55,8 @@ implement PkarrPublisher and DnsDiscovery:

use iroh::{
-    discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher},
     Endpoint, SecretKey,
+    discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher},
 };
 
 let ep = Endpoint::builder()
@@ -73,5 +72,4 @@ implement await?;
-

Modules§

dnsNon-wasm_browser
DNS node discovery for iroh
mdnsdiscovery-local-network
A discovery service that uses an mdns-like service to discover local nodes.
pkarr
A discovery service which publishes and resolves node information using a pkarr relay.
static_provider
A static node discovery to manually add node addressing information.

Structs§

ConcurrentDiscovery
A discovery service that combines multiple discovery sources.
DiscoveryContext
Context about the Endpoint for discovery services.
DiscoveryItem
Node discovery results from Discovery services.
Lagged
Error returned when a discovery watch stream lagged too far behind.
NodeData
Data about a node that may be published to and resolved from discovery services.
NodeInfo
Information about a node that may be published to and resolved from discovery services.
UserData
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

Enums§

DiscoveryError
Discovery errors
IntoDiscoveryError
IntoDiscovery errors
ParseError

Traits§

Discovery
Node discovery for super::Endpoint.
IntoDiscovery
Trait for structs that can be converted into Discovery.
\ No newline at end of file + .await?;

Modules§

dnsNon-wasm_browser
DNS node discovery for iroh
mdnsdiscovery-local-network
A discovery service that uses an mdns-like service to discover local nodes.
pkarr
A discovery service which publishes and resolves node information using a pkarr relay.
static_provider
A static node discovery to manually add node addressing information.

Structs§

ConcurrentDiscovery
A discovery service that combines multiple discovery sources.
DiscoveryContext
Context about the Endpoint for discovery services.
DiscoveryItem
Node discovery results from Discovery services.
NodeData
Data about a node that may be published to and resolved from discovery services.
NodeInfo
Information about a node that may be published to and resolved from discovery services.
UserData
Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

Enums§

DiscoveryError
Discovery errors
IntoDiscoveryError
IntoDiscovery errors
ParseError

Traits§

Discovery
Node discovery for super::Endpoint.
IntoDiscovery
Trait for structs that can be converted into Discovery.
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/mdns/constant.NAME.html b/pr/3367/docs/iroh/discovery/mdns/constant.NAME.html index f713a95412..2e48862895 100644 --- a/pr/3367/docs/iroh/discovery/mdns/constant.NAME.html +++ b/pr/3367/docs/iroh/discovery/mdns/constant.NAME.html @@ -1,4 +1,4 @@ -NAME in iroh::discovery::mdns - Rust

Constant NAME

Source
pub const NAME: &str = "local.swarm.discovery";
Available on crate feature discovery-local-network only.
Expand description

Name of this discovery service.

+NAME in iroh::discovery::mdns - Rust

NAME

Constant NAME 

Source
pub const NAME: &str = "mdns";
Available on crate feature discovery-local-network only.
Expand description

Name of this discovery service.

Used as the provenance field in DiscoveryItems.

Used in the crate::endpoint::Source::Discovery enum variant as the name.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/mdns/enum.DiscoveryEvent.html b/pr/3367/docs/iroh/discovery/mdns/enum.DiscoveryEvent.html new file mode 100644 index 0000000000..df106718f6 --- /dev/null +++ b/pr/3367/docs/iroh/discovery/mdns/enum.DiscoveryEvent.html @@ -0,0 +1,56 @@ +DiscoveryEvent in iroh::discovery::mdns - Rust

DiscoveryEvent

Enum DiscoveryEvent 

Source
pub enum DiscoveryEvent {
+    Discovered {
+        node_info: NodeInfo,
+        last_updated: Option<u64>,
+    },
+    Expired {
+        node_id: NodeId,
+    },
+}
Available on crate feature discovery-local-network only.
Expand description

An event emitted from the MdnsDiscovery service.

+

Variants§

§

Discovered

A peer was discovered or it’s information was updated.

+

Fields

§node_info: NodeInfo

The node info for the node, as discovered.

+
§last_updated: Option<u64>

Optional timestamp when this node address info was last updated.

+
§

Expired

A peer was expired due to being inactive, unreachable, or otherwise +unavailable.

+

Fields

§node_id: NodeId

The id of the node that expired.

+

Trait Implementations§

Source§

impl Clone for DiscoveryEvent

Source§

fn clone(&self) -> DiscoveryEvent

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 DiscoveryEvent

Source§

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

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

impl PartialEq for DiscoveryEvent

Source§

fn eq(&self, other: &DiscoveryEvent) -> 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 Eq for DiscoveryEvent

Source§

impl StructuralPartialEq for DiscoveryEvent

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where + T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where + T: 'a,

§

fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> FromRef<T> for T
where + T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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.

+
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where + V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where + T: 'static,

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/mdns/index.html b/pr/3367/docs/iroh/discovery/mdns/index.html index befdab5c4e..4f56a4b950 100644 --- a/pr/3367/docs/iroh/discovery/mdns/index.html +++ b/pr/3367/docs/iroh/discovery/mdns/index.html @@ -1,29 +1,36 @@ -iroh::discovery::mdns - Rust

Module mdns

Source
Available on crate feature discovery-local-network only.
Expand description

A discovery service that uses an mdns-like service to discover local nodes.

+iroh::discovery::mdns - Rust

Module mdns

Module mdns 

Source
Available on crate feature discovery-local-network only.
Expand description

A discovery service that uses an mdns-like service to discover local nodes.

This allows you to use an mdns-like swarm discovery service to find address information about nodes that are on your local network, no relay or outside internet needed. See the swarm-discovery crate for more details.

When MdnsDiscovery is enabled, it’s possible to get a list of the locally discovered nodes by filtering a list of RemoteInfos.

use std::time::Duration;
 
-use iroh::endpoint::{Endpoint, Source};
+use iroh::{
+    SecretKey,
+    discovery::mdns::{DiscoveryEvent, MdnsDiscovery},
+    endpoint::{Endpoint, Source},
+};
+use n0_future::StreamExt;
 
 #[tokio::main]
 async fn main() {
     let recent = Duration::from_secs(600); // 10 minutes in seconds
-
     let endpoint = Endpoint::builder().bind().await.unwrap();
-    let remotes = endpoint.remote_info_iter();
-    let locally_discovered: Vec<_> = remotes
-        .filter(|remote| {
-            remote.sources().iter().any(|(source, duration)| {
-                if let Source::Discovery { name } = source {
-                    name == iroh::discovery::mdns::NAME && *duration <= recent
-                } else {
-                    false
-                }
-            })
-        })
-        .collect();
-    println!("locally discovered nodes: {locally_discovered:?}");
-}
-

Structs§

MdnsDiscovery
Discovery using swarm-discovery, a variation on mdns
MdnsDiscoveryBuilder
Builder for MdnsDiscovery.

Constants§

NAME
Name of this discovery service.
\ No newline at end of file + + // Register the discovery services with the endpoint + let mdns = MdnsDiscovery::builder().build(endpoint.node_id()).unwrap(); + endpoint.discovery().add(mdns.clone()); + + // Subscribe to the discovery events + let mut events = mdns.subscribe().await; + while let Some(event) = events.next().await { + match event { + DiscoveryEvent::Discovered { node_info, .. } => { + println!("MDNS discovered: {:?}", node_info); + } + DiscoveryEvent::Expired { node_id } => { + println!("MDNS expired: {node_id}"); + } + } + } +}

Structs§

MdnsDiscovery
Discovery using swarm-discovery, a variation on mdns
MdnsDiscoveryBuilder
Builder for MdnsDiscovery.

Enums§

DiscoveryEvent
An event emitted from the MdnsDiscovery service.

Constants§

NAME
Name of this discovery service.
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/mdns/sidebar-items.js b/pr/3367/docs/iroh/discovery/mdns/sidebar-items.js index d1f7c22192..451cc31999 100644 --- a/pr/3367/docs/iroh/discovery/mdns/sidebar-items.js +++ b/pr/3367/docs/iroh/discovery/mdns/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["NAME"],"struct":["MdnsDiscovery","MdnsDiscoveryBuilder"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["NAME"],"enum":["DiscoveryEvent"],"struct":["MdnsDiscovery","MdnsDiscoveryBuilder"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscovery.html b/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscovery.html index a08e9fe089..ed6d294d64 100644 --- a/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscovery.html +++ b/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscovery.html @@ -1,15 +1,12 @@ -MdnsDiscovery in iroh::discovery::mdns - Rust

Struct MdnsDiscovery

Source
pub struct MdnsDiscovery { /* private fields */ }
Available on crate feature discovery-local-network only.
Expand description

Discovery using swarm-discovery, a variation on mdns

-

Implementations§

Source§

impl MdnsDiscovery

Source

pub fn builder() -> MdnsDiscoveryBuilder

Returns a MdnsDiscoveryBuilder that implements IntoDiscovery.

-
Source

pub fn new(node_id: NodeId) -> Result<Self, IntoDiscoveryError>

Create a new MdnsDiscovery Service.

-

This starts a [Discoverer] that broadcasts your addresses and receives addresses from other nodes in your local network.

-
§Errors
-

Returns an error if the network does not allow ipv4 OR ipv6.

-
§Panics
-

This relies on [tokio::runtime::Handle::current] and will panic if called outside of the context of a tokio runtime.

-

Trait Implementations§

Source§

impl Debug for MdnsDiscovery

Source§

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

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

impl Discovery for MdnsDiscovery

Source§

fn resolve( +MdnsDiscovery in iroh::discovery::mdns - Rust

MdnsDiscovery

Struct MdnsDiscovery 

Source
pub struct MdnsDiscovery { /* private fields */ }
Available on crate feature discovery-local-network only.
Expand description

Discovery using swarm-discovery, a variation on mdns

+

Implementations§

Source§

impl MdnsDiscovery

Source

pub fn builder() -> MdnsDiscoveryBuilder

Returns a MdnsDiscoveryBuilder that implements IntoDiscovery.

+
Source

pub async fn subscribe( + &self, +) -> impl Stream<Item = DiscoveryEvent> + Unpin + use<>

Subscribe to discovered nodes

+

Trait Implementations§

Source§

impl Clone for MdnsDiscovery

Source§

fn clone(&self) -> MdnsDiscovery

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 MdnsDiscovery

Source§

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

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

impl Discovery for MdnsDiscovery

Source§

fn resolve( &self, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. 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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -17,24 +14,35 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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 +) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> FromRef<T> for T
where + T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscoveryBuilder.html b/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscoveryBuilder.html index adff7168fe..5d5f2ee613 100644 --- a/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscoveryBuilder.html +++ b/pr/3367/docs/iroh/discovery/mdns/struct.MdnsDiscoveryBuilder.html @@ -1,5 +1,18 @@ -MdnsDiscoveryBuilder in iroh::discovery::mdns - Rust

Struct MdnsDiscoveryBuilder

Source
pub struct MdnsDiscoveryBuilder;
Available on crate feature discovery-local-network only.
Expand description

Builder for MdnsDiscovery.

-

Trait Implementations§

Source§

impl Debug for MdnsDiscoveryBuilder

Source§

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

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

impl IntoDiscovery for MdnsDiscoveryBuilder

Source§

fn into_discovery( +MdnsDiscoveryBuilder in iroh::discovery::mdns - Rust

MdnsDiscoveryBuilder

Struct MdnsDiscoveryBuilder 

Source
pub struct MdnsDiscoveryBuilder { /* private fields */ }
Available on crate feature discovery-local-network only.
Expand description

Builder for MdnsDiscovery.

+

Implementations§

Source§

impl MdnsDiscoveryBuilder

Source

pub fn advertise(self, advertise: bool) -> Self

Sets whether this node should advertise its presence.

+

Default is true.

+
Source

pub fn service_name(self, service_name: impl Into<String>) -> Self

Sets a custom service name.

+

The default is irohv1, which will show up on a record in the +following form, for example: +7rutqynuzu65fcdgoerbt4uoh3p62wuto2mp56x3uvhitqzssxga._irohv1._udp.local

+

Any custom service name will take the form, for example: +7rutqynuzu65fcdgoerbt4uoh3p62wuto2mp56x3uvhitqzssxga._{service_name}.upd.local

+
Source

pub fn build(self, node_id: NodeId) -> Result<MdnsDiscovery, IntoDiscoveryError>

Builds an MdnsDiscovery instance with the configured settings.

+
§Errors
+

Returns an error if the network does not allow ipv4 OR ipv6.

+
§Panics
+

This relies on [tokio::runtime::Handle::current] and will panic if called outside of the context of a tokio runtime.

+

Trait Implementations§

Source§

impl Debug for MdnsDiscoveryBuilder

Source§

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

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

impl Default for MdnsDiscoveryBuilder

Source§

fn default() -> Self

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

impl IntoDiscovery for MdnsDiscoveryBuilder

Source§

fn into_discovery( self, context: &DiscoveryContext<'_>, ) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where @@ -10,20 +23,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_PKARR_TTL.html b/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_PKARR_TTL.html index 8be2e9056d..065441d634 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_PKARR_TTL.html +++ b/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_PKARR_TTL.html @@ -1,4 +1,4 @@ -DEFAULT_PKARR_TTL in iroh::discovery::pkarr - Rust

Constant DEFAULT_PKARR_TTL

Source
pub const DEFAULT_PKARR_TTL: u32 = 30;
Expand description

Default TTL for the records in the pkarr signed packet.

+DEFAULT_PKARR_TTL in iroh::discovery::pkarr - Rust

DEFAULT_PKARR_TTL

Constant DEFAULT_PKARR_TTL 

Source
pub const DEFAULT_PKARR_TTL: u32 = 30;
Expand description

Default TTL for the records in the pkarr signed packet.

The Time To Live (TTL) tells DNS caches how long to store a record. It is ignored by the iroh-dns-server, e.g. as running on N0_DNS_PKARR_RELAY_PROD, as the home server keeps the records for the domain. When using the pkarr relay no DNS is involved and the diff --git a/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html b/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html index 70e5c3d43b..17f19c5a51 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html +++ b/pr/3367/docs/iroh/discovery/pkarr/constant.DEFAULT_REPUBLISH_INTERVAL.html @@ -1,2 +1,2 @@ -DEFAULT_REPUBLISH_INTERVAL in iroh::discovery::pkarr - Rust

Constant DEFAULT_REPUBLISH_INTERVAL

Source
pub const DEFAULT_REPUBLISH_INTERVAL: Duration;
Expand description

Interval in which to republish the node info even if unchanged: 5 minutes.

+DEFAULT_REPUBLISH_INTERVAL in iroh::discovery::pkarr - Rust

DEFAULT_REPUBLISH_INTERVAL

Constant DEFAULT_REPUBLISH_INTERVAL 

Source
pub const DEFAULT_REPUBLISH_INTERVAL: Duration;
Expand description

Interval in which to republish the node info even if unchanged: 5 minutes.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_PROD.html b/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_PROD.html index 9950207afa..eba0e9ef5e 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_PROD.html +++ b/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_PROD.html @@ -1,4 +1,4 @@ -N0_DNS_PKARR_RELAY_PROD in iroh::discovery::pkarr - Rust

Constant N0_DNS_PKARR_RELAY_PROD

Source
pub const N0_DNS_PKARR_RELAY_PROD: &str = "https://dns.iroh.link/pkarr";
Expand description

The production pkarr relay run by number 0.

+N0_DNS_PKARR_RELAY_PROD in iroh::discovery::pkarr - Rust

N0_DNS_PKARR_RELAY_PROD

Constant N0_DNS_PKARR_RELAY_PROD 

Source
pub const N0_DNS_PKARR_RELAY_PROD: &str = "https://dns.iroh.link/pkarr";
Expand description

The production pkarr relay run by number 0.

This server is both a pkarr relay server as well as a DNS resolver, see the module documentation. However it does not interact with the Mainline DHT, so is a more central service. It is a reliable service to use for node discovery.

diff --git a/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html b/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html index 9deb17434c..f41549317f 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html +++ b/pr/3367/docs/iroh/discovery/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html @@ -1,4 +1,4 @@ -N0_DNS_PKARR_RELAY_STAGING in iroh::discovery::pkarr - Rust

Constant N0_DNS_PKARR_RELAY_STAGING

Source
pub const N0_DNS_PKARR_RELAY_STAGING: &str = "https://staging-dns.iroh.link/pkarr";
Expand description

The testing pkarr relay run by number 0.

+N0_DNS_PKARR_RELAY_STAGING in iroh::discovery::pkarr - Rust

N0_DNS_PKARR_RELAY_STAGING

Constant N0_DNS_PKARR_RELAY_STAGING 

Source
pub const N0_DNS_PKARR_RELAY_STAGING: &str = "https://staging-dns.iroh.link/pkarr";
Expand description

The testing pkarr relay run by number 0.

This server operates similarly to N0_DNS_PKARR_RELAY_PROD but is not as reliable. It is meant for more experimental use and testing purposes.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/dht/index.html b/pr/3367/docs/iroh/discovery/pkarr/dht/index.html index 90fab29ce5..97d62938a3 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/dht/index.html +++ b/pr/3367/docs/iroh/discovery/pkarr/dht/index.html @@ -1,4 +1,4 @@ -iroh::discovery::pkarr::dht - Rust

Module dht

Source
Available on crate feature discovery-pkarr-dht only.
Expand description

Pkarr based node discovery for iroh, supporting both relay servers and the DHT.

+iroh::discovery::pkarr::dht - Rust

Module dht

Module dht 

Source
Available on crate feature discovery-pkarr-dht only.
Expand description

Pkarr based node discovery for iroh, supporting both relay servers and the DHT.

This module contains pkarr-based node discovery for iroh which can use both pkarr relay servers as well as the Mainline DHT directly. See the pkarr module for an overview of pkarr.

diff --git a/pr/3367/docs/iroh/discovery/pkarr/dht/struct.Builder.html b/pr/3367/docs/iroh/discovery/pkarr/dht/struct.Builder.html index 1256048e90..810ec99f09 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/dht/struct.Builder.html +++ b/pr/3367/docs/iroh/discovery/pkarr/dht/struct.Builder.html @@ -1,18 +1,17 @@ -Builder in iroh::discovery::pkarr::dht - Rust

Struct Builder

Source
pub struct Builder { /* private fields */ }
Available on crate feature discovery-pkarr-dht only.
Expand description

Builder for DhtDiscovery.

+Builder in iroh::discovery::pkarr::dht - Rust

Builder

Struct Builder 

Source
pub struct Builder { /* private fields */ }
Available on crate feature discovery-pkarr-dht only.
Expand description

Builder for DhtDiscovery.

By default, publishing to the DHT is enabled, and relay publishing is disabled.

-

Implementations§

Source§

impl Builder

Source

pub fn client(self, client: PkarrClient) -> Self

Explicitly sets the pkarr client to use.

-
Source

pub fn secret_key(self, secret_key: SecretKey) -> Self

Sets the secret key to use for signing the DNS packets.

+

Implementations§

Source§

impl Builder

Source

pub fn client(self, client: PkarrClient) -> Self

Explicitly sets the pkarr client to use.

+
Source

pub fn secret_key(self, secret_key: SecretKey) -> Self

Sets the secret key to use for signing the DNS packets.

Without a secret key, the node will not publish its address to the DHT.

-
Source

pub fn ttl(self, ttl: u32) -> Self

Sets the time-to-live value for the DNS packets.

-
Source

pub fn pkarr_relay(self, pkarr_relay: Url) -> Self

Sets the pkarr relay URL to use.

-
Source

pub fn n0_dns_pkarr_relay(self) -> Self

Uses the default number 0 pkarr relay URL.

-
Source

pub fn dht(self, dht: bool) -> Self

Sets whether to publish to the Mainline DHT.

-
Source

pub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self

Sets whether to include the direct addresses in the DNS packet.

-
Source

pub fn initial_publish_delay(self, initial_publish_delay: Duration) -> Self

Sets the initial delay before the first publish.

-
Source

pub fn republish_delay(self, republish_delay: Duration) -> Self

Sets the republish delay for the DHT.

-
Source

pub fn no_publish(self) -> Self

Disables publishing even if a secret key is set.

-
Source

pub fn build(self) -> Result<DhtDiscovery, IntoDiscoveryError>

Builds the discovery mechanism.

-

Trait Implementations§

Source§

impl Debug for Builder

Source§

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

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

impl Default for Builder

Source§

fn default() -> Self

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

impl IntoDiscovery for Builder

Source

pub fn ttl(self, ttl: u32) -> Self

Sets the time-to-live value for the DNS packets.

+
Source

pub fn pkarr_relay(self, pkarr_relay: Url) -> Self

Sets the pkarr relay URL to use.

+
Source

pub fn n0_dns_pkarr_relay(self) -> Self

Uses the default number 0 pkarr relay URL.

+
Source

pub fn dht(self, dht: bool) -> Self

Sets whether to publish to the Mainline DHT.

+
Source

pub fn include_direct_addresses(self, include_direct_addresses: bool) -> Self

Sets whether to include the direct addresses in the DNS packet.

+
Source

pub fn republish_delay(self, republish_delay: Duration) -> Self

Sets the republish delay for the DHT.

+
Source

pub fn no_publish(self) -> Self

Disables publishing even if a secret key is set.

+
Source

pub fn build(self) -> Result<DhtDiscovery, IntoDiscoveryError>

Builds the discovery mechanism.

+

Trait Implementations§

Source§

impl Debug for Builder

Source§

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

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

impl Default for Builder

Source§

fn default() -> Self

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

impl IntoDiscovery for Builder

Source§

fn into_discovery( self, context: &DiscoveryContext<'_>, ) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where @@ -23,20 +22,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static,
\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html b/pr/3367/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html index 47015f956b..74f2d4645f 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html +++ b/pr/3367/docs/iroh/discovery/pkarr/dht/struct.DhtDiscovery.html @@ -1,14 +1,14 @@ -DhtDiscovery in iroh::discovery::pkarr::dht - Rust

Struct DhtDiscovery

Source
pub struct DhtDiscovery(/* private fields */);
Available on crate feature discovery-pkarr-dht only.
Expand description

Pkarr Mainline DHT and relay server node discovery.

+DhtDiscovery in iroh::discovery::pkarr::dht - Rust

DhtDiscovery

Struct DhtDiscovery 

Source
pub struct DhtDiscovery(/* private fields */);
Available on crate feature discovery-pkarr-dht only.
Expand description

Pkarr Mainline DHT and relay server node discovery.

It stores node addresses in DNS records, signed by the node’s private key, and publishes them to the BitTorrent Mainline DHT. See the pkarr module for more details.

This implements the Discovery trait to be used as a node discovery service which can be used as both a publisher and resolver. Calling DhtDiscovery::publish will start a background task that periodically publishes the node address.

-

Implementations§

Source§

impl DhtDiscovery

Source

pub fn builder() -> Builder

Creates a new builder for DhtDiscovery.

-

Trait Implementations§

Source§

impl Clone for DhtDiscovery

Source§

fn clone(&self) -> DhtDiscovery

Returns a copy 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 DhtDiscovery

Source§

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

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

impl Default for DhtDiscovery

Source§

fn default() -> Self

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

impl Discovery for DhtDiscovery

Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( +

Implementations§

Source§

impl DhtDiscovery

Source

pub fn builder() -> Builder

Creates a new builder for DhtDiscovery.

+

Trait Implementations§

Source§

impl Clone for DhtDiscovery

Source§

fn clone(&self) -> DhtDiscovery

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 DhtDiscovery

Source§

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

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

impl Default for DhtDiscovery

Source§

fn default() -> Self

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

impl Discovery for DhtDiscovery

Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( &self, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. 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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -16,28 +16,35 @@ a background task that periodically publishes the node address.

class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/enum.PkarrError.html b/pr/3367/docs/iroh/discovery/pkarr/enum.PkarrError.html index ea71978b02..ad09a6e9e5 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/enum.PkarrError.html +++ b/pr/3367/docs/iroh/discovery/pkarr/enum.PkarrError.html @@ -1,4 +1,4 @@ -PkarrError in iroh::discovery::pkarr - Rust

Enum PkarrError

Source
#[non_exhaustive]
pub enum PkarrError { +PkarrError in iroh::discovery::pkarr - Rust

PkarrError

Enum PkarrError 

Source
#[non_exhaustive]
pub enum PkarrError { PublicKey { source: PublicKeyError, }, @@ -20,11 +20,11 @@ Encoding { source: EncodingError, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

PublicKey

Fields

§source: PublicKeyError
§

Verify

Fields

§source: SignedPacketVerifyError
§

InvalidRelayUrl

Fields

§

HttpSend

Fields

§source: Error
§

HttpRequest

Fields

§status: StatusCode
§

HttpPayload

Fields

§source: Error
§

Encoding

Fields

Trait Implementations§

Source§

impl Debug for PkarrError

Source§

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

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

impl Display for PkarrError

Source§

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

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

impl Error for PkarrError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for PkarrError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

PublicKey

Fields

§source: PublicKeyError
§

Verify

Fields

§source: SignedPacketVerifyError
§

InvalidRelayUrl

Fields

§

HttpSend

Fields

§source: Error
§

HttpRequest

Fields

§status: StatusCode
§

HttpPayload

Fields

§source: Error
§

Encoding

Fields

Trait Implementations§

Source§

impl Debug for PkarrError

Source§

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

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

impl Display for PkarrError

Source§

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

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

impl Error for PkarrError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for PkarrError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<PkarrError> for DiscoveryError

Source§

fn from(err: PkarrError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<PkarrError> for DiscoveryError

Source§

fn from(err: PkarrError) -> Self

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -35,22 +35,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/index.html b/pr/3367/docs/iroh/discovery/pkarr/index.html index 75531baebd..355073db84 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/index.html +++ b/pr/3367/docs/iroh/discovery/pkarr/index.html @@ -1,4 +1,4 @@ -iroh::discovery::pkarr - Rust

Module pkarr

Source
Expand description

A discovery service which publishes and resolves node information using a pkarr relay.

+iroh::discovery::pkarr - Rust

Module pkarr

Module pkarr 

Source
Expand description

A discovery service which publishes and resolves node information using a pkarr relay.

Public-Key Addressable Resource Records, pkarr, is a system which allows publishing DNS Resource Records owned by a particular SecretKey under a name derived from its corresponding PublicKey, also known as the NodeId. Additionally this pkarr diff --git a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html index 312594ac56..222f489aba 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html +++ b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisher.html @@ -1,28 +1,28 @@ -PkarrPublisher in iroh::discovery::pkarr - Rust

Struct PkarrPublisher

Source
pub struct PkarrPublisher { /* private fields */ }
Expand description

Publisher of node discovery information to a pkarr relay.

+PkarrPublisher in iroh::discovery::pkarr - Rust

PkarrPublisher

Struct PkarrPublisher 

Source
pub struct PkarrPublisher { /* private fields */ }
Expand description

Publisher of node discovery information to a pkarr relay.

This publisher uses HTTP to publish node discovery information to a pkarr relay server, see the module docs for details.

This implements the Discovery trait to be used as a node discovery service. Note that it only publishes node discovery information, for the corresponding resolver use the PkarrResolver together with ConcurrentDiscovery.

This publisher will only publish the RelayUrl if it is set, otherwise the direct addresses are published instead.

-

Implementations§

Source§

impl PkarrPublisher

Source

pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder

Returns a PkarrPublisherBuilder that publishes node info to a pkarr relay at pkarr_relay.

+

Implementations§

Source§

impl PkarrPublisher

Source

pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder

Returns a PkarrPublisherBuilder that publishes node info to a pkarr relay at pkarr_relay.

If no further options are set, the pkarr publisher will use DEFAULT_PKARR_TTL as the time-to-live value for the published packets, and it will republish discovery information every DEFAULT_REPUBLISH_INTERVAL, even if the information is unchanged.

PkarrPublisherBuilder implements IntoDiscovery, so it can be passed to add_discovery. It will then use the endpoint’s secret key to sign published packets.

-
Source

pub fn n0_dns() -> PkarrPublisherBuilder

Creates a pkarr publisher which uses the number 0 pkarr relay server.

+
Source

pub fn n0_dns() -> PkarrPublisherBuilder

Creates a pkarr publisher which uses the number 0 pkarr relay server.

This uses the pkarr relay server operated by number 0, at N0_DNS_PKARR_RELAY_PROD.

When running with the environment variable IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING server is used instead.

-
Source

pub fn update_node_data(&self, data: &NodeData)

Publishes the addressing information about this node to a pkarr relay.

+
Source

pub fn update_node_data(&self, data: &NodeData)

Publishes the addressing information about this node to a pkarr relay.

This is a nonblocking function, the actual update is performed in the background.

-

Trait Implementations§

Source§

impl Clone for PkarrPublisher

Source§

fn clone(&self) -> PkarrPublisher

Returns a copy 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 PkarrPublisher

Source§

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

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

impl Discovery for PkarrPublisher

Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( +

Trait Implementations§

Source§

impl Clone for PkarrPublisher

Source§

fn clone(&self) -> PkarrPublisher

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 PkarrPublisher

Source§

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

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

impl Discovery for PkarrPublisher

Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( &self, _node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. 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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -30,28 +30,35 @@ server is used instead.

class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisherBuilder.html b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisherBuilder.html index 908196d281..e705444fa3 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisherBuilder.html +++ b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrPublisherBuilder.html @@ -1,13 +1,13 @@ -PkarrPublisherBuilder in iroh::discovery::pkarr - Rust

Struct PkarrPublisherBuilder

Source
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description

Builder for PkarrPublisher.

+PkarrPublisherBuilder in iroh::discovery::pkarr - Rust

PkarrPublisherBuilder

Struct PkarrPublisherBuilder 

Source
pub struct PkarrPublisherBuilder { /* private fields */ }
Expand description

Implementations§

Source§

impl PkarrPublisherBuilder

Source

pub fn ttl(self, ttl: u32) -> Self

Sets the TTL (time-to-live) for published packets.

+

Implementations§

Source§

impl PkarrPublisherBuilder

Source

pub fn ttl(self, ttl: u32) -> Self

Sets the TTL (time-to-live) for published packets.

Default is DEFAULT_PKARR_TTL.

-
Source

pub fn republish_interval(self, republish_interval: Duration) -> Self

Sets the interval after which packets are republished even if our node info did not change.

+
Source

pub fn republish_interval(self, republish_interval: Duration) -> Self

Sets the interval after which packets are republished even if our node info did not change.

Default is DEFAULT_REPUBLISH_INTERVAL.

-
Source

pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

Available on non-wasm_browser only.

Sets the DNS resolver to use for resolving the pkarr relay URL.

-
Source

pub fn build(self, secret_key: SecretKey) -> PkarrPublisher

Builds the PkarrPublisher with the passed secret key for signing packets.

+
Source

pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

Available on non-wasm_browser only.

Sets the DNS resolver to use for resolving the pkarr relay URL.

+
Source

pub fn build(self, secret_key: SecretKey) -> PkarrPublisher

Builds the PkarrPublisher with the passed secret key for signing packets.

This publisher will be able to publish [pkarr] records for SecretKey.

-

Trait Implementations§

Source§

impl Debug for PkarrPublisherBuilder

Source§

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

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

impl IntoDiscovery for PkarrPublisherBuilder

Trait Implementations§

Source§

impl Debug for PkarrPublisherBuilder

Source§

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

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

impl IntoDiscovery for PkarrPublisherBuilder

Source§

fn into_discovery( self, context: &DiscoveryContext<'_>, ) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where @@ -18,20 +18,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrRelayClient.html b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrRelayClient.html index 565f447003..67cafc37cb 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrRelayClient.html +++ b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrRelayClient.html @@ -1,18 +1,18 @@ -PkarrRelayClient in iroh::discovery::pkarr - Rust

Struct PkarrRelayClient

Source
pub struct PkarrRelayClient { /* private fields */ }
Expand description

A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.

-

Implementations§

Source§

impl PkarrRelayClient

Source

pub fn new(pkarr_relay_url: Url) -> Self

Creates a new client.

-
Source

pub fn with_dns_resolver( - pkarr_relay_url: Url, +PkarrRelayClient in iroh::discovery::pkarr - Rust

PkarrRelayClient

Struct PkarrRelayClient 

Source
pub struct PkarrRelayClient { /* private fields */ }
Expand description

A pkarr client to publish [pkarr::SignedPacket]s to a pkarr relay.

+

Implementations§

Source§

impl PkarrRelayClient

Source

pub fn new(pkarr_relay_url: Url) -> Self

Creates a new client.

+
Source

pub fn with_dns_resolver( + pkarr_relay_url: Url, dns_resolver: DnsResolver, ) -> Self

Available on non-wasm_browser only.

Creates a new client while passing a DNS resolver to use.

-
Source

pub async fn resolve( +

Source

pub async fn resolve( &self, node_id: NodeId, ) -> Result<SignedPacket, DiscoveryError>

Resolves a [SignedPacket] for the given NodeId.

-
Source

pub async fn publish( +

Source

pub async fn publish( &self, signed_packet: &SignedPacket, ) -> Result<(), PkarrError>

Publishes a [SignedPacket].

-

Trait Implementations§

Source§

impl Clone for PkarrRelayClient

Source§

fn clone(&self) -> PkarrRelayClient

Returns a copy 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 PkarrRelayClient

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 +

Trait Implementations§

Source§

impl Clone for PkarrRelayClient

Source§

fn clone(&self) -> PkarrRelayClient

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 PkarrRelayClient

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -20,24 +20,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolver.html b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolver.html index 061d3abc04..c84c9782c9 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolver.html +++ b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolver.html @@ -1,21 +1,21 @@ -PkarrResolver in iroh::discovery::pkarr - Rust

Struct PkarrResolver

Source
pub struct PkarrResolver { /* private fields */ }
Expand description

Resolver of node discovery information from a pkarr relay.

+PkarrResolver in iroh::discovery::pkarr - Rust

PkarrResolver

Struct PkarrResolver 

Source
pub struct PkarrResolver { /* private fields */ }
Expand description

Resolver of node discovery information from a pkarr relay.

The resolver uses HTTP to query node discovery information from a pkarr relay server, see the module docs for details.

This implements the Discovery trait to be used as a node discovery service. Note that it only resolves node discovery information, for the corresponding publisher use the PkarrPublisher together with ConcurrentDiscovery.

-

Implementations§

Source§

impl PkarrResolver

Source

pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder

Creates a new resolver builder using the pkarr relay server at the URL.

+

Implementations§

Source§

impl PkarrResolver

Source

pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder

Creates a new resolver builder using the pkarr relay server at the URL.

The builder implements IntoDiscovery.

-
Source

pub fn n0_dns() -> PkarrResolverBuilder

Creates a pkarr resolver builder which uses the number 0 pkarr relay server.

+
Source

pub fn n0_dns() -> PkarrResolverBuilder

Creates a pkarr resolver builder which uses the number 0 pkarr relay server.

This uses the pkarr relay server operated by number 0 at N0_DNS_PKARR_RELAY_PROD.

When running with the environment variable IROH_FORCE_STAGING_RELAYS set to any non empty value N0_DNS_PKARR_RELAY_STAGING server is used instead.

-

Trait Implementations§

Source§

impl Clone for PkarrResolver

Source§

fn clone(&self) -> PkarrResolver

Returns a copy 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 PkarrResolver

Source§

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

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

impl Discovery for PkarrResolver

Trait Implementations§

Source§

impl Clone for PkarrResolver

Source§

fn clone(&self) -> PkarrResolver

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 PkarrResolver

Source§

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

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

impl Discovery for PkarrResolver

Source§

fn resolve( &self, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism. 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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -23,28 +23,35 @@ server is used instead.

class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolverBuilder.html b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolverBuilder.html index d6032b1808..ead53b49d6 100644 --- a/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolverBuilder.html +++ b/pr/3367/docs/iroh/discovery/pkarr/struct.PkarrResolverBuilder.html @@ -1,8 +1,8 @@ -PkarrResolverBuilder in iroh::discovery::pkarr - Rust

Struct PkarrResolverBuilder

Source
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description

Builder for PkarrResolver.

+PkarrResolverBuilder in iroh::discovery::pkarr - Rust

PkarrResolverBuilder

Struct PkarrResolverBuilder 

Source
pub struct PkarrResolverBuilder { /* private fields */ }
Expand description

Implementations§

Source§

impl PkarrResolverBuilder

Source

pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

Available on non-wasm_browser only.

Sets the DNS resolver to use for resolving the pkarr relay URL.

-
Source

pub fn build(self) -> PkarrResolver

Creates a PkarrResolver from this builder.

-

Trait Implementations§

Source§

impl Debug for PkarrResolverBuilder

Source§

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

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

impl IntoDiscovery for PkarrResolverBuilder

Implementations§

Source§

impl PkarrResolverBuilder

Source

pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

Available on non-wasm_browser only.

Sets the DNS resolver to use for resolving the pkarr relay URL.

+
Source

pub fn build(self) -> PkarrResolver

Creates a PkarrResolver from this builder.

+

Trait Implementations§

Source§

impl Debug for PkarrResolverBuilder

Source§

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

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

impl IntoDiscovery for PkarrResolverBuilder

Source§

fn into_discovery( self, context: &DiscoveryContext<'_>, ) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where @@ -13,20 +13,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/sidebar-items.js b/pr/3367/docs/iroh/discovery/sidebar-items.js index 6df1802dca..d767ca9831 100644 --- a/pr/3367/docs/iroh/discovery/sidebar-items.js +++ b/pr/3367/docs/iroh/discovery/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":["DiscoveryError","IntoDiscoveryError","ParseError"],"mod":["dns","mdns","pkarr","static_provider"],"struct":["ConcurrentDiscovery","DiscoveryContext","DiscoveryItem","Lagged","NodeData","NodeInfo","UserData"],"trait":["Discovery","IntoDiscovery"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["DiscoveryError","IntoDiscoveryError","ParseError"],"mod":["dns","mdns","pkarr","static_provider"],"struct":["ConcurrentDiscovery","DiscoveryContext","DiscoveryItem","NodeData","NodeInfo","UserData"],"trait":["Discovery","IntoDiscovery"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/static_provider/index.html b/pr/3367/docs/iroh/discovery/static_provider/index.html index 6d07e8b323..ae31cdd23f 100644 --- a/pr/3367/docs/iroh/discovery/static_provider/index.html +++ b/pr/3367/docs/iroh/discovery/static_provider/index.html @@ -1,4 +1,4 @@ -iroh::discovery::static_provider - Rust

Module static_provider

Source
Expand description

A static node discovery to manually add node addressing information.

+iroh::discovery::static_provider - Rust

Module static_provider

Module static_provider 

Source
Expand description

A static node discovery to manually add node addressing information.

Often an application might get node addressing information out-of-band in an application-specific way. NodeTicket’s are one common way used to achieve this. This “static” addressing information is often only usable for a limited time so needs to diff --git a/pr/3367/docs/iroh/discovery/static_provider/struct.StaticProvider.html b/pr/3367/docs/iroh/discovery/static_provider/struct.StaticProvider.html index 123286b6de..03b77aab21 100644 --- a/pr/3367/docs/iroh/discovery/static_provider/struct.StaticProvider.html +++ b/pr/3367/docs/iroh/discovery/static_provider/struct.StaticProvider.html @@ -1,4 +1,4 @@ -StaticProvider in iroh::discovery::static_provider - Rust

Struct StaticProvider

Source
pub struct StaticProvider { /* private fields */ }
Expand description

A static node discovery to manually add node addressing information.

+StaticProvider in iroh::discovery::static_provider - Rust

StaticProvider

Struct StaticProvider 

Source
pub struct StaticProvider { /* private fields */ }
Expand description

A static node discovery to manually add node addressing information.

Often an application might get node addressing information out-of-band in an application-specific way. NodeTicket’s are one common way used to achieve this. This “static” addressing information is often only usable for a limited time so needs to @@ -6,7 +6,7 @@ be able to be removed again once know it is no longer useful.

This is where the StaticProvider is useful: it allows applications to add and retract node addressing information that is otherwise out-of-band to iroh.

§Examples

-
use iroh::{discovery::static_provider::StaticProvider, Endpoint, NodeAddr};
+
use iroh::{Endpoint, NodeAddr, discovery::static_provider::StaticProvider};
 use iroh_base::SecretKey;
 
 // Create the discovery service and endpoint.
@@ -20,25 +20,22 @@ retract node addressing information that is otherwise out-of-band to iroh.

// Sometime later add a RelayUrl for a fake NodeId. let node_id = SecretKey::from_bytes(&[0u8; 32]).public(); // Do not use fake secret keys! // You can pass either `NodeInfo` or `NodeAddr` to `add_node_info`. -discovery.add_node_info( - NodeAddr { - node_id, - relay_url: Some("https://example.com".parse()?), - direct_addresses: Default::default(), - }, -); -
-

Implementations§

Source§

impl StaticProvider

Source

pub const PROVENANCE: &'static str = "static_discovery"

The provenance string for this discovery implementation.

+discovery.add_node_info(NodeAddr { + node_id, + relay_url: Some("https://example.com".parse()?), + direct_addresses: Default::default(), +}); +

Implementations§

Source§

impl StaticProvider

Source

pub const PROVENANCE: &'static str = "static_discovery"

The provenance string for this discovery implementation.

This is mostly used for debugging information and allows understanding the origin of addressing information used by an iroh Endpoint.

-
Source

pub fn new() -> Self

Creates a new static discovery instance.

-
Source

pub fn from_node_info( +

Source

pub fn new() -> Self

Creates a new static discovery instance.

+
Source

pub fn from_node_info( infos: impl IntoIterator<Item = impl Into<NodeInfo>>, ) -> Self

Creates a static discovery instance from node addresses.

§Examples
use std::{net::SocketAddr, str::FromStr};
 
-use iroh::{discovery::static_provider::StaticProvider, Endpoint, NodeAddr};
+use iroh::{Endpoint, NodeAddr, discovery::static_provider::StaticProvider};
 
 // get addrs from somewhere
 let addrs = get_addrs();
@@ -46,22 +43,21 @@ addressing information used by an iroh // create a StaticProvider from the list of addrs.
 let discovery = StaticProvider::from_node_info(addrs);
 // create an endpoint with the discovery
-let endpoint = Endpoint::builder().add_discovery(discovery).bind().await?;
-
Source

pub fn set_node_info(&self, node_info: impl Into<NodeInfo>) -> Option<NodeData>

Sets node addressing information for the given node ID.

+let endpoint = Endpoint::builder().add_discovery(discovery).bind().await?;
Source

pub fn set_node_info(&self, node_info: impl Into<NodeInfo>) -> Option<NodeData>

Sets node addressing information for the given node ID.

This will completely overwrite any existing info for the node.

Returns the NodeData of the previous entry, or None if there was no previous entry for this node ID.

-
Source

pub fn add_node_info(&self, node_info: impl Into<NodeInfo>)

Augments node addressing information for the given node ID.

+
Source

pub fn add_node_info(&self, node_info: impl Into<NodeInfo>)

Augments node addressing information for the given node ID.

The provided addressing information is combined with the existing info in the static provider. Any new direct addresses are added to those already present while the relay URL is overwritten.

-
Source

pub fn get_node_info(&self, node_id: NodeId) -> Option<NodeInfo>

Returns node addressing information for the given node ID.

-
Source

pub fn remove_node_info(&self, node_id: NodeId) -> Option<NodeInfo>

Removes all node addressing information for the given node ID.

+
Source

pub fn get_node_info(&self, node_id: NodeId) -> Option<NodeInfo>

Returns node addressing information for the given node ID.

+
Source

pub fn remove_node_info(&self, node_id: NodeId) -> Option<NodeInfo>

Removes all node addressing information for the given node ID.

Any removed information is returned.

-

Trait Implementations§

Source§

impl Clone for StaticProvider

Source§

fn clone(&self) -> StaticProvider

Returns a copy 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 StaticProvider

Source§

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

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

impl Default for StaticProvider

Source§

fn default() -> StaticProvider

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

impl Discovery for StaticProvider

Source§

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( +

Trait Implementations§

Source§

impl Clone for StaticProvider

Source§

fn clone(&self) -> StaticProvider

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 StaticProvider

Source§

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

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

impl Default for StaticProvider

Source§

fn default() -> StaticProvider

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

impl Discovery for StaticProvider

Source§

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( &self, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. 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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -69,28 +65,35 @@ relay URL is overwritten.

class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.ConcurrentDiscovery.html b/pr/3367/docs/iroh/discovery/struct.ConcurrentDiscovery.html index bef417d7b7..e818a1c752 100644 --- a/pr/3367/docs/iroh/discovery/struct.ConcurrentDiscovery.html +++ b/pr/3367/docs/iroh/discovery/struct.ConcurrentDiscovery.html @@ -1,13 +1,18 @@ -ConcurrentDiscovery in iroh::discovery - Rust

Struct ConcurrentDiscovery

Source
pub struct ConcurrentDiscovery { /* private fields */ }
Expand description

A discovery service that combines multiple discovery sources.

+ConcurrentDiscovery in iroh::discovery - Rust

ConcurrentDiscovery

Struct ConcurrentDiscovery 

Source
pub struct ConcurrentDiscovery { /* private fields */ }
Expand description

A discovery service that combines multiple discovery sources.

The discovery services will resolve concurrently.

-

Implementations§

Source§

impl ConcurrentDiscovery

Source

pub fn empty() -> Self

Creates an empty ConcurrentDiscovery.

-
Source

pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self

Creates a new ConcurrentDiscovery.

-
Source

pub fn add(&mut self, service: impl Discovery + 'static)

Adds a Discovery service.

-

Trait Implementations§

Source§

impl Debug for ConcurrentDiscovery

Source§

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

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

impl Default for ConcurrentDiscovery

Source§

fn default() -> ConcurrentDiscovery

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

impl Discovery for ConcurrentDiscovery

Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( +

Implementations§

Source§

impl ConcurrentDiscovery

Source

pub fn empty() -> Self

Creates an empty ConcurrentDiscovery.

+
Source

pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self

Creates a new ConcurrentDiscovery.

+
Source

pub fn add(&self, service: impl Discovery + 'static)

Adds a Discovery service.

+

If there is historical discovery data, it will be published immediately on this service.

+
Source

pub fn add_boxed(&self, service: Box<dyn Discovery>)

Adds an already Boxed Discovery service.

+

If there is historical discovery data, it will be published immediately on this service.

+
Source

pub fn is_empty(&self) -> bool

Is there any services configured?

+
Source

pub fn len(&self) -> usize

How many services are configured

+

Trait Implementations§

Source§

impl Clone for ConcurrentDiscovery

Source§

fn clone(&self) -> ConcurrentDiscovery

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 ConcurrentDiscovery

Source§

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

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

impl Default for ConcurrentDiscovery

Source§

fn default() -> ConcurrentDiscovery

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

impl Discovery for ConcurrentDiscovery

Source§

fn publish(&self, data: &NodeData)

Publishes the given NodeData to the discovery mechanism. Read more
Source§

fn resolve( &self, node_id: NodeId, -) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered. Read more
Source§

impl<T> From<T> for ConcurrentDiscovery
where - T: IntoIterator<Item = Box<dyn Discovery>>,

Source§

fn from(iter: T) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId. Read more
Source§

impl<T> From<T> for ConcurrentDiscovery
where + T: IntoIterator<Item = Box<dyn Discovery>>,

Source§

fn from(iter: T) -> Self

Converts to this type from the input type.

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -15,24 +20,35 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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 +) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+
§

impl<T> FromRef<T> for T
where + T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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> IntoDiscovery for T
where - T: Discovery,

Source§

impl<T> IntoDiscovery for T
where + T: Discovery,

Source§

fn into_discovery( self, _context: &DiscoveryContext<'_>, -) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T

Turns this discovery builder into a ready-to-use discovery service. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.DiscoveryContext.html b/pr/3367/docs/iroh/discovery/struct.DiscoveryContext.html index 0718d526ed..004e97e794 100644 --- a/pr/3367/docs/iroh/discovery/struct.DiscoveryContext.html +++ b/pr/3367/docs/iroh/discovery/struct.DiscoveryContext.html @@ -1,8 +1,8 @@ -DiscoveryContext in iroh::discovery - Rust

Struct DiscoveryContext

Source
pub struct DiscoveryContext<'a> { /* private fields */ }
Expand description

Context about the Endpoint for discovery services.

-

Implementations§

Source§

impl<'a> DiscoveryContext<'a>

Source

pub fn node_id(&self) -> NodeId

Returns the NodeId of the endpoint.

-
Source

pub fn secret_key(&self) -> &SecretKey

Returns the SecretKey of the endpoint.

-
Source

pub fn dns_resolver(&self) -> &DnsResolver

Available on non-wasm_browser only.

Returns the DnsResolver used by the endpoint.

-

Trait Implementations§

Source§

impl<'a> Debug for DiscoveryContext<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DiscoveryContext<'a>

§

impl<'a> !RefUnwindSafe for DiscoveryContext<'a>

§

impl<'a> Send for DiscoveryContext<'a>

§

impl<'a> Sync for DiscoveryContext<'a>

§

impl<'a> Unpin for DiscoveryContext<'a>

§

impl<'a> !UnwindSafe for DiscoveryContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where +DiscoveryContext in iroh::discovery - Rust

DiscoveryContext

Struct DiscoveryContext 

Source
pub struct DiscoveryContext<'a> { /* private fields */ }
Expand description

Context about the Endpoint for discovery services.

+

Implementations§

Source§

impl DiscoveryContext<'_>

Source

pub fn node_id(&self) -> NodeId

Returns the NodeId of the endpoint.

+
Source

pub fn secret_key(&self) -> &SecretKey

Returns the SecretKey of the endpoint.

+
Source

pub fn dns_resolver(&self) -> &DnsResolver

Available on non-wasm_browser only.

Returns the DnsResolver used by the endpoint.

+

Trait Implementations§

Source§

impl<'a> Debug for DiscoveryContext<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for DiscoveryContext<'a>

§

impl<'a> !RefUnwindSafe for DiscoveryContext<'a>

§

impl<'a> Send for DiscoveryContext<'a>

§

impl<'a> Sync for DiscoveryContext<'a>

§

impl<'a> Unpin for DiscoveryContext<'a>

§

impl<'a> !UnwindSafe for DiscoveryContext<'a>

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -10,20 +10,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.DiscoveryItem.html b/pr/3367/docs/iroh/discovery/struct.DiscoveryItem.html index 3735ead6c4..e733f42fc7 100644 --- a/pr/3367/docs/iroh/discovery/struct.DiscoveryItem.html +++ b/pr/3367/docs/iroh/discovery/struct.DiscoveryItem.html @@ -1,28 +1,29 @@ -DiscoveryItem in iroh::discovery - Rust

Struct DiscoveryItem

Source
pub struct DiscoveryItem { /* private fields */ }
Expand description

Node discovery results from Discovery services.

-

This is the item in the streams returned from Discovery::resolve and -Discovery::subscribe. It contains the NodeData about the discovered node, +DiscoveryItem in iroh::discovery - Rust

DiscoveryItem

Struct DiscoveryItem 

Source
pub struct DiscoveryItem { /* private fields */ }
Expand description

Node discovery results from Discovery services.

+

This is the item in the streams returned from Discovery::resolve. +It contains the NodeData about the discovered node, and some additional metadata about the discovery.

This struct derefs to NodeData, so you can access the methods from NodeData directly from DiscoveryItem.

-

Implementations§

Source§

impl DiscoveryItem

Source

pub fn new( +

Implementations§

Source§

impl DiscoveryItem

Source

pub fn new( node_info: NodeInfo, provenance: &'static str, last_updated: Option<u64>, ) -> Self

Creates a new DiscoveryItem from a NodeInfo.

-
Source

pub fn node_id(&self) -> NodeId

Returns the node id of the discovered node.

-
Source

pub fn node_info(&self) -> &NodeInfo

Returns the NodeInfo for the discovered node.

-
Source

pub fn provenance(&self) -> &'static str

Returns the provenance of this discovery item.

+
Source

pub fn node_id(&self) -> NodeId

Returns the node id of the discovered node.

+
Source

pub fn node_info(&self) -> &NodeInfo

Returns the NodeInfo for the discovered node.

+
Source

pub fn provenance(&self) -> &'static str

Returns the provenance of this discovery item.

The provenance is a static string which identifies the discovery service that produced this discovery item.

-
Source

pub fn last_updated(&self) -> Option<u64>

Returns the optional timestamp when this node info was last updated.

+
Source

pub fn last_updated(&self) -> Option<u64>

Returns the optional timestamp when this node info was last updated.

The value is microseconds since the unix epoch.

-
Source

pub fn to_node_addr(&self) -> NodeAddr

Converts into a NodeAddr by cloning the needed fields.

-
Source

pub fn into_node_addr(self) -> NodeAddr

Converts into a NodeAddr without cloning.

-
Source

pub fn user_data(&self) -> Option<UserData>

Returns any user-defined data.

-

Methods from Deref<Target = NodeData>§

Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay URL of the node.

-
Source

pub fn user_data(&self) -> Option<&UserData>

Returns the optional user-defined data of the node.

-
Source

pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

Returns the direct addresses of the node.

-

Trait Implementations§

Source§

impl Clone for DiscoveryItem

Source§

fn clone(&self) -> DiscoveryItem

Returns a copy 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 DiscoveryItem

Source§

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

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

impl Deref for DiscoveryItem

Source§

type Target = NodeData

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<DiscoveryItem> for NodeInfo

Source§

fn from(item: DiscoveryItem) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Source

pub fn to_node_addr(&self) -> NodeAddr

Converts into a NodeAddr by cloning the needed fields.

+
Source

pub fn into_node_addr(self) -> NodeAddr

Converts into a NodeAddr without cloning.

+
Source

pub fn user_data(&self) -> Option<UserData>

Returns any user-defined data.

+

Methods from Deref<Target = NodeData>§

Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay URL of the node.

+
Source

pub fn user_data(&self) -> Option<&UserData>

Returns the optional user-defined data of the node.

+
Source

pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

Returns the direct addresses of the node.

+

Trait Implementations§

Source§

impl Clone for DiscoveryItem

Source§

fn clone(&self) -> DiscoveryItem

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 DiscoveryItem

Source§

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

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

impl Deref for DiscoveryItem

Source§

type Target = NodeData

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl From<DiscoveryItem> for NodeInfo

Source§

fn from(item: DiscoveryItem) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for DiscoveryItem

Source§

fn eq(&self, other: &DiscoveryItem) -> 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 Eq for DiscoveryItem

Source§

impl StructuralPartialEq for DiscoveryItem

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -30,26 +31,37 @@ this discovery item.

class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, - T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where + T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.Lagged.html b/pr/3367/docs/iroh/discovery/struct.Lagged.html deleted file mode 100644 index e30bad414d..0000000000 --- a/pr/3367/docs/iroh/discovery/struct.Lagged.html +++ /dev/null @@ -1,43 +0,0 @@ -Lagged in iroh::discovery - Rust

Struct Lagged

Source
pub struct Lagged {
-    pub val: u64,
-}
Expand description

Error returned when a discovery watch stream lagged too far behind.

-

The stream returned from Endpoint::discovery_stream yields this error -if the loop in which the stream is processed cannot keep up with the emitted -discovery events. Attempting to read the next item from the channel afterwards -will return the oldest DiscoveryItem that is still retained.

-

Includes the number of skipped messages.

-

Fields§

§val: u64

The number of skipped messages

-

Trait Implementations§

Source§

impl Debug for Lagged

Source§

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

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

impl Display for Lagged

Source§

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

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

impl Error for Lagged
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for Lagged

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where - Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, -starting with the current error -and continuing with recursive calls to Error::source. Read more

Auto Trait Implementations§

§

impl Freeze for Lagged

§

impl RefUnwindSafe for Lagged

§

impl Send for Lagged

§

impl Sync for Lagged

§

impl Unpin for Lagged

§

impl UnwindSafe for Lagged

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<T> AsErrorSource for T
where - T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method -to benefit from Rust’s automatic dereferencing of method -receivers.
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where - T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where - T: 'a,

§

fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.NodeData.html b/pr/3367/docs/iroh/discovery/struct.NodeData.html index a24a3e25c3..69399b905e 100644 --- a/pr/3367/docs/iroh/discovery/struct.NodeData.html +++ b/pr/3367/docs/iroh/discovery/struct.NodeData.html @@ -1,31 +1,31 @@ -NodeData in iroh::discovery - Rust

Struct NodeData

Source
pub struct NodeData { /* private fields */ }
Expand description

Data about a node that may be published to and resolved from discovery services.

+NodeData in iroh::discovery - Rust

NodeData

Struct NodeData 

Source
pub struct NodeData { /* private fields */ }
Expand description

Data about a node that may be published to and resolved from discovery services.

This includes an optional RelayUrl, a set of direct addresses, and the optional UserData, a string that can be set by applications and is not parsed or used by iroh itself.

This struct does not include the node’s NodeId, only the data about a certain node. See NodeInfo for a struct that contains a NodeId with associated NodeData.

-

Implementations§

Source§

impl NodeData

Source

pub fn new( +

Implementations§

Source§

impl NodeData

Source

pub fn new( relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeData

Creates a new NodeData with a relay URL and a set of direct addresses.

-
Source

pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeData

Sets the relay URL and returns the updated node data.

-
Source

pub fn with_direct_addresses( +

Source

pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeData

Sets the relay URL and returns the updated node data.

+
Source

pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeData

Sets the direct addresses and returns the updated node data.

-
Source

pub fn with_user_data(self, user_data: Option<UserData>) -> NodeData

Sets the user-defined data and returns the updated node data.

-
Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay URL of the node.

-
Source

pub fn user_data(&self) -> Option<&UserData>

Returns the optional user-defined data of the node.

-
Source

pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

Returns the direct addresses of the node.

-
Source

pub fn clear_direct_addresses(&mut self)

Removes all direct addresses from the node data.

-
Source

pub fn add_direct_addresses( +

Source

pub fn with_user_data(self, user_data: Option<UserData>) -> NodeData

Sets the user-defined data and returns the updated node data.

+
Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay URL of the node.

+
Source

pub fn user_data(&self) -> Option<&UserData>

Returns the optional user-defined data of the node.

+
Source

pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

Returns the direct addresses of the node.

+
Source

pub fn clear_direct_addresses(&mut self)

Removes all direct addresses from the node data.

+
Source

pub fn add_direct_addresses( &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

Adds direct addresses to the node data.

-
Source

pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

Sets the relay URL of the node data.

-
Source

pub fn set_user_data(&mut self, user_data: Option<UserData>)

Sets the user-defined data of the node data.

-

Trait Implementations§

Source§

impl Clone for NodeData

Source§

fn clone(&self) -> NodeData

Returns a copy 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 NodeData

Source§

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

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

impl Default for NodeData

Source§

fn default() -> NodeData

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

impl From<NodeAddr> for NodeData

Source§

fn from(node_addr: NodeAddr) -> NodeData

Converts to this type from the input type.
Source§

impl PartialEq for NodeData

Source§

fn eq(&self, other: &NodeData) -> 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 Eq for NodeData

Source§

impl StructuralPartialEq for NodeData

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Source

pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

Sets the relay URL of the node data.

+
Source

pub fn set_user_data(&mut self, user_data: Option<UserData>)

Sets the user-defined data of the node data.

+

Trait Implementations§

Source§

impl Clone for NodeData

Source§

fn clone(&self) -> NodeData

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 NodeData

Source§

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

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

impl Default for NodeData

Source§

fn default() -> NodeData

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

impl From<NodeAddr> for NodeData

Source§

fn from(node_addr: NodeAddr) -> NodeData

Converts to this type from the input type.
Source§

impl PartialEq for NodeData

Source§

fn eq(&self, other: &NodeData) -> 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 Eq for NodeData

Source§

impl StructuralPartialEq for NodeData

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -33,28 +33,35 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.NodeInfo.html b/pr/3367/docs/iroh/discovery/struct.NodeInfo.html index 69dfd8c811..1bb7d15904 100644 --- a/pr/3367/docs/iroh/discovery/struct.NodeInfo.html +++ b/pr/3367/docs/iroh/discovery/struct.NodeInfo.html @@ -1,43 +1,46 @@ -NodeInfo in iroh::discovery - Rust

Struct NodeInfo

Source
pub struct NodeInfo {
+NodeInfo in iroh::discovery - Rust

NodeInfo

Struct NodeInfo 

Source
pub struct NodeInfo {
     pub node_id: PublicKey,
     pub data: NodeData,
 }
Expand description

Information about a node that may be published to and resolved from discovery services.

This struct couples a NodeId with its associated NodeData.

Fields§

§node_id: PublicKey

The NodeId of the node this is about.

§data: NodeData

The information published about the node.

-

Implementations§

Source§

impl NodeInfo

Source

pub fn new(node_id: PublicKey) -> NodeInfo

Creates a new NodeInfo with an empty NodeData.

-
Source

pub fn from_parts(node_id: PublicKey, data: NodeData) -> NodeInfo

Creates a new NodeInfo from its parts.

-
Source

pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeInfo

Sets the relay URL and returns the updated node info.

-
Source

pub fn with_direct_addresses( +

Implementations§

Source§

impl NodeInfo

Source

pub fn new(node_id: PublicKey) -> NodeInfo

Creates a new NodeInfo with an empty NodeData.

+
Source

pub fn from_parts(node_id: PublicKey, data: NodeData) -> NodeInfo

Creates a new NodeInfo from its parts.

+
Source

pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeInfo

Sets the relay URL and returns the updated node info.

+
Source

pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeInfo

Sets the direct addresses and returns the updated node info.

-
Source

pub fn with_user_data(self, user_data: Option<UserData>) -> NodeInfo

Sets the user-defined data and returns the updated node info.

-
Source

pub fn to_node_addr(&self) -> NodeAddr

Converts into a NodeAddr by cloning the needed fields.

-
Source

pub fn into_node_addr(self) -> NodeAddr

Converts into a NodeAddr without cloning.

-
Source

pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, ParseError>

Available on non-wasm_browser only.

Parses a NodeInfo from a TXT records lookup.

-
Source

pub fn from_pkarr_signed_packet( +

Source

pub fn with_user_data(self, user_data: Option<UserData>) -> NodeInfo

Sets the user-defined data and returns the updated node info.

+
Source

pub fn to_node_addr(&self) -> NodeAddr

Converts into a NodeAddr by cloning the needed fields.

+
Source

pub fn into_node_addr(self) -> NodeAddr

Converts into a NodeAddr without cloning.

+
Source

pub fn from_txt_lookup( + domain_name: String, + lookup: impl Iterator<Item = TxtRecordData>, +) -> Result<NodeInfo, ParseError>

Parses a NodeInfo from DNS TXT lookup.

+
Source

pub fn from_pkarr_signed_packet( packet: &SignedPacket, ) -> Result<NodeInfo, ParseError>

Parses a NodeInfo from a [pkarr::SignedPacket].

-
Source

pub fn to_pkarr_signed_packet( +

Source

pub fn to_pkarr_signed_packet( &self, secret_key: &SecretKey, ttl: u32, ) -> Result<SignedPacket, EncodingError>

Creates a [pkarr::SignedPacket].

This constructs a DNS packet and signs it with a SecretKey.

-
Source

pub fn to_txt_strings(&self) -> Vec<String>

Converts into a list of {key}={value} strings.

-

Methods from Deref<Target = NodeData>§

Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay URL of the node.

-
Source

pub fn user_data(&self) -> Option<&UserData>

Returns the optional user-defined data of the node.

-
Source

pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

Returns the direct addresses of the node.

-
Source

pub fn clear_direct_addresses(&mut self)

Removes all direct addresses from the node data.

-
Source

pub fn add_direct_addresses( +

Source

pub fn to_txt_strings(&self) -> Vec<String>

Converts into a list of {key}={value} strings.

+

Methods from Deref<Target = NodeData>§

Source

pub fn relay_url(&self) -> Option<&RelayUrl>

Returns the relay URL of the node.

+
Source

pub fn user_data(&self) -> Option<&UserData>

Returns the optional user-defined data of the node.

+
Source

pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

Returns the direct addresses of the node.

+
Source

pub fn clear_direct_addresses(&mut self)

Removes all direct addresses from the node data.

+
Source

pub fn add_direct_addresses( &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

Adds direct addresses to the node data.

-
Source

pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

Sets the relay URL of the node data.

-
Source

pub fn set_user_data(&mut self, user_data: Option<UserData>)

Sets the user-defined data of the node data.

-

Trait Implementations§

Source§

impl Clone for NodeInfo

Source§

fn clone(&self) -> NodeInfo

Returns a copy 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 NodeInfo

Source§

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

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

impl Deref for NodeInfo

Source§

type Target = NodeData

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<NodeInfo as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for NodeInfo

Source§

fn deref_mut(&mut self) -> &mut <NodeInfo as Deref>::Target

Mutably dereferences the value.
Source§

impl From<&TxtAttrs<IrohAttr>> for NodeInfo

Source§

fn from(attrs: &TxtAttrs<IrohAttr>) -> NodeInfo

Converts to this type from the input type.
Source§

impl From<DiscoveryItem> for NodeInfo

Source§

fn from(item: DiscoveryItem) -> Self

Converts to this type from the input type.
Source§

impl From<NodeAddr> for NodeInfo

Source§

fn from(addr: NodeAddr) -> NodeInfo

Converts to this type from the input type.
Source§

impl From<NodeInfo> for NodeAddr

Source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<TxtAttrs<IrohAttr>> for NodeInfo

Source§

fn from(attrs: TxtAttrs<IrohAttr>) -> NodeInfo

Converts to this type from the input type.
Source§

impl PartialEq for NodeInfo

Source§

fn eq(&self, other: &NodeInfo) -> 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 Eq for NodeInfo

Source§

impl StructuralPartialEq for NodeInfo

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Source

pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

Sets the relay URL of the node data.

+
Source

pub fn set_user_data(&mut self, user_data: Option<UserData>)

Sets the user-defined data of the node data.

+

Trait Implementations§

Source§

impl Clone for NodeInfo

Source§

fn clone(&self) -> NodeInfo

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 NodeInfo

Source§

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

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

impl Deref for NodeInfo

Source§

type Target = NodeData

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<NodeInfo as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for NodeInfo

Source§

fn deref_mut(&mut self) -> &mut <NodeInfo as Deref>::Target

Mutably dereferences the value.
Source§

impl From<&TxtAttrs<IrohAttr>> for NodeInfo

Source§

fn from(attrs: &TxtAttrs<IrohAttr>) -> NodeInfo

Converts to this type from the input type.
Source§

impl From<DiscoveryItem> for NodeInfo

Source§

fn from(item: DiscoveryItem) -> Self

Converts to this type from the input type.
Source§

impl From<NodeAddr> for NodeInfo

Source§

fn from(addr: NodeAddr) -> NodeInfo

Converts to this type from the input type.
Source§

impl From<NodeInfo> for NodeAddr

Source§

fn from(value: NodeInfo) -> NodeAddr

Converts to this type from the input type.
Source§

impl From<TxtAttrs<IrohAttr>> for NodeInfo

Source§

fn from(attrs: TxtAttrs<IrohAttr>) -> NodeInfo

Converts to this type from the input type.
Source§

impl PartialEq for NodeInfo

Source§

fn eq(&self, other: &NodeInfo) -> 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 Eq for NodeInfo

Source§

impl StructuralPartialEq for NodeInfo

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -45,30 +48,37 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<P, T> Receiver for P
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, - T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where + T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/struct.UserData.html b/pr/3367/docs/iroh/discovery/struct.UserData.html index f98ebcf20c..cc7881d3d2 100644 --- a/pr/3367/docs/iroh/discovery/struct.UserData.html +++ b/pr/3367/docs/iroh/discovery/struct.UserData.html @@ -1,24 +1,24 @@ -UserData in iroh::discovery - Rust

Struct UserData

Source
pub struct UserData(/* private fields */);
Expand description

Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

+UserData in iroh::discovery - Rust

UserData

Struct UserData 

Source
pub struct UserData(/* private fields */);
Expand description

Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

Iroh does not keep track of or examine the user-defined data.

UserData implements FromStr and TryFrom<String>, so you can convert &str and String into UserData easily.

-

Implementations§

Source§

impl UserData

Source

pub const MAX_LENGTH: usize = 245usize

The max byte length allowed for user-defined data.

+

Implementations§

Source§

impl UserData

Source

pub const MAX_LENGTH: usize = 245usize

The max byte length allowed for user-defined data.

In DNS discovery services, the user-defined data is stored in a TXT record character string, which has a max length of 255 bytes. We need to subtract the user-data= prefix, which leaves 245 bytes for the actual user-defined data.

-

Trait Implementations§

Source§

impl AsRef<str> for UserData

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for UserData

Source§

fn clone(&self) -> UserData

Returns a copy 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 UserData

Source§

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

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

impl Display for UserData

Source§

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

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

impl FromStr for UserData

Source§

type Err = MaxLengthExceededError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<UserData, <UserData as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for UserData

Source§

fn hash<__H>(&self, state: &mut __H)
where +

Trait Implementations§

Source§

impl AsRef<str> for UserData

Source§

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for UserData

Source§

fn clone(&self) -> UserData

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 UserData

Source§

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

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

impl Display for UserData

Source§

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

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

impl FromStr for UserData

Source§

type Err = MaxLengthExceededError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<UserData, <UserData as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for UserData

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

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 Ord for UserData

Source§

fn cmp(&self, other: &UserData) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for UserData

Source§

fn eq(&self, other: &UserData) -> 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 PartialOrd for UserData

Source§

fn partial_cmp(&self, other: &UserData) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
Source§

impl TryFrom<String> for UserData

Source§

type Error = MaxLengthExceededError

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

fn try_from( + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for UserData

Source§

fn cmp(&self, other: &UserData) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for UserData

Source§

fn eq(&self, other: &UserData) -> 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 PartialOrd for UserData

Source§

fn partial_cmp(&self, other: &UserData) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl TryFrom<String> for UserData

Source§

type Error = MaxLengthExceededError

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

fn try_from( value: String, -) -> Result<UserData, <UserData as TryFrom<String>>::Error>

Performs the conversion.
Source§

impl Eq for UserData

Source§

impl StructuralPartialEq for UserData

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T

Performs the conversion.
Source§

impl Eq for UserData

Source§

impl StructuralPartialEq for UserData

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -26,31 +26,40 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<Q, K> Comparable<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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> Comparable<K> for Q
where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/trait.Discovery.html b/pr/3367/docs/iroh/discovery/trait.Discovery.html index dd27f88c9c..ec322b3853 100644 --- a/pr/3367/docs/iroh/discovery/trait.Discovery.html +++ b/pr/3367/docs/iroh/discovery/trait.Discovery.html @@ -1,4 +1,4 @@ -Discovery in iroh::discovery - Rust

Trait Discovery

Source
pub trait Discovery:
+Discovery in iroh::discovery - Rust

Discovery

Trait Discovery 

Source
pub trait Discovery:
     Debug
     + Send
     + Sync
@@ -9,7 +9,6 @@
         &self,
         _node_id: NodeId,
     ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> { ... }
-    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>> { ... }
 }
Expand description

Node discovery for super::Endpoint.

This trait defines publishing and resolving addressing information for a NodeId. This enables connecting to other nodes with only knowing the NodeId, by using this @@ -21,32 +20,18 @@ addresses. See super::Endpoint will call publish whenever discovery information changes. If a discovery mechanism requires a periodic refresh, it should start its own task.

-

Provided Methods§

Source

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism.

+

Provided Methods§

Source

fn publish(&self, _data: &NodeData)

Publishes the given NodeData to the discovery mechanism.

This is fire and forget, since the Endpoint can not wait for successful publishing. If publishing is async, the implementation should start it’s own task.

This will be called from a tokio task, so it is safe to spawn new tasks. These tasks will be run on the runtime of the super::Endpoint.

-
Source

fn resolve( +

Source

fn resolve( &self, _node_id: NodeId, ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Resolves the DiscoveryItem for the given NodeId.

Once the returned [BoxStream] is dropped, the service should stop any pending work.

-
Source

fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>>

Subscribe to all addresses that get passively discovered.

-

An implementation may choose to defer emitting passively discovered nodes -until the stream is actually polled. To avoid missing discovered nodes, -poll the stream as soon as possible.

-

If you do not regularly poll the stream, you may miss discovered nodes.

-

Any discovery systems that only discover when explicitly resolving a -specific NodeId do not need to implement this method. Any nodes or -addresses that are discovered by calling resolve should NOT be added -to the subscribe stream.

-

Discovery systems that are capable of receiving information about NodeIds -and their addressing information without explicitly calling resolve, i.e., -systems that do “passive” discovery, should implement this method. If -subscribe is called multiple times, the passively discovered addresses -should be sent on all streams.

-

The crate::endpoint::Endpoint will subscribe to the discovery system -and add the discovered addresses to the internal address book as they arrive -on this stream.

-

Implementations on Foreign Types§

Source§

impl<T: Discovery> Discovery for Arc<T>

Implementors§

Source§

impl Discovery for DnsDiscovery

Available on non-wasm_browser only.
Source§

impl Discovery for MdnsDiscovery

Available on crate feature discovery-local-network only.
Source§

impl Discovery for DhtDiscovery

Available on crate feature discovery-pkarr-dht only.
Source§

impl Discovery for PkarrPublisher

Source§

impl Discovery for PkarrResolver

Source§

impl Discovery for StaticProvider

Source§

impl Discovery for ConcurrentDiscovery

\ No newline at end of file +

Implementations on Foreign Types§

Source§

impl<T: Discovery> Discovery for Arc<T>

Source§

fn publish(&self, data: &NodeData)

Source§

fn resolve( + &self, + node_id: NodeId, +) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>>

Implementors§

Source§

impl Discovery for DnsDiscovery

Available on non-wasm_browser only.
Source§

impl Discovery for MdnsDiscovery

Available on crate feature discovery-local-network only.
Source§

impl Discovery for DhtDiscovery

Available on crate feature discovery-pkarr-dht only.
Source§

impl Discovery for PkarrPublisher

Source§

impl Discovery for PkarrResolver

Source§

impl Discovery for StaticProvider

Source§

impl Discovery for ConcurrentDiscovery

\ No newline at end of file diff --git a/pr/3367/docs/iroh/discovery/trait.IntoDiscovery.html b/pr/3367/docs/iroh/discovery/trait.IntoDiscovery.html index 79c4a5b954..c05b07bec2 100644 --- a/pr/3367/docs/iroh/discovery/trait.IntoDiscovery.html +++ b/pr/3367/docs/iroh/discovery/trait.IntoDiscovery.html @@ -1,4 +1,4 @@ -IntoDiscovery in iroh::discovery - Rust

Trait IntoDiscovery

Source
pub trait IntoDiscovery:
+IntoDiscovery in iroh::discovery - Rust

IntoDiscovery

Trait IntoDiscovery 

Source
pub trait IntoDiscovery:
     Send
     + Sync
     + Debug
@@ -15,7 +15,7 @@ trait can be added as a discovery service in DiscoveryContext parameter to IntoDiscovery::into_discovery.

-

Required Methods§

Required Methods§

Source

fn into_discovery( self, context: &DiscoveryContext<'_>, ) -> Result<impl Discovery, IntoDiscoveryError>

Turns this discovery builder into a ready-to-use discovery service.

@@ -23,5 +23,5 @@ creation via the 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 IntoDiscovery for DnsDiscoveryBuilder

Available on non-wasm_browser only.
Source§

impl IntoDiscovery for MdnsDiscoveryBuilder

Available on crate feature discovery-local-network only.
Source§

impl IntoDiscovery for Builder

Available on crate feature discovery-pkarr-dht only.
Source§

impl IntoDiscovery for PkarrPublisherBuilder

Source§

impl IntoDiscovery for PkarrResolverBuilder

Source§

impl<T: Discovery> IntoDiscovery for T

Blanket no-op impl of IntoDiscovery for T: Discovery.

+

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 IntoDiscovery for DnsDiscoveryBuilder

Available on non-wasm_browser only.
Source§

impl IntoDiscovery for MdnsDiscoveryBuilder

Available on crate feature discovery-local-network only.
Source§

impl IntoDiscovery for Builder

Available on crate feature discovery-pkarr-dht only.
Source§

impl IntoDiscovery for PkarrPublisherBuilder

Source§

impl IntoDiscovery for PkarrResolverBuilder

Source§

impl<T: Discovery> IntoDiscovery for T

Blanket no-op impl of IntoDiscovery for T: Discovery.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html index 7d9e6259b9..6343ce669c 100644 --- a/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html +++ b/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html @@ -1,2 +1,2 @@ -N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust

Constant N0_DNS_NODE_ORIGIN_PROD

Source
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for production.

+N0_DNS_NODE_ORIGIN_PROD in iroh::dns - Rust

N0_DNS_NODE_ORIGIN_PROD

Constant N0_DNS_NODE_ORIGIN_PROD 

Source
pub const N0_DNS_NODE_ORIGIN_PROD: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for production.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html index 22ff3e16c3..1f09537f11 100644 --- a/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html +++ b/pr/3367/docs/iroh/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html @@ -1,2 +1,2 @@ -N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust

Constant N0_DNS_NODE_ORIGIN_STAGING

Source
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for testing.

+N0_DNS_NODE_ORIGIN_STAGING in iroh::dns - Rust

N0_DNS_NODE_ORIGIN_STAGING

Constant N0_DNS_NODE_ORIGIN_STAGING 

Source
pub const N0_DNS_NODE_ORIGIN_STAGING: &'static str;
Available on non-wasm_browser only.
Expand description

The n0 testing DNS node origin, for testing.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/dns/index.html b/pr/3367/docs/iroh/dns/index.html index 63efcf3946..757882a78f 100644 --- a/pr/3367/docs/iroh/dns/index.html +++ b/pr/3367/docs/iroh/dns/index.html @@ -1,4 +1,4 @@ -iroh::dns - Rust

Module dns

Source
Available on non-wasm_browser only.
Expand description

This module exports a DNS resolver, which is also the default resolver used in the +iroh::dns - Rust

Module dns

Module dns 

Source
Available on non-wasm_browser only.
Expand description

This module exports a DNS resolver, which is also the default resolver used in the crate::Endpoint if no custom resolver is configured.

The resolver provides methods to resolve domain names to ipv4 and ipv6 addresses, and to resolve node ids to node addresses.

diff --git a/pr/3367/docs/iroh/dns/struct.DnsResolver.html b/pr/3367/docs/iroh/dns/struct.DnsResolver.html index da96861b29..ef0ad46aea 100644 --- a/pr/3367/docs/iroh/dns/struct.DnsResolver.html +++ b/pr/3367/docs/iroh/dns/struct.DnsResolver.html @@ -1,104 +1,111 @@ -DnsResolver in iroh::dns - Rust

Struct DnsResolver

Source
pub struct DnsResolver { /* private fields */ }
Available on non-wasm_browser only.
Expand description

The DNS resolver used throughout iroh.

-

Implementations§

Source§

impl DnsResolver

Source

pub fn new() -> DnsResolver

Create a new DNS resolver with sensible cross-platform defaults.

+DnsResolver in iroh::dns - Rust

DnsResolver

Struct DnsResolver 

Source
pub struct DnsResolver(/* private fields */);
Available on non-wasm_browser only.
Expand description

The DNS resolver used throughout iroh.

+

Implementations§

Source§

impl DnsResolver

Source

pub fn new() -> DnsResolver

Creates a new DNS resolver with sensible cross-platform defaults.

We first try to read the system’s resolver from /etc/resolv.conf. This does not work at least on some Androids, therefore we fallback to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.

-
Source

pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver

Create a new DNS resolver configured with a single UDP DNS nameserver.

-
Source

pub async fn clear_cache(&self)

Removes all entries from the cache.

-
Source

pub async fn reset(&self)

Recreate the inner resolver

-
Source

pub async fn lookup_txt( +

Source

pub fn with_nameserver(nameserver: SocketAddr) -> DnsResolver

Creates a new DNS resolver configured with a single UDP DNS nameserver.

+
Source

pub fn builder() -> Builder

Creates a builder to construct a DNS resolver with custom options.

+
Source

pub fn custom(resolver: impl Resolver) -> DnsResolver

Creates a new DnsResolver from a struct that implements Resolver.

+

If you need more customization for DNS resolving than the Builder allows, you can +implement the Resolver trait on a struct and implement DNS resolution +however you see fit.

+
Source

pub async fn clear_cache(&self)

Removes all entries from the cache.

+
Source

pub async fn reset(&self)

Recreates the inner resolver.

+
Source

pub async fn lookup_txt<T>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<TxtLookup, DnsError>

Lookup a TXT record.

-
Source

pub async fn lookup_ipv4( +) -> Result<impl Iterator<Item = TxtRecordData>, DnsError>
where + T: ToString,

Looks up a TXT record.

+
Source

pub async fn lookup_ipv4<T>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<impl Iterator<Item = IpAddr>, DnsError>

Perform an ipv4 lookup with a timeout.

-
Source

pub async fn lookup_ipv6( +) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>
where + T: ToString,

Performs an IPv4 lookup with a timeout.

+
Source

pub async fn lookup_ipv6<T>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<impl Iterator<Item = IpAddr>, DnsError>

Perform an ipv6 lookup with a timeout.

-
Source

pub async fn lookup_ipv4_ipv6( +) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>
where + T: ToString,

Performs an IPv6 lookup with a timeout.

+
Source

pub async fn lookup_ipv4_ipv6<T>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<impl Iterator<Item = IpAddr>, DnsError>

Resolve IPv4 and IPv6 in parallel with a timeout.

+) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>
where + T: ToString,

Resolves IPv4 and IPv6 in parallel with a timeout.

LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is not usable on the stack, so we manually query both lookups concurrently and time them out individually.

-
Source

pub async fn resolve_host( +

Source

pub async fn resolve_host( &self, - url: &Url, + url: &Url, prefer_ipv6: bool, timeout: Duration, -) -> Result<IpAddr, DnsError>

Resolve a hostname from a URL to an IP address.

-
Source

pub async fn lookup_ipv4_staggered( +) -> Result<IpAddr, DnsError>

Resolves a hostname from a URL to an IP address.

+
Source

pub async fn lookup_ipv4_staggered( &self, host: impl ToString, timeout: Duration, delays_ms: &[u64], -) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

Perform an ipv4 lookup with a timeout in a staggered fashion.

+) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

Performs an IPv4 lookup with a timeout in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The result of the first successful call is returned, or a summary of all errors otherwise.

-
Source

pub async fn lookup_ipv6_staggered( +

Source

pub async fn lookup_ipv6_staggered( &self, host: impl ToString, timeout: Duration, delays_ms: &[u64], -) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

Perform an ipv6 lookup with a timeout in a staggered fashion.

+) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

Performs an IPv6 lookup with a timeout in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The result of the first successful call is returned, or a summary of all errors otherwise.

-
Source

pub async fn lookup_ipv4_ipv6_staggered( +

Source

pub async fn lookup_ipv4_ipv6_staggered( &self, host: impl ToString, timeout: Duration, delays_ms: &[u64], -) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.

+) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

Races an IPv4 and IPv6 lookup with a timeout in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a summary of all errors otherwise.

-
Source

pub async fn lookup_node_by_id( +

Source

pub async fn lookup_node_by_id( &self, node_id: &PublicKey, origin: &str, -) -> Result<NodeInfo, LookupError>

Looks up node info by NodeId and origin domain name.

+) -> Result<NodeInfo, LookupError>

Looks up node info by NodeId and origin domain name.

To lookup nodes that published their node info to the DNS servers run by n0, pass N0_DNS_NODE_ORIGIN_PROD as origin.

-
Source

pub async fn lookup_node_by_domain_name( +

Source

pub async fn lookup_node_by_domain_name( &self, name: &str, -) -> Result<NodeInfo, LookupError>

Looks up node info by DNS name.

-
Source

pub async fn lookup_node_by_domain_name_staggered( +) -> Result<NodeInfo, LookupError>

Looks up node info by DNS name.

+
Source

pub async fn lookup_node_by_domain_name_staggered( &self, name: &str, delays_ms: &[u64], -) -> Result<NodeInfo, StaggeredError<LookupError>>

Looks up node info by DNS name in a staggered fashion.

+) -> Result<NodeInfo, StaggeredError<LookupError>>

Looks up node info by DNS name in a staggered fashion.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a summary of all errors otherwise.

-
Source

pub async fn lookup_node_by_id_staggered( +

Source

pub async fn lookup_node_by_id_staggered( &self, node_id: &PublicKey, origin: &str, delays_ms: &[u64], -) -> Result<NodeInfo, StaggeredError<LookupError>>

Looks up node info by NodeId and origin domain name.

+) -> Result<NodeInfo, StaggeredError<LookupError>>

Looks up node info by NodeId and origin domain name.

From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a summary of all errors otherwise.

-

Trait Implementations§

Source§

impl Clone for DnsResolver

Source§

fn clone(&self) -> DnsResolver

Returns a copy 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 DnsResolver

Source§

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

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

impl Default for DnsResolver

Source§

fn default() -> DnsResolver

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

impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver

Source§

fn from( - resolver: Resolver<GenericConnector<TokioRuntimeProvider>>, -) -> DnsResolver

Converts to this type from the input type.
Source§

impl Resolve for DnsResolver

Trait Implementations§

Source§

impl Clone for DnsResolver

Source§

fn clone(&self) -> DnsResolver

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 DnsResolver

Source§

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

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

impl Default for DnsResolver

Source§

fn default() -> DnsResolver

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

impl Resolve for DnsResolver

Source§

fn resolve( &self, name: Name, ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = SocketAddr> + Send>, Box<dyn Error + Send + Sync>>> + Send>>

Performs DNS resolution on a Name. @@ -110,24 +117,31 @@ The return type is a future containing an iterator of SocketAddr. < class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html b/pr/3367/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html index 53813d6e41..def0f1d760 100644 --- a/pr/3367/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html +++ b/pr/3367/docs/iroh/endpoint/constant.ENV_FORCE_STAGING_RELAYS.html @@ -1,2 +1,2 @@ -ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust

Constant ENV_FORCE_STAGING_RELAYS

Source
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description

Environment variable to force the use of staging relays.

+ENV_FORCE_STAGING_RELAYS in iroh::endpoint - Rust

ENV_FORCE_STAGING_RELAYS

Constant ENV_FORCE_STAGING_RELAYS 

Source
pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
Expand description

Environment variable to force the use of staging relays.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.AddNodeAddrError.html b/pr/3367/docs/iroh/endpoint/enum.AddNodeAddrError.html index 9840f4e948..c033a1f4d5 100644 --- a/pr/3367/docs/iroh/endpoint/enum.AddNodeAddrError.html +++ b/pr/3367/docs/iroh/endpoint/enum.AddNodeAddrError.html @@ -1,4 +1,4 @@ -AddNodeAddrError in iroh::endpoint - Rust

Enum AddNodeAddrError

Source
#[non_exhaustive]
pub enum AddNodeAddrError { +AddNodeAddrError in iroh::endpoint - Rust

AddNodeAddrError

Enum AddNodeAddrError 

Source
#[non_exhaustive]
pub enum AddNodeAddrError { Empty { backtrace: Option<Backtrace>, span_trace: SpanTrace, @@ -12,11 +12,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Empty

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

EmptyPruned

Fields

§pruned: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

OwnAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for AddNodeAddrError

Source§

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

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

impl Display for AddNodeAddrError

Source§

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

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

impl Error for AddNodeAddrError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for AddNodeAddrError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Empty

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

EmptyPruned

Fields

§pruned: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

OwnAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for AddNodeAddrError

Source§

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

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

impl Display for AddNodeAddrError

Source§

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

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

impl Error for AddNodeAddrError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for AddNodeAddrError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<AddNodeAddrError> for ConnectWithOptsError

Source§

fn from(error: AddNodeAddrError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<AddNodeAddrError> for ConnectWithOptsError

Source§

fn from(error: AddNodeAddrError) -> Self

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -27,22 +27,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.AlpnError.html b/pr/3367/docs/iroh/endpoint/enum.AlpnError.html index b0e0a97b3f..ed6382823d 100644 --- a/pr/3367/docs/iroh/endpoint/enum.AlpnError.html +++ b/pr/3367/docs/iroh/endpoint/enum.AlpnError.html @@ -1,4 +1,4 @@ -AlpnError in iroh::endpoint - Rust

Enum AlpnError

Source
#[non_exhaustive]
pub enum AlpnError { +AlpnError in iroh::endpoint - Rust

AlpnError

Enum AlpnError 

Source
#[non_exhaustive]
pub enum AlpnError { ConnectionError { source: ConnectionError, backtrace: Option<Backtrace>, @@ -12,11 +12,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ConnectionError

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Unavailable

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

UnknownHandshake

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for AlpnError

Source§

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

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

impl Display for AlpnError

Source§

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

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

impl Error for AlpnError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for AlpnError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ConnectionError

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Unavailable

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

UnknownHandshake

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for AlpnError

Source§

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

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

impl Display for AlpnError

Source§

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

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

impl Error for AlpnError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for AlpnError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<ConnectionError> for AlpnError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<ConnectionError> for AlpnError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -27,22 +27,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.BindError.html b/pr/3367/docs/iroh/endpoint/enum.BindError.html index 3dd45fcbef..2aaf3fd504 100644 --- a/pr/3367/docs/iroh/endpoint/enum.BindError.html +++ b/pr/3367/docs/iroh/endpoint/enum.BindError.html @@ -1,19 +1,14 @@ -BindError in iroh::endpoint - Rust

Enum BindError

Source
#[non_exhaustive]
pub enum BindError { +BindError in iroh::endpoint - Rust

BindError

Enum BindError 

Source
#[non_exhaustive]
pub enum BindError { MagicSpawn { source: CreateHandleError, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, - Discovery { - source: IntoDiscoveryError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MagicSpawn

Fields

§source: CreateHandleError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Discovery

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for BindError

Source§

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

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

impl Display for BindError

Source§

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

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

impl Error for BindError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for BindError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MagicSpawn

Fields

§source: CreateHandleError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for BindError

Source§

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

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

impl Display for BindError

Source§

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

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

impl Error for BindError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for BindError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<IntoDiscoveryError> for BindError

Source§

fn from(error: IntoDiscoveryError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. 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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -24,22 +19,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ConnectError.html b/pr/3367/docs/iroh/endpoint/enum.ConnectError.html index aabd197908..9389c90fee 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ConnectError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ConnectError.html @@ -1,4 +1,4 @@ -ConnectError in iroh::endpoint - Rust

Enum ConnectError

Source
#[non_exhaustive]
pub enum ConnectError { +ConnectError in iroh::endpoint - Rust

ConnectError

Enum ConnectError 

Source
#[non_exhaustive]
pub enum ConnectError { Connect { source: Box<ConnectWithOptsError>, backtrace: Option<Backtrace>, @@ -9,11 +9,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Connect

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Connection

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for ConnectError

Source§

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

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

impl Display for ConnectError

Source§

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

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

impl Error for ConnectError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for ConnectError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Connect

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Connection

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for ConnectError

Source§

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

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

impl Display for ConnectError

Source§

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

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

impl Error for ConnectError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for ConnectError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<ConnectWithOptsError> for ConnectError

Source§

fn from(error: ConnectWithOptsError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for ConnectError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<ConnectWithOptsError> for ConnectError

Source§

fn from(error: ConnectWithOptsError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for ConnectError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -24,22 +24,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ConnectWithOptsError.html b/pr/3367/docs/iroh/endpoint/enum.ConnectWithOptsError.html index 22e369eb62..fd0afb3a21 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ConnectWithOptsError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ConnectWithOptsError.html @@ -1,4 +1,4 @@ -ConnectWithOptsError in iroh::endpoint - Rust

Enum ConnectWithOptsError

Source
#[non_exhaustive]
pub enum ConnectWithOptsError { +ConnectWithOptsError in iroh::endpoint - Rust

ConnectWithOptsError

Enum ConnectWithOptsError 

Source
#[non_exhaustive]
pub enum ConnectWithOptsError { AddNodeAddr { source: AddNodeAddrError, backtrace: Option<Backtrace>, @@ -18,11 +18,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AddNodeAddr

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

SelfConnect

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NoAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Quinn

Fields

§source: ConnectError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for ConnectWithOptsError

Source§

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

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

impl Display for ConnectWithOptsError

Source§

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

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

impl Error for ConnectWithOptsError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for ConnectWithOptsError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

AddNodeAddr

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

SelfConnect

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NoAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Quinn

Fields

§source: ConnectError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for ConnectWithOptsError

Source§

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

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

impl Display for ConnectWithOptsError

Source§

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

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

impl Error for ConnectWithOptsError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for ConnectWithOptsError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<AddNodeAddrError> for ConnectWithOptsError

Source§

fn from(error: AddNodeAddrError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectWithOptsError> for ConnectError

Source§

fn from(error: ConnectWithOptsError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<AddNodeAddrError> for ConnectWithOptsError

Source§

fn from(error: AddNodeAddrError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectWithOptsError> for ConnectError

Source§

fn from(error: ConnectWithOptsError) -> Self

Converts to this type from the input type.

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -33,22 +33,31 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ConnectionError.html b/pr/3367/docs/iroh/endpoint/enum.ConnectionError.html index 8f000da4e4..db73223ef1 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ConnectionError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ConnectionError.html @@ -1,4 +1,4 @@ -ConnectionError in iroh::endpoint - Rust

Enum ConnectionError

pub enum ConnectionError {
+ConnectionError in iroh::endpoint - Rust

ConnectionError

Enum ConnectionError 

pub enum ConnectionError {
     VersionMismatch,
     TransportError(Error),
     ConnectionClosed(ConnectionClose),
@@ -20,7 +20,7 @@ and §

LocallyClosed

The local application closed the connection

§

CidsExhausted

The connection could not be created because not enough of the CID space is available

Try using longer connection IDs.

-

Trait Implementations§

§

impl Clone for ConnectionError

§

fn clone(&self) -> ConnectionError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for ConnectionError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ConnectionError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ConnectionError

§

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
§

impl From<Close> for ConnectionError

§

fn from(x: Close) -> ConnectionError

Converts to this type from the input type.
Source§

impl From<ConnectionError> for AcceptError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for AlpnError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for ConnectError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ConnectionError> for ResetError

§

fn from(source: ConnectionError) -> ResetError

Converts to this type from the input type.
§

impl From<ConnectionError> for SendDatagramError

§

fn from(source: ConnectionError) -> SendDatagramError

Converts to this type from the input type.
§

impl From<ConnectionError> for StoppedError

§

fn from(source: ConnectionError) -> StoppedError

Converts to this type from the input type.
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<Error> for ConnectionError

§

fn from(source: Error) -> ConnectionError

Converts to this type from the input type.
§

impl PartialEq for ConnectionError

§

fn eq(&self, other: &ConnectionError) -> 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, +

Trait Implementations§

§

impl Clone for ConnectionError

§

fn clone(&self) -> ConnectionError

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
§

impl Debug for ConnectionError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ConnectionError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ConnectionError

§

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
§

impl From<Close> for ConnectionError

§

fn from(x: Close) -> ConnectionError

Converts to this type from the input type.
Source§

impl From<ConnectionError> for AcceptError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for AlpnError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.
Source§

impl From<ConnectionError> for ConnectError

Source§

fn from(error: ConnectionError) -> Self

Converts to this type from the input type.
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ConnectionError> for ResetError

§

fn from(source: ConnectionError) -> ResetError

Converts to this type from the input type.
§

impl From<ConnectionError> for SendDatagramError

§

fn from(source: ConnectionError) -> SendDatagramError

Converts to this type from the input type.
§

impl From<ConnectionError> for StoppedError

§

fn from(source: ConnectionError) -> StoppedError

Converts to this type from the input type.
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<Error> for ConnectionError

§

fn from(source: Error) -> ConnectionError

Converts to this type from the input type.
§

impl PartialEq for ConnectionError

§

fn eq(&self, other: &ConnectionError) -> 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.
§

impl Eq for ConnectionError

§

impl StructuralPartialEq for ConnectionError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -32,30 +32,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ConnectionType.html b/pr/3367/docs/iroh/endpoint/enum.ConnectionType.html index c0f7105ce4..b4bf3d5e02 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ConnectionType.html +++ b/pr/3367/docs/iroh/endpoint/enum.ConnectionType.html @@ -1,4 +1,4 @@ -ConnectionType in iroh::endpoint - Rust

Enum ConnectionType

Source
pub enum ConnectionType {
+ConnectionType in iroh::endpoint - Rust

ConnectionType

Enum ConnectionType 

Source
pub enum ConnectionType {
     Direct(SocketAddr),
     Relay(RelayUrl),
     Mixed(SocketAddr, RelayUrl),
@@ -10,10 +10,10 @@
 

This is the case if we do have a UDP address, but are missing a recent confirmation that the address works.

§

None

We have no verified connection to this PublicKey

-

Trait Implementations§

Source§

impl Clone for ConnectionType

Source§

fn clone(&self) -> ConnectionType

Returns a copy 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 ConnectionType

Source§

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

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

impl Default for ConnectionType

Source§

fn default() -> ConnectionType

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

impl<'de> Deserialize<'de> for ConnectionType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ConnectionType

Source§

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

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

impl PartialEq for ConnectionType

Source§

fn eq(&self, other: &ConnectionType) -> 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 Serialize for ConnectionType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ConnectionType

Source§

impl StructuralPartialEq for ConnectionType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

Source§

impl Clone for ConnectionType

Source§

fn clone(&self) -> ConnectionType

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 ConnectionType

Source§

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

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

impl Default for ConnectionType

Source§

fn default() -> ConnectionType

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

impl<'de> Deserialize<'de> for ConnectionType

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ConnectionType

Source§

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

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

impl PartialEq for ConnectionType

Source§

fn eq(&self, other: &ConnectionType) -> 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 Serialize for ConnectionType

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for ConnectionType

Source§

impl StructuralPartialEq for ConnectionType

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -21,30 +21,39 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file +[WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where + T: 'static,

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ControlMsg.html b/pr/3367/docs/iroh/endpoint/enum.ControlMsg.html index 14c3426cb2..e91444343c 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ControlMsg.html +++ b/pr/3367/docs/iroh/endpoint/enum.ControlMsg.html @@ -1,4 +1,4 @@ -ControlMsg in iroh::endpoint - Rust

Enum ControlMsg

Source
pub enum ControlMsg {
+ControlMsg in iroh::endpoint - Rust

ControlMsg

Enum ControlMsg 

Source
pub enum ControlMsg {
     Ping,
     Pong,
     CallMeMaybe,
@@ -6,10 +6,10 @@
 

Variants§

§

Ping

We received a Ping from the node.

§

Pong

We received a Pong from the node.

§

CallMeMaybe

We received a CallMeMaybe.

-

Trait Implementations§

Source§

impl Clone for ControlMsg

Source§

fn clone(&self) -> ControlMsg

Returns a copy 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 ControlMsg

Source§

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

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

impl<'de> Deserialize<'de> for ControlMsg

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ControlMsg

Source§

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

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

impl PartialEq for ControlMsg

Source§

fn eq(&self, other: &ControlMsg) -> 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 Serialize for ControlMsg

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for ControlMsg

Source§

impl Eq for ControlMsg

Source§

impl StructuralPartialEq for ControlMsg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

Source§

impl Clone for ControlMsg

Source§

fn clone(&self) -> ControlMsg

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 ControlMsg

Source§

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

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

impl<'de> Deserialize<'de> for ControlMsg

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ControlMsg

Source§

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

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

impl PartialEq for ControlMsg

Source§

fn eq(&self, other: &ControlMsg) -> 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 Serialize for ControlMsg

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for ControlMsg

Source§

impl Eq for ControlMsg

Source§

impl StructuralPartialEq for ControlMsg

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -17,30 +17,39 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file +[WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where + T: 'static,

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3367/docs/iroh/endpoint/enum.DirectAddrType.html index ea0d75e741..0111473504 100644 --- a/pr/3367/docs/iroh/endpoint/enum.DirectAddrType.html +++ b/pr/3367/docs/iroh/endpoint/enum.DirectAddrType.html @@ -1,4 +1,4 @@ -DirectAddrType in iroh::endpoint - Rust

Enum DirectAddrType

Source
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust

DirectAddrType

Enum DirectAddrType 

Source
pub enum DirectAddrType {
     Unknown,
     Local,
     Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.

It is possible to configure iroh to bound to a specific port and independently configure the router to forward this port to the iroh node. This indicates a situation like this, which still uses QAD to discover the public address.

-

Trait Implementations§

Source§

impl Clone for DirectAddrType

Source§

fn clone(&self) -> DirectAddrType

Returns a copy 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 DirectAddrType

Source§

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

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

impl Display for DirectAddrType

Source§

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

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

impl Hash for DirectAddrType

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 +

Trait Implementations§

Source§

impl Clone for DirectAddrType

Source§

fn clone(&self) -> DirectAddrType

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 DirectAddrType

Source§

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

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

impl Display for DirectAddrType

Source§

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

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

impl Hash for DirectAddrType

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 Ord for DirectAddrType

Source§

fn cmp(&self, other: &DirectAddrType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where - Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DirectAddrType

Source§

fn eq(&self, other: &DirectAddrType) -> 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 PartialOrd for DirectAddrType

Source§

fn partial_cmp(&self, other: &DirectAddrType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > -operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
Source§

impl Copy for DirectAddrType

Source§

impl Eq for DirectAddrType

Source§

impl StructuralPartialEq for DirectAddrType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for DirectAddrType

Source§

fn cmp(&self, other: &DirectAddrType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where + Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where + Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DirectAddrType

Source§

fn eq(&self, other: &DirectAddrType) -> 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 PartialOrd for DirectAddrType

Source§

fn partial_cmp(&self, other: &DirectAddrType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > +operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
Source§

impl Copy for DirectAddrType

Source§

impl Eq for DirectAddrType

Source§

impl StructuralPartialEq for DirectAddrType

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -37,32 +37,41 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

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, dst: *mut u8)

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

impl<Q, K> Comparable<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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> Comparable<K> for Q
where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where + K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

Source§

impl<T> RuleType for T
where + T: 'static,

Source§

impl<T> RuleType for T
where T: Copy + Debug + Eq + Hash + Ord,

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.GetMappingAddressError.html b/pr/3367/docs/iroh/endpoint/enum.GetMappingAddressError.html index 0d075b6bdb..f4330c6c5f 100644 --- a/pr/3367/docs/iroh/endpoint/enum.GetMappingAddressError.html +++ b/pr/3367/docs/iroh/endpoint/enum.GetMappingAddressError.html @@ -1,4 +1,4 @@ -GetMappingAddressError in iroh::endpoint - Rust

Enum GetMappingAddressError

Source
#[non_exhaustive]
pub enum GetMappingAddressError { +GetMappingAddressError in iroh::endpoint - Rust

GetMappingAddressError

Enum GetMappingAddressError 

Source
#[non_exhaustive]
pub enum GetMappingAddressError { DiscoveryStart { source: DiscoveryError, backtrace: Option<Backtrace>, @@ -13,8 +13,8 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

DiscoveryStart

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Discover

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NoAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for GetMappingAddressError

Source§

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

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

impl Display for GetMappingAddressError

Source§

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

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

impl Error for GetMappingAddressError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for GetMappingAddressError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

DiscoveryStart

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Discover

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

NoAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for GetMappingAddressError

Source§

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

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

impl Display for GetMappingAddressError

Source§

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

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

impl Error for GetMappingAddressError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

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

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

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

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

Returns the lower-level source of this error, if any. Read more
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
Source§

impl ErrorCompat for GetMappingAddressError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where @@ -28,22 +28,31 @@ receivers.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+) -> TaggedParser<'a, Implicit, Self, E>
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
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. 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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.PathSelection.html b/pr/3367/docs/iroh/endpoint/enum.PathSelection.html index 7c0c3102f5..bf980bf89f 100644 --- a/pr/3367/docs/iroh/endpoint/enum.PathSelection.html +++ b/pr/3367/docs/iroh/endpoint/enum.PathSelection.html @@ -1,12 +1,12 @@ -PathSelection in iroh::endpoint - Rust

Enum PathSelection

Source
pub enum PathSelection {
+PathSelection in iroh::endpoint - Rust

PathSelection

Enum PathSelection 

Source
pub enum PathSelection {
     All,
     RelayOnly,
-}
Available on crate feature test-utils only.
Expand description

Defines the mode of path selection for all traffic flowing through +}

Available on crate features test-utils only.
Expand description

Defines the mode of path selection for all traffic flowing through the endpoint.

Variants§

§

All

Uses all available paths

§

RelayOnly

Forces all traffic to go exclusively through relays

-

Trait Implementations§

Source§

impl Clone for PathSelection

Source§

fn clone(&self) -> PathSelection

Returns a copy 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 PathSelection

Source§

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

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

impl Default for PathSelection

Source§

fn default() -> PathSelection

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

impl PartialEq for PathSelection

Source§

fn eq(&self, other: &PathSelection) -> 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 Copy for PathSelection

Source§

impl Eq for PathSelection

Source§

impl StructuralPartialEq for PathSelection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Trait Implementations§

Source§

impl Clone for PathSelection

Source§

fn clone(&self) -> PathSelection

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 PathSelection

Source§

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

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

impl Default for PathSelection

Source§

fn default() -> PathSelection

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

impl PartialEq for PathSelection

Source§

fn eq(&self, other: &PathSelection) -> 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 Copy for PathSelection

Source§

impl Eq for PathSelection

Source§

impl StructuralPartialEq for PathSelection

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -14,28 +14,35 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ReadError.html b/pr/3367/docs/iroh/endpoint/enum.ReadError.html index 5b824e67c4..8df1eb2c8f 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ReadError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ReadError.html @@ -1,4 +1,4 @@ -ReadError in iroh::endpoint - Rust

Enum ReadError

pub enum ReadError {
+ReadError in iroh::endpoint - Rust

ReadError

Enum ReadError 

pub enum ReadError {
     Reset(VarInt),
     ConnectionLost(ConnectionError),
     ClosedStream,
@@ -15,7 +15,7 @@ stream which cannot be recovered, making further ordered reads impossible.

§

ZeroRttRejected

This was a 0-RTT stream and the server rejected it

Can only occur on clients for 0-RTT streams, which can be opened using Connecting::into_0rtt().

-

Trait Implementations§

§

impl Clone for ReadError

§

fn clone(&self) -> ReadError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for ReadError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadError

§

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
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ReadError> for ReadExactError

§

fn from(source: ReadError) -> ReadExactError

Converts to this type from the input type.
§

impl From<ReadError> for ReadToEndError

§

fn from(source: ReadError) -> ReadToEndError

Converts to this type from the input type.
§

impl From<ReadableError> for ReadError

§

fn from(e: ReadableError) -> ReadError

Converts to this type from the input type.
§

impl From<ResetError> for ReadError

§

fn from(e: ResetError) -> ReadError

Converts to this type from the input type.
§

impl PartialEq for ReadError

§

fn eq(&self, other: &ReadError) -> 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, +

Trait Implementations§

§

impl Clone for ReadError

§

fn clone(&self) -> ReadError

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
§

impl Debug for ReadError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadError

§

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
§

impl From<ConnectionError> for ReadError

§

fn from(source: ConnectionError) -> ReadError

Converts to this type from the input type.
§

impl From<ReadError> for ReadExactError

§

fn from(source: ReadError) -> ReadExactError

Converts to this type from the input type.
§

impl From<ReadError> for ReadToEndError

§

fn from(source: ReadError) -> ReadToEndError

Converts to this type from the input type.
§

impl From<ReadableError> for ReadError

§

fn from(e: ReadableError) -> ReadError

Converts to this type from the input type.
§

impl From<ResetError> for ReadError

§

fn from(e: ResetError) -> ReadError

Converts to this type from the input type.
§

impl PartialEq for ReadError

§

fn eq(&self, other: &ReadError) -> 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.
§

impl Eq for ReadError

§

impl StructuralPartialEq for ReadError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -27,30 +27,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ReadExactError.html b/pr/3367/docs/iroh/endpoint/enum.ReadExactError.html index 95035ca4ab..c38742fb50 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ReadExactError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ReadExactError.html @@ -1,10 +1,10 @@ -ReadExactError in iroh::endpoint - Rust

Enum ReadExactError

pub enum ReadExactError {
+ReadExactError in iroh::endpoint - Rust

ReadExactError

Enum ReadExactError 

pub enum ReadExactError {
     FinishedEarly(usize),
     ReadError(ReadError),
 }
Expand description

Errors that arise from reading from a stream.

Variants§

§

FinishedEarly(usize)

The stream finished before all bytes were read

§

ReadError(ReadError)

A read error occurred

-

Trait Implementations§

§

impl Clone for ReadExactError

§

fn clone(&self) -> ReadExactError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for ReadExactError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadExactError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadExactError

§

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
§

impl From<ReadError> for ReadExactError

§

fn from(source: ReadError) -> ReadExactError

Converts to this type from the input type.
§

impl PartialEq for ReadExactError

§

fn eq(&self, other: &ReadExactError) -> 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, +

Trait Implementations§

§

impl Clone for ReadExactError

§

fn clone(&self) -> ReadExactError

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
§

impl Debug for ReadExactError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadExactError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadExactError

§

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
§

impl From<ReadError> for ReadExactError

§

fn from(source: ReadError) -> ReadExactError

Converts to this type from the input type.
§

impl PartialEq for ReadExactError

§

fn eq(&self, other: &ReadExactError) -> 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.
§

impl Eq for ReadExactError

§

impl StructuralPartialEq for ReadExactError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -16,30 +16,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ReadToEndError.html b/pr/3367/docs/iroh/endpoint/enum.ReadToEndError.html index a3e9e56002..046a5d5320 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ReadToEndError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ReadToEndError.html @@ -1,10 +1,10 @@ -ReadToEndError in iroh::endpoint - Rust

Enum ReadToEndError

pub enum ReadToEndError {
+ReadToEndError in iroh::endpoint - Rust

ReadToEndError

Enum ReadToEndError 

pub enum ReadToEndError {
     Read(ReadError),
     TooLong,
 }
Expand description

Variants§

§

Read(ReadError)

An error occurred during reading

§

TooLong

The stream is larger than the user-supplied limit

-

Trait Implementations§

§

impl Clone for ReadToEndError

§

fn clone(&self) -> ReadToEndError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for ReadToEndError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadToEndError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadToEndError

§

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
§

impl From<ReadError> for ReadToEndError

§

fn from(source: ReadError) -> ReadToEndError

Converts to this type from the input type.
§

impl PartialEq for ReadToEndError

§

fn eq(&self, other: &ReadToEndError) -> 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, +

Trait Implementations§

§

impl Clone for ReadToEndError

§

fn clone(&self) -> ReadToEndError

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
§

impl Debug for ReadToEndError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ReadToEndError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ReadToEndError

§

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
§

impl From<ReadError> for ReadToEndError

§

fn from(source: ReadError) -> ReadToEndError

Converts to this type from the input type.
§

impl PartialEq for ReadToEndError

§

fn eq(&self, other: &ReadToEndError) -> 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.
§

impl Eq for ReadToEndError

§

impl StructuralPartialEq for ReadToEndError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -16,30 +16,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.RelayMode.html b/pr/3367/docs/iroh/endpoint/enum.RelayMode.html index e4ad1d3942..5c8a476d66 100644 --- a/pr/3367/docs/iroh/endpoint/enum.RelayMode.html +++ b/pr/3367/docs/iroh/endpoint/enum.RelayMode.html @@ -1,4 +1,4 @@ -RelayMode in iroh::endpoint - Rust

Enum RelayMode

Source
pub enum RelayMode {
+RelayMode in iroh::endpoint - Rust

RelayMode

Enum RelayMode 

Source
pub enum RelayMode {
     Disabled,
     Default,
     Staging,
@@ -9,9 +9,9 @@
 

See crate::defaults::prod for the severs used.

§

Staging

Use the staging relay servers from n0.

§

Custom(RelayMap)

Use a custom relay map.

-

Implementations§

Source§

impl RelayMode

Source

pub fn relay_map(&self) -> RelayMap

Returns the relay map for this mode.

-

Trait Implementations§

Source§

impl Clone for RelayMode

Source§

fn clone(&self) -> RelayMode

Returns a copy 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 RelayMode

Source§

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

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

impl PartialEq for RelayMode

Source§

fn eq(&self, other: &RelayMode) -> 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 Eq for RelayMode

Source§

impl StructuralPartialEq for RelayMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Implementations§

Source§

impl RelayMode

Source

pub fn relay_map(&self) -> RelayMap

Returns the relay map for this mode.

+

Trait Implementations§

Source§

impl Clone for RelayMode

Source§

fn clone(&self) -> RelayMode

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 RelayMode

Source§

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

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

impl PartialEq for RelayMode

Source§

fn eq(&self, other: &RelayMode) -> 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 Eq for RelayMode

Source§

impl StructuralPartialEq for RelayMode

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -19,28 +19,35 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.ResetError.html b/pr/3367/docs/iroh/endpoint/enum.ResetError.html index 02ec5310a4..29b0d72e71 100644 --- a/pr/3367/docs/iroh/endpoint/enum.ResetError.html +++ b/pr/3367/docs/iroh/endpoint/enum.ResetError.html @@ -1,4 +1,4 @@ -ResetError in iroh::endpoint - Rust

Enum ResetError

pub enum ResetError {
+ResetError in iroh::endpoint - Rust

ResetError

Enum ResetError 

pub enum ResetError {
     ConnectionLost(ConnectionError),
     ZeroRttRejected,
 }
Expand description

Errors that arise while waiting for a stream to be reset

@@ -6,7 +6,7 @@
§

ZeroRttRejected

This was a 0-RTT stream and the server rejected it

Can only occur on clients for 0-RTT streams, which can be opened using Connecting::into_0rtt().

-

Trait Implementations§

§

impl Clone for ResetError

§

fn clone(&self) -> ResetError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for ResetError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ResetError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ResetError

§

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
§

impl From<ConnectionError> for ResetError

§

fn from(source: ConnectionError) -> ResetError

Converts to this type from the input type.
§

impl From<ResetError> for ReadError

§

fn from(e: ResetError) -> ReadError

Converts to this type from the input type.
§

impl PartialEq for ResetError

§

fn eq(&self, other: &ResetError) -> 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, +

Trait Implementations§

§

impl Clone for ResetError

§

fn clone(&self) -> ResetError

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
§

impl Debug for ResetError

§

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

Formats the value using the given formatter. Read more
§

impl Display for ResetError

§

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

Formats the value using the given formatter. Read more
§

impl Error for ResetError

§

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
§

impl From<ConnectionError> for ResetError

§

fn from(source: ConnectionError) -> ResetError

Converts to this type from the input type.
§

impl From<ResetError> for ReadError

§

fn from(e: ResetError) -> ReadError

Converts to this type from the input type.
§

impl PartialEq for ResetError

§

fn eq(&self, other: &ResetError) -> 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.
§

impl Eq for ResetError

§

impl StructuralPartialEq for ResetError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -18,30 +18,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.SendDatagramError.html b/pr/3367/docs/iroh/endpoint/enum.SendDatagramError.html index ddbab33e20..7247302a54 100644 --- a/pr/3367/docs/iroh/endpoint/enum.SendDatagramError.html +++ b/pr/3367/docs/iroh/endpoint/enum.SendDatagramError.html @@ -1,4 +1,4 @@ -SendDatagramError in iroh::endpoint - Rust

Enum SendDatagramError

pub enum SendDatagramError {
+SendDatagramError in iroh::endpoint - Rust

SendDatagramError

Enum SendDatagramError 

pub enum SendDatagramError {
     UnsupportedByPeer,
     Disabled,
     TooLarge,
@@ -10,7 +10,7 @@
 

Indicates that the path MTU minus overhead or the limit advertised by the peer has been exceeded.

§

ConnectionLost(ConnectionError)

The connection was lost

-

Trait Implementations§

§

impl Clone for SendDatagramError

§

fn clone(&self) -> SendDatagramError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for SendDatagramError

§

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

Formats the value using the given formatter. Read more
§

impl Display for SendDatagramError

§

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

Formats the value using the given formatter. Read more
§

impl Error for SendDatagramError

§

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
§

impl From<ConnectionError> for SendDatagramError

§

fn from(source: ConnectionError) -> SendDatagramError

Converts to this type from the input type.
§

impl PartialEq for SendDatagramError

§

fn eq(&self, other: &SendDatagramError) -> 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, +

Trait Implementations§

§

impl Clone for SendDatagramError

§

fn clone(&self) -> SendDatagramError

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
§

impl Debug for SendDatagramError

§

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

Formats the value using the given formatter. Read more
§

impl Display for SendDatagramError

§

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

Formats the value using the given formatter. Read more
§

impl Error for SendDatagramError

§

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
§

impl From<ConnectionError> for SendDatagramError

§

fn from(source: ConnectionError) -> SendDatagramError

Converts to this type from the input type.
§

impl PartialEq for SendDatagramError

§

fn eq(&self, other: &SendDatagramError) -> 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.
§

impl Eq for SendDatagramError

§

impl StructuralPartialEq for SendDatagramError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -22,30 +22,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.Source.html b/pr/3367/docs/iroh/endpoint/enum.Source.html index 1ce1674d34..5673f52ea0 100644 --- a/pr/3367/docs/iroh/endpoint/enum.Source.html +++ b/pr/3367/docs/iroh/endpoint/enum.Source.html @@ -1,4 +1,4 @@ -Source in iroh::endpoint - Rust

Enum Source

Source
pub enum Source {
+Source in iroh::endpoint - Rust

Source

Enum Source 

Source
pub enum Source {
     Saved,
     Udp,
     Relay,
@@ -16,8 +16,7 @@ was discovered.

A Source helps track how and where an address was learned. Multiple sources can be associated with a single address, if we have discovered this address through multiple means.

-

Each time a NodeAddr is added to the node map, usually through -crate::endpoint::Endpoint::add_node_addr_with_source, a Source must be supplied to indicate +

Each time a NodeAddr is added to the node map a Source must be supplied to indicate how the address was obtained.

A Source can describe a variety of places that an address or node was discovered, such as a configured discovery service, the network itself @@ -30,12 +29,12 @@ discovered, such as a configured discovery service, the network itself

Fields

§name: String

The name of the discovery service that discovered the address.

§

NamedApp

Application layer with a specific name added the node directly.

Fields

§name: String

The name of the application that added the node

-

Trait Implementations§

Source§

impl Clone for Source

Source§

fn clone(&self) -> Source

Returns a copy 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 Source

Source§

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

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

impl<'de> Deserialize<'de> for Source

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where - __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Source

Source§

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

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

impl Hash for Source

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 +

Trait Implementations§

Source§

impl Clone for Source

Source§

fn clone(&self) -> Source

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 Source

Source§

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

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

impl<'de> Deserialize<'de> for Source

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where + __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Source

Source§

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

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

impl Hash for Source

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 Source

Source§

fn eq(&self, other: &Source) -> 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 Serialize for Source

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where - __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Source

Source§

impl StructuralPartialEq for Source

Auto Trait Implementations§

§

impl Freeze for Source

§

impl RefUnwindSafe for Source

§

impl Send for Source

§

impl Sync for Source

§

impl Unpin for Source

§

impl UnwindSafe for Source

Blanket Implementations§

Source§

impl<T> Any for T
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Source

Source§

fn eq(&self, other: &Source) -> 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 Serialize for Source

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where + __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for Source

Source§

impl StructuralPartialEq for Source

Auto Trait Implementations§

§

impl Freeze for Source

§

impl RefUnwindSafe for Source

§

impl Send for Source

§

impl Sync for Source

§

impl Unpin for Source

§

impl UnwindSafe for Source

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<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( @@ -43,30 +42,39 @@ and should not be overridden without very good reason.

bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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).

+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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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<T> DeserializeOwned for T
where - T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file +[WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where + T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where + T: 'static,

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.StoppedError.html b/pr/3367/docs/iroh/endpoint/enum.StoppedError.html index ed7866a908..1322f88111 100644 --- a/pr/3367/docs/iroh/endpoint/enum.StoppedError.html +++ b/pr/3367/docs/iroh/endpoint/enum.StoppedError.html @@ -1,4 +1,4 @@ -StoppedError in iroh::endpoint - Rust

Enum StoppedError

pub enum StoppedError {
+StoppedError in iroh::endpoint - Rust

StoppedError

Enum StoppedError 

pub enum StoppedError {
     ConnectionLost(ConnectionError),
     ZeroRttRejected,
 }
Expand description

Errors that arise while monitoring for a send stream stop from the peer

@@ -6,7 +6,7 @@
§

ZeroRttRejected

This was a 0-RTT stream and the server rejected it

Can only occur on clients for 0-RTT streams, which can be opened using Connecting::into_0rtt().

-

Trait Implementations§

§

impl Clone for StoppedError

§

fn clone(&self) -> StoppedError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for StoppedError

§

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

Formats the value using the given formatter. Read more
§

impl Display for StoppedError

§

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

Formats the value using the given formatter. Read more
§

impl Error for StoppedError

§

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
§

impl From<ConnectionError> for StoppedError

§

fn from(source: ConnectionError) -> StoppedError

Converts to this type from the input type.
§

impl From<StoppedError> for WriteError

§

fn from(x: StoppedError) -> WriteError

Converts to this type from the input type.
§

impl PartialEq for StoppedError

§

fn eq(&self, other: &StoppedError) -> 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, +

Trait Implementations§

§

impl Clone for StoppedError

§

fn clone(&self) -> StoppedError

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
§

impl Debug for StoppedError

§

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

Formats the value using the given formatter. Read more
§

impl Display for StoppedError

§

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

Formats the value using the given formatter. Read more
§

impl Error for StoppedError

§

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
§

impl From<ConnectionError> for StoppedError

§

fn from(source: ConnectionError) -> StoppedError

Converts to this type from the input type.
§

impl From<StoppedError> for WriteError

§

fn from(x: StoppedError) -> WriteError

Converts to this type from the input type.
§

impl PartialEq for StoppedError

§

fn eq(&self, other: &StoppedError) -> 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.
§

impl Eq for StoppedError

§

impl StructuralPartialEq for StoppedError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -18,30 +18,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/enum.WriteError.html b/pr/3367/docs/iroh/endpoint/enum.WriteError.html index 8e427c53b7..71d8f9f7c0 100644 --- a/pr/3367/docs/iroh/endpoint/enum.WriteError.html +++ b/pr/3367/docs/iroh/endpoint/enum.WriteError.html @@ -1,4 +1,4 @@ -WriteError in iroh::endpoint - Rust

Enum WriteError

pub enum WriteError {
+WriteError in iroh::endpoint - Rust

WriteError

Enum WriteError 

pub enum WriteError {
     Stopped(VarInt),
     ConnectionLost(ConnectionError),
     ClosedStream,
@@ -11,7 +11,7 @@
 
§

ZeroRttRejected

This was a 0-RTT stream and the server rejected it

Can only occur on clients for 0-RTT streams, which can be opened using Connecting::into_0rtt().

-

Trait Implementations§

§

impl Clone for WriteError

§

fn clone(&self) -> WriteError

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

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

Performs copy-assignment from source. Read more
§

impl Debug for WriteError

§

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

Formats the value using the given formatter. Read more
§

impl Display for WriteError

§

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

Formats the value using the given formatter. Read more
§

impl Error for WriteError

§

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
§

impl From<ClosedStream> for WriteError

§

fn from(_: ClosedStream) -> WriteError

Converts to this type from the input type.
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<StoppedError> for WriteError

§

fn from(x: StoppedError) -> WriteError

Converts to this type from the input type.
§

impl PartialEq for WriteError

§

fn eq(&self, other: &WriteError) -> 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, +

Trait Implementations§

§

impl Clone for WriteError

§

fn clone(&self) -> WriteError

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
§

impl Debug for WriteError

§

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

Formats the value using the given formatter. Read more
§

impl Display for WriteError

§

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

Formats the value using the given formatter. Read more
§

impl Error for WriteError

§

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
§

impl From<ClosedStream> for WriteError

§

fn from(_: ClosedStream) -> WriteError

Converts to this type from the input type.
§

impl From<ConnectionError> for WriteError

§

fn from(source: ConnectionError) -> WriteError

Converts to this type from the input type.
§

impl From<StoppedError> for WriteError

§

fn from(x: StoppedError) -> WriteError

Converts to this type from the input type.
§

impl PartialEq for WriteError

§

fn eq(&self, other: &WriteError) -> 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.
§

impl Eq for WriteError

§

impl StructuralPartialEq for WriteError

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
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method @@ -23,30 +23,39 @@ receivers.
bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
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, dst: *mut u8)

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

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where +) -> TaggedParser<'a, Implicit, Self, E>

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<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where + T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

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.
§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

+ K: Borrow<Q> + ?Sized,
§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

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
§

impl<E> InstrumentError for E
where - TracedError<E>: From<E>,

§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

+ TracedError<E>: From<E>,
§

type Instrumented = TracedError<E>

The type of the wrapped error after instrumentation
§

fn in_current_span(self) -> <E as InstrumentError>::Instrumented

Instrument an Error by bundling it with a SpanTrace 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.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where +

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where + T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where + T: Policy<B, E>, + P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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
§

impl<T> ToStringFallible for T
where + T: Display,

§

fn try_to_string(&self) -> Result<String, TryReserveError>

ToString::to_string, but without panic on OOM.

+
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<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

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
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/fn.default_relay_mode.html b/pr/3367/docs/iroh/endpoint/fn.default_relay_mode.html index 9fb7d1bdea..aba7165de8 100644 --- a/pr/3367/docs/iroh/endpoint/fn.default_relay_mode.html +++ b/pr/3367/docs/iroh/endpoint/fn.default_relay_mode.html @@ -1,4 +1,4 @@ -default_relay_mode in iroh::endpoint - Rust

Function default_relay_mode

Source
pub fn default_relay_mode() -> RelayMode
Expand description

Returns the default relay mode.

+default_relay_mode in iroh::endpoint - Rust

default_relay_mode

Function default_relay_mode 

Source
pub fn default_relay_mode() -> RelayMode
Expand description

Returns the default relay mode.

If the IROH_FORCE_STAGING_RELAYS environment variable is non empty, it will return RelayMode::Staging. Otherwise, it will return RelayMode::Default.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/fn.force_staging_infra.html b/pr/3367/docs/iroh/endpoint/fn.force_staging_infra.html index 7c6f0878d5..016c64b233 100644 --- a/pr/3367/docs/iroh/endpoint/fn.force_staging_infra.html +++ b/pr/3367/docs/iroh/endpoint/fn.force_staging_infra.html @@ -1,2 +1,2 @@ -force_staging_infra in iroh::endpoint - Rust

Function force_staging_infra

Source
pub fn force_staging_infra() -> bool
Expand description

Returns true if the use of staging relays is forced.

+force_staging_infra in iroh::endpoint - Rust

force_staging_infra

Function force_staging_infra 

Source
pub fn force_staging_infra() -> bool
Expand description

Returns true if the use of staging relays is forced.

\ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/index.html b/pr/3367/docs/iroh/endpoint/index.html index 568ef03ef2..079ed478d2 100644 --- a/pr/3367/docs/iroh/endpoint/index.html +++ b/pr/3367/docs/iroh/endpoint/index.html @@ -1,4 +1,4 @@ -iroh::endpoint - Rust

Module endpoint

Source
Expand description

The Endpoint allows establishing connections to other iroh nodes.

+iroh::endpoint - Rust

Module endpoint

Module endpoint 

Source
Expand description

The Endpoint allows establishing connections to other iroh nodes.

The Endpoint is the main API interface to manage a local iroh node. It allows connecting to and accepting connections from other nodes. See the module docs for more details on how iroh connections work.

@@ -8,6 +8,6 @@ more details on how iroh connections work.

  • Builder to create an Endpoint.
  • Structs§

    Accept
    Future produced by Endpoint::accept.
    AcceptBi
    Future produced by [Connection::accept_bi]
    AcceptUni
    Future produced by [Connection::accept_uni]
    AckFrequencyConfig
    Parameters for controlling the peer’s acknowledgement frequency
    ApplicationClose
    Reason given by an application for closing the connection
    Builder
    Builder for Endpoint.
    Chunk
    A chunk of data from the receive stream
    ClosedStream
    Error indicating that a stream has not been opened or has already been finished or reset
    ConnectOptions
    Options for the Endpoint::connect_with_opts function.
    Connecting
    In-progress connection attempt future
    Connection
    A QUIC connection.
    ConnectionClose
    Reason given by the transport for closing the connection
    ConnectionStats
    Connection statistics
    CryptoError
    Generic crypto errors
    DirectAddr
    A direct address on which an iroh-node might be contactable.
    DirectAddrInfo
    Information about a direct address.
    Endpoint
    Controls an iroh node, establishing connections with other nodes.
    ExportKeyingMaterialError
    Error returned by [Session::export_keying_material].
    FrameStats
    Number of frames transmitted of each frame type
    Incoming
    An incoming connection for which the server has not yet begun its parts of the -handshake.
    IncomingFuture
    Adaptor to let Incoming be awaited like a Connecting.
    MtuDiscoveryConfig
    Parameters governing MTU discovery.
    OpenBi
    Future produced by [Connection::open_bi]
    OpenUni
    Future produced by [Connection::open_uni]
    PathStats
    Statistics related to a transmission path
    ReadDatagram
    Future produced by [Connection::read_datagram]
    RecvStream
    A stream that can only be used to receive data
    RemoteInfo
    Details about a remote iroh node which is known to this node.
    RemoteNodeIdError
    RetryError
    Error for attempting to retry an [Incoming] which already bears a token from a previous retry
    SendStream
    A stream that can only be used to send data
    ServerConfig
    Parameters governing incoming connections
    StreamId
    Identifier for a stream within a particular connection
    TransportConfig
    Parameters governing the core QUIC state machine
    TransportError
    Transport-level errors occur when a peer violates the protocol specification
    TransportErrorCode
    Transport-level error code
    UdpStats
    Statistics about UDP datagrams transmitted or received on a connection
    UnsupportedVersion
    Error indicating that the specified QUIC version is not supported
    VarInt
    An integer less than 2^62
    WeakConnectionHandle
    A handle to some connection internals, use with care.
    Written
    Indicates how many bytes and chunks had been transferred in a write operation
    ZeroRttAccepted
    Future that completes when a connection is fully established.

    Enums§

    AddNodeAddrError
    AlpnError
    BindError
    ConnectError
    ConnectWithOptsError
    ConnectionError
    Reasons why a connection might be lost
    ConnectionType
    The type of connection we have to the endpoint.
    ControlMsg
    The type of control message we have received.
    DirectAddrType
    The type of direct address.
    GetMappingAddressError
    PathSelectiontest-utils
    Defines the mode of path selection for all traffic flowing through +handshake.
    IncomingFuture
    Adaptor to let Incoming be awaited like a Connecting.
    MtuDiscoveryConfig
    Parameters governing MTU discovery.
    OpenBi
    Future produced by [Connection::open_bi]
    OpenUni
    Future produced by [Connection::open_uni]
    PathStats
    Statistics related to a transmission path
    ReadDatagram
    Future produced by [Connection::read_datagram]
    RecvStream
    A stream that can only be used to receive data
    RemoteNodeIdError
    RetryError
    Error for attempting to retry an [Incoming] which already bears a token from a previous retry
    SendStream
    A stream that can only be used to send data
    ServerConfig
    Parameters governing incoming connections
    StreamId
    Identifier for a stream within a particular connection
    TransportConfig
    Parameters governing the core QUIC state machine
    TransportError
    Transport-level errors occur when a peer violates the protocol specification
    TransportErrorCode
    Transport-level error code
    UdpStats
    Statistics about UDP datagrams transmitted or received on a connection
    UnsupportedVersion
    Error indicating that the specified QUIC version is not supported
    VarInt
    An integer less than 2^62
    WeakConnectionHandle
    A handle to some connection internals, use with care.
    Written
    Indicates how many bytes and chunks had been transferred in a write operation
    ZeroRttAccepted
    Future that completes when a connection is fully established.

    Enums§

    AddNodeAddrError
    AlpnError
    BindError
    ConnectError
    ConnectWithOptsError
    ConnectionError
    Reasons why a connection might be lost
    ConnectionType
    The type of connection we have to the endpoint.
    ControlMsg
    The type of control message we have received.
    DirectAddrType
    The type of direct address.
    GetMappingAddressError
    PathSelectiontest-utils
    Defines the mode of path selection for all traffic flowing through the endpoint.
    ReadError
    Errors that arise from reading from a stream.
    ReadExactError
    Errors that arise from reading from a stream.
    ReadToEndError
    Errors from RecvStream::read_to_end
    RelayMode
    Configuration of the relay servers for an Endpoint.
    ResetError
    Errors that arise while waiting for a stream to be reset
    SendDatagramError
    Errors that can arise when sending a datagram
    Source
    The origin or source through which an address associated with a remote node was discovered.
    StoppedError
    Errors that arise while monitoring for a send stream stop from the peer
    WriteError
    Errors that arise from writing to a stream

    Constants§

    ENV_FORCE_STAGING_RELAYS
    Environment variable to force the use of staging relays.

    Traits§

    AeadKey
    A key for sealing data with AEAD-based algorithms
    Controller
    Common interface for different congestion controllers
    ControllerFactory
    Constructs controllers on demand
    CryptoServerConfig
    Server-side configuration for the crypto protocol
    HandshakeTokenKey
    A pseudo random key for HKDF

    Functions§

    default_relay_mode
    Returns the default relay mode.
    force_staging_infra
    Returns true if the use of staging relays is forced.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/sidebar-items.js b/pr/3367/docs/iroh/endpoint/sidebar-items.js index 3f9dd865dd..0d384decdb 100644 --- a/pr/3367/docs/iroh/endpoint/sidebar-items.js +++ b/pr/3367/docs/iroh/endpoint/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["ENV_FORCE_STAGING_RELAYS"],"enum":["AddNodeAddrError","AlpnError","BindError","ConnectError","ConnectWithOptsError","ConnectionError","ConnectionType","ControlMsg","DirectAddrType","GetMappingAddressError","PathSelection","ReadError","ReadExactError","ReadToEndError","RelayMode","ResetError","SendDatagramError","Source","StoppedError","WriteError"],"fn":["default_relay_mode","force_staging_infra"],"struct":["Accept","AcceptBi","AcceptUni","AckFrequencyConfig","ApplicationClose","Builder","Chunk","ClosedStream","ConnectOptions","Connecting","Connection","ConnectionClose","ConnectionStats","CryptoError","DirectAddr","DirectAddrInfo","Endpoint","ExportKeyingMaterialError","FrameStats","Incoming","IncomingFuture","MtuDiscoveryConfig","OpenBi","OpenUni","PathStats","ReadDatagram","RecvStream","RemoteInfo","RemoteNodeIdError","RetryError","SendStream","ServerConfig","StreamId","TransportConfig","TransportError","TransportErrorCode","UdpStats","UnsupportedVersion","VarInt","WeakConnectionHandle","Written","ZeroRttAccepted"],"trait":["AeadKey","Controller","ControllerFactory","CryptoServerConfig","HandshakeTokenKey"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["ENV_FORCE_STAGING_RELAYS"],"enum":["AddNodeAddrError","AlpnError","BindError","ConnectError","ConnectWithOptsError","ConnectionError","ConnectionType","ControlMsg","DirectAddrType","GetMappingAddressError","PathSelection","ReadError","ReadExactError","ReadToEndError","RelayMode","ResetError","SendDatagramError","Source","StoppedError","WriteError"],"fn":["default_relay_mode","force_staging_infra"],"struct":["Accept","AcceptBi","AcceptUni","AckFrequencyConfig","ApplicationClose","Builder","Chunk","ClosedStream","ConnectOptions","Connecting","Connection","ConnectionClose","ConnectionStats","CryptoError","DirectAddr","DirectAddrInfo","Endpoint","ExportKeyingMaterialError","FrameStats","Incoming","IncomingFuture","MtuDiscoveryConfig","OpenBi","OpenUni","PathStats","ReadDatagram","RecvStream","RemoteNodeIdError","RetryError","SendStream","ServerConfig","StreamId","TransportConfig","TransportError","TransportErrorCode","UdpStats","UnsupportedVersion","VarInt","WeakConnectionHandle","Written","ZeroRttAccepted"],"trait":["AeadKey","Controller","ControllerFactory","CryptoServerConfig","HandshakeTokenKey"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Accept.html b/pr/3367/docs/iroh/endpoint/struct.Accept.html index 93beae76c8..a8aaf1f6f2 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Accept.html +++ b/pr/3367/docs/iroh/endpoint/struct.Accept.html @@ -1,6 +1,6 @@ -Accept in iroh::endpoint - Rust

    Struct Accept

    Source
    pub struct Accept<'a> { /* private fields */ }
    Expand description

    Future produced by Endpoint::accept.

    -

    Trait Implementations§

    Source§

    impl<'a> Debug for Accept<'a>

    Source§

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

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

    impl Future for Accept<'_>

    Source§

    type Output = Option<Incoming>

    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, 'a> Unpin for Accept<'a>
    where +Accept in iroh::endpoint - Rust

    Accept

    Struct Accept 

    Source
    pub struct Accept<'a> { /* private fields */ }
    Expand description

    Future produced by Endpoint::accept.

    +

    Trait Implementations§

    Source§

    impl<'a> Debug for Accept<'a>

    Source§

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

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

    impl Future for Accept<'_>

    Source§

    type Output = Option<Incoming>

    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, 'a> Unpin for Accept<'a>
    where PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,

    Auto Trait Implementations§

    §

    impl<'a> !Freeze for Accept<'a>

    §

    impl<'a> !RefUnwindSafe for Accept<'a>

    §

    impl<'a> Send for Accept<'a>

    §

    impl<'a> Sync for Accept<'a>

    §

    impl<'a> !UnwindSafe for Accept<'a>

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -9,19 +9,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -51,14 +64,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -67,16 +80,23 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.AcceptBi.html b/pr/3367/docs/iroh/endpoint/struct.AcceptBi.html index 536cd6a50d..7c45ef5b7d 100644 --- a/pr/3367/docs/iroh/endpoint/struct.AcceptBi.html +++ b/pr/3367/docs/iroh/endpoint/struct.AcceptBi.html @@ -1,4 +1,4 @@ -AcceptBi in iroh::endpoint - Rust

    Struct AcceptBi

    pub struct AcceptBi<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::accept_bi]

    +AcceptBi in iroh::endpoint - Rust

    AcceptBi

    Struct AcceptBi 

    pub struct AcceptBi<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::accept_bi]

    Trait Implementations§

    §

    impl Future for AcceptBi<'_>

    §

    type Output = Result<(SendStream, RecvStream), ConnectionError>

    The type of value produced on completion.
    §

    fn poll( self: Pin<&mut AcceptBi<'_>>, ctx: &mut Context<'_>, @@ -12,19 +12,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -54,14 +67,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -70,13 +83,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -84,7 +104,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -127,10 +147,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.AcceptUni.html b/pr/3367/docs/iroh/endpoint/struct.AcceptUni.html index 493d1965fb..6e340e9ea5 100644 --- a/pr/3367/docs/iroh/endpoint/struct.AcceptUni.html +++ b/pr/3367/docs/iroh/endpoint/struct.AcceptUni.html @@ -1,4 +1,4 @@ -AcceptUni in iroh::endpoint - Rust

    Struct AcceptUni

    pub struct AcceptUni<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::accept_uni]

    +AcceptUni in iroh::endpoint - Rust

    AcceptUni

    Struct AcceptUni 

    pub struct AcceptUni<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::accept_uni]

    Trait Implementations§

    §

    impl Future for AcceptUni<'_>

    §

    type Output = Result<RecvStream, ConnectionError>

    The type of value produced on completion.
    §

    fn poll( self: Pin<&mut AcceptUni<'_>>, ctx: &mut Context<'_>, @@ -12,19 +12,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -54,14 +67,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -70,13 +83,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -84,7 +104,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -127,10 +147,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.AckFrequencyConfig.html b/pr/3367/docs/iroh/endpoint/struct.AckFrequencyConfig.html index 9966bcadfc..926890e9f3 100644 --- a/pr/3367/docs/iroh/endpoint/struct.AckFrequencyConfig.html +++ b/pr/3367/docs/iroh/endpoint/struct.AckFrequencyConfig.html @@ -1,4 +1,4 @@ -AckFrequencyConfig in iroh::endpoint - Rust

    Struct AckFrequencyConfig

    pub struct AckFrequencyConfig { /* private fields */ }
    Expand description

    Parameters for controlling the peer’s acknowledgement frequency

    +AckFrequencyConfig in iroh::endpoint - Rust

    AckFrequencyConfig

    Struct AckFrequencyConfig 

    pub struct AckFrequencyConfig { /* private fields */ }
    Expand description

    Parameters for controlling the peer’s acknowledgement frequency

    The parameters provided in this config will be sent to the peer at the beginning of the connection, so it can take them into account when sending acknowledgements (see each parameter’s description for details on how it influences acknowledgement frequency).

    @@ -37,7 +37,7 @@ behavior when the extension is disabled).

    It is recommended to set this value to TransportConfig::packet_threshold minus one. Since the default value for TransportConfig::packet_threshold is 3, this value defaults to 2.

    -

    Trait Implementations§

    §

    impl Clone for AckFrequencyConfig

    §

    fn clone(&self) -> AckFrequencyConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for AckFrequencyConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for AckFrequencyConfig

    §

    fn default() -> AckFrequencyConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for AckFrequencyConfig

    §

    fn clone(&self) -> AckFrequencyConfig

    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
    §

    impl Debug for AckFrequencyConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for AckFrequencyConfig

    §

    fn default() -> AckFrequencyConfig

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -45,24 +45,31 @@ to 2.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ApplicationClose.html b/pr/3367/docs/iroh/endpoint/struct.ApplicationClose.html index dbebbcdc80..62212e17fd 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ApplicationClose.html +++ b/pr/3367/docs/iroh/endpoint/struct.ApplicationClose.html @@ -1,10 +1,10 @@ -ApplicationClose in iroh::endpoint - Rust

    Struct ApplicationClose

    pub struct ApplicationClose {
    +ApplicationClose in iroh::endpoint - Rust

    ApplicationClose

    Struct ApplicationClose 

    pub struct ApplicationClose {
         pub error_code: VarInt,
         pub reason: Bytes,
     }
    Expand description

    Reason given by an application for closing the connection

    Fields§

    §error_code: VarInt

    Application-specific reason code

    §reason: Bytes

    Human-readable reason for the close

    -

    Trait Implementations§

    §

    impl Clone for ApplicationClose

    §

    fn clone(&self) -> ApplicationClose

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ApplicationClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ApplicationClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for ApplicationClose

    §

    fn eq(&self, other: &ApplicationClose) -> 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, +

    Trait Implementations§

    §

    impl Clone for ApplicationClose

    §

    fn clone(&self) -> ApplicationClose

    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
    §

    impl Debug for ApplicationClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ApplicationClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for ApplicationClose

    §

    fn eq(&self, other: &ApplicationClose) -> 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.
    §

    impl Eq for ApplicationClose

    §

    impl StructuralPartialEq for ApplicationClose

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -13,29 +13,38 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Builder.html b/pr/3367/docs/iroh/endpoint/struct.Builder.html index af5780f1a4..b237e865d3 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Builder.html +++ b/pr/3367/docs/iroh/endpoint/struct.Builder.html @@ -1,24 +1,24 @@ -Builder in iroh::endpoint - Rust

    Struct Builder

    Source
    pub struct Builder { /* private fields */ }
    Expand description

    Builder for Endpoint.

    +Builder in iroh::endpoint - Rust

    Builder

    Struct Builder 

    Source
    pub struct Builder { /* private fields */ }
    Expand description

    Builder for Endpoint.

    By default the endpoint will generate a new random SecretKey, which will result in a new NodeId.

    To create the Endpoint call Builder::bind.

    -

    Implementations§

    Source§

    impl Builder

    Source

    pub async fn bind(self) -> Result<Endpoint, BindError>

    Binds the magic endpoint.

    -
    Source

    pub fn bind_addr_v4(self, addr: SocketAddrV4) -> Self

    Sets the IPv4 bind address.

    +

    Implementations§

    Source§

    impl Builder

    Source

    pub async fn bind(self) -> Result<Endpoint, BindError>

    Binds the magic endpoint.

    +
    Source

    pub fn bind_addr_v4(self, addr: SocketAddrV4) -> Self

    Sets the IPv4 bind address.

    Setting the port to 0 will use a random port. If the port specified is already in use, it will fallback to choosing a random port.

    By default will use 0.0.0.0:0 to bind to.

    -
    Source

    pub fn bind_addr_v6(self, addr: SocketAddrV6) -> Self

    Sets the IPv6 bind address.

    +
    Source

    pub fn bind_addr_v6(self, addr: SocketAddrV6) -> Self

    Sets the IPv6 bind address.

    Setting the port to 0 will use a random port. If the port specified is already in use, it will fallback to choosing a random port.

    By default will use [::]:0 to bind to.

    -
    Source

    pub fn secret_key(self, secret_key: SecretKey) -> Self

    Sets a secret key to authenticate with other peers.

    +
    Source

    pub fn secret_key(self, secret_key: SecretKey) -> Self

    Sets a secret key to authenticate with other peers.

    This secret key’s public key will be the PublicKey of this endpoint and thus also its NodeId

    If not set, a new secret key will be generated.

    -
    Source

    pub fn alpns(self, alpn_protocols: Vec<Vec<u8>>) -> Self

    Sets the ALPN protocols that this endpoint will accept on incoming connections.

    +
    Source

    pub fn alpns(self, alpn_protocols: Vec<Vec<u8>>) -> Self

    Sets the ALPN protocols that this endpoint will accept on incoming connections.

    Not setting this will still allow creating connections, but to accept incoming connections at least one ALPN must be set.

    -
    Source

    pub fn relay_mode(self, relay_mode: RelayMode) -> Self

    Sets the relay servers to assist in establishing connectivity.

    +
    Source

    pub fn relay_mode(self, relay_mode: RelayMode) -> Self

    Sets the relay servers to assist in establishing connectivity.

    Relay servers are used to establish initial connection with another iroh node. They also perform various functions related to hole punching, see the crate docs for more details.

    @@ -26,20 +26,15 @@ for more details.

    When using RelayMode::Custom, the provided relay_map must contain at least one configured relay node. If an invalid RelayMap is provided bind will result in an error.

    -
    Source

    pub fn relay_conn_protocol(self, protocol: RelayProtocol) -> Self

    Sets the protocol to use for relay connections.

    -

    Options are either RelayProtocol::Websocket or RelayProtocol::Relay.

    -

    Websocket is considered unstable between iroh versions at the moment. -The protocol can change in compatibility-breaking ways before iroh 1.0.

    -

    Default is set to Relay at the moment, until we’ve stabilized the websocket protocol.

    -
    Source

    pub fn clear_discovery(self) -> Self

    Removes all discovery services from the builder.

    -
    Source

    pub fn discovery(self, discovery: impl IntoDiscovery) -> Self

    Optionally sets a discovery mechanism for this endpoint.

    +
    Source

    pub fn clear_discovery(self) -> Self

    Removes all discovery services from the builder.

    +
    Source

    pub fn discovery(self, discovery: impl IntoDiscovery) -> Self

    Optionally sets a discovery mechanism for this endpoint.

    If you want to combine multiple discovery services, you can use Builder::add_discovery instead. This will internally create a crate::discovery::ConcurrentDiscovery.

    If no discovery service is set, connecting to a node without providing its direct addresses or relay URLs will fail.

    -

    See the documentation of the Discovery trait for details.

    -
    Source

    pub fn add_discovery(self, discovery: impl IntoDiscovery) -> Self

    Adds a discovery mechanism for this endpoint.

    +

    See the documentation of the crate::discovery::Discovery trait for details.

    +
    Source

    pub fn add_discovery(self, discovery: impl IntoDiscovery) -> Self

    Adds a discovery mechanism for this endpoint.

    The function discovery will be called on endpoint creation with the configured secret key of the endpoint. Discovery services that need to publish information need @@ -49,8 +44,8 @@ to use this secret key to sign the information.

    If no discovery service is set, connecting to a node without providing its direct addresses or relay URLs will fail.

    To clear all discovery services, use Builder::clear_discovery.

    -

    See the documentation of the Discovery trait for details.

    -
    Source

    pub fn discovery_n0(self) -> Self

    Configures the endpoint to use the default n0 DNS discovery service.

    +

    See the documentation of the crate::discovery::Discovery trait for details.

    +
    Source

    pub fn discovery_n0(self) -> Self

    Configures the endpoint to use the default n0 DNS discovery service.

    The default discovery service publishes to and resolves from the n0.computer dns server iroh.link.

    This is equivalent to adding both a crate::discovery::pkarr::PkarrPublisher @@ -59,24 +54,23 @@ n0.computer dns server.

    This will by default use N0_DNS_PKARR_RELAY_PROD. When in tests, or when the test-utils feature is enabled, this will use the N0_DNS_PKARR_RELAY_STAGING.

    -
    Source

    pub fn discovery_dht(self) -> Self

    Available on crate feature discovery-pkarr-dht only.

    Configures the endpoint to also use the mainline DHT with default settings.

    +
    Source

    pub fn discovery_dht(self) -> Self

    Available on crate feature discovery-pkarr-dht only.

    Configures the endpoint to also use the mainline DHT with default settings.

    This is equivalent to adding a crate::discovery::pkarr::dht::DhtDiscovery with default settings. Note that DhtDiscovery has various more advanced configuration options. If you need any of those, you should manually create a DhtDiscovery and add it with Builder::add_discovery.

    -
    Source

    pub fn discovery_local_network(self) -> Self

    Available on crate feature discovery-local-network only.

    Configures the endpoint to also use local network discovery.

    +
    Source

    pub fn discovery_local_network(self) -> Self

    Available on crate feature discovery-local-network only.

    Configures the endpoint to also use local network discovery.

    This is equivalent to adding a crate::discovery::mdns::MdnsDiscovery with default settings. Note that MdnsDiscovery has various more advanced configuration options. If you need any of those, you should manually create a MdnsDiscovery and add it with Builder::add_discovery.

    -
    Source

    pub fn user_data_for_discovery(self, user_data: UserData) -> Self

    Sets the initial user-defined data to be published in discovery services for this node.

    +
    Source

    pub fn user_data_for_discovery(self, user_data: UserData) -> Self

    Sets the initial user-defined data to be published in discovery services for this node.

    When using discovery services, this string of UserData will be published together with the node’s addresses and relay URL. When other nodes discover this node, they retrieve the UserData in addition to the addressing info.

    Iroh itself does not interpret the user-defined data in any way, it is purely left for applications to parse and use.

    -
    Source

    pub fn known_nodes(self, nodes: Vec<NodeAddr>) -> Self

    Optionally set a list of known nodes.

    -
    Source

    pub fn transport_config(self, transport_config: TransportConfig) -> Self

    Sets a custom quinn::TransportConfig for this endpoint.

    +
    Source

    pub fn transport_config(self, transport_config: TransportConfig) -> Self

    Sets a custom quinn::TransportConfig for this endpoint.

    The transport config contains parameters governing the QUIC state machine.

    If unset, the default config is used. Default values should be suitable for most internet applications. Applications protocols which forbid remotely-initiated @@ -84,31 +78,35 @@ streams should set max_concurrent_bidi_streams and max_concur zero.

    Please be aware that changing some settings may have adverse effects on establishing and maintaining direct connections.

    -
    Source

    pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

    Available on non-wasm_browser only.

    Optionally sets a custom DNS resolver to use for this endpoint.

    +
    Source

    pub fn dns_resolver(self, dns_resolver: DnsResolver) -> Self

    Available on non-wasm_browser only.

    Optionally sets a custom DNS resolver to use for this endpoint.

    The DNS resolver is used to resolve relay hostnames, and node addresses if crate::discovery::dns::DnsDiscovery is configured.

    By default, a new DNS resolver is created which is configured to use the host system’s DNS configuration. You can pass a custom instance of DnsResolver here to use a differently configured DNS resolver for this endpoint, or to share a DnsResolver between multiple endpoints.

    -
    Source

    pub fn proxy_url(self, url: Url) -> Self

    Sets an explicit proxy url to proxy all HTTP(S) traffic through.

    -
    Source

    pub fn proxy_from_env(self) -> Self

    Sets the proxy url from the environment, in this order:

    +
    Source

    pub fn proxy_url(self, url: Url) -> Self

    Sets an explicit proxy url to proxy all HTTP(S) traffic through.

    +
    Source

    pub fn proxy_from_env(self) -> Self

    Sets the proxy url from the environment, in this order:

    • HTTP_PROXY
    • http_proxy
    • HTTPS_PROXY
    • https_proxy
    -
    Source

    pub fn keylog(self, keylog: bool) -> Self

    Enables saving the TLS pre-master key for connections.

    +
    Source

    pub fn keylog(self, keylog: bool) -> Self

    Enables saving the TLS pre-master key for connections.

    This key should normally remain secret but can be useful to debug networking issues by decrypting captured traffic.

    If keylog is true then setting the SSLKEYLOGFILE environment variable to a filename will result in this file being used to log the TLS pre-master keys.

    -
    Source

    pub fn insecure_skip_relay_cert_verify(self, skip_verify: bool) -> Self

    Available on crate feature test-utils only.

    Skip verification of SSL certificates from relay servers

    +
    Source

    pub fn insecure_skip_relay_cert_verify(self, skip_verify: bool) -> Self

    Available on crate features test-utils only.

    Skip verification of SSL certificates from relay servers

    May only be used in tests.

    -
    Source

    pub fn path_selection(self, path_selection: PathSelection) -> Self

    Available on crate feature test-utils only.

    This implies we only use the relay to communicate +

    Source

    pub fn path_selection(self, path_selection: PathSelection) -> Self

    Available on crate features test-utils only.

    This implies we only use the relay to communicate and do not attempt to do any hole punching.

    -

    Trait Implementations§

    Source§

    impl Debug for Builder

    Source§

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

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

    impl Default for Builder

    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 +

    Source

    pub fn max_tls_tickets(self, n: usize) -> Self

    Set the maximum number of TLS tickets to cache.

    +

    Set this to a larger value if you want to do 0rtt connections to a large +number of clients.

    +

    The default is 256, taking about 150 KiB in memory.

    +

    Trait Implementations§

    Source§

    impl Debug for Builder

    Source§

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

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

    impl Default for Builder

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -116,20 +114,27 @@ and do not attempt to do any hole punching.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Chunk.html b/pr/3367/docs/iroh/endpoint/struct.Chunk.html index e992525328..53674c36ba 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Chunk.html +++ b/pr/3367/docs/iroh/endpoint/struct.Chunk.html @@ -1,10 +1,10 @@ -Chunk in iroh::endpoint - Rust

    Struct Chunk

    pub struct Chunk {
    +Chunk in iroh::endpoint - Rust

    Chunk

    Struct Chunk 

    pub struct Chunk {
         pub offset: u64,
         pub bytes: Bytes,
     }
    Expand description

    A chunk of data from the receive stream

    Fields§

    §offset: u64

    The offset in the stream

    §bytes: Bytes

    The contents of the chunk

    -

    Trait Implementations§

    §

    impl Debug for Chunk

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for Chunk

    §

    fn eq(&self, other: &Chunk) -> 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, +

    Trait Implementations§

    §

    impl Debug for Chunk

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for Chunk

    §

    fn eq(&self, other: &Chunk) -> 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.
    §

    impl Eq for Chunk

    §

    impl StructuralPartialEq for Chunk

    Auto Trait Implementations§

    §

    impl !Freeze for Chunk

    §

    impl RefUnwindSafe for Chunk

    §

    impl Send for Chunk

    §

    impl Sync for Chunk

    §

    impl Unpin for Chunk

    §

    impl UnwindSafe for Chunk

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -13,24 +13,31 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ClosedStream.html b/pr/3367/docs/iroh/endpoint/struct.ClosedStream.html index 3698eb4ca8..614e499bb6 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ClosedStream.html +++ b/pr/3367/docs/iroh/endpoint/struct.ClosedStream.html @@ -1,5 +1,5 @@ -ClosedStream in iroh::endpoint - Rust

    Struct ClosedStream

    pub struct ClosedStream { /* private fields */ }
    Expand description

    Error indicating that a stream has not been opened or has already been finished or reset

    -

    Trait Implementations§

    §

    impl Clone for ClosedStream

    §

    fn clone(&self) -> ClosedStream

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ClosedStream

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ClosedStream

    §

    fn default() -> ClosedStream

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

    impl Display for ClosedStream

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for ClosedStream

    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
    Source§

    impl From<ClosedStream> for AcceptError

    Source§

    fn from(err: ClosedStream) -> Self

    Converts to this type from the input type.
    §

    impl From<ClosedStream> for WriteError

    §

    fn from(_: ClosedStream) -> WriteError

    Converts to this type from the input type.
    §

    impl PartialEq for ClosedStream

    §

    fn eq(&self, other: &ClosedStream) -> 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, +ClosedStream in iroh::endpoint - Rust

    ClosedStream

    Struct ClosedStream 

    pub struct ClosedStream { /* private fields */ }
    Expand description

    Error indicating that a stream has not been opened or has already been finished or reset

    +

    Trait Implementations§

    §

    impl Clone for ClosedStream

    §

    fn clone(&self) -> ClosedStream

    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
    §

    impl Debug for ClosedStream

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ClosedStream

    §

    fn default() -> ClosedStream

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

    impl Display for ClosedStream

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for ClosedStream

    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
    Source§

    impl From<ClosedStream> for AcceptError

    Source§

    fn from(err: ClosedStream) -> Self

    Converts to this type from the input type.
    §

    impl From<ClosedStream> for WriteError

    §

    fn from(_: ClosedStream) -> WriteError

    Converts to this type from the input type.
    §

    impl PartialEq for ClosedStream

    §

    fn eq(&self, other: &ClosedStream) -> 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.
    §

    impl Eq for ClosedStream

    §

    impl StructuralPartialEq for ClosedStream

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method @@ -11,30 +11,39 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ConnectOptions.html b/pr/3367/docs/iroh/endpoint/struct.ConnectOptions.html index 14ad62b0f3..31f6030b4e 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ConnectOptions.html +++ b/pr/3367/docs/iroh/endpoint/struct.ConnectOptions.html @@ -1,12 +1,12 @@ -ConnectOptions in iroh::endpoint - Rust

    Struct ConnectOptions

    Source
    pub struct ConnectOptions { /* private fields */ }
    Expand description

    Options for the Endpoint::connect_with_opts function.

    -

    Implementations§

    Source§

    impl ConnectOptions

    Source

    pub fn new() -> Self

    Initializes new connection options.

    +ConnectOptions in iroh::endpoint - Rust

    ConnectOptions

    Struct ConnectOptions 

    Source
    pub struct ConnectOptions { /* private fields */ }
    Expand description

    Options for the Endpoint::connect_with_opts function.

    +

    Implementations§

    Source§

    impl ConnectOptions

    Source

    pub fn new() -> Self

    Initializes new connection options.

    By default, the connection will use the same options as Endpoint::connect, e.g. a default TransportConfig.

    -
    Source

    pub fn with_transport_config( +

    Source

    pub fn with_transport_config( self, transport_config: Arc<TransportConfig>, ) -> Self

    Sets the QUIC transport config options for this connection.

    -
    Source

    pub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self

    Sets ALPN identifiers that should be signaled as supported on connection, in +

    Source

    pub fn with_additional_alpns(self, alpns: Vec<Vec<u8>>) -> Self

    Sets ALPN identifiers that should be signaled as supported on connection, in addition to the main ALPN identifier used in Endpoint::connect_with_opts.

    This allows connecting to servers that may only support older versions of your protocol. In this case, you would add the older ALPN identifiers with this @@ -20,7 +20,7 @@ list or the main ALPN identifiers on the accept side, see the endpoint builder’s Builder::alpns function.

    -

    Trait Implementations§

    Source§

    impl Clone for ConnectOptions

    Source§

    fn clone(&self) -> ConnectOptions

    Returns a copy 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 ConnectOptions

    Source§

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

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

    impl Default for ConnectOptions

    Source§

    fn default() -> ConnectOptions

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ConnectOptions

    Source§

    fn clone(&self) -> ConnectOptions

    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 ConnectOptions

    Source§

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

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

    impl Default for ConnectOptions

    Source§

    fn default() -> ConnectOptions

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -28,24 +28,31 @@ builder’s bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Connecting.html b/pr/3367/docs/iroh/endpoint/struct.Connecting.html index 1c3ab8c7a3..24fc317df9 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Connecting.html +++ b/pr/3367/docs/iroh/endpoint/struct.Connecting.html @@ -1,5 +1,5 @@ -Connecting in iroh::endpoint - Rust

    Struct Connecting

    Source
    pub struct Connecting { /* private fields */ }
    Expand description

    In-progress connection attempt future

    -

    Implementations§

    Source§

    impl Connecting

    Source

    pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>

    Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened +Connecting in iroh::endpoint - Rust

    Connecting

    Struct Connecting 

    Source
    pub struct Connecting { /* private fields */ }
    Expand description

    In-progress connection attempt future

    +

    Implementations§

    Source§

    impl Connecting

    Source

    pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self>

    Converts this Connecting into a 0-RTT or 0.5-RTT connection at the cost of weakened security.

    Returns Ok immediately if the local endpoint is able to attempt sending 0/0.5-RTT data. If so, the returned Connection can be used to send application data without waiting for @@ -33,10 +33,10 @@ before TLS client authentication has occurred, and should therefore not be used data for which client authentication is being used.

    You can use RecvStream::is_0rtt to check whether a stream has been opened in 0-RTT and thus whether parts of the stream are operating under this reduced security level.

    -
    Source

    pub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>

    Parameters negotiated during the handshake

    -
    Source

    pub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>

    Extracts the ALPN protocol from the peer’s handshake data.

    -

    Trait Implementations§

    Source§

    impl Debug for Connecting

    Source§

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

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

    impl Future for Connecting

    Source§

    type Output = Result<Connection, ConnectionError>

    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> Unpin for Connecting
    where +

    Source

    pub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError>

    Parameters negotiated during the handshake

    +
    Source

    pub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError>

    Extracts the ALPN protocol from the peer’s handshake data.

    +

    Trait Implementations§

    Source§

    impl Debug for Connecting

    Source§

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

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

    impl Future for Connecting

    Source§

    type Output = Result<Connection, ConnectionError>

    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> Unpin for Connecting
    where PinnedFieldsOf<__Connecting<'pin>>: Unpin,

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -45,19 +45,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -87,14 +100,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -103,13 +116,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -117,7 +137,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -160,10 +180,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Connection.html b/pr/3367/docs/iroh/endpoint/struct.Connection.html index 7514eb2f13..be977e0145 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Connection.html +++ b/pr/3367/docs/iroh/endpoint/struct.Connection.html @@ -1,4 +1,4 @@ -Connection in iroh::endpoint - Rust

    Struct Connection

    Source
    pub struct Connection { /* private fields */ }
    Expand description

    A QUIC connection.

    +Connection in iroh::endpoint - Rust

    Connection

    Struct Connection 

    Source
    pub struct Connection { /* private fields */ }
    Expand description

    A QUIC connection.

    If all references to a connection (including every clone of the Connection handle, streams of incoming streams, and the various stream types) have been dropped, then the connection will be automatically closed with an error_code of 0 and an empty reason. You @@ -8,29 +8,29 @@ receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered t application. Connection::close describes in more detail how to gracefully close a connection without losing application data.

    May be cloned to obtain another handle to the same connection.

    -

    Implementations§

    Source§

    impl Connection

    Source

    pub fn open_uni(&self) -> OpenUni<'_> ⓘ

    Initiates a new outgoing unidirectional stream.

    +

    Implementations§

    Source§

    impl Connection

    Source

    pub fn open_uni(&self) -> OpenUni<'_> ⓘ

    Initiates a new outgoing unidirectional stream.

    Streams are cheap and instantaneous to open unless blocked by flow control. As a consequence, the peer won’t be notified that a stream has been opened until the stream is actually used.

    -
    Source

    pub fn open_bi(&self) -> OpenBi<'_> ⓘ

    Initiates a new outgoing bidirectional stream.

    +
    Source

    pub fn open_bi(&self) -> OpenBi<'_> ⓘ

    Initiates a new outgoing bidirectional stream.

    Streams are cheap and instantaneous to open unless blocked by flow control. As a consequence, the peer won’t be notified that a stream has been opened until the stream is actually used. Calling open_bi then waiting on the RecvStream without writing anything to SendStream will never succeed.

    -
    Source

    pub fn accept_uni(&self) -> AcceptUni<'_> ⓘ

    Accepts the next incoming uni-directional stream.

    -
    Source

    pub fn accept_bi(&self) -> AcceptBi<'_> ⓘ

    Accept the next incoming bidirectional stream.

    +
    Source

    pub fn accept_uni(&self) -> AcceptUni<'_> ⓘ

    Accepts the next incoming uni-directional stream.

    +
    Source

    pub fn accept_bi(&self) -> AcceptBi<'_> ⓘ

    Accept the next incoming bidirectional stream.

    Important Note: The peer that calls open_bi must write to its SendStream before the peer Connection is able to accept the stream using accept_bi(). Calling open_bi then waiting on the RecvStream without writing anything to the connected SendStream will never succeed.

    -
    Source

    pub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ

    Receives an application datagram.

    -
    Source

    pub async fn closed(&self) -> ConnectionError

    Wait for the connection to be closed for any reason.

    +
    Source

    pub fn read_datagram(&self) -> ReadDatagram<'_> ⓘ

    Receives an application datagram.

    +
    Source

    pub async fn closed(&self) -> ConnectionError

    Wait for the connection to be closed for any reason.

    Despite the return type’s name, closed connections are often not an error condition at the application layer. Cases that might be routine include ConnectionError::LocallyClosed and ConnectionError::ApplicationClosed.

    -
    Source

    pub fn close_reason(&self) -> Option<ConnectionError>

    If the connection is closed, the reason why.

    +
    Source

    pub fn close_reason(&self) -> Option<ConnectionError>

    If the connection is closed, the reason why.

    Returns None if the connection is still open.

    -
    Source

    pub fn close(&self, error_code: VarInt, reason: &[u8])

    Closes the connection immediately.

    +
    Source

    pub fn close(&self, error_code: VarInt, reason: &[u8])

    Closes the connection immediately.

    Pending operations will fail immediately with ConnectionError::LocallyClosed. No more data is sent to the peer and the peer may drop buffered data upon receiving the CONNECTION_CLOSE frame.

    @@ -51,41 +51,41 @@ endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to call close the remote endpoint may drop any data it received but is as yet undelivered to the application, including data that was acknowledged as received to the local endpoint.

    -
    Source

    pub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>

    Transmits data as an unreliable, unordered application datagram.

    +
    Source

    pub fn send_datagram(&self, data: Bytes) -> Result<(), SendDatagramError>

    Transmits data as an unreliable, unordered application datagram.

    Application datagrams are a low-level primitive. They may be lost or delivered out of order, and data must both fit inside a single QUIC packet and be smaller than the maximum dictated by the peer.

    -
    Source

    pub fn max_datagram_size(&self) -> Option<usize>

    Computes the maximum size of datagrams that may be passed to send_datagram.

    +
    Source

    pub fn max_datagram_size(&self) -> Option<usize>

    Computes the maximum size of datagrams that may be passed to send_datagram.

    Returns None if datagrams are unsupported by the peer or disabled locally.

    This may change over the lifetime of a connection according to variation in the path MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the peer’s limit is large this is guaranteed to be a little over a kilobyte at minimum.

    Not necessarily the maximum size of received datagrams.

    -
    Source

    pub fn datagram_send_buffer_space(&self) -> usize

    Bytes available in the outgoing datagram buffer.

    +
    Source

    pub fn datagram_send_buffer_space(&self) -> usize

    Bytes available in the outgoing datagram buffer.

    When greater than zero, calling send_datagram with a datagram of at most this size is guaranteed not to cause older datagrams to be dropped.

    -
    Source

    pub fn rtt(&self) -> Duration

    Current best estimate of this connection’s latency (round-trip-time).

    -
    Source

    pub fn stats(&self) -> ConnectionStats

    Returns connection statistics.

    -
    Source

    pub fn congestion_state(&self) -> Box<dyn Controller>

    Current state of the congestion control algorithm, for debugging purposes.

    -
    Source

    pub fn handshake_data(&self) -> Option<Box<dyn Any>>

    Parameters negotiated during the handshake.

    +
    Source

    pub fn rtt(&self) -> Duration

    Current best estimate of this connection’s latency (round-trip-time).

    +
    Source

    pub fn stats(&self) -> ConnectionStats

    Returns connection statistics.

    +
    Source

    pub fn congestion_state(&self) -> Box<dyn Controller>

    Current state of the congestion control algorithm, for debugging purposes.

    +
    Source

    pub fn handshake_data(&self) -> Option<Box<dyn Any>>

    Parameters negotiated during the handshake.

    Guaranteed to return Some on fully established connections or after Connecting::handshake_data() succeeds. See that method’s documentations for details on the returned value.

    -
    Source

    pub fn alpn(&self) -> Option<Vec<u8>>

    Extracts the ALPN protocol from the peer’s handshake data.

    -
    Source

    pub fn peer_identity(&self) -> Option<Box<dyn Any>>

    Cryptographic identity of the peer.

    +
    Source

    pub fn alpn(&self) -> Option<Vec<u8>>

    Extracts the ALPN protocol from the peer’s handshake data.

    +
    Source

    pub fn peer_identity(&self) -> Option<Box<dyn Any>>

    Cryptographic identity of the peer.

    The dynamic type returned is determined by the configured Session. For the default rustls session, the return value can be downcast to a Vec<[rustls::pki_types::CertificateDer]>

    -
    Source

    pub fn remote_node_id(&self) -> Result<NodeId, RemoteNodeIdError>

    Returns the NodeId from the peer’s TLS certificate.

    +
    Source

    pub fn remote_node_id(&self) -> Result<NodeId, RemoteNodeIdError>

    Returns the NodeId from the peer’s TLS certificate.

    The PublicKey of a node is also known as a NodeId. This PublicKey is included in the TLS certificate presented during the handshake when connecting. This function allows you to get the NodeId of the remote node of this connection.

    -
    Source

    pub fn stable_id(&self) -> usize

    A stable identifier for this connection.

    +
    Source

    pub fn stable_id(&self) -> usize

    A stable identifier for this connection.

    Peer addresses and connection IDs can change, but this value will remain fixed for the lifetime of the connection.

    -
    Source

    pub fn export_keying_material( +

    Source

    pub fn export_keying_material( &self, output: &mut [u8], label: &[u8], @@ -96,14 +96,14 @@ arguments and output buffers of equal length, they will get the same sequence of bytes in output. These bytes are cryptographically strong and pseudorandom, and are suitable for use as keying material.

    See RFC5705 for more information.

    -

    Source

    pub fn set_max_concurrent_uni_streams(&self, count: VarInt)

    Modifies the number of unidirectional streams that may be concurrently opened.

    +
    Source

    pub fn set_max_concurrent_uni_streams(&self, count: VarInt)

    Modifies the number of unidirectional streams that may be concurrently opened.

    No streams may be opened by the peer unless fewer than count are already open. Large counts increase both minimum and worst-case memory consumption.

    -
    Source

    pub fn set_receive_window(&self, receive_window: VarInt)

    Source

    pub fn set_max_concurrent_bi_streams(&self, count: VarInt)

    Modifies the number of bidirectional streams that may be concurrently opened.

    +
    Source

    pub fn set_receive_window(&self, receive_window: VarInt)

    Source

    pub fn set_max_concurrent_bi_streams(&self, count: VarInt)

    Modifies the number of bidirectional streams that may be concurrently opened.

    No streams may be opened by the peer unless fewer than count are already open. Large counts increase both minimum and worst-case memory consumption.

    -

    Trait Implementations§

    Source§

    impl Clone for Connection

    Source§

    fn clone(&self) -> Connection

    Returns a copy 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 Connection

    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 +

    Trait Implementations§

    Source§

    impl Clone for Connection

    Source§

    fn clone(&self) -> Connection

    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 Connection

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -111,24 +111,31 @@ open. Large counts increase both minimum and worst-case memory cons class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ConnectionClose.html b/pr/3367/docs/iroh/endpoint/struct.ConnectionClose.html index 5b54e098e0..70bf742b43 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ConnectionClose.html +++ b/pr/3367/docs/iroh/endpoint/struct.ConnectionClose.html @@ -1,4 +1,4 @@ -ConnectionClose in iroh::endpoint - Rust

    Struct ConnectionClose

    pub struct ConnectionClose {
    +ConnectionClose in iroh::endpoint - Rust

    ConnectionClose

    Struct ConnectionClose 

    pub struct ConnectionClose {
         pub error_code: Code,
         pub frame_type: Option<FrameType>,
         pub reason: Bytes,
    @@ -6,7 +6,7 @@
     

    Fields§

    §error_code: Code

    Class of error as encoded in the specification

    §frame_type: Option<FrameType>

    Type of frame that caused the close

    §reason: Bytes

    Human-readable reason for the close

    -

    Trait Implementations§

    §

    impl Clone for ConnectionClose

    §

    fn clone(&self) -> ConnectionClose

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectionClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ConnectionClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Error> for ConnectionClose

    §

    fn from(x: Error) -> ConnectionClose

    Converts to this type from the input type.
    §

    impl PartialEq for ConnectionClose

    §

    fn eq(&self, other: &ConnectionClose) -> 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, +

    Trait Implementations§

    §

    impl Clone for ConnectionClose

    §

    fn clone(&self) -> ConnectionClose

    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
    §

    impl Debug for ConnectionClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for ConnectionClose

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Error> for ConnectionClose

    §

    fn from(x: Error) -> ConnectionClose

    Converts to this type from the input type.
    §

    impl PartialEq for ConnectionClose

    §

    fn eq(&self, other: &ConnectionClose) -> 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.
    §

    impl Eq for ConnectionClose

    §

    impl StructuralPartialEq for ConnectionClose

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -15,29 +15,38 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ConnectionStats.html b/pr/3367/docs/iroh/endpoint/struct.ConnectionStats.html index ce26d66220..f8c4016ee2 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ConnectionStats.html +++ b/pr/3367/docs/iroh/endpoint/struct.ConnectionStats.html @@ -1,4 +1,4 @@ -ConnectionStats in iroh::endpoint - Rust

    Struct ConnectionStats

    #[non_exhaustive]
    pub struct ConnectionStats { +ConnectionStats in iroh::endpoint - Rust

    ConnectionStats

    Struct ConnectionStats 

    #[non_exhaustive]
    pub struct ConnectionStats { pub udp_tx: UdpStats, pub udp_rx: UdpStats, pub frame_tx: FrameStats, @@ -10,7 +10,7 @@
    §frame_tx: FrameStats

    Statistics about frames transmitted on a connection

    §frame_rx: FrameStats

    Statistics about frames received on a connection

    §path: PathStats

    Statistics related to the current transmission path

    -

    Trait Implementations§

    §

    impl Clone for ConnectionStats

    §

    fn clone(&self) -> ConnectionStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ConnectionStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ConnectionStats

    §

    fn default() -> ConnectionStats

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

    impl Copy for ConnectionStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for ConnectionStats

    §

    fn clone(&self) -> ConnectionStats

    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
    §

    impl Debug for ConnectionStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for ConnectionStats

    §

    fn default() -> ConnectionStats

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

    impl Copy for ConnectionStats

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -18,24 +18,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.CryptoError.html b/pr/3367/docs/iroh/endpoint/struct.CryptoError.html index d9bb131b90..32fafe0fb2 100644 --- a/pr/3367/docs/iroh/endpoint/struct.CryptoError.html +++ b/pr/3367/docs/iroh/endpoint/struct.CryptoError.html @@ -1,4 +1,4 @@ -CryptoError in iroh::endpoint - Rust

    Struct CryptoError

    pub struct CryptoError;
    Expand description

    Generic crypto errors

    +CryptoError in iroh::endpoint - Rust

    CryptoError

    Struct CryptoError 

    pub struct CryptoError;
    Expand description

    Generic crypto errors

    Trait Implementations§

    §

    impl Debug for CryptoError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Unspecified> for CryptoError

    §

    fn from(_: Unspecified) -> CryptoError

    Converts to this type from the input type.

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -7,20 +7,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3367/docs/iroh/endpoint/struct.DirectAddr.html index a1264e2e46..75d437505b 100644 --- a/pr/3367/docs/iroh/endpoint/struct.DirectAddr.html +++ b/pr/3367/docs/iroh/endpoint/struct.DirectAddr.html @@ -1,4 +1,4 @@ -DirectAddr in iroh::endpoint - Rust

    Struct DirectAddr

    Source
    pub struct DirectAddr {
    +DirectAddr in iroh::endpoint - Rust

    DirectAddr

    Struct DirectAddr 

    Source
    pub struct DirectAddr {
         pub addr: SocketAddr,
         pub typ: DirectAddrType,
     }
    Expand description

    A direct address on which an iroh-node might be contactable.

    @@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog iroh node, see DirectAddrType for the several kinds of sources.

    Fields§

    §addr: SocketAddr

    The address.

    §typ: DirectAddrType

    The origin of this direct address.

    -

    Trait Implementations§

    Source§

    impl Clone for DirectAddr

    Source§

    fn clone(&self) -> DirectAddr

    Returns a copy 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 DirectAddr

    Source§

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

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

    impl Hash for DirectAddr

    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 +

    Trait Implementations§

    Source§

    impl Clone for DirectAddr

    Source§

    fn clone(&self) -> DirectAddr

    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 DirectAddr

    Source§

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

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

    impl Hash for DirectAddr

    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 Ord for DirectAddr

    Source§

    fn cmp(&self, other: &DirectAddr) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for DirectAddr

    Source§

    fn eq(&self, other: &DirectAddr) -> 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 PartialOrd for DirectAddr

    Source§

    fn partial_cmp(&self, other: &DirectAddr) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Eq for DirectAddr

    Source§

    impl StructuralPartialEq for DirectAddr

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for DirectAddr

    Source§

    fn cmp(&self, other: &DirectAddr) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for DirectAddr

    Source§

    fn eq(&self, other: &DirectAddr) -> 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 PartialOrd for DirectAddr

    Source§

    fn partial_cmp(&self, other: &DirectAddr) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Eq for DirectAddr

    Source§

    impl StructuralPartialEq for DirectAddr

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -24,30 +24,37 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.DirectAddrInfo.html b/pr/3367/docs/iroh/endpoint/struct.DirectAddrInfo.html index 4f70915715..89be624848 100644 --- a/pr/3367/docs/iroh/endpoint/struct.DirectAddrInfo.html +++ b/pr/3367/docs/iroh/endpoint/struct.DirectAddrInfo.html @@ -1,4 +1,4 @@ -DirectAddrInfo in iroh::endpoint - Rust

    Struct DirectAddrInfo

    Source
    pub struct DirectAddrInfo {
    +DirectAddrInfo in iroh::endpoint - Rust

    DirectAddrInfo

    Struct DirectAddrInfo 

    Source
    pub struct DirectAddrInfo {
         pub addr: SocketAddr,
         pub latency: Option<Duration>,
         pub last_control: Option<(Duration, ControlMsg)>,
    @@ -29,17 +29,16 @@ It may not mean the path is usable.  However, if there was any communication wit
     the remote node over this network path it also means the path exists.

    The elapsed time since any confirmation of the path’s existence was received is returned. If the remote node moved networks and no longer has this path, this could -be a long duration. If the path was added via Endpoint::add_node_addr or some -node discovery the path may never have been known to exist.

    +be a long duration.

    §sources: HashMap<Source, Duration>

    A HashMap of Sources to Durations.

    The Duration indicates the elapsed time since this source last recorded this address.

    The Duration will always indicate the most recent time the source recorded this address.

    -

    Trait Implementations§

    Source§

    impl Clone for DirectAddrInfo

    Source§

    fn clone(&self) -> DirectAddrInfo

    Returns a copy 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 DirectAddrInfo

    Source§

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

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

    impl<'de> Deserialize<'de> for DirectAddrInfo

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl PartialEq for DirectAddrInfo

    Source§

    fn eq(&self, other: &DirectAddrInfo) -> 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 Serialize for DirectAddrInfo

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for DirectAddrInfo

    Source§

    impl StructuralPartialEq for DirectAddrInfo

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for DirectAddrInfo

    Source§

    fn clone(&self) -> DirectAddrInfo

    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 DirectAddrInfo

    Source§

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

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

    impl<'de> Deserialize<'de> for DirectAddrInfo

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl PartialEq for DirectAddrInfo

    Source§

    fn eq(&self, other: &DirectAddrInfo) -> 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 Serialize for DirectAddrInfo

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for DirectAddrInfo

    Source§

    impl StructuralPartialEq for DirectAddrInfo

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -47,29 +46,36 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Endpoint.html b/pr/3367/docs/iroh/endpoint/struct.Endpoint.html index df4a3a3800..e5d3fd16e2 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Endpoint.html +++ b/pr/3367/docs/iroh/endpoint/struct.Endpoint.html @@ -1,4 +1,4 @@ -Endpoint in iroh::endpoint - Rust

    Struct Endpoint

    Source
    pub struct Endpoint { /* private fields */ }
    Expand description

    Controls an iroh node, establishing connections with other nodes.

    +Endpoint in iroh::endpoint - Rust

    Endpoint

    Struct Endpoint 

    Source
    pub struct Endpoint { /* private fields */ }
    Expand description

    Controls an iroh node, establishing connections with other nodes.

    This is the main API interface to create connections to, and accept connections from other iroh nodes. The connections are peer-to-peer and encrypted, a Relay server is used to make the connections reliable. See the [crate docs] for a more detailed @@ -16,24 +16,23 @@ the peer are created using the Connection::open_uni and Connection::open_bi functions.

    Note that due to the light-weight properties of streams a stream will only be accepted once the initiating peer has sent some data on it.

    -

    Implementations§

    Source§

    impl Endpoint

    Source

    pub fn builder() -> Builder

    Returns the builder for an Endpoint, with a production configuration.

    -
    Source

    pub fn set_alpns(&self, alpns: Vec<Vec<u8>>)

    Sets the list of accepted ALPN protocols.

    +

    Implementations§

    Source§

    impl Endpoint

    Source

    pub fn builder() -> Builder

    Returns the builder for an Endpoint, with a production configuration.

    +
    Source

    pub fn set_alpns(&self, alpns: Vec<Vec<u8>>)

    Sets the list of accepted ALPN protocols.

    This will only affect new incoming connections. Note that this overrides the current list of ALPNs.

    -
    Source

    pub async fn connect( +

    Source

    pub async fn connect( &self, node_addr: impl Into<NodeAddr>, alpn: &[u8], ) -> Result<Connection, ConnectError>

    Connects to a remote Endpoint.

    A value that can be converted into a NodeAddr is required. This can be either a -NodeAddr, a NodeId or a iroh_base::ticket::NodeTicket.

    +NodeAddr, a NodeId or a [iroh_base::ticket::NodeTicket].

    The NodeAddr must contain the NodeId to dial and may also contain a RelayUrl and direct addresses. If direct addresses are provided, they will be used to try and establish a direct connection without involving a relay server.

    If neither a RelayUrl or direct addresses are configured in the NodeAddr it -may still be possible a connection can be established. This depends on other calls -to Endpoint::add_node_addr which may provide contact information, or via the -Discovery service configured using Builder::discovery. The discovery +may still be possible a connection can be established. This depends on which, if any, +crate::discovery::Discovery services were configured using Builder::discovery. The discovery service will also be used if the remote node is not reachable on the provided direct addresses and there is no RelayUrl.

    If addresses or relay servers are neither provided nor can be discovered, the @@ -41,7 +40,7 @@ connection attempt will fail with an error.

    The alpn, or application-level protocol identifier, is also required. The remote endpoint must support this alpn, otherwise the connection attempt will fail with an error.

    -
    Source

    pub async fn connect_with_opts( +

    Source

    pub async fn connect_with_opts( &self, node_addr: impl Into<NodeAddr>, alpn: &[u8], @@ -61,26 +60,13 @@ security concerns. establishing and maintaining direct connections. Carefully test settings you use and consider this currently as still rather experimental. -

    Source

    pub fn accept(&self) -> Accept<'_> ⓘ

    Accepts an incoming connection on the endpoint.

    +
    Source

    pub fn accept(&self) -> Accept<'_> ⓘ

    Accepts an incoming connection on the endpoint.

    Only connections with the ALPNs configured in Builder::alpns will be accepted. If multiple ALPNs have been configured the ALPN can be inspected before accepting the connection using Connecting::alpn.

    The returned future will yield None if the endpoint is closed by calling Endpoint::close.

    -
    Source

    pub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), AddNodeAddrError>

    Informs this Endpoint about addresses of the iroh node.

    -

    This updates the local state for the remote node. If the provided NodeAddr -contains a RelayUrl this will be used as the new relay server for this node. If -it contains any new IP endpoints they will also be stored and tried when next -connecting to this node. Any address that matches this node’s direct addresses will be -silently ignored.

    -

    See also Endpoint::add_node_addr_with_source.

    -
    §Using node discovery instead
    -

    It is strongly advised to use node discovery using the StaticProvider instead. -This provides more flexibility and future proofing.

    -
    §Errors
    -

    Will return an error if we attempt to add our own NodeId to the node map or -if the direct addresses are a subset of ours.

    -
    Source

    pub fn add_node_addr_with_source( +

    Source

    pub fn add_node_addr_with_source( &self, node_addr: NodeAddr, source: &'static str, @@ -90,109 +76,66 @@ if the direct addresses are a subset of ours.

    new IP endpoints they will also be stored and tried when next connecting to this node. Any address that matches this node’s direct addresses will be silently ignored. The source is used for logging exclusively and will not be stored.

    -

    §Using node discovery instead
    +
    §Using node discovery instead

    It is strongly advised to use node discovery using the StaticProvider instead. This provides more flexibility and future proofing.

    -
    §Errors
    +
    §Errors

    Will return an error if we attempt to add our own NodeId to the node map or if the direct addresses are a subset of ours.

    -
    Source

    pub fn secret_key(&self) -> &SecretKey

    Returns the secret_key of this endpoint.

    -
    Source

    pub fn node_id(&self) -> NodeId

    Returns the node id of this endpoint.

    +
    Source

    pub fn secret_key(&self) -> &SecretKey

    Returns the secret_key of this endpoint.

    +
    Source

    pub fn node_id(&self) -> NodeId

    Returns the node id of this endpoint.

    This ID is the unique addressing information of this node and other peers must know it to be able to connect to this node.

    -
    Source

    pub fn node_addr(&self) -> impl Watcher<Value = Option<NodeAddr>>

    Available on non-wasm_browser only.

    Returns a Watcher for the current NodeAddr for this endpoint.

    -

    The observed NodeAddr will have the current RelayUrl and direct addresses -as they would be returned by Endpoint::home_relay and Endpoint::direct_addresses.

    -

    Use Watcher::initialized to wait for a NodeAddr that is ready to be connected to:

    +
    Source

    pub fn node_addr(&self) -> NodeAddr

    Returns the current NodeAddr. +As long as the endpoint was able to binde to a network interfaces, some +local addresses will be available.

    +

    The state of other fields depends on the state of networking and connectivity. +Use the Endpoint::online method to ensure that the endpoint is considered +“online” (has contacted a relay server) before calling this method, if you want +to ensure that the NodeAddr will contain enough information to allow this endpoint +to be dialable by a remote endpoint over the internet.

    +

    You can use the Endpoint::watch_node_addr method to get updates when the NodeAddr +changes.

    +
    Source

    pub fn watch_node_addr(&self) -> impl Watcher<Value = NodeAddr> + use<>

    Available on non-wasm_browser only.

    Returns a Watcher for the current NodeAddr for this endpoint.

    +

    The observed NodeAddr will have the current RelayUrl and direct addresses.

    -
    use iroh::Endpoint;
    -use n0_watcher::Watcher;
    +
    use iroh::{Endpoint, Watcher};
     
     let endpoint = Endpoint::builder()
         .alpns(vec![b"my-alpn".to_vec()])
         .bind()
         .await?;
    -let node_addr = endpoint.node_addr().initialized().await?;
    -
    Source

    pub fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>>

    Returns a Watcher for the RelayUrl of the Relay server used as home relay.

    -

    Every endpoint has a home Relay server which it chooses as the server with the -lowest latency out of the configured servers provided by Builder::relay_mode. -This is the server other iroh nodes can use to reliably establish a connection -to this node.

    -

    The watcher stores None if we are not connected to any Relay server.

    -

    Note that this will store None right after the Endpoint is created since it takes -some time to connect to find and connect to the home relay server.

    -
    §Examples
    -

    To wait for a home relay connection to be established, use Watcher::initialized:

    - -
    use iroh::Endpoint;
    -use n0_future::StreamExt;
    -use n0_watcher::Watcher as _;
    -
    -let mep = Endpoint::builder().bind().await.unwrap();
    -let _relay_url = mep.home_relay().initialized().await.unwrap();
    -
    Source

    pub fn direct_addresses(&self) -> Direct<Option<BTreeSet<DirectAddr>>>

    Returns a Watcher for the direct addresses of this Endpoint.

    -

    The direct addresses of the Endpoint are those that could be used by other -iroh nodes to establish direct connectivity, depending on the network -situation. The yielded lists of direct addresses contain both the locally-bound -addresses and the Endpoint’s publicly reachable addresses discovered through -mechanisms such as QAD and port mapping. Hence usually only a subset of these -will be applicable to a certain remote iroh node.

    -

    The Endpoint continuously monitors the direct addresses for changes as its own -location in the network might change. Whenever changes are detected this stream -will yield a new list of direct addresses.

    -

    When issuing the first call to this method the first direct address discovery might -still be underway, in this case the Watcher might not be initialized with Some -value yet. Once the first set of local direct addresses are discovered the Watcher -will always return Some set of direct addresses immediately, which are the most -recently discovered direct addresses.

    -
    §Examples
    -

    To get the first set of direct addresses use Watcher::initialized:

    - -
    use iroh::Endpoint;
    -use n0_future::StreamExt;
    -use n0_watcher::Watcher as _;
    -
    -let mep = Endpoint::builder().bind().await.unwrap();
    -let _addrs = mep.direct_addresses().initialized().await.unwrap();
    -
    Source

    pub fn bound_sockets(&self) -> Vec<SocketAddr>

    Returns the local socket addresses on which the underlying sockets are bound.

    +let node_addr = endpoint.watch_node_addr().get();
    +

    The Endpoint::online method can be used as a convenience method to +understand if the endpoint has ever been considered “online”. But after +that initial call to Endpoint::online, to understand if your +endpoint is no longer able to be connected to by endpoints outside +of the private or local network, watch for changes in it’s NodeAddr. +If the relay_url is None or if there are no direct_addresses in +the NodeAddr, you may not be dialable by other endpoints on the internet.

    +

    The NodeAddr will change as:

    +
      +
    • network conditions change
    • +
    • the endpoint connects to a relay server
    • +
    • the endpoint changes its preferred relay server
    • +
    • more addresses are discovered for this endpoint
    • +
    +
    Source

    pub async fn online(&self)

    A convenience method that waits for the endpoint to be considered “online”.

    +

    This currently means at least one relay server was connected, +and at least one local IP address is available. +Event if no relays are configured, this will still wait for a relay connection.

    +

    Once this has been resolved once, this will always immediately resolve.

    +

    This has no timeout, so if that is needed, you need to wrap it in a +timeout. We recommend using a timeout close to +crate::net_report::TIMEOUT, so you can be sure that at least one +crate::net_report::Report has been attempted.

    +

    To understand if the endpoint has gone back “offline”, +you must use the Endpoint::watch_node_addr method, to +get information on the current relay and direct address information.

    +
    Source

    pub fn bound_sockets(&self) -> Vec<SocketAddr>

    Returns the local socket addresses on which the underlying sockets are bound.

    The Endpoint always binds on an IPv4 address and also tries to bind on an IPv6 address if available.

    -
    Source

    pub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo>

    Returns information about the remote node identified by a NodeId.

    -

    The Endpoint keeps some information about remote iroh nodes, which it uses to find -the best path to a node. Having information on a remote node, however, does not mean we have -ever connected to it to or even whether a connection is even possible. The information about a -remote node will change over time, as the Endpoint learns more about the node. Future -calls may return different information. Furthermore, node information may even be -completely evicted as it becomes stale.

    -

    See also Endpoint::remote_info_iter which returns information on all nodes known -by this Endpoint.

    -
    Source

    pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo>

    Returns information about all the remote nodes this Endpoint knows about.

    -

    This returns the same information as Endpoint::remote_info for each node known to this -Endpoint.

    -

    The Endpoint keeps some information about remote iroh nodes, which it uses to find -the best path to a node. This returns all the nodes it knows about, regardless of whether a -connection was ever made or is even possible.

    -

    See also Endpoint::remote_info to only retrieve information about a single node.

    -
    Source

    pub fn discovery_stream( - &self, -) -> impl Stream<Item = Result<DiscoveryItem, Lagged>>

    Returns a stream of all remote nodes discovered through the endpoint’s discovery services.

    -

    Whenever a node is discovered via the endpoint’s discovery service, the corresponding -DiscoveryItem is yielded from this stream. This includes nodes discovered actively -through Discovery::resolve, which is invoked automatically when calling -Endpoint::connect for a NodeId unknown to the endpoint. It also includes -nodes that the endpoint discovers passively from discovery services that implement -Discovery::subscribe, which e.g. MdnsDiscovery does.

    -

    The stream does not yield information about nodes that are added manually to the endpoint’s -addressbook by calling Endpoint::add_node_addr or by supplying a full NodeAddr to -Endpoint::connect. It also does not yield information about nodes that we only -know about because they connected to us. When using the StaticProvider discovery, -discovery info is only emitted once connecting to a node added to the static provider, not -at the time of adding it to the static provider.

    -

    The stream should be processed in a loop. If the stream is not processed fast enough, -Lagged may be yielded, indicating that items were missed.

    -

    See also Endpoint::remote_info_iter, which returns an iterator over all remotes -the endpoint knows about at a specific point in time.

    -
    Source

    pub fn conn_type(&self, node_id: NodeId) -> Option<Direct<ConnectionType>>

    Returns a Watcher that reports the current connection type and any changes for +

    Source

    pub fn conn_type(&self, node_id: NodeId) -> Option<Direct<ConnectionType>>

    Returns a Watcher that reports the current connection type and any changes for given remote node.

    This watcher allows observing a stream of ConnectionType items by calling Watcher::stream(). If the underlying connection to a remote node changes, it will @@ -210,11 +153,13 @@ or

    Source

    pub fn dns_resolver(&self) -> &DnsResolver

    Available on non-wasm_browser only.

    Returns the DNS resolver used in this Endpoint.

    +
    Source

    pub fn latency(&self, node_id: NodeId) -> Option<Duration>

    Returns the currently lowest latency for this node.

    +

    Will return None if we do not have any address information for the given node_id.

    +
    Source

    pub fn dns_resolver(&self) -> &DnsResolver

    Available on non-wasm_browser only.

    Returns the DNS resolver used in this Endpoint.

    See Builder::dns_resolver.

    -
    Source

    pub fn discovery(&self) -> Option<&dyn Discovery>

    Returns the discovery mechanism, if configured.

    +
    Source

    pub fn discovery(&self) -> &ConcurrentDiscovery

    Returns the discovery mechanism, if configured.

    See Builder::discovery.

    -
    Source

    pub fn metrics(&self) -> &EndpointMetrics

    Available on crate feature metrics only.

    Returns metrics collected for this endpoint.

    +
    Source

    pub fn metrics(&self) -> &EndpointMetrics

    Available on crate feature metrics only.

    Returns metrics collected for this endpoint.

    The endpoint internally collects various metrics about its operation. The returned EndpointMetrics struct contains all of these metrics.

    You can access individual metrics directly by using the public fields:

    @@ -284,8 +229,7 @@ registry.write().unwrap().register_all(endpoint.metrics()); .context("text")?; assert!(res.contains(r#"TYPE magicsock_recv_datagrams counter"#)); -assert!(res.contains(r#"magicsock_recv_datagrams_total 0"#));
    -
    Source

    pub async fn network_change(&self)

    Notifies the system of potential network changes.

    +assert!(res.contains(r#"magicsock_recv_datagrams_total 0"#));
    Source

    pub async fn network_change(&self)

    Notifies the system of potential network changes.

    On many systems iroh is able to detect network changes by itself, however some systems like android do not expose this functionality to native code. Android does however provide this functionality to Java code. This @@ -293,12 +237,12 @@ function allows for notifying iroh of any potential network changes like this.

    Even when the network did not change, or iroh was already able to detect the network change itself, there is no harm in calling this function.

    -
    Source

    pub fn set_user_data_for_discovery(&self, user_data: Option<UserData>)

    Sets the initial user-defined data to be published in discovery services for this node.

    +
    Source

    pub fn set_user_data_for_discovery(&self, user_data: Option<UserData>)

    Sets the initial user-defined data to be published in discovery services for this node.

    If the user-defined data passed to this function is different to the previous one, the endpoint will republish its node info to the configured discovery services.

    See also Builder::user_data_for_discovery for setting an initial value when building the endpoint.

    -
    Source

    pub async fn close(&self)

    Closes the QUIC endpoint and the magic socket.

    +
    Source

    pub async fn close(&self)

    Closes the QUIC endpoint and the magic socket.

    This will close any remaining open Connections with an error code of 0 and an empty reason. Though it is best practice to close those explicitly before with a custom error code and reason.

    @@ -324,8 +268,8 @@ while TCP sockets usually get closed and drained by the operating system in the kernel during the “Time-Wait” period of the TCP socket.

    Be aware however that the underlying UDP sockets are only closed once all clones of the the respective Endpoint are dropped.

    -
    Source

    pub fn is_closed(&self) -> bool

    Check if this endpoint is still alive, or already closed.

    -

    Trait Implementations§

    Source§

    impl Clone for Endpoint

    Source§

    fn clone(&self) -> Endpoint

    Returns a copy 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 Endpoint

    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 +

    Source

    pub fn is_closed(&self) -> bool

    Check if this endpoint is still alive, or already closed.

    +

    Trait Implementations§

    Source§

    impl Clone for Endpoint

    Source§

    fn clone(&self) -> Endpoint

    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 Endpoint

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -333,24 +277,31 @@ the the respective bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ExportKeyingMaterialError.html b/pr/3367/docs/iroh/endpoint/struct.ExportKeyingMaterialError.html index 80abab4e4b..aa4d7653ac 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ExportKeyingMaterialError.html +++ b/pr/3367/docs/iroh/endpoint/struct.ExportKeyingMaterialError.html @@ -1,6 +1,6 @@ -ExportKeyingMaterialError in iroh::endpoint - Rust

    Struct ExportKeyingMaterialError

    pub struct ExportKeyingMaterialError;
    Expand description

    Error returned by [Session::export_keying_material].

    +ExportKeyingMaterialError in iroh::endpoint - Rust

    ExportKeyingMaterialError

    Struct ExportKeyingMaterialError 

    pub struct ExportKeyingMaterialError;
    Expand description

    Error returned by [Session::export_keying_material].

    This error occurs if the requested output length is too large.

    -

    Trait Implementations§

    §

    impl Debug for ExportKeyingMaterialError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for ExportKeyingMaterialError

    §

    fn eq(&self, other: &ExportKeyingMaterialError) -> 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, +

    Trait Implementations§

    §

    impl Debug for ExportKeyingMaterialError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for ExportKeyingMaterialError

    §

    fn eq(&self, other: &ExportKeyingMaterialError) -> 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.
    §

    impl Eq for ExportKeyingMaterialError

    §

    impl StructuralPartialEq for ExportKeyingMaterialError

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -9,24 +9,31 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.FrameStats.html b/pr/3367/docs/iroh/endpoint/struct.FrameStats.html index 6c8f2d0956..eb1985899c 100644 --- a/pr/3367/docs/iroh/endpoint/struct.FrameStats.html +++ b/pr/3367/docs/iroh/endpoint/struct.FrameStats.html @@ -1,4 +1,4 @@ -FrameStats in iroh::endpoint - Rust

    Struct FrameStats

    #[non_exhaustive]
    pub struct FrameStats {
    Show 25 fields +FrameStats in iroh::endpoint - Rust

    FrameStats

    Struct FrameStats 

    #[non_exhaustive]
    pub struct FrameStats {
    Show 25 fields pub acks: u64, pub ack_frequency: u64, pub crypto: u64, @@ -25,7 +25,7 @@ pub stream: u64, pub observed_addr: u64,
    }
    Expand description

    Number of frames transmitted of each frame type

    -

    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.
    §acks: u64§ack_frequency: u64§crypto: u64§connection_close: u64§data_blocked: u64§datagram: u64§handshake_done: u8§immediate_ack: u64§max_data: u64§max_stream_data: u64§max_streams_bidi: u64§max_streams_uni: u64§new_connection_id: u64§new_token: u64§path_challenge: u64§path_response: u64§ping: u64§reset_stream: u64§retire_connection_id: u64§stream_data_blocked: u64§streams_blocked_bidi: u64§streams_blocked_uni: u64§stop_sending: u64§stream: u64§observed_addr: u64

    Trait Implementations§

    §

    impl Clone for FrameStats

    §

    fn clone(&self) -> FrameStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for FrameStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for FrameStats

    §

    fn default() -> FrameStats

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

    impl Copy for FrameStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    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.
    §acks: u64§ack_frequency: u64§crypto: u64§connection_close: u64§data_blocked: u64§datagram: u64§handshake_done: u8§immediate_ack: u64§max_data: u64§max_stream_data: u64§max_streams_bidi: u64§max_streams_uni: u64§new_connection_id: u64§new_token: u64§path_challenge: u64§path_response: u64§ping: u64§reset_stream: u64§retire_connection_id: u64§stream_data_blocked: u64§streams_blocked_bidi: u64§streams_blocked_uni: u64§stop_sending: u64§stream: u64§observed_addr: u64

    Trait Implementations§

    §

    impl Clone for FrameStats

    §

    fn clone(&self) -> FrameStats

    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
    §

    impl Debug for FrameStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for FrameStats

    §

    fn default() -> FrameStats

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

    impl Copy for FrameStats

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -33,24 +33,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Incoming.html b/pr/3367/docs/iroh/endpoint/struct.Incoming.html index 18c3b563be..20aceca825 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Incoming.html +++ b/pr/3367/docs/iroh/endpoint/struct.Incoming.html @@ -1,29 +1,29 @@ -Incoming in iroh::endpoint - Rust

    Struct Incoming

    Source
    pub struct Incoming { /* private fields */ }
    Expand description

    An incoming connection for which the server has not yet begun its parts of the +Incoming in iroh::endpoint - Rust

    Incoming

    Struct Incoming 

    Source
    pub struct Incoming { /* private fields */ }
    Expand description

    An incoming connection for which the server has not yet begun its parts of the handshake.

    -

    Implementations§

    Source§

    impl Incoming

    Source

    pub fn accept(self) -> Result<Connecting, ConnectionError>

    Attempts to accept this incoming connection (an error may still occur).

    +

    Implementations§

    Source§

    impl Incoming

    Source

    pub fn accept(self) -> Result<Connecting, ConnectionError>

    Attempts to accept this incoming connection (an error may still occur).

    Errors occurring here are likely not caused by the application or remote. The QUIC connection listens on a normal UDP socket and any reachable network endpoint can send datagrams to it, solicited or not. Even if the first few bytes look like a QUIC packet, it might not even be a QUIC packet that is being received.

    Thus it is common to simply log the errors here and accept them as something which can happen.

    -
    Source

    pub fn accept_with( +

    Source

    pub fn accept_with( self, server_config: Arc<ServerConfig>, ) -> Result<Connecting, ConnectionError>

    Accepts this incoming connection using a custom configuration.

    See accept() for more details.

    -
    Source

    pub fn refuse(self)

    Rejects this incoming connection attempt.

    -
    Source

    pub fn retry(self) -> Result<(), RetryError>

    Responds with a retry packet.

    +
    Source

    pub fn refuse(self)

    Rejects this incoming connection attempt.

    +
    Source

    pub fn retry(self) -> Result<(), RetryError>

    Responds with a retry packet.

    This requires the client to retry with address validation.

    Errors if remote_address_validated() is true.

    -
    Source

    pub fn ignore(self)

    Ignores this incoming connection attempt, not sending any packet in response.

    -
    Source

    pub fn local_ip(&self) -> Option<IpAddr>

    Returns the local IP address which was used when the peer established the +

    Source

    pub fn ignore(self)

    Ignores this incoming connection attempt, not sending any packet in response.

    +
    Source

    pub fn local_ip(&self) -> Option<IpAddr>

    Returns the local IP address which was used when the peer established the connection.

    -
    Source

    pub fn remote_address(&self) -> SocketAddr

    Returns the peer’s UDP address.

    -
    Source

    pub fn remote_address_validated(&self) -> bool

    Whether the socket address that is initiating this connection has been validated.

    +
    Source

    pub fn remote_address(&self) -> SocketAddr

    Returns the peer’s UDP address.

    +
    Source

    pub fn remote_address_validated(&self) -> bool

    Whether the socket address that is initiating this connection has been validated.

    This means that the sender of the initial packet has proved that they can receive traffic sent to self.remote_address().

    -

    Trait Implementations§

    Source§

    impl Debug for Incoming

    Source§

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

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

    impl IntoFuture for Incoming

    Source§

    type Output = Result<Connection, ConnectionError>

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

    type IntoFuture = IncomingFuture

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

    fn into_future(self) -> Self::IntoFuture

    Creates a future from a value. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Incoming

    Source§

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

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

    impl IntoFuture for Incoming

    Source§

    type Output = Result<Connection, ConnectionError>

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

    type IntoFuture = IncomingFuture

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

    fn into_future(self) -> Self::IntoFuture

    Creates a future from a value. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -31,20 +31,27 @@ traffic sent to self.remote_address().

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.IncomingFuture.html b/pr/3367/docs/iroh/endpoint/struct.IncomingFuture.html index 8598f298b9..fafbf8ddfe 100644 --- a/pr/3367/docs/iroh/endpoint/struct.IncomingFuture.html +++ b/pr/3367/docs/iroh/endpoint/struct.IncomingFuture.html @@ -1,6 +1,6 @@ -IncomingFuture in iroh::endpoint - Rust

    Struct IncomingFuture

    Source
    pub struct IncomingFuture { /* private fields */ }
    Expand description

    Adaptor to let Incoming be awaited like a Connecting.

    -

    Trait Implementations§

    Source§

    impl Debug for IncomingFuture

    Source§

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

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

    impl Future for IncomingFuture

    Source§

    type Output = Result<Connection, ConnectionError>

    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> Unpin for IncomingFuture
    where +IncomingFuture in iroh::endpoint - Rust

    IncomingFuture

    Struct IncomingFuture 

    Source
    pub struct IncomingFuture { /* private fields */ }
    Expand description

    Adaptor to let Incoming be awaited like a Connecting.

    +

    Trait Implementations§

    Source§

    impl Debug for IncomingFuture

    Source§

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

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

    impl Future for IncomingFuture

    Source§

    type Output = Result<Connection, ConnectionError>

    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> Unpin for IncomingFuture
    where PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -9,19 +9,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -51,14 +64,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -67,13 +80,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -81,7 +101,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -124,10 +144,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.MtuDiscoveryConfig.html b/pr/3367/docs/iroh/endpoint/struct.MtuDiscoveryConfig.html index 6bb0b7e49e..6f93e4f8ab 100644 --- a/pr/3367/docs/iroh/endpoint/struct.MtuDiscoveryConfig.html +++ b/pr/3367/docs/iroh/endpoint/struct.MtuDiscoveryConfig.html @@ -1,4 +1,4 @@ -MtuDiscoveryConfig in iroh::endpoint - Rust

    Struct MtuDiscoveryConfig

    pub struct MtuDiscoveryConfig { /* private fields */ }
    Expand description

    Parameters governing MTU discovery.

    +MtuDiscoveryConfig in iroh::endpoint - Rust

    MtuDiscoveryConfig

    Struct MtuDiscoveryConfig 

    pub struct MtuDiscoveryConfig { /* private fields */ }
    Expand description

    Parameters governing MTU discovery.

    §The why of MTU discovery

    By design, QUIC ensures during the handshake that the network path between the client and the server is able to transmit unfragmented UDP packets with a body of 1200 bytes. In other words, @@ -60,7 +60,7 @@ before running again. Defaults to one minute.

    try MTU discovery again after a short period of time.

    pub fn minimum_change(&mut self, value: u16) -> &mut MtuDiscoveryConfig

    Specifies the minimum MTU change to stop the MTU discovery phase. Defaults to 20.

    -

    Trait Implementations§

    §

    impl Clone for MtuDiscoveryConfig

    §

    fn clone(&self) -> MtuDiscoveryConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for MtuDiscoveryConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for MtuDiscoveryConfig

    §

    fn default() -> MtuDiscoveryConfig

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

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for MtuDiscoveryConfig

    §

    fn clone(&self) -> MtuDiscoveryConfig

    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
    §

    impl Debug for MtuDiscoveryConfig

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for MtuDiscoveryConfig

    §

    fn default() -> MtuDiscoveryConfig

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -68,24 +68,31 @@ Defaults to 20.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.OpenBi.html b/pr/3367/docs/iroh/endpoint/struct.OpenBi.html index 724b0d1c3b..2a0d8b71d8 100644 --- a/pr/3367/docs/iroh/endpoint/struct.OpenBi.html +++ b/pr/3367/docs/iroh/endpoint/struct.OpenBi.html @@ -1,4 +1,4 @@ -OpenBi in iroh::endpoint - Rust

    Struct OpenBi

    pub struct OpenBi<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::open_bi]

    +OpenBi in iroh::endpoint - Rust

    OpenBi

    Struct OpenBi 

    pub struct OpenBi<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::open_bi]

    Trait Implementations§

    §

    impl Future for OpenBi<'_>

    §

    type Output = Result<(SendStream, RecvStream), ConnectionError>

    The type of value produced on completion.
    §

    fn poll( self: Pin<&mut OpenBi<'_>>, ctx: &mut Context<'_>, @@ -12,19 +12,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -54,14 +67,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -70,13 +83,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -84,7 +104,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -127,10 +147,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.OpenUni.html b/pr/3367/docs/iroh/endpoint/struct.OpenUni.html index 9ff8e7187c..619e22c813 100644 --- a/pr/3367/docs/iroh/endpoint/struct.OpenUni.html +++ b/pr/3367/docs/iroh/endpoint/struct.OpenUni.html @@ -1,4 +1,4 @@ -OpenUni in iroh::endpoint - Rust

    Struct OpenUni

    pub struct OpenUni<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::open_uni]

    +OpenUni in iroh::endpoint - Rust

    OpenUni

    Struct OpenUni 

    pub struct OpenUni<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::open_uni]

    Trait Implementations§

    §

    impl Future for OpenUni<'_>

    §

    type Output = Result<SendStream, ConnectionError>

    The type of value produced on completion.
    §

    fn poll( self: Pin<&mut OpenUni<'_>>, ctx: &mut Context<'_>, @@ -12,19 +12,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -54,14 +67,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -70,13 +83,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -84,7 +104,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -127,10 +147,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.PathStats.html b/pr/3367/docs/iroh/endpoint/struct.PathStats.html index bc0bcd08c3..c583329a8c 100644 --- a/pr/3367/docs/iroh/endpoint/struct.PathStats.html +++ b/pr/3367/docs/iroh/endpoint/struct.PathStats.html @@ -1,4 +1,4 @@ -PathStats in iroh::endpoint - Rust

    Struct PathStats

    #[non_exhaustive]
    pub struct PathStats { +PathStats in iroh::endpoint - Rust

    PathStats

    Struct PathStats 

    #[non_exhaustive]
    pub struct PathStats { pub rtt: Duration, pub cwnd: u64, pub congestion_events: u64, @@ -21,7 +21,7 @@ lost_bytes)

    §black_holes_detected: u64

    The number of times a black hole was detected in the path

    §current_mtu: u16

    Largest UDP payload size the path currently supports

    -

    Trait Implementations§

    §

    impl Clone for PathStats

    §

    fn clone(&self) -> PathStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for PathStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for PathStats

    §

    fn default() -> PathStats

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

    impl Copy for PathStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for PathStats

    §

    fn clone(&self) -> PathStats

    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
    §

    impl Debug for PathStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for PathStats

    §

    fn default() -> PathStats

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

    impl Copy for PathStats

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -29,24 +29,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ReadDatagram.html b/pr/3367/docs/iroh/endpoint/struct.ReadDatagram.html index 7212ac1c87..be9322da17 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ReadDatagram.html +++ b/pr/3367/docs/iroh/endpoint/struct.ReadDatagram.html @@ -1,4 +1,4 @@ -ReadDatagram in iroh::endpoint - Rust

    Struct ReadDatagram

    pub struct ReadDatagram<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::read_datagram]

    +ReadDatagram in iroh::endpoint - Rust

    ReadDatagram

    Struct ReadDatagram 

    pub struct ReadDatagram<'a> { /* private fields */ }
    Expand description

    Future produced by [Connection::read_datagram]

    Trait Implementations§

    §

    impl Future for ReadDatagram<'_>

    §

    type Output = Result<Bytes, ConnectionError>

    The type of value produced on completion.
    §

    fn poll( self: Pin<&mut ReadDatagram<'_>>, ctx: &mut Context<'_>, @@ -12,19 +12,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -54,14 +67,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -70,13 +83,20 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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,

    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<'_>, @@ -84,7 +104,7 @@ the future is ready after the first call to Future::poll. Read m F: Future<Output = Result<T, E>> + ?Sized,

    §

    type Ok = T

    §

    type Err = E

    §

    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,

    Available on crate feature sink only.
    Flattens the execution of this future when the successful result of this + 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 @@ -127,10 +147,10 @@ future is a stream. Read more

    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<V, T> VZip<V> for T
    where +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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.RecvStream.html b/pr/3367/docs/iroh/endpoint/struct.RecvStream.html index 2912c24d14..21b98bf82f 100644 --- a/pr/3367/docs/iroh/endpoint/struct.RecvStream.html +++ b/pr/3367/docs/iroh/endpoint/struct.RecvStream.html @@ -1,4 +1,4 @@ -RecvStream in iroh::endpoint - Rust

    Struct RecvStream

    pub struct RecvStream { /* private fields */ }
    Expand description

    A stream that can only be used to receive data

    +RecvStream in iroh::endpoint - Rust

    RecvStream

    Struct RecvStream 

    pub struct RecvStream { /* private fields */ }
    Expand description

    A stream that can only be used to receive data

    stop(0) is implicitly called on drop unless:

    • A variant of ReadError has been yielded by a read call
    • @@ -152,20 +152,27 @@ underlying reader. Read more
    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
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + Self: Sized,
    Creates an adaptor which reads at most limit bytes from it. 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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.RemoteInfo.html b/pr/3367/docs/iroh/endpoint/struct.RemoteInfo.html deleted file mode 100644 index 60a51e9931..0000000000 --- a/pr/3367/docs/iroh/endpoint/struct.RemoteInfo.html +++ /dev/null @@ -1,70 +0,0 @@ -RemoteInfo in iroh::endpoint - Rust

    Struct RemoteInfo

    Source
    pub struct RemoteInfo {
    -    pub node_id: NodeId,
    -    pub relay_url: Option<RelayUrlInfo>,
    -    pub addrs: Vec<DirectAddrInfo>,
    -    pub conn_type: ConnectionType,
    -    pub latency: Option<Duration>,
    -    pub last_used: Option<Duration>,
    -}
    Expand description

    Details about a remote iroh node which is known to this node.

    -

    Having details of a node does not mean it can be connected to, nor that it has ever been -connected to in the past. There are various reasons a node might be known: it could have -been manually added via Endpoint::add_node_addr, it could have been added by some -discovery mechanism, the node could have contacted this node, etc.

    -

    Fields§

    §node_id: NodeId

    The globally unique identifier for this node.

    -
    §relay_url: Option<RelayUrlInfo>

    Relay server information, if available.

    -
    §addrs: Vec<DirectAddrInfo>

    The addresses at which this node might be reachable.

    -

    Some of these addresses might only be valid for networks we are not part of, but the remote -node might be a part of.

    -
    §conn_type: ConnectionType

    The type of connection we have to the node, either direct or over relay.

    -
    §latency: Option<Duration>

    The latency of the current network path to the remote node.

    -
    §last_used: Option<Duration>

    Time elapsed time since last we have sent to or received from the node.

    -

    This is the duration since any data (payload or control messages) was sent or receive -from the remote node. Note that sending to the remote node does not imply -the remote node received anything.

    -

    Implementations§

    Source§

    impl RemoteInfo

    Source

    pub fn last_received(&self) -> Option<Duration>

    Get the duration since the last activity we received from this endpoint -on any of its direct addresses.

    -
    Source

    pub fn has_send_address(&self) -> bool

    Whether there is a possible known network path to the remote node.

    -

    Note that this does not provide any guarantees of whether any network path is -usable.

    -
    Source

    pub fn sources(&self) -> Vec<(Source, Duration)>

    Returns a deduplicated list of Sources merged from all address in the RemoteInfo.

    -

    Deduplication is on the (Source, Duration) tuple, so you will get multiple Sources -for each Source variant, if different addresses were discovered from the same Source -at different times.

    -

    The list is sorted from least to most recent Source.

    -

    Trait Implementations§

    Source§

    impl Clone for RemoteInfo

    Source§

    fn clone(&self) -> RemoteInfo

    Returns a copy 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 RemoteInfo

    Source§

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

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

    impl<'de> Deserialize<'de> for RemoteInfo

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<RemoteInfo> for NodeAddr

    Source§

    fn from(info: RemoteInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for RemoteInfo

    Source§

    fn eq(&self, other: &RemoteInfo) -> 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 Serialize for RemoteInfo

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RemoteInfo

    Source§

    impl StructuralPartialEq for RemoteInfo

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    §

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

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.RemoteNodeIdError.html b/pr/3367/docs/iroh/endpoint/struct.RemoteNodeIdError.html index 0c24a96e51..270e4ed510 100644 --- a/pr/3367/docs/iroh/endpoint/struct.RemoteNodeIdError.html +++ b/pr/3367/docs/iroh/endpoint/struct.RemoteNodeIdError.html @@ -1,8 +1,8 @@ -RemoteNodeIdError in iroh::endpoint - Rust

    Struct RemoteNodeIdError

    Source
    pub struct RemoteNodeIdError { /* private fields */ }

    Trait Implementations§

    Source§

    impl Debug for RemoteNodeIdError

    Source§

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

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

    impl Display for RemoteNodeIdError

    Source§

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

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

    impl Error for RemoteNodeIdError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RemoteNodeIdError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +RemoteNodeIdError in iroh::endpoint - Rust

    RemoteNodeIdError

    Struct RemoteNodeIdError 

    Source
    pub struct RemoteNodeIdError { /* private fields */ }

    Trait Implementations§

    Source§

    impl Debug for RemoteNodeIdError

    Source§

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

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

    impl Display for RemoteNodeIdError

    Source§

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

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

    impl Error for RemoteNodeIdError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RemoteNodeIdError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<RemoteNodeIdError> for AcceptError

    Source§

    fn from(error: RemoteNodeIdError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<RemoteNodeIdError> for AcceptError

    Source§

    fn from(error: RemoteNodeIdError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -13,22 +13,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.RetryError.html b/pr/3367/docs/iroh/endpoint/struct.RetryError.html index 90c7e75e40..d6e1ce4b4a 100644 --- a/pr/3367/docs/iroh/endpoint/struct.RetryError.html +++ b/pr/3367/docs/iroh/endpoint/struct.RetryError.html @@ -1,6 +1,6 @@ -RetryError in iroh::endpoint - Rust

    Struct RetryError

    pub struct RetryError(/* private fields */);
    Expand description

    Error for attempting to retry an [Incoming] which already bears a token from a previous retry

    +RetryError in iroh::endpoint - Rust

    RetryError

    Struct RetryError 

    pub struct RetryError(/* private fields */);
    Expand description

    Error for attempting to retry an [Incoming] which already bears a token from a previous retry

    Implementations§

    §

    impl RetryError

    pub fn into_incoming(self) -> Incoming

    Get the [Incoming]

    -

    Trait Implementations§

    §

    impl Debug for RetryError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for RetryError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for RetryError

    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 +

    Trait Implementations§

    §

    impl Debug for RetryError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for RetryError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for RetryError

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -11,22 +11,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.SendStream.html b/pr/3367/docs/iroh/endpoint/struct.SendStream.html index 57441efacb..9748b42bc6 100644 --- a/pr/3367/docs/iroh/endpoint/struct.SendStream.html +++ b/pr/3367/docs/iroh/endpoint/struct.SendStream.html @@ -1,4 +1,4 @@ -SendStream in iroh::endpoint - Rust

    Struct SendStream

    pub struct SendStream { /* private fields */ }
    Expand description

    A stream that can only be used to send data

    +SendStream in iroh::endpoint - Rust

    SendStream

    Struct SendStream 

    pub struct SendStream { /* private fields */ }
    Expand description

    A stream that can only be used to send data

    If dropped, streams that haven’t been explicitly reset() will be implicitly finish()ed, continuing to (re)transmit previously written data until it has been fully acknowledged or the connection is closed.

    @@ -156,20 +156,27 @@ underlying writer. Read more
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ServerConfig.html b/pr/3367/docs/iroh/endpoint/struct.ServerConfig.html index 3e56d2b537..469ea35cde 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ServerConfig.html +++ b/pr/3367/docs/iroh/endpoint/struct.ServerConfig.html @@ -1,4 +1,4 @@ -ServerConfig in iroh::endpoint - Rust

    Struct ServerConfig

    pub struct ServerConfig {
    +ServerConfig in iroh::endpoint - Rust

    ServerConfig

    Struct ServerConfig 

    pub struct ServerConfig {
         pub transport: Arc<TransportConfig>,
         pub crypto: Arc<dyn ServerConfig>,
         pub validation_token: ValidationTokenConfig,
    @@ -82,11 +82,11 @@ exhaustion in most contexts.

    §

    impl ServerConfig

    pub fn with_single_cert( cert_chain: Vec<CertificateDer<'static>>, key: PrivateKeyDer<'static>, -) -> Result<ServerConfig, Error>

    Available on crate features rustls-aws-lc-rs or rustls-ring only.

    Create a server config with the given certificate chain to be presented to clients

    +) -> Result<ServerConfig, Error>

    Create a server config with the given certificate chain to be presented to clients

    Uses a randomized handshake token key.

    -
    §

    impl ServerConfig

    pub fn with_crypto(crypto: Arc<dyn ServerConfig>) -> ServerConfig

    Available on crate features aws-lc-rs or ring only.

    Create a server config with the given crypto::ServerConfig

    +
    §

    impl ServerConfig

    pub fn with_crypto(crypto: Arc<dyn ServerConfig>) -> ServerConfig

    Create a server config with the given crypto::ServerConfig

    Uses a randomized handshake token key.

    -

    Trait Implementations§

    §

    impl Clone for ServerConfig

    §

    fn clone(&self) -> ServerConfig

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for ServerConfig

    §

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

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for ServerConfig

    §

    fn clone(&self) -> ServerConfig

    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
    §

    impl Debug for ServerConfig

    §

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

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -94,24 +94,31 @@ exhaustion in most contexts.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.StreamId.html b/pr/3367/docs/iroh/endpoint/struct.StreamId.html index 07121e27a8..24f75f078b 100644 --- a/pr/3367/docs/iroh/endpoint/struct.StreamId.html +++ b/pr/3367/docs/iroh/endpoint/struct.StreamId.html @@ -1,20 +1,20 @@ -StreamId in iroh::endpoint - Rust

    Struct StreamId

    pub struct StreamId(/* private fields */);
    Expand description

    Identifier for a stream within a particular connection

    +StreamId in iroh::endpoint - Rust

    StreamId

    Struct StreamId 

    pub struct StreamId(/* private fields */);
    Expand description

    Identifier for a stream within a particular connection

    Implementations§

    §

    impl StreamId

    pub fn new(initiator: Side, dir: Dir, index: u64) -> StreamId

    Create a new StreamId

    pub fn initiator(self) -> Side

    Which side of a connection initiated the stream

    pub fn dir(self) -> Dir

    Which directions data flows in

    pub fn index(self) -> u64

    Distinguishes streams of the same initiator and directionality

    -

    Trait Implementations§

    §

    impl Clone for StreamId

    §

    fn clone(&self) -> StreamId

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

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

    Performs copy-assignment from source. Read more
    §

    impl Codec for StreamId

    §

    fn decode<B>(buf: &mut B) -> Result<StreamId, UnexpectedEnd>
    where +

    Trait Implementations§

    §

    impl Clone for StreamId

    §

    fn clone(&self) -> StreamId

    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
    §

    impl Codec for StreamId

    §

    fn decode<B>(buf: &mut B) -> Result<StreamId, UnexpectedEnd>
    where B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    fn encode<B>(&self, buf: &mut B)
    where B: BufMut,

    Append the encoding of self to the provided buffer
    §

    impl Debug for StreamId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for StreamId

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<StreamId> for VarInt

    §

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    §

    impl From<VarInt> for StreamId

    §

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    §

    impl Hash for StreamId

    §

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    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
    §

    impl Ord for StreamId

    §

    fn cmp(&self, other: &StreamId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for StreamId

    §

    fn eq(&self, other: &StreamId) -> 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.
    §

    impl PartialOrd for StreamId

    §

    fn partial_cmp(&self, other: &StreamId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by + Self: Sized,
    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for StreamId

    §

    fn cmp(&self, other: &StreamId) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for StreamId

    §

    fn eq(&self, other: &StreamId) -> 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.
    §

    impl PartialOrd for StreamId

    §

    fn partial_cmp(&self, other: &StreamId) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
    §

    impl Copy for StreamId

    §

    impl Eq for StreamId

    §

    impl StructuralPartialEq for StreamId

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -23,32 +23,41 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    Source§

    impl<T> RuleType for T
    where + T: 'static,

    Source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.TransportConfig.html b/pr/3367/docs/iroh/endpoint/struct.TransportConfig.html index 6e7c48c8a4..d9822dde87 100644 --- a/pr/3367/docs/iroh/endpoint/struct.TransportConfig.html +++ b/pr/3367/docs/iroh/endpoint/struct.TransportConfig.html @@ -1,4 +1,4 @@ -TransportConfig in iroh::endpoint - Rust

    Struct TransportConfig

    pub struct TransportConfig { /* private fields */ }
    Expand description

    Parameters governing the core QUIC state machine

    +TransportConfig in iroh::endpoint - Rust

    TransportConfig

    Struct TransportConfig 

    pub struct TransportConfig { /* private fields */ }
    Expand description

    Parameters governing the core QUIC state machine

    Default values should be suitable for most internet applications. Applications protocols which forbid remotely-initiated streams should set max_concurrent_bidi_streams and max_concurrent_uni_streams to zero.

    @@ -33,8 +33,7 @@ idle timeout can result in permanently hung futures!

    config.max_idle_timeout(Some(VarInt::from_u32(10_000).into())); // Set the idle timeout as a `Duration` -config.max_idle_timeout(Some(Duration::from_secs(10).try_into()?));
    -

    pub fn stream_receive_window(&mut self, value: VarInt) -> &mut TransportConfig

    Maximum number of bytes the peer may transmit without acknowledgement on any one stream +config.max_idle_timeout(Some(Duration::from_secs(10).try_into()?));

    pub fn stream_receive_window(&mut self, value: VarInt) -> &mut TransportConfig

    Maximum number of bytes the peer may transmit without acknowledgement on any one stream before becoming blocked.

    This should be set to at least the expected connection latency multiplied by the maximum desired throughput. Setting this smaller than receive_window helps ensure that a single @@ -135,8 +134,7 @@ sent, older datagrams are dropped until sufficient space is available.

    e.g. a congestion::NewRenoConfig.

    §Example
    let mut config = TransportConfig::default();
    -config.congestion_controller_factory(Arc::new(congestion::NewRenoConfig::default()));
    -

    pub fn enable_segmentation_offload( +config.congestion_controller_factory(Arc::new(congestion::NewRenoConfig::default()));

    pub fn enable_segmentation_offload( &mut self, enabled: bool, ) -> &mut TransportConfig

    Whether to use “Generic Segmentation Offload” to accelerate transmits, when supported by the @@ -169,20 +167,27 @@ reachable address, which in most NATd networks will not be easily available.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.TransportError.html b/pr/3367/docs/iroh/endpoint/struct.TransportError.html index a485a5f165..017c2bf804 100644 --- a/pr/3367/docs/iroh/endpoint/struct.TransportError.html +++ b/pr/3367/docs/iroh/endpoint/struct.TransportError.html @@ -1,4 +1,4 @@ -TransportError in iroh::endpoint - Rust

    Struct TransportError

    pub struct TransportError {
    +TransportError in iroh::endpoint - Rust

    TransportError

    Struct TransportError 

    pub struct TransportError {
         pub code: Code,
         pub frame: Option<FrameType>,
         pub reason: String,
    @@ -6,7 +6,7 @@
     

    Fields§

    §code: Code

    Type of error

    §frame: Option<FrameType>

    Frame type that triggered the error

    §reason: String

    Human-readable explanation of the reason

    -

    Trait Implementations§

    §

    impl Clone for Error

    §

    fn clone(&self) -> Error

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for Error

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for Error

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for Error

    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
    §

    impl From<Error> for Error

    §

    fn from(e: Error) -> Error

    Converts to this type from the input type.
    §

    impl From<InvalidFrame> for Error

    §

    fn from(err: InvalidFrame) -> Error

    Converts to this type from the input type.
    §

    impl From<Error> for ConnectionClose

    §

    fn from(x: Error) -> ConnectionClose

    Converts to this type from the input type.
    §

    impl From<Error> for ConnectionError

    §

    fn from(source: Error) -> ConnectionError

    Converts to this type from the input type.
    §

    impl From<Code> for Error

    §

    fn from(x: Code) -> Error

    Converts to this type from the input type.
    §

    impl PartialEq for Error

    §

    fn eq(&self, other: &Error) -> 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, +

    Trait Implementations§

    §

    impl Clone for Error

    §

    fn clone(&self) -> Error

    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
    §

    impl Debug for Error

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for Error

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Error for Error

    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
    §

    impl From<Error> for Error

    §

    fn from(e: Error) -> Error

    Converts to this type from the input type.
    §

    impl From<InvalidFrame> for Error

    §

    fn from(err: InvalidFrame) -> Error

    Converts to this type from the input type.
    §

    impl From<Error> for ConnectionClose

    §

    fn from(x: Error) -> ConnectionClose

    Converts to this type from the input type.
    §

    impl From<Error> for ConnectionError

    §

    fn from(source: Error) -> ConnectionError

    Converts to this type from the input type.
    §

    impl From<Code> for Error

    §

    fn from(x: Code) -> Error

    Converts to this type from the input type.
    §

    impl PartialEq for Error

    §

    fn eq(&self, other: &Error) -> 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.
    §

    impl Eq for Error

    §

    impl StructuralPartialEq for Error

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method @@ -18,30 +18,39 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.TransportErrorCode.html b/pr/3367/docs/iroh/endpoint/struct.TransportErrorCode.html index ca0eeb0e5f..acbd08f47b 100644 --- a/pr/3367/docs/iroh/endpoint/struct.TransportErrorCode.html +++ b/pr/3367/docs/iroh/endpoint/struct.TransportErrorCode.html @@ -1,4 +1,4 @@ -TransportErrorCode in iroh::endpoint - Rust

    Struct TransportErrorCode

    pub struct TransportErrorCode(/* private fields */);
    Expand description

    Transport-level error code

    +TransportErrorCode in iroh::endpoint - Rust

    TransportErrorCode

    Struct TransportErrorCode 

    pub struct TransportErrorCode(/* private fields */);
    Expand description

    Transport-level error code

    Implementations§

    §

    impl Code

    pub fn crypto(code: u8) -> Code

    Create QUIC error code from TLS alert code

    §

    impl Code

    pub const NO_ERROR: Code

    the connection is being closed abruptly in the absence of any error

    pub const INTERNAL_ERROR: Code

    the endpoint encountered an internal error and cannot continue with the connection

    @@ -17,9 +17,9 @@

    pub const KEY_UPDATE_ERROR: Code

    key update error

    pub const AEAD_LIMIT_REACHED: Code

    the endpoint has reached the confidentiality or integrity limit for the AEAD algorithm

    pub const NO_VIABLE_PATH: Code

    no viable network path exists

    -

    Trait Implementations§

    §

    impl Clone for Code

    §

    fn clone(&self) -> Code

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

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

    Performs copy-assignment from source. Read more
    §

    impl Codec for Code

    §

    fn decode<B>(buf: &mut B) -> Result<Code, UnexpectedEnd>
    where +

    Trait Implementations§

    §

    impl Clone for Code

    §

    fn clone(&self) -> Code

    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
    §

    impl Codec for Code

    §

    fn decode<B>(buf: &mut B) -> Result<Code, UnexpectedEnd>
    where B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    fn encode<B>(&self, buf: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer
    §

    impl Debug for Code

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for Code

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Code> for Error

    §

    fn from(x: Code) -> Error

    Converts to this type from the input type.
    §

    impl PartialEq for Code

    §

    fn eq(&self, other: &Code) -> 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, + B: BufMut,
    Append the encoding of self to the provided buffer
    §

    impl Debug for Code

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for Code

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<Code> for Error

    §

    fn from(x: Code) -> Error

    Converts to this type from the input type.
    §

    impl PartialEq for Code

    §

    fn eq(&self, other: &Code) -> 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.
    §

    impl Copy for Code

    §

    impl Eq for Code

    §

    impl StructuralPartialEq for Code

    Auto Trait Implementations§

    §

    impl Freeze for Code

    §

    impl RefUnwindSafe for Code

    §

    impl Send for Code

    §

    impl Sync for Code

    §

    impl Unpin for Code

    §

    impl UnwindSafe for Code

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -28,29 +28,38 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.UdpStats.html b/pr/3367/docs/iroh/endpoint/struct.UdpStats.html index 1172cfec56..ab52dc12ba 100644 --- a/pr/3367/docs/iroh/endpoint/struct.UdpStats.html +++ b/pr/3367/docs/iroh/endpoint/struct.UdpStats.html @@ -1,4 +1,4 @@ -UdpStats in iroh::endpoint - Rust

    Struct UdpStats

    #[non_exhaustive]
    pub struct UdpStats { +UdpStats in iroh::endpoint - Rust

    UdpStats

    Struct UdpStats 

    #[non_exhaustive]
    pub struct UdpStats { pub datagrams: u64, pub bytes: u64, pub ios: u64, @@ -7,7 +7,7 @@
    §bytes: u64

    The total amount of bytes which have been transferred inside UDP datagrams

    §ios: u64

    The amount of I/O operations executed

    Can be less than datagrams when GSO, GRO, and/or batched system calls are in use.

    -

    Trait Implementations§

    §

    impl Clone for UdpStats

    §

    fn clone(&self) -> UdpStats

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for UdpStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for UdpStats

    §

    fn default() -> UdpStats

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

    impl Copy for UdpStats

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    §

    impl Clone for UdpStats

    §

    fn clone(&self) -> UdpStats

    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
    §

    impl Debug for UdpStats

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for UdpStats

    §

    fn default() -> UdpStats

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

    impl Copy for UdpStats

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -15,24 +15,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.UnsupportedVersion.html b/pr/3367/docs/iroh/endpoint/struct.UnsupportedVersion.html index dd35e283d4..21c0761b7b 100644 --- a/pr/3367/docs/iroh/endpoint/struct.UnsupportedVersion.html +++ b/pr/3367/docs/iroh/endpoint/struct.UnsupportedVersion.html @@ -1,4 +1,4 @@ -UnsupportedVersion in iroh::endpoint - Rust

    Struct UnsupportedVersion

    pub struct UnsupportedVersion;
    Expand description

    Error indicating that the specified QUIC version is not supported

    +UnsupportedVersion in iroh::endpoint - Rust

    UnsupportedVersion

    Struct UnsupportedVersion 

    pub struct UnsupportedVersion;
    Expand description

    Error indicating that the specified QUIC version is not supported

    Trait Implementations§

    §

    impl Debug for UnsupportedVersion

    §

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

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -7,20 +7,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.VarInt.html b/pr/3367/docs/iroh/endpoint/struct.VarInt.html index d4473c2122..d94267dce5 100644 --- a/pr/3367/docs/iroh/endpoint/struct.VarInt.html +++ b/pr/3367/docs/iroh/endpoint/struct.VarInt.html @@ -1,4 +1,4 @@ -VarInt in iroh::endpoint - Rust

    Struct VarInt

    pub struct VarInt(/* private fields */);
    Expand description

    An integer less than 2^62

    +VarInt in iroh::endpoint - Rust

    VarInt

    Struct VarInt 

    pub struct VarInt(/* private fields */);
    Expand description

    An integer less than 2^62

    Values of this type are suitable for encoding as QUIC variable-length integer.

    Implementations§

    §

    impl VarInt

    pub const MAX: VarInt

    The largest representable value

    pub const MAX_SIZE: usize = 8usize

    The largest encoded value length

    @@ -10,18 +10,18 @@

    pub const fn into_inner(self) -> u64

    Extract the integer value

    pub fn saturating_add(self, rhs: impl Into<VarInt>) -> VarInt

    Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

    -

    Trait Implementations§

    §

    impl Clone for VarInt

    §

    fn clone(&self) -> VarInt

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

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

    Performs copy-assignment from source. Read more
    §

    impl Codec for VarInt

    §

    fn decode<B>(r: &mut B) -> Result<VarInt, UnexpectedEnd>
    where +

    Trait Implementations§

    §

    impl Clone for VarInt

    §

    fn clone(&self) -> VarInt

    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
    §

    impl Codec for VarInt

    §

    fn decode<B>(r: &mut B) -> Result<VarInt, UnexpectedEnd>
    where B: Buf,

    Decode a Self from the provided buffer, if the buffer is large enough
    §

    fn encode<B>(&self, w: &mut B)
    where - B: BufMut,

    Append the encoding of self to the provided buffer
    §

    impl Debug for VarInt

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for VarInt

    §

    fn default() -> VarInt

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

    impl Display for VarInt

    §

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

    Formats the value using the given formatter. Read more
    §

    impl From<StreamId> for VarInt

    §

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    §

    impl From<VarInt> for StreamId

    §

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    §

    impl From<u16> for VarInt

    §

    fn from(x: u16) -> VarInt

    Converts to this type from the input type.
    §

    impl From<u32> for VarInt

    §

    fn from(x: u32) -> VarInt

    Converts to this type from the input type.
    §

    impl From<u8> for VarInt

    §

    fn from(x: u8) -> VarInt

    Converts to this type from the input type.
    §

    impl Hash for VarInt

    §

    fn hash<__H>(&self, state: &mut __H)
    where + B: BufMut,

    Append the encoding of self to the provided buffer
    §

    impl Debug for VarInt

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for VarInt

    §

    fn default() -> VarInt

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

    impl Display for VarInt

    §

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

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

    impl From<FrameType> for VarInt

    Source§

    fn from(value: FrameType) -> VarInt

    Converts to this type from the input type.
    §

    impl From<StreamId> for VarInt

    §

    fn from(x: StreamId) -> VarInt

    Converts to this type from the input type.
    §

    impl From<VarInt> for StreamId

    §

    fn from(v: VarInt) -> StreamId

    Converts to this type from the input type.
    §

    impl From<u16> for VarInt

    §

    fn from(x: u16) -> VarInt

    Converts to this type from the input type.
    §

    impl From<u32> for VarInt

    §

    fn from(x: u32) -> VarInt

    Converts to this type from the input type.
    §

    impl From<u8> for VarInt

    §

    fn from(x: u8) -> VarInt

    Converts to this type from the input type.
    §

    impl Hash for VarInt

    §

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    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
    §

    impl Ord for VarInt

    §

    fn cmp(&self, other: &VarInt) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for VarInt

    §

    fn eq(&self, other: &VarInt) -> 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.
    §

    impl PartialOrd for VarInt

    §

    fn partial_cmp(&self, other: &VarInt) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by + Self: Sized,
    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for VarInt

    §

    fn cmp(&self, other: &VarInt) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for VarInt

    §

    fn eq(&self, other: &VarInt) -> 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.
    §

    impl PartialOrd for VarInt

    §

    fn partial_cmp(&self, other: &VarInt) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
    §

    impl TryFrom<u128> for VarInt

    §

    fn try_from(x: u128) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    §

    type Error = VarIntBoundsExceeded

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

    impl TryFrom<u64> for VarInt

    §

    fn try_from(x: u64) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    §

    type Error = VarIntBoundsExceeded

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

    impl TryFrom<usize> for VarInt

    §

    fn try_from(x: usize) -> Result<VarInt, VarIntBoundsExceeded>

    Succeeds iff x < 2^62

    @@ -33,32 +33,41 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    Source§

    impl<T> RuleType for T
    where + T: 'static,

    Source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.WeakConnectionHandle.html b/pr/3367/docs/iroh/endpoint/struct.WeakConnectionHandle.html index 811f630dd5..805d58475e 100644 --- a/pr/3367/docs/iroh/endpoint/struct.WeakConnectionHandle.html +++ b/pr/3367/docs/iroh/endpoint/struct.WeakConnectionHandle.html @@ -1,4 +1,4 @@ -WeakConnectionHandle in iroh::endpoint - Rust

    Struct WeakConnectionHandle

    pub struct WeakConnectionHandle(/* private fields */);
    Expand description

    A handle to some connection internals, use with care.

    +WeakConnectionHandle in iroh::endpoint - Rust

    WeakConnectionHandle

    Struct WeakConnectionHandle 

    pub struct WeakConnectionHandle(/* private fields */);
    Expand description

    A handle to some connection internals, use with care.

    This contains a weak reference to the connection so will not itself keep the connection alive.

    Implementations§

    §

    impl WeakConnectionHandle

    pub fn is_alive(&self) -> bool

    Returns true if the [Connection] associated with this handle is still alive.

    @@ -22,20 +22,27 @@ reset. false otherwise.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.Written.html b/pr/3367/docs/iroh/endpoint/struct.Written.html index 5ddefc4f97..2570bfc97c 100644 --- a/pr/3367/docs/iroh/endpoint/struct.Written.html +++ b/pr/3367/docs/iroh/endpoint/struct.Written.html @@ -1,11 +1,11 @@ -Written in iroh::endpoint - Rust

    Struct Written

    pub struct Written {
    +Written in iroh::endpoint - Rust

    Written

    Struct Written 

    pub struct Written {
         pub bytes: usize,
         pub chunks: usize,
     }
    Expand description

    Indicates how many bytes and chunks had been transferred in a write operation

    Fields§

    §bytes: usize

    The amount of bytes which had been written

    §chunks: usize

    The amount of full chunks which had been written

    If a chunk was only partially written, it will not be counted by this field.

    -

    Trait Implementations§

    §

    impl Clone for Written

    §

    fn clone(&self) -> Written

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

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

    Performs copy-assignment from source. Read more
    §

    impl Debug for Written

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for Written

    §

    fn default() -> Written

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

    impl PartialEq for Written

    §

    fn eq(&self, other: &Written) -> 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, +

    Trait Implementations§

    §

    impl Clone for Written

    §

    fn clone(&self) -> Written

    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
    §

    impl Debug for Written

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for Written

    §

    fn default() -> Written

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

    impl PartialEq for Written

    §

    fn eq(&self, other: &Written) -> 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.
    §

    impl Copy for Written

    §

    impl Eq for Written

    §

    impl StructuralPartialEq for Written

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -14,28 +14,35 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/struct.ZeroRttAccepted.html b/pr/3367/docs/iroh/endpoint/struct.ZeroRttAccepted.html index 9e48ec4670..61bce41e76 100644 --- a/pr/3367/docs/iroh/endpoint/struct.ZeroRttAccepted.html +++ b/pr/3367/docs/iroh/endpoint/struct.ZeroRttAccepted.html @@ -1,7 +1,7 @@ -ZeroRttAccepted in iroh::endpoint - Rust

    Struct ZeroRttAccepted

    Source
    pub struct ZeroRttAccepted { /* private fields */ }
    Expand description

    Future that completes when a connection is fully established.

    +ZeroRttAccepted in iroh::endpoint - Rust

    ZeroRttAccepted

    Struct ZeroRttAccepted 

    Source
    pub struct ZeroRttAccepted { /* private fields */ }
    Expand description

    Future that completes when a connection is fully established.

    For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting value is meaningless.

    -

    Trait Implementations§

    Source§

    impl Debug for ZeroRttAccepted

    Source§

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

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

    impl Future for ZeroRttAccepted

    Source§

    type Output = bool

    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 +

    Trait Implementations§

    Source§

    impl Debug for ZeroRttAccepted

    Source§

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

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

    impl Future for ZeroRttAccepted

    Source§

    type Output = bool

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -10,19 +10,32 @@ the current task for wakeup if the value is not yet available. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<F> FutureExt for F
    where F: Future + ?Sized,

    §

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

    A convenience for calling Future::poll() on !Unpin types.
    §

    fn or<F>(self, other: F) -> Or<Self, F>
    where Self: Sized, F: Future<Output = Self::Output>,

    Returns the result of self or other future, preferring self if both are ready. Read more
    §

    fn race<F>(self, other: F) -> Race<Self, F>
    where Self: Sized, - F: Future<Output = Self::Output>,

    Available on crate features std and race only.
    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the future and changes its type to dyn Future + 'a. Read more
    §

    impl<T> FutureExt for T
    where + F: Future<Output = Self::Output>,

    Returns the result of self or other future, with no preference if both are ready. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where + Self: Sized + UnwindSafe,

    Catches panics while polling the future. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the future and changes its type to dyn Future + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Future<Output = Self::Output> + 'a>>
    where + Self: Sized + 'a,

    Boxes the future and changes its type to dyn Future + 'a. 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, +and biased towards waiting for [CancellationToken] to complete. 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, +and biased towards waiting for [CancellationToken] to complete. Read more
    §

    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 @@ -52,14 +65,14 @@ 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,

    Available on crate feature std only.
    Catches unwinding panics while polling the future. Read more
    §

    fn shared(self) -> Shared<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,

    Available on crate feature std only.
    Create a cloneable handle to this future where all handles will resolve + 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,

    Available on crate features channel and std only.
    Turn this future into a future that yields () on completion and sends + 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,

    Available on crate feature alloc only.
    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,

    Available on crate feature alloc only.
    Wrap the future in a Box, pinning it. Read more
    §

    fn unit_error(self) -> UnitError<Self>
    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,

    Turns a Future<Output = T> into a @@ -68,16 +81,23 @@ its output to another future on a separate task. Read more
    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> 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).

    +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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    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
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/endpoint/trait.AeadKey.html b/pr/3367/docs/iroh/endpoint/trait.AeadKey.html index ef6d1131a7..972ddcea69 100644 --- a/pr/3367/docs/iroh/endpoint/trait.AeadKey.html +++ b/pr/3367/docs/iroh/endpoint/trait.AeadKey.html @@ -1,4 +1,4 @@ -AeadKey in iroh::endpoint - Rust

    Trait AeadKey

    pub trait AeadKey {
    +AeadKey in iroh::endpoint - Rust

    AeadKey

    Trait AeadKey 

    pub trait AeadKey {
         // Required methods
         fn seal(
             &self,
    diff --git a/pr/3367/docs/iroh/endpoint/trait.Controller.html b/pr/3367/docs/iroh/endpoint/trait.Controller.html
    index 22c5b93f20..6f772428c3 100644
    --- a/pr/3367/docs/iroh/endpoint/trait.Controller.html
    +++ b/pr/3367/docs/iroh/endpoint/trait.Controller.html
    @@ -1,4 +1,4 @@
    -Controller in iroh::endpoint - Rust

    Trait Controller

    pub trait Controller: Send + Sync {
    +Controller in iroh::endpoint - Rust

    Controller

    Trait Controller 

    pub trait Controller: Send + Sync {
         // Required methods
         fn on_congestion_event(
             &mut self,
    diff --git a/pr/3367/docs/iroh/endpoint/trait.ControllerFactory.html b/pr/3367/docs/iroh/endpoint/trait.ControllerFactory.html
    index 4abd7e932e..44ee0febd1 100644
    --- a/pr/3367/docs/iroh/endpoint/trait.ControllerFactory.html
    +++ b/pr/3367/docs/iroh/endpoint/trait.ControllerFactory.html
    @@ -1,4 +1,4 @@
    -ControllerFactory in iroh::endpoint - Rust

    Trait ControllerFactory

    pub trait ControllerFactory {
    +ControllerFactory in iroh::endpoint - Rust

    ControllerFactory

    Trait ControllerFactory 

    pub trait ControllerFactory {
         // Required method
         fn build(
             self: Arc<Self>,
    diff --git a/pr/3367/docs/iroh/endpoint/trait.CryptoServerConfig.html b/pr/3367/docs/iroh/endpoint/trait.CryptoServerConfig.html
    index 5f4d271df1..77f3f9d329 100644
    --- a/pr/3367/docs/iroh/endpoint/trait.CryptoServerConfig.html
    +++ b/pr/3367/docs/iroh/endpoint/trait.CryptoServerConfig.html
    @@ -1,4 +1,4 @@
    -CryptoServerConfig in iroh::endpoint - Rust

    Trait CryptoServerConfig

    pub trait CryptoServerConfig: Send + Sync {
    +CryptoServerConfig in iroh::endpoint - Rust

    CryptoServerConfig

    Trait CryptoServerConfig 

    pub trait CryptoServerConfig: Send + Sync {
         // Required methods
         fn initial_keys(
             &self,
    diff --git a/pr/3367/docs/iroh/endpoint/trait.HandshakeTokenKey.html b/pr/3367/docs/iroh/endpoint/trait.HandshakeTokenKey.html
    index 2986d78d0e..f0cd543929 100644
    --- a/pr/3367/docs/iroh/endpoint/trait.HandshakeTokenKey.html
    +++ b/pr/3367/docs/iroh/endpoint/trait.HandshakeTokenKey.html
    @@ -1,4 +1,4 @@
    -HandshakeTokenKey in iroh::endpoint - Rust

    Trait HandshakeTokenKey

    pub trait HandshakeTokenKey: Send + Sync {
    +HandshakeTokenKey in iroh::endpoint - Rust

    HandshakeTokenKey

    Trait HandshakeTokenKey 

    pub trait HandshakeTokenKey: Send + Sync {
         // Required method
         fn aead_from_hkdf(&self, random_bytes: &[u8]) -> Box<dyn AeadKey>;
     }
    Expand description

    A pseudo random key for HKDF

    diff --git a/pr/3367/docs/iroh/enum.KeyParsingError.html b/pr/3367/docs/iroh/enum.KeyParsingError.html index 04fa3a2147..4ce56d399d 100644 --- a/pr/3367/docs/iroh/enum.KeyParsingError.html +++ b/pr/3367/docs/iroh/enum.KeyParsingError.html @@ -1,4 +1,4 @@ -KeyParsingError in iroh - Rust

    Enum KeyParsingError

    Source
    pub enum KeyParsingError {
    +KeyParsingError in iroh - Rust

    KeyParsingError

    Enum KeyParsingError 

    pub enum KeyParsingError {
         Decode {
             source: DecodeError,
             backtrace: Option<Backtrace>,
    @@ -17,14 +17,14 @@
     

    Variants§

    §

    Decode

    Error when decoding.

    Fields

    §source: DecodeError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Key

    Error when decoding the public key.

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DecodeInvalidLength

    The encoded information had the wrong length.

    -

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for KeyParsingError

    Source§

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

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

    impl Display for KeyParsingError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    §

    impl Debug for KeyParsingError

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Display for KeyParsingError

    §

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

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

    impl Error for KeyParsingError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for KeyParsingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Error for KeyParsingError

    §

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    §

    impl ErrorCompat for KeyParsingError

    §

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodeError> for KeyParsingError

    Source§

    fn from(error: DecodeError) -> KeyParsingError

    Converts to this type from the input type.
    Source§

    impl From<Error> for KeyParsingError

    Source§

    fn from(error: Error) -> KeyParsingError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    §

    impl From<DecodeError> for KeyParsingError

    §

    fn from(error: DecodeError) -> KeyParsingError

    Converts to this type from the input type.
    §

    impl From<Error> for KeyParsingError

    §

    fn from(error: Error) -> KeyParsingError

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -35,22 +35,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static,
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/enum.RelayProtocol.html b/pr/3367/docs/iroh/enum.RelayProtocol.html deleted file mode 100644 index 0196460f8e..0000000000 --- a/pr/3367/docs/iroh/enum.RelayProtocol.html +++ /dev/null @@ -1,43 +0,0 @@ -RelayProtocol in iroh - Rust

    Enum RelayProtocol

    Source
    pub enum RelayProtocol {
    -    Relay,
    -    Websocket,
    -}
    Expand description

    The HTTP upgrade protocol used for relaying.

    -

    Variants§

    §

    Relay

    Relays over the custom relaying protocol with a custom HTTP upgrade header.

    -
    §

    Websocket

    Relays over websockets.

    -

    Originally introduced to support browser connections.

    -

    Implementations§

    Source§

    impl Protocol

    Source

    pub const fn upgrade_header(&self) -> &'static str

    The HTTP upgrade header used or expected.

    -
    Source

    pub fn parse_header(header: &HeaderValue) -> Option<Protocol>

    Tries to match the value of an HTTP upgrade header to figure out which protocol should be initiated.

    -

    Trait Implementations§

    Source§

    impl Clone for Protocol

    Source§

    fn clone(&self) -> Protocol

    Returns a copy 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 Protocol

    Source§

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

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

    impl Default for Protocol

    Source§

    fn default() -> Protocol

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

    impl PartialEq for Protocol

    Source§

    fn eq(&self, other: &Protocol) -> 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 Copy for Protocol

    Source§

    impl Eq for Protocol

    Source§

    impl StructuralPartialEq for Protocol

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    -
    §

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

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/index.html b/pr/3367/docs/iroh/index.html index cd2ff6e5df..4cbfc3f166 100644 --- a/pr/3367/docs/iroh/index.html +++ b/pr/3367/docs/iroh/index.html @@ -1,4 +1,4 @@ -iroh - Rust

    Crate iroh

    Source
    Expand description

    Peer-to-peer QUIC connections.

    +iroh - Rust

    Crate iroh

    Crate iroh 

    Source
    Expand description

    Peer-to-peer QUIC connections.

    iroh is a library to establish direct connectivity between peers. It exposes an interface to QUIC connections and streams to the user, while implementing direct connectivity using hole punching complemented by relay servers under the hood.

    @@ -117,8 +117,8 @@ the receiver’s

    §Node Discovery

    The need to know the RelayUrl or some direct addresses in addition to the -NodeId to connect to an iroh node can be an obstacle. To address this the -endpoint::Builder allows to configure a discovery service.

    +NodeId to connect to an iroh node can be an obstacle. To address this, the +endpoint::Builder allows you to configure a discovery service.

    The DnsDiscovery service is a discovery service which will publish the RelayUrl and direct addresses to a service publishing those as DNS records. To connect it looks up the NodeId in the DNS system to find the addressing details. This enables @@ -179,4 +179,4 @@ connecting using only the < }

    Please see the examples directory for more nuanced examples.

    Re-exports§

    pub use endpoint::Endpoint;
    pub use endpoint::RelayMode;

    Modules§

    defaults
    Default values used in iroh
    discovery
    Node address discovery.
    dnsNon-wasm_browser
    This module exports a DNS resolver, which is also the default resolver used in the -crate::Endpoint if no custom resolver is configured.
    endpoint
    The Endpoint allows establishing connections to other iroh nodes.
    metrics
    Co-locating all of the iroh metrics structs
    net_report
    Checks the network conditions from the current host.
    node_info
    Support for handling DNS resource records for dialing by NodeId.
    protocol
    Tools for spawning an accept loop that routes incoming requests to the right protocol.
    test_utilstest-utils
    Internal utilities to support testing.

    Structs§

    NodeAddr
    Network-level addressing information for an iroh node.
    PublicKey
    A public key.
    RelayMap
    Configuration of all the relay servers that can be used.
    RelayNode
    Information on a specific relay server.
    RelayUrl
    A URL identifying a relay server.
    RelayUrlParseError
    Can occur when parsing a string into a RelayUrl.
    SecretKey
    A secret key.

    Enums§

    KeyParsingError
    Error when deserialising a PublicKey or a SecretKey.
    RelayProtocol
    The HTTP upgrade protocol used for relaying.

    Traits§

    Watcher
    A handle to a value that’s represented by one or more underlying [Watchable]s.

    Type Aliases§

    NodeId
    The identifier for a node in the (iroh) network.
    \ No newline at end of file +crate::Endpoint if no custom resolver is configured.
    endpoint
    The Endpoint allows establishing connections to other iroh nodes.
    metrics
    Co-locating all of the iroh metrics structs
    net_report
    Checks the network conditions from the current host.
    node_info
    Support for handling DNS resource records for dialing by NodeId.
    protocol
    Tools for spawning an accept loop that routes incoming requests to the right protocol.
    test_utilstest-utils
    Internal utilities to support testing.

    Structs§

    NodeAddr
    Network-level addressing information for an iroh node.
    PublicKey
    A public key.
    RelayMap
    Configuration of all the relay servers that can be used.
    RelayNode
    Information on a specific relay server.
    RelayUrl
    A URL identifying a relay server.
    RelayUrlParseError
    Can occur when parsing a string into a RelayUrl.
    SecretKey
    A secret key.

    Enums§

    KeyParsingError
    Error when deserialising a PublicKey or a SecretKey.

    Traits§

    Watcher
    A handle to a value that’s represented by one or more underlying [Watchable]s.

    Type Aliases§

    NodeId
    The identifier for a node in the (iroh) network.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/magicsock/node_map/node_state/struct.RemoteInfo.html b/pr/3367/docs/iroh/magicsock/node_map/node_state/struct.RemoteInfo.html deleted file mode 100644 index 856de08b65..0000000000 --- a/pr/3367/docs/iroh/magicsock/node_map/node_state/struct.RemoteInfo.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

    Redirecting to ../../../../iroh/endpoint/struct.RemoteInfo.html...

    - - - \ No newline at end of file diff --git a/pr/3367/docs/iroh/metrics/index.html b/pr/3367/docs/iroh/metrics/index.html index 1e1ece1a35..b14c06f498 100644 --- a/pr/3367/docs/iroh/metrics/index.html +++ b/pr/3367/docs/iroh/metrics/index.html @@ -1,2 +1,2 @@ -iroh::metrics - Rust

    Module metrics

    Source
    Expand description

    Co-locating all of the iroh metrics structs

    +iroh::metrics - Rust

    Module metrics

    Module metrics 

    Source
    Expand description

    Co-locating all of the iroh metrics structs

    Re-exports§

    pub use crate::net_report::Metrics as NetReportMetrics;

    Structs§

    EndpointMetrics
    Metrics collected by an crate::endpoint::Endpoint.
    MagicsockMetrics
    Enum of metrics for the module
    PortmapMetricsNon-wasm_browser
    Enum of metrics for the module
    RelayMetricstest-utils
    Metrics tracked for the relay server
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/metrics/struct.EndpointMetrics.html b/pr/3367/docs/iroh/metrics/struct.EndpointMetrics.html index 376920b5d5..c5c61545ec 100644 --- a/pr/3367/docs/iroh/metrics/struct.EndpointMetrics.html +++ b/pr/3367/docs/iroh/metrics/struct.EndpointMetrics.html @@ -1,4 +1,4 @@ -EndpointMetrics in iroh::metrics - Rust

    Struct EndpointMetrics

    Source
    #[non_exhaustive]
    pub struct EndpointMetrics { +EndpointMetrics in iroh::metrics - Rust

    EndpointMetrics

    Struct EndpointMetrics 

    Source
    #[non_exhaustive]
    pub struct EndpointMetrics { pub magicsock: Arc<MagicsockMetrics>, pub net_report: Arc<NetReportMetrics>, pub portmapper: Arc<PortmapMetrics>, @@ -7,9 +7,9 @@

    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.
    §magicsock: Arc<MagicsockMetrics>

    Metrics collected by the endpoint’s socket.

    §net_report: Arc<NetReportMetrics>

    Metrics collected by net reports.

    §portmapper: Arc<PortmapMetrics>
    Available on non-wasm_browser only.

    Metrics collected by the portmapper service.

    -

    Trait Implementations§

    Source§

    impl Clone for EndpointMetrics

    Source§

    fn clone(&self) -> EndpointMetrics

    Returns a copy 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 EndpointMetrics

    Source§

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

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

    impl Default for EndpointMetrics

    Source§

    fn default() -> EndpointMetrics

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

    impl<'de> Deserialize<'de> for EndpointMetrics

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl MetricsGroupSet for EndpointMetrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group set.
    Source§

    fn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>

    Returns an iterator over owned clones of the [MetricsGroup] in this struct.
    Source§

    fn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>

    Returns an iterator over references to the [MetricsGroup] in this struct.
    §

    fn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)>

    Returns an iterator over all metrics in this metrics group set. Read more
    Source§

    impl Serialize for EndpointMetrics

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for EndpointMetrics

    Source§

    fn clone(&self) -> EndpointMetrics

    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 EndpointMetrics

    Source§

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

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

    impl Default for EndpointMetrics

    Source§

    fn default() -> EndpointMetrics

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

    impl<'de> Deserialize<'de> for EndpointMetrics

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl MetricsGroupSet for EndpointMetrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group set.
    Source§

    fn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>

    Returns an iterator over owned clones of the [MetricsGroup] in this struct.
    Source§

    fn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>

    Returns an iterator over references to the [MetricsGroup] in this struct.
    §

    fn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)>

    Returns an iterator over all metrics in this metrics group set. Read more
    Source§

    impl Serialize for EndpointMetrics

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -17,25 +17,32 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/metrics/struct.MagicsockMetrics.html b/pr/3367/docs/iroh/metrics/struct.MagicsockMetrics.html index 9bcf6c3b47..67d6df10a1 100644 --- a/pr/3367/docs/iroh/metrics/struct.MagicsockMetrics.html +++ b/pr/3367/docs/iroh/metrics/struct.MagicsockMetrics.html @@ -1,4 +1,4 @@ -MagicsockMetrics in iroh::metrics - Rust

    Struct MagicsockMetrics

    Source
    #[non_exhaustive]
    pub struct MagicsockMetrics {
    Show 43 fields +MagicsockMetrics in iroh::metrics - Rust

    MagicsockMetrics

    Struct MagicsockMetrics 

    Source
    #[non_exhaustive]
    pub struct MagicsockMetrics {
    Show 49 fields pub update_direct_addrs: Counter, pub send_ipv4: Counter, pub send_ipv6: Counter, @@ -42,6 +42,12 @@ pub nodes_contacted_directly: Counter, pub connection_handshake_success: Counter, pub connection_became_direct: Counter, + pub path_marked_outdated: Counter, + pub path_ping_failures: Counter, + pub path_failure_resets: Counter, + pub path_packet_loss_rate: Histogram, + pub path_rtt_variance_ms: Histogram, + pub path_quality_score: Histogram,
    }
    Expand description

    Enum of metrics for the module

    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.
    §update_direct_addrs: Counter§send_ipv4: Counter§send_ipv6: Counter§send_relay: Counter§send_relay_error: Counter§send_data: Counter§send_data_network_down: Counter§recv_data_relay: Counter§recv_data_ipv4: Counter§recv_data_ipv6: Counter§recv_datagrams: Counter

    Number of QUIC datagrams received.

    §recv_gro_datagrams: Counter

    Number of datagrams received using GRO

    @@ -53,9 +59,15 @@
    §nodes_contacted_directly: Counter

    Number of nodes we have managed to contact directly.

    §connection_handshake_success: Counter

    Number of connections with a successful handshake.

    §connection_became_direct: Counter

    Number of connections with a successful handshake that became direct.

    -

    Trait Implementations§

    Source§

    impl Debug for Metrics

    Source§

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

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

    impl Default for Metrics

    Source§

    fn default() -> Metrics

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

    impl<'de> Deserialize<'de> for Metrics

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Iterable for Metrics

    Source§

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    Source§

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    Source§

    impl MetricsGroup for Metrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.
    Source§

    impl Serialize for Metrics

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +
    §path_marked_outdated: Counter

    Number of times a path was marked as outdated due to consecutive ping failures.

    +
    §path_ping_failures: Counter

    Number of ping failures recorded across all paths.

    +
    §path_failure_resets: Counter

    Number of consecutive failure resets (path recovered).

    +
    §path_packet_loss_rate: Histogram

    Histogram of packet loss rates (0.0-1.0) observed on UDP paths.

    +
    §path_rtt_variance_ms: Histogram

    Histogram of RTT variance (in milliseconds) as a congestion indicator.

    +
    §path_quality_score: Histogram

    Histogram of path quality scores (0.0-1.0).

    +

    Trait Implementations§

    Source§

    impl Debug for Metrics

    Source§

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

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

    impl Default for Metrics

    Source§

    fn default() -> Self

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

    impl<'de> Deserialize<'de> for Metrics

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Iterable for Metrics

    Source§

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    Source§

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    Source§

    impl MetricsGroup for Metrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.
    Source§

    impl Serialize for Metrics

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -63,22 +75,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    §

    impl<T> IntoIterable for T
    where - T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/metrics/struct.PortmapMetrics.html b/pr/3367/docs/iroh/metrics/struct.PortmapMetrics.html index 23119fef05..8bc4a139c5 100644 --- a/pr/3367/docs/iroh/metrics/struct.PortmapMetrics.html +++ b/pr/3367/docs/iroh/metrics/struct.PortmapMetrics.html @@ -1,4 +1,4 @@ -PortmapMetrics in iroh::metrics - Rust

    Struct PortmapMetrics

    pub struct PortmapMetrics {
    +PortmapMetrics in iroh::metrics - Rust

    PortmapMetrics

    Struct PortmapMetrics 

    pub struct PortmapMetrics {
         pub probes_started: Counter,
         pub local_port_updates: Counter,
         pub mapping_attempts: Counter,
    @@ -22,14 +22,14 @@
     
    §upnp_gateway_updated: Counter

    Number of UPnP probes that resulted in a gateway different to the previous one,

    §pcp_probes: Counter

    Number of PCP probes executed.

    §pcp_available: Counter

    Number of PCP probes that found it available.

    -

    Trait Implementations§

    §

    impl Debug for Metrics

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for Metrics

    §

    fn default() -> Metrics

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

    impl<'de> Deserialize<'de> for Metrics

    §

    fn deserialize<__D>( +

    Trait Implementations§

    §

    impl Debug for Metrics

    §

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

    Formats the value using the given formatter. Read more
    §

    impl Default for Metrics

    §

    fn default() -> Metrics

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

    impl<'de> Deserialize<'de> for Metrics

    §

    fn deserialize<__D>( __deserializer: __D, -) -> Result<Metrics, <__D as Deserializer<'de>>::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Iterable for Metrics

    §

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    §

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    §

    impl MetricsGroup for Metrics

    §

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.
    §

    impl Serialize for Metrics

    §

    fn serialize<__S>( +) -> Result<Metrics, <__D as Deserializer<'de>>::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Iterable for Metrics

    §

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    §

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    §

    impl MetricsGroup for Metrics

    §

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.
    §

    impl Serialize for Metrics

    §

    fn serialize<__S>( &self, __serializer: __S, -) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -37,22 +37,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    §

    impl<T> IntoIterable for T
    where - T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/metrics/struct.RelayMetrics.html b/pr/3367/docs/iroh/metrics/struct.RelayMetrics.html index 785833b416..7061df91b1 100644 --- a/pr/3367/docs/iroh/metrics/struct.RelayMetrics.html +++ b/pr/3367/docs/iroh/metrics/struct.RelayMetrics.html @@ -1,4 +1,4 @@ -RelayMetrics in iroh::metrics - Rust

    Struct RelayMetrics

    Source
    pub struct RelayMetrics {
    Show 21 fields +RelayMetrics in iroh::metrics - Rust

    RelayMetrics

    Struct RelayMetrics 

    Source
    pub struct RelayMetrics {
    Show 19 fields pub bytes_sent: Counter, pub bytes_recv: Counter, pub send_packets_sent: Counter, @@ -13,13 +13,11 @@ pub got_ping: Counter, pub sent_pong: Counter, pub unknown_frames: Counter, - pub frames_rx_ratelimited_total: Counter, + pub bytes_rx_ratelimited_total: Counter, pub conns_rx_ratelimited_total: Counter, pub accepts: Counter, pub disconnects: Counter, pub unique_client_keys: Counter, - pub websocket_accepts: Counter, - pub relay_accepts: Counter,
    }
    Available on crate feature test-utils only.
    Expand description

    Metrics tracked for the relay server

    Fields§

    §bytes_sent: Counter

    Bytes sent from a FrameType::SendPacket

    §bytes_recv: Counter

    Bytes received from a FrameType::SendPacket

    @@ -35,13 +33,11 @@
    §got_ping: Counter

    Number of FrameType::Pings received

    §sent_pong: Counter

    Number of FrameType::Pongs sent

    §unknown_frames: Counter

    Number of FrameType::Unknown received

    -
    §frames_rx_ratelimited_total: Counter

    Number of frames received from client connection which have been rate-limited.

    +
    §bytes_rx_ratelimited_total: Counter

    Number of bytes received from client connection which have been rate-limited.

    §conns_rx_ratelimited_total: Counter

    Number of client connections which have had any frames rate-limited.

    §accepts: Counter

    Number of times this server has accepted a connection.

    §disconnects: Counter

    Number of connections we have removed because of an error

    §unique_client_keys: Counter

    Number of unique client keys per day

    -
    §websocket_accepts: Counter

    Number of accepted websocket connections

    -
    §relay_accepts: Counter

    Number of accepted ‘iroh derp http’ connection upgrades

    Trait Implementations§

    Source§

    impl Debug for Metrics

    Source§

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

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

    impl Default for Metrics

    Source§

    fn default() -> Metrics

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

    impl Iterable for Metrics

    Source§

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    Source§

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    Source§

    impl MetricsGroup for Metrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -50,21 +46,28 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    §

    impl<T> IntoIterable for T
    where - T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/constant.TIMEOUT.html b/pr/3367/docs/iroh/net_report/constant.TIMEOUT.html new file mode 100644 index 0000000000..89a15af0ba --- /dev/null +++ b/pr/3367/docs/iroh/net_report/constant.TIMEOUT.html @@ -0,0 +1,2 @@ +TIMEOUT in iroh::net_report - Rust

    TIMEOUT

    Constant TIMEOUT 

    Source
    pub const TIMEOUT: u64 = 5;
    Expand description

    The maximum amount of time, in seconds, the net_report will spend gathering a single report.

    +
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/defaults/timeouts/constant.TIMEOUT.html b/pr/3367/docs/iroh/net_report/defaults/timeouts/constant.TIMEOUT.html new file mode 100644 index 0000000000..4f16df1a29 --- /dev/null +++ b/pr/3367/docs/iroh/net_report/defaults/timeouts/constant.TIMEOUT.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

    Redirecting to ../../../../iroh/net_report/constant.TIMEOUT.html...

    + + + \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/enum.Probe.html b/pr/3367/docs/iroh/net_report/enum.Probe.html index 1eaa89a851..8f0b7ac2e6 100644 --- a/pr/3367/docs/iroh/net_report/enum.Probe.html +++ b/pr/3367/docs/iroh/net_report/enum.Probe.html @@ -1,4 +1,4 @@ -Probe in iroh::net_report - Rust

    Enum Probe

    Source
    #[repr(u8)]
    pub enum Probe { +Probe in iroh::net_report - Rust

    Probe

    Enum Probe 

    Source
    #[repr(u8)]
    pub enum Probe { Https = 0, QadIpv4 = 1, QadIpv6 = 2, @@ -6,13 +6,13 @@

    Variants§

    §

    Https = 0

    HTTPS

    §

    QadIpv4 = 1

    Available on non-wasm_browser only.

    QUIC Address Discovery Ipv4

    §

    QadIpv6 = 2

    Available on non-wasm_browser only.

    QUIC Address Discovery Ipv6

    -

    Trait Implementations§

    Source§

    impl Clone for Probe

    Source§

    fn clone(&self) -> Probe

    Returns a copy 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 Probe

    Source§

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

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

    impl Display for Probe

    Source§

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

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

    impl Ord for Probe

    Source§

    fn cmp(&self, other: &Probe) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for Probe

    Source§

    fn eq(&self, other: &Probe) -> 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 PartialOrd for Probe

    Source§

    fn partial_cmp(&self, other: &Probe) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +

    Trait Implementations§

    Source§

    impl Clone for Probe

    Source§

    fn clone(&self) -> Probe

    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 Probe

    Source§

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

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

    impl Display for Probe

    Source§

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

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

    impl Ord for Probe

    Source§

    fn cmp(&self, other: &Probe) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for Probe

    Source§

    fn eq(&self, other: &Probe) -> 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 PartialOrd for Probe

    Source§

    fn partial_cmp(&self, other: &Probe) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
    Source§

    impl Copy for Probe

    Source§

    impl Eq for Probe

    Source§

    impl StructuralPartialEq for Probe

    Auto Trait Implementations§

    §

    impl Freeze for Probe

    §

    impl RefUnwindSafe for Probe

    §

    impl Send for Probe

    §

    impl Sync for Probe

    §

    impl Unpin for Probe

    §

    impl UnwindSafe for Probe

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -21,31 +21,40 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/index.html b/pr/3367/docs/iroh/net_report/index.html index 9ae3c8d762..b603c1a109 100644 --- a/pr/3367/docs/iroh/net_report/index.html +++ b/pr/3367/docs/iroh/net_report/index.html @@ -1,5 +1,5 @@ -iroh::net_report - Rust

    Module net_report

    Source
    Expand description

    Checks the network conditions from the current host.

    +iroh::net_report - Rust

    Module net_report

    Module net_report 

    Source
    Expand description

    Checks the network conditions from the current host.

    NetReport is responsible for finding out the network conditions of the current host, like whether it is connected to the internet via IPv4 and/or IPv6, what the NAT situation is etc and reachability to the configured relays.

    -

    Structs§

    Metrics
    Enum of metrics for the module
    OptionsNon-wasm_browser
    Options for running probes
    QuicConfig
    Pieces needed to do QUIC address discovery.
    RelayLatencies
    Latencies per relay node.
    Report
    A net_report report.

    Enums§

    Probe
    The protocol used to time a node’s latency.
    \ No newline at end of file +

    Structs§

    Metrics
    Enum of metrics for the module
    Options
    Options for running probes
    QuicConfig
    Pieces needed to do QUIC address discovery.
    RelayLatencies
    Latencies per relay node.
    Report
    A net_report report.

    Enums§

    Probe
    The protocol used to time a node’s latency.

    Constants§

    TIMEOUT
    The maximum amount of time, in seconds, the net_report will spend gathering a single report.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/sidebar-items.js b/pr/3367/docs/iroh/net_report/sidebar-items.js index a625e299d2..06ce48a416 100644 --- a/pr/3367/docs/iroh/net_report/sidebar-items.js +++ b/pr/3367/docs/iroh/net_report/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":["Probe"],"struct":["Metrics","Options","QuicConfig","RelayLatencies","Report"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["TIMEOUT"],"enum":["Probe"],"struct":["Metrics","Options","QuicConfig","RelayLatencies","Report"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/struct.Metrics.html b/pr/3367/docs/iroh/net_report/struct.Metrics.html index dc41d951fa..bb58ececb2 100644 --- a/pr/3367/docs/iroh/net_report/struct.Metrics.html +++ b/pr/3367/docs/iroh/net_report/struct.Metrics.html @@ -1,12 +1,12 @@ -Metrics in iroh::net_report - Rust

    Struct Metrics

    Source
    #[non_exhaustive]
    pub struct Metrics { +Metrics in iroh::net_report - Rust

    Metrics

    Struct Metrics 

    Source
    #[non_exhaustive]
    pub struct Metrics { pub reports: Counter, pub reports_full: Counter, }
    Expand description

    Enum of metrics for the module

    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.
    §reports: Counter

    Number of reports executed by net_report, including full reports.

    §reports_full: Counter

    Number of full reports executed by net_report

    -

    Trait Implementations§

    Source§

    impl Debug for Metrics

    Source§

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

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

    impl Default for Metrics

    Source§

    fn default() -> Metrics

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

    impl<'de> Deserialize<'de> for Metrics

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Iterable for Metrics

    Source§

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    Source§

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    Source§

    impl MetricsGroup for Metrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.
    Source§

    impl Serialize for Metrics

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Metrics

    Source§

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

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

    impl Default for Metrics

    Source§

    fn default() -> Metrics

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

    impl<'de> Deserialize<'de> for Metrics

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Iterable for Metrics

    Source§

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    Source§

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    Source§

    impl MetricsGroup for Metrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.
    Source§

    impl Serialize for Metrics

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,22 +14,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    §

    impl<T> IntoIterable for T
    where - T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/struct.Options.html b/pr/3367/docs/iroh/net_report/struct.Options.html index 07251c42d8..68663cfc62 100644 --- a/pr/3367/docs/iroh/net_report/struct.Options.html +++ b/pr/3367/docs/iroh/net_report/struct.Options.html @@ -1,12 +1,12 @@ -Options in iroh::net_report - Rust

    Struct Options

    Source
    pub struct Options { /* private fields */ }
    Available on non-wasm_browser only.
    Expand description

    Options for running probes

    +Options in iroh::net_report - Rust

    Options

    Struct Options 

    Source
    pub struct Options { /* private fields */ }
    Expand description

    Options for running probes

    By default, will run Https probes.

    Use Options::quic_config to enable QUIC address discovery.

    -

    Implementations§

    Source§

    impl Options

    Source

    pub fn disabled() -> Self

    Create an Options that disables all probes

    -
    Source

    pub fn quic_config(self, quic_config: Option<QuicConfig>) -> Self

    Enable quic probes

    -
    Source

    pub fn https(self, enable: bool) -> Self

    Enable or disable https probe

    -
    Source

    pub fn insecure_skip_relay_cert_verify(self, skip: bool) -> Self

    Available on crate feature test-utils only.

    Skip cert verification

    -
    Source

    pub fn as_protocols(&self) -> BTreeSet<Probe>

    Turn the options into set of valid protocols

    -

    Trait Implementations§

    Source§

    impl Clone for Options

    Source§

    fn clone(&self) -> Options

    Returns a copy 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 Options

    Source§

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

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

    impl Default for Options

    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 +

    Implementations§

    Source§

    impl Options

    Source

    pub fn disabled() -> Self

    Available on non-wasm_browser only.

    Create an Options that disables all probes

    +
    Source

    pub fn quic_config(self, quic_config: Option<QuicConfig>) -> Self

    Available on non-wasm_browser only.

    Enable quic probes

    +
    Source

    pub fn https(self, enable: bool) -> Self

    Available on non-wasm_browser only.

    Enable or disable https probe

    +
    Source

    pub fn insecure_skip_relay_cert_verify(self, skip: bool) -> Self

    Available on non-wasm_browser and (crate features test-utils) only.

    Skip cert verification

    +
    Source

    pub fn as_protocols(&self) -> BTreeSet<Probe>

    Available on non-wasm_browser only.

    Turn the options into set of valid protocols

    +

    Trait Implementations§

    Source§

    impl Clone for Options

    Available on non-wasm_browser only.
    Source§

    fn clone(&self) -> Options

    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 Options

    Available on non-wasm_browser only.
    Source§

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

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

    impl Default for Options

    Available on non-wasm_browser only.
    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,24 +14,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/struct.QuicConfig.html b/pr/3367/docs/iroh/net_report/struct.QuicConfig.html index 2bbb06b88d..4ba5fe44e4 100644 --- a/pr/3367/docs/iroh/net_report/struct.QuicConfig.html +++ b/pr/3367/docs/iroh/net_report/struct.QuicConfig.html @@ -1,4 +1,4 @@ -QuicConfig in iroh::net_report - Rust

    Struct QuicConfig

    Source
    pub struct QuicConfig {
    +QuicConfig in iroh::net_report - Rust

    QuicConfig

    Struct QuicConfig 

    Source
    pub struct QuicConfig {
         pub ep: Endpoint,
         pub client_config: ClientConfig,
         pub ipv4: bool,
    @@ -8,7 +8,7 @@
     
    §client_config: ClientConfig

    A client config.

    §ipv4: bool

    Enable ipv4 QUIC address discovery probes

    §ipv6: bool

    Enable ipv6 QUIC address discovery probes

    -

    Trait Implementations§

    Source§

    impl Clone for QuicConfig

    Source§

    fn clone(&self) -> QuicConfig

    Returns a copy 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 QuicConfig

    Source§

    fn fmt(&self, __derive_more_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 +

    Trait Implementations§

    Source§

    impl Clone for QuicConfig

    Source§

    fn clone(&self) -> QuicConfig

    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 QuicConfig

    Source§

    fn fmt(&self, __derive_more_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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -16,24 +16,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/struct.RelayLatencies.html b/pr/3367/docs/iroh/net_report/struct.RelayLatencies.html index c73d4879c3..c36858dab7 100644 --- a/pr/3367/docs/iroh/net_report/struct.RelayLatencies.html +++ b/pr/3367/docs/iroh/net_report/struct.RelayLatencies.html @@ -1,7 +1,9 @@ -RelayLatencies in iroh::net_report - Rust

    Struct RelayLatencies

    Source
    pub struct RelayLatencies { /* private fields */ }
    Expand description

    Latencies per relay node.

    -

    Implementations§

    Source§

    impl RelayLatencies

    Source

    pub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_

    Available on non-wasm_browser only.

    Returns an iterator over all the relays and their latencies.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayLatencies

    Source§

    fn clone(&self) -> RelayLatencies

    Returns a copy 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 RelayLatencies

    Source§

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

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

    impl Default for RelayLatencies

    Source§

    fn default() -> RelayLatencies

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

    impl PartialEq for RelayLatencies

    Source§

    fn eq(&self, other: &RelayLatencies) -> 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 Eq for RelayLatencies

    Source§

    impl StructuralPartialEq for RelayLatencies

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +RelayLatencies in iroh::net_report - Rust

    RelayLatencies

    Struct RelayLatencies 

    Source
    pub struct RelayLatencies { /* private fields */ }
    Expand description

    Latencies per relay node.

    +

    Implementations§

    Source§

    impl RelayLatencies

    Source

    pub fn iter(&self) -> impl Iterator<Item = (&RelayUrl, Duration)> + '_

    Available on non-wasm_browser only.

    Returns an iterator over all the relays and their latencies.

    +

    Trait Implementations§

    Source§

    impl Clone for RelayLatencies

    Source§

    fn clone(&self) -> RelayLatencies

    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 RelayLatencies

    Source§

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

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

    impl Default for RelayLatencies

    Source§

    fn default() -> RelayLatencies

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

    impl<'de> Deserialize<'de> for RelayLatencies

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl PartialEq for RelayLatencies

    Source§

    fn eq(&self, other: &RelayLatencies) -> 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 Serialize for RelayLatencies

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayLatencies

    Source§

    impl StructuralPartialEq for RelayLatencies

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -9,28 +11,36 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/net_report/struct.Report.html b/pr/3367/docs/iroh/net_report/struct.Report.html index 67c5991ba7..9ff4ccb084 100644 --- a/pr/3367/docs/iroh/net_report/struct.Report.html +++ b/pr/3367/docs/iroh/net_report/struct.Report.html @@ -1,4 +1,4 @@ -Report in iroh::net_report - Rust

    Struct Report

    Source
    pub struct Report {
    +Report in iroh::net_report - Rust

    Report

    Struct Report 

    Source
    pub struct Report {
         pub udp_v4: bool,
         pub udp_v6: bool,
         pub mapping_varies_by_dest_ipv4: Option<bool>,
    @@ -20,10 +20,12 @@
     
    §global_v6: Option<SocketAddrV6>

    [ip]:port of global IPv6

    §captive_portal: Option<bool>

    CaptivePortal is set when we think there’s a captive portal that is intercepting HTTP traffic.

    -

    Implementations§

    Source§

    impl Report

    Source

    pub fn has_udp(&self) -> bool

    Do we have any indication that UDP is working?

    -
    Source

    pub fn mapping_varies_by_dest(&self) -> Option<bool>

    Whether the reported public address differs when probing different servers.

    -

    Trait Implementations§

    Source§

    impl Clone for Report

    Source§

    fn clone(&self) -> Report

    Returns a copy 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 Report

    Source§

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

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

    impl Default for Report

    Source§

    fn default() -> Report

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

    impl Display for Report

    Source§

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

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

    impl PartialEq for Report

    Source§

    fn eq(&self, other: &Report) -> 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 Eq for Report

    Source§

    impl StructuralPartialEq for Report

    Auto Trait Implementations§

    §

    impl Freeze for Report

    §

    impl RefUnwindSafe for Report

    §

    impl Send for Report

    §

    impl Sync for Report

    §

    impl Unpin for Report

    §

    impl UnwindSafe for Report

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Implementations§

    Source§

    impl Report

    Source

    pub fn has_udp(&self) -> bool

    Do we have any indication that UDP is working?

    +
    Source

    pub fn mapping_varies_by_dest(&self) -> Option<bool>

    Whether the reported public address differs when probing different servers.

    +

    Trait Implementations§

    Source§

    impl Clone for Report

    Source§

    fn clone(&self) -> Report

    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 Report

    Source§

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

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

    impl Default for Report

    Source§

    fn default() -> Report

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

    impl<'de> Deserialize<'de> for Report

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for Report

    Source§

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

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

    impl PartialEq for Report

    Source§

    fn eq(&self, other: &Report) -> 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 Serialize for Report

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for Report

    Source§

    impl StructuralPartialEq for Report

    Auto Trait Implementations§

    §

    impl Freeze for Report

    §

    impl RefUnwindSafe for Report

    §

    impl Send for Report

    §

    impl Sync for Report

    §

    impl Unpin for Report

    §

    impl UnwindSafe for Report

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -31,29 +33,39 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/constant.IROH_TXT_NAME.html b/pr/3367/docs/iroh/node_info/constant.IROH_TXT_NAME.html index 371d9c1e43..fcb8a95469 100644 --- a/pr/3367/docs/iroh/node_info/constant.IROH_TXT_NAME.html +++ b/pr/3367/docs/iroh/node_info/constant.IROH_TXT_NAME.html @@ -1,2 +1,2 @@ -IROH_TXT_NAME in iroh::node_info - Rust

    Constant IROH_TXT_NAME

    Source
    pub const IROH_TXT_NAME: &'static str;
    Expand description

    The DNS name for the iroh TXT record.

    +IROH_TXT_NAME in iroh::node_info - Rust

    IROH_TXT_NAME

    Constant IROH_TXT_NAME 

    Source
    pub const IROH_TXT_NAME: &'static str;
    Expand description

    The DNS name for the iroh TXT record.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/enum.DecodingError.html b/pr/3367/docs/iroh/node_info/enum.DecodingError.html index 6f11a63808..4f6e6cee77 100644 --- a/pr/3367/docs/iroh/node_info/enum.DecodingError.html +++ b/pr/3367/docs/iroh/node_info/enum.DecodingError.html @@ -1,4 +1,4 @@ -DecodingError in iroh::node_info - Rust

    Enum DecodingError

    Source
    #[non_exhaustive]
    pub enum DecodingError { +DecodingError in iroh::node_info - Rust

    DecodingError

    Enum DecodingError 

    Source
    #[non_exhaustive]
    pub enum DecodingError { InvalidEncodingZ32 { source: Z32Error, backtrace: Option<Backtrace>, @@ -14,14 +14,14 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidEncodingZ32

    Fields

    §source: Z32Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidLength

    Fields

    §len: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidSignature

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DecodingError

    Source§

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

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

    impl Display for DecodingError

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidEncodingZ32

    Fields

    §source: Z32Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidLength

    Fields

    §len: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidSignature

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DecodingError

    Source§

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

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

    impl Display for DecodingError

    Source§

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

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

    impl Error for DecodingError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DecodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +) -> Result<(), Error>

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

    impl Error for DecodingError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DecodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> ParseError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> ParseError

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -32,22 +32,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/enum.EncodingError.html b/pr/3367/docs/iroh/node_info/enum.EncodingError.html index 31c1b93474..b4fd00f91f 100644 --- a/pr/3367/docs/iroh/node_info/enum.EncodingError.html +++ b/pr/3367/docs/iroh/node_info/enum.EncodingError.html @@ -1,4 +1,4 @@ -EncodingError in iroh::node_info - Rust

    Enum EncodingError

    Source
    #[non_exhaustive]
    pub enum EncodingError { +EncodingError in iroh::node_info - Rust

    EncodingError

    Enum EncodingError 

    Source
    #[non_exhaustive]
    pub enum EncodingError { FailedBuildingPacket { source: SignedPacketBuildError, backtrace: Option<Backtrace>, @@ -9,14 +9,14 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    FailedBuildingPacket

    Fields

    §source: SignedPacketBuildError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidTxtEntry

    Fields

    §source: SimpleDnsError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for EncodingError

    Source§

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

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

    impl Display for EncodingError

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    FailedBuildingPacket

    Fields

    §source: SignedPacketBuildError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidTxtEntry

    Fields

    §source: SimpleDnsError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for EncodingError

    Source§

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

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

    impl Display for EncodingError

    Source§

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

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

    impl Error for EncodingError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for EncodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +) -> Result<(), Error>

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

    impl Error for EncodingError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for EncodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<SignedPacketBuildError> for EncodingError

    Source§

    fn from(error: SignedPacketBuildError) -> EncodingError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<SignedPacketBuildError> for EncodingError

    Source§

    fn from(error: SignedPacketBuildError) -> EncodingError

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -27,22 +27,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/enum.ParseError.html b/pr/3367/docs/iroh/node_info/enum.ParseError.html index 99fafc8bc0..152698c0e5 100644 --- a/pr/3367/docs/iroh/node_info/enum.ParseError.html +++ b/pr/3367/docs/iroh/node_info/enum.ParseError.html @@ -1,4 +1,4 @@ -ParseError in iroh::node_info - Rust

    Enum ParseError

    Source
    #[non_exhaustive]
    pub enum ParseError { +ParseError in iroh::node_info - Rust

    ParseError

    Enum ParseError 

    Source
    #[non_exhaustive]
    pub enum ParseError { UnexpectedFormat { s: String, backtrace: Option<Backtrace>, @@ -29,14 +29,14 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    UnexpectedFormat

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    AttrFromString

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NumLabels

    Fields

    §num_labels: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Utf8

    Fields

    §source: Utf8Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NotAnIrohRecord

    Fields

    §label: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DecodingError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for ParseError

    Source§

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

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

    impl Display for ParseError

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    UnexpectedFormat

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    AttrFromString

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NumLabels

    Fields

    §num_labels: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Utf8

    Fields

    §source: Utf8Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NotAnIrohRecord

    Fields

    §label: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DecodingError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for ParseError

    Source§

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

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

    impl Display for ParseError

    Source§

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

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

    impl Error for ParseError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +) -> Result<(), Error>

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

    impl Error for ParseError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> ParseError

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> ParseError

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -47,22 +47,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/index.html b/pr/3367/docs/iroh/node_info/index.html index 703ef36bd1..bd81863fa0 100644 --- a/pr/3367/docs/iroh/node_info/index.html +++ b/pr/3367/docs/iroh/node_info/index.html @@ -1,4 +1,4 @@ -iroh::node_info - Rust

    Module node_info

    Source
    Expand description

    Support for handling DNS resource records for dialing by NodeId.

    +iroh::node_info - Rust

    Module node_info

    Module node_info 

    Source
    Expand description

    Support for handling DNS resource records for dialing by NodeId.

    Dialing by NodeId is supported by iroh nodes publishing Pkarr records to DNS servers or the Mainline DHT. This module supports creating and parsing these records.

    DNS records are published under the following names:

    @@ -30,5 +30,5 @@ in RFC1464. The following Each address is an IPv4 or IPv6 address with a port.

    -

    Structs§

    MaxLengthExceededError
    Error returned when an input value is too long for UserData.
    NodeData
    Data about a node that may be published to and resolved from discovery services.
    NodeInfo
    Information about a node that may be published to and resolved from discovery services.
    UserData
    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Enums§

    DecodingError
    EncodingError
    LookupErrorNon-wasm_browser
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    NodeIdExt
    Extension methods for NodeId to encode to and decode from [z32], +

    Structs§

    MaxLengthExceededError
    Error returned when an input value is too long for UserData.
    NodeData
    Data about a node that may be published to and resolved from discovery services.
    NodeInfo
    Information about a node that may be published to and resolved from discovery services.
    UserData
    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Enums§

    DecodingError
    EncodingError
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    NodeIdExt
    Extension methods for NodeId to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/sidebar-items.js b/pr/3367/docs/iroh/node_info/sidebar-items.js index 6b1db917f7..30ce8a2b78 100644 --- a/pr/3367/docs/iroh/node_info/sidebar-items.js +++ b/pr/3367/docs/iroh/node_info/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["DecodingError","EncodingError","LookupError","ParseError"],"struct":["MaxLengthExceededError","NodeData","NodeInfo","UserData"],"trait":["NodeIdExt"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["DecodingError","EncodingError","ParseError"],"struct":["MaxLengthExceededError","NodeData","NodeInfo","UserData"],"trait":["NodeIdExt"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/struct.MaxLengthExceededError.html b/pr/3367/docs/iroh/node_info/struct.MaxLengthExceededError.html index 5fcac8a3f9..cb0dfeb1f1 100644 --- a/pr/3367/docs/iroh/node_info/struct.MaxLengthExceededError.html +++ b/pr/3367/docs/iroh/node_info/struct.MaxLengthExceededError.html @@ -1,9 +1,9 @@ -MaxLengthExceededError in iroh::node_info - Rust

    Struct MaxLengthExceededError

    Source
    pub struct MaxLengthExceededError { /* private fields */ }
    Expand description

    Error returned when an input value is too long for UserData.

    -

    Trait Implementations§

    Source§

    impl Debug for MaxLengthExceededError

    Source§

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

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

    impl Display for MaxLengthExceededError

    Source§

    fn fmt( +MaxLengthExceededError in iroh::node_info - Rust

    MaxLengthExceededError

    Struct MaxLengthExceededError 

    Source
    pub struct MaxLengthExceededError { /* private fields */ }
    Expand description

    Error returned when an input value is too long for UserData.

    +

    Trait Implementations§

    Source§

    impl Debug for MaxLengthExceededError

    Source§

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

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

    impl Display for MaxLengthExceededError

    Source§

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

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

    impl Error for MaxLengthExceededError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for MaxLengthExceededError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +) -> Result<(), Error>

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

    impl Error for MaxLengthExceededError

    Source§

    fn description(&self) -> &str

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

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

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

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

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for MaxLengthExceededError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where @@ -17,22 +17,31 @@ receivers.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

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

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/struct.NodeData.html b/pr/3367/docs/iroh/node_info/struct.NodeData.html index d07b9245d1..889f8aa381 100644 --- a/pr/3367/docs/iroh/node_info/struct.NodeData.html +++ b/pr/3367/docs/iroh/node_info/struct.NodeData.html @@ -1,31 +1,31 @@ -NodeData in iroh::node_info - Rust

    Struct NodeData

    Source
    pub struct NodeData { /* private fields */ }
    Expand description

    Data about a node that may be published to and resolved from discovery services.

    +NodeData in iroh::node_info - Rust

    NodeData

    Struct NodeData 

    Source
    pub struct NodeData { /* private fields */ }
    Expand description

    Data about a node that may be published to and resolved from discovery services.

    This includes an optional RelayUrl, a set of direct addresses, and the optional UserData, a string that can be set by applications and is not parsed or used by iroh itself.

    This struct does not include the node’s NodeId, only the data about a certain node. See NodeInfo for a struct that contains a NodeId with associated NodeData.

    -

    Implementations§

    Source§

    impl NodeData

    Source

    pub fn new( +

    Implementations§

    Source§

    impl NodeData

    Source

    pub fn new( relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeData

    Creates a new NodeData with a relay URL and a set of direct addresses.

    -
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeData

    Sets the relay URL and returns the updated node data.

    -
    Source

    pub fn with_direct_addresses( +

    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeData

    Sets the relay URL and returns the updated node data.

    +
    Source

    pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeData

    Sets the direct addresses and returns the updated node data.

    -
    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> NodeData

    Sets the user-defined data and returns the updated node data.

    -
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    -
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    -
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    -
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    -
    Source

    pub fn add_direct_addresses( +

    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> NodeData

    Sets the user-defined data and returns the updated node data.

    +
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    +
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    +
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    +
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    +
    Source

    pub fn add_direct_addresses( &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

    Adds direct addresses to the node data.

    -
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    -
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeData

    Source§

    fn clone(&self) -> NodeData

    Returns a copy 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 NodeData

    Source§

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

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

    impl Default for NodeData

    Source§

    fn default() -> NodeData

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

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> NodeData

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeData

    Source§

    fn eq(&self, other: &NodeData) -> 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 Eq for NodeData

    Source§

    impl StructuralPartialEq for NodeData

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    +
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    +

    Trait Implementations§

    Source§

    impl Clone for NodeData

    Source§

    fn clone(&self) -> NodeData

    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 NodeData

    Source§

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

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

    impl Default for NodeData

    Source§

    fn default() -> NodeData

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

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> NodeData

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeData

    Source§

    fn eq(&self, other: &NodeData) -> 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 Eq for NodeData

    Source§

    impl StructuralPartialEq for NodeData

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -33,28 +33,35 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/struct.NodeInfo.html b/pr/3367/docs/iroh/node_info/struct.NodeInfo.html index 86987bbccb..e9ffab6354 100644 --- a/pr/3367/docs/iroh/node_info/struct.NodeInfo.html +++ b/pr/3367/docs/iroh/node_info/struct.NodeInfo.html @@ -1,43 +1,46 @@ -NodeInfo in iroh::node_info - Rust

    Struct NodeInfo

    Source
    pub struct NodeInfo {
    +NodeInfo in iroh::node_info - Rust

    NodeInfo

    Struct NodeInfo 

    Source
    pub struct NodeInfo {
         pub node_id: PublicKey,
         pub data: NodeData,
     }
    Expand description

    Information about a node that may be published to and resolved from discovery services.

    This struct couples a NodeId with its associated NodeData.

    Fields§

    §node_id: PublicKey

    The NodeId of the node this is about.

    §data: NodeData

    The information published about the node.

    -

    Implementations§

    Source§

    impl NodeInfo

    Source

    pub fn new(node_id: PublicKey) -> NodeInfo

    Creates a new NodeInfo with an empty NodeData.

    -
    Source

    pub fn from_parts(node_id: PublicKey, data: NodeData) -> NodeInfo

    Creates a new NodeInfo from its parts.

    -
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeInfo

    Sets the relay URL and returns the updated node info.

    -
    Source

    pub fn with_direct_addresses( +

    Implementations§

    Source§

    impl NodeInfo

    Source

    pub fn new(node_id: PublicKey) -> NodeInfo

    Creates a new NodeInfo with an empty NodeData.

    +
    Source

    pub fn from_parts(node_id: PublicKey, data: NodeData) -> NodeInfo

    Creates a new NodeInfo from its parts.

    +
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> NodeInfo

    Sets the relay URL and returns the updated node info.

    +
    Source

    pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> NodeInfo

    Sets the direct addresses and returns the updated node info.

    -
    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> NodeInfo

    Sets the user-defined data and returns the updated node info.

    -
    Source

    pub fn to_node_addr(&self) -> NodeAddr

    Converts into a NodeAddr by cloning the needed fields.

    -
    Source

    pub fn into_node_addr(self) -> NodeAddr

    Converts into a NodeAddr without cloning.

    -
    Source

    pub fn from_txt_lookup(lookup: TxtLookup) -> Result<NodeInfo, ParseError>

    Available on non-wasm_browser only.

    Parses a NodeInfo from a TXT records lookup.

    -
    Source

    pub fn from_pkarr_signed_packet( +

    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> NodeInfo

    Sets the user-defined data and returns the updated node info.

    +
    Source

    pub fn to_node_addr(&self) -> NodeAddr

    Converts into a NodeAddr by cloning the needed fields.

    +
    Source

    pub fn into_node_addr(self) -> NodeAddr

    Converts into a NodeAddr without cloning.

    +
    Source

    pub fn from_txt_lookup( + domain_name: String, + lookup: impl Iterator<Item = TxtRecordData>, +) -> Result<NodeInfo, ParseError>

    Parses a NodeInfo from DNS TXT lookup.

    +
    Source

    pub fn from_pkarr_signed_packet( packet: &SignedPacket, ) -> Result<NodeInfo, ParseError>

    Parses a NodeInfo from a [pkarr::SignedPacket].

    -
    Source

    pub fn to_pkarr_signed_packet( +

    Source

    pub fn to_pkarr_signed_packet( &self, secret_key: &SecretKey, ttl: u32, ) -> Result<SignedPacket, EncodingError>

    Creates a [pkarr::SignedPacket].

    This constructs a DNS packet and signs it with a SecretKey.

    -
    Source

    pub fn to_txt_strings(&self) -> Vec<String>

    Converts into a list of {key}={value} strings.

    -

    Methods from Deref<Target = NodeData>§

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    -
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    -
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    -
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    -
    Source

    pub fn add_direct_addresses( +

    Source

    pub fn to_txt_strings(&self) -> Vec<String>

    Converts into a list of {key}={value} strings.

    +

    Methods from Deref<Target = NodeData>§

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    +
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    +
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    +
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    +
    Source

    pub fn add_direct_addresses( &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

    Adds direct addresses to the node data.

    -
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    -
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeInfo

    Source§

    fn clone(&self) -> NodeInfo

    Returns a copy 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 NodeInfo

    Source§

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

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

    impl Deref for NodeInfo

    Source§

    type Target = NodeData

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &<NodeInfo as Deref>::Target

    Dereferences the value.
    Source§

    impl DerefMut for NodeInfo

    Source§

    fn deref_mut(&mut self) -> &mut <NodeInfo as Deref>::Target

    Mutably dereferences the value.
    Source§

    impl From<&TxtAttrs<IrohAttr>> for NodeInfo

    Source§

    fn from(attrs: &TxtAttrs<IrohAttr>) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl From<DiscoveryItem> for NodeInfo

    Source§

    fn from(item: DiscoveryItem) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<TxtAttrs<IrohAttr>> for NodeInfo

    Source§

    fn from(attrs: TxtAttrs<IrohAttr>) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeInfo

    Source§

    fn eq(&self, other: &NodeInfo) -> 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 Eq for NodeInfo

    Source§

    impl StructuralPartialEq for NodeInfo

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    +
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    +

    Trait Implementations§

    Source§

    impl Clone for NodeInfo

    Source§

    fn clone(&self) -> NodeInfo

    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 NodeInfo

    Source§

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

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

    impl Deref for NodeInfo

    Source§

    type Target = NodeData

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &<NodeInfo as Deref>::Target

    Dereferences the value.
    Source§

    impl DerefMut for NodeInfo

    Source§

    fn deref_mut(&mut self) -> &mut <NodeInfo as Deref>::Target

    Mutably dereferences the value.
    Source§

    impl From<&TxtAttrs<IrohAttr>> for NodeInfo

    Source§

    fn from(attrs: &TxtAttrs<IrohAttr>) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl From<DiscoveryItem> for NodeInfo

    Source§

    fn from(item: DiscoveryItem) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<TxtAttrs<IrohAttr>> for NodeInfo

    Source§

    fn from(attrs: TxtAttrs<IrohAttr>) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeInfo

    Source§

    fn eq(&self, other: &NodeInfo) -> 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 Eq for NodeInfo

    Source§

    impl StructuralPartialEq for NodeInfo

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -45,30 +48,37 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

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

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

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

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<P, T> Receiver for P
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<P, T> Receiver for P
    where P: Deref<Target = T> + ?Sized, - T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/struct.UserData.html b/pr/3367/docs/iroh/node_info/struct.UserData.html index 1bcd06a214..44df5d87a2 100644 --- a/pr/3367/docs/iroh/node_info/struct.UserData.html +++ b/pr/3367/docs/iroh/node_info/struct.UserData.html @@ -1,24 +1,24 @@ -UserData in iroh::node_info - Rust

    Struct UserData

    Source
    pub struct UserData(/* private fields */);
    Expand description

    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    +UserData in iroh::node_info - Rust

    UserData

    Struct UserData 

    Source
    pub struct UserData(/* private fields */);
    Expand description

    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Iroh does not keep track of or examine the user-defined data.

    UserData implements FromStr and TryFrom<String>, so you can convert &str and String into UserData easily.

    -

    Implementations§

    Source§

    impl UserData

    Source

    pub const MAX_LENGTH: usize = 245usize

    The max byte length allowed for user-defined data.

    +

    Implementations§

    Source§

    impl UserData

    Source

    pub const MAX_LENGTH: usize = 245usize

    The max byte length allowed for user-defined data.

    In DNS discovery services, the user-defined data is stored in a TXT record character string, which has a max length of 255 bytes. We need to subtract the user-data= prefix, which leaves 245 bytes for the actual user-defined data.

    -

    Trait Implementations§

    Source§

    impl AsRef<str> for UserData

    Source§

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Clone for UserData

    Source§

    fn clone(&self) -> UserData

    Returns a copy 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 UserData

    Source§

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

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

    impl Display for UserData

    Source§

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

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

    impl FromStr for UserData

    Source§

    type Err = MaxLengthExceededError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<UserData, <UserData as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for UserData

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where +

    Trait Implementations§

    Source§

    impl AsRef<str> for UserData

    Source§

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Clone for UserData

    Source§

    fn clone(&self) -> UserData

    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 UserData

    Source§

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

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

    impl Display for UserData

    Source§

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

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

    impl FromStr for UserData

    Source§

    type Err = MaxLengthExceededError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<UserData, <UserData as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for UserData

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    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 Ord for UserData

    Source§

    fn cmp(&self, other: &UserData) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for UserData

    Source§

    fn eq(&self, other: &UserData) -> 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 PartialOrd for UserData

    Source§

    fn partial_cmp(&self, other: &UserData) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl TryFrom<String> for UserData

    Source§

    type Error = MaxLengthExceededError

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

    fn try_from( + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for UserData

    Source§

    fn cmp(&self, other: &UserData) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for UserData

    Source§

    fn eq(&self, other: &UserData) -> 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 PartialOrd for UserData

    Source§

    fn partial_cmp(&self, other: &UserData) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl TryFrom<String> for UserData

    Source§

    type Error = MaxLengthExceededError

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

    fn try_from( value: String, -) -> Result<UserData, <UserData as TryFrom<String>>::Error>

    Performs the conversion.
    Source§

    impl Eq for UserData

    Source§

    impl StructuralPartialEq for UserData

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T

    Performs the conversion.
    Source§

    impl Eq for UserData

    Source§

    impl StructuralPartialEq for UserData

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -26,31 +26,40 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

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

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/trait.NodeIdExt.html b/pr/3367/docs/iroh/node_info/trait.NodeIdExt.html index f870c03d77..dec9772429 100644 --- a/pr/3367/docs/iroh/node_info/trait.NodeIdExt.html +++ b/pr/3367/docs/iroh/node_info/trait.NodeIdExt.html @@ -1,9 +1,9 @@ -NodeIdExt in iroh::node_info - Rust

    Trait NodeIdExt

    Source
    pub trait NodeIdExt {
    +NodeIdExt in iroh::node_info - Rust

    NodeIdExt

    Trait NodeIdExt 

    Source
    pub trait NodeIdExt {
         // Required methods
         fn to_z32(&self) -> String;
         fn from_z32(s: &str) -> Result<PublicKey, DecodingError>;
     }
    Expand description

    Extension methods for NodeId to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.

    -

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.

    -
    Source

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from [z-base-32] encoding.

    -

    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§

    \ No newline at end of file +

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a NodeId in z-base-32 encoding.

    +
    Source

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from z-base-32 encoding.

    +

    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§

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/enum.AcceptError.html b/pr/3367/docs/iroh/protocol/enum.AcceptError.html index 465083fb43..31add04f8d 100644 --- a/pr/3367/docs/iroh/protocol/enum.AcceptError.html +++ b/pr/3367/docs/iroh/protocol/enum.AcceptError.html @@ -1,4 +1,4 @@ -AcceptError in iroh::protocol - Rust

    Enum AcceptError

    Source
    #[non_exhaustive]
    pub enum AcceptError { +AcceptError in iroh::protocol - Rust

    AcceptError

    Enum AcceptError 

    Source
    #[non_exhaustive]
    pub enum AcceptError { Connection { source: ConnectionError, backtrace: Option<Backtrace>, @@ -11,12 +11,12 @@ User { source: Box<dyn Error + Send + Sync + 'static>, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Connection

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    MissingRemoteNodeId

    Fields

    §

    NotAllowed

    §

    User

    Fields

    §source: Box<dyn Error + Send + Sync + 'static>

    Implementations§

    Source§

    impl AcceptError

    Source

    pub fn from_err<T: Error + Send + Sync + 'static>(value: T) -> Self

    Creates a new user error from an arbitrary error type.

    -

    Trait Implementations§

    Source§

    impl Debug for AcceptError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for AcceptError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for AcceptError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for AcceptError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Connection

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    MissingRemoteNodeId

    Fields

    §

    NotAllowed

    §

    User

    Fields

    §source: Box<dyn Error + Send + Sync + 'static>

    Implementations§

    Source§

    impl AcceptError

    Source

    pub fn from_err<T: Error + Send + Sync + 'static>(value: T) -> Self

    Creates a new user error from an arbitrary error type.

    +

    Trait Implementations§

    Source§

    impl Debug for AcceptError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for AcceptError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for AcceptError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for AcceptError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Box<dyn Error + Send + Sync>> for AcceptError

    Source§

    fn from(error: Box<dyn Error + Send + Sync + 'static>) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ClosedStream> for AcceptError

    Source§

    fn from(err: ClosedStream) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for AcceptError

    Source§

    fn from(error: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for AcceptError

    Source§

    fn from(err: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RemoteNodeIdError> for AcceptError

    Source§

    fn from(error: RemoteNodeIdError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<Box<dyn Error + Send + Sync>> for AcceptError

    Source§

    fn from(error: Box<dyn Error + Send + Sync + 'static>) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ClosedStream> for AcceptError

    Source§

    fn from(err: ClosedStream) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for AcceptError

    Source§

    fn from(error: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for AcceptError

    Source§

    fn from(err: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RemoteNodeIdError> for AcceptError

    Source§

    fn from(error: RemoteNodeIdError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -27,22 +27,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/index.html b/pr/3367/docs/iroh/protocol/index.html index 5c28a02643..2be72d73e9 100644 --- a/pr/3367/docs/iroh/protocol/index.html +++ b/pr/3367/docs/iroh/protocol/index.html @@ -1,4 +1,4 @@ -iroh::protocol - Rust

    Module protocol

    Source
    Expand description

    Tools for spawning an accept loop that routes incoming requests to the right protocol.

    +iroh::protocol - Rust

    Module protocol

    Module protocol 

    Source
    Expand description

    Tools for spawning an accept loop that routes incoming requests to the right protocol.

    §Example

    let endpoint = Endpoint::builder().discovery_n0().bind().await?;
     
    @@ -22,6 +22,5 @@
     
             Ok(())
         }
    -}
    -

    Structs§

    AccessLimit
    Wraps an existing protocol, limiting its access, +}

    Structs§

    AccessLimit
    Wraps an existing protocol, limiting its access, based on the provided function.
    Router
    The built router.
    RouterBuilder
    Builder for creating a Router for accepting protocols.

    Enums§

    AcceptError

    Traits§

    DynProtocolHandler
    A dyn-compatible version of ProtocolHandler that returns boxed futures.
    ProtocolHandler
    Handler for incoming connections.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/struct.AccessLimit.html b/pr/3367/docs/iroh/protocol/struct.AccessLimit.html index 738522117b..542d009de3 100644 --- a/pr/3367/docs/iroh/protocol/struct.AccessLimit.html +++ b/pr/3367/docs/iroh/protocol/struct.AccessLimit.html @@ -1,15 +1,15 @@ -AccessLimit in iroh::protocol - Rust

    Struct AccessLimit

    Source
    pub struct AccessLimit<P: ProtocolHandler + Clone> { /* private fields */ }
    Expand description

    Wraps an existing protocol, limiting its access, +AccessLimit in iroh::protocol - Rust

    AccessLimit

    Struct AccessLimit 

    Source
    pub struct AccessLimit<P: ProtocolHandler + Clone> { /* private fields */ }
    Expand description

    Wraps an existing protocol, limiting its access, based on the provided function.

    Any refused connection will be closed with an error code of 0 and reason not allowed.

    -

    Implementations§

    Source§

    impl<P: ProtocolHandler + Clone> AccessLimit<P>

    Source

    pub fn new<F>(proto: P, limiter: F) -> Self
    where +

    Implementations§

    Source§

    impl<P: ProtocolHandler + Clone> AccessLimit<P>

    Source

    pub fn new<F>(proto: P, limiter: F) -> Self
    where F: Fn(NodeId) -> bool + Send + Sync + 'static,

    Create a new AccessLimit.

    The function should return true for nodes that are allowed to connect, and false otherwise.

    -

    Trait Implementations§

    Source§

    impl<P: Clone + ProtocolHandler + Clone> Clone for AccessLimit<P>

    Source§

    fn clone(&self) -> AccessLimit<P>

    Returns a copy 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<P> Debug for AccessLimit<P>
    where - P: Debug + ProtocolHandler + Clone,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<P: ProtocolHandler + Clone> ProtocolHandler for AccessLimit<P>

    Trait Implementations§

    Source§

    impl<P: Clone + ProtocolHandler + Clone> Clone for AccessLimit<P>

    Source§

    fn clone(&self) -> AccessLimit<P>

    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<P> Debug for AccessLimit<P>
    where + P: Debug + ProtocolHandler + Clone,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<P: ProtocolHandler + Clone> ProtocolHandler for AccessLimit<P>

    Source§

    fn on_connecting( &self, conn: Connecting, -) -> impl Future<Output = Result<Connection, AcceptError>> + Send

    Optional interception point to handle the Connecting state. Read more
    Source§

    async fn accept(&self, conn: Connection) -> Result<(), AcceptError>

    Handle an incoming connection. Read more
    Source§

    fn shutdown(&self) -> impl Future<Output = ()> + Send

    Called when the router shuts down. Read more

    Auto Trait Implementations§

    §

    impl<P> Freeze for AccessLimit<P>
    where +) -> impl Future<Output = Result<Connection, AcceptError>> + Send

    Optional interception point to handle the Connecting state. Read more
    Source§

    async fn accept(&self, conn: Connection) -> Result<(), AcceptError>

    Handle an incoming connection. Read more
    Source§

    fn shutdown(&self) -> impl Future<Output = ()> + Send

    Called when the router shuts down. Read more

    Auto Trait Implementations§

    §

    impl<P> Freeze for AccessLimit<P>
    where P: Freeze,

    §

    impl<P> !RefUnwindSafe for AccessLimit<P>

    §

    impl<P> Send for AccessLimit<P>

    §

    impl<P> Sync for AccessLimit<P>

    §

    impl<P> Unpin for AccessLimit<P>
    where P: Unpin,

    §

    impl<P> !UnwindSafe for AccessLimit<P>

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where @@ -19,31 +19,38 @@ connect, and false otherwise.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<P> DynProtocolHandler for P
    where - P: ProtocolHandler,

    Source§

    fn accept( +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<P> DynProtocolHandler for P
    where + P: ProtocolHandler,

    Source§

    fn accept( &self, connection: Connection, -) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>

    Source§

    fn on_connecting( +) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>

    Source§

    fn on_connecting( &self, connecting: Connecting, -) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>>

    Source§

    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>>
    Source§

    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/struct.Router.html b/pr/3367/docs/iroh/protocol/struct.Router.html index 81dc8444f2..5fe5b44224 100644 --- a/pr/3367/docs/iroh/protocol/struct.Router.html +++ b/pr/3367/docs/iroh/protocol/struct.Router.html @@ -1,4 +1,4 @@ -Router in iroh::protocol - Rust

    Struct Router

    Source
    pub struct Router { /* private fields */ }
    Expand description

    The built router.

    +Router in iroh::protocol - Rust

    Router

    Struct Router 

    Source
    pub struct Router { /* private fields */ }
    Expand description

    The built router.

    Construct this using Router::builder.

    When dropped, this will abort listening the tasks, so make sure to store it.

    Even with this abort-on-drop behaviour, it’s recommended to call and await @@ -14,17 +14,16 @@ wait for [tokio::signal::ctrl_c()]:

    // wait until the user wants to tokio::signal::ctrl_c().await.context("ctrl+c")?; -router.shutdown().await.context("shutdown")?;
    -

    Implementations§

    Source§

    impl Router

    Source

    pub fn builder(endpoint: Endpoint) -> RouterBuilder

    Creates a new Router using given Endpoint.

    -
    Source

    pub fn endpoint(&self) -> &Endpoint

    Returns the Endpoint stored in this router.

    -
    Source

    pub fn is_shutdown(&self) -> bool

    Checks if the router is already shutdown.

    -
    Source

    pub async fn shutdown(&self) -> Result<(), JoinError>

    Shuts down the accept loop cleanly.

    +router.shutdown().await.context("shutdown")?;

    Implementations§

    Source§

    impl Router

    Source

    pub fn builder(endpoint: Endpoint) -> RouterBuilder

    Creates a new Router using given Endpoint.

    +
    Source

    pub fn endpoint(&self) -> &Endpoint

    Returns the Endpoint stored in this router.

    +
    Source

    pub fn is_shutdown(&self) -> bool

    Checks if the router is already shutdown.

    +
    Source

    pub async fn shutdown(&self) -> Result<(), JoinError>

    Shuts down the accept loop cleanly.

    When this function returns, all ProtocolHandlers will be shutdown and Endpoint::close will have been called.

    If already shutdown, it returns Ok.

    If some ProtocolHandler panicked in the accept loop, this will propagate that panic into the result here.

    -

    Trait Implementations§

    Source§

    impl Clone for Router

    Source§

    fn clone(&self) -> Router

    Returns a copy 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 Router

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Router

    §

    impl !RefUnwindSafe for Router

    §

    impl Send for Router

    §

    impl Sync for Router

    §

    impl Unpin for Router

    §

    impl !UnwindSafe for Router

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for Router

    Source§

    fn clone(&self) -> Router

    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 Router

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Router

    §

    impl !RefUnwindSafe for Router

    §

    impl Send for Router

    §

    impl Sync for Router

    §

    impl Unpin for Router

    §

    impl !UnwindSafe for Router

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -32,24 +31,31 @@ that panic into the result here.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/struct.RouterBuilder.html b/pr/3367/docs/iroh/protocol/struct.RouterBuilder.html index 01ea7f0584..8f6a5c1840 100644 --- a/pr/3367/docs/iroh/protocol/struct.RouterBuilder.html +++ b/pr/3367/docs/iroh/protocol/struct.RouterBuilder.html @@ -1,6 +1,6 @@ -RouterBuilder in iroh::protocol - Rust

    Struct RouterBuilder

    Source
    pub struct RouterBuilder { /* private fields */ }
    Expand description

    Builder for creating a Router for accepting protocols.

    -

    Implementations§

    Source§

    impl RouterBuilder

    Source

    pub fn new(endpoint: Endpoint) -> Self

    Creates a new router builder using given Endpoint.

    -
    Source

    pub fn accept( +RouterBuilder in iroh::protocol - Rust

    RouterBuilder

    Struct RouterBuilder 

    Source
    pub struct RouterBuilder { /* private fields */ }
    Expand description

    Builder for creating a Router for accepting protocols.

    +

    Implementations§

    Source§

    impl RouterBuilder

    Source

    pub fn new(endpoint: Endpoint) -> Self

    Creates a new router builder using given Endpoint.

    +
    Source

    pub fn accept( self, alpn: impl AsRef<[u8]>, handler: impl Into<Box<dyn DynProtocolHandler>>, @@ -8,9 +8,9 @@ with this alpn.

    handler can either be a type that implements ProtocolHandler or a Box<dyn DynProtocolHandler>.

    -

    Source

    pub fn endpoint(&self) -> &Endpoint

    Returns the Endpoint of the node.

    -
    Source

    pub fn spawn(self) -> Router

    Spawns an accept loop and returns a handle to it encapsulated as the Router.

    -

    Trait Implementations§

    Source§

    impl Debug for RouterBuilder

    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 +

    Source

    pub fn endpoint(&self) -> &Endpoint

    Returns the Endpoint of the node.

    +
    Source

    pub fn spawn(self) -> Router

    Spawns an accept loop and returns a handle to it encapsulated as the Router.

    +

    Trait Implementations§

    Source§

    impl Debug for RouterBuilder

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -18,20 +18,27 @@ with this alpn.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/trait.DynProtocolHandler.html b/pr/3367/docs/iroh/protocol/trait.DynProtocolHandler.html index 41b56de87a..30102979d0 100644 --- a/pr/3367/docs/iroh/protocol/trait.DynProtocolHandler.html +++ b/pr/3367/docs/iroh/protocol/trait.DynProtocolHandler.html @@ -1,4 +1,4 @@ -DynProtocolHandler in iroh::protocol - Rust

    Trait DynProtocolHandler

    Source
    pub trait DynProtocolHandler:
    +DynProtocolHandler in iroh::protocol - Rust

    DynProtocolHandler

    Trait DynProtocolHandler 

    Source
    pub trait DynProtocolHandler:
         Send
         + Sync
         + Debug
    @@ -19,13 +19,13 @@
     

    Any type that implements ProtocolHandler automatically also implements DynProtocolHandler. There is a also From impl to turn any type that implements ProtocolHandler into a Box<dyn DynProtocolHandler>.

    -

    Required Methods§

    Required Methods§

    Source

    fn accept( &self, connection: Connection, ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>

    Provided Methods§

    Provided Methods§

    Source

    fn on_connecting( &self, connecting: Connecting, ) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>>

    Source

    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

    Trait Implementations§

    Source§

    impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>

    Source§

    fn from(value: T) -> Self

    Converts to this type from the input type.

    Implementors§

    \ No newline at end of file +
    Source

    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>>

    Trait Implementations§

    Source§

    impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>

    Source§

    fn from(value: T) -> Self

    Converts to this type from the input type.

    Implementors§

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/protocol/trait.ProtocolHandler.html b/pr/3367/docs/iroh/protocol/trait.ProtocolHandler.html index 64e740fe54..7cff588966 100644 --- a/pr/3367/docs/iroh/protocol/trait.ProtocolHandler.html +++ b/pr/3367/docs/iroh/protocol/trait.ProtocolHandler.html @@ -1,4 +1,4 @@ -ProtocolHandler in iroh::protocol - Rust

    Trait ProtocolHandler

    Source
    pub trait ProtocolHandler:
    +ProtocolHandler in iroh::protocol - Rust

    ProtocolHandler

    Trait ProtocolHandler 

    Source
    pub trait ProtocolHandler:
         Send
         + Sync
         + Debug
    @@ -22,7 +22,7 @@
     The protocol handler must then be registered on the node for an ALPN protocol with
     crate::protocol::RouterBuilder::accept.

    See the module documentation for an example.

    -

    Required Methods§

    Required Methods§

    Source

    fn accept( &self, connection: Connection, ) -> impl Future<Output = Result<(), AcceptError>> + Send

    Handle an incoming connection.

    @@ -31,20 +31,20 @@ The protocol handler must then be registered on the node for an ALPN protocol wi

    When Router::shutdown is called, no further connections will be accepted, and the futures returned by Self::accept will be aborted after the future returned from ProtocolHandler::shutdown completes.

    -

    Provided Methods§

    Provided Methods§

    Source

    fn on_connecting( &self, connecting: Connecting, ) -> impl Future<Output = Result<Connection, AcceptError>> + Send

    Optional interception point to handle the Connecting state.

    Can be implemented as async fn on_connecting(&self, connecting: Connecting) -> Result<Connection>.

    This enables accepting 0-RTT data from clients, among other things.

    -
    Source

    fn shutdown(&self) -> impl Future<Output = ()> + Send

    Called when the router shuts down.

    +
    Source

    fn shutdown(&self) -> impl Future<Output = ()> + Send

    Called when the router shuts down.

    Can be implemented as async fn shutdown(&self).

    This is called from Router::shutdown. The returned future is awaited before the router closes the endpoint.

    -

    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.

    Implementations on Foreign Types§

    Source§

    impl<T: ProtocolHandler> ProtocolHandler for Box<T>

    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.

    Implementations on Foreign Types§

    Source§

    impl<T: ProtocolHandler> ProtocolHandler for Box<T>

    Source§

    async fn on_connecting( &self, conn: Connecting, -) -> Result<Connection, AcceptError>

    Source§

    async fn accept(&self, conn: Connection) -> Result<(), AcceptError>

    Source§

    async fn shutdown(&self)

    Source§

    impl<T: ProtocolHandler> ProtocolHandler for Arc<T>

    Source§

    impl<T: ProtocolHandler> ProtocolHandler for Arc<T>

    Source§

    async fn on_connecting( &self, conn: Connecting, -) -> Result<Connection, AcceptError>

    Source§

    async fn accept(&self, conn: Connection) -> Result<(), AcceptError>

    Source§

    async fn shutdown(&self)

    Implementors§

    \ No newline at end of file +) -> Result<Connection, AcceptError>
    Source§

    async fn accept(&self, conn: Connection) -> Result<(), AcceptError>

    Source§

    async fn shutdown(&self)

    Implementors§

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/sidebar-items.js b/pr/3367/docs/iroh/sidebar-items.js index b060d5b8c3..dee9660db1 100644 --- a/pr/3367/docs/iroh/sidebar-items.js +++ b/pr/3367/docs/iroh/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":["KeyParsingError","RelayProtocol"],"mod":["defaults","discovery","dns","endpoint","metrics","net_report","node_info","protocol","test_utils"],"struct":["NodeAddr","PublicKey","RelayMap","RelayNode","RelayUrl","RelayUrlParseError","SecretKey"],"trait":["Watcher"],"type":["NodeId"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["KeyParsingError"],"mod":["defaults","discovery","dns","endpoint","metrics","net_report","node_info","protocol","test_utils"],"struct":["NodeAddr","PublicKey","RelayMap","RelayNode","RelayUrl","RelayUrlParseError","SecretKey"],"trait":["Watcher"],"type":["NodeId"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.NodeAddr.html b/pr/3367/docs/iroh/struct.NodeAddr.html index 2314dbc822..de45313da7 100644 --- a/pr/3367/docs/iroh/struct.NodeAddr.html +++ b/pr/3367/docs/iroh/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh - Rust

    Struct NodeAddr

    Source
    pub struct NodeAddr {
    +NodeAddr in iroh - Rust

    NodeAddr

    Struct NodeAddr 

    pub struct NodeAddr {
         pub node_id: PublicKey,
         pub relay_url: Option<RelayUrl>,
         pub direct_addresses: BTreeSet<SocketAddr>,
    @@ -27,36 +27,39 @@ whenever a connection to other nodes needs to be established.

    Fields§

    §node_id: PublicKey

    The node’s identifier.

    §relay_url: Option<RelayUrl>

    The node’s home relay url.

    §direct_addresses: BTreeSet<SocketAddr>

    Socket addresses where the peer might be reached directly.

    -

    Implementations§

    Source§

    impl NodeAddr

    Source

    pub fn new(node_id: PublicKey) -> NodeAddr

    Creates a new NodeAddr with no relay_url and no direct_addresses.

    -
    Source

    pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

    Adds a relay url.

    -
    Source

    pub fn with_direct_addresses( +

    Implementations§

    §

    impl NodeAddr

    pub fn new(node_id: PublicKey) -> NodeAddr

    Creates a new NodeAddr with no relay_url and no direct_addresses.

    +

    pub fn with_relay_url(self, relay_url: RelayUrl) -> NodeAddr

    Adds a relay url.

    +

    pub fn with_direct_addresses( self, addresses: impl IntoIterator<Item = SocketAddr>, ) -> NodeAddr

    Adds the given direct addresses.

    -
    Source

    pub fn from_parts( +

    pub fn from_parts( node_id: PublicKey, relay_url: Option<RelayUrl>, direct_addresses: impl IntoIterator<Item = SocketAddr>, ) -> NodeAddr

    Creates a new NodeAddr from its parts.

    -
    Source

    pub fn is_empty(&self) -> bool

    Returns true, if only a NodeId is present.

    -
    Source

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    -
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeAddr

    Source§

    fn clone(&self) -> NodeAddr

    Returns a copy 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 NodeAddr

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for NodeAddr

    pub fn is_empty(&self) -> bool

    Returns true, if only a NodeId is present.

    +

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    +

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    +

    Trait Implementations§

    §

    impl Clone for NodeAddr

    §

    fn clone(&self) -> NodeAddr

    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
    §

    impl Debug for NodeAddr

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for NodeAddr

    §

    fn deserialize<__D>( __deserializer: __D, -) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    Source§

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> NodeData

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<NodeTicket> for NodeAddr

    Source§

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    -
    Source§

    impl From<PublicKey> for NodeAddr

    Source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<RemoteInfo> for NodeAddr

    Source§

    fn from(info: RemoteInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl Ord for NodeAddr

    Source§

    fn cmp(&self, other: &NodeAddr) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for NodeAddr

    Source§

    fn eq(&self, other: &NodeAddr) -> 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 PartialOrd for NodeAddr

    Source§

    fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for NodeAddr

    Source§

    fn serialize<__S>( +) -> Result<NodeAddr, <__D as Deserializer<'de>>::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    §

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> NodeData

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> NodeInfo

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> NodeAddr

    Converts to this type from the input type.
    §

    impl From<NodeTicket> for NodeAddr

    §

    fn from(ticket: NodeTicket) -> NodeAddr

    Returns the addressing info from given ticket.

    +
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    §

    impl Hash for NodeAddr

    §

    fn hash<__H>(&self, state: &mut __H)
    where + __H: Hasher,

    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
    §

    impl Ord for NodeAddr

    §

    fn cmp(&self, other: &NodeAddr) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for NodeAddr

    §

    fn eq(&self, other: &NodeAddr) -> 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.
    §

    impl PartialOrd for NodeAddr

    §

    fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    §

    impl Serialize for NodeAddr

    §

    fn serialize<__S>( &self, __serializer: __S, -) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for NodeAddr

    Source§

    impl StructuralPartialEq for NodeAddr

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl Eq for NodeAddr

    §

    impl StructuralPartialEq for NodeAddr

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -64,31 +67,38 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.PublicKey.html b/pr/3367/docs/iroh/struct.PublicKey.html index 8383109b13..14ab333eed 100644 --- a/pr/3367/docs/iroh/struct.PublicKey.html +++ b/pr/3367/docs/iroh/struct.PublicKey.html @@ -1,43 +1,43 @@ -PublicKey in iroh - Rust

    Struct PublicKey

    Source
    pub struct PublicKey(/* private fields */);
    Expand description

    A public key.

    +PublicKey in iroh - Rust

    PublicKey

    Struct PublicKey 

    pub struct PublicKey(/* private fields */);
    Expand description

    A public key.

    The key itself is stored as the CompressedEdwards y coordinate of the public key It is verified to decompress into a valid key when created.

    -

    Implementations§

    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    -
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    -
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    -
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    +

    Implementations§

    §

    impl PublicKey

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    +

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    +

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    +

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    §Warning

    This will return a [SignatureError] if the bytes passed into this method do not represent a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

    -
    Source

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    +

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    §Return

    Returns Ok(()) if the signature is valid, and Err otherwise.

    -
    Source

    pub fn fmt_short(&self) -> String

    Convert to a hex string limited to the first 5 bytes for a friendly string +

    pub fn fmt_short(&self) -> impl Display + 'static

    Convert to a hex string limited to the first 5 bytes for a friendly string representation of the key.

    -

    Trait Implementations§

    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    Returns a copy 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 PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Trait Implementations§

    §

    impl AsRef<[u8]> for PublicKey

    §

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    §

    impl Borrow<[u8; 32]> for PublicKey

    §

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    §

    impl Clone for PublicKey

    §

    fn clone(&self) -> PublicKey

    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
    §

    impl Debug for PublicKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Deref for PublicKey

    §

    type Target = [u8; 32]

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<PublicKey as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for PublicKey

    §

    fn deserialize<D>( deserializer: D, -) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<PublicKey> for NodeAddr

    Source§

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    +) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where + D: Deserializer<'de>,
    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for PublicKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<PublicKey> for NodeAddr

    §

    fn from(node_id: PublicKey) -> NodeAddr

    Converts to this type from the input type.
    §

    impl From<VerifyingKey> for PublicKey

    §

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    §

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    Display is capable of serialising this format.

    -
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for PublicKey

    Source§

    fn hash<H>(&self, state: &mut H)
    where +
    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

    fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more

    §

    impl Hash for PublicKey

    §

    fn hash<H>(&self, state: &mut H)
    where H: Hasher,

    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 NodeIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.
    Source§

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from [z-base-32] encoding.
    Source§

    impl Ord for PublicKey

    Source§

    fn cmp(&self, other: &PublicKey) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> 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 PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>( + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl NodeIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a NodeId in z-base-32 encoding.
    Source§

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from z-base-32 encoding.
    §

    impl Ord for PublicKey

    §

    fn cmp(&self, other: &PublicKey) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for PublicKey

    §

    fn eq(&self, other: &PublicKey) -> 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.
    §

    impl PartialOrd for PublicKey

    §

    fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    §

    impl Serialize for PublicKey

    §

    fn serialize<S>( &self, serializer: S, -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from( +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where + S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from( bytes: &[u8], -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from( +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    §

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from( bytes: &[u8; 32], -) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    Source§

    impl Copy for PublicKey

    Source§

    impl Eq for PublicKey

    Source§

    impl StructuralPartialEq for PublicKey

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    §

    impl Copy for PublicKey

    §

    impl Eq for PublicKey

    §

    impl StructuralPartialEq for PublicKey

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -45,33 +45,44 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<P, T> Receiver for P
    where + P: Deref<Target = T> + ?Sized, + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    Source§

    impl<T> RuleType for T
    where +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    Source§

    impl<T> RuleType for T
    where T: Copy + Debug + Eq + Hash + Ord,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.RelayMap.html b/pr/3367/docs/iroh/struct.RelayMap.html index db4c46df47..b14763ba64 100644 --- a/pr/3367/docs/iroh/struct.RelayMap.html +++ b/pr/3367/docs/iroh/struct.RelayMap.html @@ -1,4 +1,4 @@ -RelayMap in iroh - Rust

    Struct RelayMap

    Source
    pub struct RelayMap { /* private fields */ }
    Expand description

    Configuration of all the relay servers that can be used.

    +RelayMap in iroh - Rust

    RelayMap

    Struct RelayMap 

    Source
    pub struct RelayMap { /* private fields */ }
    Expand description

    Configuration of all the relay servers that can be used.

    Implementations§

    Source§

    impl RelayMap

    Source

    pub fn urls(&self) -> impl Iterator<Item = &RelayUrl>

    Returns the sorted relay URLs.

    Source

    pub fn empty() -> RelayMap

    Create an empty relay map.

    Source

    pub fn nodes(&self) -> impl Iterator<Item = &Arc<RelayNode>>

    Returns an Iterator over all known nodes.

    @@ -6,7 +6,7 @@
    Source

    pub fn get_node(&self, url: &RelayUrl) -> Option<&Arc<RelayNode>>

    Get the given node.

    Source

    pub fn len(&self) -> usize

    How many nodes are known?

    Source

    pub fn is_empty(&self) -> bool

    Are there any nodes in this map?

    -

    Trait Implementations§

    Source§

    impl Clone for RelayMap

    Source§

    fn clone(&self) -> RelayMap

    Returns a copy 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 RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> RelayMap

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> RelayMap

    Creates a RelayMap from a RelayUrl.

    +

    Trait Implementations§

    Source§

    impl Clone for RelayMap

    Source§

    fn clone(&self) -> RelayMap

    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 RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RelayMap

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> RelayMap

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> RelayMap

    Creates a RelayMap from a RelayUrl.

    The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T>(iter: T) -> RelayMap
    where @@ -14,7 +14,7 @@ discovery ports.

    T: IntoIterator<Item = RelayUrl>,

    Creates a RelayMap from an iterator of RelayUrl.

    The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

    -
    Source§

    impl PartialEq for RelayMap

    Source§

    fn eq(&self, other: &RelayMap) -> 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, +
    Source§

    impl PartialEq for RelayMap

    Source§

    fn eq(&self, other: &RelayMap) -> 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 Eq for RelayMap

    Source§

    impl StructuralPartialEq for RelayMap

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -23,29 +23,38 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.RelayNode.html b/pr/3367/docs/iroh/struct.RelayNode.html index 94ec70c889..181f1e7f2f 100644 --- a/pr/3367/docs/iroh/struct.RelayNode.html +++ b/pr/3367/docs/iroh/struct.RelayNode.html @@ -1,4 +1,4 @@ -RelayNode in iroh - Rust

    Struct RelayNode

    Source
    pub struct RelayNode {
    +RelayNode in iroh - Rust

    RelayNode

    Struct RelayNode 

    Source
    pub struct RelayNode {
         pub url: RelayUrl,
         pub quic: Option<RelayQuicConfig>,
     }
    Expand description

    Information on a specific relay server.

    @@ -7,22 +7,22 @@
    §quic: Option<RelayQuicConfig>

    Configuration to speak to the QUIC endpoint on the relay server.

    When None, we will not attempt to do QUIC address discovery with this relay server.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayNode

    Source§

    fn clone(&self) -> RelayNode

    Returns a copy 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 RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayNode

    Trait Implementations§

    Source§

    impl Clone for RelayNode

    Source§

    fn clone(&self) -> RelayNode

    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 RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayNode

    Source§

    fn deserialize<__D>( __deserializer: __D, -) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> RelayMap

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> RelayNode

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T>(iter: T) -> RelayMap
    where - T: IntoIterator<Item = RelayNode>,

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayNode

    Source§

    fn cmp(&self, other: &RelayNode) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayNode

    Source§

    fn eq(&self, other: &RelayNode) -> 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 PartialOrd for RelayNode

    Source§

    fn partial_cmp(&self, other: &RelayNode) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for RelayNode

    Source§

    fn serialize<__S>( +) -> Result<RelayNode, <__D as Deserializer<'de>>::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> RelayMap

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> RelayNode

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T>(iter: T) -> RelayMap
    where + T: IntoIterator<Item = RelayNode>,

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayNode

    Source§

    fn cmp(&self, other: &RelayNode) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayNode

    Source§

    fn eq(&self, other: &RelayNode) -> 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 PartialOrd for RelayNode

    Source§

    fn partial_cmp(&self, other: &RelayNode) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Serialize for RelayNode

    Source§

    fn serialize<__S>( &self, __serializer: __S, -) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayNode

    Source§

    impl StructuralPartialEq for RelayNode

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayNode

    Source§

    impl StructuralPartialEq for RelayNode

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -30,32 +30,41 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.RelayUrl.html b/pr/3367/docs/iroh/struct.RelayUrl.html index dbd4381372..eed171c528 100644 --- a/pr/3367/docs/iroh/struct.RelayUrl.html +++ b/pr/3367/docs/iroh/struct.RelayUrl.html @@ -1,6 +1,6 @@ -RelayUrl in iroh - Rust

    Struct RelayUrl

    Source
    pub struct RelayUrl(/* private fields */);
    Expand description

    A URL identifying a relay server.

    +RelayUrl in iroh - Rust

    RelayUrl

    Struct RelayUrl 

    pub struct RelayUrl(/* private fields */);
    Expand description

    A URL identifying a relay server.

    It is cheaply clonable, as the underlying type is wrapped into an Arc. -The main type under the hood though is Url, with a few custom tweaks:

    +The main type under the hood though is Url, with a few custom tweaks:

    • A relay URL is never a relative URL, so an implicit . is added at the end of the @@ -12,7 +12,7 @@ Useful when logging e.g. Option<RelayUrl>.

    To create a RelayUrl use the From<Url> implementation.

    -

    Methods from Deref<Target = Url>§

    Source

    pub fn join(&self, input: &str) -> Result<Url, ParseError>

    Parse a string as an URL, with this URL as the base URL.

    +

    Methods from Deref<Target = Url>§

    Source

    pub fn join(&self, input: &str) -> Result<Url, ParseError>

    Parse a string as an URL, with this URL as the base URL.

    The inverse of this is make_relative.

    §Notes
      @@ -41,14 +41,19 @@ as input replaces everything in the base URL after the scheme. let url = base.join("//eve.com/b")?; assert_eq!(url.as_str(), "https://eve.com/b"); +// Input as base url relative special URL +let base = Url::parse("https://alice.com/a")?; +let url = base.join("/v1/meta")?; +assert_eq!(url.as_str(), "https://alice.com/v1/meta"); + // Input as absolute URL let base = Url::parse("https://alice.com/a")?; let url = base.join("http://eve.com/b")?; -assert_eq!(url.as_str(), "http://eve.com/b"); // http instead of https
    -
    §Errors
    +assert_eq!(url.as_str(), "http://eve.com/b"); // http instead of https +
    §Errors

    If the function can not parse an URL from the given string with this URL as the base URL, a ParseError variant will be returned.

    -
    Source

    pub fn make_relative(&self, url: &Url) -> Option<String>

    Creates a relative URL if possible, with this URL as the base URL.

    +
    Source

    pub fn make_relative(&self, url: &Url) -> Option<String>

    Creates a relative URL if possible, with this URL as the base URL.

    This is the inverse of join.

    §Examples
    -
    §Errors
    +assert_eq!(relative.as_ref().map(|s| s.as_str()), Some("?e=f"));
    §Errors

    If this URL can’t be a base for the given URL, None is returned. This is for example the case if the scheme, host or port are not the same.

    -
    Source

    pub fn as_str(&self) -> &str

    Return the serialization of this URL.

    +
    Source

    pub fn as_str(&self) -> &str

    Return the serialization of this URL.

    This is fast since that serialization is already stored in the Url struct.

    §Examples
    use url::Url;
     
     let url_str = "https://example.net/";
     let url = Url::parse(url_str)?;
    -assert_eq!(url.as_str(), url_str);
    -
    Source

    pub fn origin(&self) -> Origin

    Return the origin of this URL (https://url.spec.whatwg.org/#origin)

    +assert_eq!(url.as_str(), url_str);
    Source

    pub fn origin(&self) -> Origin

    Return the origin of this URL (https://url.spec.whatwg.org/#origin)

    Note: this returns an opaque origin for file: URLs, which causes url.origin() != url.origin().

    §Examples
    @@ -119,21 +122,18 @@ This is for example the case if the scheme, host or port are not the same.

    use url::{Host, Origin, Url};
     
     let url = Url::parse("foo:bar")?;
    -assert!(!url.origin().is_tuple());
    -
    Source

    pub fn scheme(&self) -> &str

    Return the scheme of this URL, lower-cased, as an ASCII string without the ‘:’ delimiter.

    +assert!(!url.origin().is_tuple());
    Source

    pub fn scheme(&self) -> &str

    Return the scheme of this URL, lower-cased, as an ASCII string without the ‘:’ delimiter.

    §Examples
    use url::Url;
     
     let url = Url::parse("file:///tmp/foo")?;
    -assert_eq!(url.scheme(), "file");
    -
    Source

    pub fn is_special(&self) -> bool

    Return whether the URL is special (has a special scheme)

    +assert_eq!(url.scheme(), "file");
    Source

    pub fn is_special(&self) -> bool

    Return whether the URL is special (has a special scheme)

    §Examples
    use url::Url;
     
     assert!(Url::parse("http:///tmp/foo")?.is_special());
     assert!(Url::parse("file:///tmp/foo")?.is_special());
    -assert!(!Url::parse("moz:///tmp/foo")?.is_special());
    -
    Source

    pub fn has_authority(&self) -> bool

    Return whether the URL has an ‘authority’, +assert!(!Url::parse("moz:///tmp/foo")?.is_special());

    Source

    pub fn has_authority(&self) -> bool

    Return whether the URL has an ‘authority’, which can contain a username, password, host, and port number.

    URLs that do not are either path-only like unix:/run/foo.socket or cannot-be-a-base like data:text/plain,Stuff.

    @@ -148,8 +148,7 @@ or cannot-be-a-base like data:text/plain,Stuff.

    assert!(!url.has_authority()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(!url.has_authority());
    -
    Source

    pub fn authority(&self) -> &str

    Return the authority of this URL as an ASCII string.

    +assert!(!url.has_authority());
    Source

    pub fn authority(&self) -> &str

    Return the authority of this URL as an ASCII string.

    Non-ASCII domains are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs. IPv6 addresses are given between [ and ] brackets. @@ -168,8 +167,7 @@ Ports are omitted if they match the well known port of a special URL.

    let url = Url::parse("irc://àlex.рф.example.com:6667/foo")?; assert_eq!(url.authority(), "%C3%A0lex.%D1%80%D1%84.example.com:6667"); let url = Url::parse("http://àlex.рф.example.com:80/foo")?; -assert_eq!(url.authority(), "xn--lex-8ka.xn--p1ai.example.com");
    -
    Source

    pub fn cannot_be_a_base(&self) -> bool

    Return whether this URL is a cannot-be-a-base URL, +assert_eq!(url.authority(), "xn--lex-8ka.xn--p1ai.example.com");

    Source

    pub fn cannot_be_a_base(&self) -> bool

    Return whether this URL is a cannot-be-a-base URL, meaning that parsing a relative URL string with this URL as the base will return an error.

    This is the case if the scheme and : delimiter are not followed by a / slash, as is typically the case of data: and mailto: URLs.

    @@ -183,8 +181,7 @@ as is typically the case of data: and mailto: URLs.

    assert!(!url.cannot_be_a_base()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(url.cannot_be_a_base());
    -
    Source

    pub fn username(&self) -> &str

    Return the username for this URL (typically the empty string) +assert!(url.cannot_be_a_base());

    Source

    pub fn username(&self) -> &str

    Return the username for this URL (typically the empty string) as a percent-encoded ASCII string.

    §Examples
    use url::Url;
    @@ -196,8 +193,7 @@ as a percent-encoded ASCII string.

    assert_eq!(url.username(), ""); let url = Url::parse("https://example.com")?; -assert_eq!(url.username(), "");
    -
    Source

    pub fn password(&self) -> Option<&str>

    Return the password for this URL, if any, as a percent-encoded ASCII string.

    +assert_eq!(url.username(), "");
    Source

    pub fn password(&self) -> Option<&str>

    Return the password for this URL, if any, as a percent-encoded ASCII string.

    §Examples
    use url::Url;
     
    @@ -211,8 +207,7 @@ as a percent-encoded ASCII string.

    assert_eq!(url.password(), None); let url = Url::parse("https://example.com")?; -assert_eq!(url.password(), None);
    -
    Source

    pub fn has_host(&self) -> bool

    Equivalent to url.host().is_some().

    +assert_eq!(url.password(), None);
    Source

    pub fn has_host(&self) -> bool

    Equivalent to url.host().is_some().

    §Examples
    use url::Url;
     
    @@ -223,8 +218,7 @@ as a percent-encoded ASCII string.

    assert!(!url.has_host()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(!url.has_host());
    -
    Source

    pub fn host_str(&self) -> Option<&str>

    Return the string representation of the host (domain or IP address) for this URL, if any.

    +assert!(!url.has_host());
    Source

    pub fn host_str(&self) -> Option<&str>

    Return the string representation of the host (domain or IP address) for this URL, if any.

    Non-ASCII domains are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs. IPv6 addresses are given between [ and ] brackets.

    @@ -237,6 +231,9 @@ don’t have a host.

    let url = Url::parse("https://127.0.0.1/index.html")?; assert_eq!(url.host_str(), Some("127.0.0.1")); +let url = Url::parse("https://subdomain.example.com")?; +assert_eq!(url.host_str(), Some("subdomain.example.com")); + let url = Url::parse("ftp://rms@example.com")?; assert_eq!(url.host_str(), Some("example.com")); @@ -244,8 +241,7 @@ don’t have a host.

    assert_eq!(url.host_str(), None); let url = Url::parse("data:text/plain,Stuff")?; -assert_eq!(url.host_str(), None);
    -
    Source

    pub fn host(&self) -> Option<Host<&str>>

    Return the parsed representation of the host for this URL. +assert_eq!(url.host_str(), None);

    Source

    pub fn host(&self) -> Option<Host<&str>>

    Return the parsed representation of the host for this URL. Non-ASCII domain labels are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs.

    Cannot-be-a-base URLs (typical of data: and mailto:) and some file: URLs @@ -264,8 +260,7 @@ don’t have a host.

    assert!(url.host().is_none()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(url.host().is_none());
    -
    Source

    pub fn domain(&self) -> Option<&str>

    If this URL has a host and it is a domain name (not an IP address), return it. +assert!(url.host().is_none());

    Source

    pub fn domain(&self) -> Option<&str>

    If this URL has a host and it is a domain name (not an IP address), return it. Non-ASCII domains are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs.

    §Examples
    @@ -278,8 +273,11 @@ of a special URL, or percent encoded for non-special URLs.

    assert_eq!(url.domain(), None); let url = Url::parse("https://example.com/")?; -assert_eq!(url.domain(), Some("example.com"));
    -
    Source

    pub fn port(&self) -> Option<u16>

    Return the port number for this URL, if any.

    +assert_eq!(url.domain(), Some("example.com")); + +let url = Url::parse("https://subdomain.example.com/")?; +assert_eq!(url.domain(), Some("subdomain.example.com")); +
    Source

    pub fn port(&self) -> Option<u16>

    Return the port number for this URL, if any.

    Note that default port numbers are never reflected by the serialization, use the port_or_known_default() method if you want a default port number returned.

    §Examples
    @@ -292,8 +290,7 @@ use the port_or_known_default() method if you want a default port n assert_eq!(url.port(), None); let url = Url::parse("ssh://example.com:22")?; -assert_eq!(url.port(), Some(22));
    -
    Source

    pub fn port_or_known_default(&self) -> Option<u16>

    Return the port number for this URL, or the default port number if it is known.

    +assert_eq!(url.port(), Some(22));
    Source

    pub fn port_or_known_default(&self) -> Option<u16>

    Return the port number for this URL, or the default port number if it is known.

    This method only knows the default port number of the http, https, ws, wss and ftp schemes.

    For URLs in these schemes, this method always returns Some(_). @@ -308,11 +305,10 @@ For other schemes, it is the same as Url::port().

    assert_eq!(url.port_or_known_default(), Some(1456)); let url = Url::parse("https://example.com")?; -assert_eq!(url.port_or_known_default(), Some(443));
    -
    Source

    pub fn socket_addrs( +assert_eq!(url.port_or_known_default(), Some(443));

    Source

    pub fn socket_addrs( &self, default_port_number: impl Fn() -> Option<u16>, -) -> Result<Vec<SocketAddr>, Error>

    Available on crate feature std and (Unix or Windows or Redox or WASI or HermitCore) only.

    Resolve a URL’s host and port number to SocketAddr.

    +) -> Result<Vec<SocketAddr>, Error>

    Resolve a URL’s host and port number to SocketAddr.

    If the URL has the default port number of a scheme that is unknown to this library, default_port_number provides an opportunity to provide the actual port number. In non-example code this should be implemented either simply as || None, @@ -322,15 +318,13 @@ or by matching on the URL’s .scheme().

    let url = url::Url::parse("https://example.net/").unwrap();
     let addrs = url.socket_addrs(|| None).unwrap();
     std::net::TcpStream::connect(&*addrs)
    -
    /// With application-specific known default port numbers
     fn socket_addrs(url: url::Url) -> std::io::Result<Vec<std::net::SocketAddr>> {
         url.socket_addrs(|| match url.scheme() {
             "socks5" | "socks5h" => Some(1080),
             _ => None,
         })
    -}
    -
    Source

    pub fn path(&self) -> &str

    Return the path for this URL, as a percent-encoded ASCII string. +}

    Source

    pub fn path(&self) -> &str

    Return the path for this URL, as a percent-encoded ASCII string. For cannot-be-a-base URLs, this is an arbitrary string that doesn’t start with ‘/’. For other URLs, this starts with a ‘/’ slash and continues with slash-separated path segments.

    @@ -344,8 +338,7 @@ and continues with slash-separated path segments.

    assert_eq!(url.path(), "/"); let url = Url::parse("https://example.com/countries/việt nam")?; -assert_eq!(url.path(), "/countries/vi%E1%BB%87t%20nam");
    -
    Source

    pub fn path_segments(&self) -> Option<Split<'_, char>>

    Unless this URL is cannot-be-a-base, +assert_eq!(url.path(), "/countries/vi%E1%BB%87t%20nam");

    Source

    pub fn path_segments(&self) -> Option<Split<'_, char>>

    Unless this URL is cannot-be-a-base, return an iterator of ‘/’ slash-separated path segments, each as a percent-encoded ASCII string.

    Return None for cannot-be-a-base URLs.

    @@ -372,8 +365,7 @@ each as a percent-encoded ASCII string.

    let url = Url::parse("https://example.com/countries/việt nam")?; let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?; assert_eq!(path_segments.next(), Some("countries")); -assert_eq!(path_segments.next(), Some("vi%E1%BB%87t%20nam"));
    -
    Source

    pub fn query(&self) -> Option<&str>

    Return this URL’s query string, if any, as a percent-encoded ASCII string.

    +assert_eq!(path_segments.next(), Some("vi%E1%BB%87t%20nam"));
    Source

    pub fn query(&self) -> Option<&str>

    Return this URL’s query string, if any, as a percent-encoded ASCII string.

    §Examples
    use url::Url;
     
    @@ -388,8 +380,7 @@ each as a percent-encoded ASCII string.

    let url = Url::parse("https://example.com/?country=español")?; let query = url.query(); -assert_eq!(query, Some("country=espa%C3%B1ol"));
    -
    Source

    pub fn query_pairs(&self) -> Parse<'_>

    Parse the URL’s query string, if any, as application/x-www-form-urlencoded +assert_eq!(query, Some("country=espa%C3%B1ol"));

    Source

    pub fn query_pairs(&self) -> Parse<'_>

    Parse the URL’s query string, if any, as application/x-www-form-urlencoded and return an iterator of (key, value) pairs.

    §Examples
    use std::borrow::Cow;
    @@ -402,8 +393,7 @@ and return an iterator of (key, value) pairs.

    assert_eq!(pairs.count(), 2); assert_eq!(pairs.next(), Some((Cow::Borrowed("page"), Cow::Borrowed("2")))); -assert_eq!(pairs.next(), Some((Cow::Borrowed("sort"), Cow::Borrowed("desc"))));
    -
    Source

    pub fn fragment(&self) -> Option<&str>

    Return this URL’s fragment identifier, if any.

    +assert_eq!(pairs.next(), Some((Cow::Borrowed("sort"), Cow::Borrowed("desc"))));
    Source

    pub fn fragment(&self) -> Option<&str>

    Return this URL’s fragment identifier, if any.

    A fragment is the part of the URL after the # symbol. The fragment is optional and, if present, contains a fragment identifier that identifies a secondary resource, such as a section heading @@ -422,16 +412,15 @@ but the input may have been percent-encoded already.

    let url = Url::parse("https://example.com/data.csv#cell=4,1-6,2")?; -assert_eq!(url.fragment(), Some("cell=4,1-6,2"));
    -
    Source

    pub fn serialize_internal<S>( +assert_eq!(url.fragment(), Some("cell=4,1-6,2"));

    Source

    pub fn serialize_internal<S>( &self, serializer: S, -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where - S: Serializer,

    Available on crate feature serde only.

    Serialize with Serde using the internal representation of the Url struct.

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where + S: Serializer,

    Serialize with Serde using the internal representation of the Url struct.

    The corresponding deserialize_internal method sacrifices some invariant-checking for speed, compared to the Deserialize trait impl.

    This method is only available if the serde Cargo feature is enabled.

    -
    Source

    pub fn to_file_path(&self) -> Result<PathBuf, ()>

    Available on crate feature std and (Unix or Windows or Redox or WASI or HermitCore) only.

    Assuming the URL is in the file scheme or similar, +

    Source

    pub fn to_file_path(&self) -> Result<PathBuf, ()>

    Assuming the URL is in the file scheme or similar, convert its path to an absolute std::path::Path.

    Note: This does not actually check the URL’s scheme, and may give nonsensical results for other schemes. @@ -444,37 +433,37 @@ or if Path::new_opt() returns None. (That is, if the percent-decoded path contains a NUL byte or, for a Windows path, is not UTF-8.)

    This method is only available if the std Cargo feature is enabled.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayUrl

    Source§

    fn clone(&self) -> RelayUrl

    Returns a copy 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 RelayUrl

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for RelayUrl

    Dereferences to the wrapped Url.

    +

    Trait Implementations§

    §

    impl Clone for RelayUrl

    §

    fn clone(&self) -> RelayUrl

    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
    §

    impl Debug for RelayUrl

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Deref for RelayUrl

    Dereferences to the wrapped Url.

    Note that DerefMut is not implemented on purpose, so this type has more flexibility to change the inner later.

    -
    Source§

    type Target = Url

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &<RelayUrl as Deref>::Target

    Dereferences the value.
    Source§

    impl<'de> Deserialize<'de> for RelayUrl

    §

    type Target = Url

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<RelayUrl as Deref>::Target

    Dereferences the value.
    §

    impl<'de> Deserialize<'de> for RelayUrl

    §

    fn deserialize<__D>( __deserializer: __D, -) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayUrl

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> RelayMap

    Creates a RelayMap from a RelayUrl.

    +) -> Result<RelayUrl, <__D as Deserializer<'de>>::Error>
    where + __D: Deserializer<'de>,
    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for RelayUrl

    §

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayUrl> for RelayMap

    Source§

    fn from(value: RelayUrl) -> RelayMap

    Creates a RelayMap from a RelayUrl.

    The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

    -
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> RelayNode

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for Url

    Source§

    fn from(value: RelayUrl) -> Url

    Converts to this type from the input type.
    Source§

    impl From<Url> for RelayUrl

    Source§

    fn from(url: Url) -> RelayUrl

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayUrl> for RelayMap

    Source§

    fn from_iter<T>(iter: T) -> RelayMap
    where +

    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> RelayNode

    Converts to this type from the input type.
    §

    impl From<RelayUrl> for Url

    §

    fn from(value: RelayUrl) -> Url

    Converts to this type from the input type.
    §

    impl From<Url> for RelayUrl

    §

    fn from(url: Url) -> RelayUrl

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayUrl> for RelayMap

    Source§

    fn from_iter<T>(iter: T) -> RelayMap
    where T: IntoIterator<Item = RelayUrl>,

    Creates a RelayMap from an iterator of RelayUrl.

    The RelayNodes in the RelayMap will have the default QUIC address discovery ports.

    -
    Source§

    impl FromStr for RelayUrl

    Support for parsing strings directly.

    -

    If you need more control over the error first create a Url and use RelayUrl::from +

    §

    impl FromStr for RelayUrl

    Support for parsing strings directly.

    +

    If you need more control over the error first create a Url and use RelayUrl::from instead.

    -
    Source§

    type Err = RelayUrlParseError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for RelayUrl

    Source§

    fn hash<__H>(&self, state: &mut __H)
    where +
    §

    type Err = RelayUrlParseError

    The associated error which can be returned from parsing.
    §

    fn from_str(s: &str) -> Result<RelayUrl, <RelayUrl as FromStr>::Err>

    Parses a string s to return a value of this type. Read more

    §

    impl Hash for RelayUrl

    §

    fn hash<__H>(&self, state: &mut __H)
    where __H: Hasher,

    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 Ord for RelayUrl

    Source§

    fn cmp(&self, other: &RelayUrl) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayUrl

    Source§

    fn eq(&self, other: &RelayUrl) -> 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 PartialOrd for RelayUrl

    Source§

    fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for RelayUrl

    Source§

    fn serialize<__S>( + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    §

    impl Ord for RelayUrl

    §

    fn cmp(&self, other: &RelayUrl) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    §

    impl PartialEq for RelayUrl

    §

    fn eq(&self, other: &RelayUrl) -> 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.
    §

    impl PartialOrd for RelayUrl

    §

    fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    §

    impl Serialize for RelayUrl

    §

    fn serialize<__S>( &self, __serializer: __S, -) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayUrl

    Source§

    impl StructuralPartialEq for RelayUrl

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl Eq for RelayUrl

    §

    impl StructuralPartialEq for RelayUrl

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -482,34 +471,43 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<P, T> Receiver for P
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<P, T> Receiver for P
    where P: Deref<Target = T> + ?Sized, - T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.RelayUrlParseError.html b/pr/3367/docs/iroh/struct.RelayUrlParseError.html index df23aee86f..ff4a730c84 100644 --- a/pr/3367/docs/iroh/struct.RelayUrlParseError.html +++ b/pr/3367/docs/iroh/struct.RelayUrlParseError.html @@ -1,9 +1,9 @@ -RelayUrlParseError in iroh - Rust

    Struct RelayUrlParseError

    Source
    pub struct RelayUrlParseError { /* private fields */ }
    Expand description

    Can occur when parsing a string into a RelayUrl.

    -

    Trait Implementations§

    Source§

    impl Debug for RelayUrlParseError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RelayUrlParseError

    Source§

    fn fmt( +RelayUrlParseError in iroh - Rust

    RelayUrlParseError

    Struct RelayUrlParseError 

    pub struct RelayUrlParseError { /* private fields */ }
    Expand description

    Can occur when parsing a string into a RelayUrl.

    +

    Trait Implementations§

    §

    impl Debug for RelayUrlParseError

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Display for RelayUrlParseError

    §

    fn fmt( &self, __snafu_display_formatter: &mut Formatter<'_>, -) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Error for RelayUrlParseError

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RelayUrlParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Error for RelayUrlParseError

    §

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    §

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    §

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    §

    impl ErrorCompat for RelayUrlParseError

    §

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where @@ -17,22 +17,31 @@ receivers.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/struct.SecretKey.html b/pr/3367/docs/iroh/struct.SecretKey.html index 644907b148..70c0d8ce01 100644 --- a/pr/3367/docs/iroh/struct.SecretKey.html +++ b/pr/3367/docs/iroh/struct.SecretKey.html @@ -1,24 +1,22 @@ -SecretKey in iroh - Rust

    Struct SecretKey

    Source
    pub struct SecretKey { /* private fields */ }
    Expand description

    A secret key.

    -

    Implementations§

    Source§

    impl SecretKey

    Source

    pub fn public(&self) -> PublicKey

    The public key of this SecretKey.

    -
    Source

    pub fn generate<R>(csprng: R) -> SecretKey
    where - R: CryptoRngCore,

    Generate a new SecretKey with a randomness generator.

    +SecretKey in iroh - Rust

    SecretKey

    Struct SecretKey 

    pub struct SecretKey { /* private fields */ }
    Expand description

    A secret key.

    +

    Implementations§

    §

    impl SecretKey

    pub fn public(&self) -> PublicKey

    The public key of this SecretKey.

    +

    pub fn generate<R>(csprng: &mut R) -> SecretKey
    where + R: CryptoRng + ?Sized,

    Generate a new SecretKey with a randomness generator.

    // use the OsRng option for OS depedndent most secure RNG.
    -let mut rng = rand::rngs::OsRng;
    -let _key = iroh_base::SecretKey::generate(&mut rng);
    -
    Source

    pub fn sign(&self, msg: &[u8]) -> Signature

    Sign the given message and return a digital signature

    -
    Source

    pub fn to_bytes(&self) -> [u8; 32]

    Convert this to the bytes representing the secret part. +let _key = iroh_base::SecretKey::generate(&mut rand::rng());

    pub fn sign(&self, msg: &[u8]) -> Signature

    Sign the given message and return a digital signature

    +

    pub fn to_bytes(&self) -> [u8; 32]

    Convert this to the bytes representing the secret part. The public part can always be recovered.

    -
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

    Create a secret key from its byte representation.

    -
    Source

    pub fn secret(&self) -> &SigningKey

    Returns the [SigningKey] for this SecretKey.

    -

    Trait Implementations§

    Source§

    impl Clone for SecretKey

    Source§

    fn clone(&self) -> SecretKey

    Returns a copy 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 SecretKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for SecretKey

    pub fn from_bytes(bytes: &[u8; 32]) -> SecretKey

    Create a secret key from its byte representation.

    +

    pub fn secret(&self) -> &SigningKey

    Returns the [SigningKey] for this SecretKey.

    +

    Trait Implementations§

    §

    impl Clone for SecretKey

    §

    fn clone(&self) -> SecretKey

    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
    §

    impl Debug for SecretKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for SecretKey

    §

    fn deserialize<D>( deserializer: D, -) -> Result<SecretKey, <D as Deserializer<'de>>::Error>
    where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<[u8; 32]> for SecretKey

    Source§

    fn from(value: [u8; 32]) -> SecretKey

    Converts to this type from the input type.
    Source§

    impl From<SigningKey> for SecretKey

    Source§

    fn from(secret: SigningKey) -> SecretKey

    Converts to this type from the input type.
    Source§

    impl FromStr for SecretKey

    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Serialize for SecretKey

    Source§

    fn serialize<S>( +) -> Result<SecretKey, <D as Deserializer<'de>>::Error>
    where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl From<[u8; 32]> for SecretKey

    §

    fn from(value: [u8; 32]) -> SecretKey

    Converts to this type from the input type.
    §

    impl From<SigningKey> for SecretKey

    §

    fn from(secret: SigningKey) -> SecretKey

    Converts to this type from the input type.
    §

    impl FromStr for SecretKey

    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

    fn from_str(s: &str) -> Result<SecretKey, <SecretKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    §

    impl Serialize for SecretKey

    §

    fn serialize<S>( &self, serializer: S, -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl TryFrom<&[u8]> for SecretKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from( +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where + S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl TryFrom<&[u8]> for SecretKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from( bytes: &[u8], ) -> Result<SecretKey, <SecretKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where @@ -28,25 +26,32 @@ The public part can always be recovered.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/test_utils/fn.run_relay_server.html b/pr/3367/docs/iroh/test_utils/fn.run_relay_server.html index 3efc84a0d9..e746dbc3c3 100644 --- a/pr/3367/docs/iroh/test_utils/fn.run_relay_server.html +++ b/pr/3367/docs/iroh/test_utils/fn.run_relay_server.html @@ -1,4 +1,4 @@ -run_relay_server in iroh::test_utils - Rust

    Function run_relay_server

    Source
    pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server), SpawnError>
    Available on crate feature test-utils only.
    Expand description

    Runs a relay server with QUIC enabled suitable for tests.

    +run_relay_server in iroh::test_utils - Rust

    run_relay_server

    Function run_relay_server 

    Source
    pub async fn run_relay_server() -> Result<(RelayMap, RelayUrl, Server), SpawnError>
    Available on crate features test-utils only.
    Expand description

    Runs a relay server with QUIC enabled suitable for tests.

    The returned Url is the url of the relay server in the returned RelayMap. When dropped, the returned Server does will stop running.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/test_utils/fn.run_relay_server_with.html b/pr/3367/docs/iroh/test_utils/fn.run_relay_server_with.html index 01d3d23b4b..66558b90f8 100644 --- a/pr/3367/docs/iroh/test_utils/fn.run_relay_server_with.html +++ b/pr/3367/docs/iroh/test_utils/fn.run_relay_server_with.html @@ -1,6 +1,6 @@ -run_relay_server_with in iroh::test_utils - Rust

    Function run_relay_server_with

    Source
    pub async fn run_relay_server_with(
    +run_relay_server_with in iroh::test_utils - Rust

    run_relay_server_with

    Function run_relay_server_with 

    Source
    pub async fn run_relay_server_with(
         quic: bool,
    -) -> Result<(RelayMap, RelayUrl, Server), SpawnError>
    Available on crate feature test-utils only.
    Expand description

    Runs a relay server.

    +) -> Result<(RelayMap, RelayUrl, Server), SpawnError>
    Available on crate features test-utils only.
    Expand description

    Runs a relay server.

    If quic is set to true, it will make the appropriate QuicConfig from the generated tls certificates and run the quic server at a random free port.

    The return value is similar to run_relay_server.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/test_utils/index.html b/pr/3367/docs/iroh/test_utils/index.html index b44efc30a7..2913dcd091 100644 --- a/pr/3367/docs/iroh/test_utils/index.html +++ b/pr/3367/docs/iroh/test_utils/index.html @@ -1,2 +1,2 @@ -iroh::test_utils - Rust

    Module test_utils

    Source
    Available on crate feature test-utils only.
    Expand description

    Internal utilities to support testing.

    +iroh::test_utils - Rust

    Module test_utils

    Module test_utils 

    Source
    Available on crate features test-utils only.
    Expand description

    Internal utilities to support testing.

    Structs§

    CleanupDropGuard
    A drop guard to clean up test infrastructure.
    DnsPkarrServer
    Handle and drop guard for test DNS and Pkarr servers.

    Functions§

    run_relay_server
    Runs a relay server with QUIC enabled suitable for tests.
    run_relay_server_with
    Runs a relay server.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh/test_utils/struct.CleanupDropGuard.html b/pr/3367/docs/iroh/test_utils/struct.CleanupDropGuard.html index 2a0c53b164..5ba5b9910a 100644 --- a/pr/3367/docs/iroh/test_utils/struct.CleanupDropGuard.html +++ b/pr/3367/docs/iroh/test_utils/struct.CleanupDropGuard.html @@ -1,4 +1,4 @@ -CleanupDropGuard in iroh::test_utils - Rust

    Struct CleanupDropGuard

    Source
    pub struct CleanupDropGuard(/* private fields */);
    Available on crate feature test-utils only.
    Expand description

    A drop guard to clean up test infrastructure.

    +CleanupDropGuard in iroh::test_utils - Rust

    CleanupDropGuard

    Struct CleanupDropGuard 

    Source
    pub struct CleanupDropGuard(/* private fields */);
    Available on crate features test-utils only.
    Expand description

    A drop guard to clean up test infrastructure.

    After dropping the test infrastructure will asynchronously shutdown and release its resources.

    Trait Implementations§

    Source§

    impl Debug for CleanupDropGuard

    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 @@ -9,20 +9,27 @@ resources.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/test_utils/struct.DnsPkarrServer.html b/pr/3367/docs/iroh/test_utils/struct.DnsPkarrServer.html index 819c2ff3b8..9d1bbb2e3f 100644 --- a/pr/3367/docs/iroh/test_utils/struct.DnsPkarrServer.html +++ b/pr/3367/docs/iroh/test_utils/struct.DnsPkarrServer.html @@ -1,13 +1,13 @@ -DnsPkarrServer in iroh::test_utils - Rust

    Struct DnsPkarrServer

    Source
    pub struct DnsPkarrServer {
    +DnsPkarrServer in iroh::test_utils - Rust

    DnsPkarrServer

    Struct DnsPkarrServer 

    Source
    pub struct DnsPkarrServer {
         pub node_origin: String,
         pub nameserver: SocketAddr,
    -    pub pkarr_url: Url,
    +    pub pkarr_url: Url,
         /* private fields */
    -}
    Available on crate feature test-utils only.
    Expand description

    Handle and drop guard for test DNS and Pkarr servers.

    +}
    Available on crate features test-utils only.
    Expand description

    Handle and drop guard for test DNS and Pkarr servers.

    Once the struct is dropped the servers will shut down.

    Fields§

    §node_origin: String

    The node origin domain.

    §nameserver: SocketAddr

    The socket address of the DNS server.

    -
    §pkarr_url: Url

    The HTTP URL of the Pkarr server.

    +
    §pkarr_url: Url

    The HTTP URL of the Pkarr server.

    Implementations§

    Source§

    impl DnsPkarrServer

    Source

    pub async fn run() -> Result<Self>

    Run DNS and Pkarr servers on localhost.

    Source

    pub async fn run_with_origin(node_origin: String) -> Result<Self>

    Run DNS and Pkarr servers on localhost with the specified node_origin domain.

    Source

    pub fn discovery(&self, secret_key: SecretKey) -> ConcurrentDiscovery

    Create a ConcurrentDiscovery with DnsDiscovery and PkarrPublisher @@ -23,20 +23,27 @@ configured to use the test servers.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh/trait.Watcher.html b/pr/3367/docs/iroh/trait.Watcher.html index 11b85d8584..b02051af8f 100644 --- a/pr/3367/docs/iroh/trait.Watcher.html +++ b/pr/3367/docs/iroh/trait.Watcher.html @@ -1,8 +1,9 @@ -Watcher in iroh - Rust

    Trait Watcher

    pub trait Watcher: Clone {
    +Watcher in iroh - Rust

    Watcher

    Trait Watcher 

    pub trait Watcher: Clone {
         type Value: Clone + Eq;
     
         // Required methods
    -    fn get(&self) -> Result<Self::Value, Disconnected>;
    +    fn get(&mut self) -> Self::Value;
    +    fn is_connected(&self) -> bool;
         fn poll_updated(
             &mut self,
             cx: &mut Context<'_>,
    @@ -44,8 +45,13 @@ the values have a lifetime that’s detached from the original [Watchable<
     lifetime.

    We require Eq, to be able to check whether the value actually changed or not, so we can notify or not notify accordingly.

    -

    Required Methods§

    fn get(&self) -> Result<Self::Value, Disconnected>

    Returns the current state of the underlying value, or errors out with -[Disconnected], if one of the underlying [Watchable]s has been dropped.

    +

    Required Methods§

    fn get(&mut self) -> Self::Value

    Returns the current state of the underlying value.

    +

    If any of the underlying [Watchable] values has been dropped, then this +might return an outdated value for that watchable, specifically, the latest +value that was fetched for that watchable, as opposed to the latest value +that was set on the watchable before it was dropped.

    +

    fn is_connected(&self) -> bool

    Whether this watcher is still connected to all of its underlying [Watchable]s.

    +

    Returns false when any of the underlying watchables has been dropped.

    fn poll_updated( &mut self, cx: &mut Context<'_>, @@ -94,7 +100,7 @@ observably changes. For this, it needs to store a clone of T in the updates, and yields both watcher’s items together when that happens.

    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.

    Implementations on Foreign Types§

    §

    impl<S, T> Watcher for (S, T)
    where S: Watcher, - T: Watcher,

    §

    type Value = (<S as Watcher>::Value, <T as Watcher>::Value)

    §

    fn get(&self) -> Result<<(S, T) as Watcher>::Value, Disconnected>

    §

    fn poll_updated( + T: Watcher,

    §

    type Value = (<S as Watcher>::Value, <T as Watcher>::Value)

    §

    fn get(&mut self) -> <(S, T) as Watcher>::Value

    §

    fn is_connected(&self) -> bool

    §

    fn poll_updated( &mut self, cx: &mut Context<'_>, ) -> Poll<Result<<(S, T) as Watcher>::Value, Disconnected>>

    Implementors§

    §

    impl<T> Watcher for Direct<T>
    where diff --git a/pr/3367/docs/iroh/type.NodeId.html b/pr/3367/docs/iroh/type.NodeId.html index c13fe8b6cc..f33807987c 100644 --- a/pr/3367/docs/iroh/type.NodeId.html +++ b/pr/3367/docs/iroh/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh - Rust

    Type Alias NodeId

    Source
    pub type NodeId = PublicKey;
    Expand description

    The identifier for a node in the (iroh) network.

    +NodeId in iroh - Rust

    NodeId

    Type Alias NodeId 

    pub type NodeId = PublicKey;
    Expand description

    The identifier for a node in the (iroh) network.

    Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

    @@ -9,4 +9,4 @@ a node. E.g.:

  • encrypt(key: PublicKey)
  • send_to(node: NodeId)
  • -

    Aliased Type§

    struct NodeId(/* private fields */);
    \ No newline at end of file +

    Aliased Type§

    pub struct NodeId(/* private fields */);
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/all.html b/pr/3367/docs/iroh_base/all.html index badfb6e64e..bc7d79bbc8 100644 --- a/pr/3367/docs/iroh_base/all.html +++ b/pr/3367/docs/iroh_base/all.html @@ -1 +1 @@ -List of all items in this crate
    \ No newline at end of file +List of all items in this crate

    All

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/enum.KeyParsingError.html b/pr/3367/docs/iroh_base/enum.KeyParsingError.html index ddb1a76ec1..e0facf8a12 100644 --- a/pr/3367/docs/iroh_base/enum.KeyParsingError.html +++ b/pr/3367/docs/iroh_base/enum.KeyParsingError.html @@ -1,4 +1,4 @@ -KeyParsingError in iroh_base - Rust

    Enum KeyParsingError

    Source
    pub enum KeyParsingError {
    +KeyParsingError in iroh_base - Rust

    KeyParsingError

    Enum KeyParsingError 

    Source
    pub enum KeyParsingError {
         Decode {
             source: DecodeError,
             backtrace: Option<Backtrace>,
    @@ -17,29 +17,29 @@
     

    Variants§

    §

    Decode

    Error when decoding.

    Fields

    §source: DecodeError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Key

    Error when decoding the public key.

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DecodeInvalidLength

    The encoded information had the wrong length.

    -

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for KeyParsingError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for KeyParsingError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for KeyParsingError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for KeyParsingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for KeyParsingError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for KeyParsingError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for KeyParsingError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for KeyParsingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodeError> for KeyParsingError

    Source§

    fn from(error: DecodeError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for KeyParsingError

    Source§

    fn from(error: SignatureError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DecodeError> for KeyParsingError

    Source§

    fn from(error: DecodeError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for KeyParsingError

    Source§

    fn from(error: SignatureError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method -receivers.
    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.

    +receivers.
    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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/index.html b/pr/3367/docs/iroh_base/index.html index af14c909b2..40c3ab7b19 100644 --- a/pr/3367/docs/iroh_base/index.html +++ b/pr/3367/docs/iroh_base/index.html @@ -1,4 +1,4 @@ -iroh_base - Rust

    Crate iroh_base

    Source
    Expand description

    Base types and utilities for Iroh

    +iroh_base - Rust

    Crate iroh_base

    Crate iroh_base 

    Source
    Expand description

    Base types and utilities for Iroh

    Modules§

    ticketticket
    Tickets is a serializable object combining information required for an operation. Typically tickets contain all information required for an operation, e.g. an iroh blob ticket would contain the hash of the data as well as information about how to reach the diff --git a/pr/3367/docs/iroh_base/struct.NodeAddr.html b/pr/3367/docs/iroh_base/struct.NodeAddr.html index 310d608732..276f3f8ed2 100644 --- a/pr/3367/docs/iroh_base/struct.NodeAddr.html +++ b/pr/3367/docs/iroh_base/struct.NodeAddr.html @@ -1,4 +1,4 @@ -NodeAddr in iroh_base - Rust

    Struct NodeAddr

    Source
    pub struct NodeAddr {
    +NodeAddr in iroh_base - Rust

    NodeAddr

    Struct NodeAddr 

    Source
    pub struct NodeAddr {
         pub node_id: NodeId,
         pub relay_url: Option<RelayUrl>,
         pub direct_addresses: BTreeSet<SocketAddr>,
    @@ -41,34 +41,36 @@ whenever a connection to other nodes needs to be established.

    Source

    pub fn is_empty(&self) -> bool

    Returns true, if only a NodeId is present.

    Source

    pub fn direct_addresses(&self) -> impl Iterator<Item = &SocketAddr>

    Returns the direct addresses of this peer.

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay url of this peer.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeAddr

    Source§

    fn clone(&self) -> NodeAddr

    Returns a copy 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 NodeAddr

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for NodeAddr

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    Source§

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeTicket

    Available on crate feature ticket only.
    Source§

    fn from(addr: NodeAddr) -> Self

    Creates a ticket from given addressing info.

    -
    Source§

    impl From<NodeTicket> for NodeAddr

    Available on crate feature ticket only.
    Source§

    fn from(ticket: NodeTicket) -> Self

    Returns the addressing info from given ticket.

    -
    Source§

    impl From<PublicKey> for NodeAddr

    Source§

    fn from(node_id: NodeId) -> Self

    Converts to this type from the input type.
    Source§

    impl Ord for NodeAddr

    Source§

    fn cmp(&self, other: &NodeAddr) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for NodeAddr

    Source§

    fn eq(&self, other: &NodeAddr) -> 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 PartialOrd for NodeAddr

    Source§

    fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for NodeAddr

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for NodeAddr

    Source§

    impl StructuralPartialEq for NodeAddr

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +

    Trait Implementations§

    Source§

    impl Clone for NodeAddr

    Source§

    fn clone(&self) -> NodeAddr

    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 NodeAddr

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for NodeAddr

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr

    Source§

    fn from(value: (PublicKey, Option<RelayUrl>, &[SocketAddr])) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeAddr> for NodeTicket

    Available on crate feature ticket only.
    Source§

    fn from(addr: NodeAddr) -> Self

    Creates a ticket from given addressing info.

    +
    Source§

    impl From<NodeTicket> for NodeAddr

    Available on crate feature ticket only.
    Source§

    fn from(ticket: NodeTicket) -> Self

    Returns the addressing info from given ticket.

    +
    Source§

    impl From<PublicKey> for NodeAddr

    Source§

    fn from(node_id: NodeId) -> Self

    Converts to this type from the input type.
    Source§

    impl Hash for NodeAddr

    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 Ord for NodeAddr

    Source§

    fn cmp(&self, other: &NodeAddr) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for NodeAddr

    Source§

    fn eq(&self, other: &NodeAddr) -> 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 PartialOrd for NodeAddr

    Source§

    fn partial_cmp(&self, other: &NodeAddr) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Serialize for NodeAddr

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for NodeAddr

    Source§

    impl StructuralPartialEq for NodeAddr

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/struct.PublicKey.html b/pr/3367/docs/iroh_base/struct.PublicKey.html index f739a4f0ef..c78362fa21 100644 --- a/pr/3367/docs/iroh_base/struct.PublicKey.html +++ b/pr/3367/docs/iroh_base/struct.PublicKey.html @@ -1,54 +1,56 @@ -PublicKey in iroh_base - Rust

    Struct PublicKey

    Source
    pub struct PublicKey(/* private fields */);
    Available on crate feature key only.
    Expand description

    A public key.

    +PublicKey in iroh_base - Rust

    PublicKey

    Struct PublicKey 

    Source
    pub struct PublicKey(/* private fields */);
    Available on crate feature key only.
    Expand description

    A public key.

    The key itself is stored as the CompressedEdwards y coordinate of the public key It is verified to decompress into a valid key when created.

    -

    Implementations§

    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    -
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    -
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    -
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>

    Construct a PublicKey from a slice of bytes.

    +

    Implementations§

    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    +
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    +
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    +
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>

    Construct a PublicKey from a slice of bytes.

    §Warning

    This will return a SignatureError if the bytes passed into this method do not represent a valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes. See [VerifyingKey::from_bytes] for details.

    -
    Source

    pub fn verify( +

    Source

    pub fn verify( &self, message: &[u8], signature: &Signature, ) -> Result<(), SignatureError>

    Verify a signature on a message with this secret key’s public key.

    §Return

    Returns Ok(()) if the signature is valid, and Err otherwise.

    -
    Source

    pub fn fmt_short(&self) -> String

    Convert to a hex string limited to the first 5 bytes for a friendly string +

    Source

    pub fn fmt_short(&self) -> impl Display + 'static

    Convert to a hex string limited to the first 5 bytes for a friendly string representation of the key.

    -

    Trait Implementations§

    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    Returns a copy 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 PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Source§

    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<PublicKey> for NodeAddr

    Source§

    fn from(node_id: NodeId) -> Self

    Converts to this type from the input type.
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> Self

    Converts to this type from the input type.
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    +

    Trait Implementations§

    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    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 PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for PublicKey

    Source§

    type Target = [u8; 32]

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Source§

    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<PublicKey> for NodeAddr

    Source§

    fn from(node_id: NodeId) -> Self

    Converts to this type from the input type.
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> Self

    Converts to this type from the input type.
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    Display is capable of serialising this format.

    -
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for PublicKey

    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 +
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more

    Source§

    impl Hash for PublicKey

    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 Ord for PublicKey

    Source§

    fn cmp(&self, other: &Self) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> 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 PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &Self) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

    Performs the conversion.
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8; 32]) -> Result<Self, Self::Error>

    Performs the conversion.
    Source§

    impl Copy for PublicKey

    Source§

    impl Eq for PublicKey

    Source§

    impl StructuralPartialEq for PublicKey

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + Self: Sized,
    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for PublicKey

    Source§

    fn cmp(&self, other: &Self) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> 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 PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &Self) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where + S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

    Performs the conversion.
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8; 32]) -> Result<Self, Self::Error>

    Performs the conversion.
    Source§

    impl Copy for PublicKey

    Source§

    impl Eq for PublicKey

    Source§

    impl StructuralPartialEq for PublicKey

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<P, T> Receiver for P
    where + P: Deref<Target = T> + ?Sized, + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    Source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/struct.RelayUrl.html b/pr/3367/docs/iroh_base/struct.RelayUrl.html index 65a467f6ef..ea23b88a22 100644 --- a/pr/3367/docs/iroh_base/struct.RelayUrl.html +++ b/pr/3367/docs/iroh_base/struct.RelayUrl.html @@ -1,6 +1,6 @@ -RelayUrl in iroh_base - Rust

    Struct RelayUrl

    Source
    pub struct RelayUrl(/* private fields */);
    Available on crate feature relay only.
    Expand description

    A URL identifying a relay server.

    +RelayUrl in iroh_base - Rust

    RelayUrl

    Struct RelayUrl 

    Source
    pub struct RelayUrl(/* private fields */);
    Available on crate feature relay only.
    Expand description

    A URL identifying a relay server.

    It is cheaply clonable, as the underlying type is wrapped into an Arc. -The main type under the hood though is Url, with a few custom tweaks:

    +The main type under the hood though is Url, with a few custom tweaks:

    • A relay URL is never a relative URL, so an implicit . is added at the end of the @@ -12,7 +12,7 @@ Useful when logging e.g. Option<RelayUrl>.

    To create a RelayUrl use the From<Url> implementation.

    -

    Methods from Deref<Target = Url>§

    Source

    pub fn join(&self, input: &str) -> Result<Url, ParseError>

    Parse a string as an URL, with this URL as the base URL.

    +

    Methods from Deref<Target = Url>§

    Source

    pub fn join(&self, input: &str) -> Result<Url, ParseError>

    Parse a string as an URL, with this URL as the base URL.

    The inverse of this is make_relative.

    §Notes
      @@ -41,14 +41,19 @@ as input replaces everything in the base URL after the scheme. let url = base.join("//eve.com/b")?; assert_eq!(url.as_str(), "https://eve.com/b"); +// Input as base url relative special URL +let base = Url::parse("https://alice.com/a")?; +let url = base.join("/v1/meta")?; +assert_eq!(url.as_str(), "https://alice.com/v1/meta"); + // Input as absolute URL let base = Url::parse("https://alice.com/a")?; let url = base.join("http://eve.com/b")?; -assert_eq!(url.as_str(), "http://eve.com/b"); // http instead of https
    -
    §Errors
    +assert_eq!(url.as_str(), "http://eve.com/b"); // http instead of https +
    §Errors

    If the function can not parse an URL from the given string with this URL as the base URL, a ParseError variant will be returned.

    -
    Source

    pub fn make_relative(&self, url: &Url) -> Option<String>

    Creates a relative URL if possible, with this URL as the base URL.

    +
    Source

    pub fn make_relative(&self, url: &Url) -> Option<String>

    Creates a relative URL if possible, with this URL as the base URL.

    This is the inverse of join.

    §Examples
    -
    §Errors
    +assert_eq!(relative.as_ref().map(|s| s.as_str()), Some("?e=f"));
    §Errors

    If this URL can’t be a base for the given URL, None is returned. This is for example the case if the scheme, host or port are not the same.

    -
    Source

    pub fn as_str(&self) -> &str

    Return the serialization of this URL.

    +
    Source

    pub fn as_str(&self) -> &str

    Return the serialization of this URL.

    This is fast since that serialization is already stored in the Url struct.

    §Examples
    use url::Url;
     
     let url_str = "https://example.net/";
     let url = Url::parse(url_str)?;
    -assert_eq!(url.as_str(), url_str);
    -
    Source

    pub fn origin(&self) -> Origin

    Return the origin of this URL (https://url.spec.whatwg.org/#origin)

    +assert_eq!(url.as_str(), url_str);
    Source

    pub fn origin(&self) -> Origin

    Return the origin of this URL (https://url.spec.whatwg.org/#origin)

    Note: this returns an opaque origin for file: URLs, which causes url.origin() != url.origin().

    §Examples
    @@ -119,21 +122,18 @@ This is for example the case if the scheme, host or port are not the same.

    use url::{Host, Origin, Url};
     
     let url = Url::parse("foo:bar")?;
    -assert!(!url.origin().is_tuple());
    -
    Source

    pub fn scheme(&self) -> &str

    Return the scheme of this URL, lower-cased, as an ASCII string without the ‘:’ delimiter.

    +assert!(!url.origin().is_tuple());
    Source

    pub fn scheme(&self) -> &str

    Return the scheme of this URL, lower-cased, as an ASCII string without the ‘:’ delimiter.

    §Examples
    use url::Url;
     
     let url = Url::parse("file:///tmp/foo")?;
    -assert_eq!(url.scheme(), "file");
    -
    Source

    pub fn is_special(&self) -> bool

    Return whether the URL is special (has a special scheme)

    +assert_eq!(url.scheme(), "file");
    Source

    pub fn is_special(&self) -> bool

    Return whether the URL is special (has a special scheme)

    §Examples
    use url::Url;
     
     assert!(Url::parse("http:///tmp/foo")?.is_special());
     assert!(Url::parse("file:///tmp/foo")?.is_special());
    -assert!(!Url::parse("moz:///tmp/foo")?.is_special());
    -
    Source

    pub fn has_authority(&self) -> bool

    Return whether the URL has an ‘authority’, +assert!(!Url::parse("moz:///tmp/foo")?.is_special());

    Source

    pub fn has_authority(&self) -> bool

    Return whether the URL has an ‘authority’, which can contain a username, password, host, and port number.

    URLs that do not are either path-only like unix:/run/foo.socket or cannot-be-a-base like data:text/plain,Stuff.

    @@ -148,8 +148,7 @@ or cannot-be-a-base like data:text/plain,Stuff.

    assert!(!url.has_authority()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(!url.has_authority());
    -
    Source

    pub fn authority(&self) -> &str

    Return the authority of this URL as an ASCII string.

    +assert!(!url.has_authority());
    Source

    pub fn authority(&self) -> &str

    Return the authority of this URL as an ASCII string.

    Non-ASCII domains are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs. IPv6 addresses are given between [ and ] brackets. @@ -168,8 +167,7 @@ Ports are omitted if they match the well known port of a special URL.

    let url = Url::parse("irc://àlex.рф.example.com:6667/foo")?; assert_eq!(url.authority(), "%C3%A0lex.%D1%80%D1%84.example.com:6667"); let url = Url::parse("http://àlex.рф.example.com:80/foo")?; -assert_eq!(url.authority(), "xn--lex-8ka.xn--p1ai.example.com");
    -
    Source

    pub fn cannot_be_a_base(&self) -> bool

    Return whether this URL is a cannot-be-a-base URL, +assert_eq!(url.authority(), "xn--lex-8ka.xn--p1ai.example.com");

    Source

    pub fn cannot_be_a_base(&self) -> bool

    Return whether this URL is a cannot-be-a-base URL, meaning that parsing a relative URL string with this URL as the base will return an error.

    This is the case if the scheme and : delimiter are not followed by a / slash, as is typically the case of data: and mailto: URLs.

    @@ -183,8 +181,7 @@ as is typically the case of data: and mailto: URLs.

    assert!(!url.cannot_be_a_base()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(url.cannot_be_a_base());
    -
    Source

    pub fn username(&self) -> &str

    Return the username for this URL (typically the empty string) +assert!(url.cannot_be_a_base());

    Source

    pub fn username(&self) -> &str

    Return the username for this URL (typically the empty string) as a percent-encoded ASCII string.

    §Examples
    use url::Url;
    @@ -196,8 +193,7 @@ as a percent-encoded ASCII string.

    assert_eq!(url.username(), ""); let url = Url::parse("https://example.com")?; -assert_eq!(url.username(), "");
    -
    Source

    pub fn password(&self) -> Option<&str>

    Return the password for this URL, if any, as a percent-encoded ASCII string.

    +assert_eq!(url.username(), "");
    Source

    pub fn password(&self) -> Option<&str>

    Return the password for this URL, if any, as a percent-encoded ASCII string.

    §Examples
    use url::Url;
     
    @@ -211,8 +207,7 @@ as a percent-encoded ASCII string.

    assert_eq!(url.password(), None); let url = Url::parse("https://example.com")?; -assert_eq!(url.password(), None);
    -
    Source

    pub fn has_host(&self) -> bool

    Equivalent to url.host().is_some().

    +assert_eq!(url.password(), None);
    Source

    pub fn has_host(&self) -> bool

    Equivalent to url.host().is_some().

    §Examples
    use url::Url;
     
    @@ -223,8 +218,7 @@ as a percent-encoded ASCII string.

    assert!(!url.has_host()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(!url.has_host());
    -
    Source

    pub fn host_str(&self) -> Option<&str>

    Return the string representation of the host (domain or IP address) for this URL, if any.

    +assert!(!url.has_host());
    Source

    pub fn host_str(&self) -> Option<&str>

    Return the string representation of the host (domain or IP address) for this URL, if any.

    Non-ASCII domains are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs. IPv6 addresses are given between [ and ] brackets.

    @@ -237,6 +231,9 @@ don’t have a host.

    let url = Url::parse("https://127.0.0.1/index.html")?; assert_eq!(url.host_str(), Some("127.0.0.1")); +let url = Url::parse("https://subdomain.example.com")?; +assert_eq!(url.host_str(), Some("subdomain.example.com")); + let url = Url::parse("ftp://rms@example.com")?; assert_eq!(url.host_str(), Some("example.com")); @@ -244,8 +241,7 @@ don’t have a host.

    assert_eq!(url.host_str(), None); let url = Url::parse("data:text/plain,Stuff")?; -assert_eq!(url.host_str(), None);
    -
    Source

    pub fn host(&self) -> Option<Host<&str>>

    Return the parsed representation of the host for this URL. +assert_eq!(url.host_str(), None);

    Source

    pub fn host(&self) -> Option<Host<&str>>

    Return the parsed representation of the host for this URL. Non-ASCII domain labels are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs.

    Cannot-be-a-base URLs (typical of data: and mailto:) and some file: URLs @@ -264,8 +260,7 @@ don’t have a host.

    assert!(url.host().is_none()); let url = Url::parse("data:text/plain,Stuff")?; -assert!(url.host().is_none());
    -
    Source

    pub fn domain(&self) -> Option<&str>

    If this URL has a host and it is a domain name (not an IP address), return it. +assert!(url.host().is_none());

    Source

    pub fn domain(&self) -> Option<&str>

    If this URL has a host and it is a domain name (not an IP address), return it. Non-ASCII domains are punycode-encoded per IDNA if this is the host of a special URL, or percent encoded for non-special URLs.

    §Examples
    @@ -278,8 +273,11 @@ of a special URL, or percent encoded for non-special URLs.

    assert_eq!(url.domain(), None); let url = Url::parse("https://example.com/")?; -assert_eq!(url.domain(), Some("example.com"));
    -
    Source

    pub fn port(&self) -> Option<u16>

    Return the port number for this URL, if any.

    +assert_eq!(url.domain(), Some("example.com")); + +let url = Url::parse("https://subdomain.example.com/")?; +assert_eq!(url.domain(), Some("subdomain.example.com")); +
    Source

    pub fn port(&self) -> Option<u16>

    Return the port number for this URL, if any.

    Note that default port numbers are never reflected by the serialization, use the port_or_known_default() method if you want a default port number returned.

    §Examples
    @@ -292,8 +290,7 @@ use the port_or_known_default() method if you want a default port n assert_eq!(url.port(), None); let url = Url::parse("ssh://example.com:22")?; -assert_eq!(url.port(), Some(22));
    -
    Source

    pub fn port_or_known_default(&self) -> Option<u16>

    Return the port number for this URL, or the default port number if it is known.

    +assert_eq!(url.port(), Some(22));
    Source

    pub fn port_or_known_default(&self) -> Option<u16>

    Return the port number for this URL, or the default port number if it is known.

    This method only knows the default port number of the http, https, ws, wss and ftp schemes.

    For URLs in these schemes, this method always returns Some(_). @@ -308,11 +305,10 @@ For other schemes, it is the same as Url::port().

    assert_eq!(url.port_or_known_default(), Some(1456)); let url = Url::parse("https://example.com")?; -assert_eq!(url.port_or_known_default(), Some(443));
    -
    Source

    pub fn socket_addrs( +assert_eq!(url.port_or_known_default(), Some(443));

    Source

    pub fn socket_addrs( &self, default_port_number: impl Fn() -> Option<u16>, -) -> Result<Vec<SocketAddr>, Error>

    Available on crate feature std and (Unix or Windows or Redox or WASI or HermitCore) only.

    Resolve a URL’s host and port number to SocketAddr.

    +) -> Result<Vec<SocketAddr>, Error>

    Resolve a URL’s host and port number to SocketAddr.

    If the URL has the default port number of a scheme that is unknown to this library, default_port_number provides an opportunity to provide the actual port number. In non-example code this should be implemented either simply as || None, @@ -322,15 +318,13 @@ or by matching on the URL’s .scheme().

    let url = url::Url::parse("https://example.net/").unwrap();
     let addrs = url.socket_addrs(|| None).unwrap();
     std::net::TcpStream::connect(&*addrs)
    -
    /// With application-specific known default port numbers
     fn socket_addrs(url: url::Url) -> std::io::Result<Vec<std::net::SocketAddr>> {
         url.socket_addrs(|| match url.scheme() {
             "socks5" | "socks5h" => Some(1080),
             _ => None,
         })
    -}
    -
    Source

    pub fn path(&self) -> &str

    Return the path for this URL, as a percent-encoded ASCII string. +}

    Source

    pub fn path(&self) -> &str

    Return the path for this URL, as a percent-encoded ASCII string. For cannot-be-a-base URLs, this is an arbitrary string that doesn’t start with ‘/’. For other URLs, this starts with a ‘/’ slash and continues with slash-separated path segments.

    @@ -344,8 +338,7 @@ and continues with slash-separated path segments.

    assert_eq!(url.path(), "/"); let url = Url::parse("https://example.com/countries/việt nam")?; -assert_eq!(url.path(), "/countries/vi%E1%BB%87t%20nam");
    -
    Source

    pub fn path_segments(&self) -> Option<Split<'_, char>>

    Unless this URL is cannot-be-a-base, +assert_eq!(url.path(), "/countries/vi%E1%BB%87t%20nam");

    Source

    pub fn path_segments(&self) -> Option<Split<'_, char>>

    Unless this URL is cannot-be-a-base, return an iterator of ‘/’ slash-separated path segments, each as a percent-encoded ASCII string.

    Return None for cannot-be-a-base URLs.

    @@ -372,8 +365,7 @@ each as a percent-encoded ASCII string.

    let url = Url::parse("https://example.com/countries/việt nam")?; let mut path_segments = url.path_segments().ok_or_else(|| "cannot be base")?; assert_eq!(path_segments.next(), Some("countries")); -assert_eq!(path_segments.next(), Some("vi%E1%BB%87t%20nam"));
    -
    Source

    pub fn query(&self) -> Option<&str>

    Return this URL’s query string, if any, as a percent-encoded ASCII string.

    +assert_eq!(path_segments.next(), Some("vi%E1%BB%87t%20nam"));
    Source

    pub fn query(&self) -> Option<&str>

    Return this URL’s query string, if any, as a percent-encoded ASCII string.

    §Examples
    use url::Url;
     
    @@ -388,8 +380,7 @@ each as a percent-encoded ASCII string.

    let url = Url::parse("https://example.com/?country=español")?; let query = url.query(); -assert_eq!(query, Some("country=espa%C3%B1ol"));
    -
    Source

    pub fn query_pairs(&self) -> Parse<'_>

    Parse the URL’s query string, if any, as application/x-www-form-urlencoded +assert_eq!(query, Some("country=espa%C3%B1ol"));

    Source

    pub fn query_pairs(&self) -> Parse<'_>

    Parse the URL’s query string, if any, as application/x-www-form-urlencoded and return an iterator of (key, value) pairs.

    §Examples
    use std::borrow::Cow;
    @@ -402,8 +393,7 @@ and return an iterator of (key, value) pairs.

    assert_eq!(pairs.count(), 2); assert_eq!(pairs.next(), Some((Cow::Borrowed("page"), Cow::Borrowed("2")))); -assert_eq!(pairs.next(), Some((Cow::Borrowed("sort"), Cow::Borrowed("desc"))));
    -
    Source

    pub fn fragment(&self) -> Option<&str>

    Return this URL’s fragment identifier, if any.

    +assert_eq!(pairs.next(), Some((Cow::Borrowed("sort"), Cow::Borrowed("desc"))));
    Source

    pub fn fragment(&self) -> Option<&str>

    Return this URL’s fragment identifier, if any.

    A fragment is the part of the URL after the # symbol. The fragment is optional and, if present, contains a fragment identifier that identifies a secondary resource, such as a section heading @@ -422,16 +412,15 @@ but the input may have been percent-encoded already.

    let url = Url::parse("https://example.com/data.csv#cell=4,1-6,2")?; -assert_eq!(url.fragment(), Some("cell=4,1-6,2"));
    -
    Source

    pub fn serialize_internal<S>( +assert_eq!(url.fragment(), Some("cell=4,1-6,2"));

    Source

    pub fn serialize_internal<S>( &self, serializer: S, -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where - S: Serializer,

    Available on crate feature serde only.

    Serialize with Serde using the internal representation of the Url struct.

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where + S: Serializer,

    Serialize with Serde using the internal representation of the Url struct.

    The corresponding deserialize_internal method sacrifices some invariant-checking for speed, compared to the Deserialize trait impl.

    This method is only available if the serde Cargo feature is enabled.

    -
    Source

    pub fn to_file_path(&self) -> Result<PathBuf, ()>

    Available on crate feature std and (Unix or Windows or Redox or WASI or HermitCore) only.

    Assuming the URL is in the file scheme or similar, +

    Source

    pub fn to_file_path(&self) -> Result<PathBuf, ()>

    Assuming the URL is in the file scheme or similar, convert its path to an absolute std::path::Path.

    Note: This does not actually check the URL’s scheme, and may give nonsensical results for other schemes. @@ -444,43 +433,43 @@ or if Path::new_opt() returns None. (That is, if the percent-decoded path contains a NUL byte or, for a Windows path, is not UTF-8.)

    This method is only available if the std Cargo feature is enabled.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayUrl

    Source§

    fn clone(&self) -> RelayUrl

    Returns a copy 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 RelayUrl

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for RelayUrl

    Dereferences to the wrapped Url.

    +

    Trait Implementations§

    Source§

    impl Clone for RelayUrl

    Source§

    fn clone(&self) -> RelayUrl

    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 RelayUrl

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for RelayUrl

    Dereferences to the wrapped Url.

    Note that DerefMut is not implemented on purpose, so this type has more flexibility to change the inner later.

    -
    Source§

    type Target = Url

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl<'de> Deserialize<'de> for RelayUrl

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayUrl

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayUrl> for Url

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Url> for RelayUrl

    Source§

    fn from(url: Url) -> Self

    Converts to this type from the input type.
    Source§

    impl FromStr for RelayUrl

    Support for parsing strings directly.

    -

    If you need more control over the error first create a Url and use RelayUrl::from +

    Source§

    type Target = Url

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl<'de> Deserialize<'de> for RelayUrl

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayUrl

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayUrl> for Url

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Url> for RelayUrl

    Source§

    fn from(url: Url) -> Self

    Converts to this type from the input type.
    Source§

    impl FromStr for RelayUrl

    Support for parsing strings directly.

    +

    If you need more control over the error first create a Url and use RelayUrl::from instead.

    Source§

    type Err = RelayUrlParseError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for RelayUrl

    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 Ord for RelayUrl

    Source§

    fn cmp(&self, other: &RelayUrl) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayUrl

    Source§

    fn eq(&self, other: &RelayUrl) -> 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 PartialOrd for RelayUrl

    Source§

    fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for RelayUrl

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayUrl

    Source§

    impl StructuralPartialEq for RelayUrl

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + Self: Sized,
    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for RelayUrl

    Source§

    fn cmp(&self, other: &RelayUrl) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayUrl

    Source§

    fn eq(&self, other: &RelayUrl) -> 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 PartialOrd for RelayUrl

    Source§

    fn partial_cmp(&self, other: &RelayUrl) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Serialize for RelayUrl

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayUrl

    Source§

    impl StructuralPartialEq for RelayUrl

    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).

    +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<P, T> Receiver for P
    where +

    Source§

    impl<P, T> Receiver for P
    where P: Deref<Target = T> + ?Sized, - T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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 + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    Source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/struct.RelayUrlParseError.html b/pr/3367/docs/iroh_base/struct.RelayUrlParseError.html index 41a615a6a4..54b9ff3c9b 100644 --- a/pr/3367/docs/iroh_base/struct.RelayUrlParseError.html +++ b/pr/3367/docs/iroh_base/struct.RelayUrlParseError.html @@ -1,27 +1,27 @@ -RelayUrlParseError in iroh_base - Rust

    Struct RelayUrlParseError

    Source
    pub struct RelayUrlParseError { /* private fields */ }
    Available on crate feature relay only.
    Expand description

    Can occur when parsing a string into a RelayUrl.

    +RelayUrlParseError in iroh_base - Rust

    RelayUrlParseError

    Struct RelayUrlParseError 

    Source
    pub struct RelayUrlParseError { /* private fields */ }
    Available on crate feature relay only.
    Expand description

    Can occur when parsing a string into a RelayUrl.

    Trait Implementations§

    Source§

    impl Debug for RelayUrlParseError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RelayUrlParseError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for RelayUrlParseError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RelayUrlParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RelayUrlParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. 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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method -receivers.
    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.

    +receivers.
    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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/struct.SecretKey.html b/pr/3367/docs/iroh_base/struct.SecretKey.html index 7b6af9dec8..3021b5130d 100644 --- a/pr/3367/docs/iroh_base/struct.SecretKey.html +++ b/pr/3367/docs/iroh_base/struct.SecretKey.html @@ -1,34 +1,32 @@ -SecretKey in iroh_base - Rust

    Struct SecretKey

    Source
    pub struct SecretKey { /* private fields */ }
    Available on crate feature key only.
    Expand description

    A secret key.

    -

    Implementations§

    Source§

    impl SecretKey

    Source

    pub fn public(&self) -> PublicKey

    The public key of this SecretKey.

    -
    Source

    pub fn generate<R: CryptoRngCore>(csprng: R) -> Self

    Generate a new SecretKey with a randomness generator.

    +SecretKey in iroh_base - Rust

    SecretKey

    Struct SecretKey 

    Source
    pub struct SecretKey { /* private fields */ }
    Available on crate feature key only.
    Expand description

    A secret key.

    +

    Implementations§

    Source§

    impl SecretKey

    Source

    pub fn public(&self) -> PublicKey

    The public key of this SecretKey.

    +
    Source

    pub fn generate<R: CryptoRng + ?Sized>(csprng: &mut R) -> Self

    Generate a new SecretKey with a randomness generator.

    // use the OsRng option for OS depedndent most secure RNG.
    -let mut rng = rand::rngs::OsRng;
    -let _key = iroh_base::SecretKey::generate(&mut rng);
    -
    Source

    pub fn sign(&self, msg: &[u8]) -> Signature

    Sign the given message and return a digital signature

    -
    Source

    pub fn to_bytes(&self) -> [u8; 32]

    Convert this to the bytes representing the secret part. +let _key = iroh_base::SecretKey::generate(&mut rand::rng());

    Source

    pub fn sign(&self, msg: &[u8]) -> Signature

    Sign the given message and return a digital signature

    +
    Source

    pub fn to_bytes(&self) -> [u8; 32]

    Convert this to the bytes representing the secret part. The public part can always be recovered.

    -
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Self

    Create a secret key from its byte representation.

    -
    Source

    pub fn secret(&self) -> &SigningKey

    Returns the [SigningKey] for this SecretKey.

    -

    Trait Implementations§

    Source§

    impl Clone for SecretKey

    Source§

    fn clone(&self) -> SecretKey

    Returns a copy 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 SecretKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for SecretKey

    Source§

    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<[u8; 32]> for SecretKey

    Source§

    fn from(value: [u8; 32]) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SigningKey> for SecretKey

    Source§

    fn from(secret: SigningKey) -> Self

    Converts to this type from the input type.
    Source§

    impl FromStr for SecretKey

    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Serialize for SecretKey

    Source§

    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl TryFrom<&[u8]> for SecretKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

    Performs the conversion.

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Self

    Create a secret key from its byte representation.

    +
    Source

    pub fn secret(&self) -> &SigningKey

    Returns the [SigningKey] for this SecretKey.

    +

    Trait Implementations§

    Source§

    impl Clone for SecretKey

    Source§

    fn clone(&self) -> SecretKey

    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 SecretKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for SecretKey

    Source§

    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where + D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl From<[u8; 32]> for SecretKey

    Source§

    fn from(value: [u8; 32]) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SigningKey> for SecretKey

    Source§

    fn from(secret: SigningKey) -> Self

    Converts to this type from the input type.
    Source§

    impl FromStr for SecretKey

    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Serialize for SecretKey

    Source§

    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where + S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl TryFrom<&[u8]> for SecretKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

    Performs the conversion.

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/struct.Signature.html b/pr/3367/docs/iroh_base/struct.Signature.html index f6b5f42c1d..81e99f3b45 100644 --- a/pr/3367/docs/iroh_base/struct.Signature.html +++ b/pr/3367/docs/iroh_base/struct.Signature.html @@ -1,4 +1,4 @@ -Signature in iroh_base - Rust

    Struct Signature

    #[repr(C)]
    pub struct Signature { /* private fields */ }
    Available on crate feature key only.
    Expand description

    Ed25519 signature.

    +Signature in iroh_base - Rust

    Signature

    Struct Signature 

    pub struct Signature { /* private fields */ }
    Available on crate feature key only.
    Expand description

    Ed25519 signature.

    This type represents a container for the byte serialization of an Ed25519 signature, and does not necessarily represent well-formed field or curve elements.

    @@ -16,36 +16,37 @@ elements at the time a signature is verified.

    pub fn r_bytes(&self) -> &[u8; 32]

    Bytes for the R component of a signature.

    pub fn s_bytes(&self) -> &[u8; 32]

    Bytes for the s component of a signature.

    pub fn to_bytes(&self) -> [u8; 64]

    Return the inner byte array.

    -

    pub fn to_vec(&self) -> Vec<u8> ⓘ

    Available on crate feature alloc only.

    Convert this signature into a byte vector.

    -

    Trait Implementations§

    §

    impl Clone for Signature

    §

    fn clone(&self) -> Signature

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    §

    impl Debug for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for Signature

    §

    fn deserialize<D>( +

    pub fn to_vec(&self) -> Vec<u8> ⓘ

    Convert this signature into a byte vector.

    +

    Trait Implementations§

    §

    impl AssociatedAlgorithmIdentifier for Signature

    §

    const ALGORITHM_IDENTIFIER: AlgorithmIdentifier<AnyRef<'static>> = pkcs8::ALGORITHM_ID

    AlgorithmIdentifier for this structure.
    §

    type Params = AnyRef<'static>

    Algorithm parameters.
    §

    impl Clone for Signature

    §

    fn clone(&self) -> Signature

    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
    §

    impl Debug for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl<'de> Deserialize<'de> for Signature

    §

    fn deserialize<D>( deserializer: D, -) -> Result<Signature, <D as Deserializer<'de>>::Error>
    where - D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<&[u8; 64]> for Signature

    §

    fn from(bytes: &[u8; 64]) -> Signature

    Converts to this type from the input type.
    §

    impl From<[u8; 64]> for Signature

    §

    fn from(bytes: [u8; 64]) -> Signature

    Converts to this type from the input type.
    §

    impl From<InternalSignature> for Signature

    §

    fn from(sig: InternalSignature) -> Signature

    Converts to this type from the input type.
    §

    impl FromStr for Signature

    Decode a signature from hexadecimal.

    +) -> Result<Signature, <D as Deserializer<'de>>::Error>
    where + D: Deserializer<'de>,
    Deserialize this value from the given Serde deserializer. Read more
    §

    impl Display for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl From<&[u8; 64]> for Signature

    §

    fn from(bytes: &[u8; 64]) -> Signature

    Converts to this type from the input type.
    §

    impl From<&Signature> for [u8; 64]

    §

    fn from(sig: &Signature) -> [u8; 64]

    Converts to this type from the input type.
    §

    impl From<[u8; 64]> for Signature

    §

    fn from(bytes: [u8; 64]) -> Signature

    Converts to this type from the input type.
    §

    impl From<InternalSignature> for Signature

    §

    fn from(sig: InternalSignature) -> Signature

    Converts to this type from the input type.
    §

    impl From<Signature> for [u8; 64]

    §

    fn from(sig: Signature) -> [u8; 64]

    Converts to this type from the input type.
    §

    impl FromStr for Signature

    Decode a signature from hexadecimal.

    Upper and lower case hexadecimal are both accepted, however mixed case is rejected.

    -
    §

    type Err = Error

    The associated error which can be returned from parsing.
    §

    fn from_str(hex: &str) -> Result<Signature, Error>

    Parses a string s to return a value of this type. Read more
    §

    impl LowerHex for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for Signature

    §

    fn eq(&self, other: &Signature) -> 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.
    §

    impl Serialize for Signature

    §

    fn serialize<S>( +

    §

    type Err = Error

    The associated error which can be returned from parsing.
    §

    fn from_str(hex: &str) -> Result<Signature, Error>

    Parses a string s to return a value of this type. Read more
    §

    impl LowerHex for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl PartialEq for Signature

    §

    fn eq(&self, other: &Signature) -> 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.
    §

    impl Serialize for Signature

    §

    fn serialize<S>( &self, serializer: S, -) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where - S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    §

    impl SignatureEncoding for Signature

    §

    type Repr = [u8; 64]

    Byte representation of a signature.
    §

    fn to_bytes(&self) -> [u8; 64]

    Encode signature as its byte representation.
    §

    fn to_vec(&self) -> Vec<u8> ⓘ

    Available on crate feature alloc only.
    Encode signature as a byte vector.
    §

    fn encoded_len(&self) -> usize

    Get the length of this signature when encoded.
    §

    impl TryFrom<&[u8]> for Signature

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(bytes: &[u8]) -> Result<Signature, Error>

    Performs the conversion.
    §

    impl UpperHex for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Copy for Signature

    §

    impl Eq for Signature

    §

    impl StructuralPartialEq for Signature

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where + S: Serializer,
    Serialize this value into the given Serde serializer. Read more
    §

    impl SignatureBitStringEncoding for Signature

    §

    fn to_bitstring(&self) -> Result<BitString, Error>

    BitString encoding for this signature.
    §

    impl SignatureEncoding for Signature

    §

    type Repr = [u8; 64]

    Byte representation of a signature.
    §

    fn to_bytes(&self) -> [u8; 64]

    Encode signature as its byte representation.
    §

    fn to_vec(&self) -> Vec<u8> ⓘ

    Encode signature as a byte vector.
    §

    fn encoded_len(&self) -> usize

    Get the length of this signature when encoded.
    §

    impl TryFrom<&[u8]> for Signature

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(bytes: &[u8]) -> Result<Signature, Error>

    Performs the conversion.
    §

    impl UpperHex for Signature

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    §

    impl Copy for Signature

    §

    impl Eq for Signature

    §

    impl StructuralPartialEq for Signature

    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
    §

    impl<T> DynAssociatedAlgorithmIdentifier for T
    where + T: AssociatedAlgorithmIdentifier,

    §

    fn algorithm_identifier(&self) -> Result<AlgorithmIdentifier<Any>, Error>

    AlgorithmIdentifier for this structure.
    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    Source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/ticket/enum.ParseError.html b/pr/3367/docs/iroh_base/ticket/enum.ParseError.html index 145f5f79ad..421516c59f 100644 --- a/pr/3367/docs/iroh_base/ticket/enum.ParseError.html +++ b/pr/3367/docs/iroh_base/ticket/enum.ParseError.html @@ -1,4 +1,4 @@ -ParseError in iroh_base::ticket - Rust

    Enum ParseError

    Source
    #[non_exhaustive]
    pub enum ParseError { +ParseError in iroh_base::ticket - Rust

    ParseError

    Enum ParseError 

    Source
    #[non_exhaustive]
    pub enum ParseError { Kind { expected: &'static str, backtrace: Option<Backtrace>, @@ -31,28 +31,28 @@ prefix.

    Source

    pub fn verification_failed(message: &'static str) -> Self

    Return a ParseError variant that indicates verification of the deserialized bytes failed.

    Trait Implementations§

    Source§

    impl Debug for ParseError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for ParseError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for ParseError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodeError> for ParseError

    Source§

    fn from(error: DecodeError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ParseError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method -receivers.
    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.

    +receivers.
    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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/ticket/index.html b/pr/3367/docs/iroh_base/ticket/index.html index 69c0d2faec..ed1e5e534d 100644 --- a/pr/3367/docs/iroh_base/ticket/index.html +++ b/pr/3367/docs/iroh_base/ticket/index.html @@ -1,4 +1,4 @@ -iroh_base::ticket - Rust

    Module ticket

    Source
    Available on crate feature ticket only.
    Expand description

    Tickets is a serializable object combining information required for an operation. +iroh_base::ticket - Rust

    Module ticket

    Module ticket 

    Source
    Available on crate feature ticket only.
    Expand description

    Tickets is a serializable object combining information required for an operation. Typically tickets contain all information required for an operation, e.g. an iroh blob ticket would contain the hash of the data as well as information about how to reach the provider.

    diff --git a/pr/3367/docs/iroh_base/ticket/struct.NodeTicket.html b/pr/3367/docs/iroh_base/ticket/struct.NodeTicket.html index 7b34018741..d879648221 100644 --- a/pr/3367/docs/iroh_base/ticket/struct.NodeTicket.html +++ b/pr/3367/docs/iroh_base/ticket/struct.NodeTicket.html @@ -1,8 +1,8 @@ -NodeTicket in iroh_base::ticket - Rust

    Struct NodeTicket

    Source
    pub struct NodeTicket { /* private fields */ }
    Available on crate feature ticket only.
    Expand description

    A token containing information for establishing a connection to a node.

    +NodeTicket in iroh_base::ticket - Rust

    NodeTicket

    Struct NodeTicket 

    Source
    pub struct NodeTicket { /* private fields */ }
    Available on crate feature ticket only.
    Expand description

    A token containing information for establishing a connection to a node.

    Contains

    • The NodeId of the node to connect to (a 32-byte ed25519 public key).
    • -
    • If used, the [’RelayUrl`] of on which the node can be reached.
    • +
    • If used, the ’RelayUrl` of on which the node can be reached.
    • Any direct addresses on which the node might be reachable.

    This allows establishing a connection to the node in most circumstances where it is @@ -10,29 +10,29 @@ possible to do so.

    This NodeTicket is a single item which can be easily serialized and deserialized and implements the Ticket trait. The Display and FromStr traits can also be used to round-trip the ticket to string.

    -

    Implementations§

    Source§

    impl NodeTicket

    Source

    pub fn new(node: NodeAddr) -> Self

    Creates a new ticket.

    -
    Source

    pub fn node_addr(&self) -> &NodeAddr

    The NodeAddr of the provider for this ticket.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeTicket

    Source§

    fn clone(&self) -> NodeTicket

    Returns a copy 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 NodeTicket

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for NodeTicket

    Source§

    fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for NodeTicket

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<NodeAddr> for NodeTicket

    Source§

    fn from(addr: NodeAddr) -> Self

    Creates a ticket from given addressing info.

    -
    Source§

    impl From<NodeTicket> for NodeAddr

    Source§

    fn from(ticket: NodeTicket) -> Self

    Returns the addressing info from given ticket.

    -
    Source§

    impl FromStr for NodeTicket

    Source§

    type Err = ParseError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl PartialEq for NodeTicket

    Source§

    fn eq(&self, other: &NodeTicket) -> 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 Serialize for NodeTicket

    Source§

    fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Ticket for NodeTicket

    Source§

    const KIND: &'static str = "node"

    String prefix describing the kind of iroh ticket. Read more
    Source§

    fn to_bytes(&self) -> Vec<u8> ⓘ

    Serialize to bytes used in the base32 string representation.
    Source§

    fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError>

    Deserialize from the base32 string representation bytes.
    Source§

    fn serialize(&self) -> String

    Serialize to string.
    Source§

    fn deserialize(str: &str) -> Result<Self, ParseError>

    Deserialize from a string.
    Source§

    impl Eq for NodeTicket

    Source§

    impl StructuralPartialEq for NodeTicket

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +

    Implementations§

    Source§

    impl NodeTicket

    Source

    pub fn new(node: NodeAddr) -> Self

    Creates a new ticket.

    +
    Source

    pub fn node_addr(&self) -> &NodeAddr

    The NodeAddr of the provider for this ticket.

    +

    Trait Implementations§

    Source§

    impl Clone for NodeTicket

    Source§

    fn clone(&self) -> NodeTicket

    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 NodeTicket

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for NodeTicket

    Source§

    fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for NodeTicket

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<NodeAddr> for NodeTicket

    Source§

    fn from(addr: NodeAddr) -> Self

    Creates a ticket from given addressing info.

    +
    Source§

    impl From<NodeTicket> for NodeAddr

    Source§

    fn from(ticket: NodeTicket) -> Self

    Returns the addressing info from given ticket.

    +
    Source§

    impl FromStr for NodeTicket

    Source§

    type Err = ParseError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl PartialEq for NodeTicket

    Source§

    fn eq(&self, other: &NodeTicket) -> 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 Serialize for NodeTicket

    Source§

    fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Ticket for NodeTicket

    Source§

    const KIND: &'static str = "node"

    String prefix describing the kind of iroh ticket. Read more
    Source§

    fn to_bytes(&self) -> Vec<u8> ⓘ

    Serialize to bytes used in the base32 string representation.
    Source§

    fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError>

    Deserialize from the base32 string representation bytes.
    Source§

    fn serialize(&self) -> String

    Serialize to string.
    Source§

    fn deserialize(str: &str) -> Result<Self, ParseError>

    Deserialize from a string.
    Source§

    impl Eq for NodeTicket

    Source§

    impl StructuralPartialEq for NodeTicket

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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 +

    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    Source§

    impl<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/ticket/trait.Ticket.html b/pr/3367/docs/iroh_base/ticket/trait.Ticket.html index 8d017dfb77..3307dd8c1b 100644 --- a/pr/3367/docs/iroh_base/ticket/trait.Ticket.html +++ b/pr/3367/docs/iroh_base/ticket/trait.Ticket.html @@ -1,4 +1,4 @@ -Ticket in iroh_base::ticket - Rust

    Trait Ticket

    Source
    pub trait Ticket: Sized {
    +Ticket in iroh_base::ticket - Rust

    Ticket

    Trait Ticket 

    Source
    pub trait Ticket: Sized {
         const KIND: &'static str;
     
         // Required methods
    @@ -21,4 +21,4 @@ to the implementer. We recommend using 
    Source

    fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError>

    Deserialize from the base32 string representation bytes.

    Provided Methods§

    Source

    fn serialize(&self) -> String

    Serialize to string.

    Source

    fn deserialize(str: &str) -> Result<Self, ParseError>

    Deserialize from a string.

    -

    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 Ticket for NodeTicket

    Source§

    const KIND: &'static str = "node"

    \ No newline at end of file +

    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 Ticket for NodeTicket

    Source§

    const KIND: &'static str = "node"

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/type.NodeId.html b/pr/3367/docs/iroh_base/type.NodeId.html index bc7f6ecb45..e52e4af265 100644 --- a/pr/3367/docs/iroh_base/type.NodeId.html +++ b/pr/3367/docs/iroh_base/type.NodeId.html @@ -1,4 +1,4 @@ -NodeId in iroh_base - Rust

    Type Alias NodeId

    Source
    pub type NodeId = PublicKey;
    Available on crate feature key only.
    Expand description

    The identifier for a node in the (iroh) network.

    +NodeId in iroh_base - Rust

    NodeId

    Type Alias NodeId 

    Source
    pub type NodeId = PublicKey;
    Available on crate feature key only.
    Expand description

    The identifier for a node in the (iroh) network.

    Each node in iroh has a unique identifier created as a cryptographic key. This can be used to globally identify a node. Since it is also a cryptographic key it is also the mechanism by which all traffic is always encrypted for a specific node only.

    @@ -9,4 +9,4 @@ a node. E.g.:

  • encrypt(key: PublicKey)
  • send_to(node: NodeId)
  • -

    Aliased Type§

    struct NodeId(/* private fields */);
    \ No newline at end of file +

    Aliased Type§

    pub struct NodeId(/* private fields */);
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_base/type.SignatureError.html b/pr/3367/docs/iroh_base/type.SignatureError.html index f758321e91..badd196a92 100644 --- a/pr/3367/docs/iroh_base/type.SignatureError.html +++ b/pr/3367/docs/iroh_base/type.SignatureError.html @@ -1,4 +1,4 @@ -SignatureError in iroh_base - Rust

    Type Alias SignatureError

    pub type SignatureError = Error;
    Available on crate feature key only.
    Expand description

    Errors which may occur while processing signatures and keypairs.

    +SignatureError in iroh_base - Rust

    SignatureError

    Type Alias SignatureError 

    pub type SignatureError = Error;
    Available on crate feature key only.
    Expand description

    Errors which may occur while processing signatures and keypairs.

    This error may arise due to:

    • @@ -17,4 +17,4 @@ only be constructed from 255-bit integers.)

      Failure of a signature to satisfy the verification equation.

    -

    Aliased Type§

    struct SignatureError { /* private fields */ }
    \ No newline at end of file +

    Aliased Type§

    pub struct SignatureError { /* private fields */ }
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/all.html b/pr/3367/docs/iroh_bench/all.html index ba999a82b7..3465ef020e 100644 --- a/pr/3367/docs/iroh_bench/all.html +++ b/pr/3367/docs/iroh_bench/all.html @@ -1 +1 @@ -List of all items in this crate
    \ No newline at end of file +List of all items in this crate

    All

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/enum.Commands.html b/pr/3367/docs/iroh_bench/enum.Commands.html index 8a0c27519d..e930cec8e6 100644 --- a/pr/3367/docs/iroh_bench/enum.Commands.html +++ b/pr/3367/docs/iroh_bench/enum.Commands.html @@ -1,8 +1,8 @@ -Commands in iroh_bench - Rust

    Enum Commands

    Source
    pub enum Commands {
    +Commands in iroh_bench - Rust

    Commands

    Enum Commands 

    Source
    pub enum Commands {
         Iroh(Opt),
         Quinn(Opt),
         S2n(Opt),
    -}

    Variants§

    §

    Iroh(Opt)

    §

    Quinn(Opt)

    §

    S2n(Opt)

    Trait Implementations§

    Source§

    impl Clone for Commands

    Source§

    fn clone(&self) -> Commands

    Returns a copy 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 CommandFactory for Commands

    Source§

    fn command<'b>() -> Command

    Build a [Command] that can instantiate Self. Read more
    Source§

    fn command_for_update<'b>() -> Command

    Build a [Command] that can update self. Read more
    Source§

    impl Debug for Commands

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromArgMatches for Commands

    Source§

    fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn from_arg_matches_mut( +}

    Variants§

    §

    Iroh(Opt)

    §

    Quinn(Opt)

    §

    S2n(Opt)

    Trait Implementations§

    Source§

    impl Clone for Commands

    Source§

    fn clone(&self) -> Commands

    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 CommandFactory for Commands

    Source§

    fn command<'b>() -> Command

    Build a [Command] that can instantiate Self. Read more
    Source§

    fn command_for_update<'b>() -> Command

    Build a [Command] that can update self. Read more
    Source§

    impl Debug for Commands

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromArgMatches for Commands

    Source§

    fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn update_from_arg_matches( &mut self, @@ -28,24 +28,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/enum.ConnectionSelector.html b/pr/3367/docs/iroh_bench/enum.ConnectionSelector.html index a215f24900..2a41204253 100644 --- a/pr/3367/docs/iroh_bench/enum.ConnectionSelector.html +++ b/pr/3367/docs/iroh_bench/enum.ConnectionSelector.html @@ -1,7 +1,7 @@ -ConnectionSelector in iroh_bench - Rust

    Enum ConnectionSelector

    Source
    pub enum ConnectionSelector {
    -    Iroh(Connection),
    +ConnectionSelector in iroh_bench - Rust

    ConnectionSelector

    Enum ConnectionSelector 

    Source
    pub enum ConnectionSelector {
    +    Iroh(Connection),
         Quinn(Connection),
    -}

    Variants§

    §

    Iroh(Connection)

    §

    Quinn(Connection)

    Implementations§

    Source§

    impl ConnectionSelector

    Source

    pub fn stats(&self)

    Source

    pub fn close(&self, error_code: u32, reason: &[u8])

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +}

    Variants§

    §

    Iroh(Connection)

    §

    Quinn(Connection)

    Implementations§

    Source§

    impl ConnectionSelector

    Source

    pub fn stats(&self)

    Source

    pub fn close(&self, error_code: u32, reason: &[u8])

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -9,20 +9,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/enum.EndpointSelector.html b/pr/3367/docs/iroh_bench/enum.EndpointSelector.html index 20ff2d0644..f7a8979c92 100644 --- a/pr/3367/docs/iroh_bench/enum.EndpointSelector.html +++ b/pr/3367/docs/iroh_bench/enum.EndpointSelector.html @@ -1,7 +1,7 @@ -EndpointSelector in iroh_bench - Rust

    Enum EndpointSelector

    Source
    pub enum EndpointSelector {
    -    Iroh(Endpoint),
    +EndpointSelector in iroh_bench - Rust

    EndpointSelector

    Enum EndpointSelector 

    Source
    pub enum EndpointSelector {
    +    Iroh(Endpoint),
         Quinn(Endpoint),
    -}

    Variants§

    §

    Iroh(Endpoint)

    §

    Quinn(Endpoint)

    Implementations§

    Source§

    impl EndpointSelector

    Source

    pub async fn close(self)

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +}

    Variants§

    §

    Iroh(Endpoint)

    §

    Quinn(Endpoint)

    Implementations§

    Source§

    impl EndpointSelector

    Source

    pub async fn close(self)

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -9,20 +9,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/fn.client_handler.html b/pr/3367/docs/iroh_bench/fn.client_handler.html index 03c54b4fc0..783152b45c 100644 --- a/pr/3367/docs/iroh_bench/fn.client_handler.html +++ b/pr/3367/docs/iroh_bench/fn.client_handler.html @@ -1,4 +1,4 @@ -client_handler in iroh_bench - Rust

    Function client_handler

    Source
    pub async fn client_handler(
    +client_handler in iroh_bench - Rust

    client_handler

    Function client_handler 

    Source
    pub async fn client_handler(
         endpoint: EndpointSelector,
         connection: ConnectionSelector,
         opt: Opt,
    diff --git a/pr/3367/docs/iroh_bench/fn.configure_tracing_subscriber.html b/pr/3367/docs/iroh_bench/fn.configure_tracing_subscriber.html
    index 5f1860041b..73792773de 100644
    --- a/pr/3367/docs/iroh_bench/fn.configure_tracing_subscriber.html
    +++ b/pr/3367/docs/iroh_bench/fn.configure_tracing_subscriber.html
    @@ -1 +1 @@
    -configure_tracing_subscriber in iroh_bench - Rust

    Function configure_tracing_subscriber

    Source
    pub fn configure_tracing_subscriber()
    \ No newline at end of file +configure_tracing_subscriber in iroh_bench - Rust

    configure_tracing_subscriber

    Function configure_tracing_subscriber 

    Source
    pub fn configure_tracing_subscriber()
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/fn.rt.html b/pr/3367/docs/iroh_bench/fn.rt.html index 9d523d9ee3..77e4db6323 100644 --- a/pr/3367/docs/iroh_bench/fn.rt.html +++ b/pr/3367/docs/iroh_bench/fn.rt.html @@ -1 +1 @@ -rt in iroh_bench - Rust

    Function rt

    Source
    pub fn rt() -> Runtime
    \ No newline at end of file +rt in iroh_bench - Rust

    rt

    Function rt 

    Source
    pub fn rt() -> Runtime
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/index.html b/pr/3367/docs/iroh_bench/index.html index f3ebf533be..c32b888597 100644 --- a/pr/3367/docs/iroh_bench/index.html +++ b/pr/3367/docs/iroh_bench/index.html @@ -1 +1 @@ -iroh_bench - Rust

    Crate iroh_bench

    Source

    Modules§

    iroh
    quinn
    s2n
    stats

    Structs§

    ClientStats
    Opt

    Enums§

    Commands
    ConnectionSelector
    EndpointSelector

    Functions§

    client_handler
    Take the provided endpoint and run the client benchmark
    configure_tracing_subscriber
    rt
    \ No newline at end of file +iroh_bench - Rust

    Crate iroh_bench

    Crate iroh_bench 

    Source

    Modules§

    iroh
    quinn
    s2n
    stats

    Structs§

    ClientStats
    Opt

    Enums§

    Commands
    ConnectionSelector
    EndpointSelector

    Functions§

    client_handler
    Take the provided endpoint and run the client benchmark
    configure_tracing_subscriber
    rt
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/constant.ALPN.html b/pr/3367/docs/iroh_bench/iroh/constant.ALPN.html index 85f6bc6460..31c272bed9 100644 --- a/pr/3367/docs/iroh_bench/iroh/constant.ALPN.html +++ b/pr/3367/docs/iroh_bench/iroh/constant.ALPN.html @@ -1 +1 @@ -ALPN in iroh_bench::iroh - Rust

    Constant ALPN

    Source
    pub const ALPN: &[u8] = b"n0/iroh-bench/0";
    \ No newline at end of file +ALPN in iroh_bench::iroh - Rust

    ALPN

    Constant ALPN 

    Source
    pub const ALPN: &[u8] = b"n0/iroh-bench/0";
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/fn.client.html b/pr/3367/docs/iroh_bench/iroh/fn.client.html index ed12ae6fd5..f67e1d643d 100644 --- a/pr/3367/docs/iroh_bench/iroh/fn.client.html +++ b/pr/3367/docs/iroh_bench/iroh/fn.client.html @@ -1,6 +1,6 @@ -client in iroh_bench::iroh - Rust

    Function client

    Source
    pub async fn client(
    -    server_addr: NodeAddr,
    -    relay_url: Option<RelayUrl>,
    +client in iroh_bench::iroh - Rust

    client

    Function client 

    Source
    pub async fn client(
    +    server_addr: NodeAddr,
    +    relay_url: Option<RelayUrl>,
         opt: Opt,
     ) -> Result<ClientStats>
    Expand description

    Create and run a client

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/fn.connect_client.html b/pr/3367/docs/iroh_bench/iroh/fn.connect_client.html index 7ba597bf49..1046c5b491 100644 --- a/pr/3367/docs/iroh_bench/iroh/fn.connect_client.html +++ b/pr/3367/docs/iroh_bench/iroh/fn.connect_client.html @@ -1,6 +1,6 @@ -connect_client in iroh_bench::iroh - Rust

    Function connect_client

    Source
    pub async fn connect_client(
    -    server_addr: NodeAddr,
    -    relay_url: Option<RelayUrl>,
    +connect_client in iroh_bench::iroh - Rust

    connect_client

    Function connect_client 

    Source
    pub async fn connect_client(
    +    server_addr: NodeAddr,
    +    relay_url: Option<RelayUrl>,
         opt: Opt,
    -) -> Result<(Endpoint, Connection)>
    Expand description

    Create a client endpoint and client connection

    +) -> Result<(Endpoint, Connection)>
    Expand description

    Create a client endpoint and client connection

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/fn.handle_client_stream.html b/pr/3367/docs/iroh_bench/iroh/fn.handle_client_stream.html index 87f15a11c3..5c1a1791df 100644 --- a/pr/3367/docs/iroh_bench/iroh/fn.handle_client_stream.html +++ b/pr/3367/docs/iroh_bench/iroh/fn.handle_client_stream.html @@ -1,5 +1,5 @@ -handle_client_stream in iroh_bench::iroh - Rust

    Function handle_client_stream

    Source
    pub async fn handle_client_stream(
    -    connection: &Connection,
    +handle_client_stream in iroh_bench::iroh - Rust

    handle_client_stream

    Function handle_client_stream 

    Source
    pub async fn handle_client_stream(
    +    connection: &Connection,
         upload_size: u64,
         read_unordered: bool,
     ) -> Result<(TransferResult, TransferResult)>
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/fn.server.html b/pr/3367/docs/iroh_bench/iroh/fn.server.html index 9f9c0d203c..8d2dbb0e51 100644 --- a/pr/3367/docs/iroh_bench/iroh/fn.server.html +++ b/pr/3367/docs/iroh_bench/iroh/fn.server.html @@ -1,2 +1,2 @@ -server in iroh_bench::iroh - Rust

    Function server

    Source
    pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
    Expand description

    Take the provided endpoint and run the server

    +server in iroh_bench::iroh - Rust

    server

    Function server 

    Source
    pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
    Expand description

    Take the provided endpoint and run the server

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/fn.server_endpoint.html b/pr/3367/docs/iroh_bench/iroh/fn.server_endpoint.html index 63dca88d94..76e6d9fc56 100644 --- a/pr/3367/docs/iroh_bench/iroh/fn.server_endpoint.html +++ b/pr/3367/docs/iroh_bench/iroh/fn.server_endpoint.html @@ -1,6 +1,6 @@ -server_endpoint in iroh_bench::iroh - Rust

    Function server_endpoint

    Source
    pub fn server_endpoint(
    +server_endpoint in iroh_bench::iroh - Rust

    server_endpoint

    Function server_endpoint 

    Source
    pub fn server_endpoint(
         rt: &Runtime,
    -    relay_url: &Option<RelayUrl>,
    +    relay_url: &Option<RelayUrl>,
         opt: &Opt,
    -) -> (NodeAddr, Endpoint)
    Expand description

    Creates a server endpoint which runs on the given runtime

    +) -> (NodeAddr, Endpoint)
    Expand description

    Creates a server endpoint which runs on the given runtime

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/fn.transport_config.html b/pr/3367/docs/iroh_bench/iroh/fn.transport_config.html index 334c2fcbb7..4aa2db4300 100644 --- a/pr/3367/docs/iroh_bench/iroh/fn.transport_config.html +++ b/pr/3367/docs/iroh_bench/iroh/fn.transport_config.html @@ -1 +1 @@ -transport_config in iroh_bench::iroh - Rust

    Function transport_config

    Source
    pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig
    \ No newline at end of file +transport_config in iroh_bench::iroh - Rust

    transport_config

    Function transport_config 

    Source
    pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/iroh/index.html b/pr/3367/docs/iroh_bench/iroh/index.html index 11c893deb5..efe75832bf 100644 --- a/pr/3367/docs/iroh_bench/iroh/index.html +++ b/pr/3367/docs/iroh_bench/iroh/index.html @@ -1 +1 @@ -iroh_bench::iroh - Rust

    Module iroh

    Source

    Constants§

    ALPN

    Functions§

    client
    Create and run a client
    connect_client
    Create a client endpoint and client connection
    handle_client_stream
    server
    Take the provided endpoint and run the server
    server_endpoint
    Creates a server endpoint which runs on the given runtime
    transport_config
    \ No newline at end of file +iroh_bench::iroh - Rust

    Module iroh

    Module iroh 

    Source

    Constants§

    ALPN

    Functions§

    client
    Create and run a client
    connect_client
    Create a client endpoint and client connection
    handle_client_stream
    server
    Take the provided endpoint and run the server
    server_endpoint
    Creates a server endpoint which runs on the given runtime
    transport_config
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/quinn/constant.ALPN.html b/pr/3367/docs/iroh_bench/quinn/constant.ALPN.html index 141c6ea743..6b8c31431a 100644 --- a/pr/3367/docs/iroh_bench/quinn/constant.ALPN.html +++ b/pr/3367/docs/iroh_bench/quinn/constant.ALPN.html @@ -1 +1 @@ -ALPN in iroh_bench::quinn - Rust

    Constant ALPN

    Source
    pub const ALPN: &[u8] = b"n0/quinn-bench/0";
    \ No newline at end of file +ALPN in iroh_bench::quinn - Rust

    ALPN

    Constant ALPN 

    Source
    pub const ALPN: &[u8] = b"n0/quinn-bench/0";
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/quinn/fn.client.html b/pr/3367/docs/iroh_bench/quinn/fn.client.html index c3543396f9..d723065a44 100644 --- a/pr/3367/docs/iroh_bench/quinn/fn.client.html +++ b/pr/3367/docs/iroh_bench/quinn/fn.client.html @@ -1,4 +1,4 @@ -client in iroh_bench::quinn - Rust

    Function client

    Source
    pub async fn client(
    +client in iroh_bench::quinn - Rust

    client

    Function client 

    Source
    pub async fn client(
         server_addr: SocketAddr,
         server_cert: CertificateDer<'static>,
         opt: Opt,
    diff --git a/pr/3367/docs/iroh_bench/quinn/fn.connect_client.html b/pr/3367/docs/iroh_bench/quinn/fn.connect_client.html
    index d2f05b0eff..d528f65777 100644
    --- a/pr/3367/docs/iroh_bench/quinn/fn.connect_client.html
    +++ b/pr/3367/docs/iroh_bench/quinn/fn.connect_client.html
    @@ -1,4 +1,4 @@
    -connect_client in iroh_bench::quinn - Rust

    Function connect_client

    Source
    pub async fn connect_client(
    +connect_client in iroh_bench::quinn - Rust

    connect_client

    Function connect_client 

    Source
    pub async fn connect_client(
         server_addr: SocketAddr,
         server_cert: CertificateDer<'_>,
         opt: Opt,
    diff --git a/pr/3367/docs/iroh_bench/quinn/fn.handle_client_stream.html b/pr/3367/docs/iroh_bench/quinn/fn.handle_client_stream.html
    index 9964ee5f8a..34522de796 100644
    --- a/pr/3367/docs/iroh_bench/quinn/fn.handle_client_stream.html
    +++ b/pr/3367/docs/iroh_bench/quinn/fn.handle_client_stream.html
    @@ -1,4 +1,4 @@
    -handle_client_stream in iroh_bench::quinn - Rust

    Function handle_client_stream

    Source
    pub async fn handle_client_stream(
    +handle_client_stream in iroh_bench::quinn - Rust

    handle_client_stream

    Function handle_client_stream 

    Source
    pub async fn handle_client_stream(
         connection: &Connection,
         upload_size: u64,
         read_unordered: bool,
    diff --git a/pr/3367/docs/iroh_bench/quinn/fn.server.html b/pr/3367/docs/iroh_bench/quinn/fn.server.html
    index fd06324ce6..6c86f9d119 100644
    --- a/pr/3367/docs/iroh_bench/quinn/fn.server.html
    +++ b/pr/3367/docs/iroh_bench/quinn/fn.server.html
    @@ -1,2 +1,2 @@
    -server in iroh_bench::quinn - Rust

    Function server

    Source
    pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
    Expand description

    Take the provided endpoint and run the server

    +server in iroh_bench::quinn - Rust

    server

    Function server 

    Source
    pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>
    Expand description

    Take the provided endpoint and run the server

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/quinn/fn.server_endpoint.html b/pr/3367/docs/iroh_bench/quinn/fn.server_endpoint.html index 9d8b1adbb3..9a8de363b7 100644 --- a/pr/3367/docs/iroh_bench/quinn/fn.server_endpoint.html +++ b/pr/3367/docs/iroh_bench/quinn/fn.server_endpoint.html @@ -1,4 +1,4 @@ -server_endpoint in iroh_bench::quinn - Rust

    Function server_endpoint

    Source
    pub fn server_endpoint(
    +server_endpoint in iroh_bench::quinn - Rust

    server_endpoint

    Function server_endpoint 

    Source
    pub fn server_endpoint(
         rt: &Runtime,
         cert: CertificateDer<'static>,
         key: PrivateKeyDer<'static>,
    diff --git a/pr/3367/docs/iroh_bench/quinn/fn.transport_config.html b/pr/3367/docs/iroh_bench/quinn/fn.transport_config.html
    index b962f7753d..109f711342 100644
    --- a/pr/3367/docs/iroh_bench/quinn/fn.transport_config.html
    +++ b/pr/3367/docs/iroh_bench/quinn/fn.transport_config.html
    @@ -1 +1 @@
    -transport_config in iroh_bench::quinn - Rust

    Function transport_config

    Source
    pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig
    \ No newline at end of file +transport_config in iroh_bench::quinn - Rust

    transport_config

    Function transport_config 

    Source
    pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/quinn/index.html b/pr/3367/docs/iroh_bench/quinn/index.html index 0ad3bbafa4..1ca0cdfa0b 100644 --- a/pr/3367/docs/iroh_bench/quinn/index.html +++ b/pr/3367/docs/iroh_bench/quinn/index.html @@ -1 +1 @@ -iroh_bench::quinn - Rust

    Module quinn

    Source

    Constants§

    ALPN

    Functions§

    client
    Create and run a client
    connect_client
    Create a client endpoint and client connection
    handle_client_stream
    server
    Take the provided endpoint and run the server
    server_endpoint
    Creates a server endpoint which runs on the given runtime
    transport_config
    \ No newline at end of file +iroh_bench::quinn - Rust

    Module quinn

    Module quinn 

    Source

    Constants§

    ALPN

    Functions§

    client
    Create and run a client
    connect_client
    Create a client endpoint and client connection
    handle_client_stream
    server
    Take the provided endpoint and run the server
    server_endpoint
    Creates a server endpoint which runs on the given runtime
    transport_config
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/s2n/index.html b/pr/3367/docs/iroh_bench/s2n/index.html index 4dadc909cf..bc83bcc16a 100644 --- a/pr/3367/docs/iroh_bench/s2n/index.html +++ b/pr/3367/docs/iroh_bench/s2n/index.html @@ -1 +1 @@ -iroh_bench::s2n - Rust

    Module s2n

    Source

    Structs§

    Opt
    \ No newline at end of file +iroh_bench::s2n - Rust

    Module s2n

    Module s2n 

    Source

    Structs§

    Opt
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/s2n/struct.Opt.html b/pr/3367/docs/iroh_bench/s2n/struct.Opt.html index 9e0a5fa69a..345dbea9ba 100644 --- a/pr/3367/docs/iroh_bench/s2n/struct.Opt.html +++ b/pr/3367/docs/iroh_bench/s2n/struct.Opt.html @@ -1,6 +1,6 @@ -Opt in iroh_bench::s2n - Rust

    Struct Opt

    Source
    pub struct Opt {}

    Trait Implementations§

    Source§

    impl Args for Opt

    Source§

    fn group_id() -> Option<Id>

    Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
    Source§

    fn augment_args<'b>(__clap_app: Command) -> Command

    Append to [Command] so it can instantiate Self via +Opt in iroh_bench::s2n - Rust

    Opt

    Struct Opt 

    Source
    pub struct Opt {}

    Trait Implementations§

    Source§

    impl Args for Opt

    Source§

    fn group_id() -> Option<Id>

    Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
    Source§

    fn augment_args<'b>(__clap_app: Command) -> Command

    Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
    Source§

    fn augment_args_for_update<'b>(__clap_app: Command) -> Command

    Append to [Command] so it can instantiate self via -[FromArgMatches::update_from_arg_matches_mut] Read more
    Source§

    impl Clone for Opt

    Source§

    fn clone(&self) -> Opt

    Returns a copy 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 CommandFactory for Opt

    Source§

    fn command<'b>() -> Command

    Build a [Command] that can instantiate Self. Read more
    Source§

    fn command_for_update<'b>() -> Command

    Build a [Command] that can update self. Read more
    Source§

    impl Debug for Opt

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromArgMatches for Opt

    Source§

    fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn from_arg_matches_mut( +[FromArgMatches::update_from_arg_matches_mut] Read more

    Source§

    impl Clone for Opt

    Source§

    fn clone(&self) -> Opt

    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 CommandFactory for Opt

    Source§

    fn command<'b>() -> Command

    Build a [Command] that can instantiate Self. Read more
    Source§

    fn command_for_update<'b>() -> Command

    Build a [Command] that can update self. Read more
    Source§

    impl Debug for Opt

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromArgMatches for Opt

    Source§

    fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn update_from_arg_matches( &mut self, @@ -24,24 +24,31 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static,
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/stats/fn.throughput_bps.html b/pr/3367/docs/iroh_bench/stats/fn.throughput_bps.html index 8cdf3d7f8d..8ab039aff0 100644 --- a/pr/3367/docs/iroh_bench/stats/fn.throughput_bps.html +++ b/pr/3367/docs/iroh_bench/stats/fn.throughput_bps.html @@ -1 +1 @@ -throughput_bps in iroh_bench::stats - Rust

    Function throughput_bps

    Source
    pub fn throughput_bps(duration: Duration, size: u64) -> f64
    \ No newline at end of file +throughput_bps in iroh_bench::stats - Rust

    throughput_bps

    Function throughput_bps 

    Source
    pub fn throughput_bps(duration: Duration, size: u64) -> f64
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/stats/index.html b/pr/3367/docs/iroh_bench/stats/index.html index ed302f9b5c..47a98986f1 100644 --- a/pr/3367/docs/iroh_bench/stats/index.html +++ b/pr/3367/docs/iroh_bench/stats/index.html @@ -1 +1 @@ -iroh_bench::stats - Rust

    Module stats

    Source

    Structs§

    Stats
    StreamStats
    TransferResult

    Functions§

    throughput_bps
    \ No newline at end of file +iroh_bench::stats - Rust

    Module stats

    Module stats 

    Source

    Structs§

    Stats
    StreamStats
    TransferResult

    Functions§

    throughput_bps
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/stats/struct.Stats.html b/pr/3367/docs/iroh_bench/stats/struct.Stats.html index 07d38e6dc6..05d40a6eff 100644 --- a/pr/3367/docs/iroh_bench/stats/struct.Stats.html +++ b/pr/3367/docs/iroh_bench/stats/struct.Stats.html @@ -1,4 +1,4 @@ -Stats in iroh_bench::stats - Rust

    Struct Stats

    Source
    pub struct Stats {
    +Stats in iroh_bench::stats - Rust

    Stats

    Struct Stats 

    Source
    pub struct Stats {
         pub total_size: u64,
         pub total_duration: Duration,
         pub streams: usize,
    @@ -11,20 +11,27 @@
         class: Class,
         constructed: bool,
         tag: u32,
    -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/stats/struct.StreamStats.html b/pr/3367/docs/iroh_bench/stats/struct.StreamStats.html index 904aca1557..ba49634cf7 100644 --- a/pr/3367/docs/iroh_bench/stats/struct.StreamStats.html +++ b/pr/3367/docs/iroh_bench/stats/struct.StreamStats.html @@ -1,4 +1,4 @@ -StreamStats in iroh_bench::stats - Rust

    Struct StreamStats

    Source
    pub struct StreamStats {
    +StreamStats in iroh_bench::stats - Rust

    StreamStats

    Struct StreamStats 

    Source
    pub struct StreamStats {
         pub duration_hist: Histogram<u64>,
         pub throughput_hist: Histogram<u64>,
         pub ttfb_hist: Histogram<u64>,
    @@ -13,20 +13,27 @@
         class: Class,
         constructed: bool,
         tag: u32,
    -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/stats/struct.TransferResult.html b/pr/3367/docs/iroh_bench/stats/struct.TransferResult.html index 7ef30d6e85..7cabd8ff4c 100644 --- a/pr/3367/docs/iroh_bench/stats/struct.TransferResult.html +++ b/pr/3367/docs/iroh_bench/stats/struct.TransferResult.html @@ -1,4 +1,4 @@ -TransferResult in iroh_bench::stats - Rust

    Struct TransferResult

    Source
    pub struct TransferResult {
    +TransferResult in iroh_bench::stats - Rust

    TransferResult

    Struct TransferResult 

    Source
    pub struct TransferResult {
         pub duration: Duration,
         pub size: u64,
         pub throughput: f64,
    @@ -13,20 +13,27 @@
         class: Class,
         constructed: bool,
         tag: u32,
    -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/struct.ClientStats.html b/pr/3367/docs/iroh_bench/struct.ClientStats.html index 2cb5cc9eaf..3b438ffde5 100644 --- a/pr/3367/docs/iroh_bench/struct.ClientStats.html +++ b/pr/3367/docs/iroh_bench/struct.ClientStats.html @@ -1,4 +1,4 @@ -ClientStats in iroh_bench - Rust

    Struct ClientStats

    Source
    pub struct ClientStats { /* private fields */ }

    Implementations§

    Source§

    impl ClientStats

    Source

    pub fn print(&self, client_id: usize)

    Trait Implementations§

    Source§

    impl Default for ClientStats

    Source§

    fn default() -> ClientStats

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +ClientStats in iroh_bench - Rust

    ClientStats

    Struct ClientStats 

    Source
    pub struct ClientStats { /* private fields */ }

    Implementations§

    Source§

    impl ClientStats

    Source

    pub fn print(&self, client_id: usize)

    Trait Implementations§

    Source§

    impl Default for ClientStats

    Source§

    fn default() -> ClientStats

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -6,20 +6,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_bench/struct.Opt.html b/pr/3367/docs/iroh_bench/struct.Opt.html index 9d37356bff..94fb65ac4a 100644 --- a/pr/3367/docs/iroh_bench/struct.Opt.html +++ b/pr/3367/docs/iroh_bench/struct.Opt.html @@ -1,4 +1,4 @@ -Opt in iroh_bench - Rust

    Struct Opt

    Source
    pub struct Opt {
    +Opt in iroh_bench - Rust

    Opt

    Struct Opt 

    Source
    pub struct Opt {
         pub clients: usize,
         pub streams: usize,
         pub max_streams: usize,
    @@ -29,7 +29,7 @@ This will force all traffic over the relay and can be used to test
     throughput for relay-only traffic.

    Trait Implementations§

    Source§

    impl Args for Opt

    Source§

    fn group_id() -> Option<Id>

    Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
    Source§

    fn augment_args<'b>(__clap_app: Command) -> Command

    Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
    Source§

    fn augment_args_for_update<'b>(__clap_app: Command) -> Command

    Append to [Command] so it can instantiate self via -[FromArgMatches::update_from_arg_matches_mut] Read more
    Source§

    impl Clone for Opt

    Source§

    fn clone(&self) -> Opt

    Returns a copy 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 CommandFactory for Opt

    Source§

    fn command<'b>() -> Command

    Build a [Command] that can instantiate Self. Read more
    Source§

    fn command_for_update<'b>() -> Command

    Build a [Command] that can update self. Read more
    Source§

    impl Debug for Opt

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromArgMatches for Opt

    Source§

    fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn from_arg_matches_mut( +[FromArgMatches::update_from_arg_matches_mut] Read more

    Source§

    impl Clone for Opt

    Source§

    fn clone(&self) -> Opt

    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 CommandFactory for Opt

    Source§

    fn command<'b>() -> Command

    Build a [Command] that can instantiate Self. Read more
    Source§

    fn command_for_update<'b>() -> Command

    Build a [Command] that can update self. Read more
    Source§

    impl Debug for Opt

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromArgMatches for Opt

    Source§

    fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

    Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
    Source§

    fn update_from_arg_matches( &mut self, @@ -53,24 +53,31 @@ throughput for relay-only traffic.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/all.html b/pr/3367/docs/iroh_dns_server/all.html index a40d950f2a..4ed7e6d29e 100644 --- a/pr/3367/docs/iroh_dns_server/all.html +++ b/pr/3367/docs/iroh_dns_server/all.html @@ -1 +1 @@ -List of all items in this crate
    \ No newline at end of file +List of all items in this crate

    All

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/config/enum.BootstrapOption.html b/pr/3367/docs/iroh_dns_server/config/enum.BootstrapOption.html index aa4ca89073..f0bdc57772 100644 --- a/pr/3367/docs/iroh_dns_server/config/enum.BootstrapOption.html +++ b/pr/3367/docs/iroh_dns_server/config/enum.BootstrapOption.html @@ -1,12 +1,12 @@ -BootstrapOption in iroh_dns_server::config - Rust

    Enum BootstrapOption

    Source
    pub enum BootstrapOption {
    +BootstrapOption in iroh_dns_server::config - Rust

    BootstrapOption

    Enum BootstrapOption 

    Source
    pub enum BootstrapOption {
         Default,
         Custom(Vec<String>),
     }
    Expand description

    Configure the bootstrap servers for mainline DHT resolution.

    Variants§

    §

    Default

    Use the default bootstrap servers.

    §

    Custom(Vec<String>)

    Use custom bootstrap servers.

    -

    Trait Implementations§

    Source§

    impl Debug for BootstrapOption

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for BootstrapOption

    Source§

    fn default() -> BootstrapOption

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for BootstrapOption

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for BootstrapOption

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for BootstrapOption

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for BootstrapOption

    Source§

    fn default() -> BootstrapOption

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for BootstrapOption

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for BootstrapOption

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,21 +14,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/config/index.html b/pr/3367/docs/iroh_dns_server/config/index.html index 2581b83c16..e7294e7f3d 100644 --- a/pr/3367/docs/iroh_dns_server/config/index.html +++ b/pr/3367/docs/iroh_dns_server/config/index.html @@ -1,2 +1,2 @@ -iroh_dns_server::config - Rust

    Module config

    Source
    Expand description

    Configuration for the server

    +iroh_dns_server::config - Rust

    Module config

    Module config 

    Source
    Expand description

    Configuration for the server

    Structs§

    Config
    Server configuration
    MainlineConfig
    The config for the metrics server.
    MetricsConfig
    The config for the metrics server.
    StoreConfig
    The config for the store.

    Enums§

    BootstrapOption
    Configure the bootstrap servers for mainline DHT resolution.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/config/struct.Config.html b/pr/3367/docs/iroh_dns_server/config/struct.Config.html index ef1adeac83..4ccfedffe1 100644 --- a/pr/3367/docs/iroh_dns_server/config/struct.Config.html +++ b/pr/3367/docs/iroh_dns_server/config/struct.Config.html @@ -1,4 +1,4 @@ -Config in iroh_dns_server::config - Rust

    Struct Config

    Source
    pub struct Config {
    +Config in iroh_dns_server::config - Rust

    Config

    Struct Config 

    Source
    pub struct Config {
         pub http: Option<HttpConfig>,
         pub https: Option<HttpsConfig>,
         pub dns: DnsConfig,
    @@ -24,9 +24,9 @@ and testing.

    Implementations§

    Source§

    impl Config

    Source

    pub async fn load(path: impl AsRef<Path>) -> Result<Config>

    Load the config from a file.

    Source

    pub fn data_dir() -> Result<PathBuf>

    Get the data directory.

    Source

    pub fn signed_packet_store_path() -> Result<PathBuf>

    Get the path to the store database file.

    -

    Trait Implementations§

    Source§

    impl Debug for Config

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for Config

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for Config

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for Config

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Config

    §

    impl RefUnwindSafe for Config

    §

    impl Send for Config

    §

    impl Sync for Config

    §

    impl Unpin for Config

    §

    impl UnwindSafe for Config

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Config

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for Config

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for Config

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for Config

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Config

    §

    impl RefUnwindSafe for Config

    §

    impl Send for Config

    §

    impl Sync for Config

    §

    impl Unpin for Config

    §

    impl UnwindSafe for Config

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -34,21 +34,29 @@ and testing.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/config/struct.MainlineConfig.html b/pr/3367/docs/iroh_dns_server/config/struct.MainlineConfig.html index 5986978882..eac3c2a517 100644 --- a/pr/3367/docs/iroh_dns_server/config/struct.MainlineConfig.html +++ b/pr/3367/docs/iroh_dns_server/config/struct.MainlineConfig.html @@ -1,4 +1,4 @@ -MainlineConfig in iroh_dns_server::config - Rust

    Struct MainlineConfig

    Source
    pub struct MainlineConfig {
    +MainlineConfig in iroh_dns_server::config - Rust

    MainlineConfig

    Struct MainlineConfig 

    Source
    pub struct MainlineConfig {
         pub enabled: bool,
         pub bootstrap: Option<Vec<String>>,
     }
    Expand description

    The config for the metrics server.

    @@ -6,9 +6,9 @@
    §bootstrap: Option<Vec<String>>

    Set custom bootstrap nodes.

    Addresses can either be domain:port or ipv4:port.

    If empty this will use the default bittorrent mainline bootstrap nodes as defined by pkarr.

    -

    Trait Implementations§

    Source§

    impl Debug for MainlineConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for MainlineConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for MainlineConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for MainlineConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for MainlineConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for MainlineConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for MainlineConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for MainlineConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -16,21 +16,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/config/struct.MetricsConfig.html b/pr/3367/docs/iroh_dns_server/config/struct.MetricsConfig.html index d5bf29fc0b..f0be9963da 100644 --- a/pr/3367/docs/iroh_dns_server/config/struct.MetricsConfig.html +++ b/pr/3367/docs/iroh_dns_server/config/struct.MetricsConfig.html @@ -1,13 +1,13 @@ -MetricsConfig in iroh_dns_server::config - Rust

    Struct MetricsConfig

    Source
    pub struct MetricsConfig {
    +MetricsConfig in iroh_dns_server::config - Rust

    MetricsConfig

    Struct MetricsConfig 

    Source
    pub struct MetricsConfig {
         pub disabled: bool,
         pub bind_addr: Option<SocketAddr>,
     }
    Expand description

    The config for the metrics server.

    Fields§

    §disabled: bool

    Set to true to disable the metrics server.

    §bind_addr: Option<SocketAddr>

    Optionally set a custom address to bind to.

    Implementations§

    Source§

    impl MetricsConfig

    Source

    pub fn disabled() -> Self

    Disable the metrics server.

    -

    Trait Implementations§

    Source§

    impl Debug for MetricsConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for MetricsConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for MetricsConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for MetricsConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for MetricsConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for MetricsConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -15,21 +15,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/config/struct.StoreConfig.html b/pr/3367/docs/iroh_dns_server/config/struct.StoreConfig.html index 237e728cf3..eb2aba4d14 100644 --- a/pr/3367/docs/iroh_dns_server/config/struct.StoreConfig.html +++ b/pr/3367/docs/iroh_dns_server/config/struct.StoreConfig.html @@ -1,7 +1,7 @@ -StoreConfig in iroh_dns_server::config - Rust

    Struct StoreConfig

    Source
    pub struct StoreConfig { /* private fields */ }
    Expand description

    The config for the store.

    -

    Trait Implementations§

    Source§

    impl Clone for StoreConfig

    Source§

    fn clone(&self) -> StoreConfig

    Returns a copy 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 StoreConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for StoreConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for StoreConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for StoreConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +StoreConfig in iroh_dns_server::config - Rust

    StoreConfig

    Struct StoreConfig 

    Source
    pub struct StoreConfig { /* private fields */ }
    Expand description

    The config for the store.

    +

    Trait Implementations§

    Source§

    impl Clone for StoreConfig

    Source§

    fn clone(&self) -> StoreConfig

    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 StoreConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for StoreConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for StoreConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for StoreConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -9,25 +9,33 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/dns/index.html b/pr/3367/docs/iroh_dns_server/dns/index.html index 91c9376bf2..0016661bd1 100644 --- a/pr/3367/docs/iroh_dns_server/dns/index.html +++ b/pr/3367/docs/iroh_dns_server/dns/index.html @@ -1,2 +1,2 @@ -iroh_dns_server::dns - Rust

    Module dns

    Source
    Expand description

    Implementation of a DNS name server for iroh node announces

    +iroh_dns_server::dns - Rust

    Module dns

    Module dns 

    Source
    Expand description

    Implementation of a DNS name server for iroh node announces

    Structs§

    DnsConfig
    DNS server settings
    DnsHandler
    State for serving DNS
    DnsServer
    A DNS server that serves pkarr signed packets.
    Handle
    A handle to the channel over which the response to a DNS request will be sent
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/dns/struct.DnsConfig.html b/pr/3367/docs/iroh_dns_server/dns/struct.DnsConfig.html index 4233b2399b..2b4568d74a 100644 --- a/pr/3367/docs/iroh_dns_server/dns/struct.DnsConfig.html +++ b/pr/3367/docs/iroh_dns_server/dns/struct.DnsConfig.html @@ -1,4 +1,4 @@ -DnsConfig in iroh_dns_server::dns - Rust

    Struct DnsConfig

    Source
    pub struct DnsConfig {
    +DnsConfig in iroh_dns_server::dns - Rust

    DnsConfig

    Struct DnsConfig 

    Source
    pub struct DnsConfig {
         pub port: u16,
         pub bind_addr: Option<IpAddr>,
         pub default_soa: String,
    @@ -17,9 +17,9 @@ Uses 0.0.0.0 if unspecified.

    §rr_a: Option<Ipv4Addr>

    A record to set for all origins

    §rr_aaaa: Option<Ipv6Addr>

    AAAA record to set for all origins

    §rr_ns: Option<String>

    NS record to set for all origins

    -

    Trait Implementations§

    Source§

    impl Clone for DnsConfig

    Source§

    fn clone(&self) -> DnsConfig

    Returns a copy 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 DnsConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for DnsConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for DnsConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for DnsConfig

    Source§

    fn clone(&self) -> DnsConfig

    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 DnsConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for DnsConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for DnsConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -27,25 +27,33 @@ Uses 0.0.0.0 if unspecified.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/dns/struct.DnsHandler.html b/pr/3367/docs/iroh_dns_server/dns/struct.DnsHandler.html index d924156948..d37cc9e782 100644 --- a/pr/3367/docs/iroh_dns_server/dns/struct.DnsHandler.html +++ b/pr/3367/docs/iroh_dns_server/dns/struct.DnsHandler.html @@ -1,4 +1,4 @@ -DnsHandler in iroh_dns_server::dns - Rust

    Struct DnsHandler

    Source
    pub struct DnsHandler { /* private fields */ }
    Expand description

    State for serving DNS

    +DnsHandler in iroh_dns_server::dns - Rust

    DnsHandler

    Struct DnsHandler 

    Source
    pub struct DnsHandler { /* private fields */ }
    Expand description

    State for serving DNS

    Implementations§

    Source§

    impl DnsHandler

    Source

    pub fn new( zone_store: ZoneStore, config: &DnsConfig, @@ -6,7 +6,7 @@ ) -> Result<Self>

    Create a DNS server given some settings, a connection to the DB for DID-by-username lookups and the server DID to serve under _did.<origin>.

    Source

    pub async fn answer_request(&self, request: Request) -> Result<Bytes>

    Handle a DNS request

    -

    Trait Implementations§

    Source§

    impl Clone for DnsHandler

    Source§

    fn clone(&self) -> DnsHandler

    Returns a copy 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 DnsHandler

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl RequestHandler for DnsHandler

    Source§

    fn handle_request<'life0, 'life1, 'async_trait, R>( +

    Trait Implementations§

    Source§

    impl Clone for DnsHandler

    Source§

    fn clone(&self) -> DnsHandler

    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 DnsHandler

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl RequestHandler for DnsHandler

    Source§

    fn handle_request<'life0, 'life1, 'async_trait, R>( &'life0 self, request: &'life1 Request, response_handle: R, @@ -22,24 +22,32 @@ and the server DID to serve under _did.<origin>.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/dns/struct.DnsServer.html b/pr/3367/docs/iroh_dns_server/dns/struct.DnsServer.html index 5a4a05c530..8da4a066d4 100644 --- a/pr/3367/docs/iroh_dns_server/dns/struct.DnsServer.html +++ b/pr/3367/docs/iroh_dns_server/dns/struct.DnsServer.html @@ -1,4 +1,4 @@ -DnsServer in iroh_dns_server::dns - Rust

    Struct DnsServer

    Source
    pub struct DnsServer { /* private fields */ }
    Expand description

    A DNS server that serves pkarr signed packets.

    +DnsServer in iroh_dns_server::dns - Rust

    DnsServer

    Struct DnsServer 

    Source
    pub struct DnsServer { /* private fields */ }
    Expand description

    A DNS server that serves pkarr signed packets.

    Implementations§

    Source§

    impl DnsServer

    Source

    pub async fn spawn(config: DnsConfig, dns_handler: DnsHandler) -> Result<Self>

    Spawn the server.

    Source

    pub fn local_addr(&self) -> SocketAddr

    Get the local address of the UDP/TCP socket.

    Source

    pub async fn shutdown(self) -> Result<()>

    Shutdown the server an wait for all tasks to complete.

    @@ -12,20 +12,28 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/dns/struct.Handle.html b/pr/3367/docs/iroh_dns_server/dns/struct.Handle.html index f5e1d10899..3532ec11c3 100644 --- a/pr/3367/docs/iroh_dns_server/dns/struct.Handle.html +++ b/pr/3367/docs/iroh_dns_server/dns/struct.Handle.html @@ -1,5 +1,5 @@ -Handle in iroh_dns_server::dns - Rust

    Struct Handle

    Source
    pub struct Handle(pub Sender<Bytes>);
    Expand description

    A handle to the channel over which the response to a DNS request will be sent

    -

    Tuple Fields§

    §0: Sender<Bytes>

    Trait Implementations§

    Source§

    impl Clone for Handle

    Source§

    fn clone(&self) -> Handle

    Returns a copy 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 Handle

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl ResponseHandler for Handle

    Source§

    fn send_response<'a, 'life0, 'life1, 'async_trait>( +Handle in iroh_dns_server::dns - Rust

    Handle

    Struct Handle 

    Source
    pub struct Handle(pub Sender<Bytes>);
    Expand description

    A handle to the channel over which the response to a DNS request will be sent

    +

    Tuple Fields§

    §0: Sender<Bytes>

    Trait Implementations§

    Source§

    impl Clone for Handle

    Source§

    fn clone(&self) -> Handle

    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 Handle

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl ResponseHandler for Handle

    Source§

    fn send_response<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, response: MessageResponse<'life1, 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a>, ) -> Pin<Box<dyn Future<Output = Result<ResponseInfo>> + Send + 'async_trait>>
    where @@ -14,24 +14,32 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/http/enum.CertMode.html b/pr/3367/docs/iroh_dns_server/http/enum.CertMode.html index 8f7885484a..02b885ab27 100644 --- a/pr/3367/docs/iroh_dns_server/http/enum.CertMode.html +++ b/pr/3367/docs/iroh_dns_server/http/enum.CertMode.html @@ -1,4 +1,4 @@ -CertMode in iroh_dns_server::http - Rust

    Enum CertMode

    Source
    pub enum CertMode {
    +CertMode in iroh_dns_server::http - Rust

    CertMode

    Enum CertMode 

    Source
    pub enum CertMode {
         Manual,
         LetsEncrypt,
         SelfSigned,
    @@ -6,10 +6,10 @@
     

    Variants§

    §

    Manual

    Certs are loaded from a the cert_cache path

    §

    LetsEncrypt

    ACME with LetsEncrypt servers

    §

    SelfSigned

    Create self-signed certificates and store them in the cert_cache path

    -

    Trait Implementations§

    Source§

    impl Clone for CertMode

    Source§

    fn clone(&self) -> CertMode

    Returns a copy 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 CertMode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for CertMode

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for CertMode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for CertMode

    Source§

    fn eq(&self, other: &CertMode) -> 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 Serialize for CertMode

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for CertMode

    Source§

    impl StructuralPartialEq for CertMode

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for CertMode

    Source§

    fn clone(&self) -> CertMode

    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 CertMode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for CertMode

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for CertMode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for CertMode

    Source§

    fn eq(&self, other: &CertMode) -> 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 Serialize for CertMode

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for CertMode

    Source§

    impl StructuralPartialEq for CertMode

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -17,30 +17,40 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/http/enum.RateLimitConfig.html b/pr/3367/docs/iroh_dns_server/http/enum.RateLimitConfig.html index d1c232248f..21e9f81f29 100644 --- a/pr/3367/docs/iroh_dns_server/http/enum.RateLimitConfig.html +++ b/pr/3367/docs/iroh_dns_server/http/enum.RateLimitConfig.html @@ -1,4 +1,4 @@ -RateLimitConfig in iroh_dns_server::http - Rust

    Enum RateLimitConfig

    Source
    pub enum RateLimitConfig {
    +RateLimitConfig in iroh_dns_server::http - Rust

    RateLimitConfig

    Enum RateLimitConfig 

    Source
    pub enum RateLimitConfig {
         Disabled,
         Simple,
         Smart,
    @@ -10,9 +10,9 @@
     

    Uses headers commonly used by reverse proxies to extract the original IP address, falling back to the connection’s peer IP address. https://docs.rs/tower_governor/latest/tower_governor/key_extractor/struct.SmartIpKeyExtractor.html

    -

    Trait Implementations§

    Source§

    impl Clone for RateLimitConfig

    Source§

    fn clone(&self) -> RateLimitConfig

    Returns a copy 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 RateLimitConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for &RateLimitConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl Default for RateLimitConfig

    Source§

    fn default() -> RateLimitConfig

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for RateLimitConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for RateLimitConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for RateLimitConfig

    Source§

    fn clone(&self) -> RateLimitConfig

    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 RateLimitConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for &RateLimitConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl Default for RateLimitConfig

    Source§

    fn default() -> RateLimitConfig

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for RateLimitConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for RateLimitConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -20,25 +20,33 @@ falling back to the connection’s peer IP address. class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/http/index.html b/pr/3367/docs/iroh_dns_server/http/index.html index 3a3733c0af..07ef7fba59 100644 --- a/pr/3367/docs/iroh_dns_server/http/index.html +++ b/pr/3367/docs/iroh_dns_server/http/index.html @@ -1,2 +1,2 @@ -iroh_dns_server::http - Rust

    Module http

    Source
    Expand description

    HTTP server part of iroh-dns-server

    +iroh_dns_server::http - Rust

    Module http

    Module http 

    Source
    Expand description

    HTTP server part of iroh-dns-server

    Structs§

    HttpConfig
    Config for the HTTP server
    HttpServer
    The HTTP(S) server part of iroh-dns-server
    HttpsConfig
    Config for the HTTPS server

    Enums§

    CertMode
    The mode how SSL certificates should be created.
    RateLimitConfig
    Config for http server rate limit.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/http/struct.HttpConfig.html b/pr/3367/docs/iroh_dns_server/http/struct.HttpConfig.html index cd0b97e332..39ad0ebd70 100644 --- a/pr/3367/docs/iroh_dns_server/http/struct.HttpConfig.html +++ b/pr/3367/docs/iroh_dns_server/http/struct.HttpConfig.html @@ -1,12 +1,12 @@ -HttpConfig in iroh_dns_server::http - Rust

    Struct HttpConfig

    Source
    pub struct HttpConfig {
    +HttpConfig in iroh_dns_server::http - Rust

    HttpConfig

    Struct HttpConfig 

    Source
    pub struct HttpConfig {
         pub port: u16,
         pub bind_addr: Option<IpAddr>,
     }
    Expand description

    Config for the HTTP server

    Fields§

    §port: u16

    Port to bind to

    §bind_addr: Option<IpAddr>

    Optionally set a custom bind address (will use 0.0.0.0 if unset)

    -

    Trait Implementations§

    Source§

    impl Clone for HttpConfig

    Source§

    fn clone(&self) -> HttpConfig

    Returns a copy 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 HttpConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for HttpConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for HttpConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for HttpConfig

    Source§

    fn clone(&self) -> HttpConfig

    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 HttpConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for HttpConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for HttpConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,25 +14,33 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/http/struct.HttpServer.html b/pr/3367/docs/iroh_dns_server/http/struct.HttpServer.html index f062c949d7..667463f99b 100644 --- a/pr/3367/docs/iroh_dns_server/http/struct.HttpServer.html +++ b/pr/3367/docs/iroh_dns_server/http/struct.HttpServer.html @@ -1,4 +1,4 @@ -HttpServer in iroh_dns_server::http - Rust

    Struct HttpServer

    Source
    pub struct HttpServer { /* private fields */ }
    Expand description

    The HTTP(S) server part of iroh-dns-server

    +HttpServer in iroh_dns_server::http - Rust

    HttpServer

    Struct HttpServer 

    Source
    pub struct HttpServer { /* private fields */ }
    Expand description

    The HTTP(S) server part of iroh-dns-server

    Implementations§

    Source§

    impl HttpServer

    Source

    pub async fn spawn( http_config: Option<HttpConfig>, https_config: Option<HttpsConfig>, @@ -18,20 +18,28 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/http/struct.HttpsConfig.html b/pr/3367/docs/iroh_dns_server/http/struct.HttpsConfig.html index 044027b830..b5b7b80d8c 100644 --- a/pr/3367/docs/iroh_dns_server/http/struct.HttpsConfig.html +++ b/pr/3367/docs/iroh_dns_server/http/struct.HttpsConfig.html @@ -1,4 +1,4 @@ -HttpsConfig in iroh_dns_server::http - Rust

    Struct HttpsConfig

    Source
    pub struct HttpsConfig {
    +HttpsConfig in iroh_dns_server::http - Rust

    HttpsConfig

    Struct HttpsConfig 

    Source
    pub struct HttpsConfig {
         pub port: u16,
         pub bind_addr: Option<IpAddr>,
         pub domains: Vec<String>,
    @@ -12,9 +12,9 @@
     
    §cert_mode: CertMode

    The mode of SSL certificate creation

    §letsencrypt_contact: Option<String>

    Letsencrypt contact email address (required if using CertMode::LetsEncrypt)

    §letsencrypt_prod: Option<bool>

    Whether to use the letsenrypt production servers (only applies to CertMode::LetsEncrypt)

    -

    Trait Implementations§

    Source§

    impl Clone for HttpsConfig

    Source§

    fn clone(&self) -> HttpsConfig

    Returns a copy 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 HttpsConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for HttpsConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for HttpsConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for HttpsConfig

    Source§

    fn clone(&self) -> HttpsConfig

    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 HttpsConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for HttpsConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Serialize for HttpsConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -22,25 +22,33 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/index.html b/pr/3367/docs/iroh_dns_server/index.html index f7902d5d9b..bf9c54a0e6 100644 --- a/pr/3367/docs/iroh_dns_server/index.html +++ b/pr/3367/docs/iroh_dns_server/index.html @@ -1,2 +1,2 @@ -iroh_dns_server - Rust

    Crate iroh_dns_server

    Source
    Expand description

    A DNS server and pkarr relay

    +iroh_dns_server - Rust

    Crate iroh_dns_server

    Crate iroh_dns_server 

    Source
    Expand description

    A DNS server and pkarr relay

    Modules§

    config
    Configuration for the server
    dns
    Implementation of a DNS name server for iroh node announces
    http
    HTTP server part of iroh-dns-server
    metrics
    Metrics support for the server
    server
    The main server which combines the DNS and HTTP(S) servers.
    state
    Shared state and store for the iroh-dns-server

    Structs§

    ZoneStore
    A store for pkarr signed packets.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/metrics/index.html b/pr/3367/docs/iroh_dns_server/metrics/index.html index 6691bce6f9..f0af3e560a 100644 --- a/pr/3367/docs/iroh_dns_server/metrics/index.html +++ b/pr/3367/docs/iroh_dns_server/metrics/index.html @@ -1,2 +1,2 @@ -iroh_dns_server::metrics - Rust

    Module metrics

    Source
    Expand description

    Metrics support for the server

    +iroh_dns_server::metrics - Rust

    Module metrics

    Module metrics 

    Source
    Expand description

    Metrics support for the server

    Structs§

    Metrics
    Metrics for iroh-dns-server
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/metrics/struct.Metrics.html b/pr/3367/docs/iroh_dns_server/metrics/struct.Metrics.html index 649ecede1d..547cef47a0 100644 --- a/pr/3367/docs/iroh_dns_server/metrics/struct.Metrics.html +++ b/pr/3367/docs/iroh_dns_server/metrics/struct.Metrics.html @@ -1,4 +1,4 @@ -Metrics in iroh_dns_server::metrics - Rust

    Struct Metrics

    Source
    pub struct Metrics {
    Show 16 fields +Metrics in iroh_dns_server::metrics - Rust

    Metrics

    Struct Metrics 

    Source
    pub struct Metrics {
    Show 16 fields pub pkarr_publish_update: Counter, pub pkarr_publish_noop: Counter, pub dns_requests: Counter, @@ -40,21 +40,29 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    §

    impl<T> IntoIterable for T
    where - T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/server/fn.run_with_config_until_ctrl_c.html b/pr/3367/docs/iroh_dns_server/server/fn.run_with_config_until_ctrl_c.html index d6884d5224..89466d87ca 100644 --- a/pr/3367/docs/iroh_dns_server/server/fn.run_with_config_until_ctrl_c.html +++ b/pr/3367/docs/iroh_dns_server/server/fn.run_with_config_until_ctrl_c.html @@ -1,2 +1,2 @@ -run_with_config_until_ctrl_c in iroh_dns_server::server - Rust

    Function run_with_config_until_ctrl_c

    Source
    pub async fn run_with_config_until_ctrl_c(config: Config) -> Result<()>
    Expand description

    Spawn the server and run until the Ctrl-C signal is received, then shutdown.

    +run_with_config_until_ctrl_c in iroh_dns_server::server - Rust

    run_with_config_until_ctrl_c

    Function run_with_config_until_ctrl_c 

    Source
    pub async fn run_with_config_until_ctrl_c(config: Config) -> Result<()>
    Expand description

    Spawn the server and run until the Ctrl-C signal is received, then shutdown.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/server/index.html b/pr/3367/docs/iroh_dns_server/server/index.html index 84594e797c..7dbefe044a 100644 --- a/pr/3367/docs/iroh_dns_server/server/index.html +++ b/pr/3367/docs/iroh_dns_server/server/index.html @@ -1,2 +1,2 @@ -iroh_dns_server::server - Rust

    Module server

    Source
    Expand description

    The main server which combines the DNS and HTTP(S) servers.

    +iroh_dns_server::server - Rust

    Module server

    Module server 

    Source
    Expand description

    The main server which combines the DNS and HTTP(S) servers.

    Structs§

    Server
    The iroh-dns server.

    Functions§

    run_with_config_until_ctrl_c
    Spawn the server and run until the Ctrl-C signal is received, then shutdown.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/server/struct.Server.html b/pr/3367/docs/iroh_dns_server/server/struct.Server.html index b0965dec27..8fd3434cfc 100644 --- a/pr/3367/docs/iroh_dns_server/server/struct.Server.html +++ b/pr/3367/docs/iroh_dns_server/server/struct.Server.html @@ -1,4 +1,4 @@ -Server in iroh_dns_server::server - Rust

    Struct Server

    Source
    pub struct Server { /* private fields */ }
    Expand description

    The iroh-dns server.

    +Server in iroh_dns_server::server - Rust

    Server

    Struct Server 

    Source
    pub struct Server { /* private fields */ }
    Expand description

    The iroh-dns server.

    Implementations§

    Source§

    impl Server

    Source

    pub async fn spawn( config: Config, store: ZoneStore, @@ -21,20 +21,28 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/state/index.html b/pr/3367/docs/iroh_dns_server/state/index.html index 0bfce937f6..b74a1b2829 100644 --- a/pr/3367/docs/iroh_dns_server/state/index.html +++ b/pr/3367/docs/iroh_dns_server/state/index.html @@ -1,2 +1,2 @@ -iroh_dns_server::state - Rust

    Module state

    Source
    Expand description

    Shared state and store for the iroh-dns-server

    +iroh_dns_server::state - Rust

    Module state

    Module state 

    Source
    Expand description

    Shared state and store for the iroh-dns-server

    Structs§

    AppState
    The shared app state.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/state/struct.AppState.html b/pr/3367/docs/iroh_dns_server/state/struct.AppState.html index 609acbe3ca..fd4848e9df 100644 --- a/pr/3367/docs/iroh_dns_server/state/struct.AppState.html +++ b/pr/3367/docs/iroh_dns_server/state/struct.AppState.html @@ -1,4 +1,4 @@ -AppState in iroh_dns_server::state - Rust

    Struct AppState

    Source
    pub struct AppState {
    +AppState in iroh_dns_server::state - Rust

    AppState

    Struct AppState 

    Source
    pub struct AppState {
         pub store: ZoneStore,
         pub dns_handler: DnsHandler,
         pub metrics: Arc<Metrics>,
    @@ -6,7 +6,7 @@
     

    Fields§

    §store: ZoneStore

    The pkarr DNS store

    §dns_handler: DnsHandler

    Handler for DNS requests

    §metrics: Arc<Metrics>

    Metrics collector.

    -

    Trait Implementations§

    Source§

    impl Clone for AppState

    Source§

    fn clone(&self) -> AppState

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for AppState

    Source§

    fn clone(&self) -> AppState

    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

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,24 +14,32 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_dns_server/struct.ZoneStore.html b/pr/3367/docs/iroh_dns_server/struct.ZoneStore.html index 46e1d8c1e5..e778504c7b 100644 --- a/pr/3367/docs/iroh_dns_server/struct.ZoneStore.html +++ b/pr/3367/docs/iroh_dns_server/struct.ZoneStore.html @@ -1,4 +1,4 @@ -ZoneStore in iroh_dns_server - Rust

    Struct ZoneStore

    Source
    pub struct ZoneStore { /* private fields */ }
    Expand description

    A store for pkarr signed packets.

    +ZoneStore in iroh_dns_server - Rust

    ZoneStore

    Struct ZoneStore 

    Source
    pub struct ZoneStore { /* private fields */ }
    Expand description

    A store for pkarr signed packets.

    Packets are stored in the persistent SignedPacketStore, and cached on-demand in an in-memory LRU cache used for resolving DNS queries.

    Implementations§

    Source§

    impl ZoneStore

    Source

    pub fn persistent( @@ -15,7 +15,7 @@ cache used for resolving DNS queries.

    Optionally set custom bootstrap nodes. If bootstrap is empty it will use the default mainline bootstrap nodes.

    Source

    pub fn new(store: SignedPacketStore, metrics: Arc<Metrics>) -> Self

    Create a new zone store.

    -
    Source

    pub async fn resolve( +

    Source

    pub async fn resolve( &self, pubkey: &PublicKeyBytes, name: &Name, @@ -32,7 +32,7 @@ mainline bootstrap nodes.

    ) -> Result<bool>

    Insert a signed packet into the cache and the store.

    Returns whether this produced an update, i.e. whether the packet is the newest for its pubkey.

    -

    Trait Implementations§

    Source§

    impl Clone for ZoneStore

    Source§

    fn clone(&self) -> ZoneStore

    Returns a copy 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 ZoneStore

    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 +

    Trait Implementations§

    Source§

    impl Clone for ZoneStore

    Source§

    fn clone(&self) -> ZoneStore

    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 ZoneStore

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -40,24 +40,32 @@ pubkey.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    §

    impl<T> FromRef<T> for T
    where T: Clone,

    §

    fn from_ref(input: &T) -> T

    Converts to this type from a reference to the input type.
    §

    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).

    +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> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> IntoRequest<T> for T

    §

    fn into_request(self) -> Request<T>

    Wrap the input message T in a tonic::Request
    §

    impl<L> LayerExt<L> for L

    §

    fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
    where + L: Layer<S>,

    Applies the layer to a service and wraps it in [Layered].
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/all.html b/pr/3367/docs/iroh_relay/all.html index 1ac642f8c8..e7393d9095 100644 --- a/pr/3367/docs/iroh_relay/all.html +++ b/pr/3367/docs/iroh_relay/all.html @@ -1 +1 @@ -List of all items in this crate

    List of all items

    Structs

    Enums

    Traits

    Functions

    Constants

    \ No newline at end of file +List of all items in this crate

    All

    List of all items

    Structs

    Enums

    Traits

    Functions

    Type Aliases

    Constants

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/conn/enum.ReceivedMessage.html b/pr/3367/docs/iroh_relay/client/conn/enum.ReceivedMessage.html deleted file mode 100644 index b181ea3c8c..0000000000 --- a/pr/3367/docs/iroh_relay/client/conn/enum.ReceivedMessage.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

    Redirecting to ../../../iroh_relay/client/enum.ReceivedMessage.html...

    - - - \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/conn/enum.SendMessage.html b/pr/3367/docs/iroh_relay/client/conn/enum.SendMessage.html deleted file mode 100644 index bd0115cfd4..0000000000 --- a/pr/3367/docs/iroh_relay/client/conn/enum.SendMessage.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - Redirection - - -

    Redirecting to ../../../iroh_relay/client/enum.SendMessage.html...

    - - - \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/enum.ConnectError.html b/pr/3367/docs/iroh_relay/client/enum.ConnectError.html index 33d0155ffe..51b86c8e91 100644 --- a/pr/3367/docs/iroh_relay/client/enum.ConnectError.html +++ b/pr/3367/docs/iroh_relay/client/enum.ConnectError.html @@ -1,11 +1,11 @@ -ConnectError in iroh_relay::client - Rust

    Enum ConnectError

    Source
    #[non_exhaustive]
    pub enum ConnectError { +ConnectError in iroh_relay::client - Rust

    ConnectError

    Enum ConnectError 

    Source
    #[non_exhaustive]
    pub enum ConnectError { InvalidWebsocketUrl { - url: Url, + url: Url, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, InvalidRelayUrl { - url: Url, + url: Url, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, @@ -15,7 +15,7 @@ span_trace: SpanTrace, }, Handshake { - source: SendError, + source: Error, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, @@ -50,11 +50,11 @@ }
    Expand description

    Connection errors.

    ConnectError contains DialError, errors that can occur while dialing the relay, as well as errors that occur while creating or maintaining a connection.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidWebsocketUrl

    Fields

    §url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidRelayUrl

    Fields

    §url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Websocket

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Handshake

    Fields

    §source: SendError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Dial

    Fields

    §source: DialError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnexpectedUpgradeStatus

    Fields

    §code: StatusCode
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Upgrade

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidTlsServername

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoLocalAddr

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Tls

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for ConnectError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for ConnectError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for ConnectError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ConnectError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidWebsocketUrl

    Fields

    §url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidRelayUrl

    Fields

    §url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Websocket

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Handshake

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Dial

    Fields

    §source: DialError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnexpectedUpgradeStatus

    Fields

    §code: StatusCode
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Upgrade

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidTlsServername

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoLocalAddr

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Tls

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for ConnectError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for ConnectError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for ConnectError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ConnectError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DialError> for ConnectError

    Source§

    fn from(error: DialError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SendError> for ConnectError

    Source§

    fn from(error: SendRelayError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DialError> for ConnectError

    Source§

    fn from(error: DialError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for ConnectError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -65,22 +65,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/enum.DialError.html b/pr/3367/docs/iroh_relay/client/enum.DialError.html index baaf3b0158..1f0bad9474 100644 --- a/pr/3367/docs/iroh_relay/client/enum.DialError.html +++ b/pr/3367/docs/iroh_relay/client/enum.DialError.html @@ -1,4 +1,4 @@ -DialError in iroh_relay::client - Rust

    Enum DialError

    Source
    #[non_exhaustive]
    pub enum DialError { +DialError in iroh_relay::client - Rust

    DialError

    Enum DialError 

    Source
    #[non_exhaustive]
    pub enum DialError { InvalidTargetPort { backtrace: Option<Backtrace>, span_trace: SpanTrace, @@ -19,7 +19,7 @@ span_trace: SpanTrace, }, InvalidUrl { - url: Url, + url: Url, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, @@ -29,7 +29,7 @@ span_trace: SpanTrace, }, ProxyInvalidUrl { - proxy_url: Url, + proxy_url: Url, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, @@ -48,11 +48,11 @@ span_trace: SpanTrace, }, }
    Expand description

    Errors that can occur while dialing the relay server.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidTargetPort

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Dns

    Available on non-wasm_browser only.

    Fields

    §source: DnsError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Timeout

    Fields

    §source: Elapsed
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Io

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidUrl

    Fields

    §url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyConnectInvalidStatus

    Fields

    §status: StatusCode
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyInvalidUrl

    Fields

    §proxy_url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyConnect

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyInvalidTlsServername

    Fields

    §proxy_hostname: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyInvalidTargetPort

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DialError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for DialError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for DialError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DialError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidTargetPort

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Dns

    Available on non-wasm_browser only.

    Fields

    §source: DnsError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Timeout

    Fields

    §source: Elapsed
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Io

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidUrl

    Fields

    §url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyConnectInvalidStatus

    Fields

    §status: StatusCode
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyInvalidUrl

    Fields

    §proxy_url: Url
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyConnect

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyInvalidTlsServername

    Fields

    §proxy_hostname: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProxyInvalidTargetPort

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DialError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for DialError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for DialError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DialError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DialError> for ConnectError

    Source§

    fn from(error: DialError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<DnsError> for DialError

    Source§

    fn from(error: DnsError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Elapsed> for DialError

    Source§

    fn from(error: Elapsed) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for DialError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DialError> for ConnectError

    Source§

    fn from(error: DialError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<DnsError> for DialError

    Source§

    fn from(error: DnsError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Elapsed> for DialError

    Source§

    fn from(error: Elapsed) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for DialError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -63,22 +63,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3367/docs/iroh_relay/client/enum.ReceivedMessage.html deleted file mode 100644 index 7c862d05b7..0000000000 --- a/pr/3367/docs/iroh_relay/client/enum.ReceivedMessage.html +++ /dev/null @@ -1,70 +0,0 @@ -ReceivedMessage in iroh_relay::client - Rust

    Enum ReceivedMessage

    Source
    pub enum ReceivedMessage {
    -    ReceivedPacket {
    -        remote_node_id: NodeId,
    -        data: Bytes,
    -    },
    -    NodeGone(NodeId),
    -    Ping([u8; 8]),
    -    Pong([u8; 8]),
    -    KeepAlive,
    -    Health {
    -        problem: Option<String>,
    -    },
    -    ServerRestarting {
    -        reconnect_in: Duration,
    -        try_for: Duration,
    -    },
    -}
    Expand description

    The messages received from a framed relay stream.

    -

    This is a type-validated version of the Frames on the RelayCodec.

    -

    Variants§

    §

    ReceivedPacket

    Represents an incoming packet.

    -

    Fields

    §remote_node_id: NodeId

    The NodeId of the packet sender.

    -
    §data: Bytes

    The received packet bytes.

    -
    §

    NodeGone(NodeId)

    Indicates that the client identified by the underlying public key had previously sent you a -packet but has now disconnected from the server.

    -
    §

    Ping([u8; 8])

    Request from a client or server to reply to the -other side with a ReceivedMessage::Pong with the given payload.

    -
    §

    Pong([u8; 8])

    Reply to a ReceivedMessage::Ping from a client or server -with the payload sent previously in the ping.

    -
    §

    KeepAlive

    A one-way empty message from server to client, just to -keep the connection alive. It’s like a ReceivedMessage::Ping, but doesn’t solicit -a reply from the client.

    -
    §

    Health

    A one-way message from server to client, declaring the connection health state.

    -

    Fields

    §problem: Option<String>

    If set, is a description of why the connection is unhealthy.

    -

    If None means the connection is healthy again.

    -

    The default condition is healthy, so the server doesn’t broadcast a ReceivedMessage::Health -until a problem exists.

    -
    §

    ServerRestarting

    A one-way message from server to client, advertising that the server is restarting.

    -

    Fields

    §reconnect_in: Duration

    An advisory duration that the client should wait before attempting to reconnect. -It might be zero. It exists for the server to smear out the reconnects.

    -
    §try_for: Duration

    An advisory duration for how long the client should attempt to reconnect -before giving up and proceeding with its normal connection failure logic. The interval -between retries is undefined for now. A server should not send a TryFor duration more -than a few seconds.

    -

    Trait Implementations§

    Source§

    impl Clone for ReceivedMessage

    Source§

    fn clone(&self) -> ReceivedMessage

    Returns a copy 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 ReceivedMessage

    Source§

    fn fmt(&self, __derive_more_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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/enum.RecvError.html b/pr/3367/docs/iroh_relay/client/enum.RecvError.html index 4778ceb2bb..c93869e1c4 100644 --- a/pr/3367/docs/iroh_relay/client/enum.RecvError.html +++ b/pr/3367/docs/iroh_relay/client/enum.RecvError.html @@ -1,40 +1,20 @@ -RecvError in iroh_relay::client - Rust

    Enum RecvError

    Source
    #[non_exhaustive]
    pub enum RecvError { - Io { - source: Error, +RecvError in iroh_relay::client - Rust

    RecvError

    Enum RecvError 

    Source
    #[non_exhaustive]
    pub enum RecvError { + Protocol { + source: Error, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, - ProtocolSend { - source: SendError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - ProtocolRecv { - source: RecvError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - Websocket { + StreamError { source: Error, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, - InvalidProtocolMessageEncoding { - source: Utf8Error, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - UnexpectedFrame { - frame_type: FrameType, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, }
    Expand description

    Errors when receiving messages from the relay server.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Io

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProtocolSend

    Fields

    §source: SendError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ProtocolRecv

    Fields

    §source: RecvError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Websocket

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidProtocolMessageEncoding

    Fields

    §source: Utf8Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnexpectedFrame

    Fields

    §frame_type: FrameType
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for RecvError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RecvError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for RecvError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RecvError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Protocol

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    StreamError

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for RecvError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RecvError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for RecvError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RecvError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RecvError> for RecvError

    Source§

    fn from(error: RecvRelayError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SendError> for RecvError

    Source§

    fn from(error: SendRelayError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: ProtoError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -45,22 +25,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/enum.SendError.html b/pr/3367/docs/iroh_relay/client/enum.SendError.html index f747251246..1b3f43b08e 100644 --- a/pr/3367/docs/iroh_relay/client/enum.SendError.html +++ b/pr/3367/docs/iroh_relay/client/enum.SendError.html @@ -1,10 +1,5 @@ -SendError in iroh_relay::client - Rust

    Enum SendError

    Source
    #[non_exhaustive]
    pub enum SendError { - RelayIo { - source: Error, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - WebsocketIo { +SendError in iroh_relay::client - Rust

    SendError

    Enum SendError 

    Source
    #[non_exhaustive]
    pub enum SendError { + StreamError { source: Error, backtrace: Option<Backtrace>, span_trace: SpanTrace, @@ -14,12 +9,16 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, + EmptyPacket { + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, }
    Expand description

    Error for sending messages to the relay server.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    RelayIo

    Available on non-wasm_browser only.

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    WebsocketIo

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ExceedsMaxPacketSize

    Fields

    §size: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SendError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SendError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SendError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SendError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    StreamError

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ExceedsMaxPacketSize

    Fields

    §size: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    EmptyPacket

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SendError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SendError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SendError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SendError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Error> for SendError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for SendError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SendError> for SendError

    Source§

    fn from(error: ConnSendError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<Error> for SendError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -30,22 +29,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/enum.SendMessage.html b/pr/3367/docs/iroh_relay/client/enum.SendMessage.html deleted file mode 100644 index e07368647b..0000000000 --- a/pr/3367/docs/iroh_relay/client/enum.SendMessage.html +++ /dev/null @@ -1,61 +0,0 @@ -SendMessage in iroh_relay::client - Rust

    Enum SendMessage

    Source
    pub enum SendMessage {
    -    SendPacket(NodeId, Bytes),
    -    Ping([u8; 8]),
    -    Pong([u8; 8]),
    -}
    Expand description

    Messages we can send to a relay server.

    -

    Variants§

    §

    SendPacket(NodeId, Bytes)

    Send a packet of data to the NodeId.

    -
    §

    Ping([u8; 8])

    Sends a ping message to the connected relay server.

    -
    §

    Pong([u8; 8])

    Sends a pong message to the connected relay server.

    -

    Trait Implementations§

    Source§

    impl Debug for SendMessage

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Sink<SendMessage> for Client

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( - self: Pin<&mut Self>, - item: SendMessage, -) -> Result<(), Self::Error>

    Begin the process of sending a value to the sink. -Each call to this function must be preceded by a successful call to -poll_ready which returned Poll::Ready(Ok(())). Read more
    Source§

    fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. Read more
    Source§

    impl Sink<SendMessage> for ClientSink

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( - self: Pin<&mut Self>, - item: SendMessage, -) -> Result<(), Self::Error>

    Begin the process of sending a value to the sink. -Each call to this function must be preceded by a successful call to -poll_ready which returned Poll::Ready(Ok(())). Read more
    Source§

    fn poll_flush( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( - self: Pin<&mut Self>, - cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/fn.make_dangerous_client_config.html b/pr/3367/docs/iroh_relay/client/fn.make_dangerous_client_config.html index 426fec6185..fcf1947b05 100644 --- a/pr/3367/docs/iroh_relay/client/fn.make_dangerous_client_config.html +++ b/pr/3367/docs/iroh_relay/client/fn.make_dangerous_client_config.html @@ -1,3 +1,3 @@ -make_dangerous_client_config in iroh_relay::client - Rust

    Function make_dangerous_client_config

    Source
    pub fn make_dangerous_client_config() -> ClientConfig
    Available on crate feature test-utils only.
    Expand description

    Creates a client config that trusts any servers without verifying their TLS certificate.

    +make_dangerous_client_config in iroh_relay::client - Rust

    make_dangerous_client_config

    Function make_dangerous_client_config 

    Source
    pub fn make_dangerous_client_config() -> ClientConfig
    Available on crate features test-utils only.
    Expand description

    Creates a client config that trusts any servers without verifying their TLS certificate.

    Should be used for testing local relay setups only.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/index.html b/pr/3367/docs/iroh_relay/client/index.html index 25184b641f..03cfb3898e 100644 --- a/pr/3367/docs/iroh_relay/client/index.html +++ b/pr/3367/docs/iroh_relay/client/index.html @@ -1,3 +1,3 @@ -iroh_relay::client - Rust

    Module client

    Source
    Expand description

    Exposes Client, which allows to establish connections to a relay server.

    +iroh_relay::client - Rust

    Module client

    Module client 

    Source
    Expand description

    Exposes Client, which allows to establish connections to a relay server.

    Based on tailscale/derp/derphttp/derphttp_client.go

    -

    Structs§

    Client
    A relay client.
    ClientBuilder
    Build a Client.
    ClientSink
    The send half of a relay client.
    ClientStream
    The receive half of a relay client.

    Enums§

    ConnectError
    Connection errors.
    DialError
    Errors that can occur while dialing the relay server.
    ReceivedMessage
    The messages received from a framed relay stream.
    RecvError
    Errors when receiving messages from the relay server.
    SendError
    Error for sending messages to the relay server.
    SendMessage
    Messages we can send to a relay server.

    Functions§

    make_dangerous_client_configtest-utils
    Creates a client config that trusts any servers without verifying their TLS certificate.
    \ No newline at end of file +

    Structs§

    Client
    A relay client.
    ClientBuilder
    Build a Client.
    ClientSink
    The send half of a relay client.
    ClientStream
    The receive half of a relay client.

    Enums§

    ConnectError
    Connection errors.
    DialError
    Errors that can occur while dialing the relay server.
    RecvError
    Errors when receiving messages from the relay server.
    SendError
    Error for sending messages to the relay server.

    Functions§

    make_dangerous_client_configtest-utils
    Creates a client config that trusts any servers without verifying their TLS certificate.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/sidebar-items.js b/pr/3367/docs/iroh_relay/client/sidebar-items.js index 434a927e0c..099d35e474 100644 --- a/pr/3367/docs/iroh_relay/client/sidebar-items.js +++ b/pr/3367/docs/iroh_relay/client/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"enum":["ConnectError","DialError","ReceivedMessage","RecvError","SendError","SendMessage"],"fn":["make_dangerous_client_config"],"struct":["Client","ClientBuilder","ClientSink","ClientStream"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"enum":["ConnectError","DialError","RecvError","SendError"],"fn":["make_dangerous_client_config"],"struct":["Client","ClientBuilder","ClientSink","ClientStream"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/struct.Client.html b/pr/3367/docs/iroh_relay/client/struct.Client.html index 6518f4da56..9c68b7e38e 100644 --- a/pr/3367/docs/iroh_relay/client/struct.Client.html +++ b/pr/3367/docs/iroh_relay/client/struct.Client.html @@ -1,20 +1,20 @@ -Client in iroh_relay::client - Rust

    Struct Client

    Source
    pub struct Client { /* private fields */ }
    Expand description

    A relay client.

    -

    Implementations§

    Source§

    impl Client

    Source

    pub fn split(self) -> (ClientStream, ClientSink)

    Splits the client into a sink and a stream.

    -

    Trait Implementations§

    Source§

    impl Debug for Client

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Sink<SendMessage> for Client

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( +Client in iroh_relay::client - Rust

    Client

    Struct Client 

    Source
    pub struct Client { /* private fields */ }
    Expand description

    A relay client.

    +

    Implementations§

    Source§

    impl Client

    Source

    pub fn split(self) -> (ClientStream, ClientSink)

    Splits the client into a sink and a stream.

    +

    Trait Implementations§

    Source§

    impl Debug for Client

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Sink<ClientToRelayMsg> for Client

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( +) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( self: Pin<&mut Self>, - item: SendMessage, + item: ClientToRelayMsg, ) -> Result<(), Self::Error>

    Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to -poll_ready which returned Poll::Ready(Ok(())). Read more
    Source§

    fn poll_flush( +poll_ready which returned Poll::Ready(Ok(())). Read more

    Source§

    fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. Read more

    Source§

    impl Stream for Client

    Source§

    type Item = Result<ReceivedMessage, RecvError>

    Values yielded by the stream.
    Source§

    fn poll_next( +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. Read more
    Source§

    impl Stream for Client

    Source§

    type Item = Result<RelayToClientMsg, RecvError>

    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 @@ -27,9 +27,9 @@ current task for wakeup if the value is not yet available, and returning class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> BufferedStreamExt for T
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> BufferedStreamExt for T
    where T: Stream + ?Sized,

    §

    fn buffered_ordered(self, n: usize) -> BufferedOrdered<Self>
    where Self::Item: Future, Self: Sized,

    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn buffered_unordered(self, n: usize) -> BufferUnordered<Self>
    where @@ -48,14 +48,21 @@ available. Read more

    Sized,
    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn try_buffered_unordered(self, n: usize) -> TryBufferUnordered<Self>
    where Self::Ok: TryFuture<Err = Self::Err>, - Self: Sized,

    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + Self: Sized,
    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    §

    impl<T, Item> SinkExt<Item> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    §

    impl<T, Item> SinkExt<Item> for T
    where T: Sink<Item> + ?Sized,

    §

    fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
    where F: FnMut(U) -> Fut, Fut: Future<Output = Result<Item, E>>, @@ -68,7 +75,7 @@ available. Read more

    Sized,
    Transforms the error returned by the sink.
    §

    fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
    where Self: Sized, Self::Error: Into<E>,

    Map this sink’s error to a different error type using the Into trait. Read more
    §

    fn buffer(self, capacity: usize) -> Buffer<Self, Item>
    where - Self: Sized,

    Available on crate feature alloc only.
    Adds a fixed-size buffer to the current sink. Read more
    §

    fn close(&mut self) -> Close<'_, Self, Item>
    where + Self: Sized,

    Adds a fixed-size buffer to the current sink. Read more
    §

    fn close(&mut self) -> Close<'_, Self, Item>
    where Self: Unpin,

    Close the sink.
    §

    fn fanout<Si>(self, other: Si) -> Fanout<Self, Si>
    where Self: Sized, Item: Clone, @@ -103,22 +110,7 @@ sink types.

    < cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
    where Self: Unpin,
    A convenience method for calling [Sink::poll_close] on Unpin -sink types.
    §

    impl<Item, S> SinkRateLimitExt<Item, S> for S
    where - S: Sink<Item>,

    §

    fn ratelimit_sink<D, C, MW>( - self, - limiter: &RateLimiter<NotKeyed, D, C, MW>, -) -> RatelimitedSink<'_, Item, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant, NegativeOutcome = NotUntil<<C as Clock>::Instant>>,

    Limits the rate at which items can be put into the current sink.
    §

    fn ratelimit_sink_with_jitter<D, C, MW>( - self, - limiter: &RateLimiter<NotKeyed, D, C, MW>, - jitter: Jitter, -) -> RatelimitedSink<'_, Item, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant, NegativeOutcome = NotUntil<<C as Clock>::Instant>>,

    Available on crate feature jitter only.
    Limits the rate at which items can be put into the current sink, with a randomized wait -period.
    §

    impl<S> StreamExt for S
    where +sink types.

    §

    impl<S> StreamExt for S
    where S: Stream + ?Sized,

    §

    fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
    where Self: Unpin,

    A convenience for calling [Stream::poll_next()] on !Unpin types.
    §

    fn next(&mut self) -> NextFuture<'_, Self>
    where Self: Unpin,

    Retrieves the next item in the stream. Read more
    §

    fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self>
    where @@ -200,9 +192,9 @@ period.

    Sized, S: Stream<Item = Self::Item>,
    Merges with other stream, preferring items from self whenever both streams are ready. Read more
    §

    fn race<S>(self, other: S) -> Race<Self, S>
    where Self: Sized, - S: Stream<Item = Self::Item>,

    Available on crate features std and race only.
    Merges with other stream, with no preference for either stream when both are ready. Read more
    §

    fn drain(&mut self) -> Drain<'_, Self>

    Yields all immediately available values from a stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the stream and changes its type to dyn Stream + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the stream and changes its type to dyn Stream + 'a. Read more
    §

    impl<T> StreamExt for T
    where + S: Stream<Item = Self::Item>,

    Merges with other stream, with no preference for either stream when both are ready. Read more
    §

    fn drain(&mut self) -> Drain<'_, Self>

    Yields all immediately available values from a stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the stream and changes its type to dyn Stream + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where + Self: Sized + 'a,

    Boxes the stream and changes its type to dyn Stream + 'a. Read more
    §

    impl<T> StreamExt for T
    where T: Stream + ?Sized,

    §

    fn next(&mut self) -> Next<'_, Self>
    where Self: Unpin,

    Creates a future that resolves to the next item in the stream. Read more
    §

    fn into_future(self) -> StreamFuture<Self>
    where Self: Sized + Unpin,

    Converts this stream into a future of (next_item, tail_of_stream). @@ -252,7 +244,7 @@ collecting all the values into one final result. Read more
    Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
    where Self::Item: Stream + Unpin, - Self: Sized,
    Available on crate feature alloc only.
    Flattens a stream of streams into just one continuous stream. Polls + Self: Sized,
    Flattens a stream of streams into just one continuous stream. Polls inner streams produced by the base stream concurrently. Read more
    §

    fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
    where F: FnMut(Self::Item) -> U, U: Stream, @@ -263,7 +255,7 @@ inner streams produced by the base stream concurrently. Read more
    where U: Stream + Unpin, F: FnMut(Self::Item) -> U, - Self: Sized,

    Available on crate feature alloc only.
    Maps a stream like [StreamExt::map] but flattens nested Streams + Self: Sized,
    Maps a stream like [StreamExt::map] but flattens nested Streams and polls them concurrently, yielding items in any order, as they made available. Read more
    §

    fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
    where F: FnMut(&mut S, Self::Item) -> Fut, @@ -290,7 +282,7 @@ closure for each element on the stream. Read more

    where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, - Self: Sized,
    Available on crate feature alloc only.
    Runs this stream to completion, executing the provided asynchronous + Self: Sized,
    Runs this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available. Read more
    §

    fn take(self, n: usize) -> Take<Self>
    where Self: Sized,

    Creates a new stream of at most n items of the underlying stream. Read more
    §

    fn skip(self, n: usize) -> Skip<Self>
    where @@ -298,24 +290,24 @@ available. Read more

    Sized,
    Fuse a stream such that poll_next will never again be called once it has finished. This method can be used to turn any Stream into a FusedStream. Read more
    §

    fn by_ref(&mut self) -> &mut Self

    Borrows a stream, rather than consuming it. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches unwinding panics while polling the stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Wrap the stream in a Box, pinning it. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Wrap the stream in a Box, pinning it. Read more
    §

    fn buffered(self, n: usize) -> Buffered<Self>
    where + Self: Sized + UnwindSafe,

    Catches unwinding panics while polling the stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Wrap the stream in a Box, pinning it. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where + Self: Sized + 'a,

    Wrap the stream in a Box, pinning it. Read more
    §

    fn buffered(self, n: usize) -> Buffered<Self>
    where Self::Item: Future, - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
    where + Self: Sized,

    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
    where Self::Item: Future, - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    fn zip<St>(self, other: St) -> Zip<Self, St>
    where + Self: Sized,

    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    fn zip<St>(self, other: St) -> Zip<Self, St>
    where St: Stream, Self: Sized,

    An adapter for zipping two streams together. Read more
    §

    fn chain<St>(self, other: St) -> Chain<Self, St>
    where St: Stream<Item = Self::Item>, Self: Sized,

    Adapter for chaining two streams. Read more
    §

    fn peekable(self) -> Peekable<Self>
    where Self: Sized,

    Creates a new stream which exposes a peek method. Read more
    §

    fn chunks(self, capacity: usize) -> Chunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up items of the stream inside a vector. Read more
    §

    fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up ready items of the stream inside a vector. Read more
    §

    fn forward<S>(self, sink: S) -> Forward<Self, S>
    where + Self: Sized,

    An adaptor for chunking up items of the stream inside a vector. Read more
    §

    fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
    where + Self: Sized,

    An adaptor for chunking up ready items of the stream inside a vector. Read more
    §

    fn forward<S>(self, sink: S) -> Forward<Self, S>
    where S: Sink<Self::Ok, Error = Self::Error>, - Self: Sized + TryStream,

    Available on crate feature sink only.
    A future that completes after the given stream has been fully processed + Self: Sized + TryStream,
    A future that completes after the given stream has been fully processed into the sink and the sink has been flushed and closed. Read more
    §

    fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
    where - Self: Sized + Sink<Item>,

    Available on crate features sink and alloc only.
    Splits this Stream + Sink object into separate Sink and Stream + Self: Sized + Sink<Item>,
    Splits this Stream + Sink object into separate Sink and Stream objects. Read more
    §

    fn inspect<F>(self, f: F) -> Inspect<Self, F>
    where F: FnMut(&Self::Item), Self: Sized,

    Do something with each item of this stream, afterwards passing it on. Read more
    §

    fn left_stream<B>(self) -> Either<Self, B>
    where @@ -328,23 +320,9 @@ of that Either. Read more

    Unpin,
    A convenience method for calling [Stream::poll_next] on Unpin stream types.
    §

    fn select_next_some(&mut self) -> SelectNextSome<'_, Self>
    where Self: Unpin + FusedStream,

    Returns a Future that resolves when the next item in this stream is -ready. Read more
    §

    impl<'a, S> StreamRateLimitExt<'a> for S
    where - S: Stream,

    §

    fn ratelimit_stream<D, C, MW>( - self, - limiter: &'a RateLimiter<NotKeyed, D, C, MW>, -) -> RatelimitedStream<'a, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant>,

    Limits the rate at which the stream produces items. Read more
    §

    fn ratelimit_stream_with_jitter<D, C, MW>( - self, - limiter: &'a RateLimiter<NotKeyed, D, C, MW>, - jitter: Jitter, -) -> RatelimitedStream<'a, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant>,

    Limits the rate at which the stream produces items, with a randomized wait period. 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 +ready. 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<'_>, @@ -396,14 +374,14 @@ resolves to true. Read more

    where F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = Result<(), Self::Error>>, - Self: Sized,
    Available on crate feature alloc only.
    Attempts to run this stream to completion, executing the provided asynchronous + Self: Sized,
    Attempts to run this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available, exiting as soon as an error occurs. Read more
    §

    fn try_collect<C>(self) -> TryCollect<Self, C>
    where C: Default + Extend<Self::Ok>, Self: Sized,

    Attempt to transform a stream into a collection, returning a future representing the result of that computation. Read more
    §

    fn try_chunks(self, capacity: usize) -> TryChunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up successful items of the stream inside a vector. Read more
    §

    fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up successful, ready items of the stream inside a vector. Read more
    §

    fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
    where + Self: Sized,

    An adaptor for chunking up successful items of the stream inside a vector. Read more
    §

    fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>
    where + Self: Sized,

    An adaptor for chunking up successful, ready items of the stream inside a vector. Read more
    §

    fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
    where Fut: Future<Output = bool>, F: FnMut(&Self::Ok) -> Fut, Self: Sized,

    Attempt to filter the values produced by this stream according to the @@ -418,7 +396,7 @@ provided asynchronous closure. Read more
    where Self::Ok: TryStream + Unpin, <Self::Ok as TryStream>::Error: From<Self::Error>, - Self: Sized,
    Available on crate feature alloc only.
    Flattens a stream of streams into just one continuous stream. Produced streams + Self: Sized,
    Flattens a stream of streams into just one continuous stream. Produced streams will be polled concurrently and any errors will be passed through without looking at them. If the underlying base stream returns an error, it will be immediately propagated. Read more
    §

    fn try_flatten(self) -> TryFlatten<Self>
    where Self::Ok: TryStream, @@ -432,16 +410,16 @@ stream, collecting all the values into one final result. Read more
    < Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,

    Attempt to concatenate all items of a stream into a single extendable destination, returning a future representing the end result. Read more
    §

    fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>
    where Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

    Available on crate feature alloc only.
    Attempt to execute several futures from a stream concurrently (unordered). Read more
    §

    fn try_buffered(self, n: usize) -> TryBuffered<Self>
    where + Self: Sized,

    Attempt to execute several futures from a stream concurrently (unordered). Read more
    §

    fn try_buffered(self, n: usize) -> TryBuffered<Self>
    where Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

    Available on crate feature alloc only.
    Attempt to execute several futures from a stream concurrently. Read more
    §

    fn try_poll_next_unpin( + Self: Sized,

    Attempt to execute several futures from a stream concurrently. Read more
    §

    fn try_poll_next_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Option<Result<Self::Ok, Self::Error>>>
    where Self: Unpin,

    A convenience method for calling [TryStream::try_poll_next] on Unpin stream types.
    §

    fn into_async_read(self) -> IntoAsyncRead<Self>
    where Self: Sized + TryStreamExt<Error = Error>, - Self::Ok: AsRef<[u8]>,

    Available on crate features io and std only.
    Adapter that converts this stream into an AsyncBufRead. Read more
    §

    fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F>
    where + Self::Ok: AsRef<[u8]>,

    Adapter that converts this stream into an AsyncBufRead. Read more
    §

    fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F>
    where Self: Sized, F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = bool>,

    Attempt to execute a predicate over an asynchronous stream and evaluate if all items @@ -456,4 +434,4 @@ that satisfies the predicate. Read more
    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/struct.ClientBuilder.html b/pr/3367/docs/iroh_relay/client/struct.ClientBuilder.html index 6e63827fbb..237aa473bb 100644 --- a/pr/3367/docs/iroh_relay/client/struct.ClientBuilder.html +++ b/pr/3367/docs/iroh_relay/client/struct.ClientBuilder.html @@ -1,25 +1,22 @@ -ClientBuilder in iroh_relay::client - Rust

    Struct ClientBuilder

    Source
    pub struct ClientBuilder { /* private fields */ }
    Expand description

    Build a Client.

    -

    Implementations§

    Source§

    impl ClientBuilder

    Source

    pub fn new( - url: impl Into<RelayUrl>, - secret_key: SecretKey, +ClientBuilder in iroh_relay::client - Rust

    ClientBuilder

    Struct ClientBuilder 

    Source
    pub struct ClientBuilder { /* private fields */ }
    Expand description

    Build a Client.

    +

    Implementations§

    Source§

    impl ClientBuilder

    Source

    pub fn new( + url: impl Into<RelayUrl>, + secret_key: SecretKey, dns_resolver: DnsResolver, ) -> Self

    Create a new ClientBuilder

    -
    Source

    pub fn protocol(self, protocol: Protocol) -> Self

    Sets whether to connect to the relay via websockets or not. -Set to use non-websocket, normal relaying by default.

    -
    Source

    pub fn address_family_selector<S>(self, selector: S) -> Self
    where +

    Source

    pub fn address_family_selector<S>(self, selector: S) -> Self
    where S: Fn() -> bool + Send + Sync + 'static,

    Returns if we should prefer ipv6 it replaces the relayhttp.AddressFamilySelector we pass It provides the hint as to whether in an IPv4-vs-IPv6 race that IPv4 should be held back a bit to give IPv6 a better-than-50/50 chance of winning. We only return true when we believe IPv6 will work anyway, so we don’t artificially delay the connection speed.

    -
    Source

    pub fn is_prober(self, is: bool) -> Self

    Indicates this client is a prober

    -
    Source

    pub fn insecure_skip_cert_verify(self, skip: bool) -> Self

    Available on crate feature test-utils only.

    Skip the verification of the relay server’s SSL certificates.

    +
    Source

    pub fn insecure_skip_cert_verify(self, skip: bool) -> Self

    Available on crate features test-utils only.

    Skip the verification of the relay server’s SSL certificates.

    May only be used in tests.

    -
    Source

    pub fn proxy_url(self, url: Url) -> Self

    Set an explicit proxy url to proxy all HTTP(S) traffic through.

    -
    Source

    pub fn key_cache_capacity(self, capacity: usize) -> Self

    Set the capacity of the cache for public keys.

    -
    Source

    pub async fn connect(&self) -> Result<Client, ConnectError>

    Establishes a new connection to the relay server.

    -

    Trait Implementations§

    Source§

    impl Clone for ClientBuilder

    Source§

    fn clone(&self) -> ClientBuilder

    Returns a copy 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 ClientBuilder

    Source§

    fn fmt(&self, __derive_more_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 +

    Source

    pub fn proxy_url(self, url: Url) -> Self

    Set an explicit proxy url to proxy all HTTP(S) traffic through.

    +
    Source

    pub fn key_cache_capacity(self, capacity: usize) -> Self

    Set the capacity of the cache for public keys.

    +
    Source

    pub async fn connect(&self) -> Result<Client, ConnectError>

    Available on non-wasm_browser only.

    Establishes a new connection to the relay server.

    +

    Trait Implementations§

    Source§

    impl Clone for ClientBuilder

    Source§

    fn clone(&self) -> ClientBuilder

    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 ClientBuilder

    Source§

    fn fmt(&self, __derive_more_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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -27,23 +24,30 @@ work anyway, so we don’t artificially delay the connection speed.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/struct.ClientSink.html b/pr/3367/docs/iroh_relay/client/struct.ClientSink.html index 36b5a978cf..fb1a398e59 100644 --- a/pr/3367/docs/iroh_relay/client/struct.ClientSink.html +++ b/pr/3367/docs/iroh_relay/client/struct.ClientSink.html @@ -1,16 +1,16 @@ -ClientSink in iroh_relay::client - Rust

    Struct ClientSink

    Source
    pub struct ClientSink { /* private fields */ }
    Expand description

    The send half of a relay client.

    -

    Trait Implementations§

    Source§

    impl Debug for ClientSink

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Sink<SendMessage> for ClientSink

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( +ClientSink in iroh_relay::client - Rust

    ClientSink

    Struct ClientSink 

    Source
    pub struct ClientSink { /* private fields */ }
    Expand description

    The send half of a relay client.

    +

    Trait Implementations§

    Source§

    impl Debug for ClientSink

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Sink<ClientToRelayMsg> for ClientSink

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( +) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( self: Pin<&mut Self>, - item: SendMessage, + item: ClientToRelayMsg, ) -> Result<(), Self::Error>

    Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to -poll_ready which returned Poll::Ready(Ok(())). Read more
    Source§

    fn poll_flush( +poll_ready which returned Poll::Ready(Ok(())). Read more

    Source§

    fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where @@ -21,16 +21,23 @@ Each call to this function must be preceded by a successful call to class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    §

    impl<T, Item> SinkExt<Item> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    §

    impl<T, Item> SinkExt<Item> for T
    where T: Sink<Item> + ?Sized,

    §

    fn with<U, Fut, F, E>(self, f: F) -> With<Self, Item, U, Fut, F>
    where F: FnMut(U) -> Fut, Fut: Future<Output = Result<Item, E>>, @@ -43,7 +50,7 @@ Each call to this function must be preceded by a successful call to Self: Sized,

    Transforms the error returned by the sink.
    §

    fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E>
    where Self: Sized, Self::Error: Into<E>,

    Map this sink’s error to a different error type using the Into trait. Read more
    §

    fn buffer(self, capacity: usize) -> Buffer<Self, Item>
    where - Self: Sized,

    Available on crate feature alloc only.
    Adds a fixed-size buffer to the current sink. Read more
    §

    fn close(&mut self) -> Close<'_, Self, Item>
    where + Self: Sized,

    Adds a fixed-size buffer to the current sink. Read more
    §

    fn close(&mut self) -> Close<'_, Self, Item>
    where Self: Unpin,

    Close the sink.
    §

    fn fanout<Si>(self, other: Si) -> Fanout<Self, Si>
    where Self: Sized, Item: Clone, @@ -78,26 +85,11 @@ sink types.

    < cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
    where Self: Unpin,
    A convenience method for calling [Sink::poll_close] on Unpin -sink types.
    §

    impl<Item, S> SinkRateLimitExt<Item, S> for S
    where - S: Sink<Item>,

    §

    fn ratelimit_sink<D, C, MW>( - self, - limiter: &RateLimiter<NotKeyed, D, C, MW>, -) -> RatelimitedSink<'_, Item, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant, NegativeOutcome = NotUntil<<C as Clock>::Instant>>,

    Limits the rate at which items can be put into the current sink.
    §

    fn ratelimit_sink_with_jitter<D, C, MW>( - self, - limiter: &RateLimiter<NotKeyed, D, C, MW>, - jitter: Jitter, -) -> RatelimitedSink<'_, Item, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant, NegativeOutcome = NotUntil<<C as Clock>::Instant>>,

    Available on crate feature jitter only.
    Limits the rate at which items can be put into the current sink, with a randomized wait -period.
    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<V, T> VZip<V> for T
    where +sink types.

    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/client/struct.ClientStream.html b/pr/3367/docs/iroh_relay/client/struct.ClientStream.html index d25442d792..4c505980e0 100644 --- a/pr/3367/docs/iroh_relay/client/struct.ClientStream.html +++ b/pr/3367/docs/iroh_relay/client/struct.ClientStream.html @@ -1,6 +1,6 @@ -ClientStream in iroh_relay::client - Rust

    Struct ClientStream

    Source
    pub struct ClientStream { /* private fields */ }
    Expand description

    The receive half of a relay client.

    -

    Implementations§

    Source§

    impl ClientStream

    Source

    pub fn local_addr(&self) -> Option<SocketAddr>

    Returns the local address of the client.

    -

    Trait Implementations§

    Source§

    impl Debug for ClientStream

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Stream for ClientStream

    Source§

    type Item = Result<ReceivedMessage, RecvError>

    Values yielded by the stream.
    Source§

    fn poll_next( +ClientStream in iroh_relay::client - Rust

    ClientStream

    Struct ClientStream 

    Source
    pub struct ClientStream { /* private fields */ }
    Expand description

    The receive half of a relay client.

    +

    Implementations§

    Source§

    impl ClientStream

    Source

    pub fn local_addr(&self) -> Option<SocketAddr>

    Returns the local address of the client.

    +

    Trait Implementations§

    Source§

    impl Debug for ClientStream

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Stream for ClientStream

    Source§

    type Item = Result<RelayToClientMsg, RecvError>

    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 @@ -13,9 +13,9 @@ current task for wakeup if the value is not yet available, and returning class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> BufferedStreamExt for T
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> BufferedStreamExt for T
    where T: Stream + ?Sized,

    §

    fn buffered_ordered(self, n: usize) -> BufferedOrdered<Self>
    where Self::Item: Future, Self: Sized,

    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn buffered_unordered(self, n: usize) -> BufferUnordered<Self>
    where @@ -34,14 +34,21 @@ available. Read more

    Sized,
    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn try_buffered_unordered(self, n: usize) -> TryBufferUnordered<Self>
    where Self::Ok: TryFuture<Err = Self::Err>, - Self: Sized,

    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + Self: Sized,
    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    §

    impl<S> StreamExt for S
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    §

    impl<S> StreamExt for S
    where S: Stream + ?Sized,

    §

    fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
    where Self: Unpin,

    A convenience for calling [Stream::poll_next()] on !Unpin types.
    §

    fn next(&mut self) -> NextFuture<'_, Self>
    where Self: Unpin,

    Retrieves the next item in the stream. Read more
    §

    fn try_next<T, E>(&mut self) -> TryNextFuture<'_, Self>
    where @@ -123,9 +130,9 @@ available. Read more

    Sized, S: Stream<Item = Self::Item>,
    Merges with other stream, preferring items from self whenever both streams are ready. Read more
    §

    fn race<S>(self, other: S) -> Race<Self, S>
    where Self: Sized, - S: Stream<Item = Self::Item>,

    Available on crate features std and race only.
    Merges with other stream, with no preference for either stream when both are ready. Read more
    §

    fn drain(&mut self) -> Drain<'_, Self>

    Yields all immediately available values from a stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Boxes the stream and changes its type to dyn Stream + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Boxes the stream and changes its type to dyn Stream + 'a. Read more
    §

    impl<T> StreamExt for T
    where + S: Stream<Item = Self::Item>,

    Merges with other stream, with no preference for either stream when both are ready. Read more
    §

    fn drain(&mut self) -> Drain<'_, Self>

    Yields all immediately available values from a stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Boxes the stream and changes its type to dyn Stream + Send + 'a. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where + Self: Sized + 'a,

    Boxes the stream and changes its type to dyn Stream + 'a. Read more
    §

    impl<T> StreamExt for T
    where T: Stream + ?Sized,

    §

    fn next(&mut self) -> Next<'_, Self>
    where Self: Unpin,

    Creates a future that resolves to the next item in the stream. Read more
    §

    fn into_future(self) -> StreamFuture<Self>
    where Self: Sized + Unpin,

    Converts this stream into a future of (next_item, tail_of_stream). @@ -175,7 +182,7 @@ collecting all the values into one final result. Read more
    Into<Option<usize>>, ) -> FlattenUnorderedWithFlowController<Self, ()>
    where Self::Item: Stream + Unpin, - Self: Sized,
    Available on crate feature alloc only.
    Flattens a stream of streams into just one continuous stream. Polls + Self: Sized,
    Flattens a stream of streams into just one continuous stream. Polls inner streams produced by the base stream concurrently. Read more
    §

    fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
    where F: FnMut(Self::Item) -> U, U: Stream, @@ -186,7 +193,7 @@ inner streams produced by the base stream concurrently. Read more
    where U: Stream + Unpin, F: FnMut(Self::Item) -> U, - Self: Sized,

    Available on crate feature alloc only.
    Maps a stream like [StreamExt::map] but flattens nested Streams + Self: Sized,
    Maps a stream like [StreamExt::map] but flattens nested Streams and polls them concurrently, yielding items in any order, as they made available. Read more
    §

    fn scan<S, B, Fut, F>(self, initial_state: S, f: F) -> Scan<Self, S, Fut, F>
    where F: FnMut(&mut S, Self::Item) -> Fut, @@ -213,7 +220,7 @@ closure for each element on the stream. Read more

    where F: FnMut(Self::Item) -> Fut, Fut: Future<Output = ()>, - Self: Sized,
    Available on crate feature alloc only.
    Runs this stream to completion, executing the provided asynchronous + Self: Sized,
    Runs this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available. Read more
    §

    fn take(self, n: usize) -> Take<Self>
    where Self: Sized,

    Creates a new stream of at most n items of the underlying stream. Read more
    §

    fn skip(self, n: usize) -> Skip<Self>
    where @@ -221,24 +228,24 @@ available. Read more

    Sized,
    Fuse a stream such that poll_next will never again be called once it has finished. This method can be used to turn any Stream into a FusedStream. Read more
    §

    fn by_ref(&mut self) -> &mut Self

    Borrows a stream, rather than consuming it. Read more
    §

    fn catch_unwind(self) -> CatchUnwind<Self>
    where - Self: Sized + UnwindSafe,

    Available on crate feature std only.
    Catches unwinding panics while polling the stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where - Self: Sized + Send + 'a,

    Available on crate feature alloc only.
    Wrap the stream in a Box, pinning it. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where - Self: Sized + 'a,

    Available on crate feature alloc only.
    Wrap the stream in a Box, pinning it. Read more
    §

    fn buffered(self, n: usize) -> Buffered<Self>
    where + Self: Sized + UnwindSafe,

    Catches unwinding panics while polling the stream. Read more
    §

    fn boxed<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + Send + 'a>>
    where + Self: Sized + Send + 'a,

    Wrap the stream in a Box, pinning it. Read more
    §

    fn boxed_local<'a>(self) -> Pin<Box<dyn Stream<Item = Self::Item> + 'a>>
    where + Self: Sized + 'a,

    Wrap the stream in a Box, pinning it. Read more
    §

    fn buffered(self, n: usize) -> Buffered<Self>
    where Self::Item: Future, - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
    where + Self: Sized,

    An adaptor for creating a buffered list of pending futures. Read more
    §

    fn buffer_unordered(self, n: usize) -> BufferUnordered<Self>
    where Self::Item: Future, - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    fn zip<St>(self, other: St) -> Zip<Self, St>
    where + Self: Sized,

    An adaptor for creating a buffered list of pending futures (unordered). Read more
    §

    fn zip<St>(self, other: St) -> Zip<Self, St>
    where St: Stream, Self: Sized,

    An adapter for zipping two streams together. Read more
    §

    fn chain<St>(self, other: St) -> Chain<Self, St>
    where St: Stream<Item = Self::Item>, Self: Sized,

    Adapter for chaining two streams. Read more
    §

    fn peekable(self) -> Peekable<Self>
    where Self: Sized,

    Creates a new stream which exposes a peek method. Read more
    §

    fn chunks(self, capacity: usize) -> Chunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up items of the stream inside a vector. Read more
    §

    fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up ready items of the stream inside a vector. Read more
    §

    fn forward<S>(self, sink: S) -> Forward<Self, S>
    where + Self: Sized,

    An adaptor for chunking up items of the stream inside a vector. Read more
    §

    fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
    where + Self: Sized,

    An adaptor for chunking up ready items of the stream inside a vector. Read more
    §

    fn forward<S>(self, sink: S) -> Forward<Self, S>
    where S: Sink<Self::Ok, Error = Self::Error>, - Self: Sized + TryStream,

    Available on crate feature sink only.
    A future that completes after the given stream has been fully processed + Self: Sized + TryStream,
    A future that completes after the given stream has been fully processed into the sink and the sink has been flushed and closed. Read more
    §

    fn split<Item>(self) -> (SplitSink<Self, Item>, SplitStream<Self>)
    where - Self: Sized + Sink<Item>,

    Available on crate features sink and alloc only.
    Splits this Stream + Sink object into separate Sink and Stream + Self: Sized + Sink<Item>,
    Splits this Stream + Sink object into separate Sink and Stream objects. Read more
    §

    fn inspect<F>(self, f: F) -> Inspect<Self, F>
    where F: FnMut(&Self::Item), Self: Sized,

    Do something with each item of this stream, afterwards passing it on. Read more
    §

    fn left_stream<B>(self) -> Either<Self, B>
    where @@ -251,23 +258,9 @@ of that Either. Read more

    Unpin,
    A convenience method for calling [Stream::poll_next] on Unpin stream types.
    §

    fn select_next_some(&mut self) -> SelectNextSome<'_, Self>
    where Self: Unpin + FusedStream,

    Returns a Future that resolves when the next item in this stream is -ready. Read more
    §

    impl<'a, S> StreamRateLimitExt<'a> for S
    where - S: Stream,

    §

    fn ratelimit_stream<D, C, MW>( - self, - limiter: &'a RateLimiter<NotKeyed, D, C, MW>, -) -> RatelimitedStream<'a, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant>,

    Limits the rate at which the stream produces items. Read more
    §

    fn ratelimit_stream_with_jitter<D, C, MW>( - self, - limiter: &'a RateLimiter<NotKeyed, D, C, MW>, - jitter: Jitter, -) -> RatelimitedStream<'a, S, D, C, MW>
    where - D: DirectStateStore, - C: ReasonablyRealtime, - MW: RateLimitingMiddleware<<C as Clock>::Instant>,

    Limits the rate at which the stream produces items, with a randomized wait period. 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 +ready. 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<'_>, @@ -319,14 +312,14 @@ resolves to true. Read more

    where F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = Result<(), Self::Error>>, - Self: Sized,
    Available on crate feature alloc only.
    Attempts to run this stream to completion, executing the provided asynchronous + Self: Sized,
    Attempts to run this stream to completion, executing the provided asynchronous closure for each element on the stream concurrently as elements become available, exiting as soon as an error occurs. Read more
    §

    fn try_collect<C>(self) -> TryCollect<Self, C>
    where C: Default + Extend<Self::Ok>, Self: Sized,

    Attempt to transform a stream into a collection, returning a future representing the result of that computation. Read more
    §

    fn try_chunks(self, capacity: usize) -> TryChunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up successful items of the stream inside a vector. Read more
    §

    fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>
    where - Self: Sized,

    Available on crate feature alloc only.
    An adaptor for chunking up successful, ready items of the stream inside a vector. Read more
    §

    fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
    where + Self: Sized,

    An adaptor for chunking up successful items of the stream inside a vector. Read more
    §

    fn try_ready_chunks(self, capacity: usize) -> TryReadyChunks<Self>
    where + Self: Sized,

    An adaptor for chunking up successful, ready items of the stream inside a vector. Read more
    §

    fn try_filter<Fut, F>(self, f: F) -> TryFilter<Self, Fut, F>
    where Fut: Future<Output = bool>, F: FnMut(&Self::Ok) -> Fut, Self: Sized,

    Attempt to filter the values produced by this stream according to the @@ -341,7 +334,7 @@ provided asynchronous closure. Read more
    where Self::Ok: TryStream + Unpin, <Self::Ok as TryStream>::Error: From<Self::Error>, - Self: Sized,
    Available on crate feature alloc only.
    Flattens a stream of streams into just one continuous stream. Produced streams + Self: Sized,
    Flattens a stream of streams into just one continuous stream. Produced streams will be polled concurrently and any errors will be passed through without looking at them. If the underlying base stream returns an error, it will be immediately propagated. Read more
    §

    fn try_flatten(self) -> TryFlatten<Self>
    where Self::Ok: TryStream, @@ -355,16 +348,16 @@ stream, collecting all the values into one final result. Read more
    < Self::Ok: Extend<<Self::Ok as IntoIterator>::Item> + IntoIterator + Default,

    Attempt to concatenate all items of a stream into a single extendable destination, returning a future representing the end result. Read more
    §

    fn try_buffer_unordered(self, n: usize) -> TryBufferUnordered<Self>
    where Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

    Available on crate feature alloc only.
    Attempt to execute several futures from a stream concurrently (unordered). Read more
    §

    fn try_buffered(self, n: usize) -> TryBuffered<Self>
    where + Self: Sized,

    Attempt to execute several futures from a stream concurrently (unordered). Read more
    §

    fn try_buffered(self, n: usize) -> TryBuffered<Self>
    where Self::Ok: TryFuture<Error = Self::Error>, - Self: Sized,

    Available on crate feature alloc only.
    Attempt to execute several futures from a stream concurrently. Read more
    §

    fn try_poll_next_unpin( + Self: Sized,

    Attempt to execute several futures from a stream concurrently. Read more
    §

    fn try_poll_next_unpin( &mut self, cx: &mut Context<'_>, ) -> Poll<Option<Result<Self::Ok, Self::Error>>>
    where Self: Unpin,

    A convenience method for calling [TryStream::try_poll_next] on Unpin stream types.
    §

    fn into_async_read(self) -> IntoAsyncRead<Self>
    where Self: Sized + TryStreamExt<Error = Error>, - Self::Ok: AsRef<[u8]>,

    Available on crate features io and std only.
    Adapter that converts this stream into an AsyncBufRead. Read more
    §

    fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F>
    where + Self::Ok: AsRef<[u8]>,

    Adapter that converts this stream into an AsyncBufRead. Read more
    §

    fn try_all<Fut, F>(self, f: F) -> TryAll<Self, Fut, F>
    where Self: Sized, F: FnMut(Self::Ok) -> Fut, Fut: Future<Output = bool>,

    Attempt to execute a predicate over an asynchronous stream and evaluate if all items @@ -379,4 +372,4 @@ that satisfies the predicate. Read more
    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTPS_PORT.html b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTPS_PORT.html index 83771a2b84..8eab437b2a 100644 --- a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTPS_PORT.html +++ b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTPS_PORT.html @@ -1,2 +1,2 @@ -DEFAULT_HTTPS_PORT in iroh_relay::defaults - Rust

    Constant DEFAULT_HTTPS_PORT

    Source
    pub const DEFAULT_HTTPS_PORT: u16 = 443;
    Expand description

    The default HTTPS port used by the Relay server.

    +DEFAULT_HTTPS_PORT in iroh_relay::defaults - Rust

    DEFAULT_HTTPS_PORT

    Constant DEFAULT_HTTPS_PORT 

    Source
    pub const DEFAULT_HTTPS_PORT: u16 = 443;
    Expand description

    The default HTTPS port used by the Relay server.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTP_PORT.html b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTP_PORT.html index 1ebf03033c..8f899f4e1d 100644 --- a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTP_PORT.html +++ b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_HTTP_PORT.html @@ -1,2 +1,2 @@ -DEFAULT_HTTP_PORT in iroh_relay::defaults - Rust

    Constant DEFAULT_HTTP_PORT

    Source
    pub const DEFAULT_HTTP_PORT: u16 = 80;
    Expand description

    The default HTTP port used by the Relay server.

    +DEFAULT_HTTP_PORT in iroh_relay::defaults - Rust

    DEFAULT_HTTP_PORT

    Constant DEFAULT_HTTP_PORT 

    Source
    pub const DEFAULT_HTTP_PORT: u16 = 80;
    Expand description

    The default HTTP port used by the Relay server.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_KEY_CACHE_CAPACITY.html b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_KEY_CACHE_CAPACITY.html index 8cd2a9f0fc..a739aa48d2 100644 --- a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_KEY_CACHE_CAPACITY.html +++ b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_KEY_CACHE_CAPACITY.html @@ -1,4 +1,4 @@ -DEFAULT_KEY_CACHE_CAPACITY in iroh_relay::defaults - Rust

    Constant DEFAULT_KEY_CACHE_CAPACITY

    Source
    pub const DEFAULT_KEY_CACHE_CAPACITY: usize = _; // 1_048_576usize
    Expand description

    The default capacity of the key cache for the relay server.

    +DEFAULT_KEY_CACHE_CAPACITY in iroh_relay::defaults - Rust

    DEFAULT_KEY_CACHE_CAPACITY

    Constant DEFAULT_KEY_CACHE_CAPACITY 

    Source
    pub const DEFAULT_KEY_CACHE_CAPACITY: usize = _; // 1_048_576usize
    Expand description

    The default capacity of the key cache for the relay server.

    Sized for 1 million concurrent clients. memory usage will be (32 + 8 + 8 + 8) * 1_000_000 = 56MB on 64 bit, which seems reasonable for a server.

    diff --git a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_METRICS_PORT.html b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_METRICS_PORT.html index 673a270af5..280bc1d727 100644 --- a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_METRICS_PORT.html +++ b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_METRICS_PORT.html @@ -1,2 +1,2 @@ -DEFAULT_METRICS_PORT in iroh_relay::defaults - Rust

    Constant DEFAULT_METRICS_PORT

    Source
    pub const DEFAULT_METRICS_PORT: u16 = 9090;
    Expand description

    The default metrics port used by the Relay server.

    +DEFAULT_METRICS_PORT in iroh_relay::defaults - Rust

    DEFAULT_METRICS_PORT

    Constant DEFAULT_METRICS_PORT 

    Source
    pub const DEFAULT_METRICS_PORT: u16 = 9090;
    Expand description

    The default metrics port used by the Relay server.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html index a5a61bcdca..30f8b269e3 100644 --- a/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html +++ b/pr/3367/docs/iroh_relay/defaults/constant.DEFAULT_RELAY_QUIC_PORT.html @@ -1,4 +1,4 @@ -DEFAULT_RELAY_QUIC_PORT in iroh_relay::defaults - Rust

    Constant DEFAULT_RELAY_QUIC_PORT

    Source
    pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842;
    Expand description

    The default QUIC port used by the Relay server to accept QUIC connections +DEFAULT_RELAY_QUIC_PORT in iroh_relay::defaults - Rust

    DEFAULT_RELAY_QUIC_PORT

    Constant DEFAULT_RELAY_QUIC_PORT 

    Source
    pub const DEFAULT_RELAY_QUIC_PORT: u16 = 7842;
    Expand description

    The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery

    The port is “QUIC” typed on a phone keypad.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/defaults/index.html b/pr/3367/docs/iroh_relay/defaults/index.html index ea64dccf23..abceacf503 100644 --- a/pr/3367/docs/iroh_relay/defaults/index.html +++ b/pr/3367/docs/iroh_relay/defaults/index.html @@ -1,3 +1,3 @@ -iroh_relay::defaults - Rust

    Module defaults

    Source
    Expand description

    Default values used in the relay.

    +iroh_relay::defaults - Rust

    Module defaults

    Module defaults 

    Source
    Expand description

    Default values used in the relay.

    Constants§

    DEFAULT_HTTPS_PORT
    The default HTTPS port used by the Relay server.
    DEFAULT_HTTP_PORT
    The default HTTP port used by the Relay server.
    DEFAULT_KEY_CACHE_CAPACITY
    The default capacity of the key cache for the relay server.
    DEFAULT_METRICS_PORT
    The default metrics port used by the Relay server.
    DEFAULT_RELAY_QUIC_PORT
    The default QUIC port used by the Relay server to accept QUIC connections for QUIC address discovery
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html b/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html index e3a87c7ea2..199fed6729 100644 --- a/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html +++ b/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_PROD.html @@ -1,2 +1,2 @@ -N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust

    Constant N0_DNS_NODE_ORIGIN_PROD

    Source
    pub const N0_DNS_NODE_ORIGIN_PROD: &str = "dns.iroh.link";
    Available on non-wasm_browser only.
    Expand description

    The n0 testing DNS node origin, for production.

    +N0_DNS_NODE_ORIGIN_PROD in iroh_relay::dns - Rust

    N0_DNS_NODE_ORIGIN_PROD

    Constant N0_DNS_NODE_ORIGIN_PROD 

    Source
    pub const N0_DNS_NODE_ORIGIN_PROD: &str = "dns.iroh.link";
    Available on non-wasm_browser only.
    Expand description

    The n0 testing DNS node origin, for production.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html b/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html index 2d3b05a75e..270b293c1d 100644 --- a/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html +++ b/pr/3367/docs/iroh_relay/dns/constant.N0_DNS_NODE_ORIGIN_STAGING.html @@ -1,2 +1,2 @@ -N0_DNS_NODE_ORIGIN_STAGING in iroh_relay::dns - Rust

    Constant N0_DNS_NODE_ORIGIN_STAGING

    Source
    pub const N0_DNS_NODE_ORIGIN_STAGING: &str = "staging-dns.iroh.link";
    Available on non-wasm_browser only.
    Expand description

    The n0 testing DNS node origin, for testing.

    +N0_DNS_NODE_ORIGIN_STAGING in iroh_relay::dns - Rust

    N0_DNS_NODE_ORIGIN_STAGING

    Constant N0_DNS_NODE_ORIGIN_STAGING 

    Source
    pub const N0_DNS_NODE_ORIGIN_STAGING: &str = "staging-dns.iroh.link";
    Available on non-wasm_browser only.
    Expand description

    The n0 testing DNS node origin, for testing.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/enum.DnsError.html b/pr/3367/docs/iroh_relay/dns/enum.DnsError.html index 7033f731cd..3453037a07 100644 --- a/pr/3367/docs/iroh_relay/dns/enum.DnsError.html +++ b/pr/3367/docs/iroh_relay/dns/enum.DnsError.html @@ -1,4 +1,4 @@ -DnsError in iroh_relay::dns - Rust

    Enum DnsError

    Source
    #[non_exhaustive]
    pub enum DnsError { +DnsError in iroh_relay::dns - Rust

    DnsError

    Enum DnsError 

    Source
    #[non_exhaustive]
    pub enum DnsError { Timeout { source: Elapsed, backtrace: Option<Backtrace>, @@ -28,11 +28,11 @@ span_trace: SpanTrace, }, }
    Available on non-wasm_browser only.
    Expand description

    Potential errors related to dns.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Timeout

    Fields

    §source: Elapsed
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoResponse

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ResolveBoth

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    MissingHost

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Resolve

    Fields

    §source: ResolveError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidResponse

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DnsError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for DnsError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for DnsError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DnsError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Timeout

    Fields

    §source: Elapsed
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoResponse

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ResolveBoth

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    MissingHost

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Resolve

    Fields

    §source: ResolveError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidResponse

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DnsError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for DnsError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for DnsError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DnsError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DnsError> for DialError

    Source§

    fn from(error: DnsError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Elapsed> for DnsError

    Source§

    fn from(error: Elapsed) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ResolveError> for DnsError

    Source§

    fn from(error: ResolveError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DnsError> for DialError

    Source§

    fn from(error: DnsError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Elapsed> for DnsError

    Source§

    fn from(error: Elapsed) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ResolveError> for DnsError

    Source§

    fn from(error: ResolveError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -43,22 +43,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static,
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/enum.DnsProtocol.html b/pr/3367/docs/iroh_relay/dns/enum.DnsProtocol.html new file mode 100644 index 0000000000..2d546eee37 --- /dev/null +++ b/pr/3367/docs/iroh_relay/dns/enum.DnsProtocol.html @@ -0,0 +1,54 @@ +DnsProtocol in iroh_relay::dns - Rust

    DnsProtocol

    Enum DnsProtocol 

    Source
    #[non_exhaustive]
    pub enum DnsProtocol { + Udp, + Tcp, + Tls, + Https, +}
    Available on non-wasm_browser only.
    Expand description

    Protocols over which DNS records can be resolved.

    +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Udp

    DNS over UDP

    +

    This is the classic DNS protocol and supported by most DNS servers.

    +
    §

    Tcp

    DNS over TCP

    +

    This is specified in the original DNS RFCs, but is not supported by all DNS servers.

    +
    §

    Tls

    DNS over TLS

    +

    Performs DNS lookups over TLS-encrypted TCP connections, as defined in RFC 7858.

    +
    §

    Https

    DNS over HTTPS

    +

    Performs DNS lookups over HTTPS, as defined in RFC 8484.

    +

    Trait Implementations§

    Source§

    impl Clone for DnsProtocol

    Source§

    fn clone(&self) -> DnsProtocol

    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 DnsProtocol

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for DnsProtocol

    Source§

    fn default() -> DnsProtocol

    Returns the “default value” for a type. Read more
    Source§

    impl PartialEq for DnsProtocol

    Source§

    fn eq(&self, other: &DnsProtocol) -> 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 Copy for DnsProtocol

    Source§

    impl Eq for DnsProtocol

    Source§

    impl StructuralPartialEq for DnsProtocol

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh/node_info/enum.LookupError.html b/pr/3367/docs/iroh_relay/dns/enum.LookupError.html similarity index 56% rename from pr/3367/docs/iroh/node_info/enum.LookupError.html rename to pr/3367/docs/iroh_relay/dns/enum.LookupError.html index 39a4aa4d56..897ef084fd 100644 --- a/pr/3367/docs/iroh/node_info/enum.LookupError.html +++ b/pr/3367/docs/iroh_relay/dns/enum.LookupError.html @@ -1,27 +1,19 @@ -LookupError in iroh::node_info - Rust

    Enum LookupError

    Source
    #[non_exhaustive]
    pub enum LookupError { +LookupError in iroh_relay::dns - Rust

    LookupError

    Enum LookupError 

    Source
    #[non_exhaustive]
    pub enum LookupError { ParseError { - source: Box<ParseError>, + source: Box<ParseError>, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, LookupFailed { - source: Box<DnsError>, + source: Box<DnsError>, backtrace: Option<Backtrace>, span_trace: SpanTrace, }, - InvalidLabel { - source: ProtoError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, -}
    Available on non-wasm_browser only.

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    ParseError

    Fields

    §source: Box<ParseError>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    LookupFailed

    Fields

    §source: Box<DnsError>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidLabel

    Fields

    §source: ProtoError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for LookupError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Display for LookupError

    Source§

    fn fmt( - &self, - __snafu_display_formatter: &mut Formatter<'_>, -) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    Source§

    impl Error for LookupError

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for LookupError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +}

    Available on non-wasm_browser only.

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    ParseError

    Fields

    §source: Box<ParseError>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    LookupFailed

    Fields

    §source: Box<DnsError>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for LookupError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for LookupError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for LookupError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for LookupError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. 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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -32,22 +24,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/index.html b/pr/3367/docs/iroh_relay/dns/index.html index c119054e01..cbb2d95b99 100644 --- a/pr/3367/docs/iroh_relay/dns/index.html +++ b/pr/3367/docs/iroh_relay/dns/index.html @@ -1,2 +1,2 @@ -iroh_relay::dns - Rust

    Module dns

    Source
    Available on non-wasm_browser only.
    Expand description

    DNS resolver

    -

    Structs§

    DnsResolver
    The DNS resolver used throughout iroh.
    StaggeredError
    Error returned when an input value is too long for crate::node_info::UserData.
    TXT
    Record data for a TXT record
    TxtLookup
    TXT records returned from DnsResolver::lookup_txt

    Enums§

    DnsError
    Potential errors related to dns.

    Constants§

    N0_DNS_NODE_ORIGIN_PROD
    The n0 testing DNS node origin, for production.
    N0_DNS_NODE_ORIGIN_STAGING
    The n0 testing DNS node origin, for testing.
    \ No newline at end of file +iroh_relay::dns - Rust

    Module dns

    Module dns 

    Source
    Available on non-wasm_browser only.
    Expand description

    DNS resolver

    +

    Structs§

    Builder
    Builder for DnsResolver.
    DnsResolver
    The DNS resolver used throughout iroh.
    StaggeredError
    Error returned when an input value is too long for crate::node_info::UserData.
    TxtRecordData
    Record data for a TXT record.

    Enums§

    DnsError
    Potential errors related to dns.
    DnsProtocol
    Protocols over which DNS records can be resolved.
    LookupError

    Constants§

    N0_DNS_NODE_ORIGIN_PROD
    The n0 testing DNS node origin, for production.
    N0_DNS_NODE_ORIGIN_STAGING
    The n0 testing DNS node origin, for testing.

    Traits§

    Resolver
    Trait for DNS resolvers used in iroh.

    Type Aliases§

    BoxIter
    Boxed iterator alias.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/sidebar-items.js b/pr/3367/docs/iroh_relay/dns/sidebar-items.js index e8599b6f6f..baf7486efa 100644 --- a/pr/3367/docs/iroh_relay/dns/sidebar-items.js +++ b/pr/3367/docs/iroh_relay/dns/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING"],"enum":["DnsError"],"struct":["DnsResolver","StaggeredError","TXT","TxtLookup"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING"],"enum":["DnsError","DnsProtocol","LookupError"],"struct":["Builder","DnsResolver","StaggeredError","TxtRecordData"],"trait":["Resolver"],"type":["BoxIter"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/struct.Builder.html b/pr/3367/docs/iroh_relay/dns/struct.Builder.html new file mode 100644 index 0000000000..9e9e0c5b2d --- /dev/null +++ b/pr/3367/docs/iroh_relay/dns/struct.Builder.html @@ -0,0 +1,46 @@ +Builder in iroh_relay::dns - Rust

    Builder

    Struct Builder 

    Source
    pub struct Builder { /* private fields */ }
    Available on non-wasm_browser only.
    Expand description

    Builder for DnsResolver.

    +

    Implementations§

    Source§

    impl Builder

    Source

    pub fn with_system_defaults(self) -> Self

    Makes the builder respect the host system’s DNS configuration.

    +

    We first try to read the system’s resolver from /etc/resolv.conf. +This does not work at least on some Androids, therefore we fallback +to a default config which uses Google’s 8.8.8.8 or 8.8.4.4.

    +
    Source

    pub fn with_nameserver(self, addr: SocketAddr, protocol: DnsProtocol) -> Self

    Adds a single nameserver.

    +
    Source

    pub fn with_nameservers( + self, + nameservers: impl IntoIterator<Item = (SocketAddr, DnsProtocol)>, +) -> Self

    Adds a list of nameservers.

    +
    Source

    pub fn build(self) -> DnsResolver

    Builds the DNS resolver.

    +

    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
    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/struct.DnsResolver.html b/pr/3367/docs/iroh_relay/dns/struct.DnsResolver.html index 5e6ddaf5d6..d926acb17c 100644 --- a/pr/3367/docs/iroh_relay/dns/struct.DnsResolver.html +++ b/pr/3367/docs/iroh_relay/dns/struct.DnsResolver.html @@ -1,102 +1,107 @@ -DnsResolver in iroh_relay::dns - Rust

    Struct DnsResolver

    Source
    pub struct DnsResolver { /* private fields */ }
    Available on non-wasm_browser only.
    Expand description

    The DNS resolver used throughout iroh.

    -

    Implementations§

    Source§

    impl DnsResolver

    Source

    pub fn new() -> Self

    Create a new DNS resolver with sensible cross-platform defaults.

    +DnsResolver in iroh_relay::dns - Rust

    DnsResolver

    Struct DnsResolver 

    Source
    pub struct DnsResolver(/* private fields */);
    Available on non-wasm_browser only.
    Expand description

    The DNS resolver used throughout iroh.

    +

    Implementations§

    Source§

    impl DnsResolver

    Source

    pub fn new() -> Self

    Creates a new DNS resolver with sensible cross-platform defaults.

    We first try to read the system’s resolver from /etc/resolv.conf. This does not work at least on some Androids, therefore we fallback to the default ResolverConfig which uses eg. to google’s 8.8.8.8 or 8.8.4.4.

    -
    Source

    pub fn with_nameserver(nameserver: SocketAddr) -> Self

    Create a new DNS resolver configured with a single UDP DNS nameserver.

    -
    Source

    pub async fn clear_cache(&self)

    Removes all entries from the cache.

    -
    Source

    pub async fn reset(&self)

    Recreate the inner resolver

    -
    Source

    pub async fn lookup_txt( +

    Source

    pub fn with_nameserver(nameserver: SocketAddr) -> Self

    Creates a new DNS resolver configured with a single UDP DNS nameserver.

    +
    Source

    pub fn builder() -> Builder

    Creates a builder to construct a DNS resolver with custom options.

    +
    Source

    pub fn custom(resolver: impl Resolver) -> Self

    Creates a new DnsResolver from a struct that implements Resolver.

    +

    If you need more customization for DNS resolving than the Builder allows, you can +implement the Resolver trait on a struct and implement DNS resolution +however you see fit.

    +
    Source

    pub async fn clear_cache(&self)

    Removes all entries from the cache.

    +
    Source

    pub async fn reset(&self)

    Recreates the inner resolver.

    +
    Source

    pub async fn lookup_txt<T: ToString>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<TxtLookup, DnsError>

    Lookup a TXT record.

    -
    Source

    pub async fn lookup_ipv4( +) -> Result<impl Iterator<Item = TxtRecordData>, DnsError>

    Looks up a TXT record.

    +
    Source

    pub async fn lookup_ipv4<T: ToString>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<impl Iterator<Item = IpAddr>, DnsError>

    Perform an ipv4 lookup with a timeout.

    -
    Source

    pub async fn lookup_ipv6( +) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>

    Performs an IPv4 lookup with a timeout.

    +
    Source

    pub async fn lookup_ipv6<T: ToString>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<impl Iterator<Item = IpAddr>, DnsError>

    Perform an ipv6 lookup with a timeout.

    -
    Source

    pub async fn lookup_ipv4_ipv6( +) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>

    Performs an IPv6 lookup with a timeout.

    +
    Source

    pub async fn lookup_ipv4_ipv6<T: ToString>( &self, - host: impl ToString, + host: T, timeout: Duration, -) -> Result<impl Iterator<Item = IpAddr>, DnsError>

    Resolve IPv4 and IPv6 in parallel with a timeout.

    +) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError>

    Resolves IPv4 and IPv6 in parallel with a timeout.

    LookupIpStrategy::Ipv4AndIpv6 will wait for ipv6 resolution timeout, even if it is not usable on the stack, so we manually query both lookups concurrently and time them out individually.

    -
    Source

    pub async fn resolve_host( +

    Source

    pub async fn resolve_host( &self, - url: &Url, + url: &Url, prefer_ipv6: bool, timeout: Duration, -) -> Result<IpAddr, DnsError>

    Resolve a hostname from a URL to an IP address.

    -
    Source

    pub async fn lookup_ipv4_staggered( +) -> Result<IpAddr, DnsError>

    Resolves a hostname from a URL to an IP address.

    +
    Source

    pub async fn lookup_ipv4_staggered( &self, host: impl ToString, timeout: Duration, delays_ms: &[u64], -) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

    Perform an ipv4 lookup with a timeout in a staggered fashion.

    +) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

    Performs an IPv4 lookup with a timeout in a staggered fashion.

    From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The result of the first successful call is returned, or a summary of all errors otherwise.

    -
    Source

    pub async fn lookup_ipv6_staggered( +

    Source

    pub async fn lookup_ipv6_staggered( &self, host: impl ToString, timeout: Duration, delays_ms: &[u64], -) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

    Perform an ipv6 lookup with a timeout in a staggered fashion.

    +) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

    Performs an IPv6 lookup with a timeout in a staggered fashion.

    From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied to each call individually. The result of the first successful call is returned, or a summary of all errors otherwise.

    -
    Source

    pub async fn lookup_ipv4_ipv6_staggered( +

    Source

    pub async fn lookup_ipv4_ipv6_staggered( &self, host: impl ToString, timeout: Duration, delays_ms: &[u64], -) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

    Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.

    +) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>>

    Races an IPv4 and IPv6 lookup with a timeout in a staggered fashion.

    From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The timeout is applied as stated in Self::lookup_ipv4_ipv6. The result of the first successful call is returned, or a summary of all errors otherwise.

    -
    Source

    pub async fn lookup_node_by_id( +

    Source

    pub async fn lookup_node_by_id( &self, - node_id: &NodeId, + node_id: &NodeId, origin: &str, -) -> Result<NodeInfo, LookupError>

    Looks up node info by NodeId and origin domain name.

    +) -> Result<NodeInfo, LookupError>

    Looks up node info by [NodeId] and origin domain name.

    To lookup nodes that published their node info to the DNS servers run by n0, pass N0_DNS_NODE_ORIGIN_PROD as origin.

    -
    Source

    pub async fn lookup_node_by_domain_name( +

    Source

    pub async fn lookup_node_by_domain_name( &self, name: &str, -) -> Result<NodeInfo, LookupError>

    Looks up node info by DNS name.

    -
    Source

    pub async fn lookup_node_by_domain_name_staggered( +) -> Result<NodeInfo, LookupError>

    Looks up node info by DNS name.

    +
    Source

    pub async fn lookup_node_by_domain_name_staggered( &self, name: &str, delays_ms: &[u64], -) -> Result<NodeInfo, StaggeredError<LookupError>>

    Looks up node info by DNS name in a staggered fashion.

    +) -> Result<NodeInfo, StaggeredError<LookupError>>

    Looks up node info by DNS name in a staggered fashion.

    From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a summary of all errors otherwise.

    -
    Source

    pub async fn lookup_node_by_id_staggered( +

    Source

    pub async fn lookup_node_by_id_staggered( &self, - node_id: &NodeId, + node_id: &NodeId, origin: &str, delays_ms: &[u64], -) -> Result<NodeInfo, StaggeredError<LookupError>>

    Looks up node info by NodeId and origin domain name.

    +) -> Result<NodeInfo, StaggeredError<LookupError>>

    Looks up node info by [NodeId] and origin domain name.

    From the moment this function is called, each lookup is scheduled after the delays in delays_ms with the first call being done immediately. [200ms, 300ms] results in calls at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a summary of all errors otherwise.

    -

    Trait Implementations§

    Source§

    impl Clone for DnsResolver

    Source§

    fn clone(&self) -> DnsResolver

    Returns a copy 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 DnsResolver

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for DnsResolver

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver

    Source§

    fn from(resolver: TokioResolver) -> Self

    Converts to this type from the input type.
    Source§

    impl Resolve for DnsResolver

    Source§

    fn resolve(&self, name: Name) -> Resolving

    Performs DNS resolution on a Name. +

    Trait Implementations§

    Source§

    impl Clone for DnsResolver

    Source§

    fn clone(&self) -> DnsResolver

    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 DnsResolver

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for DnsResolver

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl Resolve for DnsResolver

    Source§

    fn resolve(&self, name: Name) -> Resolving

    Performs DNS resolution on a Name. The return type is a future containing an iterator of SocketAddr. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -105,23 +110,30 @@ The return type is a future containing an iterator of SocketAddr. < class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/struct.StaggeredError.html b/pr/3367/docs/iroh_relay/dns/struct.StaggeredError.html index e83e328d45..7bfdad358e 100644 --- a/pr/3367/docs/iroh_relay/dns/struct.StaggeredError.html +++ b/pr/3367/docs/iroh_relay/dns/struct.StaggeredError.html @@ -1,6 +1,6 @@ -StaggeredError in iroh_relay::dns - Rust

    Struct StaggeredError

    Source
    pub struct StaggeredError<E: Debug + Display> { /* private fields */ }
    Available on non-wasm_browser only.
    Expand description

    Error returned when an input value is too long for crate::node_info::UserData.

    -

    Trait Implementations§

    Source§

    impl<E: Debug + Debug + Display> Debug for StaggeredError<E>

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<E: Debug + Display> Display for StaggeredError<E>

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<E: Debug + Display> Error for StaggeredError<E>
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl<E: Debug + Display> ErrorCompat for StaggeredError<E>

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +StaggeredError in iroh_relay::dns - Rust

    StaggeredError

    Struct StaggeredError 

    Source
    pub struct StaggeredError<E: Debug + Display> { /* private fields */ }
    Available on non-wasm_browser only.
    Expand description

    Error returned when an input value is too long for crate::node_info::UserData.

    +

    Trait Implementations§

    Source§

    impl<E: Debug + Debug + Display> Debug for StaggeredError<E>

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<E: Debug + Display> Display for StaggeredError<E>

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<E: Debug + Display> Error for StaggeredError<E>
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl<E: Debug + Display> ErrorCompat for StaggeredError<E>

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

    Auto Trait Implementations§

    §

    impl<E> Freeze for StaggeredError<E>

    §

    impl<E> !RefUnwindSafe for StaggeredError<E>

    §

    impl<E> Send for StaggeredError<E>
    where @@ -17,22 +17,31 @@ receivers.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/struct.TXT.html b/pr/3367/docs/iroh_relay/dns/struct.TXT.html deleted file mode 100644 index b35d6b34cb..0000000000 --- a/pr/3367/docs/iroh_relay/dns/struct.TXT.html +++ /dev/null @@ -1,31 +0,0 @@ -TXT in iroh_relay::dns - Rust

    Struct TXT

    Source
    pub struct TXT(/* private fields */);
    Available on non-wasm_browser only.
    Expand description

    Record data for a TXT record

    -

    Implementations§

    Source§

    impl TXT

    Source

    pub fn txt_data(&self) -> &[Box<[u8]>]

    Returns the raw character strings of this TXT record.

    -

    Trait Implementations§

    Source§

    impl Clone for TXT

    Source§

    fn clone(&self) -> TXT

    Returns a copy 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 TXT

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for TXT

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for TXT

    §

    impl RefUnwindSafe for TXT

    §

    impl Send for TXT

    §

    impl Sync for TXT

    §

    impl Unpin for TXT

    §

    impl UnwindSafe for TXT

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/struct.TxtLookup.html b/pr/3367/docs/iroh_relay/dns/struct.TxtLookup.html deleted file mode 100644 index ab16b99ebf..0000000000 --- a/pr/3367/docs/iroh_relay/dns/struct.TxtLookup.html +++ /dev/null @@ -1,29 +0,0 @@ -TxtLookup in iroh_relay::dns - Rust

    Struct TxtLookup

    Source
    pub struct TxtLookup(/* private fields */);
    Available on non-wasm_browser only.
    Expand description

    TXT records returned from DnsResolver::lookup_txt

    -

    Trait Implementations§

    Source§

    impl Clone for TxtLookup

    Source§

    fn clone(&self) -> TxtLookup

    Returns a copy 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 TxtLookup

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<TxtLookup> for TxtLookup

    Source§

    fn from(value: TxtLookup) -> Self

    Converts to this type from the input type.
    Source§

    impl IntoIterator for TxtLookup

    Source§

    type Item = TXT

    The type of the elements being iterated over.
    Source§

    type IntoIter = Box<dyn Iterator<Item = TXT>>

    Which kind of iterator are we turning this into?
    Source§

    fn into_iter(self) -> Self::IntoIter

    Creates an iterator from a value. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/struct.TxtRecordData.html b/pr/3367/docs/iroh_relay/dns/struct.TxtRecordData.html new file mode 100644 index 0000000000..0273f19f86 --- /dev/null +++ b/pr/3367/docs/iroh_relay/dns/struct.TxtRecordData.html @@ -0,0 +1,45 @@ +TxtRecordData in iroh_relay::dns - Rust

    TxtRecordData

    Struct TxtRecordData 

    Source
    pub struct TxtRecordData(/* private fields */);
    Available on non-wasm_browser only.
    Expand description

    Record data for a TXT record.

    +

    This contains a list of character strings, as defined in RFC 1035 Section 3.3.14.

    +

    TxtRecordData implements fmt::Display, so you can call ToString::to_string to +convert the record data into a string. This will parse each character string with +String::from_utf8_lossy and then concatenate all strings without a separator.

    +

    If you want to process each character string individually, use Self::iter.

    +

    Implementations§

    Source§

    impl TxtRecordData

    Source

    pub fn iter(&self) -> impl Iterator<Item = &[u8]>

    Returns an iterator over the character strings contained in this TXT record.

    +

    Trait Implementations§

    Source§

    impl Clone for TxtRecordData

    Source§

    fn clone(&self) -> TxtRecordData

    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 TxtRecordData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for TxtRecordData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<Vec<Box<[u8]>>> for TxtRecordData

    Source§

    fn from(value: Vec<Box<[u8]>>) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<Box<[u8]>> for TxtRecordData

    Source§

    fn from_iter<T: IntoIterator<Item = Box<[u8]>>>(iter: T) -> Self

    Creates a value from an iterator. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/trait.Resolver.html b/pr/3367/docs/iroh_relay/dns/trait.Resolver.html new file mode 100644 index 0000000000..c2a070ee00 --- /dev/null +++ b/pr/3367/docs/iroh_relay/dns/trait.Resolver.html @@ -0,0 +1,38 @@ +Resolver in iroh_relay::dns - Rust

    Resolver

    Trait Resolver 

    Source
    pub trait Resolver:
    +    Debug
    +    + Send
    +    + Sync
    +    + 'static {
    +    // Required methods
    +    fn lookup_ipv4(
    +        &self,
    +        host: String,
    +    ) -> BoxFuture<Result<BoxIter<Ipv4Addr>, DnsError>>;
    +    fn lookup_ipv6(
    +        &self,
    +        host: String,
    +    ) -> BoxFuture<Result<BoxIter<Ipv6Addr>, DnsError>>;
    +    fn lookup_txt(
    +        &self,
    +        host: String,
    +    ) -> BoxFuture<Result<BoxIter<TxtRecordData>, DnsError>>;
    +    fn clear_cache(&self);
    +    fn reset(&mut self);
    +}
    Available on non-wasm_browser only.
    Expand description

    Trait for DNS resolvers used in iroh.

    +

    Required Methods§

    Source

    fn lookup_ipv4( + &self, + host: String, +) -> BoxFuture<Result<BoxIter<Ipv4Addr>, DnsError>>

    Looks up an IPv4 address.

    +
    Source

    fn lookup_ipv6( + &self, + host: String, +) -> BoxFuture<Result<BoxIter<Ipv6Addr>, DnsError>>

    Looks up an IPv6 address.

    +
    Source

    fn lookup_txt( + &self, + host: String, +) -> BoxFuture<Result<BoxIter<TxtRecordData>, DnsError>>

    Looks up TXT records.

    +
    Source

    fn clear_cache(&self)

    Clears the internal cache.

    +
    Source

    fn reset(&mut self)

    Completely resets the DNS resolver.

    +

    This is called when the host’s network changes majorly. Implementations should rebind all sockets +and refresh the nameserver configuration if read from the host system.

    +

    Implementors§

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/dns/type.BoxIter.html b/pr/3367/docs/iroh_relay/dns/type.BoxIter.html new file mode 100644 index 0000000000..f534d651f2 --- /dev/null +++ b/pr/3367/docs/iroh_relay/dns/type.BoxIter.html @@ -0,0 +1,2 @@ +BoxIter in iroh_relay::dns - Rust

    BoxIter

    Type Alias BoxIter 

    Source
    pub type BoxIter<T> = Box<dyn Iterator<Item = T> + Send + 'static>;
    Available on non-wasm_browser only.
    Expand description

    Boxed iterator alias.

    +

    Aliased Type§

    pub struct BoxIter<T>(/* private fields */);
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/constant.CLIENT_AUTH_HEADER.html b/pr/3367/docs/iroh_relay/http/constant.CLIENT_AUTH_HEADER.html new file mode 100644 index 0000000000..442973443c --- /dev/null +++ b/pr/3367/docs/iroh_relay/http/constant.CLIENT_AUTH_HEADER.html @@ -0,0 +1,2 @@ +CLIENT_AUTH_HEADER in iroh_relay::http - Rust

    CLIENT_AUTH_HEADER

    Constant CLIENT_AUTH_HEADER 

    Source
    pub const CLIENT_AUTH_HEADER: HeaderName;
    Expand description

    The HTTP header name for relay client authentication

    +
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/constant.RELAY_PATH.html b/pr/3367/docs/iroh_relay/http/constant.RELAY_PATH.html index 5f9d01ac9b..2b35517625 100644 --- a/pr/3367/docs/iroh_relay/http/constant.RELAY_PATH.html +++ b/pr/3367/docs/iroh_relay/http/constant.RELAY_PATH.html @@ -1,3 +1,3 @@ -RELAY_PATH in iroh_relay::http - Rust

    Constant RELAY_PATH

    Source
    pub const RELAY_PATH: &str = "/relay";
    Expand description

    The HTTP path under which the relay accepts relaying connections +RELAY_PATH in iroh_relay::http - Rust

    RELAY_PATH

    Constant RELAY_PATH 

    Source
    pub const RELAY_PATH: &str = "/relay";
    Expand description

    The HTTP path under which the relay accepts relaying connections (over websockets and a custom upgrade protocol).

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/constant.RELAY_PROBE_PATH.html b/pr/3367/docs/iroh_relay/http/constant.RELAY_PROBE_PATH.html index 8ee2d94014..86badfc549 100644 --- a/pr/3367/docs/iroh_relay/http/constant.RELAY_PROBE_PATH.html +++ b/pr/3367/docs/iroh_relay/http/constant.RELAY_PROBE_PATH.html @@ -1,2 +1,2 @@ -RELAY_PROBE_PATH in iroh_relay::http - Rust

    Constant RELAY_PROBE_PATH

    Source
    pub const RELAY_PROBE_PATH: &str = "/ping";
    Expand description

    The HTTP path under which the relay allows doing latency queries for testing.

    +RELAY_PROBE_PATH in iroh_relay::http - Rust

    RELAY_PROBE_PATH

    Constant RELAY_PROBE_PATH 

    Source
    pub const RELAY_PROBE_PATH: &str = "/ping";
    Expand description

    The HTTP path under which the relay allows doing latency queries for testing.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/constant.RELAY_PROTOCOL_VERSION.html b/pr/3367/docs/iroh_relay/http/constant.RELAY_PROTOCOL_VERSION.html new file mode 100644 index 0000000000..c60b5910c0 --- /dev/null +++ b/pr/3367/docs/iroh_relay/http/constant.RELAY_PROTOCOL_VERSION.html @@ -0,0 +1,4 @@ +RELAY_PROTOCOL_VERSION in iroh_relay::http - Rust

    RELAY_PROTOCOL_VERSION

    Constant RELAY_PROTOCOL_VERSION 

    Source
    pub const RELAY_PROTOCOL_VERSION: &str = "iroh-relay-v1";
    Expand description

    The websocket sub-protocol version that we currently support.

    +

    This is sent as the websocket sub-protocol header Sec-Websocket-Protocol from +the client and answered from the server.

    +
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/enum.Protocol.html b/pr/3367/docs/iroh_relay/http/enum.Protocol.html deleted file mode 100644 index 243a1ca229..0000000000 --- a/pr/3367/docs/iroh_relay/http/enum.Protocol.html +++ /dev/null @@ -1,42 +0,0 @@ -Protocol in iroh_relay::http - Rust

    Enum Protocol

    Source
    pub enum Protocol {
    -    Relay,
    -    Websocket,
    -}
    Expand description

    The HTTP upgrade protocol used for relaying.

    -

    Variants§

    §

    Relay

    Relays over the custom relaying protocol with a custom HTTP upgrade header.

    -
    §

    Websocket

    Relays over websockets.

    -

    Originally introduced to support browser connections.

    -

    Implementations§

    Source§

    impl Protocol

    Source

    pub const fn upgrade_header(&self) -> &'static str

    The HTTP upgrade header used or expected.

    -
    Source

    pub fn parse_header(header: &HeaderValue) -> Option<Self>

    Tries to match the value of an HTTP upgrade header to figure out which protocol should be initiated.

    -

    Trait Implementations§

    Source§

    impl Clone for Protocol

    Source§

    fn clone(&self) -> Protocol

    Returns a copy 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 Protocol

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for Protocol

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl PartialEq for Protocol

    Source§

    fn eq(&self, other: &Protocol) -> 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 Copy for Protocol

    Source§

    impl Eq for Protocol

    Source§

    impl StructuralPartialEq for Protocol

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/index.html b/pr/3367/docs/iroh_relay/http/index.html index 9dc9ee8b95..e4d2129135 100644 --- a/pr/3367/docs/iroh_relay/http/index.html +++ b/pr/3367/docs/iroh_relay/http/index.html @@ -1,3 +1,3 @@ -iroh_relay::http - Rust

    Module http

    Source
    Expand description

    HTTP-specific constants for the relay server and client.

    -

    Enums§

    Protocol
    The HTTP upgrade protocol used for relaying.

    Constants§

    RELAY_PATH
    The HTTP path under which the relay accepts relaying connections -(over websockets and a custom upgrade protocol).
    RELAY_PROBE_PATH
    The HTTP path under which the relay allows doing latency queries for testing.
    \ No newline at end of file +iroh_relay::http - Rust

    Module http

    Module http 

    Source
    Expand description

    HTTP-specific constants for the relay server and client.

    +

    Constants§

    CLIENT_AUTH_HEADER
    The HTTP header name for relay client authentication
    RELAY_PATH
    The HTTP path under which the relay accepts relaying connections +(over websockets and a custom upgrade protocol).
    RELAY_PROBE_PATH
    The HTTP path under which the relay allows doing latency queries for testing.
    RELAY_PROTOCOL_VERSION
    The websocket sub-protocol version that we currently support.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/http/sidebar-items.js b/pr/3367/docs/iroh_relay/http/sidebar-items.js index 3f7df87d82..65ff7b9d04 100644 --- a/pr/3367/docs/iroh_relay/http/sidebar-items.js +++ b/pr/3367/docs/iroh_relay/http/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["RELAY_PATH","RELAY_PROBE_PATH"],"enum":["Protocol"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["CLIENT_AUTH_HEADER","RELAY_PATH","RELAY_PROBE_PATH","RELAY_PROTOCOL_VERSION"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/index.html b/pr/3367/docs/iroh_relay/index.html index 4177266dbb..51ebbaf066 100644 --- a/pr/3367/docs/iroh_relay/index.html +++ b/pr/3367/docs/iroh_relay/index.html @@ -1,4 +1,4 @@ -iroh_relay - Rust

    Crate iroh_relay

    Source
    Expand description

    Iroh’s relay is a feature within iroh, a peer-to-peer +iroh_relay - Rust

    Crate iroh_relay

    Crate iroh_relay 

    Source
    Expand description

    Iroh’s relay is a feature within iroh, a peer-to-peer networking system designed to facilitate direct, encrypted connections between devices. Iroh aims to simplify decentralized communication by automatically handling connections through “relays” when direct connections aren’t immediately possible. The relay server helps establish @@ -25,6 +25,6 @@ Tailscale.

    QAD support and expose metrics.

    -

    Re-exports§

    pub use protos::relay::MAX_PACKET_SIZE;

    Modules§

    client
    Exposes Client, which allows to establish connections to a relay server.
    defaults
    Default values used in the relay.
    dnsNon-wasm_browser
    DNS resolver
    http
    HTTP-specific constants for the relay server and client.
    node_info
    Support for handling DNS resource records for dialing by NodeId.
    protos
    Protocols used by the iroh-relay
    quic
    Create a QUIC server that accepts connections +

    Re-exports§

    pub use protos::relay::MAX_PACKET_SIZE;

    Modules§

    client
    Exposes Client, which allows to establish connections to a relay server.
    defaults
    Default values used in the relay.
    dnsNon-wasm_browser
    DNS resolver
    http
    HTTP-specific constants for the relay server and client.
    node_info
    Support for handling DNS resource records for dialing by [NodeId].
    protos
    Protocols used by the iroh-relay
    quic
    Create a QUIC server that accepts connections for QUIC address discovery.
    serverserver
    A fully-fledged iroh-relay server over HTTP or HTTPS.

    Structs§

    PingTracker
    Tracks pings on a single relay connection.
    RelayMap
    Configuration of all the relay servers that can be used.
    RelayNode
    Information on a specific relay server.
    RelayQuicConfig
    Configuration for speaking to the QUIC endpoint on the relay -server to do QUIC address discovery.
    \ No newline at end of file +server to do QUIC address discovery.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/constant.IROH_TXT_NAME.html b/pr/3367/docs/iroh_relay/node_info/constant.IROH_TXT_NAME.html index beb52c2c9f..d4816a15f3 100644 --- a/pr/3367/docs/iroh_relay/node_info/constant.IROH_TXT_NAME.html +++ b/pr/3367/docs/iroh_relay/node_info/constant.IROH_TXT_NAME.html @@ -1,2 +1,2 @@ -IROH_TXT_NAME in iroh_relay::node_info - Rust

    Constant IROH_TXT_NAME

    Source
    pub const IROH_TXT_NAME: &str = "_iroh";
    Expand description

    The DNS name for the iroh TXT record.

    +IROH_TXT_NAME in iroh_relay::node_info - Rust

    IROH_TXT_NAME

    Constant IROH_TXT_NAME 

    Source
    pub const IROH_TXT_NAME: &str = "_iroh";
    Expand description

    The DNS name for the iroh TXT record.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/enum.DecodingError.html b/pr/3367/docs/iroh_relay/node_info/enum.DecodingError.html index ba4feb94c4..fb5b6fcd4b 100644 --- a/pr/3367/docs/iroh_relay/node_info/enum.DecodingError.html +++ b/pr/3367/docs/iroh_relay/node_info/enum.DecodingError.html @@ -1,4 +1,4 @@ -DecodingError in iroh_relay::node_info - Rust

    Enum DecodingError

    Source
    #[non_exhaustive]
    pub enum DecodingError { +DecodingError in iroh_relay::node_info - Rust

    DecodingError

    Enum DecodingError 

    Source
    #[non_exhaustive]
    pub enum DecodingError { InvalidEncodingZ32 { source: Z32Error, backtrace: Option<Backtrace>, @@ -14,11 +14,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidEncodingZ32

    Fields

    §source: Z32Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidLength

    Fields

    §len: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidSignature

    Fields

    §source: SignatureError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DecodingError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for DecodingError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for DecodingError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DecodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    InvalidEncodingZ32

    Fields

    §source: Z32Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidLength

    Fields

    §len: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidSignature

    Fields

    §source: SignatureError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for DecodingError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for DecodingError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for DecodingError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for DecodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -29,22 +29,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/enum.EncodingError.html b/pr/3367/docs/iroh_relay/node_info/enum.EncodingError.html index 76c94223a4..da808f5e41 100644 --- a/pr/3367/docs/iroh_relay/node_info/enum.EncodingError.html +++ b/pr/3367/docs/iroh_relay/node_info/enum.EncodingError.html @@ -1,4 +1,4 @@ -EncodingError in iroh_relay::node_info - Rust

    Enum EncodingError

    Source
    #[non_exhaustive]
    pub enum EncodingError { +EncodingError in iroh_relay::node_info - Rust

    EncodingError

    Enum EncodingError 

    Source
    #[non_exhaustive]
    pub enum EncodingError { FailedBuildingPacket { source: SignedPacketBuildError, backtrace: Option<Backtrace>, @@ -9,11 +9,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    FailedBuildingPacket

    Fields

    §source: SignedPacketBuildError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidTxtEntry

    Fields

    §source: SimpleDnsError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for EncodingError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for EncodingError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for EncodingError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for EncodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    FailedBuildingPacket

    Fields

    §source: SignedPacketBuildError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidTxtEntry

    Fields

    §source: SimpleDnsError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for EncodingError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for EncodingError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for EncodingError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for EncodingError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<SignedPacketBuildError> for EncodingError

    Source§

    fn from(error: SignedPacketBuildError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<SignedPacketBuildError> for EncodingError

    Source§

    fn from(error: SignedPacketBuildError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -24,22 +24,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/enum.LookupError.html b/pr/3367/docs/iroh_relay/node_info/enum.LookupError.html deleted file mode 100644 index a0dfe8bff5..0000000000 --- a/pr/3367/docs/iroh_relay/node_info/enum.LookupError.html +++ /dev/null @@ -1,50 +0,0 @@ -LookupError in iroh_relay::node_info - Rust

    Enum LookupError

    Source
    #[non_exhaustive]
    pub enum LookupError { - ParseError { - source: Box<ParseError>, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - LookupFailed { - source: Box<DnsError>, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - InvalidLabel { - source: ProtoError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, -}
    Available on non-wasm_browser only.

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    ParseError

    Fields

    §source: Box<ParseError>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    LookupFailed

    Fields

    §source: Box<DnsError>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidLabel

    Fields

    §source: ProtoError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for LookupError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for LookupError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for LookupError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for LookupError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where - Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, -starting with the current error -and continuing with recursive calls to Error::source. 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
    §

    impl<T> AsErrorSource for T
    where - T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method -to benefit from Rust’s automatic dereferencing of method -receivers.
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/enum.ParseError.html b/pr/3367/docs/iroh_relay/node_info/enum.ParseError.html index 67d45beed8..b69547f256 100644 --- a/pr/3367/docs/iroh_relay/node_info/enum.ParseError.html +++ b/pr/3367/docs/iroh_relay/node_info/enum.ParseError.html @@ -1,4 +1,4 @@ -ParseError in iroh_relay::node_info - Rust

    Enum ParseError

    Source
    #[non_exhaustive]
    pub enum ParseError { +ParseError in iroh_relay::node_info - Rust

    ParseError

    Enum ParseError 

    Source
    #[non_exhaustive]
    pub enum ParseError { UnexpectedFormat { s: String, backtrace: Option<Backtrace>, @@ -29,11 +29,11 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    UnexpectedFormat

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    AttrFromString

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NumLabels

    Fields

    §num_labels: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Utf8

    Fields

    §source: Utf8Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NotAnIrohRecord

    Fields

    §label: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DecodingError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for ParseError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for ParseError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for ParseError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    UnexpectedFormat

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    AttrFromString

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NumLabels

    Fields

    §num_labels: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Utf8

    Fields

    §source: Utf8Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NotAnIrohRecord

    Fields

    §label: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DecodingError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for ParseError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for ParseError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for ParseError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for ParseError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<DecodingError> for ParseError

    Source§

    fn from(error: DecodingError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -44,22 +44,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/index.html b/pr/3367/docs/iroh_relay/node_info/index.html index 7c44a3876d..44198fbd8f 100644 --- a/pr/3367/docs/iroh_relay/node_info/index.html +++ b/pr/3367/docs/iroh_relay/node_info/index.html @@ -1,5 +1,5 @@ -iroh_relay::node_info - Rust

    Module node_info

    Source
    Expand description

    Support for handling DNS resource records for dialing by NodeId.

    -

    Dialing by NodeId is supported by iroh nodes publishing Pkarr records to DNS +iroh_relay::node_info - Rust

    Module node_info

    Module node_info 

    Source
    Expand description

    Support for handling DNS resource records for dialing by [NodeId].

    +

    Dialing by [NodeId] is supported by iroh nodes publishing Pkarr records to DNS servers or the Mainline DHT. This module supports creating and parsing these records.

    DNS records are published under the following names:

    _iroh.<z32-node-id>.<origin-domain> TXT

    @@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re

    _iroh is the record name as defined by IROH_TXT_NAME.

  • -

    <z32-node-id> is the z-base-32 encoding of the NodeId.

    +

    <z32-node-id> is the z-base-32 encoding of the [NodeId].

  • <origin-domain> is the domain name of the publishing DNS server, @@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re in RFC1464. The following attributes are defined:

    • -

      relay=<url>: The home RelayUrl of this node.

      +

      relay=<url>: The home RelayUrl of this node.

    • addr=<addr> <addr>: A space-separated list of sockets addresses for this iroh node. Each address is an IPv4 or IPv6 address with a port.

    -
  • Structs§

    MaxLengthExceededError
    Error returned when an input value is too long for UserData.
    NodeData
    Data about a node that may be published to and resolved from discovery services.
    NodeInfo
    Information about a node that may be published to and resolved from discovery services.
    UserData
    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Enums§

    DecodingError
    EncodingError
    LookupErrorNon-wasm_browser
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    NodeIdExt
    Extension methods for NodeId to encode to and decode from [z32], +

    Structs§

    MaxLengthExceededError
    Error returned when an input value is too long for UserData.
    NodeData
    Data about a node that may be published to and resolved from discovery services.
    NodeInfo
    Information about a node that may be published to and resolved from discovery services.
    UserData
    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Enums§

    DecodingError
    EncodingError
    ParseError

    Constants§

    IROH_TXT_NAME
    The DNS name for the iroh TXT record.

    Traits§

    NodeIdExt
    Extension methods for [NodeId] to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/sidebar-items.js b/pr/3367/docs/iroh_relay/node_info/sidebar-items.js index 6b1db917f7..30ce8a2b78 100644 --- a/pr/3367/docs/iroh_relay/node_info/sidebar-items.js +++ b/pr/3367/docs/iroh_relay/node_info/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["DecodingError","EncodingError","LookupError","ParseError"],"struct":["MaxLengthExceededError","NodeData","NodeInfo","UserData"],"trait":["NodeIdExt"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["IROH_TXT_NAME"],"enum":["DecodingError","EncodingError","ParseError"],"struct":["MaxLengthExceededError","NodeData","NodeInfo","UserData"],"trait":["NodeIdExt"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/struct.MaxLengthExceededError.html b/pr/3367/docs/iroh_relay/node_info/struct.MaxLengthExceededError.html index beb66712ba..9a38fc2772 100644 --- a/pr/3367/docs/iroh_relay/node_info/struct.MaxLengthExceededError.html +++ b/pr/3367/docs/iroh_relay/node_info/struct.MaxLengthExceededError.html @@ -1,6 +1,6 @@ -MaxLengthExceededError in iroh_relay::node_info - Rust

    Struct MaxLengthExceededError

    Source
    pub struct MaxLengthExceededError { /* private fields */ }
    Expand description

    Error returned when an input value is too long for UserData.

    -

    Trait Implementations§

    Source§

    impl Debug for MaxLengthExceededError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for MaxLengthExceededError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for MaxLengthExceededError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for MaxLengthExceededError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +MaxLengthExceededError in iroh_relay::node_info - Rust

    MaxLengthExceededError

    Struct MaxLengthExceededError 

    Source
    pub struct MaxLengthExceededError { /* private fields */ }
    Expand description

    Error returned when an input value is too long for UserData.

    +

    Trait Implementations§

    Source§

    impl Debug for MaxLengthExceededError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for MaxLengthExceededError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for MaxLengthExceededError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for MaxLengthExceededError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where @@ -14,22 +14,31 @@ receivers.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/struct.NodeData.html b/pr/3367/docs/iroh_relay/node_info/struct.NodeData.html index 238c3986d7..b20e35eaf3 100644 --- a/pr/3367/docs/iroh_relay/node_info/struct.NodeData.html +++ b/pr/3367/docs/iroh_relay/node_info/struct.NodeData.html @@ -1,31 +1,31 @@ -NodeData in iroh_relay::node_info - Rust

    Struct NodeData

    Source
    pub struct NodeData { /* private fields */ }
    Expand description

    Data about a node that may be published to and resolved from discovery services.

    -

    This includes an optional RelayUrl, a set of direct addresses, and the optional +NodeData in iroh_relay::node_info - Rust

    NodeData

    Struct NodeData 

    Source
    pub struct NodeData { /* private fields */ }
    Expand description

    Data about a node that may be published to and resolved from discovery services.

    +

    This includes an optional [RelayUrl], a set of direct addresses, and the optional UserData, a string that can be set by applications and is not parsed or used by iroh itself.

    -

    This struct does not include the node’s NodeId, only the data about a certain -node. See NodeInfo for a struct that contains a NodeId with associated NodeData.

    -

    Implementations§

    Source§

    impl NodeData

    Source

    pub fn new( - relay_url: Option<RelayUrl>, +

    This struct does not include the node’s [NodeId], only the data about a certain +node. See NodeInfo for a struct that contains a [NodeId] with associated NodeData.

    +

    Implementations§

    Source§

    impl NodeData

    Source

    pub fn new( + relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>, ) -> Self

    Creates a new NodeData with a relay URL and a set of direct addresses.

    -
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node data.

    -
    Source

    pub fn with_direct_addresses( +

    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node data.

    +
    Source

    pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> Self

    Sets the direct addresses and returns the updated node data.

    -
    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> Self

    Sets the user-defined data and returns the updated node data.

    -
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    -
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    -
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    -
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    -
    Source

    pub fn add_direct_addresses( +

    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> Self

    Sets the user-defined data and returns the updated node data.

    +
    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    +
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    +
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    +
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    +
    Source

    pub fn add_direct_addresses( &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

    Adds direct addresses to the node data.

    -
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    -
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeData

    Source§

    fn clone(&self) -> NodeData

    Returns a copy 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 NodeData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for NodeData

    Source§

    fn default() -> NodeData

    Returns the “default value” for a type. Read more
    Source§

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeData

    Source§

    fn eq(&self, other: &NodeData) -> 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 Eq for NodeData

    Source§

    impl StructuralPartialEq for NodeData

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    +
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    +

    Trait Implementations§

    Source§

    impl Clone for NodeData

    Source§

    fn clone(&self) -> NodeData

    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 NodeData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for NodeData

    Source§

    fn default() -> NodeData

    Returns the “default value” for a type. Read more
    Source§

    impl From<NodeAddr> for NodeData

    Source§

    fn from(node_addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeData

    Source§

    fn eq(&self, other: &NodeData) -> 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 Eq for NodeData

    Source§

    impl StructuralPartialEq for NodeData

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -33,27 +33,34 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/struct.NodeInfo.html b/pr/3367/docs/iroh_relay/node_info/struct.NodeInfo.html index 62193891d4..660aca7a07 100644 --- a/pr/3367/docs/iroh_relay/node_info/struct.NodeInfo.html +++ b/pr/3367/docs/iroh_relay/node_info/struct.NodeInfo.html @@ -1,43 +1,46 @@ -NodeInfo in iroh_relay::node_info - Rust

    Struct NodeInfo

    Source
    pub struct NodeInfo {
    -    pub node_id: NodeId,
    +NodeInfo in iroh_relay::node_info - Rust

    NodeInfo

    Struct NodeInfo 

    Source
    pub struct NodeInfo {
    +    pub node_id: NodeId,
         pub data: NodeData,
     }
    Expand description

    Information about a node that may be published to and resolved from discovery services.

    -

    This struct couples a NodeId with its associated NodeData.

    -

    Fields§

    §node_id: NodeId

    The NodeId of the node this is about.

    +

    This struct couples a [NodeId] with its associated NodeData.

    +

    Fields§

    §node_id: NodeId

    The [NodeId] of the node this is about.

    §data: NodeData

    The information published about the node.

    -

    Implementations§

    Source§

    impl NodeInfo

    Source

    pub fn new(node_id: NodeId) -> Self

    Creates a new NodeInfo with an empty NodeData.

    -
    Source

    pub fn from_parts(node_id: NodeId, data: NodeData) -> Self

    Creates a new NodeInfo from its parts.

    -
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node info.

    -
    Source

    pub fn with_direct_addresses( +

    Implementations§

    Source§

    impl NodeInfo

    Source

    pub fn new(node_id: NodeId) -> Self

    Creates a new NodeInfo with an empty NodeData.

    +
    Source

    pub fn from_parts(node_id: NodeId, data: NodeData) -> Self

    Creates a new NodeInfo from its parts.

    +
    Source

    pub fn with_relay_url(self, relay_url: Option<RelayUrl>) -> Self

    Sets the relay URL and returns the updated node info.

    +
    Source

    pub fn with_direct_addresses( self, direct_addresses: BTreeSet<SocketAddr>, ) -> Self

    Sets the direct addresses and returns the updated node info.

    -
    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> Self

    Sets the user-defined data and returns the updated node info.

    -
    Source

    pub fn to_node_addr(&self) -> NodeAddr

    Converts into a NodeAddr by cloning the needed fields.

    -
    Source

    pub fn into_node_addr(self) -> NodeAddr

    Converts into a NodeAddr without cloning.

    -
    Source

    pub fn from_txt_lookup(lookup: TxtLookup) -> Result<Self, ParseError>

    Available on non-wasm_browser only.

    Parses a NodeInfo from a TXT records lookup.

    -
    Source

    pub fn from_pkarr_signed_packet( +

    Source

    pub fn with_user_data(self, user_data: Option<UserData>) -> Self

    Sets the user-defined data and returns the updated node info.

    +
    Source

    pub fn to_node_addr(&self) -> NodeAddr

    Converts into a [NodeAddr] by cloning the needed fields.

    +
    Source

    pub fn into_node_addr(self) -> NodeAddr

    Converts into a [NodeAddr] without cloning.

    +
    Source

    pub fn from_txt_lookup( + domain_name: String, + lookup: impl Iterator<Item = TxtRecordData>, +) -> Result<Self, ParseError>

    Available on non-wasm_browser only.

    Parses a NodeInfo from DNS TXT lookup.

    +
    Source

    pub fn from_pkarr_signed_packet( packet: &SignedPacket, ) -> Result<Self, ParseError>

    Parses a NodeInfo from a [pkarr::SignedPacket].

    -
    Source

    pub fn to_pkarr_signed_packet( +

    Source

    pub fn to_pkarr_signed_packet( &self, - secret_key: &SecretKey, + secret_key: &SecretKey, ttl: u32, ) -> Result<SignedPacket, EncodingError>

    Creates a [pkarr::SignedPacket].

    -

    This constructs a DNS packet and signs it with a SecretKey.

    -
    Source

    pub fn to_txt_strings(&self) -> Vec<String>

    Converts into a list of {key}={value} strings.

    -

    Methods from Deref<Target = NodeData>§

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    -
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    -
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    -
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    -
    Source

    pub fn add_direct_addresses( +

    This constructs a DNS packet and signs it with a [SecretKey].

    +

    Source

    pub fn to_txt_strings(&self) -> Vec<String>

    Converts into a list of {key}={value} strings.

    +

    Methods from Deref<Target = NodeData>§

    Source

    pub fn relay_url(&self) -> Option<&RelayUrl>

    Returns the relay URL of the node.

    +
    Source

    pub fn user_data(&self) -> Option<&UserData>

    Returns the optional user-defined data of the node.

    +
    Source

    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr>

    Returns the direct addresses of the node.

    +
    Source

    pub fn clear_direct_addresses(&mut self)

    Removes all direct addresses from the node data.

    +
    Source

    pub fn add_direct_addresses( &mut self, addrs: impl IntoIterator<Item = SocketAddr>, )

    Adds direct addresses to the node data.

    -
    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    -
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    -

    Trait Implementations§

    Source§

    impl Clone for NodeInfo

    Source§

    fn clone(&self) -> NodeInfo

    Returns a copy 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 NodeInfo

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for NodeInfo

    Source§

    type Target = NodeData

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl DerefMut for NodeInfo

    Source§

    fn deref_mut(&mut self) -> &mut Self::Target

    Mutably dereferences the value.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeInfo

    Source§

    fn eq(&self, other: &NodeInfo) -> 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 Eq for NodeInfo

    Source§

    impl StructuralPartialEq for NodeInfo

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Source

    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>)

    Sets the relay URL of the node data.

    +
    Source

    pub fn set_user_data(&mut self, user_data: Option<UserData>)

    Sets the user-defined data of the node data.

    +

    Trait Implementations§

    Source§

    impl Clone for NodeInfo

    Source§

    fn clone(&self) -> NodeInfo

    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 NodeInfo

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Deref for NodeInfo

    Source§

    type Target = NodeData

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    Source§

    impl DerefMut for NodeInfo

    Source§

    fn deref_mut(&mut self) -> &mut Self::Target

    Mutably dereferences the value.
    Source§

    impl From<NodeAddr> for NodeInfo

    Source§

    fn from(addr: NodeAddr) -> Self

    Converts to this type from the input type.
    Source§

    impl From<NodeInfo> for NodeAddr

    Source§

    fn from(value: NodeInfo) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for NodeInfo

    Source§

    fn eq(&self, other: &NodeInfo) -> 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 Eq for NodeInfo

    Source§

    impl StructuralPartialEq for NodeInfo

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -45,29 +48,36 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<P, T> Receiver for P
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<P, T> Receiver for P
    where P: Deref<Target = T> + ?Sized, - T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/struct.UserData.html b/pr/3367/docs/iroh_relay/node_info/struct.UserData.html index 23b664f69a..50a098607e 100644 --- a/pr/3367/docs/iroh_relay/node_info/struct.UserData.html +++ b/pr/3367/docs/iroh_relay/node_info/struct.UserData.html @@ -1,21 +1,21 @@ -UserData in iroh_relay::node_info - Rust

    Struct UserData

    Source
    pub struct UserData(/* private fields */);
    Expand description

    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    +UserData in iroh_relay::node_info - Rust

    UserData

    Struct UserData 

    Source
    pub struct UserData(/* private fields */);
    Expand description

    Under the hood this is a UTF-8 String is no longer than UserData::MAX_LENGTH bytes.

    Iroh does not keep track of or examine the user-defined data.

    UserData implements FromStr and TryFrom<String>, so you can convert &str and String into UserData easily.

    -

    Implementations§

    Source§

    impl UserData

    Source

    pub const MAX_LENGTH: usize = 245usize

    The max byte length allowed for user-defined data.

    +

    Implementations§

    Source§

    impl UserData

    Source

    pub const MAX_LENGTH: usize = 245usize

    The max byte length allowed for user-defined data.

    In DNS discovery services, the user-defined data is stored in a TXT record character string, which has a max length of 255 bytes. We need to subtract the user-data= prefix, which leaves 245 bytes for the actual user-defined data.

    -

    Trait Implementations§

    Source§

    impl AsRef<str> for UserData

    Source§

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Clone for UserData

    Source§

    fn clone(&self) -> UserData

    Returns a copy 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 UserData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for UserData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromStr for UserData

    Source§

    type Err = MaxLengthExceededError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for UserData

    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 +

    Trait Implementations§

    Source§

    impl AsRef<str> for UserData

    Source§

    fn as_ref(&self) -> &str

    Converts this type into a shared reference of the (usually inferred) input type.
    Source§

    impl Clone for UserData

    Source§

    fn clone(&self) -> UserData

    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 UserData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for UserData

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl FromStr for UserData

    Source§

    type Err = MaxLengthExceededError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    Source§

    impl Hash for UserData

    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 Ord for UserData

    Source§

    fn cmp(&self, other: &UserData) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for UserData

    Source§

    fn eq(&self, other: &UserData) -> 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 PartialOrd for UserData

    Source§

    fn partial_cmp(&self, other: &UserData) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl TryFrom<String> for UserData

    Source§

    type Error = MaxLengthExceededError

    The type returned in the event of a conversion error.
    Source§

    fn try_from(value: String) -> Result<Self, Self::Error>

    Performs the conversion.
    Source§

    impl Eq for UserData

    Source§

    impl StructuralPartialEq for UserData

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where + Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    Source§

    impl Ord for UserData

    Source§

    fn cmp(&self, other: &UserData) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for UserData

    Source§

    fn eq(&self, other: &UserData) -> 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 PartialOrd for UserData

    Source§

    fn partial_cmp(&self, other: &UserData) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl TryFrom<String> for UserData

    Source§

    type Error = MaxLengthExceededError

    The type returned in the event of a conversion error.
    Source§

    fn try_from(value: String) -> Result<Self, Self::Error>

    Performs the conversion.
    Source§

    impl Eq for UserData

    Source§

    impl StructuralPartialEq for UserData

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -23,30 +23,39 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/node_info/trait.NodeIdExt.html b/pr/3367/docs/iroh_relay/node_info/trait.NodeIdExt.html index 19265ef095..e04c04195b 100644 --- a/pr/3367/docs/iroh_relay/node_info/trait.NodeIdExt.html +++ b/pr/3367/docs/iroh_relay/node_info/trait.NodeIdExt.html @@ -1,9 +1,9 @@ -NodeIdExt in iroh_relay::node_info - Rust

    Trait NodeIdExt

    Source
    pub trait NodeIdExt {
    +NodeIdExt in iroh_relay::node_info - Rust

    NodeIdExt

    Trait NodeIdExt 

    Source
    pub trait NodeIdExt {
         // Required methods
         fn to_z32(&self) -> String;
    -    fn from_z32(s: &str) -> Result<NodeId, DecodingError>;
    -}
    Expand description

    Extension methods for NodeId to encode to and decode from [z32], + fn from_z32(s: &str) -> Result<NodeId, DecodingError>; +}

    Expand description

    Extension methods for [NodeId] to encode to and decode from [z32], which is the encoding used in [pkarr] domain names.

    -

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.

    -
    Source

    fn from_z32(s: &str) -> Result<NodeId, DecodingError>

    Parses a NodeId from [z-base-32] encoding.

    -

    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.

    Implementations on Foreign Types§

    Source§

    impl NodeIdExt for NodeId

    Implementors§

    \ No newline at end of file +

    Required Methods§

    Source

    fn to_z32(&self) -> String

    Encodes a [NodeId] in z-base-32 encoding.

    +
    Source

    fn from_z32(s: &str) -> Result<NodeId, DecodingError>

    Parses a [NodeId] from z-base-32 encoding.

    +

    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.

    Implementations on Foreign Types§

    Source§

    impl NodeIdExt for NodeId

    Implementors§

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/common/enum.FrameType.html b/pr/3367/docs/iroh_relay/protos/common/enum.FrameType.html new file mode 100644 index 0000000000..ddf606fad8 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/common/enum.FrameType.html @@ -0,0 +1,77 @@ +FrameType in iroh_relay::protos::common - Rust

    FrameType

    Enum FrameType 

    Source
    #[repr(u32)]
    pub enum FrameType { +
    Show 13 variants ServerChallenge = 0, + ClientAuth = 1, + ServerConfirmsAuth = 2, + ServerDeniesAuth = 3, + ClientToRelayDatagram = 4, + ClientToRelayDatagramBatch = 5, + RelayToClientDatagram = 6, + RelayToClientDatagramBatch = 7, + NodeGone = 8, + Ping = 9, + Pong = 10, + Health = 11, + Restarting = 12, +
    }
    Expand description

    Possible frame types during handshaking

    +

    Variants§

    §

    ServerChallenge = 0

    The server frame type for the challenge response

    +
    §

    ClientAuth = 1

    The client frame type for the authentication frame

    +
    §

    ServerConfirmsAuth = 2

    The server frame type for authentication confirmation

    +
    §

    ServerDeniesAuth = 3

    The server frame type for authentication denial

    +
    §

    ClientToRelayDatagram = 4

    32B dest pub key + ECN bytes + one datagram’s content

    +
    §

    ClientToRelayDatagramBatch = 5

    32B dest pub key + ECN byte + segment size u16 + datagrams contents

    +
    §

    RelayToClientDatagram = 6

    32B src pub key + ECN bytes + one datagram’s content

    +
    §

    RelayToClientDatagramBatch = 7

    32B src pub key + ECN byte + segment size u16 + datagrams contents

    +
    §

    NodeGone = 8

    Sent from server to client to signal that a previous sender is no longer connected.

    +

    That is, if A sent to B, and then if A disconnects, the server sends FrameType::PeerGone +to B so B can forget that a reverse path exists on that connection to get back to A

    +

    32B pub key of peer that’s gone

    +
    §

    Ping = 9

    Messages with these frames will be ignored. +8 byte ping payload, to be echoed back in FrameType::Pong

    +
    §

    Pong = 10

    8 byte payload, the contents of ping being replied to

    +
    §

    Health = 11

    Sent from server to client to tell the client if their connection is unhealthy somehow. +Contains only UTF-8 bytes.

    +
    §

    Restarting = 12

    Sent from server to client for the server to declare that it’s restarting. +Payload is two big endian u32 durations in milliseconds: when to reconnect, +and how long to try total.

    +

    Trait Implementations§

    Source§

    impl Clone for FrameType

    Source§

    fn clone(&self) -> FrameType

    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 FrameType

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<FrameType> for VarInt

    Source§

    fn from(value: FrameType) -> Self

    Converts to this type from the input type.
    Source§

    impl From<FrameType> for u32

    Source§

    fn from(enum_value: FrameType) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for FrameType

    Source§

    fn eq(&self, other: &FrameType) -> 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 TryFrom<u32> for FrameType

    Source§

    type Error = TryFromPrimitiveError<FrameType>

    The type returned in the event of a conversion error.
    Source§

    fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>

    Performs the conversion.
    Source§

    impl TryFromPrimitive for FrameType

    Source§

    const NAME: &'static str = "FrameType"

    Source§

    type Primitive = u32

    Source§

    type Error = TryFromPrimitiveError<FrameType>

    Source§

    fn try_from_primitive( + number: Self::Primitive, +) -> Result<Self, TryFromPrimitiveError<Self>>

    Source§

    impl Copy for FrameType

    Source§

    impl Eq for FrameType

    Source§

    impl StructuralPartialEq for FrameType

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/common/enum.FrameTypeError.html b/pr/3367/docs/iroh_relay/protos/common/enum.FrameTypeError.html new file mode 100644 index 0000000000..59a96e06c3 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/common/enum.FrameTypeError.html @@ -0,0 +1,53 @@ +FrameTypeError in iroh_relay::protos::common - Rust

    FrameTypeError

    Enum FrameTypeError 

    Source
    #[non_exhaustive]
    pub enum FrameTypeError { + UnexpectedEnd { + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + UnknownFrameType { + tag: VarInt, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, +}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    UnexpectedEnd

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnknownFrameType

    Fields

    §tag: VarInt
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for FrameTypeError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for FrameTypeError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for FrameTypeError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for FrameTypeError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where + Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, +starting with the current error +and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<FrameTypeError> for Error

    Source§

    fn from(error: FrameTypeError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<FrameTypeError> for Error

    Source§

    fn from(error: FrameTypeError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where + T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method +to benefit from Rust’s automatic dereferencing of method +receivers.
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where + TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/common/index.html b/pr/3367/docs/iroh_relay/protos/common/index.html new file mode 100644 index 0000000000..0c0fc2f6c1 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/common/index.html @@ -0,0 +1,4 @@ +iroh_relay::protos::common - Rust

    Module common

    Module common 

    Source
    Expand description

    Common types between the super::handshake and super::relay protocols.

    +

    Hosts the FrameType enum to make sure we’re not accidentally reusing frame type +integers for different frames.

    +

    Enums§

    FrameType
    Possible frame types during handshaking
    FrameTypeError
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/common/sidebar-items.js b/pr/3367/docs/iroh_relay/protos/common/sidebar-items.js new file mode 100644 index 0000000000..b723be505c --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/common/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["FrameType","FrameTypeError"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/disco/constant.MAGIC.html b/pr/3367/docs/iroh_relay/protos/disco/constant.MAGIC.html index b007669bd7..f25d521a89 100644 --- a/pr/3367/docs/iroh_relay/protos/disco/constant.MAGIC.html +++ b/pr/3367/docs/iroh_relay/protos/disco/constant.MAGIC.html @@ -1,2 +1,2 @@ -MAGIC in iroh_relay::protos::disco - Rust

    Constant MAGIC

    Source
    pub const MAGIC: &str = "TS💬";
    Expand description

    The 6 byte header of all discovery messages.

    +MAGIC in iroh_relay::protos::disco - Rust

    MAGIC

    Constant MAGIC 

    Source
    pub const MAGIC: &str = "TS💬";
    Expand description

    The 6 byte header of all discovery messages.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/disco/fn.looks_like_disco_wrapper.html b/pr/3367/docs/iroh_relay/protos/disco/fn.looks_like_disco_wrapper.html index 00a6957610..62b5e1286d 100644 --- a/pr/3367/docs/iroh_relay/protos/disco/fn.looks_like_disco_wrapper.html +++ b/pr/3367/docs/iroh_relay/protos/disco/fn.looks_like_disco_wrapper.html @@ -1,2 +1,2 @@ -looks_like_disco_wrapper in iroh_relay::protos::disco - Rust

    Function looks_like_disco_wrapper

    Source
    pub fn looks_like_disco_wrapper(p: &[u8]) -> bool
    Expand description

    Reports whether p looks like it’s a packet containing an encrypted disco message.

    +looks_like_disco_wrapper in iroh_relay::protos::disco - Rust

    looks_like_disco_wrapper

    Function looks_like_disco_wrapper 

    Source
    pub fn looks_like_disco_wrapper(p: &[u8]) -> bool
    Expand description

    Reports whether p looks like it’s a packet containing an encrypted disco message.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/disco/index.html b/pr/3367/docs/iroh_relay/protos/disco/index.html index 13f4b2cb69..dbe5228523 100644 --- a/pr/3367/docs/iroh_relay/protos/disco/index.html +++ b/pr/3367/docs/iroh_relay/protos/disco/index.html @@ -1,4 +1,4 @@ -iroh_relay::protos::disco - Rust

    Module disco

    Source
    Expand description

    This module exports looks_like_disco_wrapper as the only disco-related relay +iroh_relay::protos::disco - Rust

    Module disco

    Module disco 

    Source
    Expand description

    This module exports looks_like_disco_wrapper as the only disco-related relay functionality.

    Despite the relay not being able to read disco messages by design, it does attempt to identify this traffic to ensure hole-punching messages are not lost do to congestion.

    diff --git a/pr/3367/docs/iroh_relay/protos/handshake/enum.Error.html b/pr/3367/docs/iroh_relay/protos/handshake/enum.Error.html new file mode 100644 index 0000000000..114db731e7 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/handshake/enum.Error.html @@ -0,0 +1,81 @@ +Error in iroh_relay::protos::handshake - Rust

    Error

    Enum Error 

    Source
    #[non_exhaustive]
    pub enum Error { + Websocket { + source: Error, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + UnexpectedEnd { + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + FrameTypeError { + source: FrameTypeError, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + ServerDeniedAuth { + reason: String, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + UnexpectedFrameType { + frame_type: FrameType, + expected_types: Vec<FrameType>, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + DeserializationError { + frame_type: FrameType, + source: Error, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + ClientAuthHeaderInvalid { + value: HeaderValue, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, +}

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Websocket

    Fields

    §source: Error
    Available on non-wasm_browser only.
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnexpectedEnd

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    FrameTypeError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ServerDeniedAuth

    Fields

    §reason: String
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnexpectedFrameType

    Fields

    §frame_type: FrameType
    §expected_types: Vec<FrameType>
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    DeserializationError

    Fields

    §frame_type: FrameType
    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ClientAuthHeaderInvalid

    Available on crate feature server only.

    Failed to deserialize client auth header

    +

    Fields

    §value: HeaderValue
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    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, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for Error
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for Error

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where + Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, +starting with the current error +and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Error> for ConnectError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for Error

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<FrameTypeError> for Error

    Source§

    fn from(error: FrameTypeError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where + T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method +to benefit from Rust’s automatic dereferencing of method +receivers.
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where + TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/handshake/index.html b/pr/3367/docs/iroh_relay/protos/handshake/index.html new file mode 100644 index 0000000000..516a608688 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/handshake/index.html @@ -0,0 +1,22 @@ +iroh_relay::protos::handshake - Rust

    Module handshake

    Module handshake 

    Source
    Expand description

    Implements the handshake protocol that authenticates and authorizes clients connecting to the relays.

    +

    The purpose of the handshake is to

    +
      +
    1. Inform the relay of the client’s NodeId
    2. +
    3. Check that the connecting client owns the secret key for its NodeId (“is authentic”/“authentication”)
    4. +
    5. Possibly check that the client has access to this relay, if the relay requires authorization.
    6. +
    +

    Additional complexity comes from the fact that there’s two ways that clients can authenticate with +relays.

    +

    One way is via an explicitly sent challenge:

    +
      +
    1. Once a websocket connection is opened, a client receives a challenge (the ServerChallenge frame)
    2. +
    3. The client sends back what is essentially a signature of that challenge with their secret key +that matches the NodeId they have, as well as the NodeId (the ClientAuth frame)
    4. +
    +

    The second way is very similar to the Concealed HTTP Auth RFC, and involves send a header that +contains a signature of some shared keying material extracted from TLS (RFC 5705).

    +

    The second way can save a full round trip, because the challenge doesn’t have to be sent to the client +first, however, it won’t always work, as it relies on the keying material extraction feature of TLS, +which is not available in browsers (but might be in the future?) and might break when there’s an +HTTPS proxy that doesn’t properly deal with this TLS feature.

    +

    Enums§

    Error
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/handshake/sidebar-items.js b/pr/3367/docs/iroh_relay/protos/handshake/sidebar-items.js new file mode 100644 index 0000000000..198d8c4275 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/handshake/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {"enum":["Error"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/index.html b/pr/3367/docs/iroh_relay/protos/index.html index 41eaa12e12..b8f94b54e1 100644 --- a/pr/3367/docs/iroh_relay/protos/index.html +++ b/pr/3367/docs/iroh_relay/protos/index.html @@ -1,3 +1,4 @@ -iroh_relay::protos - Rust

    Module protos

    Source
    Expand description

    Protocols used by the iroh-relay

    -

    Modules§

    disco
    This module exports looks_like_disco_wrapper as the only disco-related relay -functionality.
    relay
    This module implements the relaying protocol used by the server and client.
    \ No newline at end of file +iroh_relay::protos - Rust

    Module protos

    Module protos 

    Source
    Expand description

    Protocols used by the iroh-relay

    +

    Modules§

    common
    Common types between the super::handshake and super::relay protocols.
    disco
    This module exports looks_like_disco_wrapper as the only disco-related relay +functionality.
    handshake
    Implements the handshake protocol that authenticates and authorizes clients connecting to the relays.
    relay
    This module implements the send/recv relaying protocol.
    streams
    Implements logic for abstracting over a websocket stream that allows sending only [Bytes]-based +messages.
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/constant.MAX_PACKET_SIZE.html b/pr/3367/docs/iroh_relay/protos/relay/constant.MAX_PACKET_SIZE.html index 169d31f229..1dbf16a570 100644 --- a/pr/3367/docs/iroh_relay/protos/relay/constant.MAX_PACKET_SIZE.html +++ b/pr/3367/docs/iroh_relay/protos/relay/constant.MAX_PACKET_SIZE.html @@ -1,4 +1,4 @@ -MAX_PACKET_SIZE in iroh_relay::protos::relay - Rust

    Constant MAX_PACKET_SIZE

    Source
    pub const MAX_PACKET_SIZE: usize = _; // 65_536usize
    Expand description

    The maximum size of a packet sent over relay. +MAX_PACKET_SIZE in iroh_relay::protos::relay - Rust

    MAX_PACKET_SIZE

    Constant MAX_PACKET_SIZE 

    Source
    pub const MAX_PACKET_SIZE: usize = _; // 65_536usize
    Expand description

    The maximum size of a packet sent over relay. (This only includes the data bytes visible to magicsock, not including its on-wire framing overhead)

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/3367/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html new file mode 100644 index 0000000000..bbf461844a --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html @@ -0,0 +1,83 @@ +ClientToRelayMsg in iroh_relay::protos::relay - Rust

    ClientToRelayMsg

    Enum ClientToRelayMsg 

    Source
    pub enum ClientToRelayMsg {
    +    Ping([u8; 8]),
    +    Pong([u8; 8]),
    +    Datagrams {
    +        dst_node_id: NodeId,
    +        datagrams: Datagrams,
    +    },
    +}
    Expand description

    Messages that clients send to relays.

    +

    Variants§

    §

    Ping([u8; 8])

    Request from the client to the server to reply to the +other side with a RelayToClientMsg::Pong with the given payload.

    +
    §

    Pong([u8; 8])

    Reply to a RelayToClientMsg::Ping from a server +with the payload sent previously in the ping.

    +
    §

    Datagrams

    Request from the client to relay datagrams to given remote node.

    +

    Fields

    §dst_node_id: NodeId

    The remote node to relay to.

    +
    §datagrams: Datagrams

    The datagrams and related metadata to relay.

    +

    Trait Implementations§

    Source§

    impl Clone for ClientToRelayMsg

    Source§

    fn clone(&self) -> ClientToRelayMsg

    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 ClientToRelayMsg

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for ClientToRelayMsg

    Source§

    fn eq(&self, other: &ClientToRelayMsg) -> 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 Sink<ClientToRelayMsg> for Client

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( + self: Pin<&mut Self>, + cx: &mut Context<'_>, +) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( + self: Pin<&mut Self>, + item: ClientToRelayMsg, +) -> Result<(), Self::Error>

    Begin the process of sending a value to the sink. +Each call to this function must be preceded by a successful call to +poll_ready which returned Poll::Ready(Ok(())). Read more
    Source§

    fn poll_flush( + self: Pin<&mut Self>, + cx: &mut Context<'_>, +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( + self: Pin<&mut Self>, + cx: &mut Context<'_>, +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. Read more
    Source§

    impl Sink<ClientToRelayMsg> for ClientSink

    Source§

    type Error = SendError

    The type of value produced by the sink when an error occurs.
    Source§

    fn poll_ready( + self: Pin<&mut Self>, + cx: &mut Context<'_>, +) -> Poll<Result<(), Self::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    Source§

    fn start_send( + self: Pin<&mut Self>, + item: ClientToRelayMsg, +) -> Result<(), Self::Error>

    Begin the process of sending a value to the sink. +Each call to this function must be preceded by a successful call to +poll_ready which returned Poll::Ready(Ok(())). Read more
    Source§

    fn poll_flush( + self: Pin<&mut Self>, + cx: &mut Context<'_>, +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output from this sink. Read more
    Source§

    fn poll_close( + self: Pin<&mut Self>, + cx: &mut Context<'_>, +) -> Poll<Result<(), Self::Error>>

    Flush any remaining output and close this sink, if necessary. Read more
    Source§

    impl Eq for ClientToRelayMsg

    Source§

    impl StructuralPartialEq for ClientToRelayMsg

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/enum.Error.html b/pr/3367/docs/iroh_relay/protos/relay/enum.Error.html new file mode 100644 index 0000000000..342ffc8ea3 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/relay/enum.Error.html @@ -0,0 +1,89 @@ +Error in iroh_relay::protos::relay - Rust

    Error

    Enum Error 

    Source
    #[non_exhaustive]
    pub enum Error { + UnexpectedFrame { + got: FrameType, + expected: FrameType, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + FrameTooLarge { + frame_len: usize, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + SerDe { + source: Error, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + FrameTypeError { + source: FrameTypeError, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + InvalidPublicKey { + source: SignatureError, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + InvalidFrame { + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + InvalidFrameType { + frame_type: FrameType, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + InvalidProtocolMessageEncoding { + source: Utf8Error, + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, + TooSmall { + backtrace: Option<Backtrace>, + span_trace: SpanTrace, + }, +}
    Expand description

    Protocol send errors.

    +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    UnexpectedFrame

    Fields

    §expected: FrameType
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    FrameTooLarge

    Fields

    §frame_len: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    SerDe

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    FrameTypeError

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidPublicKey

    Fields

    §source: SignatureError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidFrame

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidFrameType

    Fields

    §frame_type: FrameType
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidProtocolMessageEncoding

    Fields

    §source: Utf8Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    TooSmall

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    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, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for Error
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for Error

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where + Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, +starting with the current error +and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Error> for Error

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: ProtoError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<FrameTypeError> for Error

    Source§

    fn from(error: FrameTypeError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where + T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method +to benefit from Rust’s automatic dereferencing of method +receivers.
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where + TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/enum.FrameType.html b/pr/3367/docs/iroh_relay/protos/relay/enum.FrameType.html deleted file mode 100644 index ce6d01e2b4..0000000000 --- a/pr/3367/docs/iroh_relay/protos/relay/enum.FrameType.html +++ /dev/null @@ -1,70 +0,0 @@ -FrameType in iroh_relay::protos::relay - Rust

    Enum FrameType

    Source
    #[repr(u8)]
    pub enum FrameType { - ClientInfo = 2, - SendPacket = 4, - RecvPacket = 5, - KeepAlive = 6, - NotePreferred = 7, - PeerGone = 8, - Ping = 12, - Pong = 13, - Health = 14, - Restarting = 15, - Unknown = 255, -}
    Expand description

    The one byte frame type at the beginning of the frame -header. The second field is a big-endian u32 describing the -length of the remaining frame (not including the initial 5 bytes)

    -

    Variants§

    §

    ClientInfo = 2

    magic + 32b pub key + 24B nonce + bytes

    -
    §

    SendPacket = 4

    32B dest pub key + packet bytes

    -
    §

    RecvPacket = 5

    v0/1 packet bytes, v2: 32B src pub key + packet bytes

    -
    §

    KeepAlive = 6

    no payload, no-op (to be replaced with ping/pong)

    -
    §

    NotePreferred = 7

    1 byte payload: 0x01 or 0x00 for whether this is client’s home node

    -
    §

    PeerGone = 8

    Sent from server to client to signal that a previous sender is no longer connected.

    -

    That is, if A sent to B, and then if A disconnects, the server sends FrameType::PeerGone -to B so B can forget that a reverse path exists on that connection to get back to A

    -

    32B pub key of peer that’s gone

    -
    §

    Ping = 12

    Frames 9-11 concern meshing, which we have eliminated from our version of the protocol. -Messages with these frames will be ignored. -8 byte ping payload, to be echoed back in FrameType::Pong

    -
    §

    Pong = 13

    8 byte payload, the contents of ping being replied to

    -
    §

    Health = 14

    Sent from server to client to tell the client if their connection is -unhealthy somehow.

    -

    Currently this is used to indicate that the connection was closed because of authentication issues.

    -
    §

    Restarting = 15

    Sent from server to client for the server to declare that it’s restarting. -Payload is two big endian u32 durations in milliseconds: when to reconnect, -and how long to try total.

    -

    Handled on the [relay::Client], but currently never sent on the [relay::Server]

    -
    §

    Unknown = 255

    Unknown frame type

    -

    Trait Implementations§

    Source§

    impl Clone for FrameType

    Source§

    fn clone(&self) -> FrameType

    Returns a copy 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 FrameType

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for FrameType

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<FrameType> for u8

    Source§

    fn from(enum_value: FrameType) -> Self

    Converts to this type from the input type.
    Source§

    impl From<u8> for FrameType

    Source§

    fn from(number: u8) -> Self

    Converts to this type from the input type.
    Source§

    impl FromPrimitive for FrameType

    Source§

    type Primitive = u8

    Source§

    fn from_primitive(number: Self::Primitive) -> Self

    Source§

    impl PartialEq for FrameType

    Source§

    fn eq(&self, other: &FrameType) -> 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 Copy for FrameType

    Source§

    impl Eq for FrameType

    Source§

    impl StructuralPartialEq for FrameType

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/enum.RecvError.html b/pr/3367/docs/iroh_relay/protos/relay/enum.RecvError.html deleted file mode 100644 index aa9203dbf7..0000000000 --- a/pr/3367/docs/iroh_relay/protos/relay/enum.RecvError.html +++ /dev/null @@ -1,80 +0,0 @@ -RecvError in iroh_relay::protos::relay - Rust

    Enum RecvError

    Source
    #[non_exhaustive]
    pub enum RecvError { - Io { - source: Error, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - UnexpectedFrame { - got: FrameType, - expected: FrameType, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - FrameTooLarge { - frame_len: usize, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - Timeout { - source: Elapsed, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - SerDe { - source: Error, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - InvalidSignature { - source: SignatureError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - InvalidFrame { - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - InvalidFrameType { - frame_type: FrameType, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - TooSmall { - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, -}
    Expand description

    Protocol send errors.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Io

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    UnexpectedFrame

    Fields

    §expected: FrameType
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    FrameTooLarge

    Fields

    §frame_len: usize
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Timeout

    Fields

    §source: Elapsed
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    SerDe

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidSignature

    Fields

    §source: SignatureError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidFrame

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    InvalidFrameType

    Fields

    §frame_type: FrameType
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    TooSmall

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for RecvError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for RecvError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for RecvError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for RecvError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where - Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, -starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Elapsed> for RecvError

    Source§

    fn from(error: Elapsed) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for RecvError

    Source§

    fn from(error: SignatureError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RecvError> for RecvError

    Source§

    fn from(error: RecvRelayError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where - T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method -to benefit from Rust’s automatic dereferencing of method -receivers.
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/3367/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html new file mode 100644 index 0000000000..2d369f2907 --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html @@ -0,0 +1,78 @@ +RelayToClientMsg in iroh_relay::protos::relay - Rust

    RelayToClientMsg

    Enum RelayToClientMsg 

    Source
    pub enum RelayToClientMsg {
    +    Datagrams {
    +        remote_node_id: NodeId,
    +        datagrams: Datagrams,
    +    },
    +    NodeGone(NodeId),
    +    Health {
    +        problem: String,
    +    },
    +    Restarting {
    +        reconnect_in: Duration,
    +        try_for: Duration,
    +    },
    +    Ping([u8; 8]),
    +    Pong([u8; 8]),
    +}
    Expand description

    The messages that a relay sends to clients or the clients receive from the relay.

    +

    Variants§

    §

    Datagrams

    Represents datagrams sent from relays (originally sent to them by another client).

    +

    Fields

    §remote_node_id: NodeId

    The [NodeId] of the original sender.

    +
    §datagrams: Datagrams

    The datagrams and related metadata.

    +
    §

    NodeGone(NodeId)

    Indicates that the client identified by the underlying public key had previously sent you a +packet but has now disconnected from the relay.

    +
    §

    Health

    A one-way message from relay to client, declaring the connection health state.

    +

    Fields

    §problem: String

    If set, is a description of why the connection is unhealthy.

    +

    If None means the connection is healthy again.

    +

    The default condition is healthy, so the relay doesn’t broadcast a RelayToClientMsg::Health +until a problem exists.

    +
    §

    Restarting

    A one-way message from relay to client, advertising that the relay is restarting.

    +

    Fields

    §reconnect_in: Duration

    An advisory duration that the client should wait before attempting to reconnect. +It might be zero. It exists for the relay to smear out the reconnects.

    +
    §try_for: Duration

    An advisory duration for how long the client should attempt to reconnect +before giving up and proceeding with its normal connection failure logic. The interval +between retries is undefined for now. A relay should not send a try_for duration more +than a few seconds.

    +
    §

    Ping([u8; 8])

    Request from the relay to reply to the +other side with a ClientToRelayMsg::Pong with the given payload.

    +
    §

    Pong([u8; 8])

    Reply to a ClientToRelayMsg::Ping from a client +with the payload sent previously in the ping.

    +

    Implementations§

    Source§

    impl RelayToClientMsg

    Source

    pub fn typ(&self) -> FrameType

    Returns this frame’s corresponding frame type.

    +

    Trait Implementations§

    Source§

    impl Clone for RelayToClientMsg

    Source§

    fn clone(&self) -> RelayToClientMsg

    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 RelayToClientMsg

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for RelayToClientMsg

    Source§

    fn eq(&self, other: &RelayToClientMsg) -> 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 Eq for RelayToClientMsg

    Source§

    impl StructuralPartialEq for RelayToClientMsg

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/enum.SendError.html b/pr/3367/docs/iroh_relay/protos/relay/enum.SendError.html deleted file mode 100644 index 11d0bb0d24..0000000000 --- a/pr/3367/docs/iroh_relay/protos/relay/enum.SendError.html +++ /dev/null @@ -1,56 +0,0 @@ -SendError in iroh_relay::protos::relay - Rust

    Enum SendError

    Source
    #[non_exhaustive]
    pub enum SendError { - Io { - source: Error, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - Timeout { - source: Elapsed, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - ConnSend { - source: SendError, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, - SerDe { - source: Error, - backtrace: Option<Backtrace>, - span_trace: SpanTrace, - }, -}
    Expand description

    Protocol send errors.

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Io

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Timeout

    Fields

    §source: Elapsed
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    ConnSend

    Fields

    §source: SendError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    SerDe

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SendError

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SendError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SendError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SendError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where - Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, -starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<Elapsed> for SendError

    Source§

    fn from(error: Elapsed) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for SendError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<Error> for SendError

    Source§

    fn from(error: Error) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SendError> for ConnectError

    Source§

    fn from(error: SendRelayError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SendError> for RecvError

    Source§

    fn from(error: SendRelayError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<SendError> for SendError

    Source§

    fn from(error: ConnSendError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where - T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method -to benefit from Rust’s automatic dereferencing of method -receivers.
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where - T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where - T: 'a,

    §

    fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where - V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/index.html b/pr/3367/docs/iroh_relay/protos/relay/index.html index c813af423d..dc6a9e0903 100644 --- a/pr/3367/docs/iroh_relay/protos/relay/index.html +++ b/pr/3367/docs/iroh_relay/protos/relay/index.html @@ -1,19 +1,12 @@ -iroh_relay::protos::relay - Rust

    Module relay

    Source
    Expand description

    This module implements the relaying protocol used by the server and client.

    +iroh_relay::protos::relay - Rust

    Module relay

    Module relay 

    Source
    Expand description

    This module implements the send/recv relaying protocol.

    Protocol flow:

    -

    Login:

    -

    Steady state:

    -
      -
    • server occasionally sends FrameType::KeepAlive (or FrameType::Ping)
    • -
    • client responds to any FrameType::Ping with a FrameType::Pong
    • -
    • clients sends FrameType::SendPacket
    • -
    • server then sends FrameType::RecvPacket to recipient
    • -
    -

    Enums§

    FrameType
    The one byte frame type at the beginning of the frame -header. The second field is a big-endian u32 describing the -length of the remaining frame (not including the initial 5 bytes)
    RecvError
    Protocol send errors.
    SendError
    Protocol send errors.

    Constants§

    MAX_PACKET_SIZE
    The maximum size of a packet sent over relay. +

    Structs§

    Datagrams
    One or multiple datagrams being transferred via the relay.

    Enums§

    ClientToRelayMsg
    Messages that clients send to relays.
    Error
    Protocol send errors.
    RelayToClientMsg
    The messages that a relay sends to clients or the clients receive from the relay.

    Constants§

    MAX_PACKET_SIZE
    The maximum size of a packet sent over relay. (This only includes the data bytes visible to magicsock, not including its on-wire framing overhead)
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/sidebar-items.js b/pr/3367/docs/iroh_relay/protos/relay/sidebar-items.js index 04fe63be14..b40bc51fa5 100644 --- a/pr/3367/docs/iroh_relay/protos/relay/sidebar-items.js +++ b/pr/3367/docs/iroh_relay/protos/relay/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["MAX_PACKET_SIZE"],"enum":["FrameType","RecvError","SendError"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["MAX_PACKET_SIZE"],"enum":["ClientToRelayMsg","Error","RelayToClientMsg"],"struct":["Datagrams"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/relay/struct.Datagrams.html b/pr/3367/docs/iroh_relay/protos/relay/struct.Datagrams.html new file mode 100644 index 0000000000..198912a51a --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/relay/struct.Datagrams.html @@ -0,0 +1,60 @@ +Datagrams in iroh_relay::protos::relay - Rust

    Datagrams

    Struct Datagrams 

    Source
    pub struct Datagrams {
    +    pub ecn: Option<EcnCodepoint>,
    +    pub segment_size: Option<NonZeroU16>,
    +    pub contents: Bytes,
    +}
    Expand description

    One or multiple datagrams being transferred via the relay.

    +

    This type is modeled after [quinn_proto::Transmit] +(or even more similarly quinn_udp::Transmit, but we don’t depend on that library here).

    +

    Fields§

    §ecn: Option<EcnCodepoint>

    Explicit congestion notification bits

    +
    §segment_size: Option<NonZeroU16>

    The segment size if this transmission contains multiple datagrams. +This is None if the transmit only contains a single datagram

    +
    §contents: Bytes

    The contents of the datagram(s)

    +

    Implementations§

    Source§

    impl Datagrams

    Source

    pub fn take_segments(&mut self, num_segments: usize) -> Datagrams

    Splits the current datagram into at maximum num_segments segments, returning +the batch with at most num_segments and leaving only the rest in self.

    +

    Calling this on a datagram batch that only contains a single datagram (segment_size == None) +will result in returning essentially a clone of self, while making self empty afterwards.

    +

    Calling this on a datagram batch with e.g. 15 datagrams with num_segments == 10 will +result in returning a datagram batch that contains the first 10 datagrams and leave self +containing the remaining 5 datagrams.

    +

    Calling this on a datagram batch with less than num_segments datagrams will result in +making self empty and returning essentially a clone of self.

    +

    Trait Implementations§

    Source§

    impl Clone for Datagrams

    Source§

    fn clone(&self) -> Datagrams

    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 Datagrams

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<T: AsRef<[u8]>> From<T> for Datagrams

    Source§

    fn from(bytes: T) -> Self

    Converts to this type from the input type.
    Source§

    impl PartialEq for Datagrams

    Source§

    fn eq(&self, other: &Datagrams) -> 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 Eq for Datagrams

    Source§

    impl StructuralPartialEq for Datagrams

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where + T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where + T: 'a,

    §

    fn implicit( + self, + class: Class, + constructed: bool, + tag: u32, +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    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.

    +
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/sidebar-items.js b/pr/3367/docs/iroh_relay/protos/sidebar-items.js index eb86c1f87a..92cb22588a 100644 --- a/pr/3367/docs/iroh_relay/protos/sidebar-items.js +++ b/pr/3367/docs/iroh_relay/protos/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"mod":["disco","relay"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"mod":["common","disco","handshake","relay","streams"]}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/streams/index.html b/pr/3367/docs/iroh_relay/protos/streams/index.html new file mode 100644 index 0000000000..7e19d3630e --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/streams/index.html @@ -0,0 +1,3 @@ +iroh_relay::protos::streams - Rust

    Module streams

    Module streams 

    Source
    Expand description

    Implements logic for abstracting over a websocket stream that allows sending only [Bytes]-based +messages.

    +
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/protos/streams/sidebar-items.js b/pr/3367/docs/iroh_relay/protos/streams/sidebar-items.js new file mode 100644 index 0000000000..5244ce01cc --- /dev/null +++ b/pr/3367/docs/iroh_relay/protos/streams/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/quic/constant.ALPN_QUIC_ADDR_DISC.html b/pr/3367/docs/iroh_relay/quic/constant.ALPN_QUIC_ADDR_DISC.html index 21d7c6394b..5af9f552a7 100644 --- a/pr/3367/docs/iroh_relay/quic/constant.ALPN_QUIC_ADDR_DISC.html +++ b/pr/3367/docs/iroh_relay/quic/constant.ALPN_QUIC_ADDR_DISC.html @@ -1,2 +1,2 @@ -ALPN_QUIC_ADDR_DISC in iroh_relay::quic - Rust

    Constant ALPN_QUIC_ADDR_DISC

    Source
    pub const ALPN_QUIC_ADDR_DISC: &[u8] = b"/iroh-qad/0";
    Expand description

    ALPN for our quic addr discovery

    +ALPN_QUIC_ADDR_DISC in iroh_relay::quic - Rust

    ALPN_QUIC_ADDR_DISC

    Constant ALPN_QUIC_ADDR_DISC 

    Source
    pub const ALPN_QUIC_ADDR_DISC: &[u8] = b"/iroh-qad/0";
    Expand description

    ALPN for our quic addr discovery

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_CODE.html b/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_CODE.html index a0d0008448..a3a5e65229 100644 --- a/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_CODE.html +++ b/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_CODE.html @@ -1,2 +1,2 @@ -QUIC_ADDR_DISC_CLOSE_CODE in iroh_relay::quic - Rust

    Constant QUIC_ADDR_DISC_CLOSE_CODE

    Source
    pub const QUIC_ADDR_DISC_CLOSE_CODE: VarInt;
    Expand description

    Endpoint close error code

    +QUIC_ADDR_DISC_CLOSE_CODE in iroh_relay::quic - Rust

    QUIC_ADDR_DISC_CLOSE_CODE

    Constant QUIC_ADDR_DISC_CLOSE_CODE 

    Source
    pub const QUIC_ADDR_DISC_CLOSE_CODE: VarInt;
    Expand description

    Endpoint close error code

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_REASON.html b/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_REASON.html index 57c5be749b..697bcabfb0 100644 --- a/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_REASON.html +++ b/pr/3367/docs/iroh_relay/quic/constant.QUIC_ADDR_DISC_CLOSE_REASON.html @@ -1,2 +1,2 @@ -QUIC_ADDR_DISC_CLOSE_REASON in iroh_relay::quic - Rust

    Constant QUIC_ADDR_DISC_CLOSE_REASON

    Source
    pub const QUIC_ADDR_DISC_CLOSE_REASON: &[u8] = b"finished";
    Expand description

    Endpoint close reason

    +QUIC_ADDR_DISC_CLOSE_REASON in iroh_relay::quic - Rust

    QUIC_ADDR_DISC_CLOSE_REASON

    Constant QUIC_ADDR_DISC_CLOSE_REASON 

    Source
    pub const QUIC_ADDR_DISC_CLOSE_REASON: &[u8] = b"finished";
    Expand description

    Endpoint close reason

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/quic/enum.Error.html b/pr/3367/docs/iroh_relay/quic/enum.Error.html index efd79a2cdc..3332ab1b68 100644 --- a/pr/3367/docs/iroh_relay/quic/enum.Error.html +++ b/pr/3367/docs/iroh_relay/quic/enum.Error.html @@ -1,4 +1,4 @@ -Error in iroh_relay::quic - Rust

    Enum Error

    Source
    #[non_exhaustive]
    pub enum Error { +Error in iroh_relay::quic - Rust

    Error

    Enum Error 

    Source
    #[non_exhaustive]
    pub enum Error { Connect { source: ConnectError, backtrace: Option<Backtrace>, @@ -16,7 +16,7 @@ }, }
    Expand description

    Quic client related errors.

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Connect

    Fields

    §source: ConnectError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    Connection

    Fields

    §source: ConnectionError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    WatchRecv

    Fields

    §source: RecvError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    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, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for Error
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for Error

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for Error

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<ConnectError> for Error

    Source§

    fn from(error: ConnectError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<ConnectionError> for Error

    Source§

    fn from(error: ConnectionError) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RecvError> for Error

    Source§

    fn from(error: RecvError) -> Self

    Converts to this type from the input type.

    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 @@ -30,22 +30,31 @@ receivers.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static,
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/quic/index.html b/pr/3367/docs/iroh_relay/quic/index.html index 228448fb10..a371ea1906 100644 --- a/pr/3367/docs/iroh_relay/quic/index.html +++ b/pr/3367/docs/iroh_relay/quic/index.html @@ -1,3 +1,3 @@ -iroh_relay::quic - Rust

    Module quic

    Source
    Expand description

    Create a QUIC server that accepts connections +iroh_relay::quic - Rust

    Module quic

    Module quic 

    Source
    Expand description

    Create a QUIC server that accepts connections for QUIC address discovery.

    Structs§

    QuicClient
    Handles the client side of QUIC address discovery.

    Enums§

    Error
    Quic client related errors.

    Constants§

    ALPN_QUIC_ADDR_DISC
    ALPN for our quic addr discovery
    QUIC_ADDR_DISC_CLOSE_CODE
    Endpoint close error code
    QUIC_ADDR_DISC_CLOSE_REASON
    Endpoint close reason
    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/quic/struct.QuicClient.html b/pr/3367/docs/iroh_relay/quic/struct.QuicClient.html index 12d7eefd66..936d5784c0 100644 --- a/pr/3367/docs/iroh_relay/quic/struct.QuicClient.html +++ b/pr/3367/docs/iroh_relay/quic/struct.QuicClient.html @@ -1,4 +1,4 @@ -QuicClient in iroh_relay::quic - Rust

    Struct QuicClient

    Source
    pub struct QuicClient { /* private fields */ }
    Expand description

    Handles the client side of QUIC address discovery.

    +QuicClient in iroh_relay::quic - Rust

    QuicClient

    Struct QuicClient 

    Source
    pub struct QuicClient { /* private fields */ }
    Expand description

    Handles the client side of QUIC address discovery.

    Implementations§

    Source§

    impl QuicClient

    Source

    pub fn new(ep: Endpoint, client_config: ClientConfig) -> Self

    Create a new QuicClient to handle the client side of QUIC address discovery.

    Source

    pub async fn create_conn( @@ -6,7 +6,7 @@ address discovery.

    server_addr: SocketAddr, host: &str, ) -> Result<Connection, Error>

    Create a connection usable for qad

    -

    Trait Implementations§

    Source§

    impl Clone for QuicClient

    Source§

    fn clone(&self) -> QuicClient

    Returns a copy 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 QuicClient

    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 +

    Trait Implementations§

    Source§

    impl Clone for QuicClient

    Source§

    fn clone(&self) -> QuicClient

    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 QuicClient

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,23 +14,30 @@ address discovery.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/constant.DEFAULT_CERT_RELOAD_INTERVAL.html b/pr/3367/docs/iroh_relay/server/constant.DEFAULT_CERT_RELOAD_INTERVAL.html index d23aa76812..b38863ef19 100644 --- a/pr/3367/docs/iroh_relay/server/constant.DEFAULT_CERT_RELOAD_INTERVAL.html +++ b/pr/3367/docs/iroh_relay/server/constant.DEFAULT_CERT_RELOAD_INTERVAL.html @@ -1,2 +1,2 @@ -DEFAULT_CERT_RELOAD_INTERVAL in iroh_relay::server - Rust

    Constant DEFAULT_CERT_RELOAD_INTERVAL

    Source
    pub const DEFAULT_CERT_RELOAD_INTERVAL: Duration;
    Available on crate feature server only.
    Expand description

    The default certificate reload interval.

    +DEFAULT_CERT_RELOAD_INTERVAL in iroh_relay::server - Rust

    DEFAULT_CERT_RELOAD_INTERVAL

    Constant DEFAULT_CERT_RELOAD_INTERVAL 

    Source
    pub const DEFAULT_CERT_RELOAD_INTERVAL: Duration;
    Available on crate feature server only.
    Expand description

    The default certificate reload interval.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/enum.Access.html b/pr/3367/docs/iroh_relay/server/enum.Access.html index 57ca5b9718..9f9215fc13 100644 --- a/pr/3367/docs/iroh_relay/server/enum.Access.html +++ b/pr/3367/docs/iroh_relay/server/enum.Access.html @@ -1,11 +1,11 @@ -Access in iroh_relay::server - Rust

    Enum Access

    Source
    pub enum Access {
    +Access in iroh_relay::server - Rust

    Access

    Enum Access 

    Source
    pub enum Access {
         Allow,
         Deny,
     }
    Available on crate feature server only.
    Expand description

    Access restriction for a node.

    Variants§

    §

    Allow

    Access is allowed.

    §

    Deny

    Access is denied.

    -

    Trait Implementations§

    Source§

    impl Clone for Access

    Source§

    fn clone(&self) -> Access

    Returns a copy 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 Access

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for Access

    Source§

    fn eq(&self, other: &Access) -> 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 Copy for Access

    Source§

    impl Eq for Access

    Source§

    impl StructuralPartialEq for Access

    Auto Trait Implementations§

    §

    impl Freeze for Access

    §

    impl RefUnwindSafe for Access

    §

    impl Send for Access

    §

    impl Sync for Access

    §

    impl Unpin for Access

    §

    impl UnwindSafe for Access

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for Access

    Source§

    fn clone(&self) -> Access

    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 Access

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl PartialEq for Access

    Source§

    fn eq(&self, other: &Access) -> 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 Copy for Access

    Source§

    impl Eq for Access

    Source§

    impl StructuralPartialEq for Access

    Auto Trait Implementations§

    §

    impl Freeze for Access

    §

    impl RefUnwindSafe for Access

    §

    impl Send for Access

    §

    impl Sync for Access

    §

    impl Unpin for Access

    §

    impl UnwindSafe for Access

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -13,27 +13,34 @@ and should not be overridden without very good reason.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/enum.AccessConfig.html b/pr/3367/docs/iroh_relay/server/enum.AccessConfig.html index fad62ac39e..f8575c29de 100644 --- a/pr/3367/docs/iroh_relay/server/enum.AccessConfig.html +++ b/pr/3367/docs/iroh_relay/server/enum.AccessConfig.html @@ -1,11 +1,11 @@ -AccessConfig in iroh_relay::server - Rust

    Enum AccessConfig

    Source
    pub enum AccessConfig {
    +AccessConfig in iroh_relay::server - Rust

    AccessConfig

    Enum AccessConfig 

    Source
    pub enum AccessConfig {
         Everyone,
    -    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
    +    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
     }
    Available on crate feature server only.
    Expand description

    Controls which nodes are allowed to use the relay.

    Variants§

    §

    Everyone

    Everyone

    -
    §

    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>)

    Only nodes for which the function returns Access::Allow.

    -

    Implementations§

    Source§

    impl AccessConfig

    Source

    pub async fn is_allowed(&self, node: NodeId) -> bool

    Is this node allowed?

    -

    Trait Implementations§

    Source§

    impl Debug for AccessConfig

    Source§

    fn fmt(&self, __derive_more_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 +
    §

    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>)

    Only nodes for which the function returns Access::Allow.

    +

    Implementations§

    Source§

    impl AccessConfig

    Source

    pub async fn is_allowed(&self, node: NodeId) -> bool

    Is this node allowed?

    +

    Trait Implementations§

    Source§

    impl Debug for AccessConfig

    Source§

    fn fmt(&self, __derive_more_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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -13,20 +13,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/enum.CertConfig.html b/pr/3367/docs/iroh_relay/server/enum.CertConfig.html index 076aa9ef9e..15f93d907d 100644 --- a/pr/3367/docs/iroh_relay/server/enum.CertConfig.html +++ b/pr/3367/docs/iroh_relay/server/enum.CertConfig.html @@ -1,4 +1,4 @@ -CertConfig in iroh_relay::server - Rust

    Enum CertConfig

    Source
    pub enum CertConfig<EC: Debug, EA: Debug = EC> {
    +CertConfig in iroh_relay::server - Rust

    CertConfig

    Enum CertConfig 

    Source
    pub enum CertConfig<EC: Debug, EA: Debug = EC> {
         LetsEncrypt {
             state: AcmeState<EC, EA>,
         },
    @@ -12,7 +12,7 @@
     
    §

    Manual

    Use a static TLS key and certificate chain.

    Fields

    §certs: Vec<CertificateDer<'static>>

    The TLS certificate chain.

    §

    Reloading

    Use a TLS key and certificate chain that can be reloaded.

    -

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for CertConfig<EC, EA>

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for CertConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for CertConfig<EC, EA>

    §

    impl<EC, EA> Send for CertConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for CertConfig<EC, EA>

    §

    impl<EC, EA> Unpin for CertConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for CertConfig<EC, EA>

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for CertConfig<EC, EA>

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for CertConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for CertConfig<EC, EA>

    §

    impl<EC, EA> Send for CertConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for CertConfig<EC, EA>

    §

    impl<EC, EA> Unpin for CertConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for CertConfig<EC, EA>

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -20,20 +20,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/enum.SpawnError.html b/pr/3367/docs/iroh_relay/server/enum.SpawnError.html index 3f86f477cd..cd62bfd589 100644 --- a/pr/3367/docs/iroh_relay/server/enum.SpawnError.html +++ b/pr/3367/docs/iroh_relay/server/enum.SpawnError.html @@ -1,4 +1,4 @@ -SpawnError in iroh_relay::server - Rust

    Enum SpawnError

    Source
    #[non_exhaustive]
    pub enum SpawnError { +SpawnError in iroh_relay::server - Rust

    SpawnError

    Enum SpawnError 

    Source
    #[non_exhaustive]
    pub enum SpawnError { LocalAddr { source: Error, backtrace: Option<Backtrace>, @@ -30,8 +30,8 @@ span_trace: SpanTrace, }, }
    Available on crate feature server only.
    Expand description

    Server spawn errors

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    LocalAddr

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    QuicSpawn

    Fields

    §source: QuicSpawnError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    TlsHeaderParse

    Fields

    §source: InvalidHeaderValue
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    BindTlsListener

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoLocalAddr

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    BindTcpListener

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SpawnError

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SpawnError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SpawnError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SpawnError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    LocalAddr

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    QuicSpawn

    Fields

    §source: QuicSpawnError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    TlsHeaderParse

    Fields

    §source: InvalidHeaderValue
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    BindTlsListener

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoLocalAddr

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    BindTcpListener

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SpawnError

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SpawnError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SpawnError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SpawnError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where @@ -45,22 +45,31 @@ receivers.

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/enum.SupervisorError.html b/pr/3367/docs/iroh_relay/server/enum.SupervisorError.html index 206c4a9b04..4a8808c6ca 100644 --- a/pr/3367/docs/iroh_relay/server/enum.SupervisorError.html +++ b/pr/3367/docs/iroh_relay/server/enum.SupervisorError.html @@ -1,4 +1,4 @@ -SupervisorError in iroh_relay::server - Rust

    Enum SupervisorError

    Source
    #[non_exhaustive]
    pub enum SupervisorError { +SupervisorError in iroh_relay::server - Rust

    SupervisorError

    Enum SupervisorError 

    Source
    #[non_exhaustive]
    pub enum SupervisorError { Metrics { source: Error, backtrace: Option<Backtrace>, @@ -22,11 +22,11 @@ span_trace: SpanTrace, }, }
    Available on crate feature server only.
    Expand description

    Server task errors

    -

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Metrics

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    AcmeEventStreamFinished

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    JoinError

    Fields

    §source: JoinError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoRelayServicesEnabled

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    TaskCancelled

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SupervisorError

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SupervisorError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SupervisorError
    where - Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SupervisorError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where +

    Variants (Non-exhaustive)§

    This enum is marked as non-exhaustive
    Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
    §

    Metrics

    Fields

    §source: Error
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    AcmeEventStreamFinished

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    JoinError

    Fields

    §source: JoinError
    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    NoRelayServicesEnabled

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace
    §

    TaskCancelled

    Fields

    §backtrace: Option<Backtrace>
    §span_trace: SpanTrace

    Trait Implementations§

    Source§

    impl Debug for SupervisorError

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Display for SupervisorError

    Source§

    fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Error for SupervisorError
    where + Self: Debug + Display,

    Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    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
    Source§

    impl ErrorCompat for SupervisorError

    Source§

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
    Source§

    impl From<JoinError> for SupervisorError

    Source§

    fn from(error: JoinError) -> Self

    Converts to this type from the input type.

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +and continuing with recursive calls to Error::source. Read more

    Source§

    impl From<JoinError> for SupervisorError

    Source§

    fn from(error: JoinError) -> Self

    Converts to this type from the input type.

    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
    §

    impl<T> AsErrorSource for T
    where T: Error + 'static,

    §

    fn as_error_source(&self) -> &(dyn Error + 'static)

    For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method @@ -37,22 +37,31 @@ receivers.
    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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
    §

    impl<E> InstrumentError for E
    where - TracedError<E>: From<E>,

    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace Read more
    Source§

    impl<T, U> Into<U> for T
    where - U: From<T>,

    Source§

    fn into(self) -> U

    Calls U::from(self).

    + TracedError<E>: From<E>,
    §

    type Instrumented = TracedError<E>

    The type of the wrapped error after instrumentation
    §

    fn in_current_span(self) -> <E as InstrumentError>::Instrumented

    Instrument an Error by bundling it with a SpanTrace 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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/index.html b/pr/3367/docs/iroh_relay/server/index.html index 70e82971ad..0cbe36140b 100644 --- a/pr/3367/docs/iroh_relay/server/index.html +++ b/pr/3367/docs/iroh_relay/server/index.html @@ -1,4 +1,4 @@ -iroh_relay::server - Rust

    Module server

    Source
    Available on crate feature server only.
    Expand description

    A fully-fledged iroh-relay server over HTTP or HTTPS.

    +iroh_relay::server - Rust

    Module server

    Module server 

    Source
    Available on crate feature server only.
    Expand description

    A fully-fledged iroh-relay server over HTTP or HTTPS.

    This module provides an API to run a full fledged iroh-relay server. It is primarily used by the iroh-relay binary in this crate. It can be used to run a relay server in other locations however.

    diff --git a/pr/3367/docs/iroh_relay/server/struct.ClientRateLimit.html b/pr/3367/docs/iroh_relay/server/struct.ClientRateLimit.html index de5d65c84a..3cbfe9fdb3 100644 --- a/pr/3367/docs/iroh_relay/server/struct.ClientRateLimit.html +++ b/pr/3367/docs/iroh_relay/server/struct.ClientRateLimit.html @@ -1,10 +1,10 @@ -ClientRateLimit in iroh_relay::server - Rust

    Struct ClientRateLimit

    Source
    pub struct ClientRateLimit {
    +ClientRateLimit in iroh_relay::server - Rust

    ClientRateLimit

    Struct ClientRateLimit 

    Source
    pub struct ClientRateLimit {
         pub bytes_per_second: NonZeroU32,
         pub max_burst_bytes: Option<NonZeroU32>,
     }
    Available on crate feature server only.
    Expand description

    Per-client rate limit configuration.

    Fields§

    §bytes_per_second: NonZeroU32

    Max number of bytes per second to read from the client connection.

    §max_burst_bytes: Option<NonZeroU32>

    Max number of bytes to read in a single burst.

    -

    Trait Implementations§

    Source§

    impl Clone for ClientRateLimit

    Source§

    fn clone(&self) -> ClientRateLimit

    Returns a copy 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 ClientRateLimit

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Copy for ClientRateLimit

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for ClientRateLimit

    Source§

    fn clone(&self) -> ClientRateLimit

    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 ClientRateLimit

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Copy for ClientRateLimit

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -12,23 +12,30 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.Limits.html b/pr/3367/docs/iroh_relay/server/struct.Limits.html index a6b040d1f0..cad30f54be 100644 --- a/pr/3367/docs/iroh_relay/server/struct.Limits.html +++ b/pr/3367/docs/iroh_relay/server/struct.Limits.html @@ -1,4 +1,4 @@ -Limits in iroh_relay::server - Rust

    Struct Limits

    Source
    pub struct Limits {
    +Limits in iroh_relay::server - Rust

    Limits

    Struct Limits 

    Source
    pub struct Limits {
         pub accept_conn_limit: Option<f64>,
         pub accept_conn_burst: Option<usize>,
         pub client_rx: Option<ClientRateLimit>,
    @@ -6,7 +6,7 @@
     

    Fields§

    §accept_conn_limit: Option<f64>

    Rate limit for accepting new connection. Unlimited if not set.

    §accept_conn_burst: Option<usize>

    Burst limit for accepting new connection. Unlimited if not set.

    §client_rx: Option<ClientRateLimit>

    Rate limits for incoming traffic from a client connection.

    -

    Trait Implementations§

    Source§

    impl Debug for Limits

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for Limits

    Source§

    fn default() -> Limits

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Limits

    §

    impl RefUnwindSafe for Limits

    §

    impl Send for Limits

    §

    impl Sync for Limits

    §

    impl Unpin for Limits

    §

    impl UnwindSafe for Limits

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Debug for Limits

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for Limits

    Source§

    fn default() -> Limits

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Limits

    §

    impl RefUnwindSafe for Limits

    §

    impl Send for Limits

    §

    impl Sync for Limits

    §

    impl Unpin for Limits

    §

    impl UnwindSafe for Limits

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -14,20 +14,27 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.Metrics.html b/pr/3367/docs/iroh_relay/server/struct.Metrics.html index 4dfeeea922..0be94c473d 100644 --- a/pr/3367/docs/iroh_relay/server/struct.Metrics.html +++ b/pr/3367/docs/iroh_relay/server/struct.Metrics.html @@ -1,4 +1,4 @@ -Metrics in iroh_relay::server - Rust

    Struct Metrics

    Source
    pub struct Metrics {
    Show 21 fields +Metrics in iroh_relay::server - Rust

    Metrics

    Struct Metrics 

    Source
    pub struct Metrics {
    Show 19 fields pub bytes_sent: Counter, pub bytes_recv: Counter, pub send_packets_sent: Counter, @@ -13,13 +13,11 @@ pub got_ping: Counter, pub sent_pong: Counter, pub unknown_frames: Counter, - pub frames_rx_ratelimited_total: Counter, + pub bytes_rx_ratelimited_total: Counter, pub conns_rx_ratelimited_total: Counter, pub accepts: Counter, pub disconnects: Counter, pub unique_client_keys: Counter, - pub websocket_accepts: Counter, - pub relay_accepts: Counter,
    }
    Available on crate feature server only.
    Expand description

    Metrics tracked for the relay server

    Fields§

    §bytes_sent: Counter

    Bytes sent from a FrameType::SendPacket

    §bytes_recv: Counter

    Bytes received from a FrameType::SendPacket

    @@ -35,13 +33,11 @@
    §got_ping: Counter

    Number of FrameType::Pings received

    §sent_pong: Counter

    Number of FrameType::Pongs sent

    §unknown_frames: Counter

    Number of FrameType::Unknown received

    -
    §frames_rx_ratelimited_total: Counter

    Number of frames received from client connection which have been rate-limited.

    +
    §bytes_rx_ratelimited_total: Counter

    Number of bytes received from client connection which have been rate-limited.

    §conns_rx_ratelimited_total: Counter

    Number of client connections which have had any frames rate-limited.

    §accepts: Counter

    Number of times this server has accepted a connection.

    §disconnects: Counter

    Number of connections we have removed because of an error

    §unique_client_keys: Counter

    Number of unique client keys per day

    -
    §websocket_accepts: Counter

    Number of accepted websocket connections

    -
    §relay_accepts: Counter

    Number of accepted ‘iroh derp http’ connection upgrades

    Trait Implementations§

    Source§

    impl Debug for Metrics

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for Metrics

    Source§

    fn default() -> Metrics

    Returns the “default value” for a type. Read more
    Source§

    impl Iterable for Metrics

    Source§

    fn field_count(&self) -> usize

    Returns the number of fields in the struct.
    Source§

    fn field_ref(&self, n: usize) -> Option<MetricItem<'_>>

    Returns the field name and dyn reference to the field.
    Source§

    impl MetricsGroup for Metrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group.
    §

    fn iter(&self) -> FieldIter<'_>

    Returns an iterator over all metric items with their values and helps.

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where @@ -50,21 +46,28 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    §

    impl<T> IntoIterable for T
    where - T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: Iterable,

    §

    fn as_iterable(&self) -> &dyn Iterable

    Returns self as dyn Iterable
    §

    fn field_iter(&self) -> FieldIter<'_>

    Returns an iterator over the fields of the struct.
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.QuicConfig.html b/pr/3367/docs/iroh_relay/server/struct.QuicConfig.html index ee9b2c1cb3..90085b8e1f 100644 --- a/pr/3367/docs/iroh_relay/server/struct.QuicConfig.html +++ b/pr/3367/docs/iroh_relay/server/struct.QuicConfig.html @@ -1,4 +1,4 @@ -QuicConfig in iroh_relay::server - Rust

    Struct QuicConfig

    Source
    pub struct QuicConfig {
    +QuicConfig in iroh_relay::server - Rust

    QuicConfig

    Struct QuicConfig 

    Source
    pub struct QuicConfig {
         pub bind_addr: SocketAddr,
         pub server_config: ServerConfig,
     }
    Available on crate feature server only.
    Expand description

    Configuration for the QUIC server.

    @@ -7,7 +7,7 @@
    §server_config: ServerConfig

    The TLS server configuration for the QUIC server.

    If this [rustls::ServerConfig] does not support TLS 1.3, the QUIC server will fail to spawn.

    -

    Trait Implementations§

    Source§

    impl Debug for QuicConfig

    Source§

    fn fmt(&self, __derive_more_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 +

    Trait Implementations§

    Source§

    impl Debug for QuicConfig

    Source§

    fn fmt(&self, __derive_more_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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -15,20 +15,27 @@ to spawn.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.RelayConfig.html b/pr/3367/docs/iroh_relay/server/struct.RelayConfig.html index 13fd9b5e35..fa3e7b5243 100644 --- a/pr/3367/docs/iroh_relay/server/struct.RelayConfig.html +++ b/pr/3367/docs/iroh_relay/server/struct.RelayConfig.html @@ -1,4 +1,4 @@ -RelayConfig in iroh_relay::server - Rust

    Struct RelayConfig

    Source
    pub struct RelayConfig<EC: Debug, EA: Debug = EC> {
    +RelayConfig in iroh_relay::server - Rust

    RelayConfig

    Struct RelayConfig 

    Source
    pub struct RelayConfig<EC: Debug, EA: Debug = EC> {
         pub http_bind_addr: SocketAddr,
         pub tls: Option<TlsConfig<EC, EA>>,
         pub limits: Limits,
    @@ -18,8 +18,8 @@ TLS.

    §limits: Limits

    Rate limits.

    §key_cache_capacity: Option<usize>

    Key cache capacity.

    §access: AccessConfig

    Access configuration.

    -

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for RelayConfig<EC, EA>
    where - Option<TlsConfig<EC, EA>>: Debug,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for RelayConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for RelayConfig<EC, EA>

    §

    impl<EC, EA> Send for RelayConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for RelayConfig<EC, EA>

    §

    impl<EC, EA> Unpin for RelayConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for RelayConfig<EC, EA>

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for RelayConfig<EC, EA>
    where + Option<TlsConfig<EC, EA>>: Debug,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for RelayConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for RelayConfig<EC, EA>

    §

    impl<EC, EA> Send for RelayConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for RelayConfig<EC, EA>

    §

    impl<EC, EA> Unpin for RelayConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for RelayConfig<EC, EA>

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -27,20 +27,27 @@ TLS.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.RelayMetrics.html b/pr/3367/docs/iroh_relay/server/struct.RelayMetrics.html index bff847a6c9..8f78dc4c95 100644 --- a/pr/3367/docs/iroh_relay/server/struct.RelayMetrics.html +++ b/pr/3367/docs/iroh_relay/server/struct.RelayMetrics.html @@ -1,8 +1,8 @@ -RelayMetrics in iroh_relay::server - Rust

    Struct RelayMetrics

    Source
    pub struct RelayMetrics {
    +RelayMetrics in iroh_relay::server - Rust

    RelayMetrics

    Struct RelayMetrics 

    Source
    pub struct RelayMetrics {
         pub server: Arc<Metrics>,
     }
    Available on crate feature server only.
    Expand description

    All metrics tracked in the relay server.

    Fields§

    §server: Arc<Metrics>

    Metrics tracked for the relay server.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayMetrics

    Source§

    fn clone(&self) -> RelayMetrics

    Returns a copy 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 RelayMetrics

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for RelayMetrics

    Source§

    fn default() -> RelayMetrics

    Returns the “default value” for a type. Read more
    Source§

    impl MetricsGroupSet for RelayMetrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group set.
    Source§

    fn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>

    Returns an iterator over owned clones of the [MetricsGroup] in this struct.
    Source§

    fn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>

    Returns an iterator over references to the [MetricsGroup] in this struct.
    §

    fn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)>

    Returns an iterator over all metrics in this metrics group set. Read more

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for RelayMetrics

    Source§

    fn clone(&self) -> RelayMetrics

    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 RelayMetrics

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for RelayMetrics

    Source§

    fn default() -> RelayMetrics

    Returns the “default value” for a type. Read more
    Source§

    impl MetricsGroupSet for RelayMetrics

    Source§

    fn name(&self) -> &'static str

    Returns the name of this metrics group set.
    Source§

    fn groups_cloned(&self) -> impl Iterator<Item = Arc<dyn MetricsGroup>>

    Returns an iterator over owned clones of the [MetricsGroup] in this struct.
    Source§

    fn groups(&self) -> impl Iterator<Item = &dyn MetricsGroup>

    Returns an iterator over references to the [MetricsGroup] in this struct.
    §

    fn iter(&self) -> impl Iterator<Item = (&'static str, MetricItem<'_>)>

    Returns an iterator over all metrics in this metrics group set. 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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -10,23 +10,30 @@ class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.ReloadingResolver.html b/pr/3367/docs/iroh_relay/server/struct.ReloadingResolver.html index d1e3aa13e1..e603246b67 100644 --- a/pr/3367/docs/iroh_relay/server/struct.ReloadingResolver.html +++ b/pr/3367/docs/iroh_relay/server/struct.ReloadingResolver.html @@ -1,4 +1,4 @@ -ReloadingResolver in iroh_relay::server - Rust

    Struct ReloadingResolver

    Source
    pub struct ReloadingResolver<Loader: Send + 'static> { /* private fields */ }
    Available on crate feature server only.
    Expand description

    A Certificate resolver that reloads the certificate every interval

    +ReloadingResolver in iroh_relay::server - Rust

    ReloadingResolver

    Struct ReloadingResolver 

    Source
    pub struct ReloadingResolver<Loader: Send + 'static> { /* private fields */ }
    Available on crate feature server only.
    Expand description

    A Certificate resolver that reloads the certificate every interval

    Implementations§

    Source§

    impl<Loader> ReloadingResolver<Loader>
    where Loader: Send + Loader<Value = CertifiedKey> + 'static,

    Source

    pub async fn init( loader: Loader, @@ -20,22 +20,29 @@ ClientHello information. Read more

    bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<P, T> Receiver for P
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<P, T> Receiver for P
    where P: Deref<Target = T> + ?Sized, - T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where + T: ?Sized,

    Source§

    type Target = T

    🔬This is a nightly-only experimental API. (arbitrary_self_types)
    The target type on which the method may be called.
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.Server.html b/pr/3367/docs/iroh_relay/server/struct.Server.html index 064d9461b6..8cad42399a 100644 --- a/pr/3367/docs/iroh_relay/server/struct.Server.html +++ b/pr/3367/docs/iroh_relay/server/struct.Server.html @@ -1,28 +1,28 @@ -Server in iroh_relay::server - Rust

    Struct Server

    Source
    pub struct Server { /* private fields */ }
    Available on crate feature server only.
    Expand description

    A running Relay + QAD server.

    +Server in iroh_relay::server - Rust

    Server

    Struct Server 

    Source
    pub struct Server { /* private fields */ }
    Available on crate feature server only.
    Expand description

    A running Relay + QAD server.

    This is a full Relay server, including QAD, Relay and various associated HTTP services.

    Dropping this will stop the server.

    -

    Implementations§

    Source§

    impl Server

    Source

    pub async fn spawn<EC, EA>( +

    Implementations§

    Source§

    impl Server

    Source

    pub async fn spawn<EC, EA>( config: ServerConfig<EC, EA>, ) -> Result<Self, SpawnError>
    where EC: Debug + 'static, EA: Debug + 'static,

    Starts the server.

    -
    Source

    pub async fn shutdown(self) -> Result<(), SupervisorError>

    Requests graceful shutdown.

    +
    Source

    pub async fn shutdown(self) -> Result<(), SupervisorError>

    Requests graceful shutdown.

    Returns once all server tasks have stopped.

    -
    Source

    pub fn task_handle( +

    Source

    pub fn task_handle( &mut self, ) -> &mut AbortOnDropHandle<Result<(), SupervisorError>>

    Returns the handle for the task.

    This allows waiting for the server’s supervisor task to finish. Can be useful in case there is an error in the server before it is shut down.

    -
    Source

    pub fn https_addr(&self) -> Option<SocketAddr>

    The socket address the HTTPS server is listening on.

    -
    Source

    pub fn http_addr(&self) -> Option<SocketAddr>

    The socket address the HTTP server is listening on.

    -
    Source

    pub fn quic_addr(&self) -> Option<SocketAddr>

    The socket address the QUIC server is listening on.

    -
    Source

    pub fn certificates(&self) -> Option<Vec<CertificateDer<'static>>>

    The certificates chain if configured with manual TLS certificates.

    -
    Source

    pub fn https_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s https RelayUrl.

    +
    Source

    pub fn https_addr(&self) -> Option<SocketAddr>

    The socket address the HTTPS server is listening on.

    +
    Source

    pub fn http_addr(&self) -> Option<SocketAddr>

    The socket address the HTTP server is listening on.

    +
    Source

    pub fn quic_addr(&self) -> Option<SocketAddr>

    The socket address the QUIC server is listening on.

    +
    Source

    pub fn certificates(&self) -> Option<Vec<CertificateDer<'static>>>

    The certificates chain if configured with manual TLS certificates.

    +
    Source

    pub fn https_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s https [RelayUrl].

    This uses Self::https_addr so it’s mostly useful for local development.

    -
    Source

    pub fn http_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s http RelayUrl.

    +
    Source

    pub fn http_url(&self) -> Option<RelayUrl>

    Available on crate feature test-utils only.

    Get the server’s http [RelayUrl].

    This uses Self::http_addr so it’s mostly useful for local development.

    -
    Source

    pub fn metrics(&self) -> &RelayMetrics

    Returns the metrics collected in the relay server.

    -

    Trait Implementations§

    Source§

    impl Debug for Server

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Server

    §

    impl RefUnwindSafe for Server

    §

    impl Send for Server

    §

    impl Sync for Server

    §

    impl Unpin for Server

    §

    impl UnwindSafe for Server

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Source

    pub fn metrics(&self) -> &RelayMetrics

    Returns the metrics collected in the relay server.

    +

    Trait Implementations§

    Source§

    impl Debug for Server

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl Freeze for Server

    §

    impl RefUnwindSafe for Server

    §

    impl Send for Server

    §

    impl Sync for Server

    §

    impl Unpin for Server

    §

    impl UnwindSafe for Server

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -30,20 +30,27 @@ case there is an error in the server before it is shut down.

    class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.ServerConfig.html b/pr/3367/docs/iroh_relay/server/struct.ServerConfig.html index 66915cd9b2..7fc2baa406 100644 --- a/pr/3367/docs/iroh_relay/server/struct.ServerConfig.html +++ b/pr/3367/docs/iroh_relay/server/struct.ServerConfig.html @@ -1,4 +1,4 @@ -ServerConfig in iroh_relay::server - Rust

    Struct ServerConfig

    Source
    pub struct ServerConfig<EC: Debug, EA: Debug = EC> {
    +ServerConfig in iroh_relay::server - Rust

    ServerConfig

    Struct ServerConfig 

    Source
    pub struct ServerConfig<EC: Debug, EA: Debug = EC> {
         pub relay: Option<RelayConfig<EC, EA>>,
         pub quic: Option<QuicConfig>,
         pub metrics_addr: Option<SocketAddr>,
    @@ -8,8 +8,8 @@ If not used dummy ones need to be provided, e.g. ServerConfig::<(), ()&
     

    Fields§

    §relay: Option<RelayConfig<EC, EA>>

    Configuration for the Relay server, disabled if None.

    §quic: Option<QuicConfig>

    Configuration for the QUIC server, disabled if None.

    §metrics_addr: Option<SocketAddr>
    Available on crate feature metrics only.

    Socket to serve metrics on.

    -

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for ServerConfig<EC, EA>
    where - Option<RelayConfig<EC, EA>>: Debug,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<EC: Default + Debug, EA: Default + Debug> Default for ServerConfig<EC, EA>

    Source§

    fn default() -> ServerConfig<EC, EA>

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for ServerConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for ServerConfig<EC, EA>

    §

    impl<EC, EA> Send for ServerConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for ServerConfig<EC, EA>

    §

    impl<EC, EA> Unpin for ServerConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for ServerConfig<EC, EA>

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for ServerConfig<EC, EA>
    where + Option<RelayConfig<EC, EA>>: Debug,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<EC: Default + Debug, EA: Default + Debug> Default for ServerConfig<EC, EA>

    Source§

    fn default() -> ServerConfig<EC, EA>

    Returns the “default value” for a type. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for ServerConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for ServerConfig<EC, EA>

    §

    impl<EC, EA> Send for ServerConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for ServerConfig<EC, EA>

    §

    impl<EC, EA> Unpin for ServerConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for ServerConfig<EC, EA>

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -17,20 +17,27 @@ If not used dummy ones need to be provided, e.g. ServerConfig::<(), ()& class: Class, constructed: bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/struct.TlsConfig.html b/pr/3367/docs/iroh_relay/server/struct.TlsConfig.html index 00582197c9..753440c13c 100644 --- a/pr/3367/docs/iroh_relay/server/struct.TlsConfig.html +++ b/pr/3367/docs/iroh_relay/server/struct.TlsConfig.html @@ -1,4 +1,4 @@ -TlsConfig in iroh_relay::server - Rust

    Struct TlsConfig

    Source
    pub struct TlsConfig<EC: Debug, EA: Debug = EC> {
    +TlsConfig in iroh_relay::server - Rust

    TlsConfig

    Struct TlsConfig 

    Source
    pub struct TlsConfig<EC: Debug, EA: Debug = EC> {
         pub https_bind_addr: SocketAddr,
         pub quic_bind_addr: SocketAddr,
         pub cert: CertConfig<EC, EA>,
    @@ -13,8 +13,8 @@ this is served on the §quic_bind_addr: SocketAddr

    The socket address on which to server the QUIC server is QUIC is enabled.

    §cert: CertConfig<EC, EA>

    Mode for getting a cert.

    §server_config: ServerConfig

    The server configuration.

    -

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for TlsConfig<EC, EA>
    where - CertConfig<EC, EA>: Debug,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for TlsConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for TlsConfig<EC, EA>

    §

    impl<EC, EA> Send for TlsConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for TlsConfig<EC, EA>

    §

    impl<EC, EA> Unpin for TlsConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for TlsConfig<EC, EA>

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl<EC: Debug, EA: Debug> Debug for TlsConfig<EC, EA>
    where + CertConfig<EC, EA>: Debug,

    Source§

    fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more

    Auto Trait Implementations§

    §

    impl<EC, EA> Freeze for TlsConfig<EC, EA>

    §

    impl<EC, EA = EC> !RefUnwindSafe for TlsConfig<EC, EA>

    §

    impl<EC, EA> Send for TlsConfig<EC, EA>

    §

    impl<EC, EA = EC> !Sync for TlsConfig<EC, EA>

    §

    impl<EC, EA> Unpin for TlsConfig<EC, EA>

    §

    impl<EC, EA = EC> !UnwindSafe for TlsConfig<EC, EA>

    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<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -22,20 +22,27 @@ this is served on the bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    +) -> TaggedParser<'a, Implicit, Self, E>
    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
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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
    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file + T: 'static, \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/server/testing/fn.quic_config.html b/pr/3367/docs/iroh_relay/server/testing/fn.quic_config.html index 0f5a076a4c..643ecd171d 100644 --- a/pr/3367/docs/iroh_relay/server/testing/fn.quic_config.html +++ b/pr/3367/docs/iroh_relay/server/testing/fn.quic_config.html @@ -1,4 +1,4 @@ -quic_config in iroh_relay::server::testing - Rust

    Function quic_config

    Source
    pub fn quic_config() -> QuicConfig
    Available on crate features server and test-utils only.
    Expand description

    Creates a QuicConfig suitable for testing.

    +quic_config in iroh_relay::server::testing - Rust

    quic_config

    Function quic_config 

    Source
    pub fn quic_config() -> QuicConfig
    Available on crate features server and test-utils only.
    Expand description

    Creates a QuicConfig suitable for testing.

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/struct.RelayNode.html b/pr/3367/docs/iroh_relay/struct.RelayNode.html index 8a05266a98..a71c1716c0 100644 --- a/pr/3367/docs/iroh_relay/struct.RelayNode.html +++ b/pr/3367/docs/iroh_relay/struct.RelayNode.html @@ -1,22 +1,22 @@ -RelayNode in iroh_relay - Rust

    Struct RelayNode

    Source
    pub struct RelayNode {
    -    pub url: RelayUrl,
    +RelayNode in iroh_relay - Rust

    RelayNode

    Struct RelayNode 

    Source
    pub struct RelayNode {
    +    pub url: RelayUrl,
         pub quic: Option<RelayQuicConfig>,
     }
    Expand description

    Information on a specific relay server.

    Includes the Url where it can be dialed.

    -

    Fields§

    §url: RelayUrl

    The RelayUrl where this relay server can be dialed.

    +

    Fields§

    §url: RelayUrl

    The [RelayUrl] where this relay server can be dialed.

    §quic: Option<RelayQuicConfig>

    Configuration to speak to the QUIC endpoint on the relay server.

    When None, we will not attempt to do QUIC address discovery with this relay server.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayNode

    Source§

    fn clone(&self) -> RelayNode

    Returns a copy 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 RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayNode

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayNode>>(iter: T) -> Self

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayNode

    Source§

    fn cmp(&self, other: &RelayNode) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayNode

    Source§

    fn eq(&self, other: &RelayNode) -> 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 PartialOrd for RelayNode

    Source§

    fn partial_cmp(&self, other: &RelayNode) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for RelayNode

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayNode

    Source§

    impl StructuralPartialEq for RelayNode

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for RelayNode

    Source§

    fn clone(&self) -> RelayNode

    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 RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayNode

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Display for RelayNode

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl From<RelayNode> for RelayMap

    Source§

    fn from(value: RelayNode) -> Self

    Converts to this type from the input type.
    Source§

    impl From<RelayUrl> for RelayNode

    Source§

    fn from(value: RelayUrl) -> Self

    Converts to this type from the input type.
    Source§

    impl FromIterator<RelayNode> for RelayMap

    Source§

    fn from_iter<T: IntoIterator<Item = RelayNode>>(iter: T) -> Self

    Creates a value from an iterator. Read more
    Source§

    impl Ord for RelayNode

    Source§

    fn cmp(&self, other: &RelayNode) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayNode

    Source§

    fn eq(&self, other: &RelayNode) -> 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 PartialOrd for RelayNode

    Source§

    fn partial_cmp(&self, other: &RelayNode) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Serialize for RelayNode

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayNode

    Source§

    impl StructuralPartialEq for RelayNode

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -24,31 +24,40 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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
    §

    impl<T> ToStringFallible for T
    where + T: Display,

    §

    fn try_to_string(&self) -> Result<String, TryReserveError>

    ToString::to_string, but without panic on OOM.

    +
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/iroh_relay/struct.RelayQuicConfig.html b/pr/3367/docs/iroh_relay/struct.RelayQuicConfig.html index 3ae0231e9a..5540ca63c9 100644 --- a/pr/3367/docs/iroh_relay/struct.RelayQuicConfig.html +++ b/pr/3367/docs/iroh_relay/struct.RelayQuicConfig.html @@ -1,18 +1,18 @@ -RelayQuicConfig in iroh_relay - Rust

    Struct RelayQuicConfig

    Source
    pub struct RelayQuicConfig {
    +RelayQuicConfig in iroh_relay - Rust

    RelayQuicConfig

    Struct RelayQuicConfig 

    Source
    pub struct RelayQuicConfig {
         pub port: u16,
     }
    Expand description

    Configuration for speaking to the QUIC endpoint on the relay server to do QUIC address discovery.

    Fields§

    §port: u16

    The port on which the connection should be bound to.

    -

    Trait Implementations§

    Source§

    impl Clone for RelayQuicConfig

    Source§

    fn clone(&self) -> RelayQuicConfig

    Returns a copy 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 RelayQuicConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for RelayQuicConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayQuicConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where - __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Ord for RelayQuicConfig

    Source§

    fn cmp(&self, other: &RelayQuicConfig) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where - Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where - Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayQuicConfig

    Source§

    fn eq(&self, other: &RelayQuicConfig) -> 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 PartialOrd for RelayQuicConfig

    Source§

    fn partial_cmp(&self, other: &RelayQuicConfig) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the -<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > -operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
    Source§

    impl Serialize for RelayQuicConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where - __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayQuicConfig

    Source§

    impl StructuralPartialEq for RelayQuicConfig

    Auto Trait Implementations§

    Blanket Implementations§

    Source§

    impl<T> Any for T
    where +

    Trait Implementations§

    Source§

    impl Clone for RelayQuicConfig

    Source§

    fn clone(&self) -> RelayQuicConfig

    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 RelayQuicConfig

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    Source§

    impl Default for RelayQuicConfig

    Source§

    fn default() -> Self

    Returns the “default value” for a type. Read more
    Source§

    impl<'de> Deserialize<'de> for RelayQuicConfig

    Source§

    fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
    where + __D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    Source§

    impl Ord for RelayQuicConfig

    Source§

    fn cmp(&self, other: &RelayQuicConfig) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where + Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where + Self: Sized,

    Restrict a value to a certain interval. Read more
    Source§

    impl PartialEq for RelayQuicConfig

    Source§

    fn eq(&self, other: &RelayQuicConfig) -> 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 PartialOrd for RelayQuicConfig

    Source§

    fn partial_cmp(&self, other: &RelayQuicConfig) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the +<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the > +operator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by +the >= operator. Read more
    Source§

    impl Serialize for RelayQuicConfig

    Source§

    fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
    where + __S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    Source§

    impl Eq for RelayQuicConfig

    Source§

    impl StructuralPartialEq for RelayQuicConfig

    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
    §

    impl<'a, T, E> AsTaggedExplicit<'a, E> for T
    where T: 'a,

    §

    fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

    §

    impl<'a, T, E> AsTaggedImplicit<'a, E> for T
    where T: 'a,

    §

    fn implicit( @@ -20,30 +20,37 @@ the >= operator. bool, tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

    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, dst: *mut u8)

    🔬This is a nightly-only experimental API. (clone_to_uninit)
    Performs copy-assignment from self to dst. Read more
    §

    impl<Q, K> Comparable<K> for Q
    where +) -> TaggedParser<'a, Implicit, Self, E>

    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> Comparable<K> for Q
    where Q: Ord + ?Sized, - K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where - T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    impl<Q, K> Equivalent<K> for Q
    where + K: Borrow<Q> + ?Sized,

    §

    fn compare(&self, key: &K) -> Ordering

    Compare self to key and return their ordering.
    §

    impl<T> CompatExt for T

    §

    fn compat(self) -> Compat<T>

    Applies the [Compat] adapter by value. Read more
    §

    fn compat_ref(&self) -> Compat<&T>

    Applies the [Compat] adapter by shared reference. Read more
    §

    fn compat_mut(&mut self) -> Compat<&mut T>

    Applies the [Compat] adapter by mutable reference. Read more
    Source§

    impl<T> DynClone for T
    where + T: Clone,

    Source§

    fn __clone_box(&self, _: Private) -> *mut ()

    §

    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.
    §

    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
    Source§

    impl<T> From<T> for T

    Source§

    fn from(t: T) -> T

    Returns the argument unchanged.

    + K: Borrow<Q> + ?Sized,
    §

    fn equivalent(&self, key: &K) -> bool

    Checks if this value is equivalent to the given key. 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).

    +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.

    -
    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where +

    §

    impl<T> Pointable for T

    §

    const ALIGN: usize

    The alignment of pointer.
    §

    type Init = T

    The type for initializers.
    §

    unsafe fn init(init: <T as Pointable>::Init) -> usize

    Initializes a with the given initializer. Read more
    §

    unsafe fn deref<'a>(ptr: usize) -> &'a T

    Dereferences the given pointer. Read more
    §

    unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

    Mutably dereferences the given pointer. Read more
    §

    unsafe fn drop(ptr: usize)

    Drops the object pointed to by the given pointer. Read more
    §

    impl<T> PolicyExt for T
    where + T: ?Sized,

    §

    fn and<P, B, E>(self, other: P) -> And<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] only if self and other return +Action::Follow. Read more
    §

    fn or<P, B, E>(self, other: P) -> Or<T, P>
    where + T: Policy<B, E>, + P: Policy<B, E>,

    Create a new Policy that returns [Action::Follow] if either self or other returns +Action::Follow. Read more
    Source§

    impl<T> Same for T

    Source§

    type Output = T

    Should always be Self
    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<V, T> VZip<V> for T
    where V: MultiLane<T>,

    §

    fn vzip(self) -> V

    §

    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<T> DeserializeOwned for T
    where - T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where - T: 'static,

    §

    impl<T> MaybeSendSync for T

    \ No newline at end of file +[WithDispatch] wrapper. Read more
    Source§

    impl<T> DeserializeOwned for T
    where + T: for<'de> Deserialize<'de>,

    §

    impl<T> ErasedDestructor for T
    where + T: 'static,

    \ No newline at end of file diff --git a/pr/3367/docs/search-index.js b/pr/3367/docs/search-index.js deleted file mode 100644 index e5dffdfd7f..0000000000 --- a/pr/3367/docs/search-index.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchIndex = new Map(JSON.parse('[["bulk",{"t":"HHHHH","n":["collect_and_print","main","run_iroh","run_quinn","run_s2n"],"q":[[0,"bulk"],[5,"iroh_metrics::base"],[6,"iroh_bench"],[7,"n0_snafu::error"],[8,"iroh_bench::s2n"]],"i":"`````","f":"{{{d{b}}{d{f}}}h}{{}h}{j{{l{h}}}}0{n{{l{h}}}}","D":"`","p":[[1,"str"],[1,"reference",null,null,1],[10,"MetricsGroup",5],[1,"unit"],[5,"Opt",6],[8,"Result",7],[5,"Opt",8]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAAUAAQAAAAUA","P":[]}],["iroh",{"t":"PPEPGTFIFPFEFGFFFRKPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNOCCNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNCCNOCNNNNNNNMCNNONONNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNOOOOOOOOSSSSCCSSSHHHHSSHHHPFPKFGFKGFTPPFFPPGPPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNCNNNNNONNCNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFSSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNSSPPPPPSSGFFFFFPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFSSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTTFFFFPGKPGPFPGFTTTPFPFPPPGFGFFPFPGPPPPPPFGGKKFKPPPFFGPPPPPPSPPFFTTTPFGKTTPFFTPPTTPPFTTPPPPFFPTGFPPPPPPPFGPGGFPPGPFFPPGFTTPPGFFGPPGFTPPPFFPFPFPPPPFFPFGFFPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONNNOOOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNOOONNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNONOONOOOONNNONNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNOOONOOONOOONNNONNNOOONNNNNNNNNNOONNOOONMNMNMNNNNNNNOOONNNONNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNONNNNNNNOONMNNONMNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNONMNNONOONOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFEFFNOOOOOOOONNNNNNNNNNNOONNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNOOOONNNNONNNNNNNNNNONNNNNONNNNNNNNNNOOOONNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNOOOOOOONNNNOPFFGPPFFFNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNOONNOONNONOOONNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNPGPGPSPPPPPGPFFKFPPGPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNNNMNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOGFPKPPKFFPNNMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOFFNNNNNNNNNNNNNNNNNNNNNNNNNNOONONHHNNNNNNNNN","n":["Decode","DecodeInvalidLength","Endpoint","Key","KeyParsingError","LENGTH","NodeAddr","NodeId","PublicKey","Relay","RelayMap","RelayMode","RelayNode","RelayProtocol","RelayUrl","RelayUrlParseError","SecretKey","Value","Watcher","Websocket","__clone_box","","","","","","","as_bytes","as_error_source","","as_ref","backtrace","","borrow","","","","","","","","","","borrow_mut","","","","","","","","","cause","","clone","","","","","","","clone_into","","","","","","","clone_to_uninit","","","","","","","cmp","","","","compare","","","","compat","","","","","","","","","compat_mut","","","","","","","","","compat_ref","","","","","","","","","contains_node","default","defaults","deref","","","","","","","","","","deref_mut","","","","","","","","","description","","deserialize","","","","","direct_addresses","","discovery","dns","drop","","","","","","","","","empty","endpoint","eq","","","","","","equivalent","","","","","","","","","","","","","","","","","","fmt","","","","","","","","","","","","","","","fmt_short","from","","","","","","","","","","","","","","","","","","","","","","","from_bytes","","from_iter","","from_parts","from_ref","","","","","","","from_str","","","from_z32","generate","get","get_node","hash","","in_current_span","","init","","","","","","","","","initialized","into","","","","","","","","","is_empty","","len","map","metrics","net_report","new","node_id","node_info","nodes","or","parse_header","partial_cmp","","","","poll_updated","protocol","public","","quic","relay_url","","secret","serialize","","","","","sign","source","","stream","stream_updates_only","test_utils","to_bytes","to_owned","","","","","","","to_string","","","","","","to_z32","try_from","","","","","","","","","","","","try_into","","","","","","","","","type_id","","","","","","","","","updated","upgrade_header","url","urls","verify","vzip","","","","","","","","","with_direct_addresses","with_relay_url","backtrace","","","source","","span_trace","","","DEFAULT_HTTPS_PORT","DEFAULT_HTTP_PORT","DEFAULT_METRICS_PORT","DEFAULT_RELAY_QUIC_PORT","prod","staging","AP_RELAY_HOSTNAME","EU_RELAY_HOSTNAME","NA_RELAY_HOSTNAME","default_ap_relay_node","default_eu_relay_node","default_na_relay_node","default_relay_map","EU_RELAY_HOSTNAME","NA_RELAY_HOSTNAME","default_eu_relay_node","default_na_relay_node","default_relay_map","AttrFromString","ConcurrentDiscovery","DecodingError","Discovery","DiscoveryContext","DiscoveryError","DiscoveryItem","IntoDiscovery","IntoDiscoveryError","Lagged","MAX_LENGTH","NoResults","NoServiceConfigured","NodeData","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","UnexpectedFormat","User","","UserData","Utf8","__clone_box","","","","add","add_direct_addresses","as_error_source","","","","as_ref","backtrace","","","","borrow","","","","","","","","","","borrow_mut","","","","","","","","","","cause","","","","clear_direct_addresses","clone","","","","clone_into","","","","clone_to_uninit","","","","cmp","compare","compat","","","","","","","","","","compat_mut","","","","","","","","","","compat_ref","","","","","","","","","","data","default","","deref","","","","","","","","","","","","deref_mut","","","","","","","","","","","description","","","","direct_addresses","dns","dns_resolver","drop","","","","","","","","","","empty","eq","","","equivalent","","","","","","","","","fmt","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","from_err","","from_err_box","","from_parts","from_pkarr_signed_packet","from_ref","","","","from_services","from_str","from_txt_lookup","hash","in_current_span","","","","init","","","","","","","","","","into","","","","","","","","","","into_discovery","","into_node_addr","","last_updated","mdns","new","","","node_id","","","node_info","partial_cmp","pkarr","provenance","publish","","relay_url","resolve","","secret_key","set_relay_url","set_user_data","source","","","","static_provider","subscribe","","to_node_addr","","to_owned","","","","to_pkarr_signed_packet","to_string","","","","","to_txt_strings","try_from","","","","","","","","","","","try_into","","","","","","","","","","type_id","","","","","","","","","","user_data","","val","vzip","","","","","","","","","","with_direct_addresses","","with_relay_url","","with_user_data","","backtrace","","","node_id","provenance","source","span_trace","","","backtrace","provenance","source","span_trace","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","DnsDiscovery","DnsDiscoveryBuilder","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","borrow","","borrow_mut","","build","builder","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","dns_resolver","drop","","fmt","","from","","init","","into","","into_discovery","","n0_dns","resolve","try_from","","try_into","","type_id","","vzip","","MdnsDiscovery","MdnsDiscoveryBuilder","NAME","borrow","","borrow_mut","","builder","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","drop","","fmt","","from","","init","","into","","into_discovery","","new","publish","resolve","subscribe","try_from","","try_into","","type_id","","vzip","","DEFAULT_PKARR_TTL","DEFAULT_REPUBLISH_INTERVAL","Encoding","HttpPayload","HttpRequest","HttpSend","InvalidRelayUrl","N0_DNS_PKARR_RELAY_PROD","N0_DNS_PKARR_RELAY_STAGING","PkarrError","PkarrPublisher","PkarrPublisherBuilder","PkarrRelayClient","PkarrResolver","PkarrResolverBuilder","PublicKey","Verify","__clone_box","","","as_error_source","backtrace","borrow","","","","","","borrow_mut","","","","","","build","","builder","","cause","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","","compat_mut","","","","","","compat_ref","","","","","","deref","","","","","","deref_mut","","","","","","description","dht","dns_resolver","","drop","","","","","","fmt","","","","","","","from","","","","","","from_ref","","","in_current_span","init","","","","","","into","","","","","","into_discovery","","","","n0_dns","","new","publish","","republish_interval","resolve","","source","to_owned","","","to_string","try_from","","","","","","try_into","","","","","","ttl","type_id","","","","","","update_node_data","vzip","","","","","","with_dns_resolver","source","","","","","status","url","Builder","DhtDiscovery","__clone_box","borrow","","borrow_mut","","build","builder","client","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","default","","deref","","deref_mut","","dht","drop","","fmt","","from","","from_ref","include_direct_addresses","init","","initial_publish_delay","into","","into_discovery","","n0_dns_pkarr_relay","no_publish","pkarr_relay","publish","republish_delay","resolve","secret_key","to_owned","try_from","","try_into","","ttl","type_id","","vzip","","PROVENANCE","StaticProvider","__clone_box","add_node_info","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","fmt","from","from_node_info","from_ref","get_node_info","init","into","into_discovery","new","publish","remove_node_info","resolve","set_node_info","to_owned","try_from","try_into","type_id","vzip","DnsResolver","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","__clone_box","borrow","borrow_mut","clear_cache","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","fmt","from","","from_ref","init","into","lookup_ipv4","lookup_ipv4_ipv6","lookup_ipv4_ipv6_staggered","lookup_ipv4_staggered","lookup_ipv6","lookup_ipv6_staggered","lookup_node_by_domain_name","lookup_node_by_domain_name_staggered","lookup_node_by_id","lookup_node_by_id_staggered","lookup_txt","new","reset","resolve","resolve_host","to_owned","try_from","try_into","type_id","vzip","with_nameserver","AEAD_LIMIT_REACHED","APPLICATION_ERROR","Accept","AcceptBi","AcceptUni","AckFrequencyConfig","AddNodeAddr","AddNodeAddrError","AeadKey","All","AlpnError","App","ApplicationClose","ApplicationClosed","BindError","Builder","CONNECTION_ID_LIMIT_ERROR","CONNECTION_REFUSED","CRYPTO_BUFFER_EXCEEDED","CallMeMaybe","Chunk","CidsExhausted","ClosedStream","","","Connect","ConnectError","ConnectOptions","ConnectWithOptsError","Connecting","Connection","","ConnectionClose","ConnectionClosed","ConnectionError","","ConnectionLost","","","","","ConnectionStats","ConnectionType","ControlMsg","Controller","ControllerFactory","CryptoError","CryptoServerConfig","Custom","Default","Direct","DirectAddr","DirectAddrInfo","DirectAddrType","Disabled","","Discover","Discovery","","DiscoveryStart","ENV_FORCE_STAGING_RELAYS","Empty","EmptyPruned","Endpoint","ExportKeyingMaterialError","FINAL_SIZE_ERROR","FLOW_CONTROL_ERROR","FRAME_ENCODING_ERROR","FinishedEarly","FrameStats","GetMappingAddressError","HandshakeTokenKey","INTERNAL_ERROR","INVALID_TOKEN","IllegalOrderedRead","Incoming","IncomingFuture","KEY_UPDATE_ERROR","Local","LocallyClosed","MAX","MAX_SIZE","MagicSpawn","Mixed","MtuDiscoveryConfig","NO_ERROR","NO_VIABLE_PATH","NamedApp","NoAddress","","None","OpenBi","OpenUni","OwnAddress","PROTOCOL_VIOLATION","PathSelection","PathStats","Ping","Pong","Portmapped","Qad","Qad4LocalPort","Quinn","Read","ReadDatagram","ReadError","","ReadExactError","ReadToEndError","RecvStream","Relay","","RelayMode","RelayOnly","RemoteInfo","RemoteNodeIdError","Reset","","ResetError","RetryError","STREAM_LIMIT_ERROR","STREAM_STATE_ERROR","Saved","SelfConnect","SendDatagramError","SendStream","ServerConfig","Source","Staging","Stopped","StoppedError","StreamId","TRANSPORT_PARAMETER_ERROR","TimedOut","TooLarge","TooLong","TransportConfig","TransportError","","TransportErrorCode","Udp","UdpStats","Unavailable","Unknown","UnknownHandshake","UnsupportedByPeer","UnsupportedVersion","VarInt","VersionMismatch","WeakConnectionHandle","WriteError","Written","ZeroRttAccepted","ZeroRttRejected","","","","__clone_box","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","accept","","accept_bi","accept_uni","accept_with","ack_eliciting_threshold","ack_frequency","ack_frequency_config","acks","add_discovery","add_node_addr","add_node_addr_with_source","addr","","addrs","aead_from_hkdf","allow_spin","alpn","","alpns","as_error_source","","","","","","","","","","","","","","","","","","backtrace","","","","","","","bind","bind_addr_v4","bind_addr_v6","black_hole_cooldown","black_holes_detected","borrow","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","bound_sockets","build","builder","bytes","","","cause","","","","","","","chunks","clear_discovery","clone","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_box","clone_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","close","","close_reason","closed","cmp","","","","code","compare","","","","compat","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","compat_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","compat_ref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","congestion_controller_factory","congestion_events","congestion_state","conn_type","","connect","connect_with_opts","connection_close","crypto","","","crypto_buffer_size","current_mtu","cwnd","data_blocked","datagram","datagram_receive_buffer_size","datagram_send_buffer_size","datagram_send_buffer_space","datagrams","decode","","","default","","","","","","","","","","","","","","default_relay_mode","deref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","deref_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","description","","","","","","","deserialize","","","","","dir","direct_addresses","discovery","","discovery_dht","discovery_local_network","discovery_n0","discovery_stream","dns_resolver","","drop","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","enable_segmentation_offload","encode","","","eq","","","","","","","","","","","","","","","","","","","","","","","","","","","equivalent","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","error_code","","export_keying_material","finish","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","force_staging_infra","frame","frame_rx","frame_tx","frame_type","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_ref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_u32","from_u64","from_u64_unchecked","handshake_data","","handshake_done","has_send_address","hash","","","","","home_relay","id","","ignore","immediate_ack","in_current_span","","","","","","","","","","","","","","","","","","incoming_buffer_size","incoming_buffer_size_total","index","init","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","initial_keys","initial_mtu","initial_rtt","initial_window","initiator","insecure_skip_relay_cert_verify","interval","into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","into_0rtt","into_any","into_future","","","","","","","","","","into_incoming","into_inner","ios","is_0rtt","is_alive","is_closed","keep_alive_interval","keylog","known_nodes","last_alive","last_control","last_payload","last_received","last_used","latency","","local_ip","lost_bytes","lost_packets","lost_plpmtud_probes","max_ack_delay","max_concurrent_bidi_streams","max_concurrent_uni_streams","max_data","max_datagram_size","max_idle_timeout","max_incoming","max_stream_data","max_streams_bidi","max_streams_uni","metrics","migration","min_mtu","minimum_change","mtu_discovery_config","network_change","network_path_changed","new","","","new_connection_id","new_token","node_addr","node_id","","observed_addr","offset","on_ack","on_congestion_event","on_end_acks","on_mtu_update","on_sent","open","open_bi","open_uni","packet_threshold","partial_cmp","","","","path","path_challenge","path_response","path_selection","peer_identity","persistent_congestion_threshold","ping","poll","","","","","","","","","poll_flush","poll_read","","poll_shutdown","poll_write","","preferred_address_v4","preferred_address_v6","priority","proxy_from_env","proxy_url","read","read_chunk","read_chunks","read_datagram","read_exact","read_to_end","reason","","","receive_observed_address_reports","receive_window","received_reset","refuse","relay_conn_protocol","relay_map","relay_mode","relay_url","remote_address","remote_address_validated","remote_info","remote_info_iter","remote_node_id","reordering_threshold","reset","reset_stream","retire_connection_id","retry","retry_tag","retry_token_lifetime","rtt","","saturating_add","seal","secret_key","","send_datagram","send_fairness","send_observed_address_reports","send_window","sent_packets","sent_plpmtud_probes","serialize","","","","","set_alpns","set_max_concurrent_bi_streams","set_max_concurrent_uni_streams","set_priority","set_receive_window","set_user_data_for_discovery","source","","","","","","","","","","","","","","","sources","","stable_id","start_session","stats","stop","stop_sending","stopped","stream","stream_data_blocked","stream_receive_window","streams_blocked_bidi","streams_blocked_uni","time_source","time_threshold","to_owned","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","to_string","","","","","","","","","","","","","","","","","","","","","","","","","","","token_key","transport","transport_config","","try_from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_poll","","","","","","","typ","type_id","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","udp_rx","udp_tx","upper_bound","user_data_for_discovery","validation_token","validation_token_config","vzip","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","window","with_additional_alpns","with_crypto","with_single_cert","with_transport_config","write","write_all","write_all_chunks","write_chunk","write_chunks","backtrace","","","pruned","span_trace","","","backtrace","","","source","span_trace","","","backtrace","","source","","span_trace","","backtrace","","source","","span_trace","","backtrace","","","","source","","","span_trace","","","","backtrace","","","source","","span_trace","","","name","","EndpointMetrics","MagicsockMetrics","NetReportMetrics","PortmapMetrics","RelayMetrics","__clone_box","accepts","actor_link_change","actor_tick_direct_addr_heartbeat","actor_tick_main","actor_tick_msg","actor_tick_other","actor_tick_portmap_changed","actor_tick_re_stun","as_iterable","","","borrow","","","","borrow_mut","","","","bytes_recv","bytes_sent","clone","clone_into","clone_to_uninit","compat","","","","compat_mut","","","","compat_ref","","","","connection_became_direct","connection_handshake_success","conns_rx_ratelimited_total","default","","","","deref","","","","deref_mut","","","","deserialize","","","disco_packets_dropped","disco_packets_recv","disco_packets_sent","disconnects","drop","","","","external_address_updated","field_count","","","field_ref","","","fmt","","","","frames_rx_ratelimited_total","from","","","","from_ref","got_ping","groups","groups_cloned","init","","","","into","","","","local_port_updates","magicsock","mapping_attempts","mapping_failures","name","","","","net_report","nodes_contacted","nodes_contacted_directly","num_direct_conns_added","num_direct_conns_removed","num_relay_conns_added","num_relay_conns_removed","other_packets_dropped","other_packets_recv","other_packets_sent","pcp_available","pcp_probes","portmapper","probes_started","recv_data_ipv4","recv_data_ipv6","recv_data_relay","recv_datagrams","recv_disco_bad_key","recv_disco_bad_parse","recv_disco_call_me_maybe","recv_disco_call_me_maybe_bad_disco","recv_disco_ping","recv_disco_pong","recv_disco_relay","recv_disco_udp","recv_gro_datagrams","relay_accepts","relay_home_change","send_data","send_data_network_down","send_disco_relay","send_disco_udp","send_ipv4","send_ipv6","send_packets_dropped","send_packets_recv","send_packets_sent","send_relay","send_relay_error","sent_disco_call_me_maybe","sent_disco_ping","sent_disco_pong","sent_disco_relay","sent_disco_udp","sent_pong","serialize","","","to_owned","try_from","","","","try_into","","","","type_id","","","","unique_client_keys","unknown_frames","update_direct_addrs","upnp_available","upnp_gateway_updated","upnp_probes","upnp_probes_failed","vzip","","","","websocket_accepts","Https","Metrics","Options","Probe","QadIpv4","QadIpv6","QuicConfig","RelayLatencies","Report","__clone_box","","","","","as_iterable","as_protocols","borrow","","","","","","borrow_mut","","","","","","captive_portal","client_config","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmp","compare","compat","","","","","","compat_mut","","","","","","compat_ref","","","","","","default","","","","deref","","","","","","deref_mut","","","","","","deserialize","disabled","drop","","","","","","ep","eq","","","equivalent","","","","","","","","","field_count","field_ref","fmt","","","","","","","","from","","","","","","from_ref","","","","","global_v4","global_v6","has_udp","https","init","","","","","","insecure_skip_relay_cert_verify","into","","","","","","ipv4","ipv6","iter","mapping_varies_by_dest","mapping_varies_by_dest_ipv4","mapping_varies_by_dest_ipv6","name","partial_cmp","preferred_relay","quic_config","relay_latency","reports","reports_full","serialize","to_owned","","","","","to_string","","try_from","","","","","","try_into","","","","","","type_id","","","","","","udp_v4","udp_v6","vzip","","","","","","AttrFromString","DecodingError","","EncodingError","FailedBuildingPacket","IROH_TXT_NAME","InvalidEncodingZ32","InvalidLabel","InvalidLength","InvalidSignature","InvalidTxtEntry","LookupError","LookupFailed","MaxLengthExceededError","NodeData","NodeIdExt","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","","UnexpectedFormat","UserData","Utf8","as_error_source","","","","backtrace","","","","borrow","","","","borrow_mut","","","","cause","","","","compat","","","","compat_mut","","","","compat_ref","","","","data","deref","","","","deref_mut","","","","description","","","","drop","","","","fmt","","","","","","","","from","","","","","from_z32","in_current_span","","","","init","","","","into","","","","node_id","source","","","","to_string","","","","to_z32","try_from","","","","try_into","","","","type_id","","","","vzip","","","","backtrace","","","len","source","","span_trace","","","backtrace","","source","","span_trace","","backtrace","","","source","","","span_trace","","","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","AcceptError","AccessLimit","Connection","DynProtocolHandler","MissingRemoteNodeId","NotAllowed","ProtocolHandler","Router","RouterBuilder","User","__clone_box","","accept","","","","","as_error_source","backtrace","borrow","","","","borrow_mut","","","","builder","cause","clone","","clone_into","","clone_to_uninit","","compat","","","","compat_mut","","","","compat_ref","","","","deref","","","","deref_mut","","","","description","drop","","","","endpoint","","fmt","","","","","from","","","","","","","","","from_err","from_ref","","in_current_span","init","","","","into","","","","is_shutdown","new","","on_connecting","","","","shutdown","","","","","source","spawn","to_owned","","to_string","try_from","","","","try_into","","","","type_id","","","","vzip","","","","backtrace","source","","","span_trace","CleanupDropGuard","DnsPkarrServer","borrow","","borrow_mut","","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","discovery","dns_resolver","drop","","fmt","","from","","init","","into","","nameserver","node_origin","on_node","pkarr_url","run","run_relay_server","run_relay_server_with","run_with_origin","try_from","","try_into","","type_id","","vzip",""],"q":[[0,"iroh"],[355,"iroh::KeyParsingError"],[363,"iroh::defaults"],[369,"iroh::defaults::prod"],[376,"iroh::defaults::staging"],[381,"iroh::discovery"],[709,"iroh::discovery::DiscoveryError"],[718,"iroh::discovery::IntoDiscoveryError"],[722,"iroh::discovery::ParseError"],[740,"iroh::discovery::dns"],[783,"iroh::discovery::mdns"],[825,"iroh::discovery::pkarr"],[986,"iroh::discovery::pkarr::PkarrError"],[993,"iroh::discovery::pkarr::dht"],[1051,"iroh::discovery::static_provider"],[1085,"iroh::dns"],[1129,"iroh::endpoint"],[3084,"iroh::endpoint::AddNodeAddrError"],[3091,"iroh::endpoint::AlpnError"],[3098,"iroh::endpoint::BindError"],[3104,"iroh::endpoint::ConnectError"],[3110,"iroh::endpoint::ConnectWithOptsError"],[3121,"iroh::endpoint::GetMappingAddressError"],[3129,"iroh::endpoint::Source"],[3131,"iroh::metrics"],[3309,"iroh::net_report"],[3496,"iroh::discovery"],[3497,"iroh::node_info"],[3498,"iroh::discovery"],[3499,"iroh::node_info"],[3513,"iroh::discovery"],[3515,"iroh::node_info"],[3517,"iroh::discovery"],[3518,"iroh::node_info"],[3519,"iroh::discovery"],[3520,"iroh::node_info"],[3552,"iroh::discovery"],[3553,"iroh::node_info"],[3595,"iroh::discovery"],[3596,"iroh::node_info"],[3621,"iroh::node_info::DecodingError"],[3630,"iroh::node_info::EncodingError"],[3636,"iroh::node_info::LookupError"],[3645,"iroh::discovery::ParseError"],[3663,"iroh::protocol"],[3784,"iroh::protocol::AcceptError"],[3789,"iroh::test_utils"],[3833,"dyn_clone::sealed"],[3834,"iroh_base::key"],[3835,"core::error"],[3836,"backtrace::capture"],[3837,"core::option"],[3838,"iroh_base::relay_url"],[3839,"iroh_base::node_addr"],[3840,"iroh_relay::relay_map"],[3841,"core::cmp"],[3842,"async_compat"],[3843,"core::result"],[3844,"serde::de"],[3845,"core::net::socket_addr"],[3846,"core::iter::traits::iterator"],[3847,"alloc::collections::btree::set"],[3848,"core::fmt"],[3849,"alloc::string"],[3850,"ed25519_dalek::verifying"],[3851,"data_encoding"],[3852,"signature::error"],[3853,"ed25519_dalek::signing"],[3854,"iroh::magicsock::node_map::node_state"],[3855,"iroh_base::ticket::node"],[3856,"iroh_relay::node_info"],[3857,"url"],[3858,"core::iter::traits::collect"],[3859,"rand_core"],[3860,"n0_watcher"],[3861,"core::clone"],[3862,"alloc::sync"],[3863,"core::hash"],[3864,"core::ops::function"],[3865,"core::marker"],[3866,"http::header::value"],[3867,"core::task::wake"],[3868,"core::task::poll"],[3869,"serde::ser"],[3870,"ed25519"],[3871,"core::any"],[3872,"n0_snafu::spantrace"],[3873,"iroh_relay::dns"],[3874,"alloc::boxed"],[3875,"pkarr::signed_packet"],[3876,"alloc::vec"],[3877,"futures_lite::stream"],[3878,"core::str::error"],[3879,"core::time"],[3880,"pkarr::keys"],[3881,"reqwest::error"],[3882,"http::status"],[3883,"pkarr::client"],[3884,"core::convert"],[3885,"anyhow"],[3886,"hickory_proto::runtime::tokio_runtime"],[3887,"hickory_resolver::name_server::connection_provider"],[3888,"hickory_resolver::resolver"],[3889,"core::net::ip_addr"],[3890,"reqwest::dns::resolve"],[3891,"core::future::future"],[3892,"core::pin"],[3893,"iroh_quinn_proto::connection"],[3894,"iroh_quinn::connection"],[3895,"iroh_quinn_proto::config"],[3896,"iroh_quinn_proto::config::transport"],[3897,"iroh_quinn_proto::varint"],[3898,"iroh_quinn_proto::connection::stats"],[3899,"iroh::magicsock"],[3900,"iroh_quinn_proto::crypto"],[3901,"iroh_quinn_proto::congestion"],[3902,"std::time"],[3903,"iroh_quinn_proto::connection::assembler"],[3904,"bytes::bytes"],[3905,"iroh_quinn_proto::connection::streams::send"],[3906,"iroh_quinn::recv_stream"],[3907,"iroh_quinn::send_stream"],[3908,"iroh_quinn_proto::connection::streams"],[3909,"iroh::magicsock::node_map"],[3910,"iroh_quinn_proto::frame"],[3911,"iroh_quinn_proto"],[3912,"iroh_quinn_proto::coding"],[3913,"bytes::buf::buf_impl"],[3914,"futures_core::stream"],[3915,"bytes::buf::buf_mut"],[3916,"iroh_quinn::incoming"],[3917,"iroh_quinn_proto::connection::streams::recv"],[3918,"ring::error::unspecified"],[3919,"iroh_quinn_proto::transport_parameters"],[3920,"iroh_quinn_proto::shared"],[3921,"iroh_quinn_proto::connection::paths"],[3922,"std::io::error"],[3923,"tokio::io::read_buf"],[3924,"std::collections::hash::map"],[3925,"rustls_pki_types"],[3926,"rustls::error"],[3927,"iroh_quinn_proto::endpoint"],[3928,"iroh_metrics::metrics"],[3929,"iroh_metrics::iterable"],[3930,"iroh_metrics::base"],[3931,"iroh::net_report::options::imp"],[3932,"iroh::net_report::probes"],[3933,"iroh::net_report::report"],[3934,"iroh::net_report::reportgen"],[3935,"rustls::client::client_conn"],[3936,"iroh::net_report::metrics"],[3937,"iroh_quinn::endpoint"],[3938,"z32"],[3939,"simple_dns::simple_dns_error"],[3940,"hickory_proto::error"],[3941,"tokio::runtime::task::error"],[3942,"iroh::test_utils::dns_and_pkarr_servers"],[3943,"iroh_relay::server"],[3944,"iroh_relay"],[3945,"iroh_relay::defaults"]],"i":"Ab0`0`h```Bb```````En`12AlAnB`4BdBf78Ah8908895430721895430721908543721854372185437218431843189543072189543072189543072127`8954330721895430721908543144``8954307212`8437218884443337772221118899543300722118889995554444443307222118522485437218538562839089543072168954307214226``44`26784316`8514458543159066`5854372189302188889554307218954307218954307216712889543072144HhHjHl21210``````````````````Ij`0```````IhIn0``22`2Il1`3If3E`JbIb3745J`785604738Jd67321584906732196715584358435843885849067321584906732158490673214525844906733215844906732196715`05849067321258455588844458849906677321155844444990677322167674458432848967158490673215849067321Kh3544`65414549`4Id4704277;893`04657:656:;89367::6;2895437:6;2895437:6;2895437537:6;289543767676LdLfLh100210Lj000LlLnM`MbMdMf413520543210````MlMj1001101010101001010101010101110101010```N`Mn1011010101010101010101010111110101010``Jn0000````````00NfNjNl333Nd3Nh32514032104354324324325140325140325140325140325140325`105140325514032514032432551403251403214034324213254325514032514032151403245140322NnObOfOjOlOnA@b``A@f0A@d10010111101010101010010101010100101000010101101001010A@j`00000000000000000000000000000000```Jf0000000000000000000000000000000000000000AHl0````ADn``AIb`AHd`ABn``444AGn`1`AGbAGhAE``````0`4`ADlAFn4AGd4AGj```````AIf0AHb```41AEd40;AFjAClAEnAGlAFl=ADdAH`DlAHbAHdABnAChAElACfAHfAHhAHjAHlAHnADfAI`AIbABfAIdAC`AIf3ABj220?AClACn1AD`77ADd;DlADh4ABl94AFnAJlAG`AGbAGdAGfAGhAGjAH`ABnADbAHjADnAE`AEbAEdADlAEf7543210AD`00AElAEnAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIf>AF`?AFfAFjAFlADbADnAE`AEbAEd=:5AD`AFnAG`AGbAGdAGfAGhAGjACj?AClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAHfAHhAHjAHlAHnADfAI`AIbABfAIdAC`AIfAFdAFnAG`AGbAGdAGfAGhAGjACjAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAHfAHhAHjAHlAHnADfAI`AIbABfAIdAC`AIfAFnAG`AGbAGdAGfAGhAGjACjAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAHfAHhAHjAHlAHnADfAI`AIbABfAIdAC`AIf3111ACj876:0876AMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfACnAEn4ABfDl11AClAHl1ACf65522669AFjACj3AHn91258AGlAFlAH`AHbAChAElAIbAD`AId`AMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfADb>=<;52AGnADdDlAHbAHdAHnABfAD`1000101AMfAMdACdACbAMhAJjAFnAJlAJb0AG`AGbAGdAGfAJd0AGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfACnACjAHlAHnAFnAG`AGbAGdAGfAGhAGj9AFfAFlAGnADdAH`DlAHbAHdABnAJhAHfAHhAHjAHlAHnADfAI`AIbAIfAFn00AG`00AGb00AGd00AGf00AGh00AGj00ACj00AFf00AFl00AGn00ADd00AH`00Dl00AHb00AHd00ABn00AJh00AHf00AHh00AHj00AHl00AHn00ADf00AI`00AIb00AIf0087AC`AJdAJjAFn0AJl0AJbAG`0AGb0AGd0AGf08AGh0AGj0ACnACj0AFfAFjAClAEnAGlAFlAGn0ADdAH`0DlAHb0AHd0ABn0AChAElACfAJhAJnAK`AHf0AHh0ADb0AHj0AHl0AHn0ADfAI`0AIbAD`ABfADn0AE`0AEb0AEd0AIdABhABjAKbABlADl0AKdAC`AEf0AIf`AHjAGl0AHfAMfAMdACdACbAMhAJjAFn0AJlAJbAG`0AGb000AGd0AGf0AJdAGh000AGj0ACnACj0000AFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABn00AChAElACfAJhAJn0AK`AHf0AHhADbAHj000AHlAHn0ADfAI`AIbAD`ABfADn0AE`00AEb0AEdAIdABhABjAKbABlADl0AKdAC`AEfAIfAFnAG`AGbAGdAGfAGhAGjACjAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAHfAHhAHjAHlAHnADfAI`AIbABfAIdAC`AIfACj00ABl3AClDl3AHd<;:8AJbAJdABj5AFnAJlAG`AGbAGdAGfAGhAGjAH`ABnADbAHjADnAE`AEbAEdADlAEfACf0AHnAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIfALdACn0AFdAHnAD`AElAMfAMdACdACbAMhAJjAFnAJlAJbAG`AGbAGdAGfAJdAGhAGjACnACjAFfAFjAClAEnAGlAFlAGnADdAH`DlAHbAHdABnAChAElACfAJhAJnAK`AHfAHhADbAHjAHlAHnADfAI`AIbAD`ABfADnAE`AEbAEdAIdABhABjAKbABlADlAKdAC`AEfAIf5AFdAMfAMdACdACbAMh>=<;9AJlACjAFjAJbAJjABfACnAD`0ADd00Dl010ABjAEn00ACh66AClAC`8ACf222:09AEl:;<1AHnAId55==95AFfAFd0000ADj77?ACj5ADfAI`AGl<AMfAMdACdACbAMhABhAKbABlAKdAJdAJb0111ACf02==111AC`22AHfAHhAHjACn06ABjAD`AIf1Dl33ABf09ACh=ACl06ALd=>>{AJlALl}{ACjKj}{AFjKj}{{{b{AJb}}}Bl}{{{b{AJj}}}Bl}{{{b{ABf}}}Bl}{{{b{AjACn}}{Af{Nb}}}{{b{AjACn}}}}<{{AD`{Kd{An}}}AD`}{ADdAf}00{{{b{Dl}}}{{Af{Nb}}}}{DlAf}20{{{b{ABj}}}{{Af{AAf}}}}{AEnKj}00{{{b{AjACh}}{Af{Nb}}}{{b{AjACh}}}}{{{b{AjACn}}ACj}{{b{AjACn}}}}0{AClKj}{{{b{AC`}}}{{Af{Bn}}}}{{{b{AjACn}}{Af{ALn}}}{{b{AjACn}}}}{{{b{AjACf}}Bn}{{b{AjACf}}}}333{{{b{ABf}}}{{b{AM`}}}}{{{b{AjACf}}Bl}{{b{AjACf}}}}{{{b{AjACn}}I`}{{b{AjACn}}}}{{{b{AjAEl}}I`}{{b{AjAEl}}}}{{{b{AjACn}}{Af{AEl}}}{{b{AjACn}}}}{{{b{ABf}}}f}{{{b{AJj}}}Bl}{{{Ff{ALd}}{Ff{ADh}}}ACf}{{ALjAInKj}AHn}{{}AId}=={{{b{ABf}}}{{`{{En{}{{El{{Af{An}}}}}}}}}}{{{b{ABf}}}Kl}{DlKl}{AClKj}{AFfKj}{{{b{AjAFd}}AFbAFbKjBl{b{AMb}}}f}{{{b{AjAFd}}AFbAFbBlKj}f}{{{b{AjAFd}}AFbKjBl{Af{Kj}}}f}{{{b{AjAFd}}I`}f}{{{b{AjAFd}}AFbKjKj}f}{{{b{ADj}}{b{Aj{A`{j}}}}{b{{A`{j}}}}}{{Cb{{b{Aj{A`{j}}}}AJn}}}}{{{b{AC`}}}AMd}{{{b{AC`}}}AMf}{{{b{AjACn}}L`}{{b{AjACn}}}}{{{b{ACj}}{b{ACj}}}{{Af{Bh}}}}{{{b{AHn}}{b{AHn}}}{{Af{Bh}}}}{{{b{ADf}}{b{ADf}}}{{Af{Bh}}}}{{{b{AI`}}{b{AI`}}}{{Af{Bh}}}}{AGlAEn}??{{AD`AIb}AD`}{{{b{AC`}}}{{Af{{K`{ALb}}}}}}7{AClKj}{{{ABd{{b{AjAMf}}}}{b{AjGj}}}Gl}{{{ABd{{b{AjAMd}}}}{b{AjGj}}}Gl}{{{ABd{{b{AjACd}}}}{b{AjGj}}}Gl}{{{ABd{{b{AjACb}}}}{b{AjGj}}}Gl}{{{ABd{{b{AjAMh}}}}{b{AjGj}}}Gl}{{{ABd{{b{AjABh}}}}{b{AjGj}}}{{Gl{c}}}{}}{{{ABd{{b{AjAKb}}}}{b{AjGj}}}{{Gl{c}}}{}}{{{ABd{{b{AjABl}}}}{b{AjGj}}}{{Gl{c}}}{}}{{{ABd{{b{AjAKd}}}}{b{AjGj}}}{{Gl{c}}}{}}{{{ABd{{b{AjAJd}}}}{b{AjGj}}}{{Gl{{Cb{fAMj}}}}}}{{{b{AjAJb}}{b{AjGj}}{b{Aj{A`{j}}}}}{{Gl{{Cb{BnAGb}}}}}}{{{ABd{{b{AjAJb}}}}{b{AjGj}}{b{AjAMl}}}{{Gl{{Cb{fAMj}}}}}}2{{{ABd{{b{AjAJd}}}}{b{AjGj}}{b{{A`{j}}}}}{{Gl{{Cb{BnAMj}}}}}}{{{ABd{{b{AjAJd}}}}{b{AjGj}}{b{{A`{j}}}}}{{Gl{{Cb{BnAGh}}}}}}{{{b{AjACf}}{Af{AEh}}}{{b{AjACf}}}}{{{b{AjACf}}{Af{AEj}}}{{b{AjACf}}}}{{{b{AJd}}}{{Cb{AMnAH`}}}}{AD`AD`}{{AD`Ed}AD`}{{{b{AjAJb}}{b{Aj{A`{j}}}}}{{Cb{{Af{Bn}}AGb}}}}{{{b{AjAJb}}BnBl}{{Cb{{Af{AFf}}AGb}}}}{{{b{AjAJb}}{b{Aj{A`{AFh}}}}}{{Cb{{Af{Bn}}AGb}}}}{{{b{AC`}}}AMh}{{{b{AjAJb}}{b{Aj{A`{j}}}}}{{Cb{fAGf}}}}{{{b{AjAJb}}Bn}{{Cb{{Kd{j}}AG`}}}}{AHfAFh}{AHhAFh}{AHjDb}{{{b{AjACn}}Bl}{{b{AjACn}}}}{{{b{AjACn}}ACj}{{b{AjACn}}}}{{{b{AjAJb}}}{{Cb{{Af{ACj}}AGd}}}}{ABjf}{{AD`Bb}AD`}{{{b{AIf}}}Bd}{{AD`AIf}AD`}{DlAf}{{{b{ABj}}}Ch}{{{b{ABj}}}Bl}{{{b{ABf}}Kl}{{Af{Dl}}}}{{{b{ABf}}}{{`{{Cj{}{{Cf{Dl}}}}}}}}{{{b{AC`}}}{{Cb{KlAEf}}}}{{{b{AjACh}}ACj}{{b{AjACh}}}}{{{b{AjAJd}}ACj}{{Cb{fAH`}}}}{AClKj}0{ABj{{Cb{fAJl}}}}{{{b{ALd}}L`{b{ALf}}{b{{A`{j}}}}}{{l{j}}}}{{{b{AjACf}}Nb}{{b{AjACf}}}}{{{b{AC`}}}Nb}{AEnNb}{{ACjc}ACj{{A@l{ACj}}}}{{{b{ADj}}{b{Aj{Kd{j}}}}{b{{A`{j}}}}}{{Cb{fAJn}}}}{{AD`Al}AD`}{{{b{ABf}}}{{b{Al}}}}{{{b{AC`}}AFh}{{Cb{fAFn}}}}{{{b{AjACn}}Bl}{{b{AjACn}}}}0{{{b{AjACn}}Kj}{{b{AjACn}}}}{AEnKj}0{{{b{AGn}}c}CbGn}{{{b{ADd}}c}CbGn}{{{b{Dl}}c}CbGn}{{{b{AHb}}c}CbGn}{{{b{AHd}}c}CbGn}{{{b{ABf}}{Kd{{Kd{j}}}}}f}{{{b{AC`}}ACj}f}0{{{b{AJd}}AMn}{{Cb{fAH`}}}}1{{{b{ABf}}{Af{Ih}}}f}{{{b{AFn}}}{{Af{{b{n}}}}}}{{{b{AG`}}}{{Af{{b{n}}}}}}{{{b{AGb}}}{{Af{{b{n}}}}}}{{{b{AGd}}}{{Af{{b{n}}}}}}{{{b{AGf}}}{{Af{{b{n}}}}}}{{{b{AGh}}}{{Af{{b{n}}}}}}{{{b{AGj}}}{{Af{{b{n}}}}}}{{{b{ABn}}}{{Af{{b{n}}}}}}{{{b{ADb}}}{{Af{{b{n}}}}}}{{{b{ADn}}}{{Af{{b{n}}}}}}{{{b{AE`}}}{{Af{{b{n}}}}}}{{{b{AEb}}}{{Af{{b{n}}}}}}{{{b{AEd}}}{{Af{{b{n}}}}}}{{{b{ADl}}}{{Af{{b{n}}}}}}{{{b{AEf}}}{{Af{{b{n}}}}}}{{{b{Dl}}}{{Kd{{Eb{AHdNb}}}}}}{ADdAN`}{{{b{AC`}}}Bn}{{{Ff{ALd}}L`{b{ANb}}}{{K`{ANd}}}}{{{b{AC`}}}AGl}{{{b{AjAJb}}ACj}{{Cb{fAH`}}}}{AClKj}{{{b{AjAJd}}}{{Cb{{Af{ACj}}AGj}}}}11{{{b{AjACn}}ACj}{{b{AjACn}}}}22{{{b{AjACf}}{Ff{ANf}}}{{b{AjACf}}}}{{{b{AjACn}}ANh}{{b{AjACn}}}}{bc{}}0000000000000000000000000000000000{bDb}00000000000000000000000000{{{b{AjACf}}{Ff{ADh}}}{{b{AjACf}}}}{ACfFf}{{{b{AjACf}}{Ff{ACn}}}{{b{AjACf}}}}{{AD`ACn}AD`}{c{{Cb{e}}}{}{}}00000000000000000{ANj{{Cb{ACjAL`}}}}{Bn{{Cb{ACjAL`}}}}{Kj{{Cb{ACjAL`}}}}33333333333333333333333333333333333333333333{{}{{Cb{c}}}{}}0000000000000000000000000000000000000000000000000000000000000{{{ABd{{b{Ajc}}}}{b{AjGj}}}Gl{}}000000{ADfAI`}{bHd}0000000000000000000000000000000000000000000000000000000000000{AGlAFj}0{{{b{AjAEl}}I`}{{b{AjAEl}}}}{{AD`Ih}AD`}{ACfANl}{{{b{AjACf}}ANl}{{b{AjACf}}}}{{}c{}}0000000000000000000000000000000000000000000000000000000000000{{{b{AFd}}}Kj}{{AId{Kd{{Kd{j}}}}}AId}{{{Ff{ALd}}}ACf}{{{Kd{ANn}}AO`}{{Cb{ACfAOb}}}}{{AId{Ff{ACn}}}AId}{{{b{AjAJd}}{b{{A`{j}}}}}{{Cb{BnAGh}}}}{{{b{AjAJd}}{b{{A`{j}}}}}{{Cb{fAGh}}}}{{{b{AjAJd}}{b{Aj{A`{AFh}}}}}{{Cb{fAGh}}}}{{{b{AjAJd}}AFh}{{Cb{fAGh}}}}{{{b{AjAJd}}{b{Aj{A`{AFh}}}}}{{Cb{AFlAGh}}}}{AOdAf}{AOfAf}{AOhAf}{AOfBn}{AOdHn}{AOfHn}{AOhHn}{AOjAf}{AOlAf}{AOnAf}{AOjABn}{AOjHn}{AOlHn}{AOnHn}{B@`Af}{B@bAf}`{B@bIl}{B@`Hn}{B@bHn}{B@dAf}{B@fAf}{B@dK`}{B@fK`}{B@dHn}{B@fHn}{B@hAf}{B@jAf}{B@lAf}{B@nAf}{B@hADb}{B@lAEd}{B@nBA`}{B@hHn}{B@jHn}{B@lHn}{B@nHn}{BAbAf}{BAdAf}{BAfAf}{BAbIn}{BAdIn}{BAbHn}{BAdHn}{BAfHn}{BAhDb}{BAjDb}`````{{bd}f}{BAlBAn}{BB`BAn}000000{b{{b{BBb}}}}00{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}00044{{{b{AM`}}}AM`}{{b{b{Ajc}}}f{}}{{bj}f}{{}{{Bj{c}}}{}}000{{{b{Aj}}}{{Bj{{b{Ajc}}}}}{}}000{b{{Bj{{b{c}}}}}{}}00099:{{}BBd}{{}BB`}{{}BAl}{{}AM`}{Bn{{b{c}}}{}}000{Bn{{b{Ajc}}}{}}000{c{{Cb{BBd}}}Cd}{c{{Cb{BB`}}}Cd}{c{{Cb{AM`}}}Cd}{BAlBAn}000{Bnf}000{BBdBAn}{{{b{BBd}}}Bn}{{{b{BB`}}}Bn}{{{b{BAl}}}Bn}{{{b{BBd}}Bn}{{Af{BBf}}}}{{{b{BB`}}Bn}{{Af{BBf}}}}{{{b{BAl}}Bn}{{Af{BBf}}}}{{{b{BBd}}{b{AjCn}}}{{Cb{fD`}}}}{{{b{BB`}}{b{AjCn}}}Jh}{{{b{BAl}}{b{AjCn}}}{{Cb{fD`}}}}{{{b{AM`}}{b{AjCn}}}Jh}<{cc{}}000{{{b{c}}}c{}}>{{{b{AM`}}}{{`{{Cj{}{{Cf{{b{BBh}}}}}}}}}}{{{b{AM`}}}{{`{{Cj{}{{Cf{{Ff{BBh}}}}}}}}}}{{}Bn}000{{}c{}}000{BBdBAn}{AM`Ff}11{{{b{BBd}}}{{b{C`}}}}{{{b{BB`}}}{{b{C`}}}}{{{b{BAl}}}{{b{C`}}}}{{{b{AM`}}}{{b{C`}}}}4{BB`BAn}00000{BAlBAn}00776711111111111110111111100011111110{{{b{BBd}}c}CbGn}{{{b{BB`}}c}CbGn}{{{b{AM`}}c}CbGn}{bc{}}{c{{Cb{e}}}{}{}}000{{}{{Cb{c}}}{}}000{bHd}000778>>>>{{}c{}}0008`````````{{bd}f}0000{b{{b{BBb}}}}{{{b{BBj}}}{{Cl{BBl}}}}{b{{b{c}}}{}}00000{{{b{Aj}}}{{b{Ajc}}}{}}00000{BBnAf}{BC`BCb}{{{b{BBl}}}BBl}{{{b{BBn}}}BBn}{{{b{BCd}}}BCd}{{{b{BC`}}}BC`}{{{b{BBj}}}BBj}{{b{b{Ajc}}}f{}}0000{{bj}f}0000{{{b{BBl}}{b{BBl}}}Bh}{{b{b{c}}}Bh{}}{{}{{Bj{c}}}{}}00000{{{b{Aj}}}{{Bj{{b{Ajc}}}}}{}}00000{b{{Bj{{b{c}}}}}{}}00000{{}BCf}{{}BBn}{{}BCd}{{}BBj}{Bn{{b{c}}}{}}00000{Bn{{b{Ajc}}}{}}00000{c{{Cb{BCf}}}Cd}3{Bnf}00000{BC`BCh}{{{b{BBl}}{b{BBl}}}Bl}{{{b{BBn}}{b{BBn}}}Bl}{{{b{BCd}}{b{BCd}}}Bl}{{b{b{c}}}Bl{}}00000000{{{b{BCf}}}Bn}{{{b{BCf}}Bn}{{Af{BBf}}}}{{{b{BCf}}{b{AjCn}}}Jh}{{{b{BBl}}{b{AjCn}}}Jh}0{{{b{BBn}}{b{AjCn}}}Jh}0{{{b{BCd}}{b{AjCn}}}Jh}{{{b{BC`}}{b{AjCn}}}Jh}{{{b{BBj}}{b{AjCn}}}Jh}{cc{}}00000{{{b{c}}}c{}}0000{BBnAf}0{{{b{BBn}}}Bl}{{BBjBl}BBj}{{}Bn}000001{{}c{}}00000{BC`Bl}0{{{b{BCd}}}{{`{{Cj{}{{Cf{{Eb{{b{B`}}Nb}}}}}}}}}}{{{b{BBn}}}{{Af{Bl}}}}77{{{b{BCf}}}{{b{C`}}}}{{{b{BBl}}{b{BBl}}}{{Af{Bh}}}}9{{BBj{Af{BC`}}}BBj}{BBnBCd}{BCfBAn}0{{{b{BCf}}c}CbGn}{bc{}}0000{bDb}0{c{{Cb{e}}}{}{}}00000{{}{{Cb{c}}}{}}00000{bHd}00000{BBnBl}0{{}c{}}00000`````{{}b}``````````````````{b{{b{n}}}}000{{{b{Lb}}}{{Af{{b{Ad}}}}}}{{{b{Eh}}}{{Af{{b{Ad}}}}}}{{{b{BCj}}}{{Af{{b{Ad}}}}}}{{{b{AAn}}}{{Af{{b{Ad}}}}}}{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000{{{b{Lb}}}{{Af{{b{n}}}}}}{{{b{Eh}}}{{Af{{b{n}}}}}}{{{b{BCj}}}{{Af{{b{n}}}}}}{{{b{AAn}}}{{Af{{b{n}}}}}}{{}{{Bj{c}}}{}}000{{{b{Aj}}}{{Bj{{b{Ajc}}}}}{}}000{b{{Bj{{b{c}}}}}{}}000{E`If}{Bn{{b{c}}}{}}000{Bn{{b{Ajc}}}{}}000{{{b{Lb}}}{{b{C`}}}}{{{b{Eh}}}{{b{C`}}}}{{{b{BCj}}}{{b{C`}}}}{{{b{AAn}}}{{b{C`}}}}{Bnf}000{{{b{Lb}}{b{AjCn}}}{{Cb{fD`}}}}0{{{b{Eh}}{b{AjCn}}}{{Cb{fD`}}}}0{{{b{BCj}}{b{AjCn}}}{{Cb{fD`}}}}0{{{b{AAn}}{b{AjCn}}}{{Cb{fD`}}}}0{cc{}}{BClLb}111{{{b{C`}}}{{Cb{hEh}}}}{{}}000{{}Bn}000{{}c{}}000{E`h}{{{b{Lb}}}{{Af{{b{n}}}}}}{{{b{Eh}}}{{Af{{b{n}}}}}}{{{b{BCj}}}{{Af{{b{n}}}}}}{{{b{AAn}}}{{Af{{b{n}}}}}}{bDb}000{{{b{BCn}}}Db}{c{{Cb{e}}}{}{}}000{{}{{Cb{c}}}{}}000{bHd}000{{}c{}}000{BD`Af}{BDbAf}{BDdAf}{BDbBn}{BD`BDf}{BDdDh}{BD`Hn}{BDbHn}{BDdHn}{BDhAf}{BDjAf}{BDhBCl}{BDjBDl}{BDhHn}{BDjHn}{BDnAf}{BE`Af}{BEbAf}{BDnK`}{BE`K`}{BEbBEd}{BDnHn}{BE`Hn}{BEbHn}{LlAf}{LnAf}{M`Af}{MbAf}{MdAf}{MfAf}{LnDb}{MdDb}{M`Bn}{LlDb}{MbMh}{MfK`}{LlHn}{LnHn}{M`Hn}{MbHn}{MdHn}{MfHn}``````````{{bd}f}0{{{b{BEf}}AC`}{{`{{ABb{}{{G`{{Cb{fBEh}}}}}}Gd}}}}{{{b{BEj}}AC`}{{ABd{{K`{ABb}}}}}}{{BElce}BEl{{BEn{{A`{j}}}}}{{A@l{{K`{BEj}}}}}}{{{b{{BF`{c}}}}AC`}{{Cb{fBEh}}}{BEfFb}}{{bAC`}{{ABd{{K`{ABb}}}}}}{b{{b{n}}}}{{{b{BEh}}}{{Af{{b{Ad}}}}}}{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000{ABfBEl}{{{b{BEh}}}{{Af{{b{n}}}}}}{{{b{BFb}}}BFb}{{{b{{BF`{c}}}}}{{BF`{c}}}{FbBEfFb}}{{b{b{Ajc}}}f{}}0{{bj}f}0{{}{{Bj{c}}}{}}000{{{b{Aj}}}{{Bj{{b{Ajc}}}}}{}}000{b{{Bj{{b{c}}}}}{}}000{Bn{{b{c}}}{}}000{Bn{{b{Ajc}}}{}}000{{{b{BEh}}}{{b{C`}}}}{Bnf}000{{{b{BFb}}}{{b{ABf}}}}{{{b{BEl}}}{{b{ABf}}}}{{{b{BFb}}{b{AjCn}}}Jh}{{{b{BEl}}{b{AjCn}}}Jh}{{{b{BEh}}{b{AjCn}}}Jh}0{{{b{{BF`{c}}}}{b{AjCn}}}Jh{BFdBEfFb}}{cc{}}0{AH`BEh}1{{{K`{n}}}BEh}{AEfBEh}{ABnBEh}{AMjBEh}5{cBEh{nGdGf}}{{{b{c}}}c{}}0{{}}{{}Bn}000{{}c{}}000{{{b{BFb}}}Bl}{ABfBEl}{{ce}{{BF`{c}}}{BEfFb}{{Gb{Kl}{{G`{Bl}}}}GdGf}}{{{b{BEf}}ABl}{{`{{ABb{}{{G`{{Cb{AC`BEh}}}}}}Gd}}}}{{{b{BEj}}ABl}{{ABd{{K`{ABb}}}}}}{{bABl}{{ABd{{K`{ABb}}}}}}{{{b{{BF`{c}}}}ABl}{{`{{ABb{}{{G`{{Cb{AC`BEh}}}}}}Gd}}}{BEfFb}}{{{b{BEf}}}{{`{{ABb{}{{G`{f}}}}Gd}}}}{{{b{BEj}}}{{ABd{{K`{ABb}}}}}}{{{b{BFb}}}{{Cb{fBFf}}}}{b{{ABd{{K`{ABb}}}}}}{{{b{{BF`{c}}}}}{{`{{ABb{}{{G`{f}}}}Gd}}}{BEfFb}}{{{b{BEh}}}{{Af{{b{n}}}}}}{BElBFb}{bc{}}0{bDb}{c{{Cb{e}}}{}{}}000{{}{{Cb{c}}}{}}000{bHd}000{{}c{}}000{BFhAf}{BFhABn}{BFjAEf}{BFlK`}{BFhHn}``{b{{b{c}}}{}}0{{{b{Aj}}}{{b{Ajc}}}{}}0{{}{{Bj{c}}}{}}0{{{b{Aj}}}{{Bj{{b{Ajc}}}}}{}}0{b{{Bj{{b{c}}}}}{}}0{Bn{{b{c}}}{}}0{Bn{{b{Ajc}}}{}}0{{{b{BFn}}Al}Ib}{{{b{BFn}}}Jf}{Bnf}0{{{b{BG`}}{b{AjCn}}}Jh}{{{b{BFn}}{b{AjCn}}}Jh}{cc{}}0{{}Bn}0{{}c{}}0{BFnCh}{BFnDb}{{{b{BFn}}{b{Kl}}Nb}{{BGb{f}}}}{BFnEd}{{}{{BGb{BFn}}}}{{}{{Cb{{Eb{BdB`BGd}}BGf}}}}{Bl{{Cb{{Eb{BdB`BGd}}BGf}}}}{Db{{BGb{BFn}}}}{c{{Cb{e}}}{}{}}0{{}{{Cb{c}}}{}}0{bHd}0{{}c{}}0","D":"GGf","p":[[1,"reference",null,null,1],[5,"Private",3833],[1,"unit"],[5,"PublicKey",0,3834],[1,"u8"],[1,"array"],[10,"Error",3835],[1,"slice"],[6,"KeyParsingError",0,3834],[5,"Backtrace",3836],[6,"Option",3837,null,1],[5,"RelayUrlParseError",0,3838],[0,"mut"],[5,"SecretKey",0,3834],[5,"NodeAddr",0,3839],[5,"RelayUrl",0,3838],[6,"RelayProtocol",0],[5,"RelayMap",0,3840],[5,"RelayNode",0,3840],[6,"Ordering",3841],[5,"Compat",3842],[1,"bool"],[1,"usize"],[1,"str"],[6,"Result",3843,null,1],[10,"Deserializer",3844],[17,"Item"],[6,"SocketAddr",3845],[10,"Iterator",3846],[5,"BTreeSet",3847],[5,"Formatter",3848],[5,"Error",3848],[5,"String",3849],[5,"VerifyingKey",3850],[5,"DecodeError",3851],[5,"Error",3852],[5,"SigningKey",3853],[5,"RemoteInfo",1129,3854],[5,"NodeTicket",3855],[5,"NodeInfo",3595,3856],[1,"tuple",null,null,1],[5,"Url",3857],[10,"IntoIterator",3858],[6,"DecodingError",3596,3856],[10,"CryptoRngCore",3859],[17,"Value"],[10,"Watcher",0,3860],[5,"Disconnected",3860],[10,"Clone",3861],[10,"Eq",3841],[5,"Arc",3862,null,1],[10,"Hasher",3863],[5,"InitializedFut",3860],[10,"Nullable",3860],[5,"Map",3860],[17,"Output"],[10,"Fn",3864],[10,"Send",3865],[10,"Sync",3865],[5,"HeaderValue",3866],[5,"Context",3867],[6,"Poll",3868],[10,"Serializer",3869],[5,"Signature",3870],[5,"Stream",3860],[5,"TypeId",3871],[5,"NextFut",3860],[15,"Decode",355],[15,"Key",355],[15,"DecodeInvalidLength",355],[5,"SpanTrace",3872],[1,"u16"],[5,"ConcurrentDiscovery",3595],[10,"Discovery",3595],[5,"NodeData",3595,3856],[5,"UserData",3595,3856],[6,"ParseError",3595,3856],[6,"IntoDiscoveryError",3595],[6,"DiscoveryError",3595],[5,"Lagged",3595],[5,"DiscoveryItem",3595],[5,"DiscoveryContext",3595],[5,"DnsResolver",1085,3873],[8,"Result",3848],[6,"IrohAttr",3856],[5,"TxtAttrs",3856],[6,"PkarrError",825],[5,"Box",3874,null,1],[5,"SignedPacket",3875],[5,"Vec",3876],[5,"TxtLookup",3873],[10,"IntoDiscovery",3595],[1,"u64"],[8,"NodeId",0,3834],[8,"Boxed",3877],[1,"u32"],[6,"EncodingError",3596,3856],[15,"NoServiceConfigured",709],[15,"NoResults",709],[15,"User",709],[15,"User",718],[15,"UnexpectedFormat",3645],[15,"AttrFromString",3645],[15,"NumLabels",3645],[15,"Utf8",3645],[15,"NotAnIrohRecord",3645],[15,"DecodingError",3645],[5,"Utf8Error",3878],[5,"DnsDiscoveryBuilder",740],[5,"DnsDiscovery",740],[5,"MdnsDiscoveryBuilder",783],[5,"MdnsDiscovery",783],[5,"Duration",3879],[5,"PkarrPublisherBuilder",825],[5,"PkarrPublisher",825],[5,"PkarrResolverBuilder",825],[5,"PkarrResolver",825],[5,"PkarrRelayClient",825],[15,"PublicKey",986],[6,"PublicKeyError",3880],[15,"Verify",986],[6,"SignedPacketVerifyError",3875],[15,"HttpSend",986],[5,"Error",3881],[15,"HttpPayload",986],[15,"Encoding",986],[15,"HttpRequest",986],[5,"StatusCode",3882],[15,"InvalidRelayUrl",986],[5,"Builder",993],[5,"DhtDiscovery",993],[5,"Client",3883],[5,"StaticProvider",1051],[10,"Into",3884,null,1],[8,"Result",3885],[5,"TokioRuntimeProvider",3886],[5,"GenericConnector",3887],[5,"Resolver",3888],[6,"IpAddr",3889],[6,"DnsError",3873],[10,"ToString",3849],[5,"StaggeredError",3873],[6,"LookupError",3596,3856],[5,"Name",3890],[10,"Future",3891,null,1],[5,"Pin",3892],[5,"Endpoint",1129],[5,"Accept",1129],[5,"Incoming",1129],[5,"Connecting",1129],[6,"ConnectionError",1129,3893],[5,"Connection",1129],[5,"AcceptBi",1129,3894],[5,"AcceptUni",1129,3894],[5,"ServerConfig",1129,3895],[5,"AckFrequencyConfig",1129,3896],[5,"VarInt",1129,3897],[5,"FrameStats",1129,3898],[5,"TransportConfig",1129,3896],[5,"Builder",1129],[6,"AddNodeAddrError",1129,3899],[5,"DirectAddrInfo",1129,3854],[5,"DirectAddr",1129,3899],[10,"HandshakeTokenKey",1129,3900],[10,"AeadKey",1129,3900],[6,"AlpnError",1129],[6,"ConnectWithOptsError",1129],[6,"ConnectError",1129],[6,"BindError",1129],[6,"GetMappingAddressError",1129],[5,"RemoteNodeIdError",1129],[5,"SocketAddrV4",3845],[5,"SocketAddrV6",3845],[5,"MtuDiscoveryConfig",1129,3896],[5,"PathStats",1129,3898],[10,"ControllerFactory",1129,3901],[5,"Instant",3902],[10,"Controller",1129,3901],[5,"Chunk",1129,3903],[5,"Bytes",3904],[5,"UdpStats",1129,3898],[5,"Written",1129,3905],[6,"SendDatagramError",1129,3894],[6,"ReadToEndError",1129,3906],[6,"ReadError",1129,3906],[6,"ResetError",1129,3906],[6,"ReadExactError",1129,3906],[6,"WriteError",1129,3907],[6,"StoppedError",1129,3907],[5,"ConnectionStats",1129,3898],[6,"ControlMsg",1129,3854],[5,"ClosedStream",1129,3908],[6,"ConnectionType",1129,3854],[6,"Source",1129,3909],[5,"ConnectionClose",1129,3910],[5,"ApplicationClose",1129,3910],[5,"TransportError",1129],[5,"TransportErrorCode",1129],[5,"StreamId",1129,3911],[6,"DirectAddrType",1129,3899],[6,"PathSelection",1129],[5,"ConnectOptions",1129],[6,"RelayMode",1129],[5,"Direct",3860],[5,"UnexpectedEnd",3912],[10,"Buf",3913],[6,"Dir",3911],[10,"Stream",3914],[5,"RecvStream",1129,3906],[5,"SendStream",1129,3907],[10,"BufMut",3915],[5,"ExportKeyingMaterialError",1129,3900],[5,"WeakConnectionHandle",1129,3894],[5,"RetryError",1129,3916],[5,"CryptoError",1129,3900],[5,"UnsupportedVersion",1129,3900],[5,"IncomingFuture",1129],[5,"ZeroRttAccepted",1129],[6,"ReadableError",3917],[6,"Close",3910],[5,"Unspecified",3918],[6,"Error",3919],[5,"InvalidFrame",3910],[5,"VarIntBoundsExceeded",3897],[10,"Any",3871],[10,"CryptoServerConfig",1129],[5,"ConnectionId",3920],[5,"Keys",3900],[6,"Side",3911],[5,"Incoming",3916],[5,"IdleTimeout",3896],[5,"EndpointMetrics",3131],[5,"RttEstimator",3921],[5,"OpenBi",1129,3894],[5,"OpenUni",1129,3894],[5,"ReadDatagram",1129,3894],[5,"Error",3922],[5,"ReadBuf",3923],[1,"i32"],[5,"HashMap",3924],[5,"TransportParameters",3919],[10,"Session",3900],[10,"TimeSource",3895],[1,"f32"],[1,"u128"],[5,"ValidationTokenConfig",3895],[5,"CertificateDer",3925],[6,"PrivateKeyDer",3925],[6,"Error",3926],[15,"Empty",3084],[15,"EmptyPruned",3084],[15,"OwnAddress",3084],[15,"ConnectionError",3091],[15,"Unavailable",3091],[15,"UnknownHandshake",3091],[15,"MagicSpawn",3098],[15,"Discovery",3098],[15,"Connect",3104],[15,"Connection",3104],[15,"AddNodeAddr",3110],[15,"SelfConnect",3110],[15,"NoAddress",3110],[15,"Quinn",3110],[6,"ConnectError",3927],[15,"DiscoveryStart",3121],[15,"Discover",3121],[15,"NoAddress",3121],[15,"Discovery",3129],[15,"NamedApp",3129],[5,"RelayMetrics",3131],[5,"Counter",3928],[5,"MagicsockMetrics",3131],[10,"Iterable",3929],[5,"PortmapMetrics",3131],[5,"MetricItem",3930],[10,"MetricsGroup",3930],[5,"Options",3309,3931],[6,"Probe",3309,3932],[5,"Report",3309,3933],[5,"QuicConfig",3309,3934],[5,"ClientConfig",3935],[5,"RelayLatencies",3309,3933],[5,"Metrics",3309,3936],[5,"Endpoint",3937],[5,"MaxLengthExceededError",3596,3856],[6,"SignedPacketBuildError",3875],[10,"NodeIdExt",3596,3856],[15,"InvalidEncodingZ32",3621],[15,"InvalidLength",3621],[15,"InvalidSignature",3621],[6,"Z32Error",3938],[15,"FailedBuildingPacket",3630],[15,"InvalidTxtEntry",3630],[6,"SimpleDnsError",3939],[15,"ParseError",3636],[15,"LookupFailed",3636],[15,"InvalidLabel",3636],[5,"ProtoError",3940],[10,"ProtocolHandler",3663],[6,"AcceptError",3663],[10,"DynProtocolHandler",3663],[5,"RouterBuilder",3663],[10,"AsRef",3884],[5,"AccessLimit",3663],[5,"Router",3663],[10,"Debug",3848],[5,"JoinError",3941],[15,"Connection",3784],[15,"MissingRemoteNodeId",3784],[15,"User",3784],[5,"DnsPkarrServer",3789,3942],[5,"CleanupDropGuard",3789],[8,"Result",3922],[5,"Server",3943],[6,"SpawnError",3943]],"r":[[0,3834],[1,3834],[2,1129],[3,3834],[4,3834],[5,3834],[6,3839],[7,3834],[8,3834],[10,3840],[11,1129],[12,3840],[14,3838],[15,3838],[16,3834],[17,3860],[18,3860],[20,3834],[21,3834],[22,3839],[23,3838],[25,3840],[26,3840],[27,3834],[28,3834],[29,3838],[30,3834],[31,3834],[32,3838],[33,3834],[34,3834],[35,3834],[36,3834],[37,3839],[38,3838],[39,3838],[41,3840],[42,3840],[43,3834],[44,3834],[45,3834],[46,3839],[47,3838],[48,3838],[50,3840],[51,3840],[52,3834],[53,3838],[54,3834],[55,3834],[56,3839],[57,3838],[59,3840],[60,3840],[61,3834],[62,3834],[63,3839],[64,3838],[66,3840],[67,3840],[68,3834],[69,3834],[70,3839],[71,3838],[73,3840],[74,3840],[75,3834],[76,3839],[77,3838],[78,3840],[79,3834],[80,3839],[81,3838],[82,3840],[83,3834],[84,3834],[85,3834],[86,3839],[87,3838],[88,3838],[90,3840],[91,3840],[92,3834],[93,3834],[94,3834],[95,3839],[96,3838],[97,3838],[99,3840],[100,3840],[101,3834],[102,3834],[103,3834],[104,3839],[105,3838],[106,3838],[108,3840],[109,3840],[110,3840],[113,3834],[114,3834],[115,3834],[116,3839],[117,3838],[118,3838],[119,3838],[121,3840],[122,3840],[123,3834],[124,3834],[125,3834],[126,3839],[127,3838],[128,3838],[130,3840],[131,3840],[132,3834],[133,3838],[134,3834],[135,3834],[136,3839],[137,3838],[138,3840],[139,3839],[140,3839],[143,3834],[144,3834],[145,3834],[146,3839],[147,3838],[148,3838],[150,3840],[151,3840],[152,3840],[154,3834],[155,3839],[156,3838],[158,3840],[159,3840],[160,3834],[161,3834],[162,3834],[163,3839],[164,3839],[165,3839],[166,3838],[167,3838],[168,3838],[172,3840],[173,3840],[174,3840],[175,3840],[176,3840],[177,3840],[178,3834],[179,3834],[180,3834],[181,3834],[182,3834],[183,3839],[184,3838],[185,3838],[186,3838],[187,3838],[189,3840],[190,3840],[191,3840],[192,3840],[193,3834],[194,3834],[195,3834],[196,3834],[197,3834],[198,3834],[199,3834],[200,3834],[201,3834],[202,3839],[203,3839],[204,3839],[205,3839],[206,3839],[207,3839],[208,3838],[209,3838],[210,3838],[212,3840],[213,3840],[214,3840],[215,3840],[216,3840],[217,3834],[218,3834],[219,3840],[220,3840],[221,3839],[222,3834],[223,3834],[224,3839],[225,3838],[227,3840],[228,3840],[229,3834],[230,3834],[231,3838],[232,3834],[233,3834],[234,3860],[235,3840],[236,3834],[237,3838],[238,3834],[239,3838],[240,3834],[241,3834],[242,3834],[243,3839],[244,3838],[245,3838],[247,3840],[248,3840],[249,3860],[250,3834],[251,3834],[252,3834],[253,3839],[254,3838],[255,3838],[257,3840],[258,3840],[259,3839],[260,3840],[261,3840],[262,3860],[265,3839],[266,3839],[267,3944],[268,3840],[269,3860],[271,3834],[272,3839],[273,3838],[274,3840],[275,3860],[277,3834],[278,3834],[279,3840],[280,3839],[281,3839],[282,3834],[283,3834],[284,3834],[285,3839],[286,3838],[287,3840],[288,3834],[289,3834],[290,3838],[291,3860],[292,3860],[294,3834],[295,3834],[296,3834],[297,3839],[298,3838],[300,3840],[301,3840],[302,3834],[303,3834],[304,3838],[305,3838],[306,3840],[307,3840],[308,3834],[309,3834],[310,3834],[311,3834],[312,3834],[313,3834],[314,3834],[315,3839],[316,3838],[317,3838],[319,3840],[320,3840],[321,3834],[322,3834],[323,3834],[324,3839],[325,3838],[326,3838],[328,3840],[329,3840],[330,3834],[331,3834],[332,3834],[333,3839],[334,3838],[335,3838],[337,3840],[338,3840],[339,3860],[341,3840],[342,3840],[343,3834],[344,3834],[345,3834],[346,3834],[347,3839],[348,3838],[349,3838],[351,3840],[352,3840],[353,3839],[354,3839],[366,3945],[381,3856],[383,3856],[391,3856],[394,3856],[395,3856],[396,3856],[397,3856],[398,3856],[399,3856],[402,3856],[403,3856],[404,3856],[405,3856],[406,3856],[409,3856],[410,3856],[414,3856],[415,3856],[419,3856],[420,3856],[421,3856],[422,3856],[429,3856],[430,3856],[431,3856],[432,3856],[439,3856],[443,3856],[444,3856],[445,3856],[446,3856],[448,3856],[449,3856],[450,3856],[452,3856],[453,3856],[454,3856],[456,3856],[457,3856],[458,3856],[459,3856],[460,3856],[461,3856],[468,3856],[469,3856],[470,3856],[471,3856],[478,3856],[479,3856],[480,3856],[481,3856],[488,3856],[489,3856],[491,3856],[492,3856],[493,3856],[494,3856],[495,3856],[503,3856],[504,3856],[505,3856],[506,3856],[507,3856],[514,3856],[518,3856],[521,3856],[522,3856],[523,3856],[524,3856],[532,3856],[533,3856],[534,3856],[535,3856],[536,3856],[537,3856],[538,3856],[539,3856],[540,3856],[541,3856],[542,3856],[543,3856],[544,3856],[545,3856],[546,3856],[547,3856],[548,3856],[549,3856],[559,3856],[560,3856],[561,3856],[562,3856],[563,3856],[564,3856],[565,3856],[566,3856],[567,3856],[568,3856],[581,3856],[582,3856],[583,3856],[584,3856],[585,3856],[588,3856],[589,3856],[590,3856],[591,3856],[595,3856],[596,3856],[597,3856],[598,3856],[605,3856],[606,3856],[607,3856],[608,3856],[617,3856],[621,3856],[622,3856],[626,3856],[628,3856],[633,3856],[637,3856],[638,3856],[639,3856],[646,3856],[648,3856],[649,3856],[650,3856],[652,3856],[653,3856],[654,3856],[658,3856],[659,3856],[660,3856],[661,3856],[662,3856],[663,3856],[670,3856],[671,3856],[672,3856],[673,3856],[680,3856],[681,3856],[682,3856],[683,3856],[690,3856],[693,3856],[694,3856],[695,3856],[696,3856],[703,3856],[704,3856],[705,3856],[706,3856],[707,3856],[708,3856],[742,3873],[743,3873],[1085,3873],[1086,3873],[1087,3873],[1088,3873],[1089,3873],[1090,3873],[1091,3873],[1092,3873],[1093,3873],[1094,3873],[1095,3873],[1096,3873],[1097,3873],[1098,3873],[1099,3873],[1100,3873],[1101,3873],[1102,3873],[1103,3873],[1104,3873],[1105,3873],[1106,3873],[1107,3873],[1108,3873],[1109,3873],[1110,3873],[1111,3873],[1112,3873],[1113,3873],[1114,3873],[1115,3873],[1116,3873],[1117,3873],[1118,3873],[1119,3873],[1120,3873],[1121,3873],[1122,3873],[1123,3873],[1124,3873],[1125,3873],[1126,3873],[1127,3873],[1128,3873],[1132,3894],[1133,3894],[1134,3896],[1136,3899],[1137,3900],[1140,3909],[1141,3910],[1142,3893],[1148,3854],[1149,3903],[1150,3893],[1151,3908],[1152,3906],[1153,3907],[1161,3910],[1162,3893],[1163,3893],[1165,3894],[1166,3906],[1167,3906],[1168,3907],[1169,3907],[1170,3898],[1171,3854],[1172,3854],[1173,3901],[1174,3901],[1175,3900],[1179,3854],[1180,3899],[1181,3854],[1182,3899],[1183,3894],[1186,3909],[1190,3899],[1191,3899],[1193,3900],[1197,3906],[1198,3898],[1200,3900],[1203,3906],[1207,3899],[1208,3893],[1209,3897],[1210,3897],[1212,3854],[1213,3896],[1216,3909],[1219,3854],[1220,3894],[1221,3894],[1222,3899],[1225,3898],[1226,3854],[1227,3854],[1228,3899],[1229,3899],[1230,3899],[1232,3906],[1233,3894],[1234,3906],[1235,3906],[1236,3906],[1237,3906],[1238,3906],[1239,3854],[1240,3909],[1243,3854],[1245,3906],[1246,3893],[1247,3906],[1248,3916],[1251,3909],[1253,3894],[1254,3907],[1255,3895],[1256,3909],[1258,3907],[1259,3907],[1260,3911],[1262,3893],[1263,3894],[1264,3906],[1265,3896],[1267,3893],[1269,3909],[1270,3898],[1272,3899],[1274,3894],[1275,3900],[1276,3897],[1277,3893],[1278,3894],[1279,3907],[1280,3905],[1282,3906],[1283,3906],[1284,3907],[1285,3907],[1286,3894],[1287,3906],[1288,3906],[1289,3906],[1290,3906],[1291,3907],[1292,3907],[1293,3897],[1294,3898],[1295,3898],[1296,3898],[1297,3898],[1298,3905],[1299,3854],[1300,3854],[1301,3908],[1302,3854],[1303,3854],[1304,3909],[1305,3893],[1306,3896],[1307,3896],[1308,3895],[1309,3910],[1310,3910],[1313,3911],[1314,3899],[1315,3899],[1326,3896],[1327,3898],[1328,3896],[1329,3898],[1333,3854],[1334,3899],[1335,3854],[1336,3900],[1337,3896],[1341,3894],[1342,3916],[1343,3906],[1344,3906],[1345,3906],[1346,3906],[1347,3907],[1348,3907],[1349,3908],[1350,3893],[1351,3899],[1359,3899],[1369,3896],[1370,3898],[1371,3894],[1372,3894],[1373,3894],[1374,3894],[1375,3894],[1376,3894],[1377,3894],[1378,3916],[1379,3906],[1380,3906],[1381,3906],[1382,3906],[1383,3906],[1384,3907],[1385,3907],[1386,3907],[1387,3896],[1388,3897],[1389,3903],[1390,3898],[1391,3898],[1392,3898],[1393,3898],[1394,3905],[1395,3854],[1396,3854],[1397,3908],[1398,3854],[1399,3854],[1400,3909],[1401,3893],[1402,3896],[1403,3896],[1404,3895],[1405,3900],[1406,3900],[1407,3900],[1408,3910],[1409,3910],[1410,3899],[1413,3911],[1414,3899],[1415,3899],[1433,3894],[1434,3894],[1435,3894],[1436,3894],[1437,3894],[1438,3894],[1439,3894],[1440,3916],[1441,3906],[1442,3906],[1443,3906],[1444,3906],[1445,3906],[1446,3907],[1447,3907],[1448,3907],[1449,3896],[1450,3897],[1451,3903],[1452,3898],[1453,3898],[1454,3898],[1455,3898],[1456,3905],[1457,3854],[1458,3854],[1459,3908],[1460,3854],[1461,3854],[1462,3909],[1463,3893],[1464,3896],[1465,3896],[1466,3895],[1467,3900],[1468,3900],[1469,3900],[1470,3910],[1471,3910],[1472,3899],[1475,3911],[1476,3899],[1477,3899],[1496,3901],[1498,3903],[1499,3898],[1500,3905],[1501,3899],[1508,3905],[1510,3894],[1511,3906],[1512,3906],[1513,3906],[1514,3906],[1515,3907],[1516,3907],[1517,3897],[1518,3898],[1519,3898],[1520,3898],[1521,3898],[1522,3905],[1523,3854],[1524,3854],[1525,3908],[1526,3854],[1527,3854],[1528,3909],[1529,3893],[1530,3896],[1531,3896],[1532,3895],[1533,3910],[1534,3910],[1537,3911],[1538,3899],[1539,3899],[1545,3901],[1546,3894],[1547,3906],[1548,3906],[1549,3906],[1550,3906],[1551,3907],[1552,3907],[1553,3897],[1554,3898],[1555,3898],[1556,3898],[1557,3898],[1558,3905],[1559,3854],[1560,3854],[1561,3908],[1562,3854],[1563,3854],[1564,3909],[1565,3893],[1566,3896],[1567,3896],[1568,3895],[1569,3910],[1570,3910],[1573,3911],[1574,3899],[1575,3899],[1581,3894],[1582,3906],[1583,3906],[1584,3906],[1585,3906],[1586,3907],[1587,3907],[1588,3897],[1589,3898],[1590,3898],[1591,3898],[1592,3898],[1593,3905],[1594,3854],[1595,3854],[1596,3908],[1597,3854],[1598,3854],[1599,3909],[1600,3893],[1601,3896],[1602,3896],[1603,3895],[1604,3910],[1605,3910],[1608,3911],[1609,3899],[1610,3899],[1620,3897],[1621,3911],[1622,3899],[1623,3899],[1625,3897],[1626,3911],[1627,3899],[1628,3899],[1629,3894],[1630,3894],[1631,3894],[1632,3894],[1633,3894],[1634,3894],[1635,3894],[1636,3916],[1637,3906],[1638,3906],[1639,3906],[1640,3906],[1641,3906],[1642,3907],[1643,3907],[1644,3907],[1645,3896],[1646,3897],[1647,3903],[1648,3898],[1649,3898],[1650,3898],[1651,3898],[1652,3905],[1653,3854],[1654,3854],[1655,3908],[1656,3854],[1657,3854],[1658,3909],[1659,3893],[1660,3896],[1661,3896],[1662,3895],[1663,3900],[1664,3900],[1665,3900],[1666,3910],[1667,3910],[1668,3899],[1671,3911],[1672,3899],[1673,3899],[1691,3894],[1692,3894],[1693,3894],[1694,3894],[1695,3894],[1696,3894],[1697,3894],[1698,3916],[1699,3906],[1700,3906],[1701,3906],[1702,3906],[1703,3906],[1704,3907],[1705,3907],[1706,3907],[1707,3896],[1708,3897],[1709,3903],[1710,3898],[1711,3898],[1712,3898],[1713,3898],[1714,3905],[1715,3854],[1716,3854],[1717,3908],[1718,3854],[1719,3854],[1720,3909],[1721,3893],[1722,3896],[1723,3896],[1724,3895],[1725,3900],[1726,3900],[1727,3900],[1728,3910],[1729,3910],[1730,3899],[1733,3911],[1734,3899],[1735,3899],[1753,3894],[1754,3894],[1755,3894],[1756,3894],[1757,3894],[1758,3894],[1759,3894],[1760,3916],[1761,3906],[1762,3906],[1763,3906],[1764,3906],[1765,3906],[1766,3907],[1767,3907],[1768,3907],[1769,3896],[1770,3897],[1771,3903],[1772,3898],[1773,3898],[1774,3898],[1775,3898],[1776,3905],[1777,3854],[1778,3854],[1779,3908],[1780,3854],[1781,3854],[1782,3909],[1783,3893],[1784,3896],[1785,3896],[1786,3895],[1787,3900],[1788,3900],[1789,3900],[1790,3910],[1791,3910],[1792,3899],[1795,3911],[1796,3899],[1797,3899],[1815,3896],[1816,3898],[1819,3854],[1822,3898],[1824,3898],[1825,3895],[1826,3896],[1827,3898],[1828,3898],[1829,3898],[1830,3898],[1831,3896],[1832,3896],[1834,3898],[1835,3897],[1837,3911],[1838,3896],[1839,3897],[1840,3898],[1841,3898],[1842,3898],[1843,3898],[1844,3905],[1845,3908],[1846,3854],[1847,3896],[1848,3896],[1853,3894],[1854,3894],[1855,3894],[1856,3894],[1857,3894],[1858,3894],[1859,3894],[1860,3916],[1861,3906],[1862,3906],[1863,3906],[1864,3906],[1865,3906],[1866,3907],[1867,3907],[1868,3907],[1869,3896],[1870,3897],[1871,3903],[1872,3898],[1873,3898],[1874,3898],[1875,3898],[1876,3905],[1877,3854],[1878,3854],[1879,3908],[1880,3854],[1881,3854],[1882,3909],[1883,3893],[1884,3896],[1885,3896],[1886,3895],[1887,3900],[1888,3900],[1889,3900],[1890,3910],[1891,3910],[1892,3899],[1895,3911],[1896,3899],[1897,3899],[1915,3894],[1916,3894],[1917,3894],[1918,3894],[1919,3894],[1920,3894],[1921,3894],[1922,3916],[1923,3906],[1924,3906],[1925,3906],[1926,3906],[1927,3906],[1928,3907],[1929,3907],[1930,3907],[1931,3896],[1932,3897],[1933,3903],[1934,3898],[1935,3898],[1936,3898],[1937,3898],[1938,3905],[1939,3854],[1940,3854],[1941,3908],[1942,3854],[1943,3854],[1944,3909],[1945,3893],[1946,3896],[1947,3896],[1948,3895],[1949,3900],[1950,3900],[1951,3900],[1952,3910],[1953,3910],[1954,3899],[1957,3911],[1958,3899],[1959,3899],[1977,3899],[1984,3854],[1985,3854],[1986,3854],[1987,3854],[1988,3909],[1989,3911],[1999,3894],[2000,3894],[2001,3894],[2002,3894],[2003,3894],[2004,3894],[2005,3894],[2006,3916],[2007,3906],[2008,3906],[2009,3906],[2010,3906],[2011,3906],[2012,3906],[2013,3907],[2014,3907],[2015,3907],[2016,3907],[2017,3896],[2018,3897],[2019,3903],[2020,3898],[2021,3898],[2022,3898],[2023,3898],[2024,3905],[2025,3854],[2026,3854],[2027,3908],[2028,3854],[2029,3854],[2030,3909],[2031,3893],[2032,3896],[2033,3896],[2034,3895],[2035,3900],[2036,3900],[2037,3900],[2038,3910],[2039,3910],[2040,3899],[2043,3911],[2044,3899],[2045,3899],[2063,3896],[2064,3897],[2066,3911],[2067,3894],[2068,3906],[2069,3906],[2070,3906],[2071,3906],[2072,3907],[2073,3907],[2074,3897],[2075,3903],[2076,3905],[2077,3854],[2078,3854],[2079,3908],[2080,3854],[2081,3854],[2082,3909],[2083,3893],[2084,3900],[2085,3910],[2086,3910],[2089,3911],[2090,3899],[2091,3899],[2094,3894],[2095,3894],[2096,3894],[2097,3906],[2098,3906],[2099,3906],[2100,3906],[2101,3906],[2102,3906],[2103,3906],[2104,3906],[2105,3906],[2106,3906],[2107,3906],[2108,3906],[2109,3907],[2110,3907],[2111,3907],[2112,3907],[2113,3907],[2114,3907],[2115,3897],[2116,3897],[2117,3897],[2118,3903],[2119,3903],[2120,3903],[2121,3905],[2122,3905],[2123,3905],[2124,3854],[2125,3854],[2126,3854],[2127,3854],[2128,3854],[2129,3854],[2130,3908],[2131,3908],[2132,3908],[2133,3854],[2134,3854],[2135,3854],[2136,3854],[2137,3854],[2138,3854],[2139,3909],[2140,3909],[2141,3909],[2142,3893],[2143,3893],[2144,3893],[2145,3900],[2146,3900],[2147,3900],[2148,3910],[2149,3910],[2150,3910],[2151,3910],[2152,3910],[2153,3910],[2160,3911],[2161,3911],[2162,3911],[2163,3899],[2164,3899],[2165,3899],[2166,3899],[2167,3899],[2168,3899],[2175,3910],[2176,3910],[2178,3907],[2179,3894],[2180,3894],[2181,3894],[2182,3916],[2183,3916],[2184,3906],[2185,3906],[2186,3906],[2187,3906],[2188,3906],[2189,3906],[2190,3906],[2191,3906],[2192,3906],[2193,3907],[2194,3907],[2195,3907],[2196,3907],[2197,3907],[2198,3896],[2199,3897],[2200,3897],[2201,3903],[2202,3898],[2203,3898],[2204,3898],[2205,3898],[2206,3905],[2207,3854],[2208,3854],[2209,3854],[2210,3908],[2211,3908],[2212,3854],[2213,3854],[2214,3854],[2215,3909],[2216,3909],[2217,3893],[2218,3893],[2219,3896],[2220,3896],[2221,3895],[2222,3900],[2223,3900],[2224,3900],[2225,3910],[2226,3910],[2227,3910],[2228,3910],[2229,3899],[2230,3899],[2235,3911],[2236,3911],[2237,3899],[2238,3899],[2239,3899],[2265,3898],[2266,3898],[2267,3910],[2268,3894],[2269,3894],[2270,3894],[2271,3894],[2272,3894],[2273,3894],[2274,3894],[2275,3894],[2276,3916],[2277,3906],[2278,3906],[2279,3906],[2280,3906],[2281,3906],[2282,3906],[2283,3906],[2284,3906],[2285,3906],[2286,3906],[2287,3906],[2288,3907],[2289,3907],[2290,3907],[2291,3907],[2292,3907],[2293,3907],[2294,3907],[2295,3896],[2296,3897],[2297,3897],[2298,3897],[2299,3897],[2300,3897],[2301,3903],[2302,3898],[2303,3898],[2304,3898],[2305,3898],[2306,3905],[2307,3854],[2308,3854],[2309,3908],[2310,3854],[2311,3854],[2312,3909],[2313,3893],[2314,3893],[2315,3893],[2316,3896],[2317,3896],[2318,3895],[2319,3900],[2320,3900],[2321,3900],[2322,3900],[2323,3910],[2324,3910],[2325,3910],[2326,3899],[2332,3911],[2333,3911],[2334,3899],[2335,3899],[2358,3894],[2359,3906],[2360,3906],[2361,3906],[2362,3906],[2363,3907],[2364,3907],[2365,3897],[2366,3898],[2367,3898],[2368,3898],[2369,3898],[2370,3905],[2371,3854],[2372,3854],[2373,3908],[2374,3854],[2375,3854],[2376,3909],[2377,3893],[2378,3896],[2379,3896],[2380,3895],[2381,3910],[2382,3910],[2385,3911],[2386,3899],[2387,3899],[2393,3897],[2394,3897],[2395,3897],[2398,3898],[2399,3854],[2400,3897],[2401,3909],[2402,3911],[2403,3899],[2404,3899],[2406,3906],[2407,3907],[2409,3898],[2410,3894],[2411,3916],[2412,3906],[2413,3906],[2414,3906],[2415,3906],[2416,3907],[2417,3907],[2418,3908],[2419,3893],[2420,3899],[2428,3895],[2429,3895],[2430,3911],[2431,3894],[2432,3894],[2433,3894],[2434,3894],[2435,3894],[2436,3894],[2437,3894],[2438,3916],[2439,3906],[2440,3906],[2441,3906],[2442,3906],[2443,3906],[2444,3907],[2445,3907],[2446,3907],[2447,3896],[2448,3897],[2449,3903],[2450,3898],[2451,3898],[2452,3898],[2453,3898],[2454,3905],[2455,3854],[2456,3854],[2457,3908],[2458,3854],[2459,3854],[2460,3909],[2461,3893],[2462,3896],[2463,3896],[2464,3895],[2465,3900],[2466,3900],[2467,3900],[2468,3910],[2469,3910],[2470,3899],[2473,3911],[2474,3899],[2475,3899],[2494,3896],[2495,3896],[2496,3901],[2497,3911],[2499,3896],[2500,3894],[2501,3894],[2502,3894],[2503,3894],[2504,3894],[2505,3894],[2506,3894],[2507,3916],[2508,3906],[2509,3906],[2510,3906],[2511,3906],[2512,3906],[2513,3907],[2514,3907],[2515,3907],[2516,3896],[2517,3897],[2518,3903],[2519,3898],[2520,3898],[2521,3898],[2522,3898],[2523,3905],[2524,3854],[2525,3854],[2526,3908],[2527,3854],[2528,3854],[2529,3909],[2530,3893],[2531,3896],[2532,3896],[2533,3895],[2534,3900],[2535,3900],[2536,3900],[2537,3910],[2538,3910],[2539,3899],[2542,3911],[2543,3899],[2544,3899],[2563,3901],[2564,3894],[2565,3894],[2566,3894],[2567,3894],[2568,3894],[2574,3916],[2575,3897],[2576,3898],[2577,3906],[2578,3894],[2580,3896],[2583,3854],[2584,3854],[2585,3854],[2586,3854],[2587,3854],[2588,3854],[2589,3854],[2591,3898],[2592,3898],[2593,3898],[2594,3896],[2595,3896],[2596,3896],[2597,3898],[2599,3896],[2600,3895],[2601,3898],[2602,3898],[2603,3898],[2605,3895],[2606,3896],[2607,3896],[2608,3896],[2610,3894],[2611,3895],[2612,3911],[2614,3898],[2615,3898],[2618,3854],[2619,3898],[2620,3903],[2621,3901],[2622,3901],[2623,3901],[2624,3901],[2625,3901],[2626,3900],[2629,3896],[2630,3897],[2631,3911],[2632,3899],[2633,3899],[2634,3898],[2635,3898],[2636,3898],[2639,3896],[2640,3898],[2641,3894],[2642,3894],[2643,3894],[2644,3894],[2645,3894],[2650,3907],[2651,3906],[2652,3906],[2653,3907],[2654,3907],[2655,3907],[2656,3895],[2657,3895],[2658,3907],[2661,3906],[2662,3906],[2663,3906],[2665,3906],[2666,3906],[2667,3910],[2668,3910],[2670,3896],[2671,3896],[2672,3906],[2677,3854],[2683,3896],[2684,3907],[2685,3898],[2686,3898],[2689,3895],[2691,3898],[2692,3897],[2693,3900],[2697,3896],[2698,3896],[2699,3896],[2700,3898],[2701,3898],[2702,3854],[2703,3854],[2704,3854],[2705,3854],[2706,3909],[2710,3907],[2713,3894],[2714,3906],[2715,3906],[2716,3906],[2717,3906],[2718,3907],[2719,3907],[2720,3893],[2721,3899],[2728,3854],[2729,3854],[2733,3906],[2734,3898],[2735,3907],[2736,3898],[2737,3898],[2738,3896],[2739,3898],[2740,3898],[2741,3895],[2742,3896],[2743,3894],[2744,3906],[2745,3906],[2746,3906],[2747,3906],[2748,3907],[2749,3907],[2750,3897],[2751,3898],[2752,3898],[2753,3898],[2754,3898],[2755,3905],[2756,3854],[2757,3854],[2758,3908],[2759,3854],[2760,3854],[2761,3909],[2762,3893],[2763,3896],[2764,3896],[2765,3895],[2766,3910],[2767,3910],[2770,3911],[2771,3899],[2772,3899],[2778,3894],[2779,3916],[2780,3906],[2781,3906],[2782,3906],[2783,3906],[2784,3907],[2785,3907],[2786,3897],[2787,3854],[2788,3908],[2789,3854],[2790,3909],[2791,3893],[2792,3910],[2793,3910],[2794,3899],[2797,3911],[2798,3899],[2805,3895],[2806,3895],[2807,3895],[2809,3894],[2810,3894],[2811,3894],[2812,3894],[2813,3894],[2814,3894],[2815,3894],[2816,3916],[2817,3906],[2818,3906],[2819,3906],[2820,3906],[2821,3906],[2822,3907],[2823,3907],[2824,3907],[2825,3896],[2826,3897],[2827,3897],[2828,3897],[2829,3897],[2830,3903],[2831,3898],[2832,3898],[2833,3898],[2834,3898],[2835,3905],[2836,3854],[2837,3854],[2838,3908],[2839,3854],[2840,3854],[2841,3909],[2842,3893],[2843,3896],[2844,3896],[2845,3895],[2846,3900],[2847,3900],[2848,3900],[2849,3910],[2850,3910],[2851,3899],[2854,3911],[2855,3899],[2856,3899],[2874,3894],[2875,3894],[2876,3894],[2877,3894],[2878,3894],[2879,3894],[2880,3894],[2881,3916],[2882,3906],[2883,3906],[2884,3906],[2885,3906],[2886,3906],[2887,3907],[2888,3907],[2889,3907],[2890,3896],[2891,3897],[2892,3903],[2893,3898],[2894,3898],[2895,3898],[2896,3898],[2897,3905],[2898,3854],[2899,3854],[2900,3908],[2901,3854],[2902,3854],[2903,3909],[2904,3893],[2905,3896],[2906,3896],[2907,3895],[2908,3900],[2909,3900],[2910,3900],[2911,3910],[2912,3910],[2913,3899],[2916,3911],[2917,3899],[2918,3899],[2936,3894],[2937,3894],[2938,3894],[2939,3894],[2940,3894],[2943,3899],[2944,3894],[2945,3894],[2946,3894],[2947,3894],[2948,3894],[2949,3894],[2950,3894],[2951,3916],[2952,3906],[2953,3906],[2954,3906],[2955,3906],[2956,3906],[2957,3907],[2958,3907],[2959,3907],[2960,3896],[2961,3897],[2962,3903],[2963,3898],[2964,3898],[2965,3898],[2966,3898],[2967,3905],[2968,3854],[2969,3854],[2970,3908],[2971,3854],[2972,3854],[2973,3909],[2974,3893],[2975,3896],[2976,3896],[2977,3895],[2978,3900],[2979,3900],[2980,3900],[2981,3910],[2982,3910],[2983,3899],[2986,3911],[2987,3899],[2988,3899],[3006,3898],[3007,3898],[3008,3896],[3010,3895],[3011,3895],[3012,3894],[3013,3894],[3014,3894],[3015,3894],[3016,3894],[3017,3894],[3018,3894],[3019,3916],[3020,3906],[3021,3906],[3022,3906],[3023,3906],[3024,3906],[3025,3907],[3026,3907],[3027,3907],[3028,3896],[3029,3897],[3030,3903],[3031,3898],[3032,3898],[3033,3898],[3034,3898],[3035,3905],[3036,3854],[3037,3854],[3038,3908],[3039,3854],[3040,3854],[3041,3909],[3042,3893],[3043,3896],[3044,3896],[3045,3895],[3046,3900],[3047,3900],[3048,3900],[3049,3910],[3050,3910],[3051,3899],[3054,3911],[3055,3899],[3056,3899],[3074,3901],[3076,3895],[3077,3895],[3079,3907],[3080,3907],[3081,3907],[3082,3907],[3083,3907],[3309,3932],[3310,3936],[3311,3931],[3312,3932],[3313,3932],[3314,3932],[3315,3934],[3316,3933],[3317,3933],[3318,3932],[3319,3933],[3320,3933],[3321,3934],[3322,3931],[3323,3936],[3324,3931],[3325,3936],[3326,3932],[3327,3933],[3328,3933],[3329,3934],[3330,3931],[3331,3936],[3332,3932],[3333,3933],[3334,3933],[3335,3934],[3336,3931],[3337,3933],[3338,3934],[3339,3932],[3340,3933],[3341,3933],[3342,3934],[3343,3931],[3344,3932],[3345,3933],[3346,3933],[3347,3934],[3348,3931],[3349,3932],[3350,3933],[3351,3933],[3352,3934],[3353,3931],[3354,3932],[3355,3932],[3356,3936],[3357,3932],[3358,3933],[3359,3933],[3360,3934],[3361,3931],[3362,3936],[3363,3932],[3364,3933],[3365,3933],[3366,3934],[3367,3931],[3368,3936],[3369,3932],[3370,3933],[3371,3933],[3372,3934],[3373,3931],[3374,3936],[3375,3933],[3376,3933],[3377,3931],[3378,3936],[3379,3932],[3380,3933],[3381,3933],[3382,3934],[3383,3931],[3384,3936],[3385,3932],[3386,3933],[3387,3933],[3388,3934],[3389,3931],[3390,3936],[3391,3931],[3392,3936],[3393,3932],[3394,3933],[3395,3933],[3396,3934],[3397,3931],[3398,3934],[3399,3932],[3400,3933],[3401,3933],[3402,3932],[3403,3932],[3404,3932],[3405,3933],[3406,3933],[3407,3933],[3408,3933],[3409,3933],[3410,3933],[3411,3936],[3412,3936],[3413,3936],[3414,3932],[3415,3932],[3416,3933],[3417,3933],[3418,3933],[3419,3934],[3420,3931],[3421,3936],[3422,3932],[3423,3933],[3424,3933],[3425,3934],[3426,3931],[3427,3932],[3428,3933],[3429,3933],[3430,3934],[3431,3931],[3432,3933],[3433,3933],[3434,3933],[3435,3931],[3436,3936],[3437,3932],[3438,3933],[3439,3933],[3440,3934],[3441,3931],[3442,3931],[3443,3936],[3444,3932],[3445,3933],[3446,3933],[3447,3934],[3448,3931],[3449,3934],[3450,3934],[3451,3933],[3452,3933],[3453,3933],[3454,3933],[3455,3936],[3456,3932],[3457,3933],[3458,3931],[3459,3933],[3460,3936],[3461,3936],[3462,3936],[3463,3932],[3464,3933],[3465,3933],[3466,3934],[3467,3931],[3468,3932],[3469,3933],[3470,3936],[3471,3932],[3472,3933],[3473,3933],[3474,3934],[3475,3931],[3476,3936],[3477,3932],[3478,3933],[3479,3933],[3480,3934],[3481,3931],[3482,3936],[3483,3932],[3484,3933],[3485,3933],[3486,3934],[3487,3931],[3488,3933],[3489,3933],[3490,3936],[3491,3932],[3492,3933],[3493,3933],[3494,3934],[3495,3931],[3496,3856],[3497,3856],[3498,3856],[3499,3856],[3500,3856],[3501,3856],[3502,3856],[3503,3856],[3504,3856],[3505,3856],[3506,3856],[3507,3856],[3508,3856],[3509,3856],[3510,3856],[3511,3856],[3512,3856],[3513,3856],[3514,3856],[3515,3856],[3516,3856],[3517,3856],[3518,3856],[3519,3856],[3520,3856],[3521,3856],[3522,3856],[3523,3856],[3524,3856],[3525,3856],[3526,3856],[3527,3856],[3528,3856],[3529,3856],[3530,3856],[3531,3856],[3532,3856],[3533,3856],[3534,3856],[3535,3856],[3536,3856],[3537,3856],[3538,3856],[3539,3856],[3540,3856],[3541,3856],[3542,3856],[3543,3856],[3544,3856],[3545,3856],[3546,3856],[3547,3856],[3548,3856],[3549,3856],[3550,3856],[3551,3856],[3552,3856],[3553,3856],[3554,3856],[3555,3856],[3556,3856],[3557,3856],[3558,3856],[3559,3856],[3560,3856],[3561,3856],[3562,3856],[3563,3856],[3564,3856],[3565,3856],[3566,3856],[3567,3856],[3568,3856],[3569,3856],[3570,3856],[3571,3856],[3572,3856],[3573,3856],[3574,3856],[3575,3856],[3576,3856],[3577,3856],[3578,3856],[3579,3856],[3580,3856],[3581,3856],[3582,3856],[3583,3856],[3584,3856],[3585,3856],[3586,3856],[3587,3856],[3588,3856],[3589,3856],[3590,3856],[3591,3856],[3592,3856],[3593,3856],[3594,3856],[3595,3856],[3596,3856],[3597,3856],[3598,3856],[3599,3856],[3600,3856],[3601,3856],[3602,3856],[3603,3856],[3604,3856],[3605,3856],[3606,3856],[3607,3856],[3608,3856],[3609,3856],[3610,3856],[3611,3856],[3612,3856],[3613,3856],[3614,3856],[3615,3856],[3616,3856],[3617,3856],[3618,3856],[3619,3856],[3620,3856],[3790,3942],[3792,3942],[3794,3942],[3796,3942],[3798,3942],[3800,3942],[3802,3942],[3804,3942],[3805,3942],[3806,3942],[3808,3942],[3810,3942],[3812,3942],[3814,3942],[3816,3942],[3817,3942],[3818,3942],[3819,3942],[3820,3942],[3821,3942],[3824,3942],[3826,3942],[3828,3942],[3830,3942],[3832,3942]],"b":[[178,"impl-Display-for-PublicKey"],[179,"impl-Debug-for-PublicKey"],[180,"impl-Display-for-KeyParsingError"],[181,"impl-Debug-for-KeyParsingError"],[184,"impl-Display-for-RelayUrl"],[185,"impl-Debug-for-RelayUrl"],[186,"impl-Debug-for-RelayUrlParseError"],[187,"impl-Display-for-RelayUrlParseError"],[189,"impl-Debug-for-RelayMap"],[190,"impl-Display-for-RelayMap"],[191,"impl-Debug-for-RelayNode"],[192,"impl-Display-for-RelayNode"],[196,"impl-From%3CDecodeError%3E-for-KeyParsingError"],[198,"impl-From%3CError%3E-for-KeyParsingError"],[199,"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey"],[200,"impl-From%3CSigningKey%3E-for-SecretKey"],[202,"impl-From%3CPublicKey%3E-for-NodeAddr"],[203,"impl-From%3CRemoteInfo%3E-for-NodeAddr"],[204,"impl-From%3CNodeTicket%3E-for-NodeAddr"],[206,"impl-From%3CNodeInfo%3E-for-NodeAddr"],[207,"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr"],[213,"impl-From%3CRelayUrl%3E-for-RelayMap"],[214,"impl-From%3CRelayNode%3E-for-RelayMap"],[219,"impl-FromIterator%3CRelayNode%3E-for-RelayMap"],[220,"impl-FromIterator%3CRelayUrl%3E-for-RelayMap"],[309,"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey"],[311,"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey"],[545,"impl-Display-for-UserData"],[546,"impl-Debug-for-UserData"],[548,"impl-Display-for-ParseError"],[549,"impl-Debug-for-ParseError"],[551,"impl-Display-for-IntoDiscoveryError"],[552,"impl-Debug-for-IntoDiscoveryError"],[553,"impl-Debug-for-DiscoveryError"],[554,"impl-Display-for-DiscoveryError"],[557,"impl-Display-for-Lagged"],[558,"impl-Debug-for-Lagged"],[562,"impl-From%3CNodeAddr%3E-for-NodeInfo"],[563,"impl-From%3C%26TxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo"],[564,"impl-From%3CTxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo"],[565,"impl-From%3CDiscoveryItem%3E-for-NodeInfo"],[913,"impl-Display-for-PkarrError"],[914,"impl-Debug-for-PkarrError"],[2180,"impl-Debug-for-SendDatagramError"],[2181,"impl-Display-for-SendDatagramError"],[2182,"impl-Display-for-RetryError"],[2183,"impl-Debug-for-RetryError"],[2185,"impl-Display-for-ReadToEndError"],[2186,"impl-Debug-for-ReadToEndError"],[2187,"impl-Display-for-ReadError"],[2188,"impl-Debug-for-ReadError"],[2189,"impl-Display-for-ResetError"],[2190,"impl-Debug-for-ResetError"],[2191,"impl-Display-for-ReadExactError"],[2192,"impl-Debug-for-ReadExactError"],[2194,"impl-Display-for-WriteError"],[2195,"impl-Debug-for-WriteError"],[2196,"impl-Display-for-StoppedError"],[2197,"impl-Debug-for-StoppedError"],[2199,"impl-Display-for-VarInt"],[2200,"impl-Debug-for-VarInt"],[2207,"impl-Display-for-ControlMsg"],[2208,"impl-Debug-for-ControlMsg"],[2210,"impl-Display-for-ClosedStream"],[2211,"impl-Debug-for-ClosedStream"],[2213,"impl-Display-for-ConnectionType"],[2214,"impl-Debug-for-ConnectionType"],[2215,"impl-Display-for-Source"],[2216,"impl-Debug-for-Source"],[2217,"impl-Display-for-ConnectionError"],[2218,"impl-Debug-for-ConnectionError"],[2225,"impl-Display-for-ConnectionClose"],[2226,"impl-Debug-for-ConnectionClose"],[2227,"impl-Display-for-ApplicationClose"],[2228,"impl-Debug-for-ApplicationClose"],[2229,"impl-Debug-for-AddNodeAddrError"],[2230,"impl-Display-for-AddNodeAddrError"],[2231,"impl-Debug-for-TransportError"],[2232,"impl-Display-for-TransportError"],[2233,"impl-Display-for-TransportErrorCode"],[2234,"impl-Debug-for-TransportErrorCode"],[2235,"impl-Display-for-StreamId"],[2236,"impl-Debug-for-StreamId"],[2238,"impl-Debug-for-DirectAddrType"],[2239,"impl-Display-for-DirectAddrType"],[2243,"impl-Display-for-ConnectWithOptsError"],[2244,"impl-Debug-for-ConnectWithOptsError"],[2245,"impl-Debug-for-ConnectError"],[2246,"impl-Display-for-ConnectError"],[2247,"impl-Display-for-BindError"],[2248,"impl-Debug-for-BindError"],[2249,"impl-Debug-for-GetMappingAddressError"],[2250,"impl-Display-for-GetMappingAddressError"],[2256,"impl-Debug-for-AlpnError"],[2257,"impl-Display-for-AlpnError"],[2260,"impl-Display-for-RemoteNodeIdError"],[2261,"impl-Debug-for-RemoteNodeIdError"],[2280,"impl-From%3CConnectionError%3E-for-ReadError"],[2282,"impl-From%3CResetError%3E-for-ReadError"],[2283,"impl-From%3CReadableError%3E-for-ReadError"],[2290,"impl-From%3CClosedStream%3E-for-WriteError"],[2291,"impl-From%3CConnectionError%3E-for-WriteError"],[2292,"impl-From%3CStoppedError%3E-for-WriteError"],[2296,"impl-From%3Cu16%3E-for-VarInt"],[2297,"impl-From%3Cu32%3E-for-VarInt"],[2299,"impl-From%3CStreamId%3E-for-VarInt"],[2300,"impl-From%3Cu8%3E-for-VarInt"],[2313,"impl-From%3CClose%3E-for-ConnectionError"],[2315,"impl-From%3CTransportError%3E-for-ConnectionError"],[2327,"impl-From%3CError%3E-for-TransportError"],[2328,"impl-From%3CTransportErrorCode%3E-for-TransportError"],[2330,"impl-From%3CInvalidFrame%3E-for-TransportError"],[2341,"impl-From%3CConnectionError%3E-for-ConnectError"],[2342,"impl-From%3CConnectWithOptsError%3E-for-ConnectError"],[2651,"impl-RecvStream"],[2652,"impl-AsyncRead-for-RecvStream"],[2654,"impl-AsyncWrite-for-SendStream"],[2655,"impl-SendStream"],[2827,"impl-TryFrom%3Cu128%3E-for-VarInt"],[2828,"impl-TryFrom%3Cusize%3E-for-VarInt"],[2829,"impl-TryFrom%3Cu64%3E-for-VarInt"],[3414,"impl-Debug-for-Probe"],[3415,"impl-Display-for-Probe"],[3416,"impl-Debug-for-Report"],[3417,"impl-Display-for-Report"],[3569,"impl-Display-for-EncodingError"],[3570,"impl-Debug-for-EncodingError"],[3571,"impl-Debug-for-DecodingError"],[3572,"impl-Display-for-DecodingError"],[3573,"impl-Display-for-MaxLengthExceededError"],[3574,"impl-Debug-for-MaxLengthExceededError"],[3575,"impl-Display-for-LookupError"],[3576,"impl-Debug-for-LookupError"],[3727,"impl-Display-for-AcceptError"],[3728,"impl-Debug-for-AcceptError"],[3732,"impl-From%3CClosedStream%3E-for-AcceptError"],[3734,"impl-From%3CBox%3Cdyn+Error+%2B+Send+%2B+Sync%3E%3E-for-AcceptError"],[3735,"impl-From%3CRemoteNodeIdError%3E-for-AcceptError"],[3736,"impl-From%3CConnectionError%3E-for-AcceptError"],[3737,"impl-From%3CError%3E-for-AcceptError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAD4L6AADAAAADAAAABUABgAdAFEAcAAAAHIAGQCQAAgAmwAmAMMAAADFAAAAxwACAMsAAQDPAAIA1wAAANkAAADcAAAA3wAKAO0ADAAQAQMAHAEEACIBAQAoASsAWQEIAGQBBwB+AQAAgAEAAIkBAQCNAQUAlAEEAJsBIAC9ASsA6gEcAAoCCQAVAhsAMwIDADgCAAA8AgAAPwIAAEgCAwBNAgAATwIOAGkCAAB1AgAAeQIAAHwCAACAAgMAhgIAAIkCAwCOAgQAlAIeALYCCQDGAh4A6QIDAO8CCQD6AgMAAAMBAAQDAQAHAwgAEwMDABgDDQAoAwEALAMBAC8DCgA8AwQAQwMAAEkDEgBgAygAjAMMAJ8DCQCvAwMAtgMAALkDAAC7AxAAzQMFANQDBQDbAwYA5AMEAOwDDgD8AwMAAgQAAAQEAQAJBAEADgQAABAEAAASBAQAGAQDAB4EAAAgBAwALwQAADEEAAAzBAAANQQAADcEAAA5BAQAQQQCAEUECwBSBAEAYgQAAGQEBABwBAEAdAQAAHgEAACDBAEAhgQAAIkEAACNBAAAogQAAKQEAQCnBAEAsAQAALwEAADCBAEAxwQAANAEAADdBAAA5QQAAPgEAAD6BAAABwUiADAFAAAyBQAAPgUYAFwFewDeBQYA5wUiAAsGRQBVBgMAWga9AB8HAAAhBwAAJgcBACwHEAA+B4cA0Ac/ABEIbgCECFMA5AgAAOcIAADpCAAA6wgBAO4IAQDzCAMA+QgBAPwIAQAKCQAADAkAABEJAAAUCQAAGAkBABsJAAAdCQAAJAkAACYJAQAqCQAAMQkAADcJIgBfCQAAYQkEAGoJEgCACT0ABQoJACYKAAAqCgIANwoBADwKAABHCgMATAoBAFEKCgBdCgIAfgoBAI8KBACaCg4ArwoAALEKAQC0CgEAuAo9APoKEQAPC3AAgQs9AMULPQANDCwAPgwAAEEMAABDDBEAVwwOAGkMDgB8DAMAgQwJAJAMAACSDAUAoAwDALIMAgC2DAcAwAwGAMoMBgDSDA8A5AwAAOkMAwD3DAUA/gwLAAwNMwBBDQUASA0VAGQNBABtDQUAgA0BAIcNGQCjDQoArw0GALoNBADADSAA4g0XAPsNAAAADgcADQ4HABYOOgBSDgAAVA4BAFkOAgBfDgsAbA4fAI4OBACVDgAAlw4DAJ0OBgCtDgEAsg4CALYOFwDQDg0A4A4DAOYOAQDyDgcA","P":[[33,"T"],[34,""],[35,"T"],[52,""],[61,"T"],[68,""],[79,"K"],[83,"T"],[110,""],[113,"T"],[118,""],[119,"T"],[132,""],[134,"D"],[136,"__D"],[139,""],[160,"K"],[178,""],[195,"T"],[196,""],[197,"T"],[198,""],[201,"T"],[202,""],[205,"T"],[206,""],[209,"T"],[213,""],[215,"T"],[216,""],[219,"T"],[221,""],[222,"T"],[229,""],[233,"R"],[234,"Watcher::Value"],[235,""],[236,"H"],[237,"__H"],[238,""],[249,"Watcher::Value,T,W"],[250,"U"],[259,""],[262,"Watcher::Value,T,"],[265,""],[269,"Watcher::Value,W"],[270,""],[275,"Watcher::Value"],[277,""],[283,"S"],[285,"__S"],[288,""],[291,"Watcher::Value"],[294,""],[295,"T"],[302,""],[310,"U,T"],[311,""],[312,"U,T"],[314,""],[315,"U,T"],[321,"U"],[330,""],[339,"Watcher::Value"],[340,""],[344,"V"],[353,""],[354,""],[408,""],[410,""],[419,"T"],[439,""],[448,"T"],[452,""],[457,"K"],[458,"T"],[488,""],[491,"T"],[494,""],[495,"T"],[499,"Deref::Target"],[500,"T"],[506,""],[507,"T"],[514,""],[535,"K"],[544,""],[560,"T"],[562,""],[566,"T"],[567,""],[568,"T"],[571,""],[572,"T"],[579,""],[583,"T"],[587,""],[590,"__H"],[591,""],[605,"U"],[615,""],[648,"T"],[652,""],[659,"U,T"],[660,""],[661,"U,T"],[670,"U"],[680,""],[693,"V"],[703,""],[744,"T"],[748,""],[750,"T"],[760,""],[765,"T"],[767,""],[769,"U"],[771,""],[775,"U,T"],[777,"U"],[779,""],[781,"V"],[785,""],[786,"T"],[790,""],[791,"T"],[801,""],[805,"T"],[807,""],[809,"U"],[811,""],[817,"U,T"],[819,"U"],[821,""],[823,"V"],[825,""],[847,"T"],[859,""],[867,"T"],[870,""],[873,"T"],[903,""],[920,"T"],[929,""],[936,"U"],[942,""],[955,"T"],[958,""],[959,"U,T"],[965,"U"],[971,""],[979,"V"],[985,""],[996,"T"],[1000,""],[1004,"T"],[1005,""],[1006,"T"],[1012,""],[1014,"T"],[1018,""],[1023,"T"],[1026,""],[1030,"U"],[1032,""],[1041,"T"],[1042,"U,T"],[1044,"U"],[1046,""],[1049,"V"],[1053,""],[1054,""],[1055,"T"],[1057,""],[1058,"T"],[1059,""],[1060,"T"],[1063,""],[1064,"T"],[1066,""],[1068,"T"],[1069,","],[1070,"T"],[1071,""],[1073,"U"],[1074,""],[1079,""],[1080,"T"],[1081,"U,T"],[1082,"U"],[1083,""],[1084,"V"],[1086,""],[1089,"T"],[1091,""],[1093,"T"],[1094,""],[1095,"T"],[1098,""],[1099,"T"],[1101,""],[1104,"T"],[1106,""],[1107,"U"],[1108,""],[1114,""],[1118,""],[1119,""],[1123,"T"],[1124,"U,T"],[1125,"U"],[1126,""],[1127,"V"],[1128,""],[1330,""],[1331,""],[1371,"T"],[1495,""],[1546,"T"],[1581,""],[1625,"K"],[1629,"T"],[1815,""],[1820,""],[1822,""],[1835,"B"],[1838,""],[1853,"T"],[1977,""],[1984,"__D"],[1989,""],[1991,""],[1992,""],[2064,"B"],[2067,""],[2094,"K"],[2175,""],[2268,"T"],[2275,""],[2276,"T"],[2278,""],[2279,"T"],[2280,""],[2281,"T"],[2282,""],[2284,"T"],[2285,""],[2287,"T"],[2290,""],[2294,"T"],[2296,""],[2298,"T"],[2299,""],[2301,"T"],[2313,""],[2314,"T"],[2315,""],[2316,"T"],[2320,""],[2321,"T"],[2323,""],[2324,"T"],[2327,""],[2329,"T"],[2330,""],[2331,"T"],[2332,""],[2333,"T"],[2339,""],[2340,"T"],[2341,""],[2343,"T"],[2345,""],[2346,"T"],[2352,""],[2353,"T"],[2393,""],[2400,"__H"],[2405,""],[2500,"U"],[2562,""],[2570,"IntoFuture::IntoFuture"],[2571,""],[2646,"Future::Output"],[2650,""],[2692,""],[2693,""],[2702,"__S"],[2707,""],[2743,"T"],[2778,""],[2809,"U,T"],[2827,""],[2830,"U,T"],[2874,"U"],[2936,"F"],[2943,""],[3012,"V"],[3074,""],[3148,"T"],[3156,""],[3159,"T"],[3160,""],[3161,"T"],[3173,""],[3180,"T"],[3188,"__D"],[3191,""],[3211,"T"],[3216,""],[3223,"U"],[3227,""],[3281,"__S"],[3284,"T"],[3285,"U,T"],[3289,"U"],[3293,""],[3304,"V"],[3308,""],[3325,"T"],[3337,""],[3344,"T"],[3349,""],[3355,"K"],[3356,"T"],[3374,""],[3378,"T"],[3390,"__D"],[3391,""],[3402,"K"],[3411,""],[3421,"T"],[3432,""],[3443,"U"],[3449,""],[3462,"__S"],[3463,"T"],[3468,""],[3470,"U,T"],[3476,"U"],[3482,""],[3490,"V"],[3501,""],[3528,"T"],[3536,""],[3540,"T"],[3552,""],[3553,"T"],[3561,""],[3577,"T"],[3578,""],[3579,"T"],[3582,""],[3591,"U"],[3595,""],[3605,"U,T"],[3609,"U"],[3613,""],[3617,"V"],[3621,""],[3677,","],[3678,"P"],[3679,""],[3682,"T"],[3690,""],[3693,"P"],[3694,"T"],[3696,""],[3698,"T"],[3718,""],[3729,"P"],[3730,"T"],[3732,""],[3733,"T"],[3734,""],[3738,"T"],[3742,""],[3747,"U"],[3751,""],[3753,"P,F"],[3754,""],[3757,"P"],[3758,""],[3762,"P"],[3763,""],[3765,"T"],[3767,""],[3768,"U,T"],[3772,"U"],[3776,""],[3780,"V"],[3784,""],[3791,"T"],[3805,""],[3811,"T"],[3813,""],[3815,"U"],[3817,""],[3825,"U,T"],[3827,"U"],[3829,""],[3831,"V"]]}],["iroh_base",{"t":"TPPPGTFIFFFFFINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNONNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOPTPFGPKPNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNMNNNNNNNNNNNNOOOOOOOOOOOO","n":["BYTE_SIZE","Decode","DecodeInvalidLength","Key","KeyParsingError","LENGTH","NodeAddr","NodeId","PublicKey","RelayUrl","RelayUrlParseError","SecretKey","Signature","SignatureError","as_bytes","as_error_source","","as_ref","backtrace","","borrow","","","","","","","","borrow_mut","","","","","","","cause","","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmp","","","deref","description","","deserialize","","","","","direct_addresses","","eq","","","","fmt","","","","","","","","","","","","","","fmt_short","from","","","","","","","","","","","","","","","","","","","from_bytes","","","from_components","from_parts","from_slice","from_str","","","","generate","hash","","in_current_span","","into","","","","","","","is_empty","new","node_id","partial_cmp","","","public","","r_bytes","relay_url","","s_bytes","secret","serialize","","","","","sign","source","","ticket","to_bytes","","","to_owned","","","","","to_string","","","","","to_vec","try_from","","","","","","","","","","","try_into","","","","","","","type_id","","","","","","","verify","with_direct_addresses","with_relay_url","backtrace","","","source","","span_trace","","","Encoding","KIND","Kind","NodeTicket","ParseError","Postcard","Ticket","Verify","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","description","deserialize","","eq","fmt","","","","from","","","","","from_bytes","","from_str","in_current_span","into","","new","node_addr","serialize","","source","to_bytes","","to_owned","to_string","","try_from","","try_into","","type_id","","verification_failed","wrong_prefix","backtrace","","","","expected","message","source","","span_trace","","",""],"q":[[0,"iroh_base"],[189,"iroh_base::KeyParsingError"],[197,"iroh_base::ticket"],[252,"iroh_base::ticket::ParseError"],[264,"iroh_base::key"],[265,"core::error"],[266,"backtrace::capture"],[267,"core::option"],[268,"iroh_base::relay_url"],[269,"ed25519"],[270,"iroh_base::node_addr"],[271,"core::cmp"],[272,"core::result"],[273,"serde::de"],[274,"core::net::socket_addr"],[275,"core::iter::traits::iterator"],[276,"alloc::collections::btree::set"],[277,"core::fmt"],[278,"alloc::string"],[279,"ed25519_dalek::signature"],[280,"ed25519_dalek::verifying"],[281,"data_encoding"],[282,"ed25519_dalek::errors"],[283,"ed25519_dalek::signing"],[284,"iroh_base::ticket::node"],[285,"url"],[286,"core::iter::traits::collect"],[287,"signature::error"],[288,"rand_core"],[289,"core::hash"],[290,"serde::ser"],[291,"alloc::vec"],[292,"core::any"],[293,"n0_snafu::spantrace"],[294,"postcard::error"]],"i":"Ahn00`b````````01Ad1203112AjAlAn36452103536421064210642104100536421011641066664455210033466664455522211110036426166420240536452103111410426116264210253`662642106450366644452210364521036452103411ElEnF`21210FdFf1``1`111Dh20220002100002200222100202001021000202020222FjFlFnG`30213210","f":"``````````````{{{d{b}}}{{d{{h{f}}}}}}{d{{d{j}}}}0{{{d{b}}}{{d{{l{f}}}}}}{{{d{n}}}{{Ab{{d{A`}}}}}}{{{d{Ad}}}{{Ab{{d{A`}}}}}}{d{{d{c}}}{}}0500000{{{d{Af}}}{{d{Afc}}}{}}000000{{{d{n}}}{{Ab{{d{j}}}}}}{{{d{Ad}}}{{Ab{{d{j}}}}}}{{{d{Ah}}}Ah}{{{d{b}}}b}{{{d{Aj}}}Aj}{{{d{Al}}}Al}{{{d{An}}}An}{{d{d{Afc}}}B`{}}0000{{df}B`}0000{{{d{b}}{d{b}}}Bb}{{{d{Al}}{d{Al}}}Bb}{{{d{An}}{d{An}}}Bb}{{{d{An}}}{{d{c}}}{}}{{{d{n}}}{{d{Bd}}}}{{{d{Ad}}}{{d{Bd}}}}{c{{Bf{Ah}}}Bh}{c{{Bf{b}}}Bh}{c{{Bf{Aj}}}Bh}{c{{Bf{Al}}}Bh}{c{{Bf{An}}}Bh}{{{d{Al}}}{{`{{Bn{}{{Bj{{d{Bl}}}}}}}}}}{AlC`}{{{d{Ah}}{d{Ah}}}Cb}{{{d{b}}{d{b}}}Cb}{{{d{Al}}{d{Al}}}Cb}{{{d{An}}{d{An}}}Cb}{{{d{Ah}}{d{AfCd}}}{{Bf{B`Cf}}}}000{{{d{b}}{d{AfCd}}}Ch}0{{{d{n}}{d{AfCd}}}Ch}0{{{d{Aj}}{d{AfCd}}}Ch}{{{d{Al}}{d{AfCd}}}Ch}{{{d{An}}{d{AfCd}}}Ch}0{{{d{Ad}}{d{AfCd}}}Ch}0{{{d{b}}}Cj}{{{d{{h{f}}}}}Ah}{cc{}}{ClAh}{{{h{f}}}Ah}{Cnb}3{D`n}{Dbn}5{DdAj}6{{{h{f}}}Aj}7{{{Df{b{Ab{An}}{d{{l{Bl}}}}}}}Al}{DhAl}{DjAl}{DlAn};;<{{{d{{h{f}}}}}{{Bf{bDb}}}}{{{d{{h{f}}}}}Aj}{{{h{f}}{h{f}}}Ah}{{b{Ab{An}}c}Al{{Dn{}{{Bj{Bl}}}}}}{{{d{{l{f}}}}}{{Bf{AhE`}}}}{{{d{Bd}}}{{Bf{AhE`}}}}{{{d{Bd}}}{{Bf{bc}}}{}}{{{d{Bd}}}{{Bf{Ajc}}}{}}{{{d{Bd}}}{{Bf{Anc}}}{}}{cAjEb}{{{d{b}}{d{Afc}}}B`Ed}{{{d{An}}{d{Afc}}}B`Ed}{{}}0{{}c{}}000000{{{d{Al}}}Cb}{bAl}{AlDj}{{{d{b}}{d{b}}}{{Ab{Bb}}}}{{{d{Al}}{d{Al}}}{{Ab{Bb}}}}{{{d{An}}{d{An}}}{{Ab{Bb}}}}{{{d{b}}}Cn}{{{d{Aj}}}b}{{{d{Ah}}}{{d{{h{f}}}}}}{{{d{Al}}}{{Ab{{d{An}}}}}}{AlAb}2{{{d{Aj}}}{{d{Dd}}}}{{{d{Ah}}c}BfEf}{{{d{b}}c}BfEf}{{{d{Aj}}c}BfEf}{{{d{Al}}c}BfEf}{{{d{An}}c}BfEf}{{{d{Aj}}{d{{l{f}}}}}Ah}{{{d{n}}}{{Ab{{d{j}}}}}}{{{d{Ad}}}{{Ab{{d{j}}}}}}`{{{d{Ah}}}{{h{f}}}}0{{{d{Aj}}}{{h{f}}}}{dc{}}0000{dCj}0000{{{d{Ah}}}{{Eh{f}}}}{{{d{{l{f}}}}}{{Bf{AhE`}}}}{c{{Bf{e}}}{}{}}0{{{d{{h{f}}}}}{{Bf{bc}}}{}}{{{d{{l{f}}}}}{{Bf{bc}}}{}}2{{{d{{l{f}}}}}{{Bf{Ajc}}}{}}3333{{}{{Bf{c}}}{}}000000{dEj}000000{{{d{b}}{d{{l{f}}}}{d{Ah}}}{{Bf{B`Db}}}}{{Alc}Al{{Dn{}{{Bj{Bl}}}}}}{{AlAn}Al}{ElAb}{EnAb}{F`Ab}{ElD`}{EnDb}{ElFb}{EnFb}{F`Fb}````````{d{{d{j}}}}{{{d{Fd}}}{{Ab{{d{A`}}}}}}{d{{d{c}}}{}}0{{{d{Af}}}{{d{Afc}}}{}}0{{{d{Fd}}}{{Ab{{d{j}}}}}}{{{d{Dh}}}Dh}{{d{d{Afc}}}B`{}}{{df}B`}{{{d{Fd}}}{{d{Bd}}}}{{{d{Bd}}}{{Bf{FfFd}}}}{c{{Bf{Dh}}}Bh}{{{d{Dh}}{d{Dh}}}Cb}{{{d{Dh}}{d{AfCd}}}Ch}0{{{d{Fd}}{d{AfCd}}}Ch}0{cc{}}{AlDh}1{D`Fd}{FhFd}{{{d{{l{f}}}}}{{Bf{FfFd}}}}{{{d{{l{f}}}}}{{Bf{DhFd}}}}{{{d{Bd}}}{{Bf{Dhc}}}{}}{{}}{{}c{}}07{{{d{Dh}}}{{d{Al}}}}{{{d{Ff}}}Cj}{{{d{Dh}}c}BfEf}{{{d{Fd}}}{{Ab{{d{j}}}}}}{{{d{Ff}}}{{Eh{f}}}}{{{d{Dh}}}{{Eh{f}}}}{dc{}}{dCj}0{c{{Bf{e}}}{}{}}0{{}{{Bf{c}}}{}}0{dEj}0{{{d{Bd}}}Fd}0{FjAb}{FlAb}{FnAb}{G`Ab}{Fjd}{G`d}{FlFh}{FnD`}{FjFb}{FlFb}{FnFb}{G`Fb}","D":"Jb","p":[[5,"PublicKey",0,264],[1,"reference",null,null,1],[1,"u8"],[1,"array"],[10,"Error",265],[1,"slice"],[6,"KeyParsingError",0,264],[5,"Backtrace",266],[6,"Option",267,null,1],[5,"RelayUrlParseError",0,268],[0,"mut"],[5,"Signature",0,269],[5,"SecretKey",0,264],[5,"NodeAddr",0,270],[5,"RelayUrl",0,268],[1,"unit"],[6,"Ordering",271],[1,"str"],[6,"Result",272,null,1],[10,"Deserializer",273],[17,"Item"],[6,"SocketAddr",274],[10,"Iterator",275],[5,"BTreeSet",276],[1,"bool"],[5,"Formatter",277],[5,"Error",277],[8,"Result",277],[5,"String",278],[5,"InternalSignature",279],[5,"VerifyingKey",280],[5,"DecodeError",281],[8,"SignatureError",0,282],[5,"SigningKey",283],[1,"tuple",null,null,1],[5,"NodeTicket",197,284],[8,"NodeId",0,264],[5,"Url",285],[10,"IntoIterator",286],[5,"Error",287],[10,"CryptoRngCore",288],[10,"Hasher",289],[10,"Serializer",290],[5,"Vec",291],[5,"TypeId",292],[15,"Decode",189],[15,"Key",189],[15,"DecodeInvalidLength",189],[5,"SpanTrace",293],[6,"ParseError",197],[10,"Ticket",197],[6,"Error",294],[15,"Kind",252],[15,"Postcard",252],[15,"Encoding",252],[15,"Verify",252]],"r":[[0,269],[1,264],[2,264],[3,264],[4,264],[5,264],[6,270],[7,264],[8,264],[9,268],[10,268],[11,264],[12,269],[13,282],[14,264],[15,264],[16,268],[17,264],[18,264],[19,268],[20,269],[21,264],[22,264],[23,264],[24,264],[25,270],[26,268],[27,268],[28,269],[29,264],[30,264],[31,264],[32,270],[33,268],[34,268],[35,264],[36,268],[37,269],[38,264],[39,264],[40,270],[41,268],[42,269],[43,264],[44,264],[45,270],[46,268],[47,269],[48,264],[49,264],[50,270],[51,268],[52,264],[53,270],[54,268],[55,268],[56,264],[57,268],[58,269],[59,264],[60,264],[61,270],[62,268],[63,270],[64,270],[65,269],[66,264],[67,270],[68,268],[69,269],[70,269],[71,269],[72,269],[73,264],[74,264],[75,264],[76,264],[77,264],[78,270],[79,268],[80,268],[81,268],[82,268],[83,264],[84,269],[85,269],[86,269],[87,269],[88,264],[89,264],[90,264],[91,264],[92,264],[93,264],[94,264],[95,264],[96,270],[97,270],[98,270],[99,270],[100,268],[101,268],[102,268],[103,269],[104,264],[105,264],[106,269],[107,270],[108,269],[109,269],[110,264],[111,264],[112,268],[113,264],[114,264],[115,268],[116,264],[117,268],[118,269],[119,264],[120,264],[121,264],[122,270],[123,268],[124,268],[125,270],[126,270],[127,270],[128,264],[129,270],[130,268],[131,264],[132,264],[133,269],[134,270],[135,270],[136,269],[137,264],[138,269],[139,264],[140,264],[141,270],[142,268],[143,264],[144,264],[145,268],[147,269],[148,269],[149,264],[150,269],[151,264],[152,264],[153,270],[154,268],[155,269],[156,264],[157,264],[158,268],[159,268],[160,269],[161,269],[162,269],[163,264],[164,264],[165,264],[166,264],[167,264],[168,264],[169,270],[170,268],[171,268],[172,269],[173,264],[174,264],[175,264],[176,270],[177,268],[178,268],[179,269],[180,264],[181,264],[182,264],[183,270],[184,268],[185,268],[186,264],[187,270],[188,270],[200,284],[207,284],[209,284],[212,284],[213,284],[214,284],[217,284],[218,284],[219,284],[220,284],[223,284],[224,284],[229,284],[230,284],[232,284],[234,284],[235,284],[237,284],[240,284],[241,284],[242,284],[244,284],[246,284],[248,284]],"b":[[69,"impl-Display-for-Signature"],[70,"impl-LowerHex-for-Signature"],[71,"impl-Debug-for-Signature"],[72,"impl-UpperHex-for-Signature"],[73,"impl-Debug-for-PublicKey"],[74,"impl-Display-for-PublicKey"],[75,"impl-Display-for-KeyParsingError"],[76,"impl-Debug-for-KeyParsingError"],[79,"impl-Display-for-RelayUrl"],[80,"impl-Debug-for-RelayUrl"],[81,"impl-Debug-for-RelayUrlParseError"],[82,"impl-Display-for-RelayUrlParseError"],[84,"impl-From%3C%26%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature"],[86,"impl-From%3CInternalSignature%3E-for-Signature"],[87,"impl-From%3C%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature"],[90,"impl-From%3CDecodeError%3E-for-KeyParsingError"],[91,"impl-From%3CError%3E-for-KeyParsingError"],[93,"impl-From%3CSigningKey%3E-for-SecretKey"],[95,"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey"],[97,"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr"],[98,"impl-From%3CNodeTicket%3E-for-NodeAddr"],[99,"impl-From%3CPublicKey%3E-for-NodeAddr"],[147,"impl-Signature"],[148,"impl-SignatureEncoding-for-Signature"],[164,"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey"],[165,"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey"],[219,"impl-Display-for-NodeTicket"],[220,"impl-Debug-for-NodeTicket"],[221,"impl-Display-for-ParseError"],[222,"impl-Debug-for-ParseError"],[226,"impl-From%3CDecodeError%3E-for-ParseError"],[227,"impl-From%3CError%3E-for-ParseError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAALcAGgAQAC8AQgARAFUAAABXAAIAWwABAF4AAABgAAAAYgAAAGQAAQBuAAMAcwADAIEAAgCLAAQAkQABAJUAAACXAAkAogAYAL4ABwDOAAoA2gAFAOMAAQDmAAIA7gABAPEACQD9AAMAAgEGAA==","P":[[20,"T"],[22,""],[23,"T"],[35,""],[42,"T"],[47,""],[55,"Deref::Target"],[56,""],[58,"D"],[61,"__D"],[63,""],[85,"T"],[86,""],[89,"T"],[90,""],[92,"T"],[93,""],[94,"T"],[95,""],[96,"T"],[97,""],[101,"T"],[103,""],[107,""],[108,""],[110,"FromStr::Err"],[113,"R"],[114,"H"],[115,"__H"],[116,""],[118,"U"],[125,""],[138,"S"],[141,"__S"],[143,""],[150,"T"],[155,""],[162,"U,T"],[164,"TryFrom::Error"],[166,"U,T"],[167,"TryFrom::Error"],[168,"U,T"],[172,"U"],[179,""],[187,""],[188,""],[207,"T"],[211,""],[213,"T"],[214,""],[217,"D"],[218,""],[223,"T"],[224,""],[225,"T"],[226,""],[230,"FromStr::Err"],[231,""],[232,"U"],[234,""],[237,"S"],[238,""],[241,"T"],[242,""],[244,"U,T"],[246,"U"],[248,""]]}],["iroh_bench",{"t":"FGGGPPPFPPPPNNNNNNNNNNNNNNNNHONNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNONNNNNCOOONCOHCCNOONNNNNNNNNNNNNNNNNNNNNONNNNNSHHHHHHSHHHHHHFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFONNNNNNOOOONNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNONOOOHOOONNNNNNOONNNNNN","n":["ClientStats","Commands","ConnectionSelector","EndpointSelector","Iroh","","","Opt","Quinn","","","S2n","__clone_box","","augment_args","augment_args_for_update","augment_subcommands","augment_subcommands_for_update","borrow","","","","","borrow_mut","","","","","client_handler","clients","clone","","clone_into","","clone_to_uninit","","close","","command","","command_for_update","","compat","","","","","compat_mut","","","","","compat_ref","","","","","configure_tracing_subscriber","default","deref","","","","","deref_mut","","","","","download_size","drop","","","","","fmt","","from","","","","","from_arg_matches","","from_arg_matches_mut","","from_ref","","group_id","has_subcommand","init","","","","","initial_mtu","into","","","","","iroh","max_streams","metrics","only_relay","print","quinn","read_unordered","rt","s2n","stats","","","streams","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","update_from_arg_matches","","update_from_arg_matches_mut","","upload_size","vzip","","","","","ALPN","client","connect_client","handle_client_stream","server","server_endpoint","transport_config","ALPN","client","connect_client","handle_client_stream","server","server_endpoint","transport_config","Opt","__clone_box","augment_args","augment_args_for_update","borrow","borrow_mut","clone","clone_into","clone_to_uninit","command","command_for_update","compat","compat_mut","compat_ref","deref","deref_mut","drop","fmt","from","from_arg_matches","from_arg_matches_mut","from_ref","group_id","init","into","to_owned","try_from","try_into","type_id","update_from_arg_matches","update_from_arg_matches_mut","vzip","Stats","StreamStats","TransferResult","avg_chunk_size","borrow","","","borrow_mut","","","chunk_size","chunk_time","chunks","","compat","","","compat_mut","","","compat_ref","","","default","","deref","","","deref_mut","","","drop","","","duration","duration_hist","fmt","","","from","","","init","","","into","","","new","print","size","stream_finished","stream_stats","streams","throughput","throughput_bps","throughput_hist","total_duration","total_size","try_from","","","try_into","","","ttfb","ttfb_hist","type_id","","","vzip","",""],"q":[[0,"iroh_bench"],[141,"iroh_bench::iroh"],[148,"iroh_bench::quinn"],[155,"iroh_bench::s2n"],[187,"iroh_bench::stats"],[260,"dyn_clone::sealed"],[261,"clap_builder::builder::command"],[262,"n0_snafu::error"],[263,"async_compat"],[264,"core::fmt"],[265,"clap_builder::parser::matches::arg_matches"],[266,"clap_builder"],[267,"core::result"],[268,"clap_builder::util::id"],[269,"core::option"],[270,"tokio::runtime::runtime"],[271,"core::any"],[272,"iroh_base::node_addr"],[273,"iroh_base::relay_url"],[274,"iroh::endpoint"],[275,"iroh_quinn_proto::config::transport"],[276,"core::net::socket_addr"],[277,"rustls_pki_types"],[278,"iroh_quinn::endpoint"],[279,"iroh_quinn::connection"],[280,"hdrhistogram"],[281,"core::time"]],"i":"````lnAh`21000A`00113210Ab43210`1212121432121432104321043210`0432104321014321021432102121211243210143210`1110`1```311214321043210432102121143210```````````````Ed000000000000000000000000000000```DfEjEf2102000210210210210102102102201021021021022121112`01110210220102102","f":"````````````{{bd}f}0{hh}000{b{{b{c}}}{}}0000{{{b{j}}}{{b{jc}}}{}}0000{{lnA`}{{Ad{Ab}}}}{A`Af}{{{b{Ah}}}Ah}{{{b{A`}}}A`}{{b{b{jc}}}f{}}0{{bAj}f}0{lf}{{{b{n}}Al{b{{An{Aj}}}}}f}{{}h}000{{}{{B`{c}}}{}}0000{{{b{j}}}{{B`{{b{jc}}}}}{}}0000{b{{B`{{b{c}}}}}{}}0000{{}f}{{}Ab}{Af{{b{c}}}{}}0000{Af{{b{jc}}}{}}0000{A`Bb}{Aff}0000{{{b{Ah}}{b{jBd}}}Bf}{{{b{A`}}{b{jBd}}}Bf}{cc{}}0000{{{b{Bh}}}{{Bl{AhBj}}}}{{{b{Bh}}}{{Bl{A`Bj}}}}{{{b{jBh}}}{{Bl{AhBj}}}}{{{b{jBh}}}{{Bl{A`Bj}}}}{{{b{c}}}c{}}0{{}{{C`{Bn}}}}{{{b{Cb}}}Cd}{{}Af}0000{A`Cf}{{}c{}}0000`{A`Af}{A`Cd}0{{{b{Ab}}Af}f}`1{{}Ch}``{{{b{n}}}f}34{bc{}}0{c{{Bl{e}}}{}{}}0000{{}{{Bl{c}}}{}}0000{bCj}0000{{{b{jAh}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jA`}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jAh}}{b{jBh}}}{{Bl{fBj}}}}{{{b{jA`}}{b{jBh}}}{{Bl{fBj}}}}{A`Bb}{{}c{}}0000{{}b}{{Cl{C`{Cn}}A`}{{Ad{Ab}}}}{{Cl{C`{Cn}}A`}{{Ad{{Dd{D`Db}}}}}}{{{b{Db}}BbCd}{{Ad{{Dd{DfDf}}}}}}{{D`A`}{{Ad{f}}}}{{{b{Ch}}{b{{C`{Cn}}}}{b{A`}}}{{Dd{ClD`}}}}{{AfCf}Dh}6{{DjDlA`}{{Ad{Ab}}}}{{DjDlA`}{{Ad{{Dd{DnE`}}}}}}{{{b{E`}}BbCd}{{Ad{{Dd{DfDf}}}}}}{{DnA`}{{Ad{f}}}}{{{b{Ch}}DlEb{b{A`}}}{{Dd{DjDn}}}}5`{{bd}f}{hh}0{b{{b{c}}}{}}{{{b{j}}}{{b{jc}}}{}}{{{b{Ed}}}Ed}{{b{b{jc}}}f{}}{{bAj}f}{{}h}0{{}{{B`{c}}}{}}{{{b{j}}}{{B`{{b{jc}}}}}{}}{b{{B`{{b{c}}}}}{}}{Af{{b{c}}}{}}{Af{{b{jc}}}{}}{Aff}{{{b{Ed}}{b{jBd}}}Bf}{cc{}}{{{b{Bh}}}{{Bl{EdBj}}}}{{{b{jBh}}}{{Bl{EdBj}}}}{{{b{c}}}c{}}{{}{{C`{Bn}}}}{{}Af}{{}c{}}{bc{}}{c{{Bl{e}}}{}{}}{{}{{Bl{c}}}{}}{bCj}{{{b{jEd}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jEd}}{b{jBh}}}{{Bl{fBj}}}}{{}c{}}```{DfBb}{b{{b{c}}}{}}00{{{b{j}}}{{b{jc}}}{}}00{EfEh}0{EfBb}4{{}{{B`{c}}}{}}00{{{b{j}}}{{B`{{b{jc}}}}}{}}00{b{{B`{{b{c}}}}}{}}00{{}Ej}{{}Ef}{Af{{b{c}}}{}}00{Af{{b{jc}}}{}}00{Aff}00{DfEl}:{{{b{Ej}}{b{jBd}}}Bf}{{{b{Ef}}{b{jBd}}}Bf}{{{b{Df}}{b{jBd}}}Bf}{cc{}}00{{}Af}00{{}c{}}00{{ElBbElBb}Df}{{{b{Ej}}{b{Cb}}}f}{DfBb}{{{b{jEj}}Df}f}{EjEf}{EjAf}{DfEn}{{ElBb}En}{EfEh}{EjEl}{EjBb}{c{{Bl{e}}}{}{}}00{{}{{Bl{c}}}{}}00{DfEl}5{bCj}00{{}c{}}00","D":"Dj","p":[[1,"reference",null,null,1],[5,"Private",260],[1,"unit"],[5,"Command",261],[0,"mut"],[6,"EndpointSelector",0],[6,"ConnectionSelector",0],[5,"Opt",0],[5,"ClientStats",0],[8,"Result",262],[1,"usize"],[6,"Commands",0],[1,"u8"],[1,"u32"],[1,"slice"],[5,"Compat",263],[1,"u64"],[5,"Formatter",264],[8,"Result",264],[5,"ArgMatches",265],[8,"Error",266],[6,"Result",267,null,1],[5,"Id",268],[6,"Option",269,null,1],[1,"str"],[1,"bool"],[1,"u16"],[5,"Runtime",270],[5,"TypeId",271],[5,"NodeAddr",272],[5,"RelayUrl",273],[5,"Endpoint",274],[5,"Connection",274],[1,"tuple",null,null,1],[5,"TransferResult",187],[5,"TransportConfig",275],[6,"SocketAddr",276],[5,"CertificateDer",277],[5,"Endpoint",278],[5,"Connection",279],[6,"PrivateKeyDer",277],[5,"Opt",155],[5,"StreamStats",187],[5,"Histogram",280],[5,"Stats",187],[5,"Duration",281],[1,"f64"]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAN8AEQAAABwAHwAmAEcABgBTAAwAZgAAAGoAAQBtAAMAcwAUAIkABQCRAAAAlAABAJgAAACbABIArwAEALUALQDmAAIA7AAYAA==","P":[[18,"T"],[28,""],[32,"T"],[34,""],[42,"T"],[57,""],[59,"T"],[69,""],[77,"T"],[82,""],[86,"T"],[88,""],[96,"U"],[102,""],[114,"T"],[116,"U,T"],[121,"U"],[126,""],[136,"V"],[141,""],[159,"T"],[161,""],[162,"T"],[163,""],[166,"T"],[171,""],[173,"T"],[174,""],[176,"T"],[177,""],[179,"U"],[180,"T"],[181,"U,T"],[182,"U"],[183,""],[186,"V"],[190,""],[191,"T"],[197,""],[201,"T"],[210,""],[212,"T"],[218,""],[226,"T"],[229,""],[232,"U"],[235,""],[246,"U,T"],[249,"U"],[252,""],[257,"V"]]}],["iroh_dns_server",{"t":"FNNNNNNNNNCCNNNNCNNNCNNNCCNNNNNNGFPPFFFNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNOONNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNOFFFFNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNGPFFFPPGPPPNNNNOONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNOOOOOONNNNOOOONNOOOOOONNNNFNNNNNNNNHNNNNNNFNNNNNNNNNONNNOONNNNN","n":["ZoneStore","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","config","dns","fmt","from","from_ref","get_signed_packet","http","in_memory","insert","into","metrics","new","persistent","resolve","server","state","to_owned","try_from","try_into","type_id","vzip","with_mainline_fallback","BootstrapOption","Config","Custom","Default","MainlineConfig","MetricsConfig","StoreConfig","__clone_box","bind_addr","bootstrap","borrow","","","","","borrow_mut","","","","","clone","clone_into","clone_to_uninit","compat","","","","","compat_mut","","","","","compat_ref","","","","","data_dir","default","","","","deserialize","","","","","disabled","","dns","enabled","fmt","","","","","from","","","","","from_ref","http","https","into","","","","","load","mainline","metrics","pkarr_put_rate_limit","serialize","","","","","signed_packet_store_path","to_owned","try_from","","","","","try_into","","","","","type_id","","","","","vzip","","","","","zone_store","DnsConfig","DnsHandler","DnsServer","Handle","__clone_box","","","answer_request","bind_addr","borrow","","","","borrow_mut","","","","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","compat_mut","","","","compat_ref","","","","default_soa","default_ttl","deserialize","fmt","","","from","","","","from_ref","","","handle_request","into","","","","local_addr","new","origins","port","rr_a","rr_aaaa","rr_ns","run_until_done","send_response","serialize","shutdown","spawn","to_owned","","","try_from","","","","try_into","","","","type_id","","","","vzip","","","","CertMode","Disabled","HttpConfig","HttpServer","HttpsConfig","LetsEncrypt","Manual","RateLimitConfig","SelfSigned","Simple","Smart","__clone_box","","","","bind_addr","","borrow","","","","","borrow_mut","","","","","cert_mode","clone","","","","clone_into","","","","clone_to_uninit","","","","compat","","","","","compat_mut","","","","","compat_ref","","","","","default","","deserialize","","","","domains","eq","equivalent","","","fmt","","","","","from","","","","","from_ref","","","","http_addr","https_addr","into","","","","","letsencrypt_contact","letsencrypt_prod","port","","run_until_done","serialize","","","","shutdown","spawn","to_owned","","","","to_string","try_from","","","","","try_into","","","","","type_id","","","","","vzip","","","","","Metrics","as_iterable","borrow","borrow_mut","compat","compat_mut","compat_ref","default","dns_lookup_error","dns_lookup_notfound","dns_lookup_success","dns_requests","dns_requests_https","dns_requests_udp","field_count","field_ref","fmt","from","http_requests","http_requests_duration_ms","http_requests_error","http_requests_success","into","name","pkarr_publish_noop","pkarr_publish_update","store_packets_expired","store_packets_inserted","store_packets_removed","store_packets_updated","try_from","try_into","type_id","vzip","Server","borrow","borrow_mut","compat","compat_mut","compat_ref","from","into","run_until_error","run_with_config_until_ctrl_c","shutdown","spawn","try_from","try_into","type_id","vzip","AppState","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","dns_handler","from","from_ref","into","metrics","store","to_owned","try_from","try_into","type_id","vzip"],"q":[[0,"iroh_dns_server"],[32,"iroh_dns_server::config"],[134,"iroh_dns_server::dns"],[221,"iroh_dns_server::http"],[344,"iroh_dns_server::metrics"],[378,"iroh_dns_server::server"],[394,"iroh_dns_server::state"],[415,"dyn_clone::sealed"],[416,"iroh_dns_server::store"],[417,"async_compat"],[418,"core::fmt"],[419,"pkarr::signed_packet"],[420,"core::option"],[421,"n0_snafu::error"],[422,"alloc::sync"],[423,"std::path"],[424,"core::convert"],[425,"hickory_proto::rr::domain::name"],[426,"hickory_proto::rr::record_type"],[427,"hickory_proto::rr::rr_set"],[428,"core::result"],[429,"core::any"],[430,"serde::de"],[431,"iroh_dns_server::http::rate_limiting"],[432,"serde::ser"],[433,"hickory_server::server::request_handler"],[434,"bytes::bytes"],[435,"alloc::string"],[436,"core::future::future"],[437,"alloc::boxed"],[438,"core::pin"],[439,"hickory_server::server::response_handler"],[440,"core::net::socket_addr"],[441,"alloc::vec"],[442,"hickory_server::authority::message_response"],[443,"hickory_proto::rr::resource"],[444,"core::iter::traits::iterator"],[445,"core::marker"],[446,"iroh_dns_server::http::tls"],[447,"iroh_metrics::iterable"],[448,"iroh_metrics::metrics"],[449,"iroh_metrics::base"]],"i":"`j00000000``0000`000`000``000000``Bn0```CdC`CbCh3214032143330321403214032140031403214220103214032143000321400000321403032140321403214032140````ClDbDh12Ef32103213213213210321032103213333210321321203210233333013003210321032103210321`Cn```Fl0`01110FhFj10G`432104321143214321432104321043210432144432113333433210432143210004321112104321004321304321043210432104321`Aj00000000000000000000000000000000`Gn0000000`000000`Gb0000000000000000000","f":"`{{bd}f}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{{b{j}}}j}{{b{b{hc}}}f{}}{{bl}f}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}}``{{{b{j}}{b{hA`}}}Ab}{cc{}}{{{b{c}}}c{}}{{{b{j}}{b{`}}}{{Ah{{Af{Ad}}}}}}```{{}c{}}```{{{b{j}}{b{`}}{b{Bd}}Bf}{{Ah{{Af{{Al{Bh}}}}}}}}``{bc{}}{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}{{jBn}j}```````{{bd}f}{C`Af}{CbAf}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{{{b{Cd}}}Cd}{{b{b{hc}}}f{}}{{bl}f}{{}{{n{c}}}{}}0000{{{b{h}}}{{n{{b{hc}}}}}{}}0000{b{{n{{b{c}}}}}{}}0000{{}{{Ah{Cf}}}}{{}Ch}{{}Cd}{{}Cb}{{}Bn}{c{{Bj{Ch}}}Cj}{c{{Bj{Cd}}}Cj}{c{{Bj{C`}}}Cj}{c{{Bj{Cb}}}Cj}{c{{Bj{Bn}}}Cj}{{}C`}{C`An}{ChCl}{CbAn}{{{b{Ch}}{b{hA`}}}Ab}{{{b{Cd}}{b{hA`}}}Ab}{{{b{C`}}{b{hA`}}}Ab}{{{b{Cb}}{b{hA`}}}Ab}{{{b{Bn}}{b{hA`}}}Ab}{cc{}}0000{{{b{c}}}c{}}{ChAf}0{{}c{}}0000{c{{Ah{Ch}}}{{Bb{B`}}}}22{ChCn}{{{b{Ch}}c}BjD`}{{{b{Cd}}c}BjD`}{{{b{C`}}c}BjD`}{{{b{Cb}}c}BjD`}{{{b{Bn}}c}BjD`}{{}{{Ah{Cf}}}}{bc{}}{c{{Bj{e}}}{}{}}0000{{}{{Bj{c}}}{}}0000{bBl}0000{{}c{}}0000>````{{bd}f}00{{{b{Db}}Dd}{{Ah{Df}}}}{ClAf}{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000{{{b{Cl}}}Cl}{{{b{Db}}}Db}{{{b{Dh}}}Dh}{{b{b{hc}}}f{}}00{{bl}f}00{{}{{n{c}}}{}}000{{{b{h}}}{{n{{b{hc}}}}}{}}000{b{{n{{b{c}}}}}{}}000{ClDj}{ClDl}{c{{Bj{Cl}}}Cj}{{{b{Cl}}{b{hA`}}}Ab}{{{b{Db}}{b{hA`}}}Ab}{{{b{Dh}}{b{hA`}}}Ab}{cc{}}000{{{b{c}}}c{}}00{{{b{Db}}{b{Dd}}c}{{Eb{{E`{Dn}}}}}Ed}{{}c{}}000{{{b{Ef}}}Eh}{{j{b{Cl}}{Al{Aj}}}{{Ah{Db}}}}{ClEj}{ClEl}{ClAf}00{Ef{{Ah{f}}}}{{{b{hDh}}{En{cegi}}}{{Eb{{E`{Dn}}}}}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}}{{{b{Cl}}c}BjD`}2{{ClDb}{{Ah{Ef}}}}{bc{}}00{c{{Bj{e}}}{}{}}000{{}{{Bj{c}}}{}}000{bBl}000{{}c{}}000```````````{{bd}f}000{FhAf}{FjAf}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{FjFl}{{{b{Cn}}}Cn}{{{b{Fl}}}Fl}{{{b{Fh}}}Fh}{{{b{Fj}}}Fj}{{b{b{hc}}}f{}}000{{bl}f}000{{}{{n{c}}}{}}0000{{{b{h}}}{{n{{b{hc}}}}}{}}0000{b{{n{{b{c}}}}}{}}0000{{}Cn}{{}{{b{Cn}}}}{c{{Bj{Cn}}}Cj}{c{{Bj{Fl}}}Cj}{c{{Bj{Fh}}}Cj}{c{{Bj{Fj}}}Cj}{FjEj}{{{b{Fl}}{b{Fl}}}An}{{b{b{c}}}An{}}00{{{b{Cn}}{b{hA`}}}Ab}{{{b{Fl}}{b{hA`}}}{{Bj{fFn}}}}{{{b{Fl}}{b{hA`}}}Ab}{{{b{Fh}}{b{hA`}}}Ab}{{{b{Fj}}{b{hA`}}}Ab}{cc{}}0000{{{b{c}}}c{}}000{{{b{G`}}}{{Af{Eh}}}}0{{}c{}}0000{FjAf}0{FhEl}{FjEl}{G`{{Ah{f}}}}{{{b{Cn}}c}BjD`}{{{b{Fl}}c}BjD`}{{{b{Fh}}c}BjD`}{{{b{Fj}}c}BjD`}4{{{Af{Fh}}{Af{Fj}}CnGb}{{Ah{G`}}}}{bc{}}000{bDj}{c{{Bj{e}}}{}{}}0000{{}{{Bj{c}}}{}}0000{bBl}0000{{}c{}}0000`{b{{b{Gd}}}}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}}{{}Aj}{AjGf}00000{{{b{Aj}}}Gh}{{{b{Aj}}Gh}{{Af{Gj}}}}{{{b{Aj}}{b{hA`}}}Ab}{cc{}}4444{{}c{}}{{{b{Aj}}}{{b{Gl}}}}666666{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}`{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}};:{Gn{{Ah{f}}}}{Ch{{Ah{f}}}}1{{Chj{Al{Aj}}}{{Ah{Gn}}}};:98`{{bd}f}87{{{b{Gb}}}Gb}{{b{b{hc}}}f{}}{{bl}f}987{GbDb}{cc{}}{{{b{c}}}c{}}{{}c{}}{GbAl}{Gbj}{bc{}}{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}","D":"AAj","p":[[1,"reference",null,null,1],[5,"Private",415],[1,"unit"],[0,"mut"],[5,"ZoneStore",0,416],[1,"u8"],[5,"Compat",417],[5,"Formatter",418],[8,"Result",418],[5,"SignedPacket",419],[6,"Option",420,null,1],[8,"Result",421],[5,"Metrics",344],[5,"Arc",422,null,1],[1,"bool"],[5,"Path",423],[10,"AsRef",424],[5,"Name",425],[6,"RecordType",426],[5,"RecordSet",427],[6,"Result",428,null,1],[5,"TypeId",429],[6,"BootstrapOption",32],[5,"MetricsConfig",32],[5,"MainlineConfig",32],[5,"StoreConfig",32],[5,"PathBuf",423],[5,"Config",32],[10,"Deserializer",430],[5,"DnsConfig",134],[6,"RateLimitConfig",221,431],[10,"Serializer",432],[5,"DnsHandler",134],[5,"Request",433],[5,"Bytes",434],[5,"Handle",134],[5,"String",435],[1,"u32"],[10,"Future",436,null,1],[5,"Box",437,null,1],[5,"Pin",438],[10,"ResponseHandler",439],[5,"DnsServer",134],[6,"SocketAddr",440],[5,"Vec",441],[1,"u16"],[5,"MessageResponse",442],[17,"Item"],[5,"Record",443],[10,"Iterator",444],[10,"Send",445],[5,"HttpConfig",221],[5,"HttpsConfig",221],[6,"CertMode",221,446],[5,"Error",418],[5,"HttpServer",221],[5,"AppState",394],[10,"Iterable",447],[5,"Counter",448],[1,"usize"],[5,"MetricItem",449],[1,"str"],[5,"Server",378]],"r":[[0,416],[1,416],[2,416],[3,416],[4,416],[5,416],[6,416],[7,416],[8,416],[9,416],[12,416],[13,416],[14,416],[15,416],[17,416],[18,416],[19,416],[21,416],[22,416],[23,416],[26,416],[27,416],[28,416],[29,416],[30,416],[31,416],[221,446],[222,431],[226,446],[227,446],[228,431],[229,446],[230,431],[231,431],[232,431],[233,446],[239,431],[240,446],[244,431],[245,446],[249,431],[250,446],[253,431],[254,446],[257,431],[258,446],[262,431],[263,446],[267,431],[268,446],[272,431],[273,446],[276,431],[277,431],[278,431],[279,446],[283,446],[284,446],[285,446],[286,446],[287,431],[288,446],[289,446],[293,431],[294,446],[297,431],[298,446],[304,431],[305,446],[313,431],[314,446],[319,431],[320,446],[323,446],[325,431],[326,446],[330,431],[331,446],[335,431],[336,446],[340,431],[341,446]],"b":[[276,"impl-Default-for-RateLimitConfig"],[277,"impl-Default-for-%26RateLimitConfig"],[288,"impl-Display-for-CertMode"],[289,"impl-Debug-for-CertMode"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAABIBIQACAAgADQAAAA8AAAAbAAQAKAAAACsAGwBIAAgAVQAEAF8AAABrAAQAcQAUAIsAAgCQABwArwADALcAAwDHAAEAywASAOkAAwDvAAkA+gAgABwBCAAqAQMAOgEDAEABGABaAQYAZwECAHABAAB3AQMAfAEEAIcBAwCMAQgAlwEAAJsBBAA=","P":[[2,"T"],[4,""],[5,"T"],[6,""],[7,"T"],[12,""],[13,"T"],[15,""],[19,"U"],[21,""],[22,""],[23,""],[26,"T"],[27,"U,T"],[28,"U"],[29,""],[30,"V"],[31,""],[42,"T"],[52,""],[53,"T"],[54,""],[55,"T"],[70,""],[75,"__D"],[80,""],[89,"T"],[95,""],[97,"U"],[102,""],[103,""],[106,"__S"],[111,""],[112,"T"],[113,"U,T"],[118,"U"],[123,""],[128,"V"],[133,""],[143,"T"],[151,""],[154,"T"],[157,""],[160,"T"],[172,""],[174,"__D"],[175,""],[178,"T"],[185,"R"],[186,"U"],[190,""],[198,",,,"],[199,"__S"],[200,""],[202,"T"],[205,"U,T"],[209,"U"],[213,""],[217,"V"],[232,""],[238,"T"],[248,""],[253,"T"],[257,""],[261,"T"],[276,""],[278,"__D"],[282,""],[284,"K"],[287,""],[292,"T"],[301,""],[303,"U"],[308,""],[313,"__S"],[317,""],[319,"T"],[323,""],[324,"U,T"],[329,"U"],[334,""],[339,"V"],[345,""],[346,"T"],[351,""],[361,"T"],[362,""],[366,"U"],[367,""],[374,"U,T"],[375,"U"],[376,""],[377,"V"],[379,"T"],[385,"U"],[386,""],[390,"U,T"],[391,"U"],[392,""],[393,"V"],[395,""],[396,"T"],[398,""],[399,"T"],[400,""],[401,"T"],[404,""],[405,"T"],[407,"U"],[408,""],[410,"T"],[411,"U,T"],[412,"U"],[413,""],[414,"V"]]}],["iroh_relay",{"t":"EFFFFNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNCNNNNOCCONNCNNNNNNNNNNNNNNNNNNONNNNNFFFFGPGPPPPPPPPPPPPPPPPPPPPPPPPPPGPGPGGPPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSSSSSGFPPSSPPPFFPFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOGSSPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNPGPGPSPPPPPGPTFFKFPPGPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCCSHPPPGPPPPPPPSPPPPGPPGPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSPPGSSFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOGGPPPPGFSPPPPFPPFPPPFPFFPFPFFGGPFPNNNOOOONNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNONNNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONONNOOOONOOONNOOOOOOONNNNNNCONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHH","n":["MAX_PACKET_SIZE","PingTracker","RelayMap","RelayNode","RelayQuicConfig","__clone_box","","","borrow","","","","borrow_mut","","","","client","clone","","","clone_into","","","clone_to_uninit","","","cmp","","compare","","compat","","","","compat_mut","","","","compat_ref","","","","contains_node","default","","default_timeout","defaults","deref","","","","deref_mut","","","","deserialize","","dns","drop","","","","empty","eq","","","equivalent","","","","","","","","","fmt","","","","","","from","","","","","","","from_iter","","get_node","http","init","","","","into","","","","is_empty","len","new","new_ping","node_info","nodes","partial_cmp","","pong_received","port","protos","quic","","serialize","","server","timeout","to_owned","","","to_string","","try_from","","","","try_into","","","","type_id","","","","url","urls","vzip","","","","Client","ClientBuilder","ClientSink","ClientStream","ConnectError","Dial","DialError","Dns","ExceedsMaxPacketSize","Handshake","Health","InvalidProtocolMessageEncoding","InvalidRelayUrl","InvalidTargetPort","InvalidTlsServername","InvalidUrl","InvalidWebsocketUrl","Io","","KeepAlive","NoLocalAddr","NodeGone","Ping","","Pong","","ProtocolRecv","ProtocolSend","ProxyConnect","ProxyConnectInvalidStatus","ProxyInvalidTargetPort","ProxyInvalidTlsServername","ProxyInvalidUrl","ReceivedMessage","ReceivedPacket","RecvError","RelayIo","SendError","SendMessage","SendPacket","ServerRestarting","Timeout","Tls","UnexpectedFrame","UnexpectedUpgradeStatus","Upgrade","Websocket","","WebsocketIo","__clone_box","","address_family_selector","as_error_source","","","","backtrace","","","","borrow","","","","","","","","","","borrow_mut","","","","","","","","","","cause","","","","clone","","clone_into","","clone_to_uninit","","compat","","","","","","","","","","compat_mut","","","","","","","","","","compat_ref","","","","","","","","","","connect","deref","","","","","","","","","","deref_mut","","","","","","","","","","description","","","","drop","","","","","","","","","","fmt","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","","","","","in_current_span","","","","init","","","","","","","","","","insecure_skip_cert_verify","into","","","","","","","","","","is_prober","key_cache_capacity","local_addr","make_dangerous_client_config","new","poll_close","","poll_flush","","poll_next","","poll_ready","","protocol","proxy_url","ratelimit_sink","","ratelimit_sink_with_jitter","","ratelimit_stream","","ratelimit_stream_with_jitter","","source","","","","split","start_send","","to_owned","","to_string","","","","try_from","","","","","","","","","","try_into","","","","","","","","","","try_poll_next","","type_id","","","","","","","","","","vzip","","","","","","","","","","backtrace","","","","","","","","","","code","source","","","","","span_trace","","","","","","","","","","url","","backtrace","","","","","","","","","","proxy_hostname","proxy_url","source","","","","span_trace","","","","","","","","","","status","url","data","problem","reconnect_in","remote_node_id","try_for","backtrace","","","","","","frame_type","source","","","","","span_trace","","","","","","backtrace","","","size","source","","span_trace","","","DEFAULT_HTTPS_PORT","DEFAULT_HTTP_PORT","DEFAULT_KEY_CACHE_CAPACITY","DEFAULT_METRICS_PORT","DEFAULT_RELAY_QUIC_PORT","DnsError","DnsResolver","InvalidResponse","MissingHost","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","NoResponse","Resolve","ResolveBoth","StaggeredError","TXT","Timeout","TxtLookup","__clone_box","","","as_error_source","","backtrace","","borrow","","","","","borrow_mut","","","","","cause","","clear_cache","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","compat_mut","","","","","compat_ref","","","","","default","deref","","","","","deref_mut","","","","","description","","drop","","","","","fmt","","","","","","","","from","","","","","","","","","in_current_span","","init","","","","","into","","","","","into_iter","lookup_ipv4","lookup_ipv4_ipv6","lookup_ipv4_ipv6_staggered","lookup_ipv4_staggered","lookup_ipv6","lookup_ipv6_staggered","lookup_node_by_domain_name","lookup_node_by_domain_name_staggered","lookup_node_by_id","lookup_node_by_id_staggered","lookup_txt","new","reset","resolve","resolve_host","source","","to_owned","","","to_string","","","try_from","","","","","try_into","","","","","txt_data","type_id","","","","","vzip","","","","","with_nameserver","backtrace","","","","","","ipv4","ipv6","source","","span_trace","","","","","","Protocol","RELAY_PATH","RELAY_PROBE_PATH","Relay","Websocket","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","eq","equivalent","","","fmt","from","init","into","parse_header","to_owned","try_from","try_into","type_id","upgrade_header","vzip","AttrFromString","DecodingError","","EncodingError","FailedBuildingPacket","IROH_TXT_NAME","InvalidEncodingZ32","InvalidLabel","InvalidLength","InvalidSignature","InvalidTxtEntry","LookupError","LookupFailed","MAX_LENGTH","MaxLengthExceededError","NodeData","NodeIdExt","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","","UnexpectedFormat","UserData","Utf8","__clone_box","","","add_direct_addresses","as_error_source","","","","","as_ref","backtrace","","","","","borrow","","","","","","","","borrow_mut","","","","","","","","cause","","","","","clear_direct_addresses","clone","","","clone_into","","","clone_to_uninit","","","cmp","compare","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","data","default","deref","","","","","","","","","deref_mut","","","","","","","","","description","","","","","direct_addresses","drop","","","","","","","","eq","","","equivalent","","","","","","","","","fmt","","","","","","","","","","","","","","from","","","","","","","","","","","","from_parts","from_pkarr_signed_packet","from_str","from_txt_lookup","from_z32","hash","in_current_span","","","","","init","","","","","","","","into","","","","","","","","into_node_addr","new","","node_id","partial_cmp","relay_url","set_relay_url","set_user_data","source","","","","","to_node_addr","to_owned","","","to_pkarr_signed_packet","to_string","","","","","","to_txt_strings","to_z32","try_from","","","","","","","","","try_into","","","","","","","","type_id","","","","","","","","user_data","vzip","","","","","","","","with_direct_addresses","","with_relay_url","","with_user_data","","backtrace","","","len","source","","span_trace","","","backtrace","","source","","span_trace","","backtrace","","","source","","","span_trace","","","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","disco","relay","MAGIC","looks_like_disco_wrapper","ClientInfo","ConnSend","FrameTooLarge","FrameType","Health","InvalidFrame","InvalidFrameType","InvalidSignature","Io","","KeepAlive","MAX_PACKET_SIZE","NotePreferred","PeerGone","Ping","Pong","RecvError","RecvPacket","Restarting","SendError","SendPacket","SerDe","","Timeout","","TooSmall","UnexpectedFrame","Unknown","__clone_box","as_error_source","","backtrace","","borrow","","","borrow_mut","","","cause","","clone","clone_into","clone_to_uninit","compat","","","compat_mut","","","compat_ref","","","deref","","","deref_mut","","","description","","drop","","","eq","equivalent","","","fmt","","","","","","from","","","","","","","","","","","","from_primitive","in_current_span","","init","","","into","","","source","","to_owned","to_string","","","try_from","","","try_into","","","type_id","","","vzip","","","backtrace","","","","","","","","","expected","frame_len","frame_type","got","source","","","","span_trace","","","","","","","","","backtrace","","","","source","","","","span_trace","","","","ALPN_QUIC_ADDR_DISC","Connect","Connection","Error","QUIC_ADDR_DISC_CLOSE_CODE","QUIC_ADDR_DISC_CLOSE_REASON","QuicClient","WatchRecv","__clone_box","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","create_conn","deref","","deref_mut","","description","drop","","fmt","","","from","","","","","in_current_span","init","","into","","new","source","to_owned","to_string","try_from","","try_into","","type_id","","vzip","","backtrace","","","source","","","span_trace","","","Access","AccessConfig","AcmeEventStreamFinished","Allow","BindTcpListener","BindTlsListener","CertConfig","ClientRateLimit","DEFAULT_CERT_RELOAD_INTERVAL","Deny","Everyone","JoinError","LetsEncrypt","Limits","LocalAddr","Manual","Metrics","","NoLocalAddr","NoRelayServicesEnabled","QuicConfig","QuicSpawn","RelayConfig","RelayMetrics","Reloading","ReloadingResolver","Restricted","Server","ServerConfig","SpawnError","SupervisorError","TaskCancelled","TlsConfig","TlsHeaderParse","__clone_box","","","accept_conn_burst","accept_conn_limit","accepts","access","as_error_source","","as_iterable","backtrace","","bind_addr","borrow","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","bytes_per_second","bytes_recv","bytes_sent","cause","","cert","certificates","client_rx","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","","","","","","","","","","","compat_mut","","","","","","","","","","","","","","","compat_ref","","","","","","","","","","","","","","","conns_rx_ratelimited_total","default","","","","deref","","","","","","","","","","","","","","","","deref_mut","","","","","","","","","","","","","","","description","","disco_packets_dropped","disco_packets_recv","disco_packets_sent","disconnects","drop","","","","","","","","","","","","","","","eq","equivalent","","","field_count","field_ref","fmt","","","","","","","","","","","","","","","","","frames_rx_ratelimited_total","from","","","","","","","","","","","","","","","","got_ping","groups","groups_cloned","http_addr","http_bind_addr","http_url","https_addr","https_bind_addr","https_url","in_current_span","","init","","","","","","","","","","","","","","","","into","","","","","","","","","","","","","","","is_allowed","key_cache_capacity","limits","max_burst_bytes","metrics","metrics_addr","name","","other_packets_dropped","other_packets_recv","other_packets_sent","quic","quic_addr","quic_bind_addr","relay","relay_accepts","reload","resolve","send_packets_dropped","send_packets_recv","send_packets_sent","sent_pong","server","server_config","","shutdown","","source","","spawn","task_handle","testing","tls","to_owned","","","to_string","","try_from","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","unique_client_keys","unknown_frames","vzip","","","","","","","","","","","","","","","websocket_accepts","certs","state","addr","backtrace","","","","","","source","","","","","span_trace","","","","","","backtrace","","","","","source","","span_trace","","","","","quic_config","relay_config","self_signed_tls_certs_and_config","server_config","tls_config"],"q":[[0,"iroh_relay"],[140,"iroh_relay::client"],[434,"iroh_relay::client::ConnectError"],[462,"iroh_relay::client::DialError"],[490,"iroh_relay::client::ReceivedMessage"],[495,"iroh_relay::client::RecvError"],[513,"iroh_relay::client::SendError"],[522,"iroh_relay::defaults"],[527,"iroh_relay::dns"],[677,"iroh_relay::dns::DnsError"],[693,"iroh_relay::http"],[726,"iroh_relay::node_info"],[988,"iroh_relay::node_info::DecodingError"],[997,"iroh_relay::node_info::EncodingError"],[1003,"iroh_relay::node_info::LookupError"],[1012,"iroh_relay::node_info::ParseError"],[1030,"iroh_relay::protos"],[1032,"iroh_relay::protos::disco"],[1034,"iroh_relay::protos::relay"],[1147,"iroh_relay::protos::relay::RecvError"],[1173,"iroh_relay::protos::relay::SendError"],[1185,"iroh_relay::quic"],[1243,"iroh_relay::quic::Error"],[1252,"iroh_relay::server"],[1631,"iroh_relay::server::CertConfig"],[1633,"iroh_relay::server::SpawnError"],[1651,"iroh_relay::server::SupervisorError"],[1663,"iroh_relay::server::testing"],[1668,"dyn_clone::sealed"],[1669,"iroh_relay::relay_map"],[1670,"core::cmp"],[1671,"async_compat"],[1672,"iroh_base::relay_url"],[1673,"iroh_relay::ping_tracker"],[1674,"core::time"],[1675,"core::result"],[1676,"serde::de"],[1677,"core::fmt"],[1678,"core::iter::traits::collect"],[1679,"alloc::sync"],[1680,"core::option"],[1681,"core::iter::traits::iterator"],[1682,"serde::ser"],[1683,"alloc::string"],[1684,"core::any"],[1685,"core::ops::function"],[1686,"core::marker"],[1687,"core::error"],[1688,"iroh_relay::client::conn"],[1689,"backtrace::capture"],[1690,"std::io::error"],[1691,"tokio_websockets::error"],[1692,"tokio::time::error"],[1693,"core::net::socket_addr"],[1694,"rustls::client::client_conn"],[1695,"iroh_base::key"],[1696,"core::convert"],[1697,"core::pin"],[1698,"core::task::wake"],[1699,"core::task::poll"],[1700,"url"],[1701,"governor::state::direct"],[1702,"governor::state"],[1703,"governor::state::direct::sinks"],[1704,"governor::clock::with_std"],[1705,"governor::gcra"],[1706,"governor::middleware"],[1707,"governor::jitter"],[1708,"governor::state::direct::streams"],[1709,"http::status"],[1710,"hyper::error"],[1711,"n0_snafu::spantrace"],[1712,"bytes::bytes"],[1713,"core::str::error"],[1714,"hickory_resolver::error"],[1715,"hickory_resolver::resolver"],[1716,"hickory_resolver::lookup"],[1717,"core::net::ip_addr"],[1718,"reqwest::dns::resolve"],[1719,"alloc::boxed"],[1720,"http::header::value"],[1721,"alloc::collections::btree::set"],[1722,"pkarr::signed_packet"],[1723,"iroh_base::node_addr"],[1724,"core::hash"],[1725,"alloc::vec"],[1726,"z32"],[1727,"ed25519_dalek::errors"],[1728,"simple_dns::simple_dns_error"],[1729,"hickory_proto::error"],[1730,"postcard::error"],[1731,"iroh_quinn_proto::varint"],[1732,"iroh_quinn::connection"],[1733,"tokio::sync::watch::error"],[1734,"iroh_quinn_proto::connection"],[1735,"iroh_quinn_proto::endpoint"],[1736,"iroh_quinn::endpoint"],[1737,"iroh_relay::server::metrics"],[1738,"iroh_metrics::metrics"],[1739,"iroh_metrics::iterable"],[1740,"core::num::nonzero"],[1741,"rustls_pki_types"],[1742,"core::default"],[1743,"iroh_relay::server::resolver"],[1744,"iroh_metrics::base"],[1745,"tokio::runtime::task::error"],[1746,"rustls::crypto::signer"],[1747,"reloadable_core"],[1748,"rustls::server::server_conn"],[1749,"tokio_util::task::abort_on_drop"],[1750,"tokio_rustls_acme::state"]],"i":"`````jlnAj3210321`32132132121210321032103213010`0321032121`032133213332221110332210333221333`032103213300`32101``221`032132032103210321230321`````Dn`E`Dh2EbDl43434031411Eh201144444`2`3``02451551532Cl0426542654231650EdEjEl75649832107598636363756498321075649832107564983210375649832107564983210759875649832107755649988321077755555649999888832107598756498321037564983210330`32121202133212120207598221637598756498321075649832102075649832107564983210IdIfIhIjIlInJ`JbJdJf476530987654321098JnK`KbKdKfKhKjKlKnL`138762987654321045LbLfLh20LlLnM`MbMdMf054321543210MlMnN`021210```````Ff0``000``0`G`NhNj3Nb404032140321403321321321403214032140321340321403214040321440032114440332214040321403212333333333333333403214014032140321140321403213A@dA@fA@hA@jA@lA@n3351543210```Gj00000000000000000000000000000AAl`0`AAf`AAhOl112`0AAd````44`14`4AAb1Oj154AAj473650476523014765230147650472231231231336523014765230147652301471265230114765230114765047265230147231222333111665523300144776652230114771131ABl4761587634125876341258232243337615823422764158207634412587634125876341258376341258323232ABnAC`ACb120210AChACj1010ACnAD`ADb210210ADfADhADjADlADnAE`413520543210````MhFbFd`2000102`2222`22`210100022101021021010222210210210210210102102222221100221111100000210210210102210210210210210AEdAEfAEhAEjAElAEnAF`AFbAFd76178543876543210AFfAFhAFjAFl32103210`AG`0````0AGb1110101000101010010101101101111011010010110101010AGnAH`AHb210210``AIbAJdAI`0```1AHl3AIl`20`424`2``0`1````4`2AJb4AIfAHd0AHfAHj79179AId25AJjAJf39;2AIj679AIn<>69325;=4178:0<>866<>1079=89=89=869325;=4178:0<>69325;=4178:0<>69325;=4178:0<>66927693325;=4178:0<>69325;=4178:0<><>666669325;=4178:0<>====6669325;=4178:0<<>>669325;=4178:0<>>699050010<>693325;=4178:0<>69325;=4178:0<>;55802696662012633666694130<>00`59=8<>69325;=4178:0<>69325;=4178:0<>69325;=4178:0<>6669325;=4178:0<>6AKnAL`ALdALfALhALjALlALn543210432105AMbAMdAMfAMhAMj4243210`````","f":"`````{{bd}f}00{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000`{{{b{j}}}j}{{{b{l}}}l}{{{b{n}}}n}{{b{b{hc}}}f{}}00{{bA`}f}00{{{b{l}}{b{l}}}Ab}{{{b{n}}{b{n}}}Ab}{{b{b{c}}}Ab{}}0{{}{{Ad{c}}}{}}000{{{b{h}}}{{Ad{{b{hc}}}}}{}}000{b{{Ad{{b{c}}}}}{}}000{{{b{j}}{b{Af}}}Ah}{{}Aj}{{}n}{{{b{Aj}}}Al}`{An{{b{c}}}{}}000{An{{b{hc}}}{}}000{c{{B`{l}}}Bb}{c{{B`{n}}}Bb}`{Anf}000{{}j}{{{b{j}}{b{j}}}Ah}{{{b{l}}{b{l}}}Ah}{{{b{n}}{b{n}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{Aj}}{b{hBd}}}Bf}{{{b{j}}{b{hBd}}}Bf}0{{{b{l}}{b{hBd}}}Bf}0{{{b{n}}{b{hBd}}}Bf}{cc{}}{Afj}1{lj}{Afl}33{cj{{Bj{}{{Bh{Af}}}}}}{cj{{Bj{}{{Bh{l}}}}}}{{{b{j}}{b{Af}}}{{Bn{{b{{Bl{l}}}}}}}}`{{}An}000{{}c{}}000{{{b{j}}}Ah}{{{b{j}}}An}{AlAj}{{{b{hAj}}}{{C`{A`}}}}`{{{b{j}}}{{`{{Cb{}{{Bh{{b{{Bl{l}}}}}}}}}}}}{{{b{l}}{b{l}}}{{Bn{Ab}}}}{{{b{n}}{b{n}}}{{Bn{Ab}}}}{{{b{hAj}}{C`{A`}}}f}{nCd}``{lBn}{{{b{l}}c}B`Cf}{{{b{n}}c}B`Cf}`{{{b{hAj}}}f}{bc{}}00{bCh}0{c{{B`{e}}}{}{}}000{{}{{B`{c}}}{}}000{bCj}000{lAf}{{{b{j}}}{{`{{Cb{}{{Bh{{b{Af}}}}}}}}}}{{}c{}}000`````````````````````````````````````````````````{{bd}f}0{{Clc}Cl{{D`{}{{Cn{Ah}}}}DbDd}}{b{{b{Df}}}}000{{{b{Dh}}}{{Bn{{b{Dj}}}}}}{{{b{Dl}}}{{Bn{{b{Dj}}}}}}{{{b{Dn}}}{{Bn{{b{Dj}}}}}}{{{b{E`}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}000000000{{{b{h}}}{{b{hc}}}{}}000000000{{{b{Dh}}}{{Bn{{b{Df}}}}}}{{{b{Dl}}}{{Bn{{b{Df}}}}}}{{{b{Dn}}}{{Bn{{b{Df}}}}}}{{{b{E`}}}{{Bn{{b{Df}}}}}}{{{b{Eb}}}Eb}{{{b{Cl}}}Cl}{{b{b{hc}}}f{}}0{{bA`}f}0{{}{{Ad{c}}}{}}000000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}000000000{b{{Ad{{b{c}}}}}{}}000000000{{{b{Cl}}}{{B`{EdDn}}}}{An{{b{c}}}{}}000000000{An{{b{hc}}}{}}000000000{{{b{Dh}}}{{b{Ef}}}}{{{b{Dl}}}{{b{Ef}}}}{{{b{Dn}}}{{b{Ef}}}}{{{b{E`}}}{{b{Ef}}}}{Anf}000000000{{{b{Dh}}{b{hBd}}}Bf}0{{{b{Dl}}{b{hBd}}}Bf}0{{{b{Eb}}{b{hBd}}}Bf}{{{b{Eh}}{b{hBd}}}Bf}{{{b{Dn}}{b{hBd}}}Bf}0{{{b{E`}}{b{hBd}}}Bf}0{{{b{Cl}}{b{hBd}}}Bf}{{{b{Ed}}{b{hBd}}}Bf}{{{b{Ej}}{b{hBd}}}Bf}{{{b{El}}{b{hBd}}}Bf}{cc{}}{EnDh}{F`Dh}2{FbDl}{FdDl}{F`Dl}{EnDl}66{F`Dn}{E`Dn}8{FbDn}{FfE`}{FhE`}{EnE`}<<<<<{{}}000{{}An}000000000{{ClAh}Cl}{{}c{}}0000000001{{ClAn}Cl}{{{b{El}}}{{Bn{Fj}}}}{{}Fl}{{cFnG`}Cl{{Gb{Af}}}}{{{Gd{{b{hEd}}}}{b{hGf}}}{{Gh{{B`{fc}}}}}{}}{{{Gd{{b{hEj}}}}{b{hGf}}}{{Gh{{B`{fc}}}}}{}}10{{{Gd{{b{hEd}}}}{b{hGf}}}{{Gh{{Bn{c}}}}}{}}{{{Gd{{b{hEl}}}}{b{hGf}}}{{Gh{{Bn{c}}}}}{}}32{{ClGj}Cl}{{ClGl}Cl}{{{b{{H`{Gnceg}}}}}{{Hb{ikceg}}}HdHf{{Hl{}{{Hh{Hj}}}}}{}{}}0{{{b{{H`{Gnceg}}}}Hn}{{Hb{ikceg}}}HdHf{{Hl{}{{Hh{Hj}}}}}{}{}}0{{{b{{H`{Gnceg}}}}}{{I`{iceg}}}HdHfHl{}}0{{{b{{H`{Gnceg}}}}Hn}{{I`{iceg}}}HdHfHl{}}0{{{b{Dh}}}{{Bn{{b{Df}}}}}}{{{b{Dl}}}{{Bn{{b{Df}}}}}}{{{b{Dn}}}{{Bn{{b{Df}}}}}}{{{b{E`}}}{{Bn{{b{Df}}}}}}{Ed{{Ib{ElEj}}}}{{{Gd{{b{hEd}}}}Eh}{{B`{fc}}}{}}{{{Gd{{b{hEj}}}}Eh}{{B`{fc}}}{}}{bc{}}0{bCh}000{c{{B`{e}}}{}{}}000000000{{}{{B`{c}}}{}}000000000{{{Gd{{b{hc}}}}{b{hGf}}}{{Gh{{Bn{B`}}}}}{}}0{bCj}000000000{{}c{}}000000000{IdBn}{IfBn}{IhBn}{IjBn}{IlBn}{InBn}{J`Bn}{JbBn}{JdBn}{JfBn}{InJh}{IhF`}{IjFb}{IlE`}{J`Jj}{JfEn}{IdJl}{IfJl}{IhJl}{IjJl}{IlJl}{InJl}{J`Jl}{JbJl}{JdJl}{JfJl}{IdGl}{IfGl}{JnBn}{K`Bn}{KbBn}{KdBn}{KfBn}{KhBn}{KjBn}{KlBn}{KnBn}{L`Bn}{KnCh}{KjGl}{K`Ff}{KbFh}{KdEn}{KlJj}{JnJl}{K`Jl}{KbJl}{KdJl}{KfJl}{KhJl}{KjJl}{KlJl}{KnJl}{L`Jl}{KhJh}{KfGl}{LbLd}{LfBn}{LhAl}{LbLj}1{LlBn}{LnBn}{M`Bn}{MbBn}{MdBn}{MfBn}{MfMh}{LlEn}{LnFb}{M`Fd}{MbF`}{MdMj}{LlJl}{LnJl}{M`Jl}{MbJl}{MdJl}{MfJl}{MlBn}{MnBn}{N`Bn}{N`An}{MlEn}{MnF`}{MlJl}{MnJl}{N`Jl}{{}Cd}0{{}An}11````{{}b}0```````{{bd}f}00{b{{b{Df}}}}0{{{b{Ff}}}{{Bn{{b{Dj}}}}}}{{{b{{Nb{c}}}}}{{Bn{{b{Dj}}}}}{NdNf}}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{{{b{Ff}}}{{Bn{{b{Df}}}}}}{{{b{{Nb{c}}}}}{{Bn{{b{Df}}}}}{NdNf}}{{{b{G`}}}f}{{{b{G`}}}G`}{{{b{Nh}}}Nh}{{{b{Nj}}}Nj}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}0000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000{b{{Ad{{b{c}}}}}{}}0000{{}G`}{An{{b{c}}}{}}0000{An{{b{hc}}}{}}0000{{{b{Ff}}}{{b{Ef}}}}{{{b{{Nb{c}}}}}{{b{Ef}}}{NdNf}}{Anf}0000{{{b{Ff}}{b{hBd}}}Bf}0{{{b{{Nb{c}}}}{b{hBd}}}Bf{NdNdNf}}{{{b{{Nb{c}}}}{b{hBd}}}Bf{NdNf}}{{{b{G`}}{b{hBd}}}Bf}{{{b{Nh}}{b{hBd}}}Bf}{{{b{Nj}}{b{hBd}}}Bf}0{FhFf}{cc{}}{NlFf}11{NnG`}{O`Nh}33{{}}0{{}An}0000{{}c{}}0000{Nhc{}}{{{b{G`}}cAl}{{B`{{`{{Cb{}{{Bh{Ob}}}}}}Ff}}}Od}0{{{b{G`}}cAl{b{{Oh{Of}}}}}{{B`{{`{{Cb{}{{Bh{Ob}}}}}}{Nb{Ff}}}}}Od}010{{{b{G`}}{b{Ef}}}{{B`{OjOl}}}}{{{b{G`}}{b{Ef}}{b{{Oh{Of}}}}}{{B`{Oj{Nb{Ol}}}}}}{{{b{G`}}{b{Lj}}{b{Ef}}}{{B`{OjOl}}}}{{{b{G`}}{b{Lj}}{b{Ef}}{b{{Oh{Of}}}}}{{B`{Oj{Nb{Ol}}}}}}{{{b{G`}}cAl}{{B`{NhFf}}}Od}{{}G`}{{{b{G`}}}f}{{{b{G`}}On}A@`}{{{b{G`}}{b{Gl}}AhAl}{{B`{ObFf}}}}{{{b{Ff}}}{{Bn{{b{Df}}}}}}{{{b{{Nb{c}}}}}{{Bn{{b{Df}}}}}{NdNf}}{bc{}}00{bCh}00{c{{B`{e}}}{}{}}0000{{}{{B`{c}}}{}}0000{{{b{Nj}}}{{b{{Oh{{A@b{{Oh{A`}}}}}}}}}}{bCj}0000{{}c{}}0000{FjG`}{A@dBn}{A@fBn}{A@hBn}{A@jBn}{A@lBn}{A@nBn}{A@hA@b}0{A@dFh}{A@lNl}{A@dJl}{A@fJl}{A@hJl}{A@jJl}{A@lJl}{A@nJl}`{{}b}0``{{bd}f}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{{b{Gj}}}Gj}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}{{{b{h}}}{{Ad{{b{hc}}}}}{}}{b{{Ad{{b{c}}}}}{}}{{}Gj}{An{{b{c}}}{}}{An{{b{hc}}}{}}{Anf}{{{b{Gj}}{b{Gj}}}Ah}{{b{b{c}}}Ah{}}00{{{b{Gj}}{b{hBd}}}Bf}{cc{}}{{}An}{{}c{}}{{{b{AA`}}}{{Bn{Gj}}}}{bc{}}{c{{B`{e}}}{}{}}{{}{{B`{c}}}{}}{bCj}{{{b{Gj}}}{{b{Ef}}}}{{}c{}}`````{{}b}```````````````````{{bd}f}00{{{b{hAAb}}c}f{{Bj{}{{Bh{Fj}}}}}}{b{{b{Df}}}}0000{{{b{AAd}}}{{b{Ef}}}}{{{b{AAf}}}{{Bn{{b{Dj}}}}}}{{{b{AAh}}}{{Bn{{b{Dj}}}}}}{{{b{AAj}}}{{Bn{{b{Dj}}}}}}{{{b{Ol}}}{{Bn{{b{Dj}}}}}}{{{b{AAl}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0000000{{{b{h}}}{{b{hc}}}{}}0000000{{{b{AAf}}}{{Bn{{b{Df}}}}}}{{{b{AAh}}}{{Bn{{b{Df}}}}}}{{{b{AAj}}}{{Bn{{b{Df}}}}}}{{{b{Ol}}}{{Bn{{b{Df}}}}}}{{{b{AAl}}}{{Bn{{b{Df}}}}}}{{{b{hAAb}}}f}{{{b{AAb}}}AAb}{{{b{AAd}}}AAd}{{{b{Oj}}}Oj}{{b{b{hc}}}f{}}00{{bA`}f}00{{{b{AAd}}{b{AAd}}}Ab}{{b{b{c}}}Ab{}}{{}{{Ad{c}}}{}}0000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000000{b{{Ad{{b{c}}}}}{}}0000000{OjAAb}{{}AAb}{An{{b{c}}}{}}00000{{{b{Oj}}}{{b{c}}}{}}11{An{{b{hc}}}{}}0000{{{b{hOj}}}{{b{hc}}}{}}111{{{b{AAf}}}{{b{Ef}}}}{{{b{AAh}}}{{b{Ef}}}}{{{b{AAj}}}{{b{Ef}}}}{{{b{Ol}}}{{b{Ef}}}}{{{b{AAl}}}{{b{Ef}}}}{{{b{AAb}}}{{b{{AAn{Fj}}}}}}{Anf}0000000{{{b{AAb}}{b{AAb}}}Ah}{{{b{AAd}}{b{AAd}}}Ah}{{{b{Oj}}{b{Oj}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{AAf}}{b{hBd}}}Bf}0{{{b{AAh}}{b{hBd}}}Bf}0{{{b{AAb}}{b{hBd}}}Bf}{{{b{AAd}}{b{hBd}}}Bf}0{{{b{AAj}}{b{hBd}}}Bf}0{{{b{Oj}}{b{hBd}}}Bf}{{{b{Ol}}{b{hBd}}}Bf}0{{{b{AAl}}{b{hBd}}}Bf}0{cc{}}{AB`AAf}11{ABbAAb}22{ABbOj}33{AAhAAl}4{{LjAAb}Oj}{{{b{ABd}}}{{B`{OjAAl}}}}{{{b{Ef}}}{{B`{AAdc}}}{}}{Nh{{B`{OjAAl}}}}{{{b{Ef}}}{{B`{LjAAh}}}}{{{b{AAd}}{b{hc}}}fABf}{{}}0000{{}An}0000000{{}c{}}0000000{OjABb}{{{Bn{Af}}{AAn{Fj}}}AAb}{LjOj}{OjLj}{{{b{AAd}}{b{AAd}}}{{Bn{Ab}}}}{{{b{AAb}}}{{Bn{{b{Af}}}}}}{{{b{hAAb}}{Bn{Af}}}f}{{{b{hAAb}}{Bn{AAd}}}f}{{{b{AAf}}}{{Bn{{b{Df}}}}}}{{{b{AAh}}}{{Bn{{b{Df}}}}}}{{{b{AAj}}}{{Bn{{b{Df}}}}}}{{{b{Ol}}}{{Bn{{b{Df}}}}}}{{{b{AAl}}}{{Bn{{b{Df}}}}}}{{{b{Oj}}}ABb}{bc{}}00{{{b{Oj}}{b{Fn}}ABh}{{B`{ABdAAf}}}}{bCh}00000{{{b{Oj}}}{{ABj{Ch}}}}{{{b{ABl}}}Ch}{c{{B`{e}}}{}{}}000{Ch{{B`{AAdc}}}{}}1111{{}{{B`{c}}}{}}0000000{bCj}0000000{{{b{AAb}}}{{Bn{{b{AAd}}}}}}{{}c{}}0000000{{AAb{AAn{Fj}}}AAb}{{Oj{AAn{Fj}}}Oj}{{AAb{Bn{Af}}}AAb}{{Oj{Bn{Af}}}Oj}{{AAb{Bn{AAd}}}AAb}{{Oj{Bn{AAd}}}Oj}{ABnBn}{AC`Bn}{ACbBn}{AC`An}{ABnACd}{ACbACf}{ABnJl}{AC`Jl}{ACbJl}{AChBn}{ACjBn}{AChAB`}{ACjACl}{AChJl}{ACjJl}{ACnBn}{AD`Bn}{ADbBn}{ACnA@b}{AD`A@b}{ADbADd}{ACnJl}{AD`Jl}{ADbJl}{ADfBn}{ADhBn}{ADjBn}{ADlBn}{ADnBn}{AE`Bn}{ADhCh}{ADnCh}{ADjAn}{ADfCh}{ADlMj}{AE`A@b}{ADfJl}{ADhJl}{ADjJl}{ADlJl}{ADnJl}{AE`Jl}``{{}b}{{{b{{Oh{A`}}}}}Ah}```````````{{}An}````````````````{{bd}f}{b{{b{Df}}}}0{{{b{Fb}}}{{Bn{{b{Dj}}}}}}{{{b{Fd}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}00{{{b{h}}}{{b{hc}}}{}}00{{{b{Fb}}}{{Bn{{b{Df}}}}}}{{{b{Fd}}}{{Bn{{b{Df}}}}}}{{{b{Mh}}}Mh}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}00{{{b{h}}}{{Ad{{b{hc}}}}}{}}00{b{{Ad{{b{c}}}}}{}}00{An{{b{c}}}{}}00{An{{b{hc}}}{}}00{{{b{Fb}}}{{b{Ef}}}}{{{b{Fd}}}{{b{Ef}}}}{Anf}00{{{b{Mh}}{b{Mh}}}Ah}{{b{b{c}}}Ah{}}00{{{b{Mh}}{b{hBd}}}Bf}0{{{b{Fb}}{b{hBd}}}Bf}0{{{b{Fd}}{b{hBd}}}Bf}0{A`Mh}{cc{}}{DhFb}1{AEbFb}{FhFb}{EnFb}{AEbFd}{ACfFd}{FhFd}{EnFd}8{cMh{}}{{}}0{{}An}00{{}c{}}00{{{b{Fb}}}{{Bn{{b{Df}}}}}}{{{b{Fd}}}{{Bn{{b{Df}}}}}}{bc{}}{bCh}00{c{{B`{e}}}{}{}}00{{}{{B`{c}}}{}}00{bCj}00{{}c{}}00{AEdBn}{AEfBn}{AEhBn}{AEjBn}{AElBn}{AEnBn}{AF`Bn}{AFbBn}{AFdBn}{AEfMh}{AEhAn}{AFbMh}2{AEdEn}{AEjFh}{AElAEb}{AEnACf}{AEdJl}{AEfJl}{AEhJl}{AEjJl}{AElJl}{AEnJl}{AF`Jl}{AFbJl}{AFdJl}{AFfBn}{AFhBn}{AFjBn}{AFlBn}{AFfEn}{AFhFh}{AFjDh}{AFlAEb}{AFfJl}{AFhJl}{AFjJl}{AFlJl}{{}b}```{{}AFn}1``{{bd}f}{b{{b{Df}}}}{{{b{AG`}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0{{{b{h}}}{{b{hc}}}{}}0{{{b{AG`}}}{{Bn{{b{Df}}}}}}{{{b{AGb}}}AGb}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0{{{b{h}}}{{Ad{{b{hc}}}}}{}}0{b{{Ad{{b{c}}}}}{}}0{{{b{AGb}}Fj{b{Ef}}}{{B`{AGdAG`}}}}{An{{b{c}}}{}}0{An{{b{hc}}}{}}0{{{b{AG`}}}{{b{Ef}}}}{Anf}0{{{b{AG`}}{b{hBd}}}Bf}0{{{b{AGb}}{b{hBd}}}Bf}{AGfAG`}{AGhAG`}{AGjAG`}{cc{}}0{{}}{{}An}0{{}c{}}0{{AGlFl}AGb}{{{b{AG`}}}{{Bn{{b{Df}}}}}}{bc{}}{bCh}{c{{B`{e}}}{}{}}0{{}{{B`{c}}}{}}0{bCj}0{{}c{}}0{AGnBn}{AH`Bn}{AHbBn}{AGnAGj}{AH`AGh}{AHbAGf}{AGnJl}{AH`Jl}{AHbJl}````````{{}Al}`````````````````````````{{bd}f}00{AHdBn}0{AHfAHh}{AHjAHl}{b{{b{Df}}}}0{b{{b{AHn}}}}{{{b{AI`}}}{{Bn{{b{Dj}}}}}}{{{b{AIb}}}{{Bn{{b{Dj}}}}}}{AIdFj}{b{{b{c}}}{}}00000000000000{{{b{h}}}{{b{hc}}}{}}00000000000000{AIfAIh}99{{{b{AI`}}}{{Bn{{b{Df}}}}}}{{{b{AIb}}}{{Bn{{b{Df}}}}}}{AIjAIl}{{{b{AIn}}}{{Bn{{ABj{AJ`}}}}}}>{{{b{AJb}}}AJb}{{{b{AJd}}}AJd}{{{b{AIf}}}AIf}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}00000000000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}00000000000000{b{{Ad{{b{c}}}}}{}}00000000000000{AHfAHh}{{}AHf}{{}AJb}{{}{{AJf{ce}}}{AJhNd}{AJhNd}}{{}AHd}{An{{b{c}}}{}}0{{{b{{AJj{c}}}}}{{b{e}}}Db{}}1111111111111{An{{b{hc}}}{}}00000000000000{{{b{AI`}}}{{b{Ef}}}}{{{b{AIb}}}{{b{Ef}}}}9999{Anf}00000000000000{{{b{AJd}}{b{AJd}}}Ah}{{b{b{c}}}Ah{}}00{{{b{AHf}}}An}{{{b{AHf}}An}{{Bn{AJl}}}}{{{b{AHf}}{b{hBd}}}Bf}{{{b{AJb}}{b{hBd}}}Bf}{{{b{{AJj{c}}}}{b{hBd}}}Bf{NdDb}}{{{b{{AJf{ce}}}}{b{hBd}}}BfNdNd}{{{b{{AHj{ce}}}}{b{hBd}}}BfNdNd}{{{b{AHl}}{b{hBd}}}Bf}{{{b{AJd}}{b{hBd}}}Bf}{{{b{AId}}{b{hBd}}}Bf}{{{b{{AIj{ce}}}}{b{hBd}}}BfNdNd}{{{b{AHd}}{b{hBd}}}Bf}{{{b{AIf}}{b{hBd}}}Bf}{{{b{{AIl{ce}}}}{b{hBd}}}BfNdNd}{{{b{AIn}}{b{hBd}}}Bf}{{{b{AI`}}{b{hBd}}}Bf}0{{{b{AIb}}{b{hBd}}}Bf}0{AHfAHh}{cc{}}00000000000000{AJnAIb}2{{{b{AJb}}}{{`{{Cb{}{{Bh{{b{AK`}}}}}}}}}}{{{b{AJb}}}{{`{{Cb{}{{Bh{{Bl{AK`}}}}}}}}}}{{{b{AIn}}}{{Bn{Fj}}}}{AHjFj}{{{b{AIn}}}{{Bn{Af}}}}2{AIjFj}1{{}}0{{}An}00{{cAl}{{B`{{AJj{c}}}}}{Db{AKf{}{{AKb{AKd}}}}}}111111111111{{}c{}}00000000000000{{{b{AHl}}Lj}Ah}{AHjBn}{AHjAHd}{AIfBn}{{{b{AIn}}}{{b{AJb}}}}{AJfBn}{{{b{AHf}}}{{b{Ef}}}}{{{b{AJb}}}{{b{Ef}}}}{AHfAHh}003{{{b{AIn}}}{{Bn{Fj}}}}>41{{{b{{AJj{c}}}}}f{Db{AKf{}{{AKb{AKd}}}}}}{{{b{{AJj{c}}}}AKh}{{Bn{{Bl{AKd}}}}}{{AKf{}{{AKb{AKd}}}}DbNd}}3333{AJbBl}{AIdAKj}{AIjAKj}{{{AJj{c}}}f{Db{AKf{}{{AKb{AKd}}}}}}{AIn{{B`{fAIb}}}}{{{b{AI`}}}{{Bn{{b{Df}}}}}}{{{b{AIb}}}{{Bn{{b{Df}}}}}}{{{AJf{ce}}}{{B`{AInAI`}}}NdNd}{{{b{hAIn}}}{{b{h{AKl{{B`{fAIb}}}}}}}}`{AHjBn}{bc{}}00{bCh}0{c{{B`{e}}}{}{}}00000000000000{{}{{B`{c}}}{}}00000000000000{bCj}00000000000000{AHfAHh}0{{}c{}}000000000000001{AKnABj}{AL`ALb}{ALdFj}{ALfBn}{ALhBn}{ALjBn}{ALlBn}{ALnBn}{ALdBn}{ALfEn}`{ALjAM`}{ALlEn}{ALnEn}{ALfJl}{ALhJl}{ALjJl}{ALlJl}{ALnJl}{ALdJl}{AMbBn}{AMdBn}{AMfBn}{AMhBn}{AMjBn}{AMbEn}{AMfAJn}{AMbJl}{AMdJl}{AMfJl}{AMhJl}{AMjJl}{{}AId}{{}{{AHj{f}}}}{{}{{Ib{{ABj{AJ`}}AKj}}}}{{}{{AJf{f}}}}{{}{{AIj{f}}}}","D":"BJn","p":[[1,"reference",null,null,1],[5,"Private",1668],[1,"unit"],[0,"mut"],[5,"RelayMap",0,1669],[5,"RelayNode",0,1669],[5,"RelayQuicConfig",0,1669],[1,"u8"],[6,"Ordering",1670],[5,"Compat",1671],[5,"RelayUrl",1672],[1,"bool"],[5,"PingTracker",0,1673],[5,"Duration",1674],[1,"usize"],[6,"Result",1675,null,1],[10,"Deserializer",1676],[5,"Formatter",1677],[8,"Result",1677],[17,"Item"],[10,"IntoIterator",1678],[5,"Arc",1679,null,1],[6,"Option",1680,null,1],[1,"array"],[10,"Iterator",1681],[1,"u16"],[10,"Serializer",1682],[5,"String",1683],[5,"TypeId",1684],[5,"ClientBuilder",140],[17,"Output"],[10,"Fn",1685],[10,"Send",1686],[10,"Sync",1686],[10,"Error",1687],[6,"SendError",140,1688],[5,"Backtrace",1689],[6,"RecvError",140,1688],[6,"ConnectError",140],[6,"DialError",140],[6,"ReceivedMessage",140,1688],[5,"Client",140],[1,"str"],[6,"SendMessage",140,1688],[5,"ClientSink",140],[5,"ClientStream",140],[5,"Error",1690],[6,"Error",1691],[6,"SendError",1034],[6,"RecvError",1034],[6,"DnsError",527],[5,"Elapsed",1692],[6,"SocketAddr",1693],[5,"ClientConfig",1694],[5,"SecretKey",1695],[5,"DnsResolver",527],[10,"Into",1696,null,1],[5,"Pin",1697],[5,"Context",1698],[6,"Poll",1699],[6,"Protocol",693],[5,"Url",1700],[6,"NotKeyed",1701],[5,"RateLimiter",1702],[5,"RatelimitedSink",1703],[10,"DirectStateStore",1701],[10,"ReasonablyRealtime",1704],[17,"NegativeOutcome"],[5,"NotUntil",1705],[10,"RateLimitingMiddleware",1706],[5,"Jitter",1707],[5,"RatelimitedStream",1708],[1,"tuple",null,null,1],[15,"InvalidWebsocketUrl",434],[15,"InvalidRelayUrl",434],[15,"Websocket",434],[15,"Handshake",434],[15,"Dial",434],[15,"UnexpectedUpgradeStatus",434],[15,"Upgrade",434],[15,"InvalidTlsServername",434],[15,"NoLocalAddr",434],[15,"Tls",434],[5,"StatusCode",1709],[5,"Error",1710],[5,"SpanTrace",1711],[15,"InvalidTargetPort",462],[15,"Dns",462],[15,"Timeout",462],[15,"Io",462],[15,"InvalidUrl",462],[15,"ProxyConnectInvalidStatus",462],[15,"ProxyInvalidUrl",462],[15,"ProxyConnect",462],[15,"ProxyInvalidTlsServername",462],[15,"ProxyInvalidTargetPort",462],[15,"ReceivedPacket",490],[5,"Bytes",1712],[15,"Health",490],[15,"ServerRestarting",490],[8,"NodeId",1695],[15,"Io",495],[15,"ProtocolSend",495],[15,"ProtocolRecv",495],[15,"Websocket",495],[15,"InvalidProtocolMessageEncoding",495],[15,"UnexpectedFrame",495],[6,"FrameType",1034],[5,"Utf8Error",1713],[15,"RelayIo",513],[15,"WebsocketIo",513],[15,"ExceedsMaxPacketSize",513],[5,"StaggeredError",527],[10,"Debug",1677],[10,"Display",1677],[5,"TxtLookup",527],[5,"TXT",527],[5,"ResolveError",1714],[8,"TokioResolver",1715],[5,"TxtLookup",1716],[6,"IpAddr",1717],[10,"ToString",1683],[1,"u64"],[1,"slice"],[5,"NodeInfo",726],[6,"LookupError",726],[5,"Name",1718],[8,"Resolving",1718],[5,"Box",1719,null,1],[15,"Timeout",677],[15,"NoResponse",677],[15,"ResolveBoth",677],[15,"MissingHost",677],[15,"Resolve",677],[15,"InvalidResponse",677],[5,"HeaderValue",1720],[5,"NodeData",726],[5,"UserData",726],[6,"EncodingError",726],[6,"DecodingError",726],[5,"MaxLengthExceededError",726],[6,"ParseError",726],[5,"BTreeSet",1721],[6,"SignedPacketBuildError",1722],[5,"NodeAddr",1723],[5,"SignedPacket",1722],[10,"Hasher",1724],[1,"u32"],[5,"Vec",1725],[10,"NodeIdExt",726],[15,"InvalidEncodingZ32",988],[15,"InvalidLength",988],[15,"InvalidSignature",988],[6,"Z32Error",1726],[8,"SignatureError",1727],[15,"FailedBuildingPacket",997],[15,"InvalidTxtEntry",997],[6,"SimpleDnsError",1728],[15,"ParseError",1003],[15,"LookupFailed",1003],[15,"InvalidLabel",1003],[5,"ProtoError",1729],[15,"UnexpectedFormat",1012],[15,"AttrFromString",1012],[15,"NumLabels",1012],[15,"Utf8",1012],[15,"NotAnIrohRecord",1012],[15,"DecodingError",1012],[6,"Error",1730],[15,"Io",1147],[15,"UnexpectedFrame",1147],[15,"FrameTooLarge",1147],[15,"Timeout",1147],[15,"SerDe",1147],[15,"InvalidSignature",1147],[15,"InvalidFrame",1147],[15,"InvalidFrameType",1147],[15,"TooSmall",1147],[15,"Io",1173],[15,"Timeout",1173],[15,"ConnSend",1173],[15,"SerDe",1173],[5,"VarInt",1731],[6,"Error",1185],[5,"QuicClient",1185],[5,"Connection",1732],[5,"RecvError",1733],[6,"ConnectionError",1734],[6,"ConnectError",1735],[5,"Endpoint",1736],[15,"Connect",1243],[15,"Connection",1243],[15,"WatchRecv",1243],[5,"Limits",1252],[5,"Metrics",1252,1737],[5,"Counter",1738],[5,"RelayConfig",1252],[6,"AccessConfig",1252],[10,"Iterable",1739],[6,"SpawnError",1252],[6,"SupervisorError",1252],[5,"QuicConfig",1252],[5,"ClientRateLimit",1252],[8,"NonZeroU32",1740],[5,"TlsConfig",1252],[6,"CertConfig",1252],[5,"Server",1252],[5,"CertificateDer",1741],[5,"RelayMetrics",1252,1737],[6,"Access",1252],[5,"ServerConfig",1252],[10,"Default",1742],[5,"ReloadingResolver",1252,1743],[5,"MetricItem",1744],[5,"JoinError",1745],[10,"MetricsGroup",1744],[17,"Value"],[5,"CertifiedKey",1746],[10,"Loader",1747],[5,"ClientHello",1748],[5,"ServerConfig",1748],[5,"AbortOnDropHandle",1749],[15,"Manual",1631],[15,"LetsEncrypt",1631],[5,"AcmeState",1750],[15,"BindTcpListener",1633],[15,"LocalAddr",1633],[15,"QuicSpawn",1633],[15,"TlsHeaderParse",1633],[15,"BindTlsListener",1633],[15,"NoLocalAddr",1633],[5,"InvalidHeaderValue",1720],[15,"Metrics",1651],[15,"AcmeEventStreamFinished",1651],[15,"JoinError",1651],[15,"NoRelayServicesEnabled",1651],[15,"TaskCancelled",1651]],"r":[[0,1034],[1,1673],[2,1669],[3,1669],[4,1669],[5,1669],[6,1669],[7,1669],[8,1673],[9,1669],[10,1669],[11,1669],[12,1673],[13,1669],[14,1669],[15,1669],[17,1669],[18,1669],[19,1669],[20,1669],[21,1669],[22,1669],[23,1669],[24,1669],[25,1669],[26,1669],[27,1669],[28,1669],[29,1669],[30,1673],[31,1669],[32,1669],[33,1669],[34,1673],[35,1669],[36,1669],[37,1669],[38,1673],[39,1669],[40,1669],[41,1669],[42,1669],[43,1673],[44,1669],[45,1673],[47,1673],[48,1669],[49,1669],[50,1669],[51,1673],[52,1669],[53,1669],[54,1669],[55,1669],[56,1669],[58,1673],[59,1669],[60,1669],[61,1669],[62,1669],[63,1669],[64,1669],[65,1669],[66,1669],[67,1669],[68,1669],[69,1669],[70,1669],[71,1669],[72,1669],[73,1669],[74,1669],[75,1673],[76,1669],[77,1669],[78,1669],[79,1669],[80,1669],[81,1673],[82,1669],[83,1669],[84,1669],[85,1669],[86,1669],[87,1669],[88,1669],[89,1669],[90,1669],[92,1673],[93,1669],[94,1669],[95,1669],[96,1673],[97,1669],[98,1669],[99,1669],[100,1669],[101,1669],[102,1673],[103,1673],[105,1669],[106,1669],[107,1669],[108,1673],[109,1669],[112,1669],[113,1669],[114,1669],[116,1673],[117,1669],[118,1669],[119,1669],[120,1669],[121,1669],[122,1673],[123,1669],[124,1669],[125,1669],[126,1673],[127,1669],[128,1669],[129,1669],[130,1673],[131,1669],[132,1669],[133,1669],[134,1669],[135,1669],[136,1673],[137,1669],[138,1669],[139,1669],[148,1688],[150,1688],[151,1688],[157,1688],[159,1688],[161,1688],[162,1688],[163,1688],[164,1688],[165,1688],[166,1688],[167,1688],[173,1688],[174,1688],[175,1688],[176,1688],[177,1688],[178,1688],[179,1688],[180,1688],[183,1688],[186,1688],[188,1688],[189,1688],[192,1688],[193,1688],[196,1688],[197,1688],[200,1688],[201,1688],[202,1688],[203,1688],[210,1688],[211,1688],[212,1688],[213,1688],[220,1688],[221,1688],[224,1688],[226,1688],[228,1688],[230,1688],[231,1688],[232,1688],[233,1688],[240,1688],[241,1688],[242,1688],[243,1688],[250,1688],[251,1688],[252,1688],[253,1688],[261,1688],[262,1688],[263,1688],[264,1688],[271,1688],[272,1688],[273,1688],[274,1688],[281,1688],[282,1688],[285,1688],[286,1688],[287,1688],[288,1688],[295,1688],[296,1688],[297,1688],[298,1688],[299,1688],[300,1688],[309,1688],[310,1688],[311,1688],[312,1688],[313,1688],[314,1688],[315,1688],[316,1688],[317,1688],[318,1688],[331,1688],[332,1688],[335,1688],[336,1688],[337,1688],[338,1688],[346,1688],[347,1688],[348,1688],[349,1688],[379,1688],[380,1688],[386,1688],[388,1688],[389,1688],[392,1688],[393,1688],[394,1688],[395,1688],[402,1688],[403,1688],[404,1688],[405,1688],[414,1688],[415,1688],[416,1688],[417,1688],[424,1688],[425,1688],[426,1688],[427,1688],[1260,1743],[1268,1737],[1275,1737],[1277,1743],[1286,1737],[1291,1737],[1295,1737],[1299,1737],[1300,1737],[1301,1743],[1314,1737],[1315,1737],[1316,1743],[1330,1737],[1331,1737],[1337,1737],[1340,1737],[1343,1737],[1346,1737],[1347,1737],[1348,1743],[1361,1737],[1362,1737],[1363,1743],[1376,1737],[1377,1737],[1378,1743],[1391,1737],[1392,1737],[1393,1737],[1396,1737],[1397,1737],[1398,1743],[1399,1743],[1412,1737],[1413,1737],[1414,1743],[1429,1737],[1430,1737],[1431,1737],[1432,1737],[1433,1737],[1434,1737],[1435,1743],[1452,1737],[1453,1737],[1454,1737],[1455,1737],[1456,1743],[1471,1737],[1472,1737],[1473,1737],[1474,1743],[1488,1737],[1489,1737],[1490,1737],[1499,1737],[1500,1737],[1501,1743],[1502,1743],[1515,1737],[1516,1737],[1517,1743],[1536,1737],[1537,1737],[1538,1737],[1539,1737],[1540,1737],[1545,1737],[1546,1743],[1547,1743],[1548,1737],[1549,1737],[1550,1737],[1551,1737],[1552,1737],[1555,1743],[1563,1737],[1568,1737],[1569,1737],[1570,1743],[1583,1737],[1584,1737],[1585,1743],[1598,1737],[1599,1737],[1600,1743],[1613,1737],[1614,1737],[1615,1737],[1616,1737],[1617,1743],[1630,1737]],"b":[[76,"impl-Debug-for-RelayMap"],[77,"impl-Display-for-RelayMap"],[78,"impl-Debug-for-RelayNode"],[79,"impl-Display-for-RelayNode"],[82,"impl-From%3CRelayUrl%3E-for-RelayMap"],[84,"impl-From%3CRelayNode%3E-for-RelayMap"],[88,"impl-FromIterator%3CRelayUrl%3E-for-RelayMap"],[89,"impl-FromIterator%3CRelayNode%3E-for-RelayMap"],[295,"impl-Debug-for-SendError"],[296,"impl-Display-for-SendError"],[297,"impl-Debug-for-RecvError"],[298,"impl-Display-for-RecvError"],[301,"impl-Display-for-ConnectError"],[302,"impl-Debug-for-ConnectError"],[303,"impl-Debug-for-DialError"],[304,"impl-Display-for-DialError"],[310,"impl-From%3CError%3E-for-SendError"],[311,"impl-From%3CError%3E-for-SendError"],[313,"impl-From%3CSendError%3E-for-RecvError"],[314,"impl-From%3CRecvError%3E-for-RecvError"],[315,"impl-From%3CError%3E-for-RecvError"],[316,"impl-From%3CError%3E-for-RecvError"],[319,"impl-From%3CError%3E-for-ConnectError"],[320,"impl-From%3CDialError%3E-for-ConnectError"],[322,"impl-From%3CSendError%3E-for-ConnectError"],[323,"impl-From%3CDnsError%3E-for-DialError"],[324,"impl-From%3CElapsed%3E-for-DialError"],[325,"impl-From%3CError%3E-for-DialError"],[602,"impl-Debug-for-DnsError"],[603,"impl-Display-for-DnsError"],[604,"impl-Debug-for-StaggeredError%3CE%3E"],[605,"impl-Display-for-StaggeredError%3CE%3E"],[608,"impl-Debug-for-TXT"],[609,"impl-Display-for-TXT"],[610,"impl-From%3CElapsed%3E-for-DnsError"],[612,"impl-From%3CResolveError%3E-for-DnsError"],[869,"impl-Display-for-EncodingError"],[870,"impl-Debug-for-EncodingError"],[871,"impl-Display-for-DecodingError"],[872,"impl-Debug-for-DecodingError"],[874,"impl-Debug-for-UserData"],[875,"impl-Display-for-UserData"],[876,"impl-Display-for-MaxLengthExceededError"],[877,"impl-Debug-for-MaxLengthExceededError"],[879,"impl-Debug-for-LookupError"],[880,"impl-Display-for-LookupError"],[881,"impl-Debug-for-ParseError"],[882,"impl-Display-for-ParseError"],[1102,"impl-Display-for-FrameType"],[1103,"impl-Debug-for-FrameType"],[1104,"impl-Debug-for-SendError"],[1105,"impl-Display-for-SendError"],[1106,"impl-Display-for-RecvError"],[1107,"impl-Debug-for-RecvError"],[1110,"impl-From%3CSendError%3E-for-SendError"],[1112,"impl-From%3CError%3E-for-SendError"],[1113,"impl-From%3CElapsed%3E-for-SendError"],[1114,"impl-From%3CError%3E-for-SendError"],[1115,"impl-From%3CError%3E-for-RecvError"],[1116,"impl-From%3CError%3E-for-RecvError"],[1117,"impl-From%3CElapsed%3E-for-RecvError"],[1118,"impl-From%3CError%3E-for-RecvError"],[1218,"impl-Debug-for-Error"],[1219,"impl-Display-for-Error"],[1221,"impl-From%3CRecvError%3E-for-Error"],[1222,"impl-From%3CConnectionError%3E-for-Error"],[1223,"impl-From%3CConnectError%3E-for-Error"],[1467,"impl-Debug-for-SpawnError"],[1468,"impl-Display-for-SpawnError"],[1469,"impl-Display-for-SupervisorError"],[1470,"impl-Debug-for-SupervisorError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAC0FagABAAAABgAKABIAGAAsAAEAMAAJADsAAwBAABEAVQABAFoAAABdAAMAawABAHIAAQB2ABAAiQADAJIAAACUAAIAmAAHAKEAAACnAAYAsQAAALYACQDBAEMABgEvADcBAQA6AQMAQAEBAEMBAwBMAQ0AagEHAHQBCwCBAWkA8AEaABICAQAWAgIAGwIAAB0CEgAxAjIAZQIAAGgCAQBsAgYAeAIAAIYCAACIAhEAmwIJAKYCDwC7AhEAzgIAANECAwDWAgUA3QIGAOkCBADvAgMA9AIfABUDIgA5AxcAUgMhAHUDAAB4AwAAewMAAH4DAACCAwAAhQMNAJ8DAACjAwQAqQMCAK0DBQC1AxgAzwMHAN0DKQAMBAEAEAQEACAEBQAnBC4AVwQAAFkEBgBhBAUAagQ3AKMEAQCpBBEAvAQMAMsEAgDRBBMA5wQAAOkEAQDwBAAA8wQAAPYEAgD6BAAABAUAAAYFAwAOBQQAFAUdADUFAQA6BTUAcQUkAJoFJQDQBQAA0gUBANoFBADgBQsAAQYBAAwGAAAWBgEAHAYxAFAGDgBiBh0A","P":[[8,"T"],[17,""],[20,"T"],[23,""],[28,"K"],[30,"T"],[42,""],[47,"T"],[55,"__D"],[58,""],[66,"K"],[75,""],[81,"T"],[82,""],[83,"T"],[84,""],[86,"T"],[90,""],[96,"U"],[100,""],[113,"__S"],[116,""],[117,"T"],[120,""],[122,"U,T"],[126,"U"],[130,""],[136,"V"],[189,""],[191,"S"],[192,""],[200,"T"],[220,""],[226,"T"],[228,""],[230,"T"],[260,""],[261,"T"],[281,""],[309,"T"],[310,""],[312,"T"],[313,""],[317,"T"],[319,""],[321,"T"],[322,""],[326,"T"],[331,""],[346,"U"],[356,""],[360,""],[361,"Sink::Error"],[365,"Stream::Item"],[367,"Sink::Error"],[369,""],[371,"D,C,MW,Item,S"],[375,"D,C,MW,S"],[379,""],[384,"Sink::Error"],[386,"T"],[388,""],[392,"U,T"],[402,"U"],[412,"S"],[414,""],[424,"V"],[434,""],[546,"E"],[547,"T"],[557,""],[558,"E"],[559,""],[563,"T"],[566,""],[569,"T"],[584,""],[585,"T"],[595,""],[596,"E"],[597,""],[604,"E"],[606,""],[611,"T"],[612,""],[613,"T"],[615,""],[617,"T"],[619,""],[626,"U"],[631,"IntoIterator::IntoIter"],[632,""],[638,""],[642,""],[643,""],[648,"E"],[649,"T"],[652,""],[655,"U,T"],[660,"U"],[665,""],[671,"V"],[676,""],[699,"T"],[701,""],[702,"T"],[703,""],[704,"T"],[707,""],[708,"T"],[710,""],[712,"K"],[715,""],[716,"T"],[717,""],[718,"U"],[719,""],[720,"T"],[721,"U,T"],[722,"U"],[723,""],[725,"V"],[731,""],[754,""],[755,""],[766,"T"],[782,""],[791,"T"],[794,""],[798,"K"],[799,"T"],[823,""],[825,"T"],[831,"Deref::Target"],[832,"T"],[839,"Deref::Target"],[840,"T"],[843,""],[860,"K"],[869,""],[883,"T"],[884,""],[885,"T"],[887,""],[888,"T"],[890,""],[891,"T"],[893,""],[894,"T"],[895,""],[897,"FromStr::Err"],[898,""],[900,"__H"],[901,""],[914,"U"],[922,""],[936,"T"],[939,""],[948,"U,T"],[952,"TryFrom::Error"],[953,"U,T"],[957,"U"],[965,""],[974,"V"],[982,""],[1067,"T"],[1073,""],[1076,"T"],[1077,""],[1078,"T"],[1093,""],[1099,"K"],[1102,""],[1109,"T"],[1110,""],[1111,"T"],[1112,""],[1119,"T"],[1120,"FromPrimitive::Primitive"],[1121,""],[1126,"U"],[1129,""],[1131,"T"],[1132,""],[1135,"U,T"],[1138,"U"],[1141,""],[1144,"V"],[1147,""],[1196,"T"],[1200,""],[1202,"T"],[1203,""],[1204,"T"],[1210,""],[1211,"T"],[1215,""],[1224,"T"],[1226,""],[1229,"U"],[1231,""],[1233,"T"],[1234,""],[1235,"U,T"],[1237,"U"],[1239,""],[1241,"V"],[1243,""],[1299,"T"],[1329,""],[1340,"T"],[1343,""],[1346,"T"],[1391,""],[1394,"EC,EA"],[1395,""],[1396,"T"],[1398,"Loader,Deref::Target"],[1399,"T"],[1427,""],[1449,"K"],[1452,""],[1456,"Loader"],[1457,"EC,EA"],[1459,""],[1462,"EC,EA"],[1463,""],[1465,"EC,EA"],[1466,""],[1472,"T"],[1487,""],[1502,"Loader"],[1503,""],[1515,"U"],[1530,""],[1546,"Loader"],[1548,""],[1555,"Loader"],[1556,""],[1559,"EC,EA"],[1560,""],[1563,"T"],[1566,""],[1568,"U,T"],[1583,"U"],[1598,""],[1615,"V"],[1630,""]]}]]')); -if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; -else if (window.initSearch) window.initSearch(searchIndex); -//{"start":39,"fragment_lengths":[446,111386,11257,6900,11823,44382]} \ No newline at end of file diff --git a/pr/3367/docs/search.desc/bulk/bulk-desc-0-.js b/pr/3367/docs/search.desc/bulk/bulk-desc-0-.js deleted file mode 100644 index baa20fff49..0000000000 --- a/pr/3367/docs/search.desc/bulk/bulk-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("bulk", 0, "") \ No newline at end of file diff --git a/pr/3367/docs/search.desc/iroh/iroh-desc-0-.js b/pr/3367/docs/search.desc/iroh/iroh-desc-0-.js deleted file mode 100644 index c750932465..0000000000 --- a/pr/3367/docs/search.desc/iroh/iroh-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("iroh", 0, "Peer-to-peer QUIC connections.\nError when decoding.\nThe encoded information had the wrong length.\nError when decoding the public key.\nError when deserialising a PublicKey or a SecretKey.\nThe length of an ed25519 PublicKey, in bytes.\nNetwork-level addressing information for an iroh node.\nThe identifier for a node in the (iroh) network.\nA public key.\nRelays over the custom relaying protocol with a custom …\nConfiguration of all the relay servers that can be used.\nInformation on a specific relay server.\nThe HTTP upgrade protocol used for relaying.\nA URL identifying a relay server.\nCan occur when parsing a string into a RelayUrl.\nA secret key.\nThe type of value that can change.\nA handle to a value that’s represented by one or more …\nRelays over websockets.\nGet this public key as a byte array.\nIs this a known node?\nDefault values used in iroh\nReturns the direct addresses of this peer.\nSocket addresses where the peer might be reached directly.\nNode address discovery.\nThis module exports a DNS resolver, which is also the …\nCreate an empty relay map.\nThe Endpoint allows establishing connections to other iroh …\nConvert to a hex string limited to the first 5 bytes for a …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the addressing info from given ticket.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a RelayMap from a RelayUrl.\nReturns the argument unchanged.\nConstruct a PublicKey from a slice of bytes.\nCreate a secret key from its byte representation.\nCreates a RelayMap from an iterator of RelayUrl.\nCreates a new NodeAddr from its parts.\nGenerate a new SecretKey with a randomness generator.\nReturns the current state of the underlying value, or …\nGet the given node.\nReturns a future completing once the value is set to Some …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true, if only a NodeId is present.\nAre there any nodes in this map?\nHow many nodes are known?\nMaps this watcher with a function that transforms the …\nCo-locating all of the iroh metrics structs\nChecks the network conditions from the current host.\nCreates a new NodeAddr with no relay_url and no …\nThe node’s identifier.\nSupport for handling DNS resource records for dialing by …\nReturns an Iterator over all known nodes.\nReturns a watcher that updates every time this or the …\nTries to match the value of an HTTP upgrade header to …\nPolls for the next value, or returns Disconnected if one …\nTools for spawning an accept loop that routes incoming …\nReturns the VerifyingKey for this PublicKey.\nThe public key of this SecretKey.\nConfiguration to speak to the QUIC endpoint on the relay …\nReturns the relay url of this peer.\nThe node’s home relay url.\nReturns the SigningKey for this SecretKey.\nSign the given message and return a digital signature\nReturns a stream which will yield the most recent values …\nReturns a stream which will yield the most recent values …\nInternal utilities to support testing.\nConvert this to the bytes representing the secret part. …\nReturns a future completing with Ok(value) once a new …\nThe HTTP upgrade header used or expected.\nThe RelayUrl where this relay server can be dialed.\nReturns the sorted relay URLs.\nVerify a signature on a message with this secret key’s …\nAdds the given direct addresses.\nAdds a relay url.\nThe default HTTPS port used by the Relay server.\nThe default HTTP port used by the Relay server.\nThe default metrics port used by the Relay server.\nThe default QUIC port used by the Relay server to accept …\nProduction configuration.\nStaging configuration.\nHostname of the default Asia-Pacific relay.\nHostname of the default EU relay.\nHostname of the default NA relay.\nGet the default RelayNode for Asia-Pacific\nGet the default RelayNode for EU.\nGet the default RelayNode for NA.\nGet the default RelayMap.\nHostname of the default EU relay.\nHostname of the default NA relay.\nGet the default RelayNode for EU.\nGet the default RelayNode for NA.\nGet the default RelayMap.\nA discovery service that combines multiple discovery …\nNode discovery for super::Endpoint.\nContext about the Endpoint for discovery services.\nDiscovery errors\nNode discovery results from Discovery services.\nTrait for structs that can be converted into Discovery.\nIntoDiscovery errors\nError returned when a discovery watch stream lagged too …\nThe max byte length allowed for user-defined data.\nData about a node that may be published to and resolved …\nInformation about a node that may be published to and …\nUnder the hood this is a UTF-8 String is no longer than …\nAdds a Discovery service.\nAdds direct addresses to the node data.\nRemoves all direct addresses from the node data.\nThe information published about the node.\nReturns the direct addresses of the node.\nDNS node discovery for iroh\nReturns the DnsResolver used by the endpoint.\nCreates an empty ConcurrentDiscovery.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a new user error from an arbitrary error type.\nCreates a new user error from an arbitrary error type.\nCreates a new user error from an arbitrary boxed error …\nCreates a new user error from an arbitrary boxed error …\nCreates a new NodeInfo from its parts.\nParses a NodeInfo from a pkarr::SignedPacket.\nCreates a new ConcurrentDiscovery.\nParses a NodeInfo from a TXT records lookup.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nTurns this discovery builder into a ready-to-use discovery …\nConverts into a NodeAddr without cloning.\nConverts into a NodeAddr without cloning.\nReturns the optional timestamp when this node info was …\nA discovery service that uses an mdns-like service to …\nCreates a new NodeData with a relay URL and a set of …\nCreates a new NodeInfo with an empty NodeData.\nCreates a new DiscoveryItem from a NodeInfo.\nReturns the NodeId of the endpoint.\nReturns the node id of the discovered node.\nThe NodeId of the node this is about.\nReturns the NodeInfo for the discovered node.\nA discovery service which publishes and resolves node …\nReturns the provenance of this discovery item.\nPublishes the given NodeData to the discovery mechanism.\nReturns the relay URL of the node.\nResolves the DiscoveryItem for the given NodeId.\nReturns the SecretKey of the endpoint.\nSets the relay URL of the node data.\nSets the user-defined data of the node data.\nA static node discovery to manually add node addressing …\nSubscribe to all addresses that get passively discovered.\nConverts into a NodeAddr by cloning the needed fields.\nConverts into a NodeAddr by cloning the needed fields.\nCreates a pkarr::SignedPacket.\nConverts into a list of {key}={value} strings.\nReturns the optional user-defined data of the node.\nReturns any user-defined data.\nThe number of skipped messages\nSets the direct addresses and returns the updated node …\nSets the direct addresses and returns the updated node …\nSets the relay URL and returns the updated node data.\nSets the relay URL and returns the updated node info.\nSets the user-defined data and returns the updated node …\nSets the user-defined data and returns the updated node …\nDNS node discovery\nBuilder for DnsDiscovery.\nThe n0 testing DNS node origin, for production.\nThe n0 testing DNS node origin, for testing.\nBuilds a DnsDiscovery with the passed DnsResolver.\nCreates a DnsDiscoveryBuilder that implements IntoDiscovery…\nSets the DNS resolver to use.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreates a new DNS discovery using the iroh.link domain.\nDiscovery using swarm-discovery, a variation on mdns\nBuilder for MdnsDiscovery.\nName of this discovery service.\nReturns a MdnsDiscoveryBuilder that implements …\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreate a new MdnsDiscovery Service.\nDefault TTL for the records in the pkarr signed packet.\nInterval in which to republish the node info even if …\nThe production pkarr relay run by number 0.\nThe testing pkarr relay run by number 0.\nPublisher of node discovery information to a pkarr relay.\nBuilder for PkarrPublisher.\nA pkarr client to publish pkarr::SignedPackets to a pkarr …\nResolver of node discovery information from a pkarr relay.\nBuilder for PkarrResolver.\nBuilds the PkarrPublisher with the passed secret key for …\nCreates a PkarrResolver from this builder.\nReturns a PkarrPublisherBuilder that publishes node info …\nCreates a new resolver builder using the pkarr relay …\nPkarr based node discovery for iroh, supporting both relay …\nSets the DNS resolver to use for resolving the pkarr relay …\nSets the DNS resolver to use for resolving the pkarr relay …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCreates a pkarr publisher which uses the number 0 pkarr …\nCreates a pkarr resolver builder which uses the number 0 …\nCreates a new client.\nPublishes a SignedPacket.\nSets the interval after which packets are republished even …\nResolves a SignedPacket for the given NodeId.\nSets the TTL (time-to-live) for published packets.\nPublishes the addressing information about this node to a …\nCreates a new client while passing a DNS resolver to use.\nBuilder for DhtDiscovery.\nPkarr Mainline DHT and relay server node discovery.\nBuilds the discovery mechanism.\nCreates a new builder for DhtDiscovery.\nExplicitly sets the pkarr client to use.\nSets whether to publish to the Mainline DHT.\nReturns the argument unchanged.\nReturns the argument unchanged.\nSets whether to include the direct addresses in the DNS …\nSets the initial delay before the first publish.\nCalls U::from(self).\nCalls U::from(self).\nUses the default number 0 pkarr relay URL.\nDisables publishing even if a secret key is set.\nSets the pkarr relay URL to use.\nSets the republish delay for the DHT.\nSets the secret key to use for signing the DNS packets.\nSets the time-to-live value for the DNS packets.\nThe provenance string for this discovery implementation.\nA static node discovery to manually add node addressing …\nAugments node addressing information for the given node ID.\nReturns the argument unchanged.\nCreates a static discovery instance from node addresses.\nReturns node addressing information for the given node ID.\nCalls U::from(self).\nCreates a new static discovery instance.\nRemoves all node addressing information for the given node …\nSets node addressing information for the given node ID.\nThe DNS resolver used throughout iroh.\nThe n0 testing DNS node origin, for production.\nThe n0 testing DNS node origin, for testing.\nRemoves all entries from the cache.\nReturns the argument unchanged.\nCalls U::from(self).\nPerform an ipv4 lookup with a timeout.\nResolve IPv4 and IPv6 in parallel with a timeout.\nRace an ipv4 and ipv6 lookup with a timeout in a staggered …\nPerform an ipv4 lookup with a timeout in a staggered …\nPerform an ipv6 lookup with a timeout.\nPerform an ipv6 lookup with a timeout in a staggered …\nLooks up node info by DNS name.\nLooks up node info by DNS name in a staggered fashion.\nLooks up node info by NodeId and origin domain name.\nLooks up node info by NodeId and origin domain name.\nLookup a TXT record.\nCreate a new DNS resolver with sensible cross-platform …\nRecreate the inner resolver\nResolve a hostname from a URL to an IP address.\nCreate a new DNS resolver configured with a single UDP DNS …\nthe endpoint has reached the confidentiality or integrity …\nthe application or application protocol caused the …\nFuture produced by Endpoint::accept.\nFuture produced by Connection::accept_bi\nFuture produced by Connection::accept_uni\nParameters for controlling the peer’s acknowledgement …\nA key for sealing data with AEAD-based algorithms\nUses all available paths\nApplication layer added the address directly.\nReason given by an application for closing the connection\nThe peer closed the connection\nBuilder for Endpoint.\nthe number of connection IDs provided by the peer exceeds …\nthe server refused to accept a new connection\nreceived more data in CRYPTO frames than can be buffered\nWe received a CallMeMaybe.\nA chunk of data from the receive stream\nThe connection could not be created because not enough of …\nError indicating that a stream has not been opened or has …\nThe stream has already been stopped, finished, or reset\nThe stream has already been finished or reset\nOptions for the Endpoint::connect_with_opts function.\nIn-progress connection attempt future\nA QUIC connection.\nReason given by the transport for closing the connection\nThe peer’s QUIC stack aborted the connection …\nReasons why a connection might be lost\nThe connection was lost\nThe connection was lost\nThe connection was lost\nThe connection was lost\nThe connection was lost\nConnection statistics\nThe type of connection we have to the endpoint.\nThe type of control message we have received.\nCommon interface for different congestion controllers\nConstructs controllers on demand\nGeneric crypto errors\nServer-side configuration for the crypto protocol\nUse a custom relay map.\nUse the default relay map, with production relay servers …\nDirect UDP connection\nA direct address on which an iroh-node might be …\nInformation about a direct address.\nThe type of direct address.\nDatagram support is disabled locally\nDisable relay servers completely.\nThe address was discovered by a discovery service.\nEnvironment variable to force the use of staging relays.\nControls an iroh node, establishing connections with other …\nError returned by Session::export_keying_material.\nreceived a STREAM frame or a RESET_STREAM frame containing …\nreceived more data than permitted in advertised data limits\nreceived a frame that was badly formatted\nThe stream finished before all bytes were read\nNumber of frames transmitted of each frame type\nA pseudo random key for HKDF\nthe endpoint encountered an internal error and cannot …\nreceived an invalid Retry Token in a client Initial\nAttempted an ordered read following an unordered read\nAn incoming connection for which the server has not yet …\nAdaptor to let Incoming be awaited like a Connecting.\nkey update error\nA locally bound socket address.\nThe local application closed the connection\nThe largest representable value\nThe largest encoded value length\nBoth a UDP and a relay connection are used.\nParameters governing MTU discovery.\nthe connection is being closed abruptly in the absence of …\nno viable network path exists\nApplication layer with a specific name added the node …\nWe have no verified connection to this PublicKey\nFuture produced by Connection::open_bi\nFuture produced by Connection::open_uni\ndetected an error with protocol compliance that was not …\nDefines the mode of path selection for all traffic flowing …\nStatistics related to a transmission path\nWe received a Ping from the node.\nWe received a Pong from the node.\nAn address assigned by the router using port mapping.\nPublic internet address discovered via QAD.\nHard NAT: QAD’ed IPv4 address + local fixed port.\nAn error occurred during reading\nFuture produced by Connection::read_datagram\nErrors that arise from reading from a stream.\nA read error occurred\nErrors that arise from reading from a stream.\nErrors from RecvStream::read_to_end\nA stream that can only be used to receive data\nRelay connection over relay\nA node communicated with us first via relay.\nConfiguration of the relay servers for an Endpoint.\nForces all traffic to go exclusively through relays\nDetails about a remote iroh node which is known to this …\nThe peer abandoned transmitting data on this stream\nThe peer is unable to continue processing this connection, …\nErrors that arise while waiting for a stream to be reset\nError for attempting to retry an Incoming which already …\nreceived a frame for a stream identifier that exceeded …\nreceived a frame for a stream that was not in a state that …\nAddress was loaded from the fs.\nErrors that can arise when sending a datagram\nA stream that can only be used to send data\nParameters governing incoming connections\nThe origin or source through which an address associated …\nUse the staging relay servers from n0.\nThe peer is no longer accepting data on this stream\nErrors that arise while monitoring for a send stream stop …\nIdentifier for a stream within a particular connection\nreceived transport parameters that were badly formatted, …\nCommunication with the peer has lapsed for longer than the …\nThe datagram is larger than the connection can currently …\nThe stream is larger than the user-supplied limit\nParameters governing the core QUIC state machine\nTransport-level errors occur when a peer violates the …\nThe peer violated the QUIC specification as understood by …\nTransport-level error code\nA node communicated with us first via UDP.\nStatistics about UDP datagrams transmitted or received on …\nNot yet determined..\nThe peer does not support receiving datagram frames\nError indicating that the specified QUIC version is not …\nAn integer less than 2^62\nThe peer doesn’t implement any supported version\nA handle to some connection internals, use with care.\nErrors that arise from writing to a stream\nIndicates how many bytes and chunks had been transferred …\nFuture that completes when a connection is fully …\nThis was a 0-RTT stream and the server rejected it\nThis was a 0-RTT stream and the server rejected it\nThis was a 0-RTT stream and the server rejected it\nThis was a 0-RTT stream and the server rejected it\nAccepts an incoming connection on the endpoint.\nAttempts to accept this incoming connection (an error may …\nAccept the next incoming bidirectional stream.\nAccepts the next incoming uni-directional stream.\nAccepts this incoming connection using a custom …\nThe ack-eliciting threshold we will request the peer to use\nSpecifies the ACK frequency config (see AckFrequencyConfig …\nAdds a discovery mechanism for this endpoint.\nInforms this Endpoint about addresses of the iroh node.\nInforms this Endpoint about addresses of the iroh node, …\nThe UDP address reported by the remote node.\nThe address.\nThe addresses at which this node might be reachable.\nDerive AEAD using hkdf\nWhether the implementation is permitted to set the spin …\nExtracts the ALPN protocol from the peer’s handshake …\nExtracts the ALPN protocol from the peer’s handshake …\nSets the ALPN protocols that this endpoint will accept on …\nBinds the magic endpoint.\nSets the IPv4 bind address.\nSets the IPv6 bind address.\nSpecifies the amount of time that MTU discovery should …\nThe number of times a black hole was detected in the path\nReturns the local socket addresses on which the underlying …\nConstruct a fresh Controller\nReturns the builder for an Endpoint, with a production …\nThe contents of the chunk\nThe total amount of bytes which have been transferred …\nThe amount of bytes which had been written\nThe amount of full chunks which had been written\nRemoves all discovery services from the builder.\nDuplicate the controller’s state\nCloses the QUIC endpoint and the magic socket.\nCloses the connection immediately.\nIf the connection is closed, the reason why.\nWait for the connection to be closed for any reason.\nType of error\nHow to construct new congestion::Controllers\nCongestion events on the connection\nCurrent state of the congestion control algorithm, for …\nReturns a Watcher that reports the current connection type …\nThe type of connection we have to the node, either direct …\nConnects to a remote Endpoint.\nStarts a connection attempt with a remote Endpoint.\nCreate QUIC error code from TLS alert code\nTLS configuration used for incoming connections\nMaximum quantity of out-of-order crypto layer data to …\nLargest UDP payload size the path currently supports\nCurrent congestion window of the connection\nMaximum number of incoming application datagram bytes to …\nMaximum number of outgoing application datagram bytes to …\nBytes available in the outgoing datagram buffer.\nThe amount of UDP datagrams observed\nReturns the default relay mode.\nWhich directions data flows in\nReturns a Watcher for the direct addresses of this Endpoint…\nOptionally sets a discovery mechanism for this endpoint.\nReturns the discovery mechanism, if configured.\nConfigures the endpoint to also use the mainline DHT with …\nConfigures the endpoint to also use local network …\nConfigures the endpoint to use the default n0 DNS …\nReturns a stream of all remote nodes discovered through …\nOptionally sets a custom DNS resolver to use for this …\nReturns the DNS resolver used in this Endpoint.\nWhether to use “Generic Segmentation Offload” to …\nClass of error as encoded in the specification\nApplication-specific reason code\nDerives keying material from this connection’s TLS …\nNotify the peer that no more data will ever be written to …\nReturns true if the use of staging relays is forced.\nFrame type that triggered the error\nStatistics about frames received on a connection\nStatistics about frames transmitted on a connection\nType of frame that caused the close\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nConstruct a VarInt infallibly\nSucceeds iff x < 2^62\nCreate a VarInt without ensuring it’s in range\nParameters negotiated during the handshake\nParameters negotiated during the handshake.\nWhether there is a possible known network path to the …\nReturns a Watcher for the RelayUrl of the Relay server …\nGet the identity of this stream\nGet the identity of this stream\nIgnores this incoming connection attempt, not sending any …\nMaximum number of received bytes to buffer for each …\nMaximum number of received bytes to buffer for all Incoming\nDistinguishes streams of the same initiator and …\nCreate the initial set of keys given the client’s …\nThe initial value to be used as the maximum UDP payload …\nThe RTT used before an RTT sample is taken\nInitial congestion window\nWhich side of a connection initiated the stream\nSkip verification of SSL certificates from relay servers\nSpecifies the time to wait after completing MTU discovery …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConverts this Connecting into a 0-RTT or 0.5-RTT …\nReturns Self for use in down-casting to extract …\nGet the Incoming\nExtract the integer value\nThe amount of I/O operations executed\nCheck if this stream has been opened during 0-RTT.\nReturns true if the Connection associated with this handle …\nCheck if this endpoint is still alive, or already closed.\nPeriod of inactivity before sending a keep-alive packet\nEnables saving the TLS pre-master key for connections.\nOptionally set a list of known nodes.\nElapsed time since this network path was known to exist.\nLast control message received by this node about this …\nElapsed time since the last payload message was received …\nGet the duration since the last activity we received from …\nTime elapsed time since last we have sent to or received …\nThe latency to the remote node over this network path.\nThe latency of the current network path to the remote node.\nReturns the local IP address which was used when the peer …\nThe amount of bytes lost on this path\nThe amount of packets lost on this path\nThe amount of PLPMTUD probe packets lost on this path …\nThe max_ack_delay we will request the peer to use\nMaximum number of incoming bidirectional streams that may …\nVariant of max_concurrent_bidi_streams affecting …\nComputes the maximum size of datagrams that may be passed …\nMaximum duration of inactivity to accept before timing out …\nMaximum number of Incoming to allow to exist at a time\nReturns metrics collected for this endpoint.\nWhether to allow clients to migrate to new addresses\nThe maximum UDP payload size guaranteed to be supported by …\nSpecifies the minimum MTU change to stop the MTU discovery …\nSpecifies the MTU discovery config (see MtuDiscoveryConfig …\nNotifies the system of potential network changes.\nResets path-specific state.\nCreate a default config with a particular handshake token …\nCreate a new StreamId\nInitializes new connection options.\nReturns a Watcher for the current NodeAddr for this …\nReturns the node id of this endpoint.\nThe globally unique identifier for this node.\nThe offset in the stream\nPacket deliveries were confirmed\nPackets were deemed lost or marked congested\nPackets are acked in batches, all with the same now …\nThe known MTU for the current network path has been updated\nOne or more packets were just sent\nMethod for opening a sealed message data\nInitiates a new outgoing bidirectional stream.\nInitiates a new outgoing unidirectional stream.\nMaximum reordering in packet number space before FACK …\nStatistics related to the current transmission path\nThis implies we only use the relay to communicate and do …\nCryptographic identity of the peer.\nNumber of consecutive PTOs after which network is …\nAttempts to read from the stream into buf.\nAttempt to write bytes from buf into the stream.\nThe preferred IPv4 address that will be communicated to …\nThe preferred IPv6 address that will be communicated to …\nGet the priority of the send stream\nSets the proxy url from the environment, in this order:\nSets an explicit proxy url to proxy all HTTP(S) traffic …\nRead data contiguously from the stream.\nRead the next segment of data\nRead the next segments of data\nReceives an application datagram.\nRead an exact number of bytes contiguously from the stream.\nConvenience method to read all remaining data into a buffer\nHuman-readable reason for the close\nHuman-readable reason for the close\nHuman-readable explanation of the reason\nWhether to receive observed address reports from other …\nMaximum number of bytes the peer may transmit across all …\nCompletes when the stream has been reset by the peer or …\nRejects this incoming connection attempt.\nSets the protocol to use for relay connections.\nReturns the relay map for this mode.\nSets the relay servers to assist in establishing …\nRelay server information, if available.\nReturns the peer’s UDP address.\nWhether the socket address that is initiating this …\nReturns information about the remote node identified by a …\nReturns information about all the remote nodes this …\nReturns the NodeId from the peer’s TLS certificate.\nThe reordering threshold we will request the peer to use\nClose the send stream immediately.\nResponds with a retry packet.\nGenerate the integrity tag for a retry packet\nDuration after a retry token was issued for which it’s …\nCurrent best estimate of this connection’s latency …\nCurrent best estimate of this connection’s latency …\nSaturating integer addition. Computes self + rhs, …\nMethod for sealing message data\nSets a secret key to authenticate with other peers.\nReturns the secret_key of this endpoint.\nTransmits data as an unreliable, unordered application …\nWhether to implement fair queuing for send streams having …\nWhether to send observed address reports to peers.\nMaximum number of bytes to transmit to a peer without …\nThe amount of packets sent on this path\nThe amount of PLPMTUD probe packets sent on this path …\nSets the list of accepted ALPN protocols.\nModifies the number of bidirectional streams that may be …\nModifies the number of unidirectional streams that may be …\nSet the priority of the send stream\nSee quinn_proto::TransportConfig::receive_window.\nSets the initial user-defined data to be published in …\nReturns a deduplicated list of Sources merged from all …\nA HashMap of Sources to Durations.\nA stable identifier for this connection.\nStart a server session with this configuration\nReturns connection statistics.\nStop accepting data\nCompletes when the peer stops the stream or reads the …\nMaximum number of bytes the peer may transmit without …\nObject to get current SystemTime\nMaximum reordering in time space before time based loss …\nPrivate key used to authenticate data included in …\nTransport configuration to use for incoming connections\nSet a custom TransportConfig\nSets a custom quinn::TransportConfig for this endpoint.\nSucceeds iff x < 2^62\nSucceeds iff x < 2^62\nSucceeds iff x < 2^62\nThe origin of this direct address.\nStatistics about UDP datagrams received on a connection\nStatistics about UDP datagrams transmitted on a connection\nSpecifies the upper bound to the max UDP payload size that …\nSets the initial user-defined data to be published in …\nConfiguration for sending and handling validation tokens\nSet a custom ValidationTokenConfig\nNumber of ack-eliciting bytes that may be in flight\nSets ALPN identifiers that should be signaled as supported …\nCreate a server config with the given crypto::ServerConfig\nCreate a server config with the given certificate chain to …\nSets the QUIC transport config options for this connection.\nWrite bytes to the stream\nConvenience method to write an entire buffer to the stream\nConvenience method to write an entire list of chunks to …\nConvenience method to write a single chunk in its entirety …\nWrite chunks to the stream\nThe name of the discovery service that discovered the …\nThe name of the application that added the node\nMetrics collected by an crate::endpoint::Endpoint.\nEnum of metrics for the module\nEnum of metrics for the module\nMetrics tracked for the relay server\nNumber of times this server has accepted a connection.\nBytes received from a FrameType::SendPacket\nBytes sent from a FrameType::SendPacket\nNumber of connections with a successful handshake that …\nNumber of connections with a successful handshake.\nNumber of client connections which have had any frames …\nFrameType::SendPacket dropped that are disco messages\nFrameType::SendPacket received that are disco messages\nFrameType::SendPacket sent that are disco messages\nNumber of connections we have removed because of an error\nNumber of times the external address obtained via port …\nNumber of frames received from client connection which …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nNumber of FrameType::Pings received\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nNumber of updates to the local port.\nMetrics collected by the endpoint’s socket.\nNumber of mapping tasks started.\nNumber of failed mapping tasks.\nMetrics collected by net reports.\nNumber of nodes we have attempted to contact.\nNumber of nodes we have managed to contact directly.\nThe number of direct connections we have made to peers.\nThe number of direct connections we have lost to peers.\nThe number of connections to peers we have added over …\nThe number of connections to peers we have removed over …\nPackets of other FrameTypes dropped\nPackets of other FrameTypes received\nPackets of other FrameTypes sent\nNumber of PCP probes that found it available.\nNumber of PCP probes executed.\nMetrics collected by the portmapper service.\nNumber of probing tasks started.\nNumber of QUIC datagrams received.\nNumber of datagrams received using GRO\nNumber of accepted ‘iroh derp http’ connection upgrades\nFrameType::SendPacket dropped, that are not disco messages\nFrameType::SendPacket received, that are not disco messages\nFrameType::SendPacket sent, that are not disco messages\nNumber of FrameType::Pongs sent\nNumber of unique client keys per day\nNumber of FrameType::Unknown received\nNumber of UPnP probes that found it available.\nNumber of UPnP probes that resulted in a gateway different …\nNumber of UPnP probes executed.\nNumber of failed Upnp probes.\nNumber of accepted websocket connections\nHTTPS\nEnum of metrics for the module\nOptions for running probes\nThe protocol used to time a node’s latency.\nQUIC Address Discovery Ipv4\nQUIC Address Discovery Ipv6\nPieces needed to do QUIC address discovery.\nLatencies per relay node.\nA net_report report.\nTurn the options into set of valid protocols\nCaptivePortal is set when we think there’s a captive …\nA client config.\nCreate an Options that disables all probes\nA QUIC Endpoint\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nip:port of global IPv4\n[ip]:port of global IPv6\nDo we have any indication that UDP is working?\nEnable or disable https probe\nSkip cert verification\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nEnable ipv4 QUIC address discovery probes\nEnable ipv6 QUIC address discovery probes\nReturns an iterator over all the relays and their …\nWhether the reported public address differs when probing …\nWhether the reported public address differs when probing …\nWhether the reported public address differs when probing …\nProbe indicating the presence of port mapping protocols on …\nEnable quic probes\nkeyed by relay Url\nNumber of reports executed by net_report, including full …\nNumber of full reports executed by net_report\nA QAD IPv4 round trip completed.\nA QAD IPv6 round trip completed.\nThe DNS name for the iroh TXT record.\nError returned when an input value is too long for UserData…\nData about a node that may be published to and resolved …\nExtension methods for NodeId to encode to and decode from …\nInformation about a node that may be published to and …\nUnder the hood this is a UTF-8 String is no longer than …\nThe information published about the node.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nParses a NodeId from [z-base-32] encoding.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nThe NodeId of the node this is about.\nEncodes a NodeId in [z-base-32] encoding.\nWraps an existing protocol, limiting its access, based on …\nA dyn-compatible version of ProtocolHandler that returns …\nHandler for incoming connections.\nThe built router.\nBuilder for creating a Router for accepting protocols.\nHandle an incoming connection.\nSee ProtocolHandler::accept.\nConfigures the router to accept the ProtocolHandler when …\nCreates a new Router using given Endpoint.\nReturns the Endpoint stored in this router.\nReturns the Endpoint of the node.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a new user error from an arbitrary error type.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nChecks if the router is already shutdown.\nCreates a new router builder using given Endpoint.\nCreate a new AccessLimit.\nOptional interception point to handle the Connecting state.\nSee ProtocolHandler::on_connecting.\nCalled when the router shuts down.\nSee ProtocolHandler::shutdown.\nShuts down the accept loop cleanly.\nSpawns an accept loop and returns a handle to it …\nA drop guard to clean up test infrastructure.\nHandle and drop guard for test DNS and Pkarr servers.\nCreate a ConcurrentDiscovery with DnsDiscovery and …\nCreate a DnsResolver configured to use the test DNS server.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nThe socket address of the DNS server.\nThe node origin domain.\nWait until a Pkarr announce for a node is published to the …\nThe HTTP URL of the Pkarr server.\nRun DNS and Pkarr servers on localhost.\nRuns a relay server with QUIC enabled suitable for tests.\nRuns a relay server.\nRun DNS and Pkarr servers on localhost with the specified …") \ No newline at end of file diff --git a/pr/3367/docs/search.desc/iroh_base/iroh_base-desc-0-.js b/pr/3367/docs/search.desc/iroh_base/iroh_base-desc-0-.js deleted file mode 100644 index 72c8a98446..0000000000 --- a/pr/3367/docs/search.desc/iroh_base/iroh_base-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("iroh_base", 0, "Base types and utilities for Iroh\nSize of an encoded Ed25519 signature in bytes.\nError when decoding.\nThe encoded information had the wrong length.\nError when decoding the public key.\nError when deserialising a PublicKey or a SecretKey.\nThe length of an ed25519 PublicKey, in bytes.\nNetwork-level addressing information for an iroh node.\nThe identifier for a node in the (iroh) network.\nA public key.\nA URL identifying a relay server.\nCan occur when parsing a string into a RelayUrl.\nA secret key.\nEd25519 signature.\nErrors which may occur while processing signatures and …\nGet this public key as a byte array.\nReturns the direct addresses of this peer.\nSocket addresses where the peer might be reached directly.\nConvert to a hex string limited to the first 5 bytes for a …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the addressing info from given ticket.\nReturns the argument unchanged.\nReturns the argument unchanged.\nParse an Ed25519 signature from a byte slice.\nConstruct a PublicKey from a slice of bytes.\nCreate a secret key from its byte representation.\nParse an Ed25519 signature from its R and s components.\nCreates a new NodeAddr from its parts.\nParse an Ed25519 signature from a byte slice.\nGenerate a new SecretKey with a randomness generator.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns true, if only a NodeId is present.\nCreates a new NodeAddr with no relay_url and no …\nThe node’s identifier.\nReturns the VerifyingKey for this PublicKey.\nThe public key of this SecretKey.\nBytes for the R component of a signature.\nReturns the relay url of this peer.\nThe node’s home relay url.\nBytes for the s component of a signature.\nReturns the SigningKey for this SecretKey.\nSign the given message and return a digital signature\nTickets is a serializable object combining information …\nReturn the inner byte array.\nConvert this to the bytes representing the secret part. …\nConvert this signature into a byte vector.\nVerify a signature on a message with this secret key’s …\nAdds the given direct addresses.\nAdds a relay url.\nThis looks like a ticket, but base32 decoding failed.\nString prefix describing the kind of iroh ticket.\nFound a ticket with the wrong prefix, indicating the wrong …\nA token containing information for establishing a …\nAn error deserializing an iroh ticket.\nThis looks like a ticket, but postcard deserialization …\nA ticket is a serializable object combining information …\nVerification of the deserialized bytes failed.\nDeserialize from a string.\nReturns the argument unchanged.\nCreates a ticket from given addressing info.\nReturns the argument unchanged.\nDeserialize from the base32 string representation bytes.\nCalls U::from(self).\nCalls U::from(self).\nCreates a new ticket.\nThe NodeAddr of the provider for this ticket.\nSerialize to string.\nSerialize to bytes used in the base32 string …\nReturn a ParseError variant that indicates verification of …\nReturns a ParseError that indicates the given ticket has …\nThe expected prefix.") \ No newline at end of file diff --git a/pr/3367/docs/search.desc/iroh_bench/iroh_bench-desc-0-.js b/pr/3367/docs/search.desc/iroh_bench/iroh_bench-desc-0-.js deleted file mode 100644 index 004b0d2e13..0000000000 --- a/pr/3367/docs/search.desc/iroh_bench/iroh_bench-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("iroh_bench", 0, "Take the provided endpoint and run the client benchmark\nThe total number of clients which should be created\nNumber of bytes to transmit from server to client\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nStarting guess for maximum UDP payload size\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nThe amount of concurrent streams which should be used\nShow iroh library counter metrics at the end of the …\nWhether to run a local relay and have the server and …\nWhether to use the unordered read API\nShow connection stats the at the end of the benchmark\nThe total number of streams which should be created\nNumber of bytes to transmit from client to server\nCreate and run a client\nCreate a client endpoint and client connection\nTake the provided endpoint and run the server\nCreates a server endpoint which runs on the given runtime\nCreate and run a client\nCreate a client endpoint and client connection\nTake the provided endpoint and run the server\nCreates a server endpoint which runs on the given runtime\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).") \ No newline at end of file diff --git a/pr/3367/docs/search.desc/iroh_dns_server/iroh_dns_server-desc-0-.js b/pr/3367/docs/search.desc/iroh_dns_server/iroh_dns_server-desc-0-.js deleted file mode 100644 index dfa8cc52cb..0000000000 --- a/pr/3367/docs/search.desc/iroh_dns_server/iroh_dns_server-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("iroh_dns_server", 0, "A DNS server and pkarr relay\nA store for pkarr signed packets.\nConfiguration for the server\nImplementation of a DNS name server for iroh node announces\nReturns the argument unchanged.\nGet the latest signed packet for a pubkey.\nHTTP server part of iroh-dns-server\nCreate an in-memory store.\nInsert a signed packet into the cache and the store.\nCalls U::from(self).\nMetrics support for the server\nCreate a new zone store.\nCreate a persistent store\nResolve a DNS query.\nThe main server which combines the DNS and HTTP(S) servers.\nShared state and store for the iroh-dns-server\nConfigure a pkarr client for resolution of packets from …\nConfigure the bootstrap servers for mainline DHT …\nServer configuration\nUse custom bootstrap servers.\nUse the default bootstrap servers.\nThe config for the metrics server.\nThe config for the metrics server.\nThe config for the store.\nOptionally set a custom address to bind to.\nSet custom bootstrap nodes.\nGet the data directory.\nDisable the metrics server.\nSet to true to disable the metrics server.\nConfig for the DNS server.\nSet to true to enable the mainline lookup.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nConfig for the HTTP server\nConfig for the HTTPS server\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nLoad the config from a file.\nConfig for the mainline lookup.\nConfig for the metrics server.\nConfig for pkarr rate limit\nGet the path to the store database file.\nConfig for the zone store.\nDNS server settings\nState for serving DNS\nA DNS server that serves pkarr signed packets.\nA handle to the channel over which the response to a DNS …\nHandle a DNS request\nThe IPv4 or IPv6 address to bind the UDP DNS server. Uses …\nSOA record data for any authoritative DNS records\nDefault time to live for returned DNS records (TXT & SOA)\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nGet the local address of the UDP/TCP socket.\nCreate a DNS server given some settings, a connection to …\nDomain used for serving the _iroh_node.<nodeid>.<origin> …\nThe port to serve a local UDP DNS server at\nA record to set for all origins\nAAAA record to set for all origins\nNS record to set for all origins\nWait for all tasks to complete.\nShutdown the server an wait for all tasks to complete.\nSpawn the server.\nThe mode how SSL certificates should be created.\nDisable rate limit.\nConfig for the HTTP server\nThe HTTP(S) server part of iroh-dns-server\nConfig for the HTTPS server\nACME with LetsEncrypt servers\nCerts are loaded from a the cert_cache path\nConfig for http server rate limit.\nCreate self-signed certificates and store them in the …\nEnable rate limit based on the connection’s peer IP …\nEnable rate limit based on headers commonly used by …\nOptionally set a custom bind address (will use 0.0.0.0 if …\nOptionally set a custom bind address (will use 0.0.0.0 if …\nThe mode of SSL certificate creation\nThe list of domains for which SSL certificates should be …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nGet the bound address of the HTTP socket.\nGet the bound address of the HTTPS socket.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nLetsencrypt contact email address (required if using …\nWhether to use the letsenrypt production servers (only …\nPort to bind to\nPort to bind to\nWait for all tasks to complete.\nShutdown the server and wait for all tasks to complete.\nSpawn the server\nMetrics for iroh-dns-server\nDNS lookup responses which failed\nDNS lookup responses with no answers\nDNS lookup responses with at least one answer\nDNS requests (total)\nDNS requests via HTTPS (DoH)\nDNS requests via UDP\nReturns the argument unchanged.\nNumber of HTTP requests\nTotal duration of all HTTP requests\nNumber of HTTP requests with a non-2xx status code\nNumber of HTTP requests with a 2xx status code\nCalls U::from(self).\nNumber of pkarr relay puts that did not update the state\nNumber of pkarr relay puts that updated the state\nNumber of expired packets\nSigned packets inserted into the store\nSigned packets removed from the store\nNumber of updates to existing packets\nThe iroh-dns server.\nReturns the argument unchanged.\nCalls U::from(self).\nWait for all tasks to complete.\nSpawn the server and run until the Ctrl-C signal is …\nCancel the server tasks and wait for all tasks to complete.\nSpawn the server.\nThe shared app state.\nHandler for DNS requests\nReturns the argument unchanged.\nCalls U::from(self).\nMetrics collector.\nThe pkarr DNS store") \ No newline at end of file diff --git a/pr/3367/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js b/pr/3367/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js deleted file mode 100644 index 6139ee6e8a..0000000000 --- a/pr/3367/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js +++ /dev/null @@ -1 +0,0 @@ -searchState.loadedDescShard("iroh_relay", 0, "Iroh’s relay is a feature within iroh, a peer-to-peer …\nTracks pings on a single relay connection.\nConfiguration of all the relay servers that can be used.\nInformation on a specific relay server.\nConfiguration for speaking to the QUIC endpoint on the …\nExposes Client, which allows to establish connections to a …\nIs this a known node?\nReturns the current timeout set for pings.\nDefault values used in the relay.\nDNS resolver\nCreate an empty relay map.\nReturns the argument unchanged.\nCreates a RelayMap from a RelayUrl.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a RelayMap from an iterator of RelayUrl.\nGet the given node.\nHTTP-specific constants for the relay server and client.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nAre there any nodes in this map?\nHow many nodes are known?\nCreates a new ping tracker, setting the ping timeout for …\nStarts a new ping.\nSupport for handling DNS resource records for dialing by …\nReturns an Iterator over all known nodes.\nUpdates the ping tracker with a received pong.\nThe port on which the connection should be bound to.\nProtocols used by the iroh-relay\nCreate a QUIC server that accepts connections for QUIC …\nConfiguration to speak to the QUIC endpoint on the relay …\nA fully-fledged iroh-relay server over HTTP or HTTPS.\nCancel-safe waiting for a ping timeout.\nThe RelayUrl where this relay server can be dialed.\nReturns the sorted relay URLs.\nA relay client.\nBuild a Client.\nThe send half of a relay client.\nThe receive half of a relay client.\nConnection errors.\nErrors that can occur while dialing the relay server.\nA one-way message from server to client, declaring the …\nA one-way empty message from server to client, just to …\nIndicates that the client identified by the underlying …\nRequest from a client or server to reply to the other side …\nSends a ping message to the connected relay server.\nReply to a ReceivedMessage::Ping from a client or server …\nSends a pong message to the connected relay server.\nThe messages received from a framed relay stream.\nRepresents an incoming packet.\nErrors when receiving messages from the relay server.\nError for sending messages to the relay server.\nMessages we can send to a relay server.\nSend a packet of data to the NodeId.\nA one-way message from server to client, advertising that …\nReturns if we should prefer ipv6 it replaces the …\nEstablishes a new connection to the relay server.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nSkip the verification of the relay server’s SSL …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nIndicates this client is a prober\nSet the capacity of the cache for public keys.\nReturns the local address of the client.\nCreates a client config that trusts any servers without …\nCreate a new ClientBuilder\nSets whether to connect to the relay via websockets or not.\nSet an explicit proxy url to proxy all HTTP(S) traffic …\nSplits the client into a sink and a stream.\nThe received packet bytes.\nIf set, is a description of why the connection is …\nAn advisory duration that the client should wait before …\nThe NodeId of the packet sender.\nAn advisory duration for how long the client should …\nThe default HTTPS port used by the Relay server.\nThe default HTTP port used by the Relay server.\nThe default capacity of the key cache for the relay server.\nThe default metrics port used by the Relay server.\nThe default QUIC port used by the Relay server to accept …\nPotential errors related to dns.\nThe DNS resolver used throughout iroh.\nThe n0 testing DNS node origin, for production.\nThe n0 testing DNS node origin, for testing.\nError returned when an input value is too long for …\nRecord data for a TXT record\nTXT records returned from DnsResolver::lookup_txt\nRemoves all entries from the cache.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nPerform an ipv4 lookup with a timeout.\nResolve IPv4 and IPv6 in parallel with a timeout.\nRace an ipv4 and ipv6 lookup with a timeout in a staggered …\nPerform an ipv4 lookup with a timeout in a staggered …\nPerform an ipv6 lookup with a timeout.\nPerform an ipv6 lookup with a timeout in a staggered …\nLooks up node info by DNS name.\nLooks up node info by DNS name in a staggered fashion.\nLooks up node info by NodeId and origin domain name.\nLooks up node info by NodeId and origin domain name.\nLookup a TXT record.\nCreate a new DNS resolver with sensible cross-platform …\nRecreate the inner resolver\nResolve a hostname from a URL to an IP address.\nReturns the raw character strings of this TXT record.\nCreate a new DNS resolver configured with a single UDP DNS …\nThe HTTP upgrade protocol used for relaying.\nThe HTTP path under which the relay accepts relaying …\nThe HTTP path under which the relay allows doing latency …\nRelays over the custom relaying protocol with a custom …\nRelays over websockets.\nReturns the argument unchanged.\nCalls U::from(self).\nTries to match the value of an HTTP upgrade header to …\nThe HTTP upgrade header used or expected.\nThe DNS name for the iroh TXT record.\nThe max byte length allowed for user-defined data.\nError returned when an input value is too long for UserData…\nData about a node that may be published to and resolved …\nExtension methods for NodeId to encode to and decode from …\nInformation about a node that may be published to and …\nUnder the hood this is a UTF-8 String is no longer than …\nAdds direct addresses to the node data.\nRemoves all direct addresses from the node data.\nThe information published about the node.\nReturns the direct addresses of the node.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a new NodeInfo from its parts.\nParses a NodeInfo from a pkarr::SignedPacket.\nParses a NodeInfo from a TXT records lookup.\nParses a NodeId from [z-base-32] encoding.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConverts into a NodeAddr without cloning.\nCreates a new NodeData with a relay URL and a set of …\nCreates a new NodeInfo with an empty NodeData.\nThe NodeId of the node this is about.\nReturns the relay URL of the node.\nSets the relay URL of the node data.\nSets the user-defined data of the node data.\nConverts into a NodeAddr by cloning the needed fields.\nCreates a pkarr::SignedPacket.\nConverts into a list of {key}={value} strings.\nEncodes a NodeId in [z-base-32] encoding.\nReturns the optional user-defined data of the node.\nSets the direct addresses and returns the updated node …\nSets the direct addresses and returns the updated node …\nSets the relay URL and returns the updated node data.\nSets the relay URL and returns the updated node info.\nSets the user-defined data and returns the updated node …\nSets the user-defined data and returns the updated node …\nThis module exports looks_like_disco_wrapper as the only …\nThis module implements the relaying protocol used by the …\nThe 6 byte header of all discovery messages.\nReports whether p looks like it’s a packet containing an …\nmagic + 32b pub key + 24B nonce + bytes\nThe one byte frame type at the beginning of the frame …\nSent from server to client to tell the client if their …\nno payload, no-op (to be replaced with ping/pong)\nThe maximum size of a packet sent over relay. (This only …\n1 byte payload: 0x01 or 0x00 for whether this is client’…\nSent from server to client to signal that a previous …\nFrames 9-11 concern meshing, which we have eliminated from …\n8 byte payload, the contents of ping being replied to\nProtocol send errors.\nv0/1 packet bytes, v2: 32B src pub key + packet bytes\nSent from server to client for the server to declare that …\nProtocol send errors.\n32B dest pub key + packet bytes\nUnknown frame type\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nALPN for our quic addr discovery\nQuic client related errors.\nEndpoint close error code\nEndpoint close reason\nHandles the client side of QUIC address discovery.\nCreate a connection usable for qad\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreate a new QuicClient to handle the client side of QUIC …\nAccess restriction for a node.\nControls which nodes are allowed to use the relay.\nAccess is allowed.\nTLS certificate configuration.\nPer-client rate limit configuration.\nThe default certificate reload interval.\nAccess is denied.\nEveryone\nUse Let’s Encrypt.\nRate limits.\nUse a static TLS key and certificate chain.\nMetrics tracked for the relay server\nConfiguration for the QUIC server.\nConfiguration for the Relay HTTP and HTTPS server.\nAll metrics tracked in the relay server.\nUse a TLS key and certificate chain that can be reloaded.\nA Certificate resolver that reloads the certificate every …\nOnly nodes for which the function returns Access::Allow.\nA running Relay + QAD server.\nConfiguration for the full Relay.\nServer spawn errors\nServer task errors\nTLS configuration for Relay server.\nBurst limit for accepting new connection. Unlimited if not …\nRate limit for accepting new connection. Unlimited if not …\nNumber of times this server has accepted a connection.\nAccess configuration.\nThe socket address on which the QUIC server should bind.\nMax number of bytes per second to read from the client …\nBytes received from a FrameType::SendPacket\nBytes sent from a FrameType::SendPacket\nMode for getting a cert.\nThe certificates chain if configured with manual TLS …\nRate limits for incoming traffic from a client connection.\nNumber of client connections which have had any frames …\nFrameType::SendPacket dropped that are disco messages\nFrameType::SendPacket received that are disco messages\nFrameType::SendPacket sent that are disco messages\nNumber of connections we have removed because of an error\nNumber of frames received from client connection which …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nNumber of FrameType::Pings received\nThe socket address the HTTP server is listening on.\nThe socket address on which the Relay HTTP server should …\nGet the server’s http RelayUrl.\nThe socket address the HTTPS server is listening on.\nThe socket address on which to serve the HTTPS server.\nGet the server’s https RelayUrl.\nPerform the initial load and construct the …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nIs this node allowed?\nKey cache capacity.\nRate limits.\nMax number of bytes to read in a single burst.\nReturns the metrics collected in the relay server.\nSocket to serve metrics on.\nPackets of other FrameTypes dropped\nPackets of other FrameTypes received\nPackets of other FrameTypes sent\nConfiguration for the QUIC server, disabled if None.\nThe socket address the QUIC server is listening on.\nThe socket address on which to server the QUIC server is …\nConfiguration for the Relay server, disabled if None.\nNumber of accepted ‘iroh derp http’ connection upgrades\nReload the certificate.\nFrameType::SendPacket dropped, that are not disco messages\nFrameType::SendPacket received, that are not disco messages\nFrameType::SendPacket sent, that are not disco messages\nNumber of FrameType::Pongs sent\nMetrics tracked for the relay server.\nThe TLS server configuration for the QUIC server.\nThe server configuration.\nShutdown the resolver.\nRequests graceful shutdown.\nStarts the server.\nReturns the handle for the task.\nExposes functions to quickly configure a server suitable …\nTLS configuration for the HTTPS server.\nNumber of unique client keys per day\nNumber of FrameType::Unknown received\nNumber of accepted websocket connections\nThe TLS certificate chain.\nState for Let’s Encrypt certificates.\nCreates a QuicConfig suitable for testing.\nCreates a RelayConfig suitable for testing.\nCreates a rustls::ServerConfig and certificates suitable …\nCreates a ServerConfig suitable for testing.\nCreates a TlsConfig suitable for testing.") \ No newline at end of file diff --git a/pr/3367/docs/search.index/009d20612824.js b/pr/3367/docs/search.index/009d20612824.js new file mode 100644 index 0000000000..4089545f3f --- /dev/null +++ b/pr/3367/docs/search.index/009d20612824.js @@ -0,0 +1 @@ +rn_("AYACsHAZTADYoDAAABDhZXQBgAKgYAAAGXKgsAAAHFpldAGAAqDAAAAcfaCgAAAcDWFpAYICoFAAABojoDAAABxYbG4nDQAAyKAgAAAMSqDAAAAcMqDQAAAcWaCwAAAcDoAJ5AH2XQMAAJ4DaQyJBo8BSAE=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0122bc9b92b1.js b/pr/3367/docs/search.index/0122bc9b92b1.js new file mode 100644 index 0000000000..350a1fb135 --- /dev/null +++ b/pr/3367/docs/search.index/0122bc9b92b1.js @@ -0,0 +1 @@ +rn_("AQABoEAAABgjZQECHQAAAQIA9pILAAABAAEAAQBbDfYDAYECsMAclgABoGAAABq0cnMBBADzIBgAAAEAAQAzgISgEAAAGT6gQAAAHQIMCAQBAQDzpgkAAAEAAQABAAGgUAAAG7NjASYTAADzAAJsdAETBwAAAQQBoEAAABnyZQG2GAAAAQMBoEAAABnxZQH8FgAAAQDFsGAcogABoDAAABNAsEAZ+wABsCAQ6gABsEAXmgRTAECoCAHeGwAA84ACcngBAQGggAAAHMJ2ATAaAAAjgAKwMBtmAAFycxMAAqCQAAAczWV3OzAAAAEAAA4ABgDqDQIAjRICAIoXAQAnGQIAHhoCAGIbAAAjgAKwYBjdAJthcgEEAaAAAAAYtXMB+xYAAMcRAACLoIAAABlQoCAAAAxOoHAAABoBoCAAAAwpoLAAABvcoIAAABopsAAW8wABPwxM9mcDAACqA6IJ5gEBAEwJAYACoCAAABvcoAAAABlpaGu3HACAiaEAAAAcSxaMkKserKCwAAAbaQw8Bw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0122e3c0d8e7.js b/pr/3367/docs/search.index/0122e3c0d8e7.js new file mode 100644 index 0000000000..01dbecf989 --- /dev/null +++ b/pr/3367/docs/search.index/0122e3c0d8e7.js @@ -0,0 +1 @@ +rn_("AYACoGAAABmGoFAAABzzZXUBgAKhIAAAHPWwEBoLAAFudBOAAqAgAAAaDWFvMwADoHAAABu+ZHN09soQAAABALQBAQALCQEAI4ACoPAAABxLY2U=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/01a69fea799b.js b/pr/3367/docs/search.index/01a69fea799b.js new file mode 100644 index 0000000000..90a728a957 --- /dev/null +++ b/pr/3367/docs/search.index/01a69fea799b.js @@ -0,0 +1 @@ +rn_("AQIBoGAAABt6bfPjFgAAAQABABOAAqDQAAAc0291AYACsBAbzwABoCAAABv9YW8TgQOwcBykAAGwIBmBAAFtcXUTgAKgoAAAHPFhbwEFAPR/GgAAAQABAAEAAQAAOzAAAAEAALwAAQBmFbwAAYACoJAAABwToGAAABlUZW8BggKgUAAAG/SwABe4AW1lcwGFAqAwAAAcZaAgAAAcNmJ1I4ACoCAAABujaWwzAAOgIAAAG1BidHU6MAAAAQAAAAAACAAQAAAA9Qz2DPcM+AyNGOUc7Bz5HP0cAQcA82AbAABAAQEAAQQA9LQXAAABAAEAAQABAwGgYAAAHDRiAU8bAAB3BAAAiKAQAAAOAaCQAAAb86DAAAAcgqCgAAAcNTgJCzowAAABAAAAAAAPABAAAADGCccJGQwaDAIRZhNuE7cYuBjEGMUYxhjHGB0ZVBxVHCOAAqAwAAAb3GNttwcAgIegMAAADcY1igA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/033d0297065a.js b/pr/3367/docs/search.index/033d0297065a.js new file mode 100644 index 0000000000..ab3a757227 --- /dev/null +++ b/pr/3367/docs/search.index/033d0297065a.js @@ -0,0 +1 @@ +rn_("AQIBoAAAABoIcwFlEwAAAQYA9F4aAAABAAEAAQABAgD02xwAAAEAAQABAAECAaBAAAAZ8mUBthgAAFOAA6AgAAAZQWVrdAEJAPRGHAAAAQCCAAEAQ4EDoNAAAB0EsHAaTAABY2xzAQgA9MAbAAABANEAAQDXAwCAhrCQGkoAAQVIYA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0527f3bb1d37.js b/pr/3367/docs/search.index/0527f3bb1d37.js new file mode 100644 index 0000000000..0576742eac --- /dev/null +++ b/pr/3367/docs/search.index/0527f3bb1d37.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAABwADQBUEwgAdxMAAJAXAADgGAAAUBkAAOIZBQD1GQIAehoAAG8bAAB4GwAA8BsBAPQbAABrHAAAIwACoHAAABl0aXIByBsAAAEGAaBAAAAcQWXzxxsAADMBAQABAQGwQByOAAFl8kocAABBABOAArDQHD8AAWVztwAAgMag0AAAHC6gIAAADcaxEBygAAEAAqgJ") \ No newline at end of file diff --git a/pr/3367/docs/search.index/059e007d44ac.js b/pr/3367/docs/search.index/059e007d44ac.js new file mode 100644 index 0000000000..eec0e39e59 --- /dev/null +++ b/pr/3367/docs/search.index/059e007d44ac.js @@ -0,0 +1 @@ +rn_("AQACoFAAABwXoGAAABolZnP1igsAAGIL0QFzAwMAAQAAOzAAAAEAAAcAAgDbEAQA6BYCAPMAAXPzagkAAAEAAQCHCAAAiKAQAAAdAqBwAAAdBaCQAAAcuaAgAAAW16AwAAAbfKAAAAAc8geoA/UBCAAA1Aq3BDUFAgA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/05e9b5ef0fa0.js b/pr/3367/docs/search.index/05e9b5ef0fa0.js new file mode 100644 index 0000000000..231ca557e2 --- /dev/null +++ b/pr/3367/docs/search.index/05e9b5ef0fa0.js @@ -0,0 +1 @@ +rn_("AYACoFAAAByUoHAAABvvZWmDAQSwYBpvAXWw4Bz6AAGgAAAAGOpobXN29fkNAAABAJ0AAQD6CAEHAaBAAAAc2GIBahwAABOEArAgG30AAWRt84ACbG8=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/060b036e628a.js b/pr/3367/docs/search.index/060b036e628a.js new file mode 100644 index 0000000000..912aaa4104 --- /dev/null +++ b/pr/3367/docs/search.index/060b036e628a.js @@ -0,0 +1 @@ +rn_("AYcCoFAAABvIoGAAABv3YnYBgAKgAAAAG4+gAAAAGlVlcwEDAPPUHAAAAQABAFOAA6AQAAAMQGdudBOAAqCgAAAaV2FyAQUAOzAAAAEAAAkAAwCTFwEA9BgGANsbAAABBQKgQAAAHAOgIAAAG5hodQHzGAAAY4ADsEAcsgAObXFzE4ACsQAc3QABZXgBiAKgQAAAHMygAAAAHCZlcwEEAaAwAAAb9mPy/hkAAAEAAQUAOzAAAAEAAAYAAwB4GgEAqxsDAIocAADzAgNjZXDyIBMAAAEAAQQCoDAAABypoGAAABzXcHMBCBwAABODAqBQAAAZ4XJzY4CEoGAAABe7oGAAABeSEEQBAQYA89QcAAABAAEAAQMA86YcAAABAAEA84UCcHPzAwFv8l8ZAAABAAGFA6BAAAAbl6BwAAAcK6BgAAAcAmVucwEAAaAQAAAcnGUBgQsAAAECAPPPDQAAAQAoDPOAAnJ0AYcCoJAAABzQsOAc/gABY3IXAQAAhaBgAAAadKBQAAAb4KAQAAAM1IQoAfdLEwAAAQAmBgoA4AABAAsAAQgBsGAcHwApYvLRGAAAeQABgAKwMBx6ACCg0AAAHHRkbqd5AwDPoBAAAAzvoFAAABDGoIAAABn9sGATPAU0sFAQxwqGoJAAABoCQi+qFzowAAABAAAAAAAXABAAAAARARIB+QH6AfsB/AH9Af4B/wEAAgEC7QbuBhQIfAmEC4ULhgtJDLUM1gzTEtIZgxw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/066b883e6d3f.js b/pr/3367/docs/search.index/066b883e6d3f.js new file mode 100644 index 0000000000..e4d9be7659 --- /dev/null +++ b/pr/3367/docs/search.index/066b883e6d3f.js @@ -0,0 +1 @@ +rn_("AQcAOzAAAAEAAGMAAgAvGQAAtRpiAAEDADswAAABAABiAAEARhRiAAECADswAAABAABdAAIAuBEAALwXXADTAISwABlmAAEKAQQ7MAAAAQAAZAADAOIHAABGCGIA0g0AABOAAqAAAAAMXmVn") \ No newline at end of file diff --git a/pr/3367/docs/search.index/066d117574ad.js b/pr/3367/docs/search.index/066d117574ad.js new file mode 100644 index 0000000000..3e17f612c1 --- /dev/null +++ b/pr/3367/docs/search.index/066d117574ad.js @@ -0,0 +1 @@ +rn_("AQMBoFAAABlOawFLDAAAAQsA8xkcAAA2ALIAAQQBoAAAABkqcwHAGAAAAQIBoFAAABuzYwEmEwAAMwADoEAAABN3YWNl9JIJAACWCc0DAQAzgISgIAAADGWwAA6WCo2QAEQBBAA7MAAAAQAAJAABACcYJAABAAGg0AAAHEpi9nEJAAABAFkAAQBZAqcPAQCEoHAAABzZoHAAABuCsAAaOgABoIAAABxgMAAGOzAAAAEAAJQABwDICQAA9g0AAAMOAAC4EAAA1hJIACYZAACJGUYAY4AEoBAAABnZsEAcogABZmd0dgEFAaBAAAAca2XygxsAAJEAAQUA89QcAAABAAEA8wABdAHWDAAAAQMA86YcAAABAAEA8wICcHPyoBgAALkCAQACoEAAAByqoFAAABjpZWk7MAAAAQAACAAEAM0JAwAmDAEA0BwAAP4cAQAjgAKgwAAAHDhpeQGCAqAAAAAc6qAAAAAc6zQ28wcBaQGZHAAAAQQBoCAAABppcwHaGAAAQwCEoDAAABkXoFAAABlLsDAcOwABRYAAOzAAAAEAABUABgBCDAQAvQwKAN4YAQDvGQAAVhoAAHkbAQAjgAOgMAAAE0qgIAAAE2tpc3QBAQGgAAAAHPJyAdUSAAABAAGwABNvBV9yOzAAAAEAAEUABAD8EAAAsRIhAJEXAABMGCEAI4ECsJAcPQABYWUjAAKgQAAAHMZlaQGYHAAAE4ACoEAAABxabG533wGAzaBgAAAZdLBADpYKjcAfPAo=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0689e9887e3c.js b/pr/3367/docs/search.index/0689e9887e3c.js new file mode 100644 index 0000000000..08b21d2b81 --- /dev/null +++ b/pr/3367/docs/search.index/0689e9887e3c.js @@ -0,0 +1 @@ +rn_("AYkCoEAAABx6oGAAAByyYXIBBQA7MAAAAQAABwACANsQBADoFgIAAYoCoEAAAByaoGAAABzAYXKnAQCAhaBQAAAaIaBwAAAaVxwIAQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/06e9545614b8.js b/pr/3367/docs/search.index/06e9545614b8.js new file mode 100644 index 0000000000..a246967059 --- /dev/null +++ b/pr/3367/docs/search.index/06e9545614b8.js @@ -0,0 +1 @@ +rn_("AQQAOzAAAAEAACQAAQAnGCQAAQEBoAAAABzycgHVEgAA84ECYnABAwD02xkAAAEACwIBABOAArAwGd0AAXJ2AYICsCAb7gBpoDAAABttZnSnAAAAiLBgHB8AKaAgAAAZYaAwAAAZOaCwAAAcsaAQAAAY8rBAGd8AAR4pAjswAAABAAAdAAwAwxACAGoSBADPGAAA0RgAAEQZAABKGQAAWxkAABEaDAC0GgAAGhwAALYcAADtHAAAIwICsBATOgABZXnyzQ0AAAEAAQIA8y8aAAAHAAEAAQIA86UbAAADAAIA8wEBbAEOHAAAAYUDsGAccgABsDAb/gABsDAcAAABZHJzE4ADsCAbVQAFsCAbVgAFYWlvAQUBoHAAABy/ZAFSGwAAAYMCsBAY0ABAsAAYbgABZXMBAgD2xhAAADoAhAYbACIBigDzgANmbnQBCgGgcAAAHQVi8sEcAAACAAGCAqAgAAAcEKBAAAAcX2twtw8AAMmgEAAAE3SgYAAAHL6AA6gc82AJAAABAKQTAYACsCAZZgABoCAAABKIbnMjgAKgkAAAHPVpbwGEAqAwAAAcy6BQAAAc5mNy1wEAAIWgwAAAHQQUSAEBGBwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/07c43c8fd166.js b/pr/3367/docs/search.index/07c43c8fd166.js new file mode 100644 index 0000000000..59b71f1080 --- /dev/null +++ b/pr/3367/docs/search.index/07c43c8fd166.js @@ -0,0 +1 @@ +rn_("AYACoFAAAByUoHAAABvvZWmDAQSwYBpvAXWw4Bz6AAGgAAAAGOpobXN29fkNAAABAJ0AAQD6CAEHAaBAAAAc2GIBahwAABOEArAgG30AAWRtAYACoAAAABjmoAAAABjnNDbzAwF2AXETAAATAAOgAAAAGV2wIBwgAAFhc3X0BhEAAAEAAQABAAEAAqAwAAAcZaAgAAAcNmJ18vEYAABDA/OAAmR0EwACoGAAABt5ZW3yiRIAAAEAAQMBoGAAABwHdQFPGQAAAQYBoHAAAB0FYvLBHAAAAgATgAKgYAAAGUlteQEDADswAAABAAAHAAMA0RABANsWAQCpFwMAVwEAAYWgEAAADpCgYAAAHLEBqQAB/gcAANcBAICFoXAAAB0BAU0A") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0808a659bf22.js b/pr/3367/docs/search.index/0808a659bf22.js new file mode 100644 index 0000000000..640c1acd9f --- /dev/null +++ b/pr/3367/docs/search.index/0808a659bf22.js @@ -0,0 +1 @@ +rn_("AYACsAAY5gAHsAAY5wAHNDYBgAOgAAAAHF2gAAAAHF6gcAAAHMI0NmEBAAA7MAAAAQAAEAAFAJEbBQBNHAEAhBwFAJYcAQC9HAAAI4ACsDAcjAABcnMXAQABxaDQAAAcrrBgHPgAC6BgAAAcugAMgAw7MAAAAQAABgADANMQAwBREwEAMBoAACOAArAwG2YAAXJzAYQCoDAAABzLoFAAABzmY3LzAwFjARgcAAA3BAAAyKCAAAAdAqAwAAAZ2aAAAAAcN6AwAAAZ2qCQAAAczQBmABs6MAAAAQAAAAAALQAQAAAAeQN6A3sDqQnfDeAN6g3rDewN0RDSELARsRGyEbMRtBGBEoISjRKOEo8SnhI5E3ET1BbVFtsW3BaKF4sXqReqF6sXrBcXGScZKBkpGWwZDxoeGh8aIBooGhwbYhsBAwKwQBtmAAGgkAAAHM1ld/KKFwAAAQATgwKgMAAAGVxhaQECA6BAAAAbqKAgAAAaNqAwAAAZW3J1dgEFHQAAAYMCsIAcTQABoBAAABy/YWwzgAOgoAAAHINyc3QBgQKwwBxNAAGgYAAAGVtycwEDAaBAAAAbxmXz3RgAAJsAAgATAgKgoAAAHJtnbvKsEgAAqAZXBwAAh6BAAAARDLAQHHoAIBshAfInAQAADhk=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0859302c02f9.js b/pr/3367/docs/search.index/0859302c02f9.js new file mode 100644 index 0000000000..8d3d7d0301 --- /dev/null +++ b/pr/3367/docs/search.index/0859302c02f9.js @@ -0,0 +1 @@ +rn_("AYACsEAXlQABsEAXlwABYXLzAAFwOzAAAAEAAAkAAwDnBwEAYgkCAIsOBAABAAGAFt0AEAF0ASIMAAABAAGwQBw5AAFl9GYMAAABADkPLgABhQKgcAAAHIugMAAAG/xlcxMAhKBAAAAXj6AgAAAQu6CwAAAb4RIAA/VwCwAAAQABAAEATA0BAQGwAAxJDYlzOzAAAAEAACYAAwC3CQAAJxgkAE4aAAATgAKgcAAAGgRvdgGAAqAAAAAafrAwF4cAAWRyAYACoEAAABvJoEAAABvKYmwTggKgMAAAHC9udOdlAACLsBANxANHoDAAABudsCAQrwLJoDAAABgZFsF6OzAAAAEAAAwABAAZAQEAkwkAANEJBgCiFwIA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/09277f481421.js b/pr/3367/docs/search.index/09277f481421.js new file mode 100644 index 0000000000..c9f6903132 --- /dev/null +++ b/pr/3367/docs/search.index/09277f481421.js @@ -0,0 +1 @@ +rn_("AQIA9YgOAACKDRwApQAeAAECAaAwAAAb9mM6MAAAAQAAAAAADQAQAAAAZxOHF4gXyBjJGMoYyxjMGPEZ/hn/GVca8xvFHAGCA6DQAAAcuqBAAAAZ6aCAAAAbv2FlcwECAaBAAAAcxmUBmBwAAAECAPPjDQAA7woCAAECADswAAABAAAHAAMA4g0AABoYBQDTGAAA84ACYnSXCwAAyKBgAAAZUaBAAAAczKAAAAAcJsBEiAk6MAAAAQAAAAAADAAQAAAA6QbqBsAJKgwrDDUM1wzIEHgSeRJ6EnsSfBI=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/094164d31ba7.js b/pr/3367/docs/search.index/094164d31ba7.js new file mode 100644 index 0000000000..bd52aa4ded --- /dev/null +++ b/pr/3367/docs/search.index/094164d31ba7.js @@ -0,0 +1 @@ +rn_("AYgCoEAAABzMoAAAABwmZXMBBAGgMAAAG/Zj8v4ZAAABAAEFADswAAABAAAGAAMAeBoBAKsbAwCKHAAA8wMDY2Vw8iATAAABAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/095bde4dfe6a.js b/pr/3367/docs/search.index/095bde4dfe6a.js new file mode 100644 index 0000000000..966252ebee --- /dev/null +++ b/pr/3367/docs/search.index/095bde4dfe6a.js @@ -0,0 +1 @@ +rn_("AQEBsIAc6AABc/LSGwAAAQABCQGwgB0GAAFz8uMcAAABAPOAAmRpAYACoHAAABz0oAAAAAflZmcBBQGwIBwgAAF19AYRAAABAAEAAQABAAA7MAAAAQAAXQACALgRAAC8F1wAI4ACsBAXrwABdHjHAwCAhqBgAAAdBaDwAAAc2QFBSg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0a18328ba50a.js b/pr/3367/docs/search.index/0a18328ba50a.js new file mode 100644 index 0000000000..a580a71baa --- /dev/null +++ b/pr/3367/docs/search.index/0a18328ba50a.js @@ -0,0 +1 @@ +rn_("AYICoAAAABosoAAAABotNDYBiQKgIAAAHM6gMAAAHN9pcBMAAqAgAAAb1GVpOzAAAAEAAAkABAC8EAQAuhECAC4aAAARHAAAgwOEsEAc0QAHoEAAABvGoQAAABz0EgAD9hIOAADLCpsAAgDuAgIAhwEAAIewYBjxA0OgIAAADhGwsBy2ADegoAAAHJugQAAAG1RqIQE7MAAAAQAAGAAMAIYDAgDtDQIACg4CAJIOAACsEgAAIxMCAFQZAACDGQEACxoBAEYaAwBPGwAArxsAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0a46168a9c61.js b/pr/3367/docs/search.index/0a46168a9c61.js new file mode 100644 index 0000000000..2ce1293bd0 --- /dev/null +++ b/pr/3367/docs/search.index/0a46168a9c61.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMHAW07MAAAAQAABgADAOgZAACZGwIAsxwCABOAA6CgAAAcWaAAAAAID2drdA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0b1ab219f1b5.js b/pr/3367/docs/search.index/0b1ab219f1b5.js new file mode 100644 index 0000000000..d069b08143 --- /dev/null +++ b/pr/3367/docs/search.index/0b1ab219f1b5.js @@ -0,0 +1 @@ +rn_("AQEBoGAAABxpYgHuGQAAJwAAAYWgQAAAG1ewcBwSAMGgMAAAHA+gUAAAHFsYIQg7MAAAAQAABwACANkMBgDmFgAAAQIBoEAAABnwZTswAAABAAAFAAIA5BADAHIbAQDzAAFr9I4LAAABAAEAAQDzgAJjcw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0b5f2bdd28cb.js b/pr/3367/docs/search.index/0b5f2bdd28cb.js new file mode 100644 index 0000000000..01046cc4f0 --- /dev/null +++ b/pr/3367/docs/search.index/0b5f2bdd28cb.js @@ -0,0 +1 @@ +rn_("AYACsEATSwABsDAQ1wABcHUBBAA7MAAAAQAAEgACAKEXAAD+GBEAAYSEoGAAABx/oHAAABycoGAAAByAoGAAAByBEAEJE4ECoBAAABzEY3QBBwGgQAAAHNFiAWgcAAATAgOwIBtqAAGw4ByQAAFkbXPzpRsAAAMAAgDnAgAAxqBQAAAXs7AwGnYAAQAB4gH2jQkAAAEA8gGKBXwGiAQ=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0b82f5d55668.js b/pr/3367/docs/search.index/0b82f5d55668.js new file mode 100644 index 0000000000..4032b9db1b --- /dev/null +++ b/pr/3367/docs/search.index/0b82f5d55668.js @@ -0,0 +1 @@ +rn_("AYADoAAAABxdoAAAABxeoHAAABzCNDZhAYADoHAAABoOoEAAABx1oFAAABy6YmNwAYACoCAAABx9sFAc+AALYWUBgQKwMBenAAGwsBwiAAFochOAArAQDFUNMG5vAQAAOzAAAAEAABAABQCRGwUATRwBAIQcBQCWHAEAvRwAAAEDAPRGHAAAAQCCAAEAIwICoDAAABvyY27yxxAAAIYKI4ACsCAcjAABcnYBAQA6MAAAAQAAAAAABwAQAAAAQhRDFNkb2hsAHAEcCxwMHOOAhKBAAAARDgAwAwECArBwHPoAAaBwAAAaaGVyAbwMAABX0gAAzKBQAAAYwaDQAAAcrqBgAAAYhqBAAAAXiaGQAAAdAaBQAAAaJUBtkg46MAAAAQAAAAAADAAQAAAAlAnYCdMQ1BDVENYQURNSE3sZMBoCHHUc8xw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0bafe33b4b3d.js b/pr/3367/docs/search.index/0bafe33b4b3d.js new file mode 100644 index 0000000000..5dfb10834c --- /dev/null +++ b/pr/3367/docs/search.index/0bafe33b4b3d.js @@ -0,0 +1 @@ +rn_("AQIA890WAAABAAEAAQEBsIAc6AABc/LSGwAAAQABCQGwgB0GAAFz8uMcAAABAPODAmRpE4ECoFAAABwrZHQBAAGwgBx4AAFz84oYAAABAAEAAQMBsIAc4QABc/KeGwAAAQATAAKwgBx2AAFpc/OHGAAAAQABAPOCAjQ2AQQA86UXAAABAPED1wIAAIawUBjYAAGgYAAAHAIwIQbyGhsAAAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0bd1150d9918.js b/pr/3367/docs/search.index/0bd1150d9918.js new file mode 100644 index 0000000000..ab820681fe --- /dev/null +++ b/pr/3367/docs/search.index/0bd1150d9918.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMAAW06MAAAAQAAAAAABwAQAAAAJxPoGZkbmhubG7MctBy1HCOAArAADGQKfXJzEwADoHAAABtisDARBAABZW5y830aAABUAgcA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0c792a6bf372.js b/pr/3367/docs/search.index/0c792a6bf372.js new file mode 100644 index 0000000000..cd69508a64 --- /dev/null +++ b/pr/3367/docs/search.index/0c792a6bf372.js @@ -0,0 +1 @@ +rn_("AYQCoEAAAByaoGAAABzAYXIBBAA7MAAAAQAAEAAFAJEbBQBNHAEAhBwFAJYcAQC9HAAAFwAAA4WggAAAHQKgMAAAGdmgAAAAHDegMAAAGdqQAQYBORMAADMAA6AQAAAcv2FjbPOhCQAAAQAXEw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0d2097bf4d0d.js b/pr/3367/docs/search.index/0d2097bf4d0d.js new file mode 100644 index 0000000000..5555313fb3 --- /dev/null +++ b/pr/3367/docs/search.index/0d2097bf4d0d.js @@ -0,0 +1 @@ +rn_("AYACoEAAABwCoBAAABKDY3IBggKgAAAADcWgAAAADghlcwEBAaAgAAAZJGny2w0AAAEAI4CEoAAAAAw6oDAAABNCoAAAABppCCAFAYACsEAZZgABoEAAABefbG/HBgAAh7AwFtQAAaBwAAAbHLAwG+IAAReADDowAAABAAAAAAAHABAAAAD8B/0HZwloCX4Lfws4GgMc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0d23c31f1857.js b/pr/3367/docs/search.index/0d23c31f1857.js new file mode 100644 index 0000000000..6551109d34 --- /dev/null +++ b/pr/3367/docs/search.index/0d23c31f1857.js @@ -0,0 +1 @@ +rn_("AQMBsDAcJwABdPJ7GgAAAQABBAD1hBsAAAEAAQABAAEA84ACb3IBAgD1VRkAAAEAAQABAAEAMwKEoEAAABoIsMAcqwABMAAM8h4OAAABACOAAqBAAAAXu2l0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0ec7f231d92c.js b/pr/3367/docs/search.index/0ec7f231d92c.js new file mode 100644 index 0000000000..ab6d4570f8 --- /dev/null +++ b/pr/3367/docs/search.index/0ec7f231d92c.js @@ -0,0 +1 @@ +rn_("AYACoAAAABp+sDAXhwABZHIBgwKgQAAAG8mgQAAAG8pibGcAAAGGsBANxANHsAAMZgABsCAQrwLJoDAAABgZFgAaOzAAAAEAAAcAAgCTCQAA0QkGAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/0f24afa3b583.js b/pr/3367/docs/search.index/0f24afa3b583.js new file mode 100644 index 0000000000..54ec03b4ea --- /dev/null +++ b/pr/3367/docs/search.index/0f24afa3b583.js @@ -0,0 +1 @@ +rn_("AYACoFAAABsYoBAAABgmaXQBAAGgEAAAGCVvOzAAAAEAAAYAAwATDgMA1xABAGccAAABgAKwEBvPAAGgIAAAG/1hbxOCArBwHKQAAW1xE4ECoOAAABzTbHABggKwMBu5AAGwQBviAAFwc/MAAXTzpgkAAAEAAQCHcAAAi6CgAAAcbaEQAAAc8bCgHG4AAaDwAAAc0rCgHDsAAbCgHHAAAaBwAAAbu5W0BzswAAABAAA4AAQAvAkDADYMAgCEDDAA/RkAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/10956c5d106a.js b/pr/3367/docs/search.index/10956c5d106a.js new file mode 100644 index 0000000000..236688f97e --- /dev/null +++ b/pr/3367/docs/search.index/10956c5d106a.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAAAsAAwCbDgkAhhgAAHUZAAABgAKgIAAAG1qgIAAAG1tpbycAAIPFoKAAABzDoEAAABuqoCAAABo3sDAYzwNLAAGgDAEEAaBAAAAc2GIBahwAABOBAqAQAAAcWWFl84ADYWlv") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1117fccae43c.js b/pr/3367/docs/search.index/1117fccae43c.js new file mode 100644 index 0000000000..93f48c9246 --- /dev/null +++ b/pr/3367/docs/search.index/1117fccae43c.js @@ -0,0 +1 @@ +rn_("AQUA88UYAAABAAEA8wABc/WtCgAA2wfBBiMCSwAjAAOgMAAAHMuwUBjwA/ZjZHI6MAAAAQAAAAAACQAQAAAA4wepCKoIqwisCO4W7xZQGmgbkBs=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1167a31a3b2c.js b/pr/3367/docs/search.index/1167a31a3b2c.js new file mode 100644 index 0000000000..8da3d49adf --- /dev/null +++ b/pr/3367/docs/search.index/1167a31a3b2c.js @@ -0,0 +1 @@ +rn_("AQEA9UATAAAGCQEAggABAAGAA6DQAAAcuqBAAAAZ6aCAAAAbv2Flc/OAAmxtE4CEoCAAABl7oAAAABC7oAAAAAl8UQAC") \ No newline at end of file diff --git a/pr/3367/docs/search.index/11857f78dc42.js b/pr/3367/docs/search.index/11857f78dc42.js new file mode 100644 index 0000000000..e7584b42ad --- /dev/null +++ b/pr/3367/docs/search.index/11857f78dc42.js @@ -0,0 +1 @@ +rn_("AQCFoJAAABzPoEAAABwtoEAAABwDoGAAABx1oCAAABuYmAAK8vMYAAB1ACMBAqBgAAAZ9GhzOzAAAAEAABgABgBPDAEAnRcBAKEXAAD+GBEAAhoAAAoaAAABAgGwUBvdAG9jAVoZAABjgAOwkBwVAAFjbnM=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/122635a9d1f2.js b/pr/3367/docs/search.index/122635a9d1f2.js new file mode 100644 index 0000000000..7d338eb600 --- /dev/null +++ b/pr/3367/docs/search.index/122635a9d1f2.js @@ -0,0 +1 @@ +rn_("AYICoFAAABv0sAAXuAFtZXMBiQKgIAAAHM6gMAAAHN9pcAGFAqAwAAAcZaAgAAAcNmJ1I4ACoCAAABujaWy3AAAAhaAgAAAb1KAgAAAbUBIBDDowAAABAAAAAAASABAAAAD1DPYM9wz4DLwQvRC+EL8QwBC6EbsRvBGNGC4aERzlHOwc+Rz9HAGGAqCQAAAc9KBQAAAcgmJ3AYACoAAAAA4BoJAAAByuZGwBBwDzYBsAAEABAQABBAA7MAAAAQAABQABAOIZBQDzAgFlOzAAAAEAAAoABQDJEAAAxBYDAHAbAQCJGwEAJxwBAAGBAqBAAAAczKAAAAAcJmVzk4CEsGAZPwABoAAAAA4hEEBgAYECsFAdBgABoBAAABM/Z3QBBAGgAAAAG7Fz9OIWAACBBAEAAQDzAAJldPI9GgAAAQABAgD1tBcAAAEAAQABAA8EE4ACoAAAAA4gcngBBAA7MAAAAQAAEQABAI4YEQBDgAOwIA3oAAGgQAAAHLlhaWyXAwAAhqDAAAAcQaAgAAASdxgIBzswAAABAAAjAA8AWQMCAO8GCQBlCQEAQBMAANUYAgAiGQAAQhkBACcaAAB7GgEAtRsAALwbAQDCGwEARhwBAMkcAQDjHAEAAQMBoGAAABw0YgFPGwAA5w0AAImwQBzRAAegkAAAG/OgoAAAHDU6CQs6MAAAAQAAAAAAFwAQAAAAxgnHCRkMGgwSDswQzRACEWYTbhO3GLgYxBjFGMYYxxjdGB0ZeBl6GVQcVRxoHGoc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/12640ce03ec3.js b/pr/3367/docs/search.index/12640ce03ec3.js new file mode 100644 index 0000000000..5ced3c924d --- /dev/null +++ b/pr/3367/docs/search.index/12640ce03ec3.js @@ -0,0 +1 @@ +rn_("AQEBoAAAAA6lczowAAABAAAAAAAIABAAAABYDFkMWgxbDFwM+wygFxgbohsBBgDz1BwAAAEAAQABAwDzphwAAAEAAQDzAwJwcwGgGAAAI4ACoOAAABxgZGljgAOhQAAAHQNicnU=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1387d9b70733.js b/pr/3367/docs/search.index/1387d9b70733.js new file mode 100644 index 0000000000..1673789f7e --- /dev/null +++ b/pr/3367/docs/search.index/1387d9b70733.js @@ -0,0 +1 @@ +rn_("AYACsBAXfwABoEAAABmFbnPzAAFl9M8WAAABAAEAAQABAQDzaBMAAAEAAQABAgA7MAAAAQAADwABAKIYDwATgQOgEAAAEOCgIAAAE11jZW/zgAJhbsMAhKAwAAAdAqAQAAAaJRIBAvMPCAAA0BEBAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/13f436dd1a89.js b/pr/3367/docs/search.index/13f436dd1a89.js new file mode 100644 index 0000000000..19dd1ff069 --- /dev/null +++ b/pr/3367/docs/search.index/13f436dd1a89.js @@ -0,0 +1 @@ +rn_("AQEBoEAAABxrZfKDGwAAkQABAQGggAAAHK10AXcZAAABAwGgIAAAGetmAXsYAAAXAACAhaAwAAAY/bAgGHgAAaAgAAAYeqBQAAAaEAAVEROAAqAgAAAShWx0s4AEoIAAAByDYW5vdg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/13f5a28590ba.js b/pr/3367/docs/search.index/13f5a28590ba.js new file mode 100644 index 0000000000..f13ec4c6e4 --- /dev/null +++ b/pr/3367/docs/search.index/13f5a28590ba.js @@ -0,0 +1 @@ +rn_("AQABsCAURAW/afalCgAAAQABAA4OdQCJAgGEArAAGj0AAbAwG4kAAXN0EwMCsIAbiwABZmgBYQwAAMcAAACFoFAAABvLsBATHwifoDAAABRFFCAG9WoDAAB3BEsLzwPFAQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1405c94ad5a1.js b/pr/3367/docs/search.index/1405c94ad5a1.js new file mode 100644 index 0000000000..cd0c25161b --- /dev/null +++ b/pr/3367/docs/search.index/1405c94ad5a1.js @@ -0,0 +1 @@ +rn_("AQQBoFAAABwXZvLsFgAA0QEBgQKgUAAAG8igYAAAG/didvMCAWXyuRsAAAEAAQQBoAAAABu3ZAFoGwAAE4cCoEAAABu0Y2UBggKgAAAAHOqgAAAAHOs0NvMLAWkBmRwAAAGAArCgHIwAAaBgAAAboGR0U4IDoHAAABuhYWZ2AQACoEAAABi+oCAAAA4JYmjy9xYAAMcFAQABoEAAABjoZTowAAABAAAAAAAIABAAAABXDPQMYBNjHGQcchxzHHscfBzzgAJkcucDAACHsFAXmwABoEAAAA3FEUkD8wwBAADcDAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/144c1e5ca499.js b/pr/3367/docs/search.index/144c1e5ca499.js new file mode 100644 index 0000000000..192c9f182f --- /dev/null +++ b/pr/3367/docs/search.index/144c1e5ca499.js @@ -0,0 +1 @@ +rn_("AYACoFAAAByLoAAAAA3kY3QBgAKgIAAAHDKgQAAAGmhlcAGAAqAQAAASn7BQG1wAAWNkAQIAOzAAAAEAAK0AAgDJDQAAvRGsAPMAAW07MAAAAQAAswACAOYHAACtCLIAAQACoEAAABn5oDAAABvmZXI6MAAAAQAAAAAADQAQAAAAQQw6EzsTKRp2HHcceBx5HOEc4hzoHOkcBh0HHecMAIDIsDAY8AP2oEAAABoKoDAAABzMQArIIQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/15154c5a0c07.js b/pr/3367/docs/search.index/15154c5a0c07.js new file mode 100644 index 0000000000..fb39632914 --- /dev/null +++ b/pr/3367/docs/search.index/15154c5a0c07.js @@ -0,0 +1 @@ +rn_("AQgBoIAAABz8ZgEpHAAAE4ADoBAAABuYoFAAAByBYmRwAQICoHAAABzZsAAaOgABZXPyuBAAAG4IAQIBsHAcoAABZvTEGAAAWQA3AwEAAQEBoFAAABpObwG1EQAA84ADYWVpQ4ADoCAAABeOoGAAABzEYW9yAQIA9tkbAAABACYAAQAKAAEAE4ACoFAAABx1ZXUBAQD21xsAAAEAJgABAAoAAQATgQKgQAAAHIBjbQECADswAAABAAAvAAEAHRsvAAEBAPUgGQAARgEBANgBAQABgAKgAAAAEyygUAAAHJxrc2OAA6CQAAAb0WduegGAArAgEnUAAaAwAAAcA290AQMA8y0cAAAMAAEAAQQCoGAAABwvoDAAABudY3DzohcAAAEAAQATgAKwABd/AAFjZGcAAICFoFAAABtuoEAAABmFoFAAABx/ACgjAQUA9mMcAAABAA4AAQAIAAEAE4ACoIAAABzPcnVn+wAAjKCAAAAdBKAwAAAZHKAQAAAYJbnBDzowAAABAAAAAAAxABAAAAAQCEUIhwmICYkJigmLCYwJrAmDC2YMZwxxDOEMCA4QDhMOFA4VDhYOpQ7XENgQ4RA/E88W0BbRFtIWjhe4F24YbxjzGBUZIRklGV0ZaBmGGVUaGRtRG6AbzRvOGzIcZxz4HAMd") \ No newline at end of file diff --git a/pr/3367/docs/search.index/152185296c58.js b/pr/3367/docs/search.index/152185296c58.js new file mode 100644 index 0000000000..d0daf2e5b5 --- /dev/null +++ b/pr/3367/docs/search.index/152185296c58.js @@ -0,0 +1 @@ +rn_("AQUAOzAAAAEAAJ0AAgA9EwEAJhabAAEBAaBAAAAbnHA7MAAAAQAABwADAAIIBABzCQEAqxIAAAEIAPRCHAAAAQABAAEAAQEBoCAAAByVcjswAAABAAARAAcALAwCAGgMCAAuGQAAURkAAB8cAABIHAEAaRwAAPMBAmVpOzAAAAEAAAYAAQAWCAYAAQQA9WITAAABAFAFAQC/ASOAAqBAAAATYWxvAYQCoDAAABzLoFAAABzmY3LzAwFjARgcAADzAwFkAZ4SAABXAAAAhaBwAAAaKLAwHKQAAbBAEOgAAQeAAvUMBwAAAQABAAEAAQDzgARjbG52") \ No newline at end of file diff --git a/pr/3367/docs/search.index/15395a0b1cab.js b/pr/3367/docs/search.index/15395a0b1cab.js new file mode 100644 index 0000000000..770ccc4aeb --- /dev/null +++ b/pr/3367/docs/search.index/15395a0b1cab.js @@ -0,0 +1 @@ +rn_("AYECoBAAABvmoCAAABtTYWwBhwKgAAAAHF2gAAAAHF40NlMAA6BAAAAZ+WFlcjowAAABAAAAAAASABAAAAA7DDwMQQw6EzsTKRokHCUcdhx3HHgceRx/HOEc4hzoHOkcBh0HHQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/15af1715de34.js b/pr/3367/docs/search.index/15af1715de34.js new file mode 100644 index 0000000000..571ff3abfc --- /dev/null +++ b/pr/3367/docs/search.index/15af1715de34.js @@ -0,0 +1 @@ +rn_("AQCFoJAAABzPoEAAABwtoEAAABwDoGAAABx1oCAAABuYmAAK8vMYAAB1ACMBAqBgAAAZ9GhzOzAAAAEAABgABgBPDAEAnRcBAKEXAAD+GBEAAhoAAAoaAAABAgGwUBvdAG9jAVoZAABjAAOwkBwVAAFjbnP1EggAAAEAfgEJDlME") \ No newline at end of file diff --git a/pr/3367/docs/search.index/168c90ab1eac.js b/pr/3367/docs/search.index/168c90ab1eac.js new file mode 100644 index 0000000000..40d7147561 --- /dev/null +++ b/pr/3367/docs/search.index/168c90ab1eac.js @@ -0,0 +1 @@ +rn_("AYICoFAAABv0sAAXuAFtZXMBhQKgMAAAHGWgIAAAHDZidSOAAqAgAAAbo2lsMwADoCAAABtQYnR1OjAAAAEAAAAAAAgAEAAAAPUM9gz3DPgMjRjlHOwc+Rz9HAEHAPNgGwAAQAEBAAEEAPS0FwAAAQABAAEAAQMBoGAAABw0YgFPGwAAdwQAAIigEAAADgGgkAAAG/OgwAAAHIKgoAAAHDU4CQs6MAAAAQAAAAAADwAQAAAAxgnHCRkMGgwCEWYTbhO3GLgYxBjFGMYYxxgdGVQcVRw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/177e9047a949.js b/pr/3367/docs/search.index/177e9047a949.js new file mode 100644 index 0000000000..7e13c4ab83 --- /dev/null +++ b/pr/3367/docs/search.index/177e9047a949.js @@ -0,0 +1 @@ +rn_("AQMA9NsZAAABAAsCAQATgAKwMBndAAFydgGCArAgG+4AaaAwAAAbbWZ0pwAAAIiwYBwfACmgIAAAGWGgMAAAGTmgsAAAHLGgEAAAGPKwQBnfAAEeKQI7MAAAAQAAHQAMAMMQAgBqEgQAzxgAANEYAABEGQAAShkAAFsZAAARGgwAtBoAABocAAC2HAAA7RwAACMAArAQEzoAAWV58s0NAAABAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/17dc0d39ea4c.js b/pr/3367/docs/search.index/17dc0d39ea4c.js new file mode 100644 index 0000000000..500e750e3d --- /dev/null +++ b/pr/3367/docs/search.index/17dc0d39ea4c.js @@ -0,0 +1 @@ +rn_("AQEDoDAAABlUoCAAABDsoDAAABNlZHN0OzAAAAEAAAUAAgC6CQAAahoEAAGDAqAAAAAZGqAwAAAcYW5v8wABZQEjGAAAAQIBsDAcJAABdfKzFwAAOQJjgAOgAAAAG45kZm4BBwA7MAAAAQAACAABADAZCAABDAD0GxwAAAEAAQABACMAAqBAAAAXkGVpOzAAAAEAAAcAAwCdCQMAdgsCAMscAADzgAJlabOAhKBQAAAcKghgAQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/180fd1b736e6.js b/pr/3367/docs/search.index/180fd1b736e6.js new file mode 100644 index 0000000000..1247f869d7 --- /dev/null +++ b/pr/3367/docs/search.index/180fd1b736e6.js @@ -0,0 +1 @@ +rn_("AYACoAAAAAwjoAAAAAwkNDYBgAKwIBwwAAOxMBz6AAFidCOAA6AgAAAbzKAAAAAMIWlveAEDAqBgAAAaVqBwAAAbbm1zOzAAAAEAAAcAAwDXDQIAGw4CAFwbAQABgISwYBxjAAGwMBvXAAGwMBvZAAGgcAAAHMQIAAcjAwOgkAAAHJWgoAAAHKpic3b25RgAAOwCzAABAB0AAQATgAKgIAAAHF9jctcIAADIoKAAABx0oEAAAA4IoBAAAAwisHAbcgABQACRD/cjAQAAAQCUC3cNBwABAGEB") \ No newline at end of file diff --git a/pr/3367/docs/search.index/181cee09dbfd.js b/pr/3367/docs/search.index/181cee09dbfd.js new file mode 100644 index 0000000000..c696ef6dde --- /dev/null +++ b/pr/3367/docs/search.index/181cee09dbfd.js @@ -0,0 +1 @@ +rn_("AQQAOzAAAAEAAKEAAgC1EAAADxGgAAGAA6AgAAAag6BQAAAbeaAQAAAaAGFlcwGDAqBwAAAcKqCAAAAcUGNzAQgBsFAb3QBvYwFaGQAAAQABoEAAABnwZTswAAABAAAFAAIA5BADAHIbAQABAwD22RsAAAEAJgABAAoAAQABAQD21xsAAAEAJgABAAoAAQATgQKgQAAAHIBjbQEBAPRmGgAAAQDYAQEAI4ACoGAAABycbnoBBgD2YxwAAAEADgABAAgAAQDXAQAAh6BgAAAcf6BwAAAcxKBgAAAcgRgBD/QVGQAADAA8APQBAYACoAAAABjmoAAAABjnNDbzAwF2AXETAACXAAAAx6CQAAAclaBwAAAcfaCAAAAbpLAgHCAAAaCgAAAcqsAAAg87MAAAAQAAFAAKAMkJAAAbDAEABhEDAE0TAQCVFwEA5RgAANEbAABCHAMAnRwBALscAQABAAKgMAAAHGWgIAAAHDZidfPxGAAAEwMwAJcBAICFoQAAABytsAAXrQFrCAhFAYACoDAAABlroRAAAB0CZWn3IQAAiqBAAAAbjaDQAAAc2qBQAAAb+LAAA3gVKbjQB/WICwAAAQcBAN8GNgM=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1828c63cb5eb.js b/pr/3367/docs/search.index/1828c63cb5eb.js new file mode 100644 index 0000000000..c15c2d9331 --- /dev/null +++ b/pr/3367/docs/search.index/1828c63cb5eb.js @@ -0,0 +1 @@ +rn_("AYADoAAAABxdoAAAABxeoHAAABzCNDZhAQAAOzAAAAEAABAABQCRGwUATRwBAIQcBQCWHAEAvRwAACOAArAwHIwAAXJzFwEAAMWg0AAAHK6wYBz4AAugYAAAHLoADIAMOzAAAAEAAAYAAwDTEAMAURMBADAaAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/18b0f64900c6.js b/pr/3367/docs/search.index/18b0f64900c6.js new file mode 100644 index 0000000000..ece82cc31c --- /dev/null +++ b/pr/3367/docs/search.index/18b0f64900c6.js @@ -0,0 +1 @@ +rn_("AQoA9J0cAAABAB0AAQABBAGgAAAAHHRzAeEZAADzgAJlaQEFAaBgAAAcSWIBTRkAAAECA6BQAAAbe6AwAAAcqaBgAAAc12Nwc/KyGAAAVgPzgQJscwEBAaBgAAAcaWIB7hkAABOEA6AwAAAcD6BQAAAcW2VudROBAqCQAAAcXGJ05wAAAIawQBNeAAGgIAAAG7ugIAAAEpYQgA/ybwkAAAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/19230ca54f08.js b/pr/3367/docs/search.index/19230ca54f08.js new file mode 100644 index 0000000000..bc95770f51 --- /dev/null +++ b/pr/3367/docs/search.index/19230ca54f08.js @@ -0,0 +1 @@ +rn_("AYACoAAAABjtoAAAABjuNDYBgAKgAAAAHF2gAAAAHF40NiOCArBgHPgAC3J28wICZXY6MAAAAQAAAAAACAAQAAAAsBGxEbIRsxG0EWwZDxooGhwb") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1c0b3a05c267.js b/pr/3367/docs/search.index/1c0b3a05c267.js new file mode 100644 index 0000000000..6bc50cd371 --- /dev/null +++ b/pr/3367/docs/search.index/1c0b3a05c267.js @@ -0,0 +1 @@ +rn_("AQABoBAAAAw1ZTswAAABAAAFAAEAchgFAAEDADswAAABAABjAAIALxkAALUaYgABgAKgcAAAHEqgUAAAGV1lb/MAAXPyvhgAAG0D84ADZGl0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1c2be8241d46.js b/pr/3367/docs/search.index/1c2be8241d46.js new file mode 100644 index 0000000000..a959c9c268 --- /dev/null +++ b/pr/3367/docs/search.index/1c2be8241d46.js @@ -0,0 +1 @@ +rn_("AQIA86UbAAADAAIA8wABbAEOHAAAAQADoDAAABlUoCAAABDsoDAAABNlZHN0OzAAAAEAAAUAAgC6CQAAahoEAPOAAmRl") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1cae2e6bab46.js b/pr/3367/docs/search.index/1cae2e6bab46.js new file mode 100644 index 0000000000..a6bf17a8a5 --- /dev/null +++ b/pr/3367/docs/search.index/1cae2e6bab46.js @@ -0,0 +1 @@ +rn_("AQgA9HgcAAABAGgAAQAjAAKgMAAADeBhczowAAABAAAAAAAPABAAAADkBuUGJAxNDH4SrhKKGIsYjBjnGO4YLRqeG58bXhzrHA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1de7774e957d.js b/pr/3367/docs/search.index/1de7774e957d.js new file mode 100644 index 0000000000..a6b84d7cb2 --- /dev/null +++ b/pr/3367/docs/search.index/1de7774e957d.js @@ -0,0 +1 @@ +rn_("AQQBoAAAABvNcwExHAAAIwWEoQAAABz3oEAAABuPoIAAAB0AFAAGASMWAAATAAOgUAAAGSugcAAAGXZlcHI6MAAAAQAAAAAACAAQAAAAYwNkA2UDZgNeDK8SsBJWG1sb") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1e16849da0f4.js b/pr/3367/docs/search.index/1e16849da0f4.js new file mode 100644 index 0000000000..cbf890eeea --- /dev/null +++ b/pr/3367/docs/search.index/1e16849da0f4.js @@ -0,0 +1 @@ +rn_("AQcBoEAAABzRYgFoHAAAE4YCsCAbagABZG0BCQGggAAAHPxmASkcAAABAwGwcBygAAFm88QYAACQAwEAI4ACoCAAABeOYXIBAgA7MAAAAQAALwABAB0bLwABgAKgEAAAEyygEAAAGSBuevMAhACBDPVxDAAAnwF2C5MBtAABAAD0XhoAAAEAAQABAEOAA6BwAAAaT6AAAAARt2F4eQGAA6BQAAAZIaCwAAAcM7AgEq8AAWFsbwGAArAQG30AAaAQAAAYJHN0AQMA8xkcAAA2ALIAE4ACoBAAABl0ZnQBgAKgUAAAGgWgMAAAF41hZQGAAqAgAAAbWqAgAAAbW2lvJwAAg8WgoAAAHMOgQAAAG6qgIAAAGjegMAAAHBoAAaAMAQYBoEAAABzYYgFqHAAA84ACYWkBAgDzwxgAAJsAlwMTggKg8AAAHQBmZwGAAqCAAAAc7KBgAAAc+WRzE4ACoFAAABkuaXUBBQGwYByiAAFpAd4bAADzAgFoASsTAAABAgGwgByvAAFm8usYAAABAFOAA6CgAAAc53J0dff2AQCOoEAAABpXsDAcFQABsJAc5QAYn5UPOzAAAAEAALUADwCXCQEAqAoEANQMAAA9EwEAYRMAAEIUAQAmFpsA7RYAAN0ZAQAGGgEAexsAANkbAQAAHAEACxwBADEcAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/1ff1669124ff.js b/pr/3367/docs/search.index/1ff1669124ff.js new file mode 100644 index 0000000000..52ed47a82f --- /dev/null +++ b/pr/3367/docs/search.index/1ff1669124ff.js @@ -0,0 +1 @@ +rn_("AQQA9WITAAABAFAFAQC/AQGCAqAwAAAcy6BQAAAc5mNyI4ACoDAAABNhaW8BAQKgUAAAGMGgQAAAF4ljbPWUCQAARAAqEnMAfgABgAKgAAAAGn6wMBeHAAFkcgGDAqBAAAAbyaBAAAAbymJsZwAAAYawEA3EA0ewAAxmAAGwIBCvAsmgMAAAGBkWABo7MAAAAQAABwACAJMJAADRCQYA84ACcHPzgANlbG8=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/202ee8ed5c1b.js b/pr/3367/docs/search.index/202ee8ed5c1b.js new file mode 100644 index 0000000000..e1bf23d51a --- /dev/null +++ b/pr/3367/docs/search.index/202ee8ed5c1b.js @@ -0,0 +1 @@ +rn_("AYICsEAbfwABoEAAABuBZHPzAAFu8gwIAAABAAECAbCwHLYAN2Y7MAAAAQAACwAEAAoOAgAjEwIAgxkBAEYaAwDzgAJhZQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/205ae3b958da.js b/pr/3367/docs/search.index/205ae3b958da.js new file mode 100644 index 0000000000..d38e09be81 --- /dev/null +++ b/pr/3367/docs/search.index/205ae3b958da.js @@ -0,0 +1 @@ +rn_("AYECsAAcJAABoQAAABzyZHQjgAKggAAAHPZucvMAAXU6MAAAAQAAAAAALgAQAAAAmgltC24LbwvGEAARKRMqE0ETYhNjE4QXnxeuF7MXsxi0GMEYwxjiGOMY5BgbGUsZXhl9GX4ZfxnsGXIacxp4GnkaqxusG60brhvdG+Eb7htMHFccbByKHLcc9RwEHQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/21fff7495201.js b/pr/3367/docs/search.index/21fff7495201.js new file mode 100644 index 0000000000..47e4c165e0 --- /dev/null +++ b/pr/3367/docs/search.index/21fff7495201.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAABEABAAwGQgAOhkDAGIaAwBBHAAAAQABoEAAABn5ZTswAAABAAAJAAQAdhwDAOEcAQDoHAEABh0BABOAAqBQAAAaaGRzU4ADoOAAABz1ZW9y") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2278700d791d.js b/pr/3367/docs/search.index/2278700d791d.js new file mode 100644 index 0000000000..5c2e4f76ba --- /dev/null +++ b/pr/3367/docs/search.index/2278700d791d.js @@ -0,0 +1 @@ +rn_("AYECsAAaPQABsDAbiQABc3TzAQFtASwcAAABAAA6MAAAAQAAAAAADgAQAAAA8g3zDfQNkBKREpISkxKUEpUSXBllGYAZ2RkJGqYbAYECsAAcJAABoQAAABzyZHQjgAKggAAAHPZucvMAAXU6MAAAAQAAAAAALgAQAAAAmgltC24LbwvGEAARKRMqE0ETYhNjE4QXnxeuF7MXsxi0GMEYwxjiGOMY5BgbGUsZXhl9GX4ZfxnsGXIacxp4GnkaqxusG60brhvdG+Eb7htMHFccbByKHLcc9RwEHROAAqBgAAAb9Wdy44CEoEAAABw4AUEB") \ No newline at end of file diff --git a/pr/3367/docs/search.index/237c954227a8.js b/pr/3367/docs/search.index/237c954227a8.js new file mode 100644 index 0000000000..4003c84f29 --- /dev/null +++ b/pr/3367/docs/search.index/237c954227a8.js @@ -0,0 +1 @@ +rn_("AQIBoEAAABzgdPT8GwAAWgB4ACYAE4ACoDAAABzfaXABhwKgAAAAHF2gAAAAHF40NhOAAqBAAAAbU2FyE4ECoDAAABn9ZHMBgAKgIAAAEp+gYAAAHItuePOAA2VycxOAAqAwAAAcYnJ0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/23bfc129cb27.js b/pr/3367/docs/search.index/23bfc129cb27.js new file mode 100644 index 0000000000..dcce67f2c3 --- /dev/null +++ b/pr/3367/docs/search.index/23bfc129cb27.js @@ -0,0 +1 @@ +rn_("AYACoBAAABD2oGAAABvvbm8BAAKgYAAAHEmgMAAAHJRiczowAAABAAAAAAANABAAAAAADpkOkxeUF/QY9Rj2GPcY+Bj5GPoYTRnEG9sbhwAAAIWwMBevAAGgQAAAGOCwMBkeAAGgoAAAG/KSAAM7MAAAAQAADgACAFEMAgDiDAsAw4AEoAAAABJ9oAAAABJ+NDZlaQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/24cce4f7d1a8.js b/pr/3367/docs/search.index/24cce4f7d1a8.js new file mode 100644 index 0000000000..e602a9c4c4 --- /dev/null +++ b/pr/3367/docs/search.index/24cce4f7d1a8.js @@ -0,0 +1 @@ +rn_("AQUA8yoaAADpAW8AAQABoEAAABorcgF2GQAAJwQAAIegkAAAHPSgQAAAHGugcAAAHC6hUAAAHQOgUAAAGgQawRD0ig4AAFAIqQSRAAEBAaBQAAAZTmsBSwwAAAEDADswAAABAACdAAIAPRMBACYWmwDzgAJsdPOAAmFl") \ No newline at end of file diff --git a/pr/3367/docs/search.index/25b0eb496f36.js b/pr/3367/docs/search.index/25b0eb496f36.js new file mode 100644 index 0000000000..a5dd562916 --- /dev/null +++ b/pr/3367/docs/search.index/25b0eb496f36.js @@ -0,0 +1 @@ +rn_("AYkCoCAAABzOoDAAABzfaXATAAKgIAAAG9RlaTswAAABAAAJAAQAvBAEALoRAgAuGgAAERwAAIMChLBAHNEAB6BAAAAbxqEAAAAc9BIAA/YSDgAAywqbAAIA7gICAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/25bb83d41259.js b/pr/3367/docs/search.index/25bb83d41259.js new file mode 100644 index 0000000000..15ccc11ea2 --- /dev/null +++ b/pr/3367/docs/search.index/25bb83d41259.js @@ -0,0 +1 @@ +rn_("AYQCsAAaPQABsDAbiQABc3QBAAA7MAAAAQAAYwACAF0MAACsDmIAE4ACsDATcgABZHLHAAAAhrBgE1EAAaAAAAADhbCAG4sAAaBwAAAZYrkIADswAAABAAAXAAkAfgkEAGEMAACbDgkA6BABAEgTAQCGGAAAdRkAACocAACbHAAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/25f2248e37b0.js b/pr/3367/docs/search.index/25f2248e37b0.js new file mode 100644 index 0000000000..08abf62c27 --- /dev/null +++ b/pr/3367/docs/search.index/25f2248e37b0.js @@ -0,0 +1 @@ +rn_("AQEA9u0NAAABAAEAHAwBAKMBAYACoAAAABxdoAAAABxeNDYjggKwYBz4AAtydvMCAWUBbBkAABcBAICGoRAAAB0BoSAAABz1sBAN6AABsCAbfwABCKgM") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2637f960d29a.js b/pr/3367/docs/search.index/2637f960d29a.js new file mode 100644 index 0000000000..96095bcb7e --- /dev/null +++ b/pr/3367/docs/search.index/2637f960d29a.js @@ -0,0 +1 @@ +rn_("AQMBsIAc4QABc/KeGwAAAQAjAAOgMAAADd+wgBx2AAFhaXM6MAAAAQAAAAAADQAQAAAA4gbjBiMMTAx9Eq0ShxiIGIkY5hjtGCwaXRzqHA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/266d2a2746a7.js b/pr/3367/docs/search.index/266d2a2746a7.js new file mode 100644 index 0000000000..114a1e5667 --- /dev/null +++ b/pr/3367/docs/search.index/266d2a2746a7.js @@ -0,0 +1 @@ +rn_("AYACoBAAABoNoGAAABxZbnUBgAKhIAAAHPWwEBoLAAFudJcAAACFoDAAABxloKAAABy+oCAAABw2A0EI8/EYAAATAzAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/266f6ec56a8c.js b/pr/3367/docs/search.index/266f6ec56a8c.js new file mode 100644 index 0000000000..5ad50a2b50 --- /dev/null +++ b/pr/3367/docs/search.index/266f6ec56a8c.js @@ -0,0 +1 @@ +rn_("AQ0A9EIcAAABAAEAAQATAAKgYAAAGfhibjowAAABAAAAAAAOABAAAAC3DMoNyw3MDRcOGA4ZDtgY2RhSGVMZFxw4HJAckRw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/276c8e8c0d06.js b/pr/3367/docs/search.index/276c8e8c0d06.js new file mode 100644 index 0000000000..0d632e54d6 --- /dev/null +++ b/pr/3367/docs/search.index/276c8e8c0d06.js @@ -0,0 +1 @@ +rn_("AQQA87QaAAACAjcAAYQCoDAAABzLoFAAABzmY3LzAQJjbwEYHAAAI4ACsMAclgABcnMBAgGggAAAHGB0AfYNAAABAQGgMAAAG+ZyASkaAADzgAJlaQGCArBAG38AAaBAAAAbgWRz8wACbnLyDAgAAAEAAQIBsLActgA3ZjswAAABAAALAAQACg4CACMTAgCDGQEARhoDANcAAACGoDAAABlUoCAAABDsoDAAABNlGQEGOjAAAAEAAAAAAAoAEAAAABsBugn3DfgNXRNqGmsabBptGm4aaRs=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/277157212f78.js b/pr/3367/docs/search.index/277157212f78.js new file mode 100644 index 0000000000..0fa95bff0b --- /dev/null +++ b/pr/3367/docs/search.index/277157212f78.js @@ -0,0 +1 @@ +rn_("AQgA9EIcAAABAAEAAQABAQGgIAAAHJVyOzAAAAEAABEABwAsDAIAaAwIAC4ZAABRGQAAHxwAAEgcAQBpHAAAMwADsCAaMwABZWlvOzAAAAEAAAYAAQAWCAYA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/27c6d4d52a18.js b/pr/3367/docs/search.index/27c6d4d52a18.js new file mode 100644 index 0000000000..91a924d9e3 --- /dev/null +++ b/pr/3367/docs/search.index/27c6d4d52a18.js @@ -0,0 +1 @@ +rn_("AYACsCAaCwABoCAAABoNYW8TAwOgYAAAHPOgcAAAG75kc3T2yhAAAAEAtAEBAAsJAQAjAAKggAAAHPxmaPLIDQAAYQ4=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/27e30083cf08.js b/pr/3367/docs/search.index/27e30083cf08.js new file mode 100644 index 0000000000..b8432eb5eb --- /dev/null +++ b/pr/3367/docs/search.index/27e30083cf08.js @@ -0,0 +1 @@ +rn_("AYECgByAAyAOoHAAABumZG4BBQGgQAAAG8Vl9DEaAAABAPABAQABBgGggAAAHMJ2ATAaAADzgQJhbgEBAPbHDQAAKQMBAMUARwUABZcBAIDFsAAKrgABoBAAABKEAAKICg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/283e86585e60.js b/pr/3367/docs/search.index/283e86585e60.js new file mode 100644 index 0000000000..773a612d1c --- /dev/null +++ b/pr/3367/docs/search.index/283e86585e60.js @@ -0,0 +1 @@ +rn_("AYACsBAN2wABoDAAABNCbnKHAAAAhrAwFtQAAaBwAAAbHKBQAAAXn7AwG+IAAaAgAAASgxeACPX8BwAAAQBqAQEAmxIBAAOgkAAAHM+gQAAAHC2gYAAAHHVkZXMBaBkAAPMGAXPynRcAAAEAAYACsFAXmwABsCAbuQABYW+HAwAAh7AwEoEAAaBwAAAaD6BQAAATQaAgAAAOhgeAC/VrBQAAAQABAAEAAQA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/290b514604c2.js b/pr/3367/docs/search.index/290b514604c2.js new file mode 100644 index 0000000000..43c7e82432 --- /dev/null +++ b/pr/3367/docs/search.index/290b514604c2.js @@ -0,0 +1 @@ +rn_("AQcA9H8aAAABAAEAAQAjgAKgcAAAGn5hcgEAAaAwAAAZHGbz4QwAABcQCwABiAKgQAAAHMygAAAAHCZlcwGBAqAAAAATYKAAAAAW92RyQ4EDoGAAABzaoGAAABnvY21wE4ACoFAAABt6YWUBDQGgQAAAHMZlAZgcAAABgAKgIAAAGoOgEAAAGgBhcycAAIKFoSAAAB0CoEAAABuNoNAAABzaoFAAABv4CNABAQMBoDAAABv2Y/L+GQAAAQABgAKgUAAAG8igYAAAG/didvOAAmRyAQUAOzAAAAEAAAYAAwB4GgEAqxsDAIocAABndwAAjKAQAAAaBKAgAAASqaCwAAAbtqBgAAAcB1XVDjowAAABAAAAAAAZABAAAAAGBwcHCAcJB7sJmAt1EnYSIBMhE+MW5BblFk8ZuRu6G8AbwRviG+MbOxw8HJIckxykHKUc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2935fb158147.js b/pr/3367/docs/search.index/2935fb158147.js new file mode 100644 index 0000000000..b9e2e69398 --- /dev/null +++ b/pr/3367/docs/search.index/2935fb158147.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAAMYAAgC5EAAAehPFAPMAAW07MAAAAQAAyAACAJUJAADdCccAAQQAOzAAAAEAADAAAgAsGQAAhBovAPMAAW8BfAsAAAEBAPPCFgAAAQAzBROBAqAwAAAXmWRt8wACY3M7MAAAAQAAlgA9AOkHEgDPDQEA5w0AAA0OAACxEAEAthABAMEQAQDOEAIA6hABAO0QAgD6EAEAAxEAAFQTCABeEwEAZxMAAGwTAAByEwEAdxMAAIcXAQCPFwEApRcBALQXAwDIGAQA4BgAAOgYAAAwGQgAOhkDAFAZAADbGQEA4hkFAOkZAADwGQIA9RkEAP4ZAQBRGgMAVxoAAGIaAwB2GgEAehoAAFgbAABmGwEAbxsAAHgbAACXGwAAqRsAALQbAADFGwEA5RsAAOcbAQDwGwEA8xsBAC0cAAA5HAEAPRwBAEEcAABrHAAAjBwDAJUcAACqHAAAxRwBAMwcAADzgAJydw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2953647cde0d.js b/pr/3367/docs/search.index/2953647cde0d.js new file mode 100644 index 0000000000..96151e5f3f --- /dev/null +++ b/pr/3367/docs/search.index/2953647cde0d.js @@ -0,0 +1 @@ +rn_("AQcBsEAcOQABZQHOGwAAAYACoGAAABvgoDAAABpVZXQBAwD10xkAAAEAAQABAAEAAQEBoJAAABzFbPPNGAAACAOMAAGDAqAQAAAcS6CwAAAc82xzAQQA9FEaAAABAAEAAQABBAGgAAAAG2xk8lAaAABAAecLAAGJoLAAABy5oGAAABvfoDAAABnYlgkHOzAAAAEAAAkAAgAvEwcAJBYBAAEAAPUuEwAAPwYBAAEAAQATAAKwoBzHAAFndgEaGQAA84ACbm8BAwD1yBgAAAEAAQABAAEAI4ACsAAY0ABAZHJnAgAAhrBQGgYAAaBgAAAZ0rAAGG4AARRBEjswAAABAAAJAAQAMAwDAIIMAQCxFwEA2xgBAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2963dbe6343a.js b/pr/3367/docs/search.index/2963dbe6343a.js new file mode 100644 index 0000000000..5c775cd944 --- /dev/null +++ b/pr/3367/docs/search.index/2963dbe6343a.js @@ -0,0 +1 @@ +rn_("AQABoGAAABxpYgHuGQAAAQABoEAAABk+ZfNgGwAAQAEBAPOAAmRyJwAAAIWgQAAAG1ewcBwSAMGgMAAAHA+gUAAAHFsYIQg7MAAAAQAACAADAH0LAADZDAYA5hYAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/29ffdf834871.js b/pr/3367/docs/search.index/29ffdf834871.js new file mode 100644 index 0000000000..0ca670a6f1 --- /dev/null +++ b/pr/3367/docs/search.index/29ffdf834871.js @@ -0,0 +1 @@ +rn_("AQMA9tkbAAABACYAAQAKAAEAAQEA9tcbAAABACYAAQAKAAEAE4ECoEAAAByAY20BAQD0ZhoAAAEA2AEBACOAAqBgAAAcnG56AQYA9mMcAAABAA4AAQAIAAEA1wEAAIegYAAAHH+gcAAAHMSgYAAAHIEYAQ/yFRkAAAwA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2b0cb4045433.js b/pr/3367/docs/search.index/2b0cb4045433.js new file mode 100644 index 0000000000..08fc612213 --- /dev/null +++ b/pr/3367/docs/search.index/2b0cb4045433.js @@ -0,0 +1 @@ +rn_("AQQAOzAAAAEAAAUAAQDiGQUA8wIBZTswAAABAAAKAAUAyRAAAMQWAwBwGwEAiRsBACccAQABAwOgUAAAGiKgMAAAHJugoAAAHFhjZHABsRwAAAEGAaCwAAAc7WbygxkAAAEAI4ACsBAcIAABcnMBgAKgYAAAHMSgMAAAGR1vcgEDAPbZGwAAAQAmAAEACgABAAEBAPbXGwAAAQAmAAEACgABABOBAqBAAAAcgGNtAQEA9GYaAAABANgBAQBDgAOgkAAAG9GgYAAAHJxnbnoBBQKgYAAAHC+gMAAAG51jcPOiFwAAAQABABOAAqBQAAAcf254AQYA9mMcAAABAA4AAQAIAAEA9wMAAIegYAAAHIEYAQ/1FRkAAAwAPAD0AeEAAYACoBAAABKqoLAAABxiYW8jAAKgQAAAE2xldAF7CQAAAQQBoCAAABppcwHaGAAAQwCEoDAAABkXoFAAABlLsDAcOwABRYAAOzAAAAEAABUABgBCDAQAvQwKAN4YAQDvGQAAVhoAAHkbAQAjgQKgMAAAE0ppcwEDAaBgAAAbem3z4xYAAAEAAQBDgAOgoAAAHBOwUBmBAAFjbHDjgISg4AAAHPIRAUABAgD0wBsAAAEA0QABABOAAqBgAAAZI29yAQUAOzAAAAEAAGMAAgAvGQAAtRpiAIOAhKBQAAAbvrBQGT8AAaAgAAAc4ABEDAEDAbAwGWUAG2nygA4AAAEAAYoCoIAAABz5oJAAABz9YnUjgQKxAByMAAFweAECADswAAABAAAGAAIA9xACAP4WAwABAQGwIBegBAJvAWIcAAAjgAOwMBNNAAGg0AAAHGFjbXIBgAOgQAAAHMygIAAAE2egAAAAHCZlcnMjgAKgMAAAHFBjcgGAAqAAAAAY5qAAAAAY5zQ28wIBdgFxEwAAE4ACoDAAABLTZGxX+1UA06CQAAAclaBwAAAaOaBwAAAcfaCAAAAbpKCgAAAcqqAAAAAOIcBkv386MAAAAQAAAAAAIgAQAAAACgMJCAoIdwl4CXkJegnJCYcLmQuaCxsMHAzGDewQBhEHEQgRCRFNE04TlReWF+UYKxppGtEbQhxDHEQcRRydHJ4cuxy8HA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2b5b9ba6e7b8.js b/pr/3367/docs/search.index/2b5b9ba6e7b8.js new file mode 100644 index 0000000000..f244234f7d --- /dev/null +++ b/pr/3367/docs/search.index/2b5b9ba6e7b8.js @@ -0,0 +1 @@ +rn_("AQIA9OkbAAABAAEAAQABggKgAAAAHOqgAAAAHOs0NvMLAWkBmRwAAAEAArDAHI4AAbBgHGAATWVyOzAAAAEAAAsABACqCQEARhMBAEUZAwAbHAMAE4ACsFAXrQFraHIBAAGggAAAHPJ18joaAAABAAGBhKBQAAAZdqAwAAAcuLCQHCIAAaBQAAAbxAQYAgEEAPRCHAAAAQABAAEAE4ACoEAAABkrYXIBBwGgQAAAHMZlAZgcAAABgAKwUBuhAGygUAAAG4JpbBOAAqBAAAAZ6mF1AQQBoAAAABvNcwExHAAAIwSEoQAAABz3oEAAABuPoIAAAB0AFAAGASMWAAABAgA7MAAAAQAAEQAEADAZCAA6GQMAYhoDAEEcAAAjgAKg4AAAHPVvcsMAhLAAHFgAgqBgAAAc2QggA/YhGgAAAQABAFIAVgELAAEJAaBAAAAc4HQBVhwAAAEBAbCAHIwAAXIBNRoAABOAAqBgAAAboGR09/AHAM+wMBenAAGgQAAAHCywIBNwBXmgUAAAG7LAbKeLOzAAAAEAAMoAIwBeAwMAYwMDAPwGAADICQAAVgwAAF4MAADyDAEA+QwBANMNAwDdDQEA9g0AAAMOAACCDgEAhw4AAJMOAAC4EAAAuxAAAPUQAQCvEgEA1hJIAC4TAABoEwIAFhkAACQZAAAmGQAAahkAAG0ZAwB3GQAAiRlGAFUbAQBaGwEAxxsAANQcAwDZHAAA+hwBAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2b5d1e7f49ec.js b/pr/3367/docs/search.index/2b5d1e7f49ec.js new file mode 100644 index 0000000000..22eb811362 --- /dev/null +++ b/pr/3367/docs/search.index/2b5d1e7f49ec.js @@ -0,0 +1 @@ +rn_("AQMA9icaAACOAQcAAQAFAAEA8wEBbvSnFwAAAQB2AQEAAYACoDAAABtZsAASdQABaXQBAgGwQBw5AAFlAc4bAAABgAKgcAAAHCqggAAAHFBjcwEAAPU5GgAAawG8AE0AUwDzgAJkZdcBAICFoHAAABvWAJgD") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2bec31d48a42.js b/pr/3367/docs/search.index/2bec31d48a42.js new file mode 100644 index 0000000000..029e17ae11 --- /dev/null +++ b/pr/3367/docs/search.index/2bec31d48a42.js @@ -0,0 +1 @@ +rn_("AQIA9EQTAAABACsHAQABBgD0XhoAAAEAAQABAAELAPRGHAAAAQCCAAEAAQgA9MAbAAABANEAAQCzgISgMAAAGUEBSCABBwD0dBsAAAEAAQABABOAArBAHMcAAWl0AQUA9FgaAAABAAEAAQATgQKwUBpcAAFscwGAArFQHPoAAbBwG3IAAXJ1AQUAOzAAAAEAAAcAAgBFGQMAGxwDAAEEAbAwG3AAAXTz1RgAAAEAAQABCgD06RsAAAEAAQABALcfAAOKoKAAABvtsLAcIAABsIgf8qIcAAABABMAAqEQAAAcuGFmASYaAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2cba34e439d7.js b/pr/3367/docs/search.index/2cba34e439d7.js new file mode 100644 index 0000000000..9039546be5 --- /dev/null +++ b/pr/3367/docs/search.index/2cba34e439d7.js @@ -0,0 +1 @@ +rn_("AQABoEAAABbrcvL0EAAAQQsBAQD10xkAAAEAAQABAAEAI4ACoFAAABliYXMBAQKgUAAAGeygcAAAHJ9jZvKJCwAACANDgAOgUAAAHGKgIAAAG8pmbW7zgANpb3k=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2cc89c599382.js b/pr/3367/docs/search.index/2cc89c599382.js new file mode 100644 index 0000000000..3fc8546c01 --- /dev/null +++ b/pr/3367/docs/search.index/2cc89c599382.js @@ -0,0 +1 @@ +rn_("AQEBoDAAABN0Y/YXDAAAAQCTEAEAGwABAAEAADowAAABAAAAAAANABAAAAAQCIcJiAmJCYoJiwmMCQgO4RA/E44XuBclGVUaAQgA8/oZAABkAQEAE4ACoIAAABznY28BAAGgQAAAG/Rl94QJAAABAAEAPwTrAjcGqAR3AQCAhaAgAAAOBxABDg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2d42e48fe501.js b/pr/3367/docs/search.index/2d42e48fe501.js new file mode 100644 index 0000000000..0ea5f2c6a5 --- /dev/null +++ b/pr/3367/docs/search.index/2d42e48fe501.js @@ -0,0 +1 @@ +rn_("AQMBoCAAABnrZgF7GAAAFwAAgIWgMAAAGP2wIBh4AAGgIAAAGHqgUAAAGhAAFRETgQKgIAAAEoVsdPMAAWk7MAAAAQAAEAEEAHAFqwAcBwAALxkAALUaYgABAQGgQAAAGT5l82AbAABAAQEA8wABZQF9CwAAE4ACsFAc5QAYaHQBBQD1ahoAAAEAAQABAAEA8wIBcgGaDgAAAQEAOzAAAAEAAGMAAgAvGQAAtRpiACOAAqAwAAATcGdpAYACsEAbfwABoEAAABuBZHMBAAGgkAAAHMVs880YAAAIA4wAtw4AAMiggAAAGiGwwBwVAAEABswD9kgMAABNAhoCyQLYB+YA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2d5415483f4a.js b/pr/3367/docs/search.index/2d5415483f4a.js new file mode 100644 index 0000000000..b590a6fc12 --- /dev/null +++ b/pr/3367/docs/search.index/2d5415483f4a.js @@ -0,0 +1 @@ +rn_("AQIA9OkbAAABAAEAAQABggKgAAAAHOqgAAAAHOs0NvMLAWkBmRwAAAGAArBwHGAATbBQF60Ba2hyAQABoIAAABzydfI6GgAAAQABgQOgMAAAHLiwkBwiAAGgUAAAG8RsbXMBBQD0QhwAAAEAAQABAAEHAaBAAAAcxmUBmBwAAAGAArBQG6EAbKBQAAAbgmlsE4ACoEAAABnqYXUBAwA7MAAAAQAAEQAEADAZCAA6GQMAYhoDAEEcAAAjgAKgYAAAHNlucgEJAaBAAAAc4HQBVhwAAAEBAbCAHIwAAXIBNRoAABOAAqBgAAAboGR09/AHAM+wMBenAAGgQAAAHCywIBNwBXmgUAAAG7LAbKeLOzAAAAEAAMAAHwBeAwMA/AYAAMgJAABWDAAA8gwBAPkMAQDTDQMA3Q0BAPYNAAADDgAAgg4BAIcOAACTDgAAuBAAAPUQAQDWEkgALhMAAGgTAgAWGQAAJBkAACYZAABqGQAAbRkDAHcZAACJGUYAVRsAAFobAADHGwAA1BwDANkcAAD6HAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2d70d64be50a.js b/pr/3367/docs/search.index/2d70d64be50a.js new file mode 100644 index 0000000000..d7b678fd31 --- /dev/null +++ b/pr/3367/docs/search.index/2d70d64be50a.js @@ -0,0 +1 @@ +rn_("AYACoCAAABtVoCAAABtWaW8BCgGgcAAAHQViAcEcAAABggKgIAAAHBCgQAAAHF9rcHcAAIOFoEAAABuloCAAABovBoAJAYICoAAAABosoAAAABotNDYjggOgQAAAGi6gQAAAG1RnaXLzgAJhaQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2e4662473246.js b/pr/3367/docs/search.index/2e4662473246.js new file mode 100644 index 0000000000..0862fdfb77 --- /dev/null +++ b/pr/3367/docs/search.index/2e4662473246.js @@ -0,0 +1 @@ +rn_("AYACoFAAAByUoHAAABvvZWmDAgSwYBpvAXWw4Bz6AAGgAAAAGOpobXN29fkNAAABAJ0AAQD6CBMBArAAC4sAAWNzAZwbAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2ea52f60e4c6.js b/pr/3367/docs/search.index/2ea52f60e4c6.js new file mode 100644 index 0000000000..ee973868ae --- /dev/null +++ b/pr/3367/docs/search.index/2ea52f60e4c6.js @@ -0,0 +1 @@ +rn_("AQQA83wZAADgAAEAI4ADoBAAABorGCjGPLXrZXBzAQIA9FgaAAABAAEAAQAjAgKgQAAAG6lldfICFwAAUQQBAAA7MAAAAQAABQABAG8SBQBnAQCAhaAQAAAb5rAwG2YAASEIAw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/2ee3edb33798.js b/pr/3367/docs/search.index/2ee3edb33798.js new file mode 100644 index 0000000000..b1193ca2bd --- /dev/null +++ b/pr/3367/docs/search.index/2ee3edb33798.js @@ -0,0 +1 @@ +rn_("AQUBoCAAAByVcgEuGQAAAQACoIAAABzsoGAAABz5ZHPyxA0AAEcDJwEAgIagIAAAHQKgwAAAHEqgEAAAGjiwMBbgBG4QwUg=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/304771dc1af7.js b/pr/3367/docs/search.index/304771dc1af7.js new file mode 100644 index 0000000000..dd86106407 --- /dev/null +++ b/pr/3367/docs/search.index/304771dc1af7.js @@ -0,0 +1 @@ +rn_("AQEA8/AWAAABAAEAAYECoFAAABwysAAboQBscnMBAAD1EggAAAEAfgEJDlMEpwEAgIWhAAAAHL2gUAAAGRkYgAM=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/30b4a65e652d.js b/pr/3367/docs/search.index/30b4a65e652d.js new file mode 100644 index 0000000000..0a057cb7b9 --- /dev/null +++ b/pr/3367/docs/search.index/30b4a65e652d.js @@ -0,0 +1 @@ +rn_("AQgA9HgcAAABAGgAAQAjAAKgMAAADeBhczowAAABAAAAAAALABAAAADkBuUGJAxNDK4SihiLGIwYLRqeG58b6xwBAwGwgBzhAAFz8p4bAAABACMAA6AwAAAN37CAHHYAAWFpczowAAABAAAAAAAJABAAAADiBuMGIwxMDK0ShxiIGIkYLBrqHPOAAjQ2") \ No newline at end of file diff --git a/pr/3367/docs/search.index/30d87768308a.js b/pr/3367/docs/search.index/30d87768308a.js new file mode 100644 index 0000000000..90c3427122 --- /dev/null +++ b/pr/3367/docs/search.index/30d87768308a.js @@ -0,0 +1 @@ +rn_("AQCFoAAAABz2oIAAABvLsJAb8AABsAAHHQABoAAAABk+BIFCOzAAAAEAACgADgAlAQAAQQMFAP0NAgCGDgAAgxIAAJYSAACbEgIAohIGAEQTAQCBGQEAQBoFAFgaAwBwGgEAIBwBAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/311f6ce98ccf.js b/pr/3367/docs/search.index/311f6ce98ccf.js new file mode 100644 index 0000000000..78e4333d85 --- /dev/null +++ b/pr/3367/docs/search.index/311f6ce98ccf.js @@ -0,0 +1 @@ +rn_("AQABoCAAABnrZgF7GAAAEwACsAATbwVfZHI7MAAAAQAARQAEAPwQAACxEiEAkRcAAEwYIQAjgAKwkBw9AAFhZQEBAaBwAAAcLmnyig4AAFAIhwEAgMU1DkAUtkWgAAAADpCgYAAAHA4AAiCK") \ No newline at end of file diff --git a/pr/3367/docs/search.index/31269b47306b.js b/pr/3367/docs/search.index/31269b47306b.js new file mode 100644 index 0000000000..1cc0696aee --- /dev/null +++ b/pr/3367/docs/search.index/31269b47306b.js @@ -0,0 +1 @@ +rn_("AQMA8/UZAAABAAEAI4ACoGAAABvHbnIjAAKhAAAAHNliZTswAAABAAAUAAgAowkAAP0QAQABEQAAQxMAAHwYCQDqGQAAdBsDAL8bAAAjgAOgcAAAGjWwABwgAAFhZWw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/31a52d7a0e9a.js b/pr/3367/docs/search.index/31a52d7a0e9a.js new file mode 100644 index 0000000000..6120b40bbf --- /dev/null +++ b/pr/3367/docs/search.index/31a52d7a0e9a.js @@ -0,0 +1 @@ +rn_("AQMAOzAAAAEAAGMAAgBdDAAArA5iAAEFAaBQAAAaTm8BtREAAAEDAPMEDgAAOwsBABMAA6AwAAAcKqAgAAAMXmFkbwF/AwAAAQIA890WAAABAAEAAQEBsIAc6AABc/LSGwAAAQABCQGwgB0GAAFz8uMcAAABAPODAmRpE4ECoFAAABwrZHQBAAGwgBx4AAFz84oYAAABAAEAAQMBsIAc4QABc/KeGwAAAQATAAKwgBx2AAFpc/OHGAAAAQABAPOCAjQ2AQQA86UXAAABAPED1wIAAYawUBjYAAGgYAAAHAIwIQbyGhsAAAEAI4ACoQAAABy+c3U3AwCAhqAAAAAcD7BADgUAAQCMFg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3253ef7adb23.js b/pr/3367/docs/search.index/3253ef7adb23.js new file mode 100644 index 0000000000..bb532e3dd6 --- /dev/null +++ b/pr/3367/docs/search.index/3253ef7adb23.js @@ -0,0 +1 @@ +rn_("AQQBsFAcbABLYwGwGwAAAQQA87QbAACJAAEAAQQBoAAAABu3ZAFoGwAANwQAAYegUAAAHDigMAAAGWOgEAAAHM+gYAAAHOe0UAT10Q0AAEkAcQSxB7MBAQgA8/oZAABkAQEAU4ADoEAAABo1Y25v") \ No newline at end of file diff --git a/pr/3367/docs/search.index/32a749494be1.js b/pr/3367/docs/search.index/32a749494be1.js new file mode 100644 index 0000000000..7cd0dc9da3 --- /dev/null +++ b/pr/3367/docs/search.index/32a749494be1.js @@ -0,0 +1 @@ +rn_("AQEBoEAAABxrZfKDGwAAkQAjgAKgEAAAGXdudgEAAqAwAAAY0rAgG/MA0mFy9XgSAAABAAEAAQABAAEFAPTbHAAAAQABAAEA84ACZHJnAAAAhaBQAAAacqBgAAAb3LAACawB1xQBA/SJFwAAxgJ7AZIA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/33e8be1d9a8d.js b/pr/3367/docs/search.index/33e8be1d9a8d.js new file mode 100644 index 0000000000..fa968c6887 --- /dev/null +++ b/pr/3367/docs/search.index/33e8be1d9a8d.js @@ -0,0 +1 @@ +rn_("AQMBsDAcJwABdPJ7GgAAAQABBAD1hBsAAAEAAQABAAEA84ACb3IBAgD1VRkAAAEAAQABAAEAM4UDsMAcqwABZWZ1") \ No newline at end of file diff --git a/pr/3367/docs/search.index/341524ab7d8a.js b/pr/3367/docs/search.index/341524ab7d8a.js new file mode 100644 index 0000000000..43c972c951 --- /dev/null +++ b/pr/3367/docs/search.index/341524ab7d8a.js @@ -0,0 +1 @@ +rn_("AQoA9BscAAABAAEAAQABAQA6MAAAAQAAAAAADQAQAAAA8g3zDfQNkBKREpISkxKUEpUSXBllGYAZCRqmG/OAAmZ2AYACoDAAABvFsBAQ2QABcnjzAAFlOzAAAAEAABMABQCxCQQAyQwJAHEYAAAxGgEAIhwBAPOAAmRu") \ No newline at end of file diff --git a/pr/3367/docs/search.index/34d3eb51eb99.js b/pr/3367/docs/search.index/34d3eb51eb99.js new file mode 100644 index 0000000000..adb88e95a8 --- /dev/null +++ b/pr/3367/docs/search.index/34d3eb51eb99.js @@ -0,0 +1 @@ +rn_("AQUDoJAAAByVoIAAABzEoKAAAByqYnN29uUYAADsAswAAQAdAAEAEwECoQAAAB0EcHQBbRMAAAEDAPP1GQAAAQABACOAAqBgAAAbx25yIwQCoQAAABzZYmU7MAAAAQAABgADAP0QAQB0GwMAvxsAADMAhKBQAAATcKAgAAALgBFBAPIVBwAAAQA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/34f2dd59f3e3.js b/pr/3367/docs/search.index/34f2dd59f3e3.js new file mode 100644 index 0000000000..fff4030b49 --- /dev/null +++ b/pr/3367/docs/search.index/34f2dd59f3e3.js @@ -0,0 +1 @@ +rn_("AQsA9EIcAAABAAEAAQABgwKgIAAAHM6gMAAAHN9pcPMAAWYBTgwAAPOAAmZpQ4CEoCAAABxloDAAABEMoEAAABvIAEFI") \ No newline at end of file diff --git a/pr/3367/docs/search.index/350e4014b645.js b/pr/3367/docs/search.index/350e4014b645.js new file mode 100644 index 0000000000..66f75f13c4 --- /dev/null +++ b/pr/3367/docs/search.index/350e4014b645.js @@ -0,0 +1 @@ +rn_("AQIA9EQTAAABACsHAQABBgD0XhoAAAEAAQABAAELAPRGHAAAAQCCAAEAAQgA9MAbAAABANEAAQCzgISgMAAAGUEBSCABBwD0dBsAAAEAAQABABOAArBAHMcAAWl0AQUA9FgaAAABAAEAAQATgQKwUBpcAAFscwGAArFQHPoAAbBwG3IAAXJ1AQUAOzAAAAEAAAcAAgBFGQMAGxwDAAEEAbAwG3AAAXTz1RgAAAEAAQABCgD06RsAAAEAAQABAAEHAbBQHGwAS2MBsBsAACOBAqAQAAAcwmVpdz8AAIugoAAAG+2wsBwgAAGxiB/yohwAAAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3540a76be9c5.js b/pr/3367/docs/search.index/3540a76be9c5.js new file mode 100644 index 0000000000..b81e0614a3 --- /dev/null +++ b/pr/3367/docs/search.index/3540a76be9c5.js @@ -0,0 +1 @@ +rn_("AYACoAAAABp+sDAXhwABZHIBgwKgQAAAG8mgQAAAG8pibGcAAACGsBANxANHsAAMZgABsCAQrwLJoDAAABgZFgAaOzAAAAEAAAcAAgCTCQAA0QkGAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3552e31b4f71.js b/pr/3367/docs/search.index/3552e31b4f71.js new file mode 100644 index 0000000000..1d1b4343b5 --- /dev/null +++ b/pr/3367/docs/search.index/3552e31b4f71.js @@ -0,0 +1 @@ +rn_("AYECsAAcJAABoQAAABzyZHQjgAKggAAAHPZucvMAAXU6MAAAAQAAAAAALgAQAAAAmgltC24LbwvGEAARKRMqE0ETYhNjE4QXnxeuF7MXsxi0GMEYwxjiGOMY5BgbGUsZXhl9GX4ZfxnsGXIacxp4GnkaqxusG60brhvdG+Eb7htMHFccbByKHLcc9RwEHROAAqBgAAAb9WdyI4ACoEAAABw4YWk=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/35fad3125401.js b/pr/3367/docs/search.index/35fad3125401.js new file mode 100644 index 0000000000..897e893cf3 --- /dev/null +++ b/pr/3367/docs/search.index/35fad3125401.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMAAW06MAAAAQAAAAAABwAQAAAAJxPoGZkbmhubG7MctBy1HAEGAPMFHAAAAQDMABOAAqAgAAAcBGFrkwCEoAAAABvcsAAMZAp9DAAD8yAYAAABAAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/36b2fc8c11cc.js b/pr/3367/docs/search.index/36b2fc8c11cc.js new file mode 100644 index 0000000000..466eba023f --- /dev/null +++ b/pr/3367/docs/search.index/36b2fc8c11cc.js @@ -0,0 +1 @@ +rn_("AQIA9OgQAAABAF8CAQATgAKwIBw7AAFhbwECAaBgAAAbeW3yiRIAAAEAAQQBoCAAABppcwHaGAAAxwEAAIWgMAAAGRegUAAAGUtFwAA7MAAAAQAAFQAGAEIMBAC9DAoA3hgBAO8ZAABWGgAAeRsBAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3790c66c7911.js b/pr/3367/docs/search.index/3790c66c7911.js new file mode 100644 index 0000000000..9dc933de4c --- /dev/null +++ b/pr/3367/docs/search.index/3790c66c7911.js @@ -0,0 +1 @@ +rn_("AYMCoCAAABjToCAAABjUYnQBAISgMAAAEOKgEAAADNegYAAAGlagcAAAG24REAI7MAAAAQAABwADANcNAgAbDgIAXBsBAAEEAPPOEAAAAQABAKOAhKBQAAAZaqAgAAAW1hQgBPOAAm50") \ No newline at end of file diff --git a/pr/3367/docs/search.index/37cdc118ed47.js b/pr/3367/docs/search.index/37cdc118ed47.js new file mode 100644 index 0000000000..a48a8afdd1 --- /dev/null +++ b/pr/3367/docs/search.index/37cdc118ed47.js @@ -0,0 +1 @@ +rn_("AQMBoCAAABnrZgF7GAAAAQIAOzAAAAEAAA8AAQCiGA8AVwAAgIigEAAAEOCgMAAAGP2wIBh4AAGgIAAAE12gIAAAGHqgUAAAGhAUVRETgAKgIAAAEoVsdA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3ade3645693a.js b/pr/3367/docs/search.index/3ade3645693a.js new file mode 100644 index 0000000000..38fd3edd9f --- /dev/null +++ b/pr/3367/docs/search.index/3ade3645693a.js @@ -0,0 +1 @@ +rn_("AYACoCAAABlpoTAAAB0BYWQTgAKgEAAAEoVlbwEAAaAgAAAZ62YBexgAABMAArAAE28FX2RyOzAAAAEAAEUABAD8EAAAsRIhAJEXAABMGCEAI4ECsJAcPQABYWUBAwDzwRAAAAEABAwjgAKgAAAAEOBxcgECADswAAABAAAPAAEAohgPAHcAAACIoDAAABj9sCAYeAABoCAAABNdoCAAABh6oFAAABoQFFUR80sDAAABAEwZo4CEoGAAABntoEAAABxaAigE") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3b8b0c20d9b5.js b/pr/3367/docs/search.index/3b8b0c20d9b5.js new file mode 100644 index 0000000000..7c996ce2c4 --- /dev/null +++ b/pr/3367/docs/search.index/3b8b0c20d9b5.js @@ -0,0 +1 @@ +rn_("AQkA9EYcAAABAIIAAQABAQGgQAAAG29lAYUXAAAjgAKgYAAAG79negGAArCQGfsAAaBQAAAZdWV1AYACoMAAAB0EsEARAAaEZW93AQAAhrBwGkwAAaBgAAAbUYQJBjswAAABAAARAAcAIAECADgDAQAdBwEA2xAEAOgWAgCBFwEA6hgAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3bbf0a1a75da.js b/pr/3367/docs/search.index/3bbf0a1a75da.js new file mode 100644 index 0000000000..0d7ea76933 --- /dev/null +++ b/pr/3367/docs/search.index/3bbf0a1a75da.js @@ -0,0 +1 @@ +rn_("AYICoJAAABzQsOAc/gABY3LzAAFr8qEbAABsAAGCArBwG7wAAbAwHG4AAWhuAQMA8/UZAAABAAEAI4ACoGAAABvHbnLHAgAAh6EAAAAc2bAAHCQAAaBQAAAcMqEAAAAc8hoIBzswAAABAAAUAAgAowkAAP0QAQABEQAAQxMAAHwYCQDqGQAAdBsDAL8bAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3c4b3a331ceb.js b/pr/3367/docs/search.index/3c4b3a331ceb.js new file mode 100644 index 0000000000..b139dd8204 --- /dev/null +++ b/pr/3367/docs/search.index/3c4b3a331ceb.js @@ -0,0 +1 @@ +rn_("AQcBoEAAABzRYgFoHAAAE4YCsCAbagABZG0BCQGggAAAHPxmASkcAAABAwGwcBygAAFm88QYAACQAwEAI4ACoCAAABeOYXIBAgA7MAAAAQAALwABAB0bLwABgAKgEAAAEyygEAAAGSBueucBAACFoGAAABtuEIEM9XEMAACfAXYLkwG0AAEAAPReGgAAAQABAAEAAQIBsGAbuAE/ZgE4EwAAIwEDoEAAABvloCAAABM3ZWxtAREZAAABAQA7MAAAAQAAfAACAP8QAAADF3sAE4ACoGAAABpPY3SzgISgAAAAEbcBQGABgAOgUAAAGSGgsAAAHDOwIBKvAAFhbG8BBgA7MAAAAQAAEgACAKEXAAD+GBEAAQcA8x4aAAABAAEAAQIBsFAcbABLYwGwGwAAAYMCoCAAABjToCAAABjUYnQBgAKgUAAAGWqgIAAAFtZjbvOAAm50AQUAOzAAAAEAAAoAAgBDEwAAfBgJAAEIAbBAG+cAAWU7MAAAAQAADQACAEQZAAARGgwAxw8AAAigMAAAEoagIAAADokwYWRmaWtucjswAAABAADwAQUAUAMAABwGxQBgDAAA4g/FAEYUYgABgAOgUAAAGlawEBt9AAGgEAAAGCRlc3QBgAOgQAAAHPawMBozAAGgQAAAG1hjZGUBAwDzGRwAADYAsgAzgISgEAAADFSgEAAAGXQgGAQBgAOgUAAAGgWgMAAAF42gYAAAHQBhZXIBAgD1iA4AAIoNHAClAB4AAYICoEAAABnpoIAAABu/ZXNTAAOgIAAAGlducnbyNQwAAKIAI4ADoCAAAA4QsBAMNA85bnJ4AYACoCAAABtaoCAAABtbaW8nAACDxaCgAAAcw6BAAAAbqqAgAAAaN6AwAAAcGgABoAwBBgGgQAAAHNhiAWocAADzgAJhaQECAPPDGAAAmwCXAxOCAqDwAAAdAGZnAYACoIAAABzsoGAAABz5ZHMTgAOgwAAAHEqgUAAAGS5pb3UBBQGwYByiAAFpAd4bAADzAgFoASsTAAABAgGwgByvAAFm8usYAAABAAEBAaBwAAAcv2QBUhsAAPMBAWUBLxwAAKcCAICGoCAAABDisGAZXwABoKAAABznBgEN9/cDAJCwMBwVAAGwkBzlABiwIBG5CB+f1U87MAAAAQAAygAYAHEJAQCXCQEAywkBAKgKBAAlDAAAQAwAANQMAADXDQIAGw4CAD0TAQBhEwAAQhQBACYWmwDtFgAAchgFAN0ZAQAGGgEAXBsBAHsbAADMGwAA2RsBAAAcAQALHAEAMRwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3c4ea0cf5ffc.js b/pr/3367/docs/search.index/3c4ea0cf5ffc.js new file mode 100644 index 0000000000..ef43b6caff --- /dev/null +++ b/pr/3367/docs/search.index/3c4ea0cf5ffc.js @@ -0,0 +1 @@ +rn_("AQMBsFAcbABLYwGwGwAAI4ADoHAAAB0AoCAAABnYaG95AYICoAAAABuPoAAAABpVZXMjAAKgYAAAG+BldPJJDAAAiQ0BAwD10xkAAAEAAQABAAEAAQEBoJAAABzFbPPNGAAACAOMAAGCAqAQAAAcS6CwAAAc82xzE4ACoCAAABljYWkBAwGgAAAAG81zATEcAAABAwA7MAAAAQAABgADAFEaAwC0GwAAPRwBAPOAAnJ2AQMBsAAbbABLZPNQGgAAGAEoABOAAqDwAAAc92xvx44BAI2gYAAAHIOgsAAAHLmgUAAAHDigEAAAHM+gYAAAHOegYAAAG9+3WQc7MAAAAQAAOAAMALcJAADRDQAAGg4AAIsSAAAvEwcAIxYCACcYJABMGQAAJBoAADwaAABOGgAA7xsAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3c5f555f1103.js b/pr/3367/docs/search.index/3c5f555f1103.js new file mode 100644 index 0000000000..9ea8963f3b --- /dev/null +++ b/pr/3367/docs/search.index/3c5f555f1103.js @@ -0,0 +1 @@ +rn_("AYECoAAAABosoAAAABotNDYBAAGwMBlfAAFuAbUMAAABAwGwgB0GAAFz8uMcAAABAAEDAqBQAAAZ7KBwAAAcn2NmAZEOAADzAANsbnPy7AYAAJcTAYICoFAAABwysAAboQBscnMBDQD0QhwAAAEAAQABAPMBAWL02BgAAAEAPgMhAAEDAPS5FwAAAQC5AcwA84ADYWV1c4CEoEAAABl7AKgB") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3c8a16a3bee3.js b/pr/3367/docs/search.index/3c8a16a3bee3.js new file mode 100644 index 0000000000..292893d479 --- /dev/null +++ b/pr/3367/docs/search.index/3c8a16a3bee3.js @@ -0,0 +1 @@ +rn_("AYECoAAAABzqoAAAABzrNDYBBAGgAAAAG81zATEcAAAjAYShAAAAHPegQAAAG4+ggAAAHQAUAAYBIxYAAIcBAICFoEAAABtRoEAAABjhsBAM+QABBPAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3ecf659738e3.js b/pr/3367/docs/search.index/3ecf659738e3.js new file mode 100644 index 0000000000..6b613fac49 --- /dev/null +++ b/pr/3367/docs/search.index/3ecf659738e3.js @@ -0,0 +1 @@ +rn_("AYICoAAAABzqoAAAABzrNDbzBQFpAZkcAAAjAAKgMAAAG4FhYgHzGQAAAQcBoEAAABzRYgFoHAAAE4YCsCAbagABZG0BAwDzxBgAAJADAQAjgAKgIAAAF45hciMAAqAgAAATLGl0AXEMAAABgAKgcAAAGk+gAAAAEbdheAGAAqBQAAAaBaAwAAAXjWFlAQcBoEAAABzYYgFqHAAAAQUA88MYAACbAJcDAQUBsGAcogABaQHeGwAA8wMBaAErEwAA1zkAAYqgYAAAGS6wMBwVAAGwIBt9AAGPFAc7MAAAAQAACgAFAJcJAQCoCgQAYRMAAAYaAQB7GwAAAQIAOzAAAAEAAAUAAQBvEgUAAQQAOzAAAAEAAAUAAQByGAUA84ECY3IBAAKwMBt/AAGgIAAAGMJhawG7FwAAdwEAgIWAHBkDYLIIKAM=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3f3a716a6a29.js b/pr/3367/docs/search.index/3f3a716a6a29.js new file mode 100644 index 0000000000..88c9dd4f47 --- /dev/null +++ b/pr/3367/docs/search.index/3f3a716a6a29.js @@ -0,0 +1 @@ +rn_("AQQBoAAAABu3ZAFoGwAAE4UCoEAAABu0Y2UTgAOwUBpKAAGgAAAACYNjc3QBAAGgcAAAGfhk8o8JAAA0AGcAAICFoBAAAAw5oGAAABi8sKAcMAADEcEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3f794cad0802.js b/pr/3367/docs/search.index/3f794cad0802.js new file mode 100644 index 0000000000..62871f0a90 --- /dev/null +++ b/pr/3367/docs/search.index/3f794cad0802.js @@ -0,0 +1 @@ +rn_("AQQA9EoaAAABAAEAAQABAQGgYAAAHGliAe4ZAAAnAAAAhaBAAAAbV7BwHBIAwaAwAAAcD6BQAAAcWxghCDswAAABAAAHAAIA2QwGAOYWAADzgAJodA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/3fb5c77caaa6.js b/pr/3367/docs/search.index/3fb5c77caaa6.js new file mode 100644 index 0000000000..a30dfccbdb --- /dev/null +++ b/pr/3367/docs/search.index/3fb5c77caaa6.js @@ -0,0 +1 @@ +rn_("AQUA89QcAAABAAEA8wABdAHWDAAAAQMA86YcAAABAAEAAQACoEAAABwsoFAAABy4aXI7MAAAAQAABgADAFYMAADyDAEA1BwDAOMAhKAgAAAcLGCAAvKgGAAAuQIBAgGgYAAAG3lt8okSAAABABOAArAwE0gAAW9w8wABcwH/BwAA84ACY24=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/410fc24e7a7c.js b/pr/3367/docs/search.index/410fc24e7a7c.js new file mode 100644 index 0000000000..f52ef82a93 --- /dev/null +++ b/pr/3367/docs/search.index/410fc24e7a7c.js @@ -0,0 +1 @@ +rn_("AQAAOzAAAAEAAAYAAwDiGAIAfRkCAOEbAAATggKgYAAAG/VncgEBAPPCFgAAAQAzBVOAA6AwAAAXmWRtbgGFAqBAAAAcLKBQAAAcuGly8wABdAHxDAAAIwACoBAAABvycnM7MAAAAQAAqgAHAMQJAQCiC3QAdhMAALsYAAAsGQAAhBovAM0cAAABAwDzIBgAAAEAAQCzAISgcAAAGnWRQAABDQEAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/413722c968b9.js b/pr/3367/docs/search.index/413722c968b9.js new file mode 100644 index 0000000000..170bb1dc35 --- /dev/null +++ b/pr/3367/docs/search.index/413722c968b9.js @@ -0,0 +1 @@ +rn_("AQIA890WAAABAAEAAQEBsIAc6AABc/LSGwAAAQABCQGwgB0GAAFz8uMcAAABAPODAmRpE4ECoFAAABwrZHQBAAGwgBx4AAFz84oYAAABAAEAAQMBsIAc4QABc/KeGwAAAQATAAKwgBx2AAFpc/OHGAAAAQABAPOCAjQ2AQQA86UXAAABAPED1wIAAYawUBjYAAGgYAAAHAIwIQbyGhsAAAEAAQEDsFAcbABLsCATHwifoHAAABxiY2ts84wSAAC1Bm8CU4ADoQAAABy+ZXN1") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4165995c34cc.js b/pr/3367/docs/search.index/4165995c34cc.js new file mode 100644 index 0000000000..1f8444cad4 --- /dev/null +++ b/pr/3367/docs/search.index/4165995c34cc.js @@ -0,0 +1 @@ +rn_("AQkBoIAAABz8ZgEpHAAAIwACoCAAABkgaXUBhhkAAAECAbCAHK8AAWby6xgAAAEAE4ACoKAAABzncnRTgAOgQAAAGldhZXMTgAKgAAAAGiZ0dg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4306ca4dd218.js b/pr/3367/docs/search.index/4306ca4dd218.js new file mode 100644 index 0000000000..a11abe5d52 --- /dev/null +++ b/pr/3367/docs/search.index/4306ca4dd218.js @@ -0,0 +1 @@ +rn_("AYkCoCAAABzOoDAAABzfaXATAAKgIAAAG9RlaTswAAABAAAJAAQAvBAEALoRAgAuGgAAERwAAIMAhLBAHNEAB6BAAAAbxqEAAAAc9BIAAzowAAABAAAAAAAHABAAAAASDswQzRDdGHgZehloHGocAQEBsFAcqwABc/JiDAAAAQAzgAOgMAAAEotkbXQ=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/443a604d2eca.js b/pr/3367/docs/search.index/443a604d2eca.js new file mode 100644 index 0000000000..d39e118b0c --- /dev/null +++ b/pr/3367/docs/search.index/443a604d2eca.js @@ -0,0 +1 @@ +rn_("AQIA85sSAAABAAEAAYACsIAckgABsLAcyQABYWwThgKwIBpwAAF0dQEGAbDAHMcAAWny2xgAAAEAlwEAgYWgYAAAGiagcAAAGiekAQg=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4504c6541a07.js b/pr/3367/docs/search.index/4504c6541a07.js new file mode 100644 index 0000000000..5ca84106f5 --- /dev/null +++ b/pr/3367/docs/search.index/4504c6541a07.js @@ -0,0 +1 @@ +rn_("AQMBsAAW8wABefKZEgAAAQABAAKwEBNQA4mgMAAAE3llcwHcBwAA8wABdwGNFwAAAQMA9JcSAAABAO8GAQABBgGgcAAAHQVi84wXAAA1BQIAAQQA8/AWAAABAAEAAQABsGAbuAE/ZgE4EwAABwEAgIWgkAAAG8ywABlSAAGg0AAAG+awIBojAFJMIAEBgAKgQAAAG7OwMBbuAAFobMc9AACOoDAAAA31oDAAAByfoDAAABuCoHAAABl1oGAAABkZsEAW9QABoGAAABlJN3FbOzAAAAEAABUABwAIAQAAYgMAAP0GCAAFDgEAqBAGACYTAAAcGQAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/454d4ba77f84.js b/pr/3367/docs/search.index/454d4ba77f84.js new file mode 100644 index 0000000000..bf27cca2e1 --- /dev/null +++ b/pr/3367/docs/search.index/454d4ba77f84.js @@ -0,0 +1 @@ +rn_("AQoBoIAAABz8ZgEpHAAAAQMBsIAcrwABZvLrGAAAAQDzgwJhcwEDAqAgAAAaOKAwAAAbYWJoAYMXAADzAAJobQHlBwAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/45a9f431e761.js b/pr/3367/docs/search.index/45a9f431e761.js new file mode 100644 index 0000000000..8539514639 --- /dev/null +++ b/pr/3367/docs/search.index/45a9f431e761.js @@ -0,0 +1 @@ +rn_("AYECgByAAyAOoHAAABumZG4BBQGgQAAAG8Vl9DEaAAABAPABAQABBgGggAAAHMJ2ATAaAADzgQJhbmOAA6AQAAAShHJ0dg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4623f04a6d79.js b/pr/3367/docs/search.index/4623f04a6d79.js new file mode 100644 index 0000000000..f54969f0ab --- /dev/null +++ b/pr/3367/docs/search.index/4623f04a6d79.js @@ -0,0 +1 @@ +rn_("AQYCoCAAABo4oDAAABthYmgBgxcAAAEDAPU5GgAAawG8AE0AUwATgAKgQAAAGXJocAECADswAAABAAAFAAEAQBoFAPMCAXUB2BYAAAECAPVqGgAAAQABAAEAAQATgAKwABEEAAFvdvOAA2NsczOAA6CwAAAcWmVvdA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/472747a6178e.js b/pr/3367/docs/search.index/472747a6178e.js new file mode 100644 index 0000000000..8545dbb75f --- /dev/null +++ b/pr/3367/docs/search.index/472747a6178e.js @@ -0,0 +1 @@ +rn_("AYACoAAAABjmoAAAABjnNDYBBAA7MAAAAQAAEAAFAJEbBQBNHAEAhBwFAJYcAQC9HAAAFwIAAcaggAAAHQKgMAAAGdmgAAAAHDegMAAAGdoAZAAL8jkTAAA4ABOAAqAQAAAOEWRp") \ No newline at end of file diff --git a/pr/3367/docs/search.index/472c117bf1de.js b/pr/3367/docs/search.index/472c117bf1de.js new file mode 100644 index 0000000000..d99642d56a --- /dev/null +++ b/pr/3367/docs/search.index/472c117bf1de.js @@ -0,0 +1 @@ +rn_("AQABoEAAABtOYgHJGwAAAQQAOzAAAAEAADAAAgAsGQAAhBovAAEBAaBAAAAc4HT0/BsAAFoAeAAmAAEEAaEgAAAdAGMB7RYAAAEBAaBwAAAafW3y9xsAAJ0AAQYA9GIaAAABAAEAAQABCQD0nRwAAAEAHQABAPOAhUBgggEDAaAAAAAcdHMB4RkAAAEEADswAAABAAAKAAIAVBMIAPAbAQBjAAOgMAAAG45jZXLz+xkAAAEAYwJ3AQAAhaAwAAAc3xDBBPZ8CwAAiwKqDXUAEQA9AA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/477f4bc417b1.js b/pr/3367/docs/search.index/477f4bc417b1.js new file mode 100644 index 0000000000..b877708c17 --- /dev/null +++ b/pr/3367/docs/search.index/477f4bc417b1.js @@ -0,0 +1 @@ +rn_("AQEBoGAAABxpYgHuGQAAE4QDoDAAABwPoFAAABxbZW51E4ACoJAAABxcYnQBhAOwYBx7AAGwMBwJAAGwMBwLAAFkcnMTgAKwIBn7AAFjcvOAAmF1") \ No newline at end of file diff --git a/pr/3367/docs/search.index/47e0f7387cee.js b/pr/3367/docs/search.index/47e0f7387cee.js new file mode 100644 index 0000000000..6becb0d0d7 --- /dev/null +++ b/pr/3367/docs/search.index/47e0f7387cee.js @@ -0,0 +1 @@ +rn_("AQUA8yoaAADpAW8AAQABoEAAABorcgF2GQAAo4GEoJAAABz0oVAAAB0DCkAQAQoA9BscAAABAAEAAQABAAA7MAAAAQAAYgABAEYUYgAjgAKgQAAAHC5lbwEBADowAAABAAAAAAANABAAAADyDfMN9A2QEpESkhKTEpQSlRJcGWUZgBkJGqYb84ADZnR2AYACoDAAABvFsBAQ2QABcnjzAAFlOzAAAAEAANsACACxCQQAygkAAMkMCQD9DMUA1BIAAHEYAAAxGgEAIhwBAPOAA2Rudg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/47fab9f046de.js b/pr/3367/docs/search.index/47fab9f046de.js new file mode 100644 index 0000000000..b015154fce --- /dev/null +++ b/pr/3367/docs/search.index/47fab9f046de.js @@ -0,0 +1 @@ +rn_("AQIA9OkbAAABAAEAAQABBQD0QhwAAAEAAQABAAEEADswAAABAAANAAMAMBkIADoZAwBBHAAAswCEoHAAABvEEICBOjAAAAEAAAAAAAkAEAAAANMN1A3VDdYN9RAkGccb2Rz6HPscE4ACoFAAABzxZ3Q=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/485b8bb1de89.js b/pr/3367/docs/search.index/485b8bb1de89.js new file mode 100644 index 0000000000..8953cea5e1 --- /dev/null +++ b/pr/3367/docs/search.index/485b8bb1de89.js @@ -0,0 +1 @@ +rn_("AQABsGAckAABZQFkGQAAQ4EDsJAcJAABoDAAABkiY25zE4ACsHAadgABY3MBAwD0RhwAAAEAggABAAGEArBAG38AAaBAAAAbgWRzAQAAOzAAAAEAAAYAAwDiGAIAfRkCAOEbAAATgwKgYAAAG/VnckOAA6AgAAAb8qBwAAAadWVob7cAAACGsHAbXAABsAAbsQDDoDAAABx+HCASOjAAAAEAAAAAABEAEAAAAMEJwgmbC5wLnQueC58LoAuhC8cQQhPiFuEZTRtjG2QbZRunGwEEAbCQHPgAC2UBbBkAAFOAA6BAAAAaemRlcgEBAbAQF5oEU3X1iA4AAIoNHAClAB4AxwEAgMWwABjmAAewABjnAAdoRAAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4a0f95af0b92.js b/pr/3367/docs/search.index/4a0f95af0b92.js new file mode 100644 index 0000000000..0842f66b16 --- /dev/null +++ b/pr/3367/docs/search.index/4a0f95af0b92.js @@ -0,0 +1 @@ +rn_("AYACsEAXlQABsEAXlwABYXLzAAFwOzAAAAEAAAkAAwDnBwEAYgkCAIsOBAAjgAKgAAAAG6BzeQEHAaBAAAAca2XygxsAAJEAAQEBoHAAABn4ZAHDCQAAAQIAOzAAAAEAALwAAQBmFbwAAQIAOzAAAAEAALwAAQCpFLwAYwADoCAAABC6ZW1yOzAAAAEAAL4AAwCZCQAAsAq8AJkXAAABAQD0zxYAAAEAAQABAAEAADswAAABAAAMAAEAdQwMAGOAA6AwAAATLWFldPOAAnJ0VwMAAIaw8By7AAGgUAAAGxkBTAU7MAAAAQAAIAADAOUBDwANAwAAohgPAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4af3e1d598fa.js b/pr/3367/docs/search.index/4af3e1d598fa.js new file mode 100644 index 0000000000..fb0a623f54 --- /dev/null +++ b/pr/3367/docs/search.index/4af3e1d598fa.js @@ -0,0 +1 @@ +rn_("ARAA9NscAAABAAEAAQABBQA7MAAAAQAACQADAJMXAQD0GAYA2xsAAAEFAqBAAAAcA6AgAAAbmGh1AfMYAAABBADzgBwAADIADgABAAD13QcAAPwBAQABAAEAAQEAOjAAAAEAAAAAAAcAEAAAAEAUQRTXG9gb/hv/GwkcChx3AwCAxrBAHPgACwAJZAFjgAOgIAAAHH1hZXg=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4b9264582700.js b/pr/3367/docs/search.index/4b9264582700.js new file mode 100644 index 0000000000..d963c708d4 --- /dev/null +++ b/pr/3367/docs/search.index/4b9264582700.js @@ -0,0 +1 @@ +rn_("AQkBoIAAABz8ZgEpHAAAIwACoCAAABkgaXUBhhkAAAECAbCAHK8AAWby6xgAAAEAE4ACoKAAABzncnTzggJhcwEEAaBAAAAcxmUBmBwAAAECADswAAABAAAFAAIAURwCAO4cAgDzAwFtOjAAAAEAAAAAAAcAEAAAACcT6BmZG5obmxuzHLQctRzzgQJjZfOAAmFl") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4c0b6e27d444.js b/pr/3367/docs/search.index/4c0b6e27d444.js new file mode 100644 index 0000000000..d9669f1fb0 --- /dev/null +++ b/pr/3367/docs/search.index/4c0b6e27d444.js @@ -0,0 +1 @@ +rn_("AQIBoGAAABwHdQFPGQAAAQADsEAQsQABoLAAABwYgAgUq/mwZXFz9EcDAAABADQAAQDDgISwgBvwAAGwkBwwAAMBcAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4ca19230a3bc.js b/pr/3367/docs/search.index/4ca19230a3bc.js new file mode 100644 index 0000000000..4b069f20dd --- /dev/null +++ b/pr/3367/docs/search.index/4ca19230a3bc.js @@ -0,0 +1 @@ +rn_("AYACoBAAAA6GoAAAAAm4cnQBgAKwEA3bAAGgMAAAE0JucocAAACGsDAW1AABoHAAABscoFAAABefsDAb4gABoCAAABKDF4AI9fwHAAABAGoBAQCbEgEAA6CQAAAcz6BAAAAcLaBgAAAcdWRlcwFoGQAA8wUBc/KdFwAAAQATgAOgUAAAGSOgEAAAG51laW8BgAKwUBebAAGwIBu5AAFhbwEBAPTAGwAAAQDRAAEAI4ACsBASrwABbnIBhgKgQAAAHMygAAAAHCZlc0OAhLBAGRUADLAgEoEAAaBAAAAZEgwAQRd8AACLoHAAABoPoFAAABNBsCAOggABoGAAABu7sLAcMAADB80L9WsFAAABAAEAAQABAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4d4e18c38a5b.js b/pr/3367/docs/search.index/4d4e18c38a5b.js new file mode 100644 index 0000000000..82fc9fe86a --- /dev/null +++ b/pr/3367/docs/search.index/4d4e18c38a5b.js @@ -0,0 +1 @@ +rn_("AQUA89AcAAAuAAEAAQABoIAAAB0EYQFFCAAAAYMCoCAAABnQoAAAABjvZHMTgQKgQAAAGMJjZROAAqAQAAARDWZzRwYAAMewUBMpAAGgEAAAHJywMA3HA++g0AAAHPEARYQJ9IEDAAAACDEQQAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4e93f92ac054.js b/pr/3367/docs/search.index/4e93f92ac054.js new file mode 100644 index 0000000000..7af6cdd838 --- /dev/null +++ b/pr/3367/docs/search.index/4e93f92ac054.js @@ -0,0 +1 @@ +rn_("AQABoHAAABvEcgH1EAAAE4ECoFAAABzxZ3QBBAD00xAAAAEAAQABAFMAhKAQAAAJrbAwGLwAphgBAvbrBgAArAQEDAEAdgHVAxMAAqAQAAAOiWRuASUYAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4f08f1a62681.js b/pr/3367/docs/search.index/4f08f1a62681.js new file mode 100644 index 0000000000..065b488602 --- /dev/null +++ b/pr/3367/docs/search.index/4f08f1a62681.js @@ -0,0 +1 @@ +rn_("AQQBoGAAABxJYgFNGQAAE4ACoCAAABn9b3UBAwA7MAAAAQAALwABAB0bLwABgQKggAAAHOygYAAAHPlkc5cAAIGFoIAAABwaoCAAABgksJAc5QAYChAKAQIDoFAAABt7oDAAABypoGAAABzXY3Bz8rIYAABWAwGHAqAAAAAcXaAAAAAcXjQ2E4ACoEAAABtTYXJ3AgCAxqBAAAAaArAwE14AAQACygE=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4f115e55d3fa.js b/pr/3367/docs/search.index/4f115e55d3fa.js new file mode 100644 index 0000000000..0c9336abe4 --- /dev/null +++ b/pr/3367/docs/search.index/4f115e55d3fa.js @@ -0,0 +1 @@ +rn_("AQABoGAAABxJYjowAAABAAAAAAANABAAAAAADpkOkxeUF/QY9Rj2GPcY+Bj5GPoYTRnEG9sbhwAAAIWwMBevAAGgQAAAGOCwMBkeAAGgoAAAG/KSAAM7MAAAAQAADgACAFEMAgDiDAsAE4ACoCAAABD2ZWk=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/4f62d817b363.js b/pr/3367/docs/search.index/4f62d817b363.js new file mode 100644 index 0000000000..4487b83a80 --- /dev/null +++ b/pr/3367/docs/search.index/4f62d817b363.js @@ -0,0 +1 @@ +rn_("AQABsIAcrwABZvNJAwAAohUBAAECADswAAABAAAFAAIAURwCAO4cAgDzBgFtOjAAAAEAAAAAAAcAEAAAACcT6BmZG5obmxuzHLQctRwBBAD0wBsAAAEA0QABAPMAAXTzBA4AADsLAQDzgANlbXM=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5155720b73f0.js b/pr/3367/docs/search.index/5155720b73f0.js new file mode 100644 index 0000000000..2351cfbc75 --- /dev/null +++ b/pr/3367/docs/search.index/5155720b73f0.js @@ -0,0 +1 @@ +rn_("AQAAOzAAAAEAAAgABAC3DAAAyg0CABcOAgCQHAEAFwAAAIegQAAAGVCgEAAAEtSgAAAADNigMAAAGe2gAAAAEQ6hIAAAHOcYkQM6MAAAAQAAAAAADwAQAAAA4g31DeIQLRO5F7oXGhgbGBwYHRgeGB8Y0xhzGT8aghs=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/536495994aac.js b/pr/3367/docs/search.index/536495994aac.js new file mode 100644 index 0000000000..0c97b8ab7a --- /dev/null +++ b/pr/3367/docs/search.index/536495994aac.js @@ -0,0 +1 @@ +rn_("AQIA9sEQAAABACcJbwGNAOEAQwADoFAAABoKsGAbuAE/ZWZyOjAAAAEAAAAAAAgAEAAAAA4ROBM8E3AY9BkFGm8adBrkGw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/53e7f740bdcf.js b/pr/3367/docs/search.index/53e7f740bdcf.js new file mode 100644 index 0000000000..dd43e52d9c --- /dev/null +++ b/pr/3367/docs/search.index/53e7f740bdcf.js @@ -0,0 +1 @@ +rn_("AYgCoEAAABzMoAAAABwmZXMBBAGgMAAAG/Zj8v4ZAAABAAEFADswAAABAAAGAAMAeBoBAKsbAwCKHAAA8wEDY2Vw9iATAAABAMEIAQBYAAEAAQIBoGAAABp0aPdLEwAAAQAmBgoA4AABAAsA84ACbnI=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5423b3831267.js b/pr/3367/docs/search.index/5423b3831267.js new file mode 100644 index 0000000000..5cb722826a --- /dev/null +++ b/pr/3367/docs/search.index/5423b3831267.js @@ -0,0 +1 @@ +rn_("AQABoCAAABvFcvP6GQAAZAEBAAEDAPMZHAAANgCyABOBAqAQAAAZdGZ0AQgA9OkbAAABAAEAAQDzgAJjdDMAA7AQENkAAW5yeAFpAwAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/545eafbf0be8.js b/pr/3367/docs/search.index/545eafbf0be8.js new file mode 100644 index 0000000000..5bccd16531 --- /dev/null +++ b/pr/3367/docs/search.index/545eafbf0be8.js @@ -0,0 +1 @@ +rn_("AQQA8+0QAAABAAEAIwCELXDWS+UKoLAAABwRsFATZgVRWAACOjAAAAEAAAAAAAkAEAAAAAQRBRFAFEEU1xvYG/4b/xsJHAoc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/546fd9350b68.js b/pr/3367/docs/search.index/546fd9350b68.js new file mode 100644 index 0000000000..0746281e0a --- /dev/null +++ b/pr/3367/docs/search.index/546fd9350b68.js @@ -0,0 +1 @@ +rn_("AQACoEAAAByqoFAAABjpZWk7MAAAAQAACAAEAM0JAwAmDAEA0BwAAP4cAQABAAGgIAAAGMJrAbsXAAATgAKAHBkDYLJkcgGAAqAgAAAZ0KAAAAAY72RzE4ICoIAAABw4ZWnzgAJjZWOAA6BAAAAcYmVpeQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5507011d8f7d.js b/pr/3367/docs/search.index/5507011d8f7d.js new file mode 100644 index 0000000000..76eafe7bc1 --- /dev/null +++ b/pr/3367/docs/search.index/5507011d8f7d.js @@ -0,0 +1 @@ +rn_("AQgA9HgcAAABAGgAAQABAAGggAAAHAR18wQCAAA8AToLUwADoDAAAA3gNGFzOjAAAAEAAAAAABAAEAAAAD4D5AblBiQMTQx+Eq4SihiLGIwY5xjuGC0anhufG14c6xw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/55a8e7b70fe8.js b/pr/3367/docs/search.index/55a8e7b70fe8.js new file mode 100644 index 0000000000..c1c93b7a24 --- /dev/null +++ b/pr/3367/docs/search.index/55a8e7b70fe8.js @@ -0,0 +1 @@ +rn_("AQMA9NsZAAABAAsCAQATgAKwMBndAAFydgGCArAgG+4AaaAwAAAbbWZ0pwAAAImwYBwfACmgIAAAGWGgMAAAGTmgsAAAHLGgEAAAGPKgIAAADdqwQBnfAAEeaQI7MAAAAQAAHQAMAMMQAgBqEgQAzxgAANEYAABEGQAAShkAAFsZAAARGgwAtBoAABocAAC2HAAA7RwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/55bcc26466ab.js b/pr/3367/docs/search.index/55bcc26466ab.js new file mode 100644 index 0000000000..f52bda8044 --- /dev/null +++ b/pr/3367/docs/search.index/55bcc26466ab.js @@ -0,0 +1 @@ +rn_("AQMA9HAbAAABALYAAQDzAgF09dUYAAABAAEApAEBABOAAqBQAAAaAWFvAQUA8/kbAAABAAEAAQIA9YQbAAABAAEAAQABAPOBAm11AYACoEAAABnRoFAAABl7Y2lzAISgEAAAGesBQAkBARoAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5615dd876959.js b/pr/3367/docs/search.index/5615dd876959.js new file mode 100644 index 0000000000..65190cdf48 --- /dev/null +++ b/pr/3367/docs/search.index/5615dd876959.js @@ -0,0 +1 @@ +rn_("AQABoDAAABN0Y/YXDAAAAQCTEAEAGwABAAEDAPP1GQAAAQABACOAAqBgAAAbx25yIwACoQAAABzZYmU7MAAAAQAABgADAP0QAQB0GwMAvxsAACOAAqBwAAAaNWFl84ACcnM=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/568655a45f90.js b/pr/3367/docs/search.index/568655a45f90.js new file mode 100644 index 0000000000..dafbbccb82 --- /dev/null +++ b/pr/3367/docs/search.index/568655a45f90.js @@ -0,0 +1 @@ +rn_("AQcBsEAcOQABZQHOGwAAAYACoCAAABqDoBAAABoAYXMnAACDhaEgAAAdAqBAAAAbjaDQAAAc2qBQAAAb+AjQASMAA6CQAAAby4AZ0R5xP2x0efNuGwAAcgDOACOAAqBQAAAZ0nByAYACoGAAABvgoDAAABpVZXQBAwD10xkAAAEAAQABAAEAAQEBoJAAABzFbPPNGAAACAOMAAGDAqAQAAAcS6CwAAAc82xzAQQA9FEaAAABAAEAAQABBAGgAAAAG2xk8lAaAABAAecLAAGJoLAAABy5oGAAABvfoDAAABnYlgkHOzAAAAEAAAsABAAvEwcAJBYBAEwZAAAkGgAAAQAA9S4TAAA/BgEAAQABABMAArCgHMcAAWd2ARoZAADzgAJubwEDADswAAABAAAFAAIAyBgEAPEZAAABAwGwMBwnAAF08nsaAAABAAEEAPWEGwAAAQABAAEAAQDzgAJvcgECAPVVGQAAAQABAAEAAQBnAAAAhaBwAAAcv6BAAAAaCLDAHKsAATgADDowAAABAAAAAAAKABAAAAAeDh8OaxPQGBAZfxqAGoEaghpSG1Ac84ACZHIBgwKgQAAAHJqgYAAAHMBhciOAArBAGgYAAWxvAQQAOzAAAAEAABAABQCRGwUATRwBAIQcBQCWHAEAvRwAABcAAAKFoIAAAB0CoDAAABnZoAAAABw3oDAAABnakAEGATkTAAATgAKgYAAAG8xkbvcSAACJoBAAABy/oCAAABz2sAAYbgABFUkTOjAAAAEAAAAAAA4AEAAAAKEJogkwDDEMMgwzDIIMgwz8FrEXshfbGNwYLxy5HA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/56eff1f778ff.js b/pr/3367/docs/search.index/56eff1f778ff.js new file mode 100644 index 0000000000..d1f0d2713f --- /dev/null +++ b/pr/3367/docs/search.index/56eff1f778ff.js @@ -0,0 +1 @@ +rn_("AYkCoCAAABzOoDAAABzfaXATAAKgIAAAG9RlaTswAAABAAAJAAQAvBAEALoRAgAuGgAAERwAAAEEADswAAABAAAFAAEA4hkFAPMCAWU7MAAAAQAACgAFAMkQAADEFgMAcBsBAIkbAQAnHAEAAYECoEAAABzMoAAAABwmZXOTgISwYBk/AAGgAAAADiEQQGABAAGgMAAAEz908j0aAAABAAGAAqAgAAAbxqAAAAAOIHJ4xwEAAIWgwAAAHEGgIAAAEncQCAc7MAAAAQAABgADAGUJAQDVGAIAexoBAKMAhLBAHNEAB6EAAAAc9BIAAzowAAABAAAAAAAHABAAAAASDswQzRDdGHgZehloHGoc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/56f2bb2028e9.js b/pr/3367/docs/search.index/56f2bb2028e9.js new file mode 100644 index 0000000000..de0281d10c --- /dev/null +++ b/pr/3367/docs/search.index/56f2bb2028e9.js @@ -0,0 +1 @@ +rn_("AQIA85sSAAABAAEAAYACsIAckgABsLAcyQABYWwThgKwIBpwAAF0dQEGAbDAHMcAAWny2xgAAAEAlwEAgIWgYAAAGiagcAAAGiekAQgBgAKwQBsaAAGgcAAAG1FvcwEDAPReGgAAAQABAAEAE4ACoRAAABy6bnKnAAAAh6BAAAAOB6AgAAAMR7AwGUIAAaCQAAAZVLBgGjoAATEoAzowAAABAAAAAAANABAAAAA0DOQNuhDZENoQ4xCXEpgS3RbeFt8WhxmIGW0bAQACoDAAABujoCAAABtQYnUBjRgAACOEAqAwAAAbT2RzI4ACoCAAAA3maXQBDwD02xwAAAEAAQABAAEQAaBAAAAcxmUBmBwAAAEDAPM7DAAAAQBDEAEDAbAwHCcAAXTyexoAAAEAAQQA9YQbAAABAAEAAQABAPOAAm9yAQIA9VUZAAABAAEAAQABADMEhKBAAAAaCLDAHKsAATAADPIeDgAAAQABCAD0ZhoAAAEA2AEBAPOAhBFBAAEFAbDAHI4AAWXyRhMAAAEAAYADoJAAABuioGAAABkWsCAMKgABZG50AQEA9N4HAAABACEADAkBAwGgcAAAG9RnAZIOAAABgQKggAAAHOygYAAAHPlkcxOIArCQHOUAGGJ1AQEBsEAcjgABZfJKHAAAQQATggKw0Bw/AAFlc/OAAmVvAQABoEAAABnxZQH8FgAAI4ECoFAAABlra3TX/QEAjaCQAAAbTqBgAAAZLZ+JRzswAAABAABqAAsADgEAABcBAABpCQAAIQwBAOUNAAAJDgAAIA4BALcRAQC8F1wA+xgBACsZAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/575bf97e83e5.js b/pr/3367/docs/search.index/575bf97e83e5.js new file mode 100644 index 0000000000..139d1dc5aa --- /dev/null +++ b/pr/3367/docs/search.index/575bf97e83e5.js @@ -0,0 +1 @@ +rn_("AQEDoHAAABzZoHAAABuCsAAaOgABZWZzOzAAAAEAAJMABgDICQAAAw4AALgQAADWEkgAJhkAAIkZRgABBAGgIAAAGmlzAdoYAABDAISgMAAAGRegUAAAGUuwMBw7AAFFgAA7MAAAAQAAFQAGAEIMBAC9DAoA3hgBAO8ZAABWGgAAeRsBACOAA6AwAAATSqAgAAATa2lzdPOAAmNu") \ No newline at end of file diff --git a/pr/3367/docs/search.index/57ad8a0a9d6f.js b/pr/3367/docs/search.index/57ad8a0a9d6f.js new file mode 100644 index 0000000000..39763e926d --- /dev/null +++ b/pr/3367/docs/search.index/57ad8a0a9d6f.js @@ -0,0 +1 @@ +rn_("AQIA9OgYAAARAZUCAQDzAAFyAdAZAAABAQD1VRkAAAEAAQABAAEAAQABsEAcjgABZfJKHAAAQQDjgISgMAAAGT4JIAE=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/57c6b1822fcb.js b/pr/3367/docs/search.index/57c6b1822fcb.js new file mode 100644 index 0000000000..86e5f6d705 --- /dev/null +++ b/pr/3367/docs/search.index/57c6b1822fcb.js @@ -0,0 +1 @@ +rn_("AQcBoEAAABzRYgFoHAAAE4YCsCAbagABZG0BAwDzxBgAAJADAQAjgAKgIAAAF45hciMAAqAgAAATLGl0AXEMAAABgAKgcAAAGk+gAAAAEbdheAGAAqBQAAAaBaAwAAAXjWFlAQcBoEAAABzYYgFqHAAAAQUA88MYAACbAJcDAQUBsGAcogABaQHeGwAA8wMBaAErEwAA1zkAAIqgYAAAGS6wMBwVAAGwIBt9AAGPFAc7MAAAAQAACgAFAJcJAQCoCgQAYRMAAAYaAQB7GwAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/590c69904c3a.js b/pr/3367/docs/search.index/590c69904c3a.js new file mode 100644 index 0000000000..023d488d7d --- /dev/null +++ b/pr/3367/docs/search.index/590c69904c3a.js @@ -0,0 +1 @@ +rn_("AQMBoEAAABnxZQH8FgAAAQDFsGAcogABoDAAABNAsEAZ+wABsCAQ6gABsEAXmgRTAECoCPKtCQAAMRJTAAOwUByrAAFyc3jyYgwAAAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/59a6c2ebd501.js b/pr/3367/docs/search.index/59a6c2ebd501.js new file mode 100644 index 0000000000..4cf2631ee3 --- /dev/null +++ b/pr/3367/docs/search.index/59a6c2ebd501.js @@ -0,0 +1 @@ +rn_("AQABoDAAABw1bwEHHAAAAQIA8+4cAAABAAEA8w0BbfOzHAAAAQABAAEAAaCQAAAcN2n3ww0AAFALAQAFAE0DGwA5AFcBAAKFoEAAABt4oHAAABuvOCACOjAAAAEAAAAAAAcAEAAAAHEZ+Rv6G/sbWxyvHLAc/BwTgAKgcAAAG2lhcg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5a4efa70326b.js b/pr/3367/docs/search.index/5a4efa70326b.js new file mode 100644 index 0000000000..cdde717265 --- /dev/null +++ b/pr/3367/docs/search.index/5a4efa70326b.js @@ -0,0 +1 @@ +rn_("AQEBoEAAABzgdPT8GwAAWgB4ACYAAQQBoSAAAB0AYwHtFgAAAQEBoHAAABp9bfL3GwAAnQDzgANvc3ojAAOgQAAAG46gMAAAHN9laXDzsRsAAHUATgA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5a7ee23cbc41.js b/pr/3367/docs/search.index/5a7ee23cbc41.js new file mode 100644 index 0000000000..3816971146 --- /dev/null +++ b/pr/3367/docs/search.index/5a7ee23cbc41.js @@ -0,0 +1 @@ +rn_("AQIBsJAb8AABcDswAAABAAAVAAUA/Q0CAKISBgCBGQEAQBoFAFgaAwABBwGgQAAAHNhiAWocAAAThwKwIBt9AAFkbQEBAaAwAAAcfncBpxsAABOCArCgHJAAAWVpEwACoFAAABzXZXQBuBwAAAGDAqBQAAAac7AwHKQAAWNwAYEDoFAAABt8oAAAABypoLAAAByUYmR0I4ACoCAAABNkYXIBAwA7MAAAAQAABgACAPIQAQBtHAQAAQIA9PAQAAABAAwGAAUBAQD2+w0AAAEApAQBAC4JAQBTgISwUBjeAAGwEBtqAAERQAIBhQKgIAAAGfOgAAAAGXlpeQEFAPW1GwAABwABAAUAAQAjgQKgcAAAG9ZtcwEHAaBAAAAc0WIBaBwAAAGBAqBAAAAceqBgAAAcsmFyI4ECsCAXrgFtZm5DgAOwgBz+AAGgQAAAG3tlbG+39wEAzaBAAAAbqaAwAAAQ9AAnfgc6MAAAAQAAAAAADwAQAAAABwgICHUJdgnYFusWAheyGGsZUxtUG1cbpRuoG6obCBw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5ac6c7bf1d5c.js b/pr/3367/docs/search.index/5ac6c7bf1d5c.js new file mode 100644 index 0000000000..b6ec5d3bdf --- /dev/null +++ b/pr/3367/docs/search.index/5ac6c7bf1d5c.js @@ -0,0 +1 @@ +rn_("AQABoCAAABDjZQG5CQAAAQIA9OgQAAABAF8CAQATgAKwIBw7AAFhbwECAaBgAAAbeW3yiRIAAAEAAQQBoCAAABppcwHaGAAAxwEAAIWgMAAAGRegUAAAGUtFwAA7MAAAAQAAFQAGAEIMBAC9DAoA3hgBAO8ZAABWGgAAeRsBAAEGAPP6GQAAZAEBACOAArAgHKQAAW9yAYACoCAAABqDoBAAABoAYXMBAAGgQAAAGfBlOzAAAAEAAAUAAgDkEAMAchsBAAEAAaAAAAAbUXP1yQkAAFICAQAxBwEA84ACdHlnAACAhqEgAAAdAqBAAAAbjaDQAAAc2qBQAAAb+BjQAQGBAqAQAAATSqCwAAAcrWVpAQABsGAckAABZQFkGQAAQwADsJAcJAABoDAAABkiY25z8n0JAABWDQEEAPViEwAAAQBQBQEAvwEjgAKgQAAAE2FsbwEEAaAAAAAbt2QBaBsAABOCA6BAAAAbtKBQAAAcOGNlZgGAAqAgAAAZ0KAAAAAY72Rz84ACZWkBhAKgMAAAHMugUAAAHOZjcvMDAWMBGBwAAPMCAWQBnhIAAPOAAmR01y8AAIqgcAAAGiigIAAAE2sXhUY7MAAAAQAACQADAAwHBAD/BwAAjgsDAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5ae743af5768.js b/pr/3367/docs/search.index/5ae743af5768.js new file mode 100644 index 0000000000..cf937bea6c --- /dev/null +++ b/pr/3367/docs/search.index/5ae743af5768.js @@ -0,0 +1 @@ +rn_("AQIBoAAAAA6lczowAAABAAAAAAAIABAAAABYDFkMWgxbDFwM+wygFxgbohsjAISgMAAADgKwUBN2BUWggAAAGjkIQAbzVAwAAPEHHQg=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5af434536ad0.js b/pr/3367/docs/search.index/5af434536ad0.js new file mode 100644 index 0000000000..8306ede69d --- /dev/null +++ b/pr/3367/docs/search.index/5af434536ad0.js @@ -0,0 +1 @@ +rn_("AYACoCAAABqDoBAAABoAYXMnAACDhaEgAAAdAqBAAAAbjaDQAAAc2qBQAAAb+AjQAQEEADswAAABAAASAAIAoRcAAP4YEQABhISgYAAAHH+gcAAAHJygYAAAHICgYAAAHIEQAQkTgQKgEAAAHMRjdAEHAaBAAAAc0WIBaBwAABOCArAgG2oAAWRt4wAEoFAAABezY2xwcfSNCQAAAQB8B3wGlwAAAIWgkAAAG8ugEAAAELuAGdEecT8QKEQ6MAAAAQAAAAAABwAQAAAA4w2FEtIY1BjhGG4b4BuuHA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5b4d7c34bc10.js b/pr/3367/docs/search.index/5b4d7c34bc10.js new file mode 100644 index 0000000000..a88ff8fbca --- /dev/null +++ b/pr/3367/docs/search.index/5b4d7c34bc10.js @@ -0,0 +1 @@ +rn_("AQABoDAAABw1b/LvGAAAGAMBAwGgQAAAHMZlAZgcAAABgAKgIAAAGfOADLoAHL5peROAAqBgAAAbr2NvAQYA9NscAAABAAEAAQAjBAOgUAAAGnKgIAAAGXdjZWnyTxoAAA0CAQIA8+4cAAABAAEA8w0BbfOzHAAAAQABAAEAA6EgAAAdAaAQAAAZ0KCQAAAcN2FlaTowAAABAAAAAAAIABAAAADDDRMZFBkZGVkcZhyBHLocwhxHPQAAjKAgAAAZaaAwAAAYI7BAG3gAfKBQAAAZTqCQAAAcZqAQAAAQuj0sMzowAAABAAAAAAASABAAAACECYUJhglLDMUNfg5/DrAQ5xZxGY8b+Rv6G/sbWxx9HK8csBz8HA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5c1b63a3d242.js b/pr/3367/docs/search.index/5c1b63a3d242.js new file mode 100644 index 0000000000..62ac9311cf --- /dev/null +++ b/pr/3367/docs/search.index/5c1b63a3d242.js @@ -0,0 +1 @@ +rn_("AYACsJAaSgABsJAaTAABY2wBgAKwIBoLAAGgIAAAGg1hbxMDA6BgAAAc86BwAAAbvmRzdPbKEAAAAQC0AQEACwkBAEcAAACFoHAAABxKoIAAABz8oFAAABldsEATbgVKsEAE8sgNAABhDgECAaBAAAAbqWUBAhcAABOAAqBQAAAZfGxzE4ACoHAAABu2ZW8BAwKgYAAAGlagcAAAG25tczswAAABAAAHAAMA1w0CABsOAgBcGwEAAYUDsGAcYwABsDAb1wABsDAb2QABZHJzU4CEoKAAABx0oDAAABvMAUQBAQAA9igMAACRDFcBGgDpAW8AI4ACoUAAABz4YncBAAGgUAAAGgpl9zwTAAA0BYQBEQBqAAUAcAEjAQKwsBxUAAFjcvSkCQAAFg/8ApUAAYECoAAAABKtoAAAABKuNDYjgAKgEAAAGSRucAEHAPP5GwAAAQABAAGAAqBAAAAZ0aBQAAAZe2Np84ACYW8BAwD1thAAAAEAQwABAPcIE4ACoAAAAAlpcngBgwKgQAAAG6igIAAAGjZydQEDAaBAAAAbxmUBehkAABMCAqCgAAAcm2duAawSAADzgAJhaQGGAqAgAAAczqAwAAAc32lwAYACoAAAABjtoAAAABjuNDbzAgF2OjAAAAEAAAAAAAcAEAAAALARsRGyEbMRtBEPGigaHBsjgAKgIAAAGKFjZLf/AQCOoFAAAB0EoFAAABi5P8kXOzAAAAEAANcAEwAJAQAAKAG8AFUDAABXAwEAaAMAAH4DAACFAwAAFAcAAC8MAAByDAIA2w0BAHUTAAB/FwEAthgAAL4YAABVGQQADhoAAI4bAAArHAAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5c3a8909d56b.js b/pr/3367/docs/search.index/5c3a8909d56b.js new file mode 100644 index 0000000000..2ba42c86ce --- /dev/null +++ b/pr/3367/docs/search.index/5c3a8909d56b.js @@ -0,0 +1 @@ +rn_("AQIBoAAAABvfZAGWCwAAAQIA8+4cAAABAAEA8wwBbfOzHAAAAQABAAECADswAAABAACtAAIAyQ0AAL0RrAABhwKgAAAAHF2gAAAAHF40NhOCAqBAAAAbU2FyI4ECoDAAABKfZXIBgAKgUAAAGxigEAAAGCZpdAEAAaAQAAAYJW/1Ew4AAAEAAQABAFEOAYACsBAbzwABoCAAABv9YW8TggKwcBykAAFtcROBAqDgAAAc02xwAYMCsDAbuQABsEAb4gABcHOHcAACi6CgAAAcbaEQAAAc8bCgHG4AAaDwAAAc0rCgHDsAAbCgHHAAAaBwAAAbu5W0BzswAAABAAAzAAIANgwCAIQMMAAjgAKgUAAAHJ9sdbcDAACGoBAAABkrEREJOzAAAAEAAMYBCADdBwAA5gcAAK0IsgDZCQMAPQwAACUOSQBvEgUAZhW8AA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5d210a6ea76b.js b/pr/3367/docs/search.index/5d210a6ea76b.js new file mode 100644 index 0000000000..2523b83ece --- /dev/null +++ b/pr/3367/docs/search.index/5d210a6ea76b.js @@ -0,0 +1 @@ +rn_("AQABsGAckAABZQFkGQAAQ4EDsJAcJAABoDAAABkiY25zE4ACsHAadgABY3MBAwD0RhwAAAEAggABAAGEArBAG38AAaBAAAAbgWRzAQAAOzAAAAEAAAYAAwDiGAIAfRkCAOEbAAATgwKgYAAAG/VnckOAA6AgAAAb8qBwAAAadWVob7cAAACGsHAbXAABsAAbsQDDoDAAABx+HCASOjAAAAEAAAAAABEAEAAAAMEJwgmbC5wLnQueC58LoAuhC8cQQhPiFuEZTRtjG2QbZRunGwEEAbCQHPgAC2UBbBkAAFOAA6BAAAAaemRlcgEBAbAQF5oEU3X1iA4AAIoNHAClAB4A84ADYWVp") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5d36fca2c08b.js b/pr/3367/docs/search.index/5d36fca2c08b.js new file mode 100644 index 0000000000..799194dc86 --- /dev/null +++ b/pr/3367/docs/search.index/5d36fca2c08b.js @@ -0,0 +1 @@ +rn_("AQEA9F4aAAABAAEAAQAjAAOhIAAAHQCgAAAADhBjcnMB7RYAAAEBAaBAAAAbxWX0MRoAAAEA8AEBACOCAqAwAAAbr2RpAQEA9EoaAAABAAEAAQABgAKgIAAAGfOADLoAHL5pefMAhBRABAFlDAAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5d8b23bc9c20.js b/pr/3367/docs/search.index/5d8b23bc9c20.js new file mode 100644 index 0000000000..3b72db6c78 --- /dev/null +++ b/pr/3367/docs/search.index/5d8b23bc9c20.js @@ -0,0 +1 @@ +rn_("AYgCoEAAABzMoAAAABwmZXMBBAGgMAAAG/Zj8v4ZAAABAAEFADswAAABAAAGAAMAeBoBAKsbAwCKHAAA8wMDY2Vw8iATAAABACOAAqCAAAAZ/WZw") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5e00b2e97a8d.js b/pr/3367/docs/search.index/5e00b2e97a8d.js new file mode 100644 index 0000000000..26e3f422b5 --- /dev/null +++ b/pr/3367/docs/search.index/5e00b2e97a8d.js @@ -0,0 +1 @@ +rn_("AQEAOzAAAAEAALwAAQCpFLwAAQUBsDAcOwABcPJWGgAAJAEBigKggAAAHPmgkAAAHP1idQGAAqAAAAATYKAAAAAW92RyE4ACsOAcjAABZWlDgAOgYAAAHNqgYAAAGe9jbXDzgAJweDcCAICGsCANxwPvsBAbfQABoBAAABgkEUAO") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5e6fb814b055.js b/pr/3367/docs/search.index/5e6fb814b055.js new file mode 100644 index 0000000000..9784258597 --- /dev/null +++ b/pr/3367/docs/search.index/5e6fb814b055.js @@ -0,0 +1 @@ +rn_("AQIA85sSAAABAAEAAYACsIAckgABsLAcyQABYWwThgKwIBpwAAF0dQEGAbDAHMcAAWny2xgAAAEAlwEAgIWgYAAAGiagcAAAGiekAQgBAQDz3gcAAAEALQlTAAOwMAwqAAFlaXk7MAAAAQAAYAAEAA4BAAC4EQAAvBdcAPsYAQA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5ed7710af0dc.js b/pr/3367/docs/search.index/5ed7710af0dc.js new file mode 100644 index 0000000000..ef66963528 --- /dev/null +++ b/pr/3367/docs/search.index/5ed7710af0dc.js @@ -0,0 +1 @@ +rn_("AQIA9OkbAAABAAEAAQABBAA7MAAAAQAADQADADAZCAA6GQMAQRwAAPMCAmV6OjAAAAEAAAAAAAcAEAAAANMN1A3VDdYNxxvZHPoc+xw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5eea27eafe19.js b/pr/3367/docs/search.index/5eea27eafe19.js new file mode 100644 index 0000000000..f932d12ccc --- /dev/null +++ b/pr/3367/docs/search.index/5eea27eafe19.js @@ -0,0 +1 @@ +rn_("AQUDoJAAAByVoIAAABzEoKAAAByqYnN29uUYAADsAswAAQAdAAEAEwACoQAAAB0EcHQ7MAAAAQAAaQAGAI0LAABdDAAArA5iAG0TAACXFwEAZhkBAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/5f988263debd.js b/pr/3367/docs/search.index/5f988263debd.js new file mode 100644 index 0000000000..13aaebb100 --- /dev/null +++ b/pr/3367/docs/search.index/5f988263debd.js @@ -0,0 +1 @@ +rn_("AQABoCAAABnrZvIOCAAAbRATAISgQAAAG2+wABNvBV+gQAAAHOAYAAU7MAAAAQAAWQAVABcHAQCQCQAA5g0AALQQAAD8EAAAsRIhAEQUAACFFwAAkRcAAEwYIQC8GAAAIBkAAGIZAAADGgAAZhoBANQbAAD8GwAAPxwBAFYcAADOHAAA9BwAACOAArCQHD0AAWFl") \ No newline at end of file diff --git a/pr/3367/docs/search.index/608434208057.js b/pr/3367/docs/search.index/608434208057.js new file mode 100644 index 0000000000..36b4de25c1 --- /dev/null +++ b/pr/3367/docs/search.index/608434208057.js @@ -0,0 +1 @@ +rn_("AQMBoHAAABuCZjswAAABAACLAAMAAw4AANYSSACJGUEAAYACoFAAABkVoLAAABwwYWwBAwD2JxoAAI4BBwABAAUAAQDHAQAAhaBAAAAW4LAwDfcAAQagATswAAABAAAIAAMApxcBAB4ZAQDTGQQAAYACoHAAABvhsMAcJAABZWkjgAKwQBjwA/ZldgEFAPPFGAAAAQABAPMAAXP1rQoAANsHwQYjAksAYwADoDAAABzLY2RyOjAAAAEAAAAAAAkAEAAAAOMHqQiqCKsIrAjuFu8WUBpoG5AbkwCEsDAOBQABoEAAABx9EBAG8w4DAAB9CAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/612e3413c39a.js b/pr/3367/docs/search.index/612e3413c39a.js new file mode 100644 index 0000000000..7b80687b8a --- /dev/null +++ b/pr/3367/docs/search.index/612e3413c39a.js @@ -0,0 +1 @@ +rn_("AQcA9H8aAAABAAEAAQAjgQKgcAAAGn5hcgEEADswAAABAAAwAAIALBkAAIQaLwDzAAFvAXwLAAABAQDzwhYAAAEAMwUTgQKgMAAAF5lkbfMAA2NzdDswAAABAACWAD0A6QcSAM8NAQDnDQAADQ4AALEQAQC2EAEAwRABAM4QAgDqEAEA7RACAPoQAQADEQAAVBMIAF4TAQBnEwAAbBMAAHITAQB3EwAAhxcBAI8XAQClFwEAtBcDAMgYBADgGAAA6BgAADAZCAA6GQMAUBkAANsZAQDiGQUA6RkAAPAZAgD1GQQA/hkBAFEaAwBXGgAAYhoDAHYaAQB6GgAAWBsAAGYbAQBvGwAAeBsAAJcbAACpGwAAtBsAAMUbAQDlGwAA5xsBAPAbAQDzGwEALRwAADkcAQA9HAEAQRwAAGscAACMHAMAlRwAAKocAADFHAEAzBwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/617baaa0041b.js b/pr/3367/docs/search.index/617baaa0041b.js new file mode 100644 index 0000000000..3e4c420961 --- /dev/null +++ b/pr/3367/docs/search.index/617baaa0041b.js @@ -0,0 +1 @@ +rn_("AQYBsEAb5wABZTswAAABAAANAAIARBkAABEaDAABAgD06RsAAAEAAQABAAEEADswAAABAAANAAMAMBkIADoZAwBBHAAA8wECZXo6MAAAAQAAAAAABwAQAAAA0w3UDdUN1g3HG9kc+hz7HPOAAm5zAQgBoHAAABy/ZAFSGwAAEwACoDAAABbnY3TybQkAAAEAAQYA89QcAAABAAEAAQMA86YcAAABAAEA8wUCcHMBoBgAAAEKAPQbHAAAAQABAAEAAQEAOjAAAAEAAAAAAA0AEAAAAPIN8w30DZASkRKSEpMSlBKVElwZZRmAGQkaphvzgAJmdgGAAqAwAAAbxbAQENkAAXJ48wABZTswAAABAAATAAUAsQkEAMkMCQBxGAAAMRoBACIcAQDzgAJkbgEDAPTtDQAAAQABAMANAQEBsIAc6AABc/LSGwAAAQABCQGwgB0GAAFz8uMcAAABAPOBAmRpAQMCsEAbZgABoJAAABzNZXc7MAAAAQAADgAGAOoNAgCNEgIAihcBACcZAgAeGgIAYhsAALc0AACLoAAAAAfkoEAAABeQsDAN8AABoCAAAA6UsFATTQABX1EGOzAAAAEAACMAEQCCAwEA+QYAAJ0JAwB2CwUA0wwAAMcNAACADgEA8BADALYRAAB0EwAAwhYBAP0WAABfGQEA9hsAAP0bAABtHAQAyxwAAGMAA6BwAAAcEWFlaTswAAABAAAGAAMACgcBAJ0bAACmHAMA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/62584d2c8c84.js b/pr/3367/docs/search.index/62584d2c8c84.js new file mode 100644 index 0000000000..02710f4655 --- /dev/null +++ b/pr/3367/docs/search.index/62584d2c8c84.js @@ -0,0 +1 @@ +rn_("AQIA8/oZAABkAQEAI4ACoHAAABntYWQBAwD02xkAAAEACwIBABOAArAwGd0AAXJ2AYICsCAb7gBpoDAAABttZnSnAAAAiLBgHB8AKaAgAAAZYaAwAAAZOaCwAAAcsaAQAAAY8rBAGd8AAR4pAjswAAABAAAdAAwAwxACAGoSBADPGAAA0RgAAEQZAABKGQAAWxkAABEaDAC0GgAAGhwAALYcAADtHAAAIwACsBATOgABZXnyzQ0AAAEAAQMA9FMTAAClAwEAAQATgAKgYAAAG6Zhb8OAhKAAAAAMHYAcgAMgDgwgAfOAAmVp") \ No newline at end of file diff --git a/pr/3367/docs/search.index/631977bc4a93.js b/pr/3367/docs/search.index/631977bc4a93.js new file mode 100644 index 0000000000..88860e186e --- /dev/null +++ b/pr/3367/docs/search.index/631977bc4a93.js @@ -0,0 +1 @@ +rn_("AQMBsIAc4QABc/KeGwAAAQAnAAAAhaAwAAAN36CAAAAZT7CAHHYAAaCAAAAcBAEJCjowAAABAAAAAAAQABAAAAAEAkAD4gbjBiMMTAx6Dn0SrRKHGIgYiRjmGO0YLBpdHOoc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/64b86b725f9f.js b/pr/3367/docs/search.index/64b86b725f9f.js new file mode 100644 index 0000000000..8c1061e403 --- /dev/null +++ b/pr/3367/docs/search.index/64b86b725f9f.js @@ -0,0 +1 @@ +rn_("AQkCoDAAABypoGAAABzXcHMBCBwAAAEGAPPUHAAAAQABAAEDAPOmHAAAAQABAPOJAnBz8wICbnDzhAsAAAEAAQATAAOwIAy5Bc2gYAAAFuFkcncB8hgAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6667e297d709.js b/pr/3367/docs/search.index/6667e297d709.js new file mode 100644 index 0000000000..b249a5aaff --- /dev/null +++ b/pr/3367/docs/search.index/6667e297d709.js @@ -0,0 +1 @@ +rn_("AQIA9csZAAABAAEAAQABAPMAAWk7MAAAAQAACgACAD4MAABvDgkAAYECoFAAABv0sAAXuAFtZXPzgAJhcgEAAPY3EwAAyQZqAQEAEgABAAGIAqAgAAAczqAwAAAc32lwE4ACoFAAABlkbnIBhQKgMAAAHGWgIAAAHDZidSOAAqAgAAAbo2ls5wQAAIigMAAAG/WgIAAAG9SgMAAAFtOgIAAAG1BTCQw6MAAAAQAAAAAAFAAQAAAA9Qz2DPcM+Ay8EL0QvhC/EMAQuhG7EbwRjRguGhEcWhzPHOUc7Bz5HP0c") \ No newline at end of file diff --git a/pr/3367/docs/search.index/673f9d002d44.js b/pr/3367/docs/search.index/673f9d002d44.js new file mode 100644 index 0000000000..0e25f095fd --- /dev/null +++ b/pr/3367/docs/search.index/673f9d002d44.js @@ -0,0 +1 @@ +rn_("AQEBsJAb8AABcDswAAABAAAVAAUA/Q0CAKISBgCBGQEAQBoFAFgaAwAjgAKgUAAAHGZwcgEHAaBAAAAc2GIBahwAABOHArAgG30AAWRtAQEBoDAAABx+dwGnGwAAE4ICsKAckAABZWkTAAKgUAAAHNdldAG4HAAAAYMCoFAAABpzsDAcpAABY3ABgQOgUAAAG3ygAAAAHKmgsAAAHJRiZHQjgAKgIAAAE2RhcgEDADswAAABAAAGAAIA8hABAG0cBAABAgD08BAAAAEADAYABQEBAPb7DQAAAQCkBAEALgkBAFOAhLBQGN4AAbAQG2oAARFAAgECAPObFwAAAQB2AQGEAqAgAAAZ86AAAAAZeWl584ACYW8BBQD1tRsAAAcAAQAFAAEAI4ECoHAAABvWbXMBgAKgAAAADEGgEAAADeRkeBMBAqAgAAAbqWVyOzAAAAEAABEAAQCOGBEAAQcBoEAAABzRYgFoHAAAAYECoEAAABx6oGAAAByyYXIjgQKwIBeuAW1mbkOAA7CAHP4AAaBAAAAbe2VsbwEBAaBwAAAdBWLzjBcAADUFAgD37wMAzqAwAAAQ9IAnfgc6MAAAAQAAAAAAEQAQAAAABwgICBUIdQl2CTkM2BbrFgIXshhrGVMbVBtXG6UbqBuqGwgc") \ No newline at end of file diff --git a/pr/3367/docs/search.index/67bbee2489cb.js b/pr/3367/docs/search.index/67bbee2489cb.js new file mode 100644 index 0000000000..7d9dbf61ab --- /dev/null +++ b/pr/3367/docs/search.index/67bbee2489cb.js @@ -0,0 +1 @@ +rn_("AQMA9WoaAAABAAEAAQABABOBAqAgAAAW2GNsAYACoCAAABKHoDAAABbXYWUnAQAAxqAwAAAN4aCAAAAbTaCQAAAbnLBgGUIAAcACwAI7MAAAAQAABgADAFEDAgDmBgIAmg4AAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/67bc12d79593.js b/pr/3367/docs/search.index/67bc12d79593.js new file mode 100644 index 0000000000..fdbd546ee7 --- /dev/null +++ b/pr/3367/docs/search.index/67bc12d79593.js @@ -0,0 +1 @@ +rn_("AYACoFAAABsYoBAAABgmaXQBAAGgEAAAGCVvOzAAAAEAAAYAAwATDgMA1xABAGccAAABgAKwEBvPAAGgIAAAG/1hbxOCArBwHKQAAW1xE4ECoOAAABzTbHABgwKwMBu5AAGwQBviAAFwc4dwAACLoKAAABxtoRAAABzxsKAcbgABoPAAABzSsKAcOwABsKAccAABoHAAABu7lbQHOzAAAAEAADgABAC8CQMANgwCAIQMMAD9GQAAAQABoDAAAA31YQEcGQAAY4ADoAAAAAOAa2x0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/681f1c5fa6c3.js b/pr/3367/docs/search.index/681f1c5fa6c3.js new file mode 100644 index 0000000000..622b1b4f6a --- /dev/null +++ b/pr/3367/docs/search.index/681f1c5fa6c3.js @@ -0,0 +1 @@ +rn_("AQMA9NscAAABAAEAAQATgAKgMAAAGghveQEDAbAwHCcAAXTyexoAAAEAAQQA9YQbAAABAAEAAQABAPOAAm9yAQEA9VUZAAABAAEAAQABABOAAqAAAAAZ0G5yhwUAAMmhIAAAHQGgUAAAG8igcAAAHL+gkAAAHDewwByrAAGgYAAAG/fATgAOOjAAAAEAAAAAABcAEAAAAMMNHg4fDmsT0BgQGRMZFBkZGS0ZJRp+Gn8agBqBGoIaUhtQHFkcZhyBHJwcuhzCHA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/694923bc1837.js b/pr/3367/docs/search.index/694923bc1837.js new file mode 100644 index 0000000000..61f97c9395 --- /dev/null +++ b/pr/3367/docs/search.index/694923bc1837.js @@ -0,0 +1 @@ +rn_("AQIA8/oZAABkAQEAAQABsGAckAABZQFkGQAAQ4EDsJAcJAABoDAAABkiY25zZwAAgIagcAAAGe2gEAAAEPagYAAAG++wcBp2AAENYAI=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6adfa2d470e2.js b/pr/3367/docs/search.index/6adfa2d470e2.js new file mode 100644 index 0000000000..d643bab3b5 --- /dev/null +++ b/pr/3367/docs/search.index/6adfa2d470e2.js @@ -0,0 +1 @@ +rn_("AYECsBAXfwABoEAAABmFbnMBAgDzaBMAAAEAAQBjAAOgEAAAGiVlaXPy3xkAAAEAAQABsIAcrwABZvLrGAAAAQABBQD0wBsAAAEA0QABAPOAAmVzY4ADoDAAABtUZWd0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6b4c08938677.js b/pr/3367/docs/search.index/6b4c08938677.js new file mode 100644 index 0000000000..5fc3ef963e --- /dev/null +++ b/pr/3367/docs/search.index/6b4c08938677.js @@ -0,0 +1 @@ +rn_("AQEBoJAAABvkYwGcGwAAI4ECgBymABABZHQBBQGgUAAAHBdmAb0YAACHAQCAhaCAAAAaP6DQAAAcZqAQAAAIEUGBAQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6b73884074e2.js b/pr/3367/docs/search.index/6b73884074e2.js new file mode 100644 index 0000000000..ccb678f08d --- /dev/null +++ b/pr/3367/docs/search.index/6b73884074e2.js @@ -0,0 +1 @@ +rn_("AQQAOzAAAAEAAAsAAwCbDgkAhhgAAHUZAAABBgD0RhoAAAEAAQABAAEAAbAgFEQFv2n2pQoAAAEAAQAODnUAiQITAQKgMAAAFEVzdPPhBwAAGg/FAdOAhKBAAAAcWwCgBg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6ba935847153.js b/pr/3367/docs/search.index/6ba935847153.js new file mode 100644 index 0000000000..eaf875355f --- /dev/null +++ b/pr/3367/docs/search.index/6ba935847153.js @@ -0,0 +1 @@ +rn_("AQIAOzAAAAEAAAUAAQBvEgUAAYACsBAaMwABoBAAABwqbncBCAD0QhwAAAEAAQABAAEBAaAgAAAclXI7MAAAAQAAEQAHACwMAgBoDAgALhkAAFEZAAAfHAAASBwBAGkcAAABBAA7MAAAAQAABQABAHIYBQD3AQAAhqBgAAAaPBRBCTowAAABAAAAAAALABAAAAAWCBcIGAgZCBoIGwgcCDkapBtgHK0cAB0=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6bbb9e83aaf9.js b/pr/3367/docs/search.index/6bbb9e83aaf9.js new file mode 100644 index 0000000000..5eb63642e6 --- /dev/null +++ b/pr/3367/docs/search.index/6bbb9e83aaf9.js @@ -0,0 +1 @@ +rn_("AQUBoAAAABzycgHVEgAAAQEBoGAAABxpYgHuGQAAJwAAAYWgQAAAG1ewcBwSAMGgMAAAHA+gUAAAHFsYIQg7MAAAAQAABwACANkMBgDmFgAAAQIBoEAAABnwZTswAAABAAAFAAIA5BADAHIbAQDzAAFr9I4LAAABAAEAAQDzgQJjcwEAAaCAAAAc/GYBKRwAAPMGAXPydRMAAJkG84ADY2xz") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6d569a951fed.js b/pr/3367/docs/search.index/6d569a951fed.js new file mode 100644 index 0000000000..cd866248e0 --- /dev/null +++ b/pr/3367/docs/search.index/6d569a951fed.js @@ -0,0 +1 @@ +rn_("AQcA9EYaAAABAAEAAQABgAOggAAAG7KgQAAAHM2gwAAAHGdpb3kBBwA7MAAAAQAABQABAEAaBQABAgGwQBw5AAFlAc4bAAATgAKgQAAAG1lwcgEJAaAAAAAbsXPzYxsAAAEAAQABCQDzGRwAADYAsgAjgAKg4AAAHJ9haQENADswAAABAAAFAAEAhBwFABOAAqCQAAAb22luAYACoOAAABz2oEAAABi/b3LnLwAAiqDgAAAcg6DgAAAcig1wD/IZGAAAZQQ=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6d9dc6990f11.js b/pr/3367/docs/search.index/6d9dc6990f11.js new file mode 100644 index 0000000000..77375fb7e3 --- /dev/null +++ b/pr/3367/docs/search.index/6d9dc6990f11.js @@ -0,0 +1 @@ +rn_("AYACsFAcsgAOsQAc3QABZXgjgAKwQBx6ACBhcgEHAbBAHDkAAWUBzhsAAAGAAqBgAAAb4KAwAAAaVWV0AQMA9dMZAAABAAEAAQABAAEBAaCQAAAcxWzzzRgAAAgDjAABgwKgEAAAHEugsAAAHPNscwEEAPRRGgAAAQABAAEAAQQBoAAAABtsZPJQGgAAQAHnCwABiaCwAAAcuaBgAAAb36AwAAAZ2JYJBzswAAABAAAJAAIALxMHACQWAQABAAD1LhMAAD8GAQABAAEAEwACsKAcxwABZ3YBGhkAAPOAAm5vAQMA9cgYAAABAAEAAQABACOAArAAGNAAQGRyZwIAAYawUBoGAAGgYAAAGdKwABhuAAEUQRI7MAAAAQAACQAEADAMAwCCDAEAsRcBANsYAQATgAKgAAAAFtZjcgECAbCAHQYAAXPy4xwAAAEAVwQAAIigQAAAG8mgQAAAG8qgIAAADNOgQAAAG5ygMAAAEbkTyAY6MAAAAQAAAAAACQAQAAAAhAMCCAMIBAgFCAYIcwl0CasSIxg=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6e24177b5956.js b/pr/3367/docs/search.index/6e24177b5956.js new file mode 100644 index 0000000000..803c9cee00 --- /dev/null +++ b/pr/3367/docs/search.index/6e24177b5956.js @@ -0,0 +1 @@ +rn_("AQACoDAAABujoCAAABtQYnUBjRgAACOEAqAwAAAbT2RzI4ACoCAAAA3maXQBCQD0ZhoAAAEA2AEBAAEFAbDAHI4AAWXyRhMAAAEAAYACoJAAABuioGAAABkWZG4BAwGgcAAAG9RnAZIOAAABgQKggAAAHOygYAAAHPlkcxOJArCQHOUAGGJ1xw8AAImgcAAAGWugkAAAG06gkAAAG1EPiQYBFwEAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/6fc90deed12a.js b/pr/3367/docs/search.index/6fc90deed12a.js new file mode 100644 index 0000000000..19bc2b84a4 --- /dev/null +++ b/pr/3367/docs/search.index/6fc90deed12a.js @@ -0,0 +1 @@ +rn_("AYACoBAAABD2oGAAABvvbm8BAAKgYAAAHEmgMAAAHJRiczowAAABAAAAAAANABAAAAAADpkOkxeUF/QY9Rj2GPcY+Bj5GPoYTRnEG9sbhwAAAIWwMBevAAGgQAAAGOCwMBkeAAGgoAAAG/KSAAM7MAAAAQAADgACAFEMAgDiDAsA84ACZWkBBgD0qRcAAAEAAQABABOAAqAQAAAMXmNuAYACsNAc+gABoBAAABM3ZXMBAwGwABbzAAF58pkSAAABAAEDAPSXEgAAAQDvBgEAAQQA8/AWAAABAAEAAQABsGAbuAE/ZgE4EwAAI4ACoJAAABvMY3LnAQAAiLBAFu4AAaBwAAAZdaBgAAAZGbBAFvUAATQgGzswAAABAAAQAAMAYgMAAP0GCACoEAYAAQIBoCAAABDjZQG5CQAAAYADoHAAABwqoDAAABvloIAAABxQY3JzAQABoCAAABwqb/U5GgAAawG8AE0AUwABAgDzBA4AADsLAQATgAKgMAAAG+9ydHcvAADKsGAabwF1oAAAABjqQGYWCfd/AwAAegoBAJ0AAQD6CH8B") \ No newline at end of file diff --git a/pr/3367/docs/search.index/708ecbd29119.js b/pr/3367/docs/search.index/708ecbd29119.js new file mode 100644 index 0000000000..fde7460e6b --- /dev/null +++ b/pr/3367/docs/search.index/708ecbd29119.js @@ -0,0 +1 @@ +rn_("AYACoCAAABwvoCAAABkRYXIBgAKgQAAAHJqgYAAAHMBhckOAA6BAAAAbyaBAAAAbymJscwECADowAAABAAAAAAAMABAAAAApEyoTwxheGXIaeBp5GqsbrButG64bihz1HNOAhKDwAAAdAGAgBA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7130ced0589b.js b/pr/3367/docs/search.index/7130ced0589b.js new file mode 100644 index 0000000000..b0165b154d --- /dev/null +++ b/pr/3367/docs/search.index/7130ced0589b.js @@ -0,0 +1 @@ +rn_("AQCFoJAAABzPoEAAABwtoEAAABwDoGAAABx1oCAAABuYmAAK8vMYAAB1ACMBAqBgAAAZ9GhzOzAAAAEAABgABgBPDAEAnRcBAKEXAAD+GBEAAhoAAAoaAAABAgGwUBvdAG9jAVoZAADzgAJucw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/71c0a7edf2e2.js b/pr/3367/docs/search.index/71c0a7edf2e2.js new file mode 100644 index 0000000000..cab19410d0 --- /dev/null +++ b/pr/3367/docs/search.index/71c0a7edf2e2.js @@ -0,0 +1 @@ +rn_("AQABoIAAABxgdAH2DQAAE4ACsEAcogABZ3YBAAKgQAAAHKqgUAAAGOllaTswAAABAAAIAAQAzQkDACYMAQDQHAAA/hwBACOAAqDAAAAcOGl5AQABsAATbwVfcjswAAABAABFAAQA/BAAALESIQCRFwAATBghACOBArCQHD0AAWFlIwECoEAAABzGZWkBmBwAANOAhKBgAAAZdCkgAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/72c312cad641.js b/pr/3367/docs/search.index/72c312cad641.js new file mode 100644 index 0000000000..ae07af11d2 --- /dev/null +++ b/pr/3367/docs/search.index/72c312cad641.js @@ -0,0 +1 @@ +rn_("AQIBsGAbuAE/ZgE4EwAAIwIDoEAAABvloCAAABM3ZWxtAREZAAABAwGwUBxsAEtjAbAbAAABgAKgIAAADhCwEAw0DzlueAEBAaBwAAAcv2QBUhsAAPMBAWUBLxwAABOAArBgGV8AAWNptwEAgIagcAAAHQCgIAAAGdiRQEE=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/738fb6316a26.js b/pr/3367/docs/search.index/738fb6316a26.js new file mode 100644 index 0000000000..66230a76a2 --- /dev/null +++ b/pr/3367/docs/search.index/738fb6316a26.js @@ -0,0 +1 @@ +rn_("AQABsFAb3QBvY/S6DAAAAQCfDB8AAQMAOzAAAAEAAC8AAQAdGy8AAYECoIAAABzsoGAAABz5ZHNThYSggAAAHBqwkBzlABgKAAoBAgKgYAAAHC+gMAAAG51jcPOiFwAAAQABACOAAqAgAAAQs2V5AQYA9G0ZAAABAAEAAQBDgISwIBxsAEugsAAAHDGg0AAAHPdgIAQBCQGgQAAAHOB0AVYcAAATAwKgUAAAGepiZvXdDQAAAQCpAI8KVAABAgD06RsAAAEAAQABAAEEAPU6GQAAAQABAAEABAPzAgJlejowAAABAAAAAAAHABAAAADTDdQN1Q3WDccb2Rz6HPscI4ACgAt5ABABZWnzgANkbW4BAQGwABtsAEtk81AaAAAYASgAI4ACoBAAAA3SbnMTgAKhEAAAHL1vdQEAAaBAAAAcBGUB1xYAAAEAArAwGVIAAaAQAAAcWmxt9Z8SAAC0AKUDAQABALcXAACJoCAAABnzoEAAABMokElZAWsDAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/73c3866a8ade.js b/pr/3367/docs/search.index/73c3866a8ade.js new file mode 100644 index 0000000000..3ba59de1b4 --- /dev/null +++ b/pr/3367/docs/search.index/73c3866a8ade.js @@ -0,0 +1 @@ +rn_("AQMAOzAAAAEAAC8AAQAdGy8AAYECoIAAABzsoGAAABz5ZHOXAACAhaCAAAAcGqAgAAAYJLCQHOUAGAoQCkOAA6AQAAASn7BQG1wAAWNkdA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/73dad749a23e.js b/pr/3367/docs/search.index/73dad749a23e.js new file mode 100644 index 0000000000..c7c490dcad --- /dev/null +++ b/pr/3367/docs/search.index/73dad749a23e.js @@ -0,0 +1 @@ +rn_("AYACsBAXfwABoEAAABmFbnMjAAOggAAAHQSgMAAAGRxhZWY6MAAAAQAAAAAABwAQAAAARQjhDM8W0BbRFtIW+BwDHQ==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/73e213d1266d.js b/pr/3367/docs/search.index/73e213d1266d.js new file mode 100644 index 0000000000..f09f917840 --- /dev/null +++ b/pr/3367/docs/search.index/73e213d1266d.js @@ -0,0 +1 @@ +rn_("AQEBsAAQ1wABc/W8CQAAAQABAAEAPhAjgAKgQAAAHPNjbAGAAqAAAAAb+LAwF4EAAW50AQCFoJAAABzPoEAAABwtoEAAABwDoGAAABx1oCAAABuYmAAK8vMYAAB1AAGBAqAAAAAc6qAAAAAc6zQ2AQQBoAAAABvNcwExHAAAIwGEoQAAABz3oEAAABuPoIAAAB0AFAAGASMWAADDgISgQAAAGOGwEAz5AAEA8AABgAOwABCwBjegAAAAEz+wEByrAAFlc3UBBADzaBMAAAEAAQABggKgQAAAHCygUAAAHLhpciOAArBAHQYAAWdp84ADZ3J0VwYAAIegYAAAGfSwIBEKBnygUAAAE2uBQQs7MAAAAQAAGQAHAE8MAQCdFwEAoRcAAP4YEQACGgAAChoAAJkcAAABgAOgAAAAHF2gAAAAHF6gcAAAHMI0NmEBAAA7MAAAAQAAEAAFAJEbBQBNHAEAhBwFAJYcAQC9HAAAAYACsCAcjAABoGAAABvycnZjgAOwEBRCAAFucnMBAgKwcBz6AAGgcAAAGmhlcgG8DAAAVyAAAMqgUAAAGMGg0AAAHK6wIAxVDTCgQAAAF4mwYBz4AAugUAAAGiWgYAAAHLpATYIOOjAAAAEAAAAAAAwAEAAAAJQJ2AnTENQQ1RDWEFETUhN7GTAaAhx1HPMcAYACsCAUQAABsQAc2wABZXgBAwGgYAAAGnRo90sTAAABACYGCgDgAAEACwAjgAKgcAAAG45lbwEAAaBgAAAcSWI6MAAAAQAAAAAADQAQAAAAAA6ZDpMXlBf0GPUY9hj3GPgY+Rj6GE0ZxBvbG4cAAACFsDAXrwABoEAAABjgsDAZHgABoKAAABvykgADOzAAAAEAAA4AAgBRDAIA4gwLABOBAqAgAAAQ9mVpE4ADoCAAABw1sDATdgVFbG51AQIAOzAAAAEAAAUAAgBRHAIA7hwCAAGCAqCQAAAc0LDgHP4AAWNyAQMA9TkaAABrAbwATQBTAAEAAaBAAAAZHXQBMhwAACMAAqBAAAATZ2VzOjAAAAEAAAAAAAcAEAAAAAkICgh3CXgJeQl6CcYNKxoBAAGgAAAAG7Fz9OIWAACBBAEAAQAjgQKgQAAAGnplcgEAAaAAAAAYznI7MAAAAQAAIgACAJEXAABMGCEAI4QCsJAcPQABYWXzgAJpdgGEAqCwAAAc56AAAAAZhmFz04CEsFAckAABQCAFAQYAOzAAAAEAACQAAQAnGCQAAQcBoHAAABy/ZAFSGwAA84ACb3IBggKgAAAAHOqgAAAAHOs0NvMFAWkBmRwAAGf1DwCQoDAAABuBoHAAABxQoFAAABwXoCAAABC0v9UPOzAAAAEAAEAAIADgBwAAHQgCAG0JAQCKCwAA4AwAAPAMAQAODgEApg4FACcTAADIFgYA4BYAAOwWAAC9GAAA7xgAAGQZAADoGQAA8xkAAAgaAAA9GgEAThsAAJEbBQCZGwIAoRsAAAccAAANHAAAMBwAADMcAABNHAEAhBwFAJYcAQCzHAIAvRwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/741f7ab64068.js b/pr/3367/docs/search.index/741f7ab64068.js new file mode 100644 index 0000000000..5667d23ac3 --- /dev/null +++ b/pr/3367/docs/search.index/741f7ab64068.js @@ -0,0 +1 @@ +rn_("AQMA9tkbAAABACYAAQAKAAEAAQEA9tcbAAABACYAAQAKAAEAE4ECoEAAAByAY20BAQD0ZhoAAAEA2AEBACOAAqBgAAAcnG56AQYA9mMcAAABAA4AAQAIAAEA1wEAAIegYAAAHH+gcAAAHMSgYAAAHIEYAQ/0FRkAAAwAPAD0AQGAAqAAAAAY5qAAAAAY5zQ28wMBdgFxEwAAFwEAAMigkAAAHJWgcAAAHH2gYAAAG76ggAAAG6SwIBwgAAGgoAAAHKrAABIPOzAAAAEAABQACgDJCQAAGwwBAAYRAwBNEwEAlRcBAOUYAADRGwAAQhwDAJ0cAQC7HAEA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7444602978bc.js b/pr/3367/docs/search.index/7444602978bc.js new file mode 100644 index 0000000000..d3db81792d --- /dev/null +++ b/pr/3367/docs/search.index/7444602978bc.js @@ -0,0 +1 @@ +rn_("AYUCoEAAABwsoFAAABy4aXIBAAKgUAAAGMGgQAAAF4ljbPWUCQAARAAqEnMAfgBjAAOwYByQAAFlc3Ty8QwAAHMM") \ No newline at end of file diff --git a/pr/3367/docs/search.index/74b83b96b911.js b/pr/3367/docs/search.index/74b83b96b911.js new file mode 100644 index 0000000000..4516ca8395 --- /dev/null +++ b/pr/3367/docs/search.index/74b83b96b911.js @@ -0,0 +1 @@ +rn_("AQABsIAceAABc/OKGAAAAQABAAEDAbCAHOEAAXPynhsAAAEAEwACsIAcdgABaXPzhxgAAAEAAQDzgQI0NiOAArAADoQAAWRw") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7576217634bd.js b/pr/3367/docs/search.index/7576217634bd.js new file mode 100644 index 0000000000..19b02df142 --- /dev/null +++ b/pr/3367/docs/search.index/7576217634bd.js @@ -0,0 +1 @@ +rn_("AQIA83sOAAABAAEAAQEBoIAAABwEdQF6DgAAI4ACoBAAAA55MzYBAgD1yxkAAAEAAQABAAEA8wEBaTswAAABAAAKAAIAPgwAAG8OCQBDgAOgYAAAGWSgMAAAFtNlbHQBAgA7MAAAAQAASgACAD0MAAAlDkkAAQcBoEAAABxrZfKDGwAAkQABAgA7MAAAAQAAvAABAGYVvAABAgA7MAAAAQAAvAABAKkUvABjAAOgIAAAELplbXI7MAAAAQAAvgADAJkJAACwCrwAmRcAAAEBAPTPFgAAAQABAAEAAQAAOzAAAAEAAAwAAQB1DAwAY4ADoDAAABMtYWV084ACcnSTgISw8By7AAGgUAAAGxkBRAEBAAGggAAAHPxm8sgNAABhDgEHAPP5GwAAAQABACOAAqBQAAAZ0WFv8wICZnP2LwwAAEMAAQABAAEHmQYTgAKwEAquAAFhbwECAaAwAAAY0mH1eBIAAAEAAQABAAEAAQkBoEAAABzgdAFWHAAAEwECoFAAABnqYmb13Q0AAAEAqQCPClQA84ACbnQBAQGwIBj7AAFi8yIOAAABAAEAQ4ADoFAAABvWoBAAABomY25yAQQAOzAAAAEAAAYAAQDIFgYAAQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMIAW07MAAAAQAABgADAOgZAACZGwIAsxwCAAEDAbCAHQYAAXPy4xwAAAEAE4ECoAAAAAy1bnPzgAJpcrd2AwCOoJAAABsZoDAAABoBoHAAABoJsIAbGgABl7GPOzAAAAEAAAACBgBOAwAANgQnAZsJAQB0CwEAXwwAAA8P0gA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/76a78bceb8c8.js b/pr/3367/docs/search.index/76a78bceb8c8.js new file mode 100644 index 0000000000..8834ccce04 --- /dev/null +++ b/pr/3367/docs/search.index/76a78bceb8c8.js @@ -0,0 +1 @@ +rn_("AYACoFAAABsYoBAAABgmaXQBAAGgEAAAGCVv9RMOAAABAAEAAQBRDgGAArAQG88AAaAgAAAb/WFvE4ICsHAcpAABbXETgQKg4AAAHNNscAGDArAwG7kAAbBAG+IAAXBzh3AAAIugoAAAHG2hEAAAHPGwoBxuAAGg8AAAHNKwoBw7AAGwoBxwAAGgcAAAG7uVtAc7MAAAAQAAMwACADYMAgCEDDAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/76fa5eb7c0e7.js b/pr/3367/docs/search.index/76fa5eb7c0e7.js new file mode 100644 index 0000000000..e122f70de1 --- /dev/null +++ b/pr/3367/docs/search.index/76fa5eb7c0e7.js @@ -0,0 +1 @@ +rn_("AQAA9B4BAAAWAgEAugmDAASgMAAADLagAAAABxugQAAADg01OGVuOjAAAAEAAAAAAA4AEAAAAAMCDAM/Ax4MHwwgDHkOew58Dn0OTxPpG+ob6xvsGw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/772467e18e07.js b/pr/3367/docs/search.index/772467e18e07.js new file mode 100644 index 0000000000..1d29a808d7 --- /dev/null +++ b/pr/3367/docs/search.index/772467e18e07.js @@ -0,0 +1 @@ +rn_("AQEBoEAAABxrZfKDGwAAkQAjgAKgEAAAGXdudgEFAPTbHAAAAQABAAEAE4ACsDAb8wDSZHJnAAABhaBQAAAacqBgAAAb3LAACawB1xQBA/SJFwAAxgJ7AZIA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7759138efa61.js b/pr/3367/docs/search.index/7759138efa61.js new file mode 100644 index 0000000000..dab6c98347 --- /dev/null +++ b/pr/3367/docs/search.index/7759138efa61.js @@ -0,0 +1 @@ +rn_("AQABoDAAABw1bwEHHAAAAQIA8+4cAAABAAEA8w0BbfOzHAAAAQABAAEAAaCQAAAcN2k6MAAAAQAAAAAACAAQAAAAww0TGRQZGRlZHGYcgRy6HMIcVwEAAIWgQAAAG3igcAAAG684IAI6MAAAAQAAAAAABwAQAAAAcRn5G/ob+xtbHK8csBz8HA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/777bedcf9532.js b/pr/3367/docs/search.index/777bedcf9532.js new file mode 100644 index 0000000000..1ffc6f7ea8 --- /dev/null +++ b/pr/3367/docs/search.index/777bedcf9532.js @@ -0,0 +1 @@ +rn_("AQUBoFAAABwXZgG9GAAAQ4ADoIAAABo/oNAAABxmYWdwAQEBsIAc6AABc/LSGwAAAQABCQGwgB0GAAFz8uMcAAABAPODAmRpE4ACoFAAABwrZHRnAAAAxbBAELEAAaCwAAAcGIAIFKv5sAAEcAH0RwMAAAEANAABAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/77e145438903.js b/pr/3367/docs/search.index/77e145438903.js new file mode 100644 index 0000000000..82548b095f --- /dev/null +++ b/pr/3367/docs/search.index/77e145438903.js @@ -0,0 +1 @@ +rn_("AYMCoEAAABzFoGAAABvcZXIBAAGgUAAAGgpl9zwTAAA0BYQBEQBqAAUAcAEBAwA7MAAAAQAABwACAEUZAwAbHAMAYwCEsLAcVAABsGAXoAQCBCAF9KQJAAAWD/wClQABAwA7MAAAAQAAEQABAI4YEQDzgANhZWk=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/77e1da522e36.js b/pr/3367/docs/search.index/77e1da522e36.js new file mode 100644 index 0000000000..b302aecfeb --- /dev/null +++ b/pr/3367/docs/search.index/77e1da522e36.js @@ -0,0 +1 @@ +rn_("AQQA9OUcAAAHAA0ABAABAAGhIAAAHQBjAe0WAAABAQD0ShoAAAEAAQABAPOBAmV0UwADsEAQzAABZW9y8yITAABBBv4B") \ No newline at end of file diff --git a/pr/3367/docs/search.index/790a03d5ac22.js b/pr/3367/docs/search.index/790a03d5ac22.js new file mode 100644 index 0000000000..27a23734c4 --- /dev/null +++ b/pr/3367/docs/search.index/790a03d5ac22.js @@ -0,0 +1 @@ +rn_("AQAAOzAAAAEAAAgABAC3DAAAyg0CABcOAgCQHAEAFwAAAIWgQAAAGVCgEAAAEtSgMAAAGe2hIAAAHOcYgQI6MAAAAQAAAAAADgAQAAAA4g31DeIQLRO5F7oXGhgbGBwYHRgeGB8Y0xhzGT8aE4ACsEAY8QNDZW8=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/79b7bbdd44be.js b/pr/3367/docs/search.index/79b7bbdd44be.js new file mode 100644 index 0000000000..1c80ee4c7e --- /dev/null +++ b/pr/3367/docs/search.index/79b7bbdd44be.js @@ -0,0 +1 @@ +rn_("AQIA83sOAAABAAEAAQEBoIAAABwEdQF6DgAAI4ACoBAAAA55MzYBAgD1yxkAAAEAAQABAAEA8wEBaTswAAABAAAKAAIAPgwAAG8OCQBDgAOgYAAAGWSgMAAAFtNlbHQBAgA7MAAAAQAASgACAD0MAAAlDkkAAQcBoEAAABxrZfKDGwAAkQABAwD0zxYAAAEAAQABAFOAA7DwHLsAAWFrcgEDAaAwAAAY0mH1eBIAAAEAAQABAAEAAQEBsCAY+wABYvMiDgAAAQABACOAAqAQAAAaJm5yAQQAOzAAAAEAAAYAAQDIFgYAAQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMJAW07MAAAAQAABgADAOgZAACZGwIAsxwCALe6AQCNoJAAABsZoDAAABoBoHAAABoJsIAbGgABl6GPOzAAAAEAAPwBBABOAwAANgQnAV8MAAAPD9IA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7a4e850f5494.js b/pr/3367/docs/search.index/7a4e850f5494.js new file mode 100644 index 0000000000..dd410c3d88 --- /dev/null +++ b/pr/3367/docs/search.index/7a4e850f5494.js @@ -0,0 +1 @@ +rn_("AQABoCAAABDjZQG5CQAAAQIBoEAAABnwZTswAAABAAAFAAIA5BADAHIbAQABBAGgAAAAG7dkAWgbAAAThAKgQAAAG7RjZZcBAACFsAAJfQ1WoNAAABytEQVA9I4LAAABAAEAAQA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7b1758c4b2b2.js b/pr/3367/docs/search.index/7b1758c4b2b2.js new file mode 100644 index 0000000000..dbf5d36086 --- /dev/null +++ b/pr/3367/docs/search.index/7b1758c4b2b2.js @@ -0,0 +1 @@ +rn_("AYACoFAAAByUoHAAABvvZWmDAgSwYBpvAXWw4Bz6AAGgAAAAGOpobXN29fkNAAABAJ0AAQD6CBMAArAAC4sAAWNzAZwbAAA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7bd9c1aac951.js b/pr/3367/docs/search.index/7bd9c1aac951.js new file mode 100644 index 0000000000..aca58766c5 --- /dev/null +++ b/pr/3367/docs/search.index/7bd9c1aac951.js @@ -0,0 +1 @@ +rn_("AQEBsJAb8AABcDswAAABAAAYAAYA/Q0CAJsSAgCiEgYAgRkBAEAaBQBYGgMAAYQCoAAAABxmoEAAABt4ZGXzgAJwcgEFADswAAABAABBAAEAiRlBAAEHAaBAAAAc2GIBahwAABOFArAgG30AAWRtU4ADoKAAABxiY2tzAYACsCAUQAABsQAc2wABZXhDAYSgIAAAELSggAAAG46wMBRCAAEAgQM7MAAAAQAAFgAJAOAHAAAdCAIA4AwAAPAMAAAODgEApg4FAMgWBgDgFgAAThsAAGOAA6AQAAASqmFlbwGAAqAwAAAc17AQGd8AAWdyE4ADoJAAABxnoDAAABECYWVyAQEBoDAAABx+dwGnGwAAE4ECsKAckAABZWkjgAKgUAAAHK5scmMAA6AwAAAcDmNldPVWAwAApxUYAwEAogABgQKgIAAAFuugkAAAGnpscwGDAqBQAAAac7AwHKQAAWNwAYUCoHAAAByLoDAAABv8ZXMTAISgQAAAF4+gIAAAELugsAAAG+ESAAP1cAsAAAEAAQABAEwNIwADoGAAABwvoDAAABudY29w86IXAAABAAEAAYADoFAAABt8oAAAABypoLAAAByUYmR0E4ACsDAXlwABb3UBAgGwMBmHAAFuOzAAAAEAAAYAAQCoEAYAAQEAOzAAAAEAAMYAAgDKCQAA/QzFAAECADswAAABAAAFAAEA4hkFAPMBAXIByBsAADMAA6AAAAAaCGVpczowAAABAAAAAAAOABAAAADJELkRZRPEFsUWxhbHFtgZ2hlwG3EbiRuKGyccKBwBCQD0YhoAAAEAAQABACOAA7AwF5UAAaAQAAATZGNydPMAhRFABfI8AwAAAQABgQKgAAAADdqgEAAAEPRlbAECADswAAABAAAGAAIA8hABAG0cBAABAAOgMAAADdKgMAAAELOgQAAAEyhscncBawMAAMcAAIAFoAAAABjyocAAAB0BoOAAABvkMGFjb3ABAgD08BAAAAEADAYABQEBAPb7DQAAAQCkBAEALgkBAFOAhLBQGN4AAbAQG2oAARFAAgEBAPObFwAAAQB2AROAA6CQAAAcsaAAAAALgmFjZwGEAqAgAAAZ86AAAAAZeWl584ACYW8BgAKwgBySAAGwsBzJAAFhbBOEArAgGnAAAXR1AQEAOzAAAAEAAMYAAgBgDAAA4g/FAAEHAaBAAAAcxmUBmBwAACOAAqAgAAAY6Wtt84ADZ3R2AQABsIAc6AABc/LSGwAAAQAzgAOgIAAAGTlkbnQBBQD2JxoAAI4BBwABAAUAAQAjgQKgcAAAG9ZtcwEIAaBAAAAca2XygxsAAJEAIwICoCAAABomZXA7MAAAAQAA0wACAF8MAAAPD9IAI4ADoBAAAAz8oEAAABEBb3J1AQIAOjAAAAEAAAAAAAcAEAAAAGwT2xncGfAZqRvnG+gbqhwBgAKgAAAADEGgEAAADeRkePMAAmVyOzAAAAEAABEAAQCOGBEAE4ADsDAZ3QABoBAAABDjcnZ4AQgBsIAdBgABc/LjHAAAAQABggKgAAAAHOqgAAAAHOs0NvMBAWkBmRwAACOAAqAAAAAZTnJzAQYBoEAAABzRYgFoHAAAs4CEoBAAABlhkUAAAYACoEAAABx6oGAAAByyYXIBAgGwwBzHAAFp8tsYAAABAPOAAmVzAQIA9q4XAABtAcICEQBeAAsAM4EDoDAAABttZm50AYACoDAAABt7oDAAABlJaW8BCwDzBRwAAAEAzADTgISwgBz+AAERSAABAAGgcAAAHQVi84wXAAA1BQIAE4ACsFAcHwApZXXzANGAb/4HOjAAAAEAAAAAAHwAEAAAAAoBCwETARQBFQEWAQ8DEAMRAxIDSgPnB+gHBwgICBUIYgljCWQJdQl2CXsJuQnNCc4JzwnQCSYMJwwpDDkMugy7DIkOiw6MDo0Ojg6PDpYOwxDEEMUQ5BDlEOYQ5xD0EPcQ+BD5EGoSaxJsEm0SbhKEEh8TcBPYFusW8xb0Fv4W/xYAFwEXAheyGMIYzxjRGOkYIxk+GUQZShlaGVsZaxl0GXkZ0RkRGhIaExoUGhUaFhoXGhgaGRoaGhsaHBodGl4aXxpgGmEatBpTG1QbVxtyG3MbpRuoG6obuBu+GwUcBhwIHBAcGhw1HLYcvxzQHNIc7Rz3HP4c/xw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7be17057425f.js b/pr/3367/docs/search.index/7be17057425f.js new file mode 100644 index 0000000000..f173683008 --- /dev/null +++ b/pr/3367/docs/search.index/7be17057425f.js @@ -0,0 +1 @@ +rn_("AQABoIAAABz8ZvLIDQAAYQ4BBwDz+RsAAAEAAQAjgAKgUAAAGdFhb/MCAmZz9i8MAABDAAEAAQABB5kGE4ADoIAAABlpsBAKrgABYWVv") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7bed45f8a353.js b/pr/3367/docs/search.index/7bed45f8a353.js new file mode 100644 index 0000000000..85727e7d77 --- /dev/null +++ b/pr/3367/docs/search.index/7bed45f8a353.js @@ -0,0 +1 @@ +rn_("AQECoEAAABwsoFAAABy4aXI7MAAAAQAABgADAFYMAADyDAEA1BwDAAECAaBgAAAbeW3yiRIAAAEAE4ACsDATSAABb3DzAAFzAf8HAADzgAJjbgEEAaBAAAAZ+WU7MAAAAQAACQAEAHYcAwDhHAEA6BwBAAYdAQABAAKwcBz6AAGgcAAAGmhlcgG8DAAAcwCEJbDrSW82UAEB8jcDAABzDw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7bf7fc8ab6f3.js b/pr/3367/docs/search.index/7bf7fc8ab6f3.js new file mode 100644 index 0000000000..8ef24b40d0 --- /dev/null +++ b/pr/3367/docs/search.index/7bf7fc8ab6f3.js @@ -0,0 +1 @@ +rn_("AQUAOzAAAAEAAEEAAQCJGUEAI4ACoKAAABxia3MjgAKgEAAAEqphbwGBArAgGd8AAaAwAAARAmFyAYUCoHAAAByLoDAAABv8ZXMTAISgQAAAF4+gIAAAELugsAAAG+ESAAP1cAsAAAEAAQABAEwNIwADoGAAABwvoDAAABudY29w86IXAAABAAEAAQIBsDAZhwABbjswAAABAAAGAAEAqBAGAPOAAm90AQIAOzAAAAEAAMYAAgBgDAAA4g/FABOAAqAgAAAZOW50AQgBoEAAABxrZfKDGwAAkQDzAgFwOzAAAAEAANMAAgBfDAAADw/SACOAA6AQAAAM/KBAAAARAW9ydQEDAPVsEwAAbwYBAAsCAQATgAKwMBndAAFydgGCArAgG+4AaaAwAAAbbWZ0p6MBAI2wYBwfACmgIAAAGWGgsAAAHLGgEAAAGPKgIAAADdqgsAAAGno+6Qc7MAAAAQAAJgASAHsJAADDEAIAahIEAIQSAADPGAAA0RgAAEQZAABKGQAAWxkAANEZAAARGgwAXhoDALQaAAC4GwAAGhwAALYcAADtHAAA9xwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7cbfa11bb9fa.js b/pr/3367/docs/search.index/7cbfa11bb9fa.js new file mode 100644 index 0000000000..c832de6b21 --- /dev/null +++ b/pr/3367/docs/search.index/7cbfa11bb9fa.js @@ -0,0 +1 @@ +rn_("AQcBsEAcOQABZQHOGwAAAYACoFAAABnSgBtuByDOcHIBgAKgYAAAG+CgMAAAGlVldAEDAPXTGQAAAQABAAEAAQABAQGgkAAAHMVs880YAAAIA4wAAYMCoBAAABxLoLAAABzzbHMBBAD0URoAAAEAAQABAAEEAaAAAAAbbGTyUBoAAEAB5wsAAYmgsAAAHLmgYAAAG9+gMAAAGdiWCQc7MAAAAQAACwAEAC8TBwAkFgEATBkAACQaAAABAAD1LhMAAD8GAQABAAEAEwACsKAcxwABZ3YBGhkAAPOAAm5vAQMA9cgYAAABAAEAAQABAAEDAbAwHCcAAXTyexoAAAEAAQQA9YQbAAABAAEAAQABAPOAAm9yAQIA9VUZAAABAAEAAQABADMAhKBAAAAaCLDAHKsAATAADDowAAABAAAAAAAIABAAAAAeDh8O0BgQGX8agBqBGoIaUBzzgAJkcgGDAqBAAAAcmqBgAAAcwGFyI4ACsEAaBgABbG8BBAA7MAAAAQAAEAAFAJEbBQBNHAEAhBwFAJYcAQC9HAAAFwAAAoWggAAAHQKgMAAAGdmgAAAAHDegMAAAGdqQAQYBORMAABOAAqBgAAAbzGRu9woAAIigEAAAHL+wABhuAAEVSRI7MAAAAQAADAAGAKEJAQAwDAMAggwBALEXAQDbGAEAuRwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7cf1ecc28f90.js b/pr/3367/docs/search.index/7cf1ecc28f90.js new file mode 100644 index 0000000000..10822d4f14 --- /dev/null +++ b/pr/3367/docs/search.index/7cf1ecc28f90.js @@ -0,0 +1 @@ +rn_("AQAA9FYDAACnFRgDAQABCwD0YhoAAAEAAQABAAEKAaBAAAAcxmUBmBwAAAEMAPMFHAAAAQDMAJcGAACIoCAAABlOoEAAABnwoCAAAAuCoKAAABt4HIkKOzAAAAEAABsADQATAQMADwMDACkMAADkEAMA9xACAB8TAABwEwAA/hYDAMIYAADpGAAAchsBAL4bAAAQHAAA") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7d50302474a6.js b/pr/3367/docs/search.index/7d50302474a6.js new file mode 100644 index 0000000000..81cffda3aa --- /dev/null +++ b/pr/3367/docs/search.index/7d50302474a6.js @@ -0,0 +1 @@ +rn_("AQDFoJAAAByVoHAAABx9Kf/fg0hxoIAAABukoKAAAByqgAACCzowAAABAAAAAAALABAAAACVF5YX5RjRG0IcQxxEHEUcnRyeHLscvBw=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7e0396ca6090.js b/pr/3367/docs/search.index/7e0396ca6090.js new file mode 100644 index 0000000000..a054cb90e1 --- /dev/null +++ b/pr/3367/docs/search.index/7e0396ca6090.js @@ -0,0 +1 @@ +rn_("AQQBoEAAABzGZQGYHAAAAQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMBAW06MAAAAQAAAAAABwAQAAAAJxPoGZkbmhubG7MctBy1HPMBAWUBfRoAADMAhKAQAAAY4aAgAAAQyBRABPWEGwAAAQABAAEAAQA=") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7e24de05e932.js b/pr/3367/docs/search.index/7e24de05e932.js new file mode 100644 index 0000000000..c4d7f67814 --- /dev/null +++ b/pr/3367/docs/search.index/7e24de05e932.js @@ -0,0 +1 @@ +rn_("AQMBsFAcbABLYwGwGwAAI4ADoHAAAB0AoCAAABnYaG95AYICoAAAABuPoAAAABpVZXMjAAKgYAAAG+BldPJJDAAAiQ0BgAKgYAAAGn2gAAAAHM9pcwEDAPXTGQAAAQABAAEAAQABAQGgkAAAHMVs880YAAAIA4wAAYICoBAAABxLoLAAABzzbHMTgAKgIAAAGWNhaQEDAaAAAAAbzXMBMRwAAAEDADswAAABAAAGAAMAURoDALQbAAA9HAEA84ACcnYBAwGwABtsAEtk81AaAAAYASgAE4ACoPAAABz3bG/HngEAjaBgAAAcg6CwAAAcuaBQAAAcOKBgAAAc56BgAAAb37dZBzswAAABAAA8ABAAtwkAAFUMAADRDQAAGg4AAIsSAAAvEwcAIxYCACcYJABMGQAAhRkAACQaAAA8GgAAThoAAO8bAAD3GwAAlBwAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7ea42766f407.js b/pr/3367/docs/search.index/7ea42766f407.js new file mode 100644 index 0000000000..b2e03e9492 --- /dev/null +++ b/pr/3367/docs/search.index/7ea42766f407.js @@ -0,0 +1 @@ +rn_("AYACoAAAABhxsCAZZQAbZG7zAgFp8oAOAAABAAEBADowAAABAAAAAAAHABAAAABCGUMZJxq1G7wbvRvCG8MbE4ACsIAccAABbXLzgAJhbw==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/7faf8f6da58d.js b/pr/3367/docs/search.index/7faf8f6da58d.js new file mode 100644 index 0000000000..2a00a02872 --- /dev/null +++ b/pr/3367/docs/search.index/7faf8f6da58d.js @@ -0,0 +1 @@ +rn_("AQEA82gTAAABAAEAAYMCoCAAABnQoAAAABjvZHMTgQKgQAAAGMJjZQGAAqAgAAAag6AQAAAaAGFzJwAAgYWhIAAAHQKgQAAAG42g0AAAHNqgUAAAG/gI0AEBAgA7MAAAAQAADwABAKIYDwATgQOgEAAAEOCgIAAAE11jZW/3AACAhaAQAAARDSUgAg==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/alias/a762150c532c.js b/pr/3367/docs/search.index/alias/a762150c532c.js new file mode 100644 index 0000000000..f829e46362 --- /dev/null +++ b/pr/3367/docs/search.index/alias/a762150c532c.js @@ -0,0 +1 @@ +rd_("") \ No newline at end of file diff --git a/pr/3367/docs/search.index/crateNames/c4c174243285.js b/pr/3367/docs/search.index/crateNames/c4c174243285.js new file mode 100644 index 0000000000..dc359523fe --- /dev/null +++ b/pr/3367/docs/search.index/crateNames/c4c174243285.js @@ -0,0 +1 @@ +rd_("dbulkdirohiiroh_basejiroh_benchoiroh_dns_serverjiroh_relay") \ No newline at end of file diff --git a/pr/3367/docs/search.index/desc/bf20fd5d6ec0.js b/pr/3367/docs/search.index/desc/bf20fd5d6ec0.js new file mode 100644 index 0000000000..06d7b85370 --- /dev/null +++ b/pr/3367/docs/search.index/desc/bf20fd5d6ec0.js @@ -0,0 +1 @@ +rd_("oA QUIC EndpointAoGet the identity of this stream0CiReturns a watcher that updates every time this or the \xe2\x80\xa6AhUses all available pathsBmApplication layer added the address directly.BcError when decoding the public key.0AoThe largest representable valueBkPublic internet address discovered via QAD.lDNS over TCPlDNS over TLSBjA node communicated with us first via UDP.lDNS over UDPBfAdds a Discovery service.CnPkarr based node discovery for iroh, supporting both relay \xe2\x80\xa6BlSets whether to publish to the Mainline DHT.AnWhich directions data flows inCiThis module exports a DNS resolver, which is also the \xe2\x80\xa6AkDNS node discovery for irohCkImplementation of a DNS name server for iroh node announcesAjConfig for the DNS server.lDNS resolverBeExplicit congestion notification bitsCbReturns the current state of the underlying value.BeThe amount of I/O operations executedAiHow many nodes are known?B`How many services are configured1CiMaps this watcher with a function that transforms the \xe2\x80\xa6DmCreates a new NodeAddr with no relay_url and no \xe2\x80\xa6DeCreates a new NodeData with a relay URL and a set of \xe2\x80\xa6DhCreates a new NodeInfo with an empty NodeData.DfCreates a new DiscoveryItem from a NodeInfo.AeCreates a new client.BhCreates a new static discovery instance.CkCreates a new DNS resolver with sensible cross-platform \xe2\x80\xa6CmCreate a default config with a particular handshake token \xe2\x80\xa6AeCreate a new StreamIdBcInitializes new connection options.CoCreates a new router builder using given Endpoint.BfCreate a new AccessLimit.;AeCreates a new ticket.AhCreate a new zone store.ClCreate a DNS server given some settings, a connection to \xe2\x80\xa6ClCreates a new ping tracker, setting the ping timeout for \xe2\x80\xa6BgCreate a new ClientBuilderCmCreate a new QuicClient to handle the client side of QUIC \xe2\x80\xa6;DeCreates a new NodeData with a relay URL and a set of \xe2\x80\xa6DhCreates a new NodeInfo with an empty NodeData.ChCurrent best estimate of this connection\xe2\x80\x99s latency \xe2\x80\xa60BgRun DNS and Pkarr servers on localhost.BgTLS configuration for the HTTPS server.CbSets the TTL (time-to-live) for published packets.C`Sets the time-to-live value for the DNS packets.BbThe origin of this direct address.C`Returns this frame\xe2\x80\x99s corresponding frame type.D`The RelayUrl where this relay server can be dialed.0AaAccess is denied.CaString prefix describing the kind of iroh ticket.CnFound a ticket with the wrong prefix, indicating the wrong \xe2\x80\xa6AoName of this discovery service.C`We have no verified connection to this PublicKeyBaWe received a Ping from the node.CkMessages with these frames will be ignored. 8 byte ping \xe2\x80\xa6ClRequest from the relay to reply to the other side with a \xe2\x80\xa6CiRequest from the client to the server to reply to the \xe2\x80\xa6BaWe received a Pong from the node.Ce8 byte payload, the contents of ping being replied toDiReply to a ClientToRelayMsg::Ping from a client with the \xe2\x80\xa6DiReply to a RelayToClientMsg::Ping from a server with the \xe2\x80\xa6B`An error occurred during readingBlThe UDP address reported by the remote node.lThe address.CjExtracts the ALPN protocol from the peer\xe2\x80\x99s handshake \xe2\x80\xa60AiBinds the magic endpoint.AhMode for getting a cert.mType of errorBkCurrent congestion window of the connectionBiThe information published about the node.00AoReturns the argument unchanged.00BnReturns the addressing info from given ticket.1111CmCreates a RelayMap from a RelayUrl.222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222212222BlCreates a ticket from given addressing info.3333333333333333333333333333331333333333333333333333333333333333333333333333333BcHTTP server part of iroh-dns-serverAjConfig for the HTTP serverChHTTP-specific constants for the relay server and client.BnPerform the initial load and construct the \xe2\x80\xa6BaCalls U::from(self).00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000BiEnable ipv4 QUIC address discovery probesBiEnable ipv6 QUIC address discovery probesAnPeer-to-peer QUIC connections.CeReturns an iterator over all the relays and their \xe2\x80\xa6ClReturns an iterator over the character strings contained \xe2\x80\xa6AlLoad the config from a file.CiA discovery service that uses an mdns-like service to \xe2\x80\xa6CiThe name of the discovery service that discovered the \xe2\x80\xa6BoThe name of the application that added the nodeCeMethod for opening a sealed message dataCcStatistics related to the current transmission pathBkThe port to serve a local UDP DNS server atoPort to bind to0CdThe port on which the connection should be bound to.AiProduction configuration.ClConfiguration to speak to the QUIC endpoint on the relay \xe2\x80\xa6CjCreate a QUIC server that accepts connections for QUIC \xe2\x80\xa61DaConfiguration for the QUIC server, disabled if None.BgRead data contiguously from the stream.BlA record to set for all originsBlMethod for sealing message dataCeSign the given message and return a digital signature0AcStop accepting dataAnReturns the sorted relay URLs.0AbAccess is allowed.BgA chunk of data from the receive streamAkQuic client related errors.AeProtocol send errors.eHTTPSnDNS over HTTPSAoA locally bound socket address.BlThe 6 byte header of all discovery messages.BkBoth a UDP and a relay connection are used.BmThe protocol used to time a node\xe2\x80\x99s latency.AkRelay connection over relayBlA node communicated with us first via relay.CcThe peer abandoned transmitting data on this streamCnThe peer is unable to continue processing this connection, \xe2\x80\xa6AoAddress was loaded from the fs.CgEnable rate limit based on headers commonly used by \xe2\x80\xa6BbThe type of value that can change.CmSets the ALPN protocols that this endpoint will accept on \xe2\x80\xa6DlBuilds a DnsDiscovery with the passed DnsResolver.DiBuilds the PkarrPublisher with the passed secret key for \xe2\x80\xa6CgCreates a PkarrResolver from this builder.AoBuilds the discovery mechanism.DeBuilds an MdnsDiscovery instance with the configured \xe2\x80\xa6BiConstruct a fresh ControllerAhBuilds the DNS resolver.AiThe contents of the chunkCiThe total amount of bytes which have been transferred \xe2\x80\xa6BjThe amount of bytes which had been writtenAjThe TLS certificate chain.BnCloses the QUIC endpoint and the magic socket.BbCloses the connection immediately.DiThis module exports looks_like_disco_wrapper as the only \xe2\x80\xa6AjCreate an empty relay map.CbCreates an empty ConcurrentDiscovery.1BcFrame type that triggered the errorAmEnable or disable https probeAkConfig for the HTTPS serverCcDistinguishes streams of the same initiator and \xe2\x80\xa6CfReturns an Iterator over all known nodes.0CiA discovery service which publishes and resolves node \xe2\x80\xa6DbConfiguration for the Relay server, disabled if None.CgThis module implements the send/recv relaying protocol.AmRecreates the inner resolver.BbClose the send stream immediately.BcCompletely resets the DNS resolver.2AmResponds with a retry packet.BmNS record to set for all originsCdSpawns an accept loop and returns a handle to it \xe2\x80\xa6AaSpawn the server.A`Spawn the server1AbStarts the server.BkSplits the client into a sink and a stream.BnShared state and store for the iroh-dns-serverBgState for Let\xe2\x80\x99s Encrypt certificates.AnReturns connection statistics.CeShow connection stats the at the end of the benchmarkAcThe pkarr DNS storeAiWrite bytes to the streamCaFuture produced by Endpoint::accept.AnAccess restriction for a node.oA relay client.AdServer configurationAgUse a custom relay map.AmUse custom bootstrap servers.AdError when decoding.0AeDirect UDP connectionClA handle to the channel over which the response to a DNS \xe2\x80\xa6CjSent from server to client to tell the client if their \xe2\x80\xa6CiA one-way message from relay to client, declaring the \xe2\x80\xa6CjThe length of an ed25519 PublicKey, in bytes.0lRate limits.ChCerts are loaded from a the cert_cache pathBkUse a static TLS key and certificate chain.C`The identifier for a node in the (iroh) network.0CcFuture produced by Connection::open_biAdA net_report report.AaThe built router.AdThe iroh-dns server.AmA running Relay + QAD server.CiEnable rate limit based on the connection\xe2\x80\x99s peer IP \xe2\x80\xa6DeThe origin or source through which an address associated \xe2\x80\xa6CkA ticket is a serializable object combining information \xe2\x80\xa6AiAn integer less than 2^62BnVerification of the deserialized bytes failed.BoAccepts an incoming connection on the endpoint.CmAttempts to accept this incoming connection (an error may \xe2\x80\xa6AnHandle an incoming connection.BiSee ProtocolHandler::accept.DiConfigures the router to accept the ProtocolHandler when \xe2\x80\xa6AeAccess configuration.C`The amount of full chunks which had been writtenBhExplicitly sets the pkarr client to use.AgCreate and run a client0DkExposes Client, which allows to establish connections to a \xe2\x80\xa6CdWait for the connection to be closed for any reason.EhCommon types between the super::handshake and super::relay \xe2\x80\xa6AlConfiguration for the serverBjCreate QUIC error code from TLS alert codeBoTLS configuration used for incoming connectionsDhCreates a new DnsResolver from a struct that implements \xe2\x80\xa60CmNotify the peer that no more data will ever be written to \xe2\x80\xa6CmIgnores this incoming connection attempt, not sending any \xe2\x80\xa6CdInsert a signed packet into the cache and the store.CfEnables saving the TLS pre-master key for connections.lRate limits.DdCreates a new DNS discovery using the iroh.link domain.CkCreates a pkarr publisher which uses the number 0 pkarr \xe2\x80\xa6ClCreates a pkarr resolver builder which uses the number 0 \xe2\x80\xa6AhThe offset in the streamB`Packet deliveries were confirmedCjA convenience method that waits for the endpoint to be \xe2\x80\xa6B`Protocols used by the iroh-relayDfReturns the VerifyingKey for this PublicKey.BnThe public key of this SecretKey.10BcHuman-readable reason for the close0BhHuman-readable explanation of the reasonBiRejects this incoming connection attempt.AgReload the certificate.DdReturns the SigningKey for this SecretKey.0BmTake the provided endpoint and run the server0CkThe main server which combines the DNS and HTTP(S) servers.CeA fully-fledged iroh-relay server over HTTP or HTTPS.BeMetrics tracked for the relay server.ClReturns a stream which will yield the most recent values \xe2\x80\xa6CjTickets is a serializable object combining information \xe2\x80\xa6BjConvert this signature into a byte vector.DaEncodes a NodeId in z-base-32 encoding.0CgStatistics about UDP datagrams received on a connectionCjStatistics about UDP datagrams transmitted on a connectionB`A QAD IPv4 round trip completed.B`A QAD IPv6 round trip completed.ClVerify a signature on a message with this secret key\xe2\x80\x99s \xe2\x80\xa60CcNumber of ack-eliciting bytes that may be in flightCaA key for sealing data with AEAD-based algorithmsAeBoxed iterator alias.BbBuilder for Endpoint.BfBuilder for DhtDiscovery.BeBuilder for DnsResolver.ClUse the default relay map, with production relay servers \xe2\x80\xa6BbUse the default bootstrap servers.CmA peer was expired due to being inactive, unreachable, or \xe2\x80\xa6AnEnum of metrics for the moduleAkMetrics for iroh-dns-serverBdMetrics tracked for the relay serverCdFuture produced by Connection::open_uniAjOptions for running probesAkQUIC Address Discovery Ipv4AkQUIC Address Discovery Ipv6BfUse the staging relay servers from n0.CcThe peer is no longer accepting data on this streamCjThe maximum amount of time, in seconds, the net_report \xe2\x80\xa6CaThe stream is larger than the user-supplied limitAdNot yet determined..CkA handle to a value that\xe2\x80\x99s represented by one or more \xe2\x80\xa6ClIndicates how many bytes and chunks had been transferred \xe2\x80\xa6CfNumber of times this server has accepted a connection.0EhCreates a DnsDiscoveryBuilder that implements IntoDiscovery\xe2\x80\xa6DiReturns a PkarrPublisherBuilder that publishes node info \xe2\x80\xa6ChCreates a new resolver builder using the pkarr relay \xe2\x80\xa6CdCreates a new builder for DhtDiscovery.CoReturns a MdnsDiscoveryBuilder that implements \xe2\x80\xa6CmCreates a builder to construct a DNS resolver with custom \xe2\x80\xa6DgReturns the builder for an Endpoint, with a production \xe2\x80\xa6DdCreates a new Router using given Endpoint.2CcThe total number of clients which should be createdBkConnects to a remote Endpoint.CaEstablishes a new connection to the relay server.ClThe list of domains for which SSL certificates should be \xe2\x80\xa6BjSet to true to enable the mainline lookup.BnDo we have any indication that UDP is working?CbCheck if this stream has been opened during 0-RTT.CcReturns the currently lowest latency for this node.CfThe latency to the remote node over this network path.BkCo-locating all of the iroh metrics structsBlReturns metrics collected for this endpoint.CgShow iroh library counter metrics at the end of the \xe2\x80\xa6AnMetrics support for the serverAbMetrics collector.AnConfig for the metrics server.CbReturns the metrics collected in the relay server.CnThe maximum UDP payload size guaranteed to be supported by \xe2\x80\xa6AhThe node\xe2\x80\x99s identifier.C`Returns the NodeId of the endpoint.BkReturns the node id of the discovered node.CbThe NodeId of the node this is about.B`The id of the node that expired.BeReturns the node id of this endpoint.252CnWait until a Pkarr announce for a node is published to the \xe2\x80\xa6BbOne or more packets were just sentBnInitiates a new outgoing bidirectional stream.EeDomain used for serving the _iroh_node.<nodeid>.<origin> \xe2\x80\xa6CeIf set, is a description of why the connection is \xe2\x80\xa6DePublishes the given NodeData to the discovery mechanism.BfPublishes a SignedPacket.CfBytes for the R component of a signature.ClNumber of reports executed by net_report, including full \xe2\x80\xa6DjResolves the DiscoveryItem for the given NodeId.DgResolves a SignedPacket for the given NodeId.AdResolve a DNS query.BoAAAA record to set for all originsCfBytes for the s component of a signature.DiA HashMap of Sources to Durations.AfStaging configuration.CiCompletes when the peer stops the stream or reads the \xe2\x80\xa6CcThe total number of streams which should be createdClImplements logic for abstracting over a websocket stream \xe2\x80\xa6ClExposes functions to quickly configure a server suitable \xe2\x80\xa6BgCancel-safe waiting for a ping timeout.CgAn advisory duration for how long the client should \xe2\x80\xa6DfReturns a future completing with Ok(value) once a new \xe2\x80\xa6CeFuture produced by Connection::accept_biAeThe shared app state.C`The mode how SSL certificates should be created.BdDatagram support is disabled locallyBaDisable relay servers completely.AcDisable rate limit.B`Potential errors related to dns.CeThis looks like a ticket, but base32 decoding failed.CnControls an iroh node, establishing connections with other \xe2\x80\xa6hEveryoneCkAn incoming connection for which the server has not yet \xe2\x80\xa6B`The largest encoded value lengthCmthe connection is being closed abruptly in the absence of \xe2\x80\xa6CiApplication layer with a specific name added the node \xe2\x80\xa6CfNetwork-level addressing information for an iroh node.0CkData about a node that may be published to and resolved \xe2\x80\xa600ChSent from server to client to signal that a previous \xe2\x80\xa6CjIndicates that the client identified by the underlying \xe2\x80\xa6CiInformation about a node that may be published to and \xe2\x80\xa600CjThis looks like a ticket, but postcard deserialization \xe2\x80\xa6ChConfiguration of all the relay servers that can be used.0BaA URL identifying a relay server.0BeTrait for DNS resolvers used in iroh.CfIdentifier for a stream within a particular connectionCnCommunication with the peer has lapsed for longer than the \xe2\x80\xa6ClThe datagram is larger than the connection can currently \xe2\x80\xa6CmStatistics about UDP datagrams transmitted or received on \xe2\x80\xa6CkUnder the hood this is a UTF-8 String is no longer than \xe2\x80\xa600BdGet this public key as a byte array.0AoThe contents of the datagram(s)AgGet the data directory.BhDefault values used in irohBaDefault values used in the relay.CgCreate an Options that disables all probesAkDisable the metrics server.BjSet to true to disable the metrics server.ChReturns the Endpoint stored in this router.BnReturns the Endpoint of the node.DkThe Endpoint allows establishing connections to other iroh \xe2\x80\xa6AdThe expected prefix.C`Statistics about frames received on a connectionCcStatistics about frames transmitted on a connectionCfCreates a new user error from an arbitrary error type.00BjConstruct a VarInt infalliblyBeSucceeds iff x < 2^62DbParses a NodeId from z-base-32 encoding.0DbGenerate a new SecretKey with a randomness generator.0AcGet the given node.0C`Number of FrameType::Pings received0BnGet the server\xe2\x80\x99s http RelayUrl.CmSpecifies the time to wait after completing MTU discovery \xe2\x80\xa6CcReturns Self for use in down-casting to extract \xe2\x80\xa6EhReturns true if the Connection associated with this handle \xe2\x80\xa6CgReturns true, if only a NodeId is present.B`Are there any nodes in this map?BaIs there any services configured?21CmReturns the local IP address which was used when the peer \xe2\x80\xa6AoConfig for the mainline lookup.AbStarts a new ping.BoInitiates a new outgoing unidirectional stream.BcGet the priority of the send streamCjTools for spawning an accept loop that routes incoming \xe2\x80\xa6BbCalled when the router shuts down.BkSee ProtocolHandler::shutdown.BcShuts down the accept loop cleanly.CfShutdown the server an wait for all tasks to complete.CgShutdown the server and wait for all tasks to complete.CkCancel the server tasks and wait for all tasks to complete.AfShutdown the resolver.AkRequests graceful shutdown.CkConvert this to the bytes representing the secret part. \xe2\x80\xa6AlReturn the inner byte array.1C`Serialize to bytes used in the base32 string \xe2\x80\xa6BeSucceeds iff x < 2^6200CfFuture produced by Connection::accept_uniBnSize of an encoded Ed25519 signature in bytes.CmRepresents datagrams sent from relays (originally sent to \xe2\x80\xa6CnRequest from the client to relay datagrams to given remote \xe2\x80\xa6CjOne or multiple datagrams being transferred via the relay.CeErrors that can occur while dialing the relay server.CbThe address was discovered by a discovery service.C`Node discovery for super::Endpoint.AcDNS server settingsBnA DNS server that serves pkarr signed packets.BgPossible frame types during handshakingDjExtension methods for NodeId to encode to and decode from \xe2\x80\xa60BiStatistics related to a transmission pathmA public key.0AeA read error occurredBmErrors that arise from reading from a stream.CeErrors when receiving messages from the relay server.D`Configuration of the relay servers for an Endpoint.BgInformation on a specific relay server.0CcForces all traffic to go exclusively through relaysCiUse a TLS key and certificate chain that can be reloaded.mA secret key.0BoError for sending messages to the relay server.AbEd25519 signature.BcTLS configuration for Relay server.BaA store for pkarr signed packets.BnAccept the next incoming bidirectional stream.DbAdds an already Boxed Discovery service.CeSets whether this node should advertise its presence.BkOptionally set a custom address to bind to.CmThe IPv4 or IPv6 address to bind the UDP DNS server. Uses \xe2\x80\xa6CmOptionally set a custom bind address (will use 0.0.0.0 if \xe2\x80\xa60ChThe socket address on which the QUIC server should bind.AkSet custom bootstrap nodes.BdThe mode of SSL certificate creationCjRate limits for incoming traffic from a client connection.BbDuplicate the controller\xe2\x80\x99s stateDkReturns a Watcher that reports the current connection type \xe2\x80\xa6BdThe amount of UDP datagrams observedBlThe datagrams and related metadata to relay.BcThe datagrams and related metadata.AgNode address discovery.ChOptionally sets a discovery mechanism for this endpoint.BoReturns the discovery mechanism, if configured.E`Create a ConcurrentDiscovery with DnsDiscovery and \xe2\x80\xa6CnConvert to a hex string limited to the first 5 bytes for a \xe2\x80\xa60DjCreates a RelayMap from an iterator of RelayUrl.0Afip:port of global IPv4Be[ip]:port of global IPv6ClImplements the handshake protocol that authenticates and \xe2\x80\xa6BiGet the bound address of the HTTP socket.CcThe socket address the HTTP server is listening on.BoGet the server\xe2\x80\x99s https RelayUrl.AjCreate an in-memory store.BoWhich side of a connection initiated the streamDaConverts this Connecting into a 0-RTT or 0.5-RTT \xe2\x80\xa6BaBase types and utilities for IrohCiCheck if this endpoint is still alive, or already closed.BmMetrics collected by the endpoint\xe2\x80\x99s socket.CdWhether to allow clients to migrate to new addressesDjReturns the current NodeAddr. As long as the endpoint was \xe2\x80\xa6CjThe NodeAddr of the provider for this ticket.ClSupport for handling DNS resource records for dialing by \xe2\x80\xa6CjReturns the NodeInfo for the discovered node.BjThe node info for the node, as discovered.2BaThe HTTP URL of the Pkarr server.BjAttempts to read from the stream into buf.CkSets an explicit proxy url to proxy all HTTP(S) traffic \xe2\x80\xa6CjSet an explicit proxy url to proxy all HTTP(S) traffic \xe2\x80\xa6CcThe socket address the QUIC server is listening on.BdReturns the relay map for this mode.BcReturns the relay url of this peer.AlThe node\xe2\x80\x99s home relay url.BbReturns the relay URL of the node.210BmGenerate the integrity tag for a retry packetBlNumber of FrameType::Pongs sent0AdSerialize to string.BiSets the list of accepted ALPN protocols.BhA stable identifier for this connection.AmSubscribe to discovered nodesCePrivate key used to authenticate data included in \xe2\x80\xa6CgTransport configuration to use for incoming connectionsCcReturns the optional user-defined data of the node.AnReturns any user-defined data.1CjConvenience method to write an entire buffer to the streamAnTLS certificate configuration.CbThe client frame type for the authentication frameB`The send half of a relay client.BeIn-progress connection attempt futureAbA QUIC connection.BmThe type of control message we have received.CeCommon interface for different congestion controllersClA direct address on which an iroh-node might be \xe2\x80\xa6ChA peer was discovered or it\xe2\x80\x99s information was updated.AeState for serving DNSBoNumber of frames transmitted of each frame typeAjConfig for the HTTP serverBjThe HTTP(S) server part of iroh-dns-serverCbThe max byte length allowed for user-defined data.0CeA token containing information for establishing a \xe2\x80\xa6ChThe provenance string for this discovery implementation.BfAn error deserializing an iroh ticket.CeAn address assigned by the router using port mapping.CbHandles the client side of QUIC address discovery.BkPieces needed to do QUIC address discovery.BbConfiguration for the QUIC server.ChThe HTTP path under which the relay accepts relaying \xe2\x80\xa6BnA stream that can only be used to receive dataChErrors that arise while waiting for a stream to be resetCmSent from server to client for the server to declare that \xe2\x80\xa6ClA one-way message from relay to client, advertising that \xe2\x80\xa6DeOnly nodes for which the function returns Access::Allow.DhError for attempting to retry an Incoming which already \xe2\x80\xa6CiCreate self-signed certificates and store them in the \xe2\x80\xa6BkA stream that can only be used to send dataAcServer spawn errorsBjErrors that arise from writing to a streamCaAccepts the next incoming uni-directional stream.CkWhether the implementation is permitted to set the spin \xe2\x80\xa6ChBytes received from a FrameType::SendPacket0CdBytes sent from a FrameType::SendPacket0BnClass of error as encoded in the specificationB`Application-specific reason codeBcType of frame that caused the closeCiConstruct a PublicKey from a slice of bytes.CaCreate a secret key from its byte representation.BmParse an Ed25519 signature from a byte slice.21ChDeserialize from the base32 string representation bytes.CcCreates a new NodeAddr from its parts.CcCreates a new NodeInfo from its parts.103BjGet the bound address of the HTTPS socket.CdThe socket address the HTTPS server is listening on.AiExtract the integer valueCkIroh\xe2\x80\x99s relay is a feature within iroh, a peer-to-peer \xe2\x80\xa6AeIs this node allowed?ChElapsed time since this network path was known to exist.BlGet the local address of the UDP/TCP socket.BhReturns the local address of the client.AfLooks up a TXT record.AeLooks up TXT records.1BeThe amount of bytes lost on this pathBeThe socket address of the DNS server.CdChecks the network conditions from the current host.BaMetrics collected by net reports.C`Disables publishing even if a secret key is set.ChWhether to run a local relay and have the server and \xe2\x80\xa6AnNumber of PCP probes executed.AiCreate a persistent storeC`Attempt to write bytes from buf into the stream.BlMetrics collected by the portmapper service.BnReturns the provenance of this discovery item.AmRead the next segment of dataCkRead an exact number of bytes contiguously from the stream.CdSets the relay servers to assist in establishing \xe2\x80\xa6CcReturns the SecretKey of the endpoint.CgSets the secret key to use for signing the DNS packets.CcSets a secret key to authenticate with other peers.BhReturns the secret_key of this endpoint.BfInternal utilities to support testing.CfCreates a TlsConfig suitable for testing.AjConfig for the zone store.CmWraps an existing protocol, limiting its access, based on \xe2\x80\xa6AjWe received a CallMeMaybe.AeGeneric crypto errorsCaProtocols over which DNS records can be resolved.CcThe DNS resolver used throughout iroh.0AkConfig for the HTTPS serverAmACME with LetsEncrypt serversAdUse Let\xe2\x80\x99s Encrypt.BjTracks pings on a single relay connection.CbConfiguration for the Relay HTTP and HTTPS server.AiThe config for the store.CcAccepts this incoming connection using a custom \xe2\x80\xa6BcRemoves all entries from the cache.AjClears the internal cache.1BbCreate a connection usable for qadCdLargest UDP payload size the path currently supportsCaSOA record data for any authoritative DNS recordsCmDefault time to live for returned DNS records (TXT & SOA)AjDeserialize from a string.CiNumber of connections we have removed because of an error0AhHandler for DNS requestsAlThe remote node to relay to.CkThe initial value to be used as the maximum UDP payload \xe2\x80\xa6BkStarting guess for maximum UDP payload sizeBjThe RTT used before an RTT sample is takenDjReturns a future completing once the value is set to Some \xe2\x80\xa6BiChecks if the router is already shutdown.BgPerforms an IPv4 lookup with a timeout.AiLooks up an IPv4 address.1BgPerforms an IPv6 lookup with a timeout.AiLooks up an IPv6 address.1CeThe amount of concurrent streams which should be usedAgThe node origin domain.DdPackets are acked in batches, all with the same now \xe2\x80\xa6B`Sets the pkarr relay URL to use.AbEnable quic probesCgCreates a QuicConfig suitable for testing.AnRead the next segments of dataCkConvenience method to read all remaining data into a bufferCiMaximum number of bytes to transmit to a peer without \xe2\x80\xa6B`Returns the handle for the task.BmObject to get current SystemTimeCaNumber of bytes to transmit from client to serverAoNumber of UPnP probes executed.CnSpecifies the upper bound to the max UDP payload size that \xe2\x80\xa6DgCreate a server config with the given crypto::ServerConfigCnConvenience method to write a single chunk in its entirety \xe2\x80\xa6CbControls which nodes are allowed to use the relay.BcThe receive half of a relay client.CgThe stream has already been stopped, finished, or resetBmThe stream has already been finished or resetCmError indicating that a stream has not been opened or has \xe2\x80\xa6AbConnection errors.CcPkarr Mainline DHT and relay server node discovery.AbDNS node discoveryCiFuture produced by Connection::read_datagramBdMetrics tracked for the relay serverBhAll metrics tracked in the relay server.BiParameters governing incoming connectionsBaConfiguration for the full Relay.CmErrors that arise while monitoring for a send stream stop \xe2\x80\xa6BlTurn the options into set of valid protocolsAkSets the IPv4 bind address.AkSets the IPv6 bind address.ChThe certificates chain if configured with manual TLS \xe2\x80\xa6BlIf the connection is closed, the reason why.CeConfigures the endpoint to use the default n0 DNS \xe2\x80\xa6AdDNS requests (total)CjReturns the DnsResolver used by the endpoint.AmSets the DNS resolver to use.CnSets the DNS resolver to use for resolving the pkarr relay \xe2\x80\xa60CiOptionally sets a custom DNS resolver to use for this \xe2\x80\xa6ClReturns the DNS resolver used in this Endpoint.DhCreate a DnsResolver configured to use the test DNS server.CjCreates a new user error from an arbitrary boxed error \xe2\x80\xa60CgCreate the initial set of keys given the client\xe2\x80\x99s \xe2\x80\xa6CiWhether this watcher is still connected to all of its \xe2\x80\xa6CiLast control message received by this node about this \xe2\x80\xa6ClElapsed time since the last payload message was received \xe2\x80\xa6CjReturns the optional timestamp when this node info was \xe2\x80\xa6CkOptional timestamp when this node address info was last \xe2\x80\xa6BgThe amount of packets lost on this pathDcMaximum number of Incoming to allow to exist at a timeAkSocket to serve metrics on.DiPolls for the next value, or returns Disconnected if one \xe2\x80\xa6CkAn advisory duration that the client should wait before \xe2\x80\xa6ChCreates a RelayConfig suitable for testing.BmNumber of full reports executed by net_reportC`Resolves a hostname from a URL to an IP address.0CkThe segment size if this transmission contains multiple \xe2\x80\xa6BgThe amount of packets sent on this pathAkSets a custom service name.BcSet the priority of the send streamDcConverts into a NodeAddr by cloning the needed fields.00AjWrite chunks to the streamDiReturns a ParseError that indicates the given ticket has \xe2\x80\xa6CmThe connection could not be created because not enough of \xe2\x80\xa6oBuild a Client.ClNode discovery results from Discovery services.BnThe stream finished before all bytes were readCcreceived an invalid Retry Token in a client InitialBeThe DNS name for the iroh TXT record.0DdTrait for structs that can be converted into Discovery.BkThe local application closed the connectionDaDiscovery using swarm-discovery, a variation on mdnsBbThe config for the metrics server.CnDefines the mode of path selection for all traffic flowing \xe2\x80\xa6CjResolver of node discovery information from a pkarr relay.CcHard NAT: QAD\xe2\x80\x99ed IPv4 address + local fixed port.DcBuilder for creating a Router for accepting protocols.AmRecord data for a TXT record.BmAdds a discovery mechanism for this endpoint.CkAugments node addressing information for the given node ID.CnReturns the local socket addresses on which the underlying \xe2\x80\xa6A`A client config.AeIs this a known node?0CmConfigures the endpoint to also use the mainline DHT with \xe2\x80\xa6CaNumber of bytes to transmit from server to clientBoCreates a new ConcurrentDiscovery.CjReturns node addressing information for the given node ID.AgNumber of HTTP requestsAmGet the IncomingCnThe max_ack_delay we will request the peer to useDhOptional interception point to handle the Connecting state.C`See ProtocolHandler::on_connecting.CkThe known MTU for the current network path has been updatedBmNumber of PCP probes that found it available.BcCryptographic identity of the peer.BnUpdates the ping tracker with a received pong.BaReceives an application datagram.Abkeyed by relay UrlDgTransmits data as an unreliable, unordered application \xe2\x80\xa6CmWhether to implement fair queuing for send streams having \xe2\x80\xa6CaThe TLS server configuration for the QUIC server.AiThe server configuration.CiCreates a ServerConfig suitable for testing.CgSets node addressing information for the given node ID.BdSets the relay URL of the node data.0BlSets the user-defined data of the node data.0BnStart a server session with this configurationDiSplits the current datagram into at maximum num_segments \xe2\x80\xa6CkToString::to_string, but without panic on OOM.00000000000000000000000000000000000000000000000000000000000000000DbOptions for the Endpoint::connect_with_opts function.AgThe connection was lost0000BoThe type of connection we have to the endpoint.BlInformation about a direct address.AkThe type of direct address.A`Discovery errorsCmAn event emitted from the MdnsDiscovery service.CeHandle and drop guard for test DNS and Pkarr servers.Cithe endpoint encountered an internal error and cannot \xe2\x80\xa6ElAdaptor to let Incoming be awaited like a Connecting.BbThe config for the metrics server.Amno viable network path existsCiPublisher of node discovery information to a pkarr relay.AnEnum of metrics for the moduleBmErrors that arise from reading from a stream.C`Errors from RecvStream::read_to_endAiLatencies per relay node.CjErrors which may occur while processing signatures and \xe2\x80\xa6CfError returned when an input value is too long for \xe2\x80\xa6CkA static node discovery to manually add node addressing \xe2\x80\xa6CmThe peer violated the QUIC specification as understood by \xe2\x80\xa6CiTransport-level errors occur when a peer violates the \xe2\x80\xa6AfDerive AEAD using hkdfAdHandle a DNS requestCjCaptivePortal is set when we think there\xe2\x80\x99s a captive \xe2\x80\xa6CgTake the provided endpoint and run the client benchmarkBnCreate a client endpoint and client connection0ChCreates a static discovery instance from node addresses.BjParameters negotiated during the handshakeBkParameters negotiated during the handshake.ClThe socket address on which the Relay HTTP server should \xe2\x80\xa6AiInitial congestion windowCnTurns this discovery builder into a ready-to-use discovery \xe2\x80\xa6CfConverts into a NodeAddr without cloning.00CnSpecifies the minimum MTU change to stop the MTU discovery \xe2\x80\xa6CaNotifies the system of potential network changes.ClThis implies we only use the relay to communicate and do \xe2\x80\xa6B`Number of probing tasks started.CgSets the proxy url from the environment, in this order:ClThe socket address on which to server the QUIC server is \xe2\x80\xa6BeWhether to use the unordered read APIClMaximum number of bytes the peer may transmit across all \xe2\x80\xa6CkCompletes when the stream has been reset by the peer or \xe2\x80\xa6BbNumber of QUIC datagrams received.BaReturns the peer\xe2\x80\x99s UDP address.DbReturns the NodeId from the peer\xe2\x80\x99s TLS certificate.BoThe NodeId of the original sender.AoWait for all tasks to complete.0CeSaturating integer addition. Computes self + rhs, \xe2\x80\xa6CkMaximum reordering in time space before time based loss \xe2\x80\xa6CkConverts into a list of {key}={value} strings.0CbNumber of FrameType::Unknown received0BnNumber of UPnP probes that found it available.AaAdds a relay url.CeSets the relay URL and returns the updated node data.CeSets the relay URL and returns the updated node info.210CkSets the user-defined data and returns the updated node \xe2\x80\xa6000CdConfigure the bootstrap servers for mainline DHT \xe2\x80\xa6BdPer-client rate limit configuration.ChReason given by the transport for closing the connectionBfReasons why a connection might be lostAeConnection statisticsCoMetrics collected by an crate::endpoint::Endpoint.DnError when deserialising a PublicKey or a SecretKey.0ClThe maximum size of a packet sent over relay. (This only \xe2\x80\xa6BaHandler for incoming connections.BbConfig for http server rate limit.CjConfiguration for speaking to the QUIC endpoint on the \xe2\x80\xa6C`The server frame type for the challenge responseAbServer task errorsC`Parameters governing the core QUIC state machineCbThe peer doesn\xe2\x80\x99t implement any supported versionCdFuture that completes when a connection is fully \xe2\x80\xa6CbThis was a 0-RTT stream and the server rejected it000C`Removes all discovery services from the builder.BjReturns the current timeout set for pings.EaParse an Ed25519 signature from its R and s components.CcParses a NodeInfo from DNS TXT lookup.0CfThe socket address on which to serve the HTTPS server.AlA DNS server and pkarr relayBnMax number of bytes to read in a single burst.BoSet the maximum number of TLS tickets to cache.BmNumber of nodes we have attempted to contact.CnProbe indicating the presence of port mapping protocols on \xe2\x80\xa6BeSets the republish delay for the DHT.AoWait for all tasks to complete.CmRun DNS and Pkarr servers on localhost with the specified \xe2\x80\xa6CiCreates a server endpoint which runs on the given runtime0CkA static node discovery to manually add node addressing \xe2\x80\xa6EaReturns a Watcher for the current NodeAddr for this \xe2\x80\xa6CkCreates a new DNS resolver configured with a single UDP \xe2\x80\xa6AiAdds a single nameserver.1CiReason given by an application for closing the connectionBmA drop guard to clean up test infrastructure.BeMessages that clients send to relays.CbThe peer\xe2\x80\x99s QUIC stack aborted the connection \xe2\x80\xa6CoContext about the Endpoint for discovery services.Cnreceived a STREAM frame or a RESET_STREAM frame containing \xe2\x80\xa6A`key update errorAnEnum of metrics for the moduleDjA pkarr client to publish pkarr::SignedPackets to a pkarr \xe2\x80\xa6ClThe HTTP path under which the relay allows doing latency \xe2\x80\xa6CmThe messages that a relay sends to clients or the clients \xe2\x80\xa6BoThe server frame type for authentication denialCjMax number of bytes per second to read from the client \xe2\x80\xa6CjCurrent state of the congestion control algorithm, for \xe2\x80\xa6BjReturns the direct addresses of this peer.CjSocket addresses where the peer might be reached directly.BiReturns the direct addresses of the node.210BaDNS lookup responses which failedAdDNS requests via UDPCjWhether to use the letsenrypt production servers (only \xe2\x80\xa6CbResolves IPv4 and IPv6 in parallel with a timeout.0B`Number of mapping tasks started.AoNumber of failed mapping tasks.CnMaximum duration of inactivity to accept before timing out \xe2\x80\xa6CiMaximum reordering in packet number space before FACK \xe2\x80\xa6CnRemoves all node addressing information for the given node \xe2\x80\xa6CiRuns a relay server with QUIC enabled suitable for tests.BiSet a custom TransportConfigDdSets a custom quinn::TransportConfig for this endpoint.CmPublishes the addressing information about this node to a \xe2\x80\xa6ChConfiguration for sending and handling validation tokensAkAdds a list of nameservers.CnCreate a server config with the given certificate chain to \xe2\x80\xa6CkConvenience method to write an entire list of chunks to \xe2\x80\xa6Cfthe application or application protocol caused the \xe2\x80\xa6BkHostname of the default Asia-Pacific relay.AnThe peer closed the connectionB`Constructs controllers on demandBoThe default HTTP port used by the Relay server.0CgDefault TTL for the records in the pkarr signed packet.BaHostname of the default EU relay.0AlA pseudo random key for HKDFBaHostname of the default NA relay.0CmA Certificate resolver that reloads the certificate every \xe2\x80\xa6BmErrors that can arise when sending a datagramCcThe peer does not support receiving datagram framesCnBurst limit for accepting new connection. Unlimited if not \xe2\x80\xa6CmRate limit for accepting new connection. Unlimited if not \xe2\x80\xa6BcCongestion events on the connectionD`Starts a connection attempt with a remote Endpoint.BfGet the default RelayMap.0BjGet the latest signed packet for a pubkey.DaLooks up node info by NodeId and origin domain name.0CmComputes the maximum size of datagrams that may be passed \xe2\x80\xa6DhFrameType::SendPacket received, that are not disco messages0DdFrameType::SendPacket sent, that are not disco messages0CiCreates a new client while passing a DNS resolver to use.Cmthe endpoint has reached the confidentiality or integrity \xe2\x80\xa6CkParameters for controlling the peer\xe2\x80\x99s acknowledgement \xe2\x80\xa6CdThe HTTP header name for relay client authenticationBmthe server refused to accept a new connectionCaServer-side configuration for the crypto protocolC`The default HTTPS port used by the Relay server.0DiA dyn-compatible version of ProtocolHandler that returns \xe2\x80\xa6Ckreceived more data than permitted in advertised data limitsCeAttempted an ordered read following an unordered readAdIntoDiscovery errorsBcParameters governing MTU discovery.Ckdetected an error with protocol compliance that was not \xe2\x80\xa6CmCan occur when parsing a string into a RelayUrl.0Cjreceived a frame for a stream identifier that exceeded \xe2\x80\xa6Cnreceived a frame for a stream that was not in a state that \xe2\x80\xa6CeThe server frame type for authentication confirmationAjTransport-level error codeCkError indicating that the specified QUIC version is not \xe2\x80\xa6CiMaximum quantity of out-of-order crypto layer data to \xe2\x80\xa6AoReturns the default relay mode.DcFrameType::SendPacket received that are disco messages0CoFrameType::SendPacket sent that are disco messages0BmDNS lookup responses with at least one answerAlDNS requests via HTTPS (DoH)C`Create a VarInt without ensuring it\xe2\x80\x99s in rangeBnSet the capacity of the cache for public keys.AcKey cache capacity.BdNumber of updates to the local port.BjUses the default number 0 pkarr relay URL.CaPackets of other FrameTypes received0BmPackets of other FrameTypes sent0CbNumber of ping failures recorded across all paths.BkHistogram of path quality scores (0.0-1.0).ChNumber of pkarr relay puts that did not update the stateBfNumber of datagrams received using GROCnSets the interval after which packets are republished even \xe2\x80\xa6CnSee quinn_proto::TransportConfig::receive_window.BdNumber of unique client keys per day0AmNumber of failed Upnp probes.B`ALPN for our quic addr discoveryChA discovery service that combines multiple discovery \xe2\x80\xa6BmThe encoded information had the wrong length.0BfBuilder for DnsDiscovery.CjSpecifies the amount of time that MTU discovery should \xe2\x80\xa6BdDNS lookup responses with no answersDaReturns true if the use of staging relays is forced.CbNumber of HTTP requests with a non-2xx status codeCgPeriod of inactivity before sending a keep-alive packetChLetsencrypt contact email address (required if using \xe2\x80\xa6CiThe amount of PLPMTUD probe packets lost on this path \xe2\x80\xa6BlPackets were deemed lost or marked congestedCfNumber of consecutive failure resets (path recovered).CiThe amount of PLPMTUD probe packets sent on this path \xe2\x80\xa6ClReturns a stream which will yield the most recent values \xe2\x80\xa6DkReturn a ParseError variant that indicates verification of \xe2\x80\xa6CbThe default metrics port used by the Relay server.0Bireceived a frame that was badly formattedBgBuilder for MdnsDiscovery.BgBuilder for PkarrResolver.CeA handle to some connection internals, use with care.DkSpecifies the ACK frequency config (see AckFrequencyConfig \xe2\x80\xa6BgAdds direct addresses to the node data.0CiThe number of times a black hole was detected in the pathCgMaximum number of received bytes to buffer for each \xe2\x80\xa6DkSpecifies the MTU discovery config (see MtuDiscoveryConfig \xe2\x80\xa6AkResets path-specific state.ChNumber of times a path was marked as outdated due to \xe2\x80\xa6CdHistogram of RTT variance (in milliseconds) as a \xe2\x80\xa6CaNumber of pkarr relay puts that updated the stateAkConfig for pkarr rate limitCkThe preferred IPv4 address that will be communicated to \xe2\x80\xa6CkThe preferred IPv6 address that will be communicated to \xe2\x80\xa6ChThe reordering threshold we will request the peer to useClDuration after a retry token was issued for which it\xe2\x80\x99s \xe2\x80\xa6DgFrameType::SendPacket dropped, that are not disco messages0CnNumber of UPnP probes that resulted in a gateway different \xe2\x80\xa6CeMakes the builder respect the host system\xe2\x80\x99s DNS \xe2\x80\xa6Cg32B dest pub key + ECN bytes + one datagram\xe2\x80\x99s contentBhBuilder for PkarrPublisher.Cf32B src pub key + ECN bytes + one datagram\xe2\x80\x99s contentCgGet the default RelayNode for Asia-PacificBnGet the default RelayNode for EU.0BnGet the default RelayNode for NA.0DbFrameType::SendPacket dropped that are disco messages0BnNumber of HTTP requests with a 2xx status codeCiPerforms an IPv4 lookup with a timeout in a staggered \xe2\x80\xa60CiPerforms an IPv6 lookup with a timeout in a staggered \xe2\x80\xa60CiThe number of connections to peers we have added over \xe2\x80\xa6C`Packets of other FrameTypes dropped0ClHistogram of packet loss rates (0.0-1.0) observed on UDP \xe2\x80\xa6AdRuns a relay server.AiNumber of expired packetsBeSigned packets removed from the storeBeNumber of updates to existing packetsCiMaximum number of bytes the peer may transmit without \xe2\x80\xa6CnSets ALPN identifiers that should be signaled as supported \xe2\x80\xa6B`Adds the given direct addresses.CjSets the direct addresses and returns the updated node \xe2\x80\xa60100CkSets the QUIC transport config options for this connection.Chreceived more data in CRYPTO frames than can be bufferedDkError returned when an input value is too long for UserData\xe2\x80\xa60ChThe websocket sub-protocol version that we currently \xe2\x80\xa6C`Removes all direct addresses from the node data.0ChDerives keying material from this connection\xe2\x80\x99s TLS \xe2\x80\xa6ClWhether the reported public address differs when probing \xe2\x80\xa6CgThe number of direct connections we have made to peers.BfSigned packets inserted into the storeBkCreates a pkarr::SignedPacket.0CkConfigure a pkarr client for resolution of packets from \xe2\x80\xa6BhFailed to deserialize client auth headerClThe default QUIC port used by the Relay server to accept \xe2\x80\xa60BoThe n0 testing DNS node origin, for production.00BkThe production pkarr relay run by number 0.CkThe ack-eliciting threshold we will request the peer to useCdReturns if we should prefer ipv6 it replaces the \xe2\x80\xa6CeConfigures the endpoint to also use local network \xe2\x80\xa6CkThe number of connections to peers we have removed over \xe2\x80\xa6CiSets the initial user-defined data to be published in \xe2\x80\xa6BoSet a custom ValidationTokenConfigChEnvironment variable to force the use of staging relays.CjNumber of connections with a successful handshake that \xe2\x80\xa6CjNumber of times the external address obtained via port \xe2\x80\xa6DgParses a NodeInfo from a pkarr::SignedPacket.0CkSets whether to include the direct addresses in the DNS \xe2\x80\xa6CnReports whether p looks like it\xe2\x80\x99s a packet containing an \xe2\x80\xa6CdNumber of nodes we have managed to contact directly.CgThe number of direct connections we have lost to peers.CfWhether the socket address that is initiating this \xe2\x80\xa6BhGet the path to the store database file.Cmthe number of connection IDs provided by the peer exceeds \xe2\x80\xa6CbError returned by Session::export_keying_material.AiEndpoint close error codeClreceived transport parameters that were badly formatted, \xe2\x80\xa6DhInforms this Endpoint about addresses of the iroh node, \xe2\x80\xa6ClMaximum number of outgoing application datagram bytes to \xe2\x80\xa6BcTotal duration of all HTTP requestsCeSkip the verification of the relay server\xe2\x80\x99s SSL \xe2\x80\xa6Cn32B dest pub key + ECN byte + segment size u16 + datagrams \xe2\x80\xa6CkThe default capacity of the key cache for the relay server.ChInterval in which to republish the node info even if \xe2\x80\xa6BlThe n0 testing DNS node origin, for testing.00BhThe testing pkarr relay run by number 0.Cm32B src pub key + ECN byte + segment size u16 + datagrams \xe2\x80\xa6CnNumber of bytes received from client connection which have \xe2\x80\xa60CjNumber of client connections which have had any frames \xe2\x80\xa60C`Bytes available in the outgoing datagram buffer.DhMaximum number of received bytes to buffer for all IncomingCeRaces an IPv4 and IPv6 lookup with a timeout in a \xe2\x80\xa60AoLooks up node info by DNS name.0DaVariant of max_concurrent_bidi_streams affecting \xe2\x80\xa6AeEndpoint close reasonChWhether to use \xe2\x80\x9cGeneric Segmentation Offload\xe2\x80\x9d to \xe2\x80\xa6DaLooks up node info by NodeId and origin domain name.0ClWhether the reported public address differs when probing \xe2\x80\xa60CmMaximum number of incoming bidirectional streams that may \xe2\x80\xa6CiSets the initial user-defined data to be published in \xe2\x80\xa6BhThe default certificate reload interval.CbNumber of connections with a successful handshake.ClMaximum number of incoming application datagram bytes to \xe2\x80\xa6CkCreates a client config that trusts any servers without \xe2\x80\xa6DdSpawn the server and run until the Ctrl-C signal is \xe2\x80\xa6CiHow to construct new congestion::ControllersCbWhether to send observed address reports to peers.ClModifies the number of bidirectional streams that may be \xe2\x80\xa6CmModifies the number of unidirectional streams that may be \xe2\x80\xa6ChSkip verification of SSL certificates from relay serversAfSkip cert verificationCeNumber of consecutive PTOs after which network is \xe2\x80\xa6CjWhether to receive observed address reports from other \xe2\x80\xa6DiCreates a rustls::ServerConfig and certificates suitable \xe2\x80\xa6CfLooks up node info by DNS name in a staggered fashion.0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/entry/f787478b550d.js b/pr/3367/docs/search.index/entry/f787478b550d.js new file mode 100644 index 0000000000..e0d2f35f14 --- /dev/null +++ b/pr/3367/docs/search.index/entry/f787478b550d.js @@ -0,0 +1 @@ +rd_("Ai[1767,14,4949,0,7045,0,0]0Ai[5848,14,4952,0,7046,0,0]Al[5848,15,2729,2729,4291,0,0]Al[1767,14,5860,4778,4963,0,0]Al[1767,13,1768,0,4327,4321,0]Al[1767,13,1768,0,3564,4321,0]Al[1767,13,1768,0,3583,4321,0]Al[1767,13,1768,0,3580,4321,0]Al[1767,13,1768,0,4339,4321,0]Al[1767,13,4715,0,3567,4321,0]Al[1767,13,4715,0,3596,4321,0]Al[1767,13,4715,0,3572,4321,0]Ao[1767,13,4715,4715,6458,4321,0]Ao[1767,13,1774,1774,6623,4321,0]Al[1767,13,3614,0,7111,4321,0]Al[1767,13,3614,0,6643,4321,0]Al[1767,13,3614,0,4332,4321,0]Al[1767,13,3614,0,4968,4321,0]Al[1767,13,3614,0,6642,4321,0]Al[1767,13,3614,0,4984,4321,0]Al[1767,13,3614,0,6377,4321,0]Al[1767,13,3614,0,2509,4321,0]Al[1767,13,3614,0,2018,4321,0]Al[1767,13,3614,0,3174,4321,0]Ao[1767,13,3614,5864,4920,4321,0]Ao[1767,13,3614,5864,6618,4321,0]Ao[1767,13,3614,5864,6617,4321,0]Al[1767,13,3614,0,6344,4321,0]Ao[1767,13,3614,3733,2502,4321,0]Al[1767,13,3614,0,6741,4321,0]Al[1767,13,3614,0,7367,4321,0]Al[1767,13,3614,0,6737,4321,0]Al[1767,13,3614,0,7017,4321,0]Al[1767,13,3614,0,6656,4321,0]Al[1767,13,3614,0,7159,4321,0]Al[1767,13,3614,0,3586,4321,0]Ao[1767,13,3614,4746,4922,4321,0]Ao[1767,13,3614,4746,6619,4321,0]Ao[1767,13,3614,3614,6477,4321,0]Ao[1767,13,3614,3614,4338,4321,0]Ao[1767,13,5860,2955,2050,4321,0]Ao[1767,13,5860,2969,2492,4321,0]Ao[1767,13,5860,2969,6644,4321,0]Al[4743,13,4744,0,4351,4321,0]An[4743,13,4744,784,4328,4321,0]Ao[4743,13,4744,4750,3565,4321,0]Ao[4743,13,4744,4771,3584,4321,0]Ao[4743,13,3100,1786,4943,4321,0]An[6989,13,1389,825,3528,4321,0]Ao[5848,13,5849,4769,3581,4321,0]Ao[5848,13,5849,4769,4340,4321,0]Ao[5848,13,5849,4769,6772,4321,0]Ao[5848,13,2972,2972,2453,4321,0]Ao[5848,13,2735,2735,4298,4321,0]Ao[5848,13,2423,2423,7039,4321,0]Ao[5848,13,2423,2423,7020,4321,0]Ao[5848,13,2423,2423,4289,4321,0]Am[5848,13,508,508,6035,4321,0]Ao[5848,13,4754,4754,3568,4321,0]Ao[5848,13,4754,4754,3597,4321,0]Ao[5848,13,4754,4754,3573,4321,0]Ai[1767,13,3614,0,4967,0,0]Ai[1767,13,3614,0,4975,0,0]Ai[1767,13,1768,0,3173,0,0]Al[1767,13,1768,0,4327,4324,0]Al[1767,13,1768,0,6757,4324,0]Al[1767,13,1768,0,4345,4324,0]Al[1767,13,1768,0,3564,4324,0]Al[1767,13,1768,0,3583,4324,0]Al[1767,13,1768,0,7153,4324,0]Al[1767,13,1768,0,3580,4324,0]Al[1767,13,1768,0,4339,4324,0]Al[1767,13,3262,0,6640,4324,0]Al[1767,13,3262,0,7034,4324,0]Al[1767,13,3262,0,6367,4324,0]Ao[1767,13,3262,3262,6743,4324,0]Al[1767,13,4715,0,3567,4324,0]Al[1767,13,4715,0,3596,4324,0]Al[1767,13,4715,0,3572,4324,0]Al[1767,13,4715,0,4954,4324,0]Ao[1767,13,4715,4715,7022,4324,0]Ao[1767,13,4715,4715,7145,4324,0]Ao[1767,13,4715,4715,6621,4324,0]Ao[1767,13,4715,4715,6458,4324,0]Ao[1767,13,4715,4715,7195,4324,0]Am[1767,13,507,507,6354,4324,0]Am[1767,13,507,507,7200,4324,0]Ao[1767,13,2416,2416,4960,4324,0]Ao[1767,13,2416,2416,7274,4324,0]Ao[1767,13,2416,2416,6639,4324,0]Ao[1767,13,2416,2416,7242,4324,0]Ao[1767,13,2416,2416,6478,4324,0]Ao[1767,13,2416,2416,7036,4324,0]Am[1767,13,502,502,6352,4324,0]Am[1767,13,502,502,3118,4324,0]Ao[1767,13,1774,1774,6475,4324,0]Ao[1767,13,1774,1774,7241,4324,0]Ao[1767,13,1774,1774,6623,4324,0]Ao[1767,13,7007,7007,6651,4324,0]Ak[1767,13,506,0,6036,4324,0]Al[1767,13,3614,0,3145,4324,0]Al[1767,13,3614,0,2487,4324,0]Al[1767,13,3614,0,4272,4324,0]Al[1767,13,3614,0,3525,4324,0]Al[1767,13,3614,0,6366,4324,0]Al[1767,13,3614,0,7244,4324,0]Al[1767,13,3614,0,7111,4324,0]Al[1767,13,3614,0,4973,4324,0]Al[1767,13,3614,0,4967,4324,0]Al[1767,13,3614,0,6643,4324,0]Al[1767,13,3614,0,4332,4324,0]Al[1767,13,3614,0,4968,4324,0]Al[1767,13,3614,0,6642,4324,0]Al[1767,13,3614,0,4975,4324,0]Al[1767,13,3614,0,4984,4324,0]Al[1767,13,3614,0,6377,4324,0]Al[1767,13,3614,0,6778,4324,0]Al[1767,13,3614,0,2509,4324,0]Al[1767,13,3614,0,2018,4324,0]Al[1767,13,3614,0,3593,4324,0]Al[1767,13,3614,0,4928,4324,0]Al[1767,13,3614,0,4322,4324,0]Al[1767,13,3614,0,6742,4324,0]Al[1767,13,3614,0,3174,4324,0]Ao[1767,13,3614,5864,4920,4324,0]Ao[1767,13,3614,5864,6618,4324,0]Ao[1767,13,3614,5864,6617,4324,0]Al[1767,13,3614,0,6344,4324,0]Ao[1767,13,3614,3733,2502,4324,0]Al[1767,13,3614,0,6741,4324,0]Al[1767,13,3614,0,7134,4324,0]Al[1767,13,3614,0,7151,4324,0]Al[1767,13,3614,0,6372,4324,0]Al[1767,13,3614,0,7367,4324,0]Al[1767,13,3614,0,6032,4324,0]Al[1767,13,3614,0,7160,4324,0]Al[1767,13,3614,0,6737,4324,0]Al[1767,13,3614,0,7017,4324,0]Ao[1767,13,3614,4746,7016,4324,0]Al[1767,13,3614,0,6656,4324,0]Al[1767,13,3614,0,7159,4324,0]Al[1767,13,3614,0,3586,4324,0]Ao[1767,13,3614,4746,4922,4324,0]Ao[1767,13,3614,4746,6619,4324,0]Ao[1767,13,3614,3614,6477,4324,0]Ao[1767,13,3614,3614,3117,4324,0]Ao[1767,13,3614,3614,3546,4324,0]Ao[1767,13,3614,3614,7227,4324,0]Ao[1767,13,3614,3614,6348,4324,0]Ao[1767,13,3614,3614,4280,4324,0]Ao[1767,13,3614,3614,7310,4324,0]Ao[1767,13,3614,3614,6611,4324,0]Ao[1767,13,3614,3614,2452,4324,0]Ao[1767,13,3614,3614,3551,4324,0]Ao[1767,13,3614,3614,6635,4324,0]Ao[1767,13,3614,3614,4911,4324,0]Ao[1767,13,3614,3614,4275,4324,0]Ao[1767,13,3614,3614,6783,4324,0]Ao[1767,13,3614,3614,4918,4324,0]Ao[1767,13,3614,3614,7110,4324,0]Ao[1767,13,3614,3614,4338,4324,0]Ao[1767,13,5860,3263,3140,4324,0]Ao[1767,13,5860,2955,2050,4324,0]Ao[1767,13,5860,2969,2492,4324,0]Ao[1767,13,5860,2969,6644,4324,0]Ao[1767,13,5860,4778,4963,4324,0]An[1767,13,5860,782,3146,4324,0]Ao[1767,13,3736,3736,2497,4324,0]Ao[1767,13,3736,3736,6482,4324,0]Ao[1767,13,3736,3736,6025,4324,0]Ao[1767,13,3736,3736,6026,4324,0]Al[1767,13,4753,0,6461,4324,0]Al[1767,13,4753,0,6455,4324,0]Al[1767,13,4753,0,7311,4324,0]Ao[1767,13,6018,6018,7018,4324,0]Ao[1767,13,6018,7285,6626,4324,0]Ao[5847,13,5848,5848,7023,4324,0]Ao[5847,13,5848,5848,7137,4324,0]Ao[5847,13,5848,5848,3529,4324,0]An[5847,13,5848,5848,282,4324,0]Ao[5847,13,5848,5848,6031,4324,0]Ao[5847,13,2440,2440,2065,4324,0]Ao[5847,13,2440,2440,6073,4324,0]Ao[5847,13,2440,2440,6654,4324,0]Al[5847,13,821,821,283,4324,0]Ao[6989,13,6990,2446,4363,4324,0]Ao[6989,13,2437,2437,3526,4324,0]Ao[6989,13,2927,2927,2459,4324,0]Ao[6989,13,2927,2927,6068,4324,0]Ao[6989,13,2927,2927,6476,4324,0]Ao[6989,13,2927,2927,6637,4324,0]Ao[6989,13,2927,2927,6735,4324,0]Am[6989,13,509,509,4296,4324,0]Am[6989,13,509,509,4295,4324,0]Am[6989,13,509,509,4925,4324,0]Am[6989,13,509,509,2469,4324,0]Ao[6989,13,1389,1389,4931,4324,0]Ao[6989,13,1389,6520,6771,4324,0]An[6989,13,1389,825,3528,4324,0]Ao[6989,13,1389,1389,4930,4324,0]Ao[6989,13,1389,1389,6048,4324,0]Ao[6989,13,3265,3265,3141,4324,0]Ao[6989,13,2973,2973,2498,4324,0]Ao[5848,13,5849,6425,6062,4324,0]Ao[5848,13,5849,4769,3581,4324,0]Ao[5848,13,5849,4769,4340,4324,0]Ao[5848,13,5849,4769,6772,4324,0]An[5848,13,2729,901,4348,4324,0]An[5848,13,2729,901,4336,4324,0]Ao[5848,13,2729,2729,6349,4324,0]Ao[5848,13,2729,2729,4291,4324,0]Ao[5848,13,2729,2729,6447,4324,0]Ao[5848,13,2729,2729,2457,4324,0]Ao[5848,13,2729,2729,4909,4324,0]Ao[5848,13,2729,2729,6341,4324,0]Ao[5848,13,2972,3264,3143,4324,0]Ao[5848,13,2972,3264,6368,4324,0]Ao[5848,13,2972,3738,7109,4324,0]Ao[5848,13,2972,2972,6373,4324,0]Ao[5848,13,2972,2972,6063,4324,0]Ao[5848,13,2972,2972,6338,4324,0]Ao[5848,13,2972,2972,2453,4324,0]Ao[5848,13,2972,2972,4964,4324,0]Ao[5848,13,2972,2972,4353,4324,0]Ao[5848,13,2972,2972,2477,4324,0]Ao[5848,13,2972,2972,6736,4324,0]Ao[5848,13,2972,2972,4907,4324,0]Ao[5848,13,2972,2972,2499,4324,0]Ao[5848,13,2972,2972,4980,4324,0]Ao[5848,13,2972,2972,6776,4324,0]Ao[5848,13,2735,2735,4298,4324,0]Ao[5848,13,2735,2735,6632,4324,0]Ao[5848,13,2423,2423,2044,4324,0]Ao[5848,13,2423,2423,7039,4324,0]Ao[5848,13,2423,2423,7020,4324,0]Ao[5848,13,2423,2423,4289,4324,0]Ao[5848,13,4736,4736,2043,4324,0]Ao[5848,13,1805,1805,2042,4324,0]Ao[5848,13,1805,1805,4962,4324,0]Am[5848,13,508,508,3537,4324,0]Am[5848,13,508,508,6055,4324,0]Am[5848,13,508,508,6650,4324,0]Am[5848,13,508,508,3119,4324,0]Am[5848,13,508,508,6035,4324,0]Am[5848,13,508,508,6037,4324,0]Am[5848,13,508,508,6485,4324,0]Ao[5848,13,4754,4754,6462,4324,0]Ao[5848,13,4754,4754,6457,4324,0]Ao[5848,13,4754,4754,3568,4324,0]Ao[5848,13,4754,4754,3597,4324,0]Ao[5848,13,4754,4754,7312,4324,0]Ao[5848,13,4754,4754,3573,4324,0]Ao[5848,13,4754,4754,4957,4324,0]Ae[5847,7,5848,0,0,0,0]Al[1767,15,3614,3614,6477,0,0]Al[1767,15,3614,3733,2502,0,0]Al[5848,15,2729,2729,4291,0,0]Ai[1767,15,1768,0,6757,0,0]Ak[4743,15,4744,784,6758,0,0]Ai[1767,19,3614,0,2509,0,0]Ae[5847,5,5848,0,0,0,0]Ad[5847,5,821,0,0,0,0]Al[1767,15,3614,4746,6619,0,0]Al[5847,15,5848,5848,3529,0,0]Aj[5848,15,508,508,6035,0,0]Al[5848,15,2729,2729,6349,0,0]1:1Al[1767,13,4715,4715,7195,0,0]Al[1767,13,1768,0,4327,4324,0]Al[1767,13,1768,0,6757,4324,0]Al[1767,13,1768,0,4345,4324,0]Al[1767,13,1768,0,3564,4324,0]Al[1767,13,1768,0,3583,4324,0]Al[1767,13,1768,0,7153,4324,0]Al[1767,13,1768,0,3580,4324,0]Al[1767,13,1768,0,4339,4324,0]Al[1767,13,3262,0,6640,4324,0]Al[1767,13,3262,0,7034,4324,0]Al[1767,13,3262,0,6367,4324,0]Ao[1767,13,3262,3262,6743,4324,0]Al[1767,13,4715,0,3567,4324,0]Al[1767,13,4715,0,3596,4324,0]Al[1767,13,4715,0,3572,4324,0]Al[1767,13,4715,0,4954,4324,0]Ao[1767,13,4715,4715,7022,4324,0]Ao[1767,13,4715,4715,7145,4324,0]Ao[1767,13,4715,4715,6621,4324,0]Ao[1767,13,4715,4715,6458,4324,0]Ao[1767,13,4715,4715,7195,4324,0]Am[1767,13,507,507,6354,4324,0]Am[1767,13,507,507,7200,4324,0]Ao[1767,13,2416,2416,4960,4324,0]Ao[1767,13,2416,2416,7274,4324,0]Ao[1767,13,2416,2416,6639,4324,0]Ao[1767,13,2416,2416,7242,4324,0]Ao[1767,13,2416,2416,6478,4324,0]Ao[1767,13,2416,2416,7036,4324,0]Am[1767,13,502,502,6352,4324,0]Am[1767,13,502,502,3118,4324,0]Ao[1767,13,1774,1774,6475,4324,0]Ao[1767,13,1774,1774,7241,4324,0]Ao[1767,13,1774,1774,6623,4324,0]Ao[1767,13,7007,7007,6651,4324,0]Ak[1767,13,506,0,6036,4324,0]Al[1767,13,3614,0,3145,4324,0]Al[1767,13,3614,0,2487,4324,0]Al[1767,13,3614,0,4272,4324,0]Al[1767,13,3614,0,3525,4324,0]Al[1767,13,3614,0,6366,4324,0]Al[1767,13,3614,0,7244,4324,0]Al[1767,13,3614,0,7111,4324,0]Al[1767,13,3614,0,4973,4324,0]Al[1767,13,3614,0,4967,4324,0]Al[1767,13,3614,0,6643,4324,0]Al[1767,13,3614,0,4332,4324,0]Al[1767,13,3614,0,4968,4324,0]Al[1767,13,3614,0,6642,4324,0]Al[1767,13,3614,0,4975,4324,0]Al[1767,13,3614,0,4984,4324,0]Al[1767,13,3614,0,6377,4324,0]Al[1767,13,3614,0,6778,4324,0]Al[1767,13,3614,0,2509,4324,0]Al[1767,13,3614,0,2018,4324,0]Al[1767,13,3614,0,3593,4324,0]Al[1767,13,3614,0,4928,4324,0]Al[1767,13,3614,0,4322,4324,0]Al[1767,13,3614,0,6742,4324,0]Al[1767,13,3614,0,3174,4324,0]Ao[1767,13,3614,5864,4920,4324,0]Ao[1767,13,3614,5864,6618,4324,0]Ao[1767,13,3614,5864,6617,4324,0]Al[1767,13,3614,0,6344,4324,0]Ao[1767,13,3614,3733,2502,4324,0]Al[1767,13,3614,0,6741,4324,0]Al[1767,13,3614,0,7134,4324,0]Al[1767,13,3614,0,7151,4324,0]Al[1767,13,3614,0,6372,4324,0]Al[1767,13,3614,0,7367,4324,0]Al[1767,13,3614,0,6032,4324,0]Al[1767,13,3614,0,7160,4324,0]Al[1767,13,3614,0,6737,4324,0]Al[1767,13,3614,0,7017,4324,0]Ao[1767,13,3614,4746,7016,4324,0]Al[1767,13,3614,0,6656,4324,0]Al[1767,13,3614,0,7159,4324,0]Al[1767,13,3614,0,3586,4324,0]Ao[1767,13,3614,4746,4922,4324,0]Ao[1767,13,3614,4746,6619,4324,0]Ao[1767,13,3614,3614,6477,4324,0]Ao[1767,13,3614,3614,3117,4324,0]Ao[1767,13,3614,3614,3546,4324,0]Ao[1767,13,3614,3614,7227,4324,0]Ao[1767,13,3614,3614,6348,4324,0]Ao[1767,13,3614,3614,4280,4324,0]Ao[1767,13,3614,3614,7310,4324,0]Ao[1767,13,3614,3614,6611,4324,0]Ao[1767,13,3614,3614,2452,4324,0]Ao[1767,13,3614,3614,3551,4324,0]Ao[1767,13,3614,3614,6635,4324,0]Ao[1767,13,3614,3614,4911,4324,0]Ao[1767,13,3614,3614,4275,4324,0]Ao[1767,13,3614,3614,6783,4324,0]Ao[1767,13,3614,3614,4918,4324,0]Ao[1767,13,3614,3614,7110,4324,0]Ao[1767,13,3614,3614,4338,4324,0]Ao[1767,13,5860,3263,3140,4324,0]Ao[1767,13,5860,2955,2050,4324,0]Ao[1767,13,5860,2969,2492,4324,0]Ao[1767,13,5860,2969,6644,4324,0]Ao[1767,13,5860,4778,4963,4324,0]An[1767,13,5860,782,3146,4324,0]Ao[1767,13,3736,3736,2497,4324,0]Ao[1767,13,3736,3736,6482,4324,0]Ao[1767,13,3736,3736,6025,4324,0]Ao[1767,13,3736,3736,6026,4324,0]Al[1767,13,4753,0,6461,4324,0]Al[1767,13,4753,0,6455,4324,0]Al[1767,13,4753,0,7311,4324,0]Ao[1767,13,6018,6018,7018,4324,0]Ao[1767,13,6018,7285,6626,4324,0]Ao[5847,13,5848,5848,7023,4324,0]Ao[5847,13,5848,5848,7137,4324,0]Ao[5847,13,5848,5848,3529,4324,0]An[5847,13,5848,5848,282,4324,0]Ao[5847,13,5848,5848,6031,4324,0]Ao[5847,13,2440,2440,2065,4324,0]Ao[5847,13,2440,2440,6073,4324,0]Ao[5847,13,2440,2440,6654,4324,0]Al[5847,13,821,821,283,4324,0]Ao[6989,13,6990,2446,4363,4324,0]Ao[6989,13,2437,2437,3526,4324,0]Ao[6989,13,2927,2927,2459,4324,0]Ao[6989,13,2927,2927,6068,4324,0]Ao[6989,13,2927,2927,6476,4324,0]Ao[6989,13,2927,2927,6637,4324,0]Ao[6989,13,2927,2927,6735,4324,0]Am[6989,13,509,509,4296,4324,0]Am[6989,13,509,509,4295,4324,0]Am[6989,13,509,509,4925,4324,0]Am[6989,13,509,509,2469,4324,0]Ao[6989,13,1389,1389,4931,4324,0]Ao[6989,13,1389,6520,6771,4324,0]An[6989,13,1389,825,3528,4324,0]Ao[6989,13,1389,1389,4930,4324,0]Ao[6989,13,1389,1389,6048,4324,0]Ao[6989,13,3265,3265,3141,4324,0]Ao[6989,13,2973,2973,2498,4324,0]Ao[5848,13,5849,6425,6062,4324,0]Ao[5848,13,5849,4769,3581,4324,0]Ao[5848,13,5849,4769,4340,4324,0]Ao[5848,13,5849,4769,6772,4324,0]An[5848,13,2729,901,4348,4324,0]An[5848,13,2729,901,4336,4324,0]Ao[5848,13,2729,2729,6349,4324,0]Ao[5848,13,2729,2729,4291,4324,0]Ao[5848,13,2729,2729,6447,4324,0]Ao[5848,13,2729,2729,2457,4324,0]Ao[5848,13,2729,2729,4909,4324,0]Ao[5848,13,2729,2729,6341,4324,0]Ao[5848,13,2972,3264,3143,4324,0]Ao[5848,13,2972,3264,6368,4324,0]Ao[5848,13,2972,3738,7109,4324,0]Ao[5848,13,2972,2972,6373,4324,0]Ao[5848,13,2972,2972,6063,4324,0]Ao[5848,13,2972,2972,6338,4324,0]Ao[5848,13,2972,2972,2453,4324,0]Ao[5848,13,2972,2972,4964,4324,0]Ao[5848,13,2972,2972,4353,4324,0]Ao[5848,13,2972,2972,2477,4324,0]Ao[5848,13,2972,2972,6736,4324,0]Ao[5848,13,2972,2972,4907,4324,0]Ao[5848,13,2972,2972,2499,4324,0]Ao[5848,13,2972,2972,4980,4324,0]Ao[5848,13,2972,2972,6776,4324,0]Ao[5848,13,2735,2735,4298,4324,0]Ao[5848,13,2735,2735,6632,4324,0]Ao[5848,13,2423,2423,2044,4324,0]Ao[5848,13,2423,2423,7039,4324,0]Ao[5848,13,2423,2423,7020,4324,0]Ao[5848,13,2423,2423,4289,4324,0]Ao[5848,13,4736,4736,2043,4324,0]Ao[5848,13,1805,1805,2042,4324,0]Ao[5848,13,1805,1805,4962,4324,0]Am[5848,13,508,508,3537,4324,0]Am[5848,13,508,508,6055,4324,0]Am[5848,13,508,508,6650,4324,0]Am[5848,13,508,508,3119,4324,0]Am[5848,13,508,508,6035,4324,0]Am[5848,13,508,508,6037,4324,0]Am[5848,13,508,508,6485,4324,0]Ao[5848,13,4754,4754,6462,4324,0]Ao[5848,13,4754,4754,6457,4324,0]Ao[5848,13,4754,4754,3568,4324,0]Ao[5848,13,4754,4754,3597,4324,0]Ao[5848,13,4754,4754,7312,4324,0]Ao[5848,13,4754,4754,3573,4324,0]Ao[5848,13,4754,4754,4957,4324,0]Ak[1767,13,1768,0,4327,284,0]Ak[1767,13,1768,0,3564,284,0]Ak[1767,13,1768,0,3583,284,0]Ak[1767,13,1768,0,4339,284,0]Ak[1767,13,4715,0,3596,284,0]Ak[1767,13,3614,0,2509,284,0]Ak[1767,13,3614,0,3586,284,0]An[1767,13,3614,4746,4922,284,0]An[1767,13,3614,4746,6619,284,0]An[1767,13,5860,2955,2050,284,0]Am[4743,13,4744,784,4328,284,0]An[4743,13,4744,4750,3565,284,0]An[4743,13,4744,4771,3584,284,0]An[5848,13,5849,4769,4340,284,0]An[5848,13,5849,4769,6772,284,0]An[5848,13,4754,4754,3597,284,0]Ae[1767,2,2416,0,0,0,0]Aj[1767,13,502,502,3118,0,0]Ai[1767,13,3614,0,3586,0,0]Ae[1767,2,1768,0,0,0,0]Ae[1767,2,4715,0,0,0,0]Ae[6989,2,6990,0,0,0,0]Al[6989,14,2927,2927,2459,0,0]Ae[5848,2,5849,0,0,0,0]Al[5848,14,2423,2423,4289,0,0]Ci[1767,13,1768,0,4327,3130,0,\"impl-Display-for-PublicKey\"]Cg[1767,13,1768,0,4327,2022,0,\"impl-Debug-for-PublicKey\"]Co[1767,13,1768,0,6757,3130,0,\"impl-Display-for-KeyParsingError\"]Cm[1767,13,1768,0,6757,2022,0,\"impl-Debug-for-KeyParsingError\"]Al[1767,13,1768,0,4345,2022,0]Al[1767,13,1768,0,3564,2022,0]Cf[1767,13,1768,0,3583,2022,0,\"impl-Debug-for-RelayUrl\"]Ch[1767,13,1768,0,3583,3130,0,\"impl-Display-for-RelayUrl\"]Db[1767,13,1768,0,7153,3130,0,\"impl-Display-for-RelayUrlParseError\"]D`[1767,13,1768,0,7153,2022,0,\"impl-Debug-for-RelayUrlParseError\"]Ch[1767,13,1768,0,3580,3130,0,\"impl-Display-for-RelayMap\"]Cf[1767,13,1768,0,3580,2022,0,\"impl-Debug-for-RelayMap\"]Ci[1767,13,1768,0,4339,3130,0,\"impl-Display-for-RelayNode\"]Cg[1767,13,1768,0,4339,2022,0,\"impl-Debug-for-RelayNode\"]Al[1767,13,3262,0,6640,2022,0]Al[1767,13,3262,0,7034,2022,0]Al[1767,13,3262,0,6367,2022,0]Ao[1767,13,3262,3262,6743,2022,0]Al[1767,13,4715,0,3567,2022,0]Cf[1767,13,4715,0,3596,2022,0,\"impl-Debug-for-UserData\"]Ch[1767,13,4715,0,3596,3130,0,\"impl-Display-for-UserData\"]Al[1767,13,4715,0,3572,2022,0]Ch[1767,13,4715,0,4954,2022,0,\"impl-Debug-for-ParseError\"]Cj[1767,13,4715,0,4954,3130,0,\"impl-Display-for-ParseError\"]Ao[1767,13,4715,4715,7022,2022,0]Dc[1767,13,4715,4715,7145,2022,0,\"impl-Debug-for-IntoDiscoveryError\"]De[1767,13,4715,4715,7145,3130,0,\"impl-Display-for-IntoDiscoveryError\"]Co[1767,13,4715,4715,6621,2022,0,\"impl-Debug-for-DiscoveryError\"]Da[1767,13,4715,4715,6621,3130,0,\"impl-Display-for-DiscoveryError\"]Ao[1767,13,4715,4715,6458,2022,0]Ao[1767,13,4715,4715,7195,2022,0]Am[1767,13,507,507,6354,2022,0]Am[1767,13,507,507,7200,2022,0]Ck[1767,13,2416,2416,4960,2022,0,\"impl-Debug-for-PkarrError\"]Cm[1767,13,2416,2416,4960,3130,0,\"impl-Display-for-PkarrError\"]Ao[1767,13,2416,2416,7274,2022,0]Ao[1767,13,2416,2416,6639,2022,0]Ao[1767,13,2416,2416,7242,2022,0]Ao[1767,13,2416,2416,6478,2022,0]Ao[1767,13,2416,2416,7036,2022,0]Am[1767,13,502,502,6352,2022,0]Am[1767,13,502,502,3118,2022,0]Ao[1767,13,1774,1774,6475,2022,0]Ao[1767,13,1774,1774,7241,2022,0]Ao[1767,13,1774,1774,6623,2022,0]Ao[1767,13,7007,7007,6651,2022,0]Ak[1767,13,506,0,6036,2022,0]Al[1767,13,3614,0,7244,2022,0]Da[1767,13,3614,0,7111,3130,0,\"impl-Display-for-SendDatagramError\"]Co[1767,13,3614,0,7111,2022,0,\"impl-Debug-for-SendDatagramError\"]Cj[1767,13,3614,0,4973,3130,0,\"impl-Display-for-RetryError\"]Ch[1767,13,3614,0,4973,2022,0,\"impl-Debug-for-RetryError\"]Al[1767,13,3614,0,4967,2022,0]Cl[1767,13,3614,0,6643,2022,0,\"impl-Debug-for-ReadToEndError\"]Cn[1767,13,3614,0,6643,3130,0,\"impl-Display-for-ReadToEndError\"]Ci[1767,13,3614,0,4332,3130,0,\"impl-Display-for-ReadError\"]Cg[1767,13,3614,0,4332,2022,0,\"impl-Debug-for-ReadError\"]Cj[1767,13,3614,0,4968,3130,0,\"impl-Display-for-ResetError\"]Ch[1767,13,3614,0,4968,2022,0,\"impl-Debug-for-ResetError\"]Cl[1767,13,3614,0,6642,2022,0,\"impl-Debug-for-ReadExactError\"]Cn[1767,13,3614,0,6642,3130,0,\"impl-Display-for-ReadExactError\"]Al[1767,13,3614,0,4975,2022,0]Ch[1767,13,3614,0,4984,2022,0,\"impl-Debug-for-WriteError\"]Cj[1767,13,3614,0,4984,3130,0,\"impl-Display-for-WriteError\"]Cj[1767,13,3614,0,6377,2022,0,\"impl-Debug-for-StoppedError\"]Cl[1767,13,3614,0,6377,3130,0,\"impl-Display-for-StoppedError\"]Al[1767,13,3614,0,6778,2022,0]Cf[1767,13,3614,0,2509,3130,0,\"impl-Display-for-VarInt\"]Cd[1767,13,3614,0,2509,2022,0,\"impl-Debug-for-VarInt\"]Al[1767,13,3614,0,2018,2022,0]Al[1767,13,3614,0,3593,2022,0]Al[1767,13,3614,0,4928,2022,0]Al[1767,13,3614,0,4322,2022,0]Al[1767,13,3614,0,6742,2022,0]Al[1767,13,3614,0,3174,2022,0]Ck[1767,13,3614,5864,4920,2022,0,\"impl-Debug-for-ControlMsg\"]Cm[1767,13,3614,5864,4920,3130,0,\"impl-Display-for-ControlMsg\"]Ao[1767,13,3614,5864,6618,2022,0]Co[1767,13,3614,5864,6617,2022,0,\"impl-Debug-for-ConnectionType\"]Da[1767,13,3614,5864,6617,3130,0,\"impl-Display-for-ConnectionType\"]Cl[1767,13,3614,0,6344,3130,0,\"impl-Display-for-ClosedStream\"]Cj[1767,13,3614,0,6344,2022,0,\"impl-Debug-for-ClosedStream\"]Ci[1767,13,3614,3733,2502,3130,0,\"impl-Display-for-Source\"]Cg[1767,13,3614,3733,2502,2022,0,\"impl-Debug-for-Source\"]Cm[1767,13,3614,0,6741,2022,0,\"impl-Debug-for-ConnectionError\"]Co[1767,13,3614,0,6741,3130,0,\"impl-Display-for-ConnectionError\"]Al[1767,13,3614,0,7134,2022,0]Al[1767,13,3614,0,7151,2022,0]Al[1767,13,3614,0,6372,2022,0]Al[1767,13,3614,0,7367,2022,0]Al[1767,13,3614,0,6032,2022,0]Al[1767,13,3614,0,7160,2022,0]Co[1767,13,3614,0,6737,3130,0,\"impl-Display-for-ConnectionClose\"]Cm[1767,13,3614,0,6737,2022,0,\"impl-Debug-for-ConnectionClose\"]Cn[1767,13,3614,0,7017,2022,0,\"impl-Debug-for-ApplicationClose\"]D`[1767,13,3614,0,7017,3130,0,\"impl-Display-for-ApplicationClose\"]Dc[1767,13,3614,4746,7016,3130,0,\"impl-Display-for-AddNodeAddrError\"]Da[1767,13,3614,4746,7016,2022,0,\"impl-Debug-for-AddNodeAddrError\"]Cl[1767,13,3614,0,6656,2022,0,\"impl-Debug-for-TransportError\"]Cn[1767,13,3614,0,6656,3130,0,\"impl-Display-for-TransportError\"]Db[1767,13,3614,0,7159,3130,0,\"impl-Display-for-TransportErrorCode\"]D`[1767,13,3614,0,7159,2022,0,\"impl-Debug-for-TransportErrorCode\"]Cf[1767,13,3614,0,3586,2022,0,\"impl-Debug-for-StreamId\"]Ch[1767,13,3614,0,3586,3130,0,\"impl-Display-for-StreamId\"]Ao[1767,13,3614,4746,4922,2022,0]Co[1767,13,3614,4746,6619,2022,0,\"impl-Debug-for-DirectAddrType\"]Da[1767,13,3614,4746,6619,3130,0,\"impl-Display-for-DirectAddrType\"]Ao[1767,13,3614,3614,6477,2022,0]Ao[1767,13,3614,3614,3117,2022,0]Ao[1767,13,3614,3614,3546,2022,0]De[1767,13,3614,3614,7227,2022,0,\"impl-Debug-for-ConnectWithOptsError\"]Dg[1767,13,3614,3614,7227,3130,0,\"impl-Display-for-ConnectWithOptsError\"]Co[1767,13,3614,3614,6348,3130,0,\"impl-Display-for-ConnectError\"]Cm[1767,13,3614,3614,6348,2022,0,\"impl-Debug-for-ConnectError\"]Cl[1767,13,3614,3614,4280,3130,0,\"impl-Display-for-BindError\"]Cj[1767,13,3614,3614,4280,2022,0,\"impl-Debug-for-BindError\"]Di[1767,13,3614,3614,7310,3130,0,\"impl-Display-for-GetMappingAddressError\"]Dg[1767,13,3614,3614,7310,2022,0,\"impl-Debug-for-GetMappingAddressError\"]Ao[1767,13,3614,3614,6611,2022,0]Ao[1767,13,3614,3614,2452,2022,0]Ao[1767,13,3614,3614,3551,2022,0]Ao[1767,13,3614,3614,6635,2022,0]Ao[1767,13,3614,3614,4911,2022,0]Cj[1767,13,3614,3614,4275,2022,0,\"impl-Debug-for-AlpnError\"]Cl[1767,13,3614,3614,4275,3130,0,\"impl-Display-for-AlpnError\"]Ao[1767,13,3614,3614,6783,2022,0]Ao[1767,13,3614,3614,4918,2022,0]Dd[1767,13,3614,3614,7110,3130,0,\"impl-Display-for-RemoteNodeIdError\"]Db[1767,13,3614,3614,7110,2022,0,\"impl-Debug-for-RemoteNodeIdError\"]Ao[1767,13,3614,3614,4338,2022,0]Ao[1767,13,5860,3263,3140,2022,0]Ch[1767,13,5860,2955,2050,3130,0,\"impl-Display-for-Probe\"]Cf[1767,13,5860,2955,2050,2022,0,\"impl-Debug-for-Probe\"]Cg[1767,13,5860,2969,2492,2022,0,\"impl-Debug-for-Report\"]Ci[1767,13,5860,2969,2492,3130,0,\"impl-Display-for-Report\"]Ao[1767,13,5860,2969,6644,2022,0]Ao[1767,13,5860,4778,4963,2022,0]An[1767,13,5860,782,3146,2022,0]Ao[1767,13,3736,3736,2497,2022,0]Ao[1767,13,3736,3736,6482,2022,0]Cl[1767,13,3736,3736,6025,2022,0,\"impl-Debug-for-AcceptError\"]Cn[1767,13,3736,3736,6025,3130,0,\"impl-Display-for-AcceptError\"]Ao[1767,13,3736,3736,6026,2022,0]Ck[1767,13,4753,0,6461,2022,0,\"impl-Debug-for-EncodingError\"]Cm[1767,13,4753,0,6461,3130,0,\"impl-Display-for-EncodingError\"]Cm[1767,13,4753,0,6455,3130,0,\"impl-Display-for-DecodingError\"]Ck[1767,13,4753,0,6455,2022,0,\"impl-Debug-for-DecodingError\"]Dd[1767,13,4753,0,7311,2022,0,\"impl-Debug-for-MaxLengthExceededError\"]Df[1767,13,4753,0,7311,3130,0,\"impl-Display-for-MaxLengthExceededError\"]Ao[1767,13,6018,6018,7018,2022,0]Ao[1767,13,6018,7285,6626,2022,0]Cj[4743,13,4744,0,4351,3594,0,\"impl-UpperHex-for-Signature\"]Cg[4743,13,4744,0,4351,2022,0,\"impl-Debug-for-Signature\"]Ci[4743,13,4744,0,4351,3130,0,\"impl-Display-for-Signature\"]Cj[4743,13,4744,0,4351,3558,0,\"impl-LowerHex-for-Signature\"]Ck[4743,13,4744,784,4328,3130,0,\"impl-Display-for-PublicKey\"]Ci[4743,13,4744,784,4328,2022,0,\"impl-Debug-for-PublicKey\"]Co[4743,13,4744,784,6758,2022,0,\"impl-Debug-for-KeyParsingError\"]Da[4743,13,4744,784,6758,3130,0,\"impl-Display-for-KeyParsingError\"]An[4743,13,4744,784,4346,2022,0]Ao[4743,13,4744,4750,3565,2022,0]Ci[4743,13,4744,4771,3584,2022,0,\"impl-Debug-for-RelayUrl\"]Ck[4743,13,4744,4771,3584,3130,0,\"impl-Display-for-RelayUrl\"]De[4743,13,4744,4771,7154,3130,0,\"impl-Display-for-RelayUrlParseError\"]Dc[4743,13,4744,4771,7154,2022,0,\"impl-Debug-for-RelayUrlParseError\"]Ck[4743,13,3100,1786,4943,2022,0,\"impl-Debug-for-NodeTicket\"]Cm[4743,13,3100,1786,4943,3130,0,\"impl-Display-for-NodeTicket\"]Ck[4743,13,3100,3100,4955,2022,0,\"impl-Debug-for-ParseError\"]Cm[4743,13,3100,3100,4955,3130,0,\"impl-Display-for-ParseError\"]Ao[5847,13,5848,5848,3529,2022,0]An[5847,13,5848,5848,282,2022,0]Ao[5847,13,2440,2440,2065,2022,0]Ao[5847,13,2440,2440,6073,2022,0]Ao[5847,13,2440,2440,6654,2022,0]Al[5847,13,821,821,283,2022,0]Ao[6989,13,6990,2446,4363,2022,0]Ao[6989,13,2927,2927,2459,2022,0]Ao[6989,13,2927,2927,6068,2022,0]Ao[6989,13,2927,2927,6476,2022,0]Ao[6989,13,2927,2927,6637,2022,0]Ao[6989,13,2927,2927,6735,2022,0]Am[6989,13,509,509,4295,2022,0]Am[6989,13,509,509,4925,2022,0]Am[6989,13,509,509,2469,2022,0]Ao[6989,13,1389,6520,6771,2022,0]Cj[6989,13,1389,825,3528,3130,0,\"impl-Display-for-CertMode\"]Ch[6989,13,1389,825,3528,2022,0,\"impl-Debug-for-CertMode\"]Ao[6989,13,1389,1389,4930,2022,0]Ao[6989,13,1389,1389,6048,2022,0]Ao[6989,13,3265,3265,3141,2022,0]Ao[5848,13,5849,6425,6062,2022,0]Ci[5848,13,5849,4769,3581,2022,0,\"impl-Debug-for-RelayMap\"]Ck[5848,13,5849,4769,3581,3130,0,\"impl-Display-for-RelayMap\"]Cj[5848,13,5849,4769,4340,2022,0,\"impl-Debug-for-RelayNode\"]Cl[5848,13,5849,4769,4340,3130,0,\"impl-Display-for-RelayNode\"]Ao[5848,13,5849,4769,6772,2022,0]Ck[5848,13,2729,901,4348,3130,0,\"impl-Display-for-SendError\"]Ci[5848,13,2729,901,4348,2022,0,\"impl-Debug-for-SendError\"]Ci[5848,13,2729,901,4336,2022,0,\"impl-Debug-for-RecvError\"]Ck[5848,13,2729,901,4336,3130,0,\"impl-Display-for-RecvError\"]Co[5848,13,2729,2729,6349,3130,0,\"impl-Display-for-ConnectError\"]Cm[5848,13,2729,2729,6349,2022,0,\"impl-Debug-for-ConnectError\"]Cl[5848,13,2729,2729,4291,3130,0,\"impl-Display-for-DialError\"]Cj[5848,13,2729,2729,4291,2022,0,\"impl-Debug-for-DialError\"]Ao[5848,13,2729,2729,6447,2022,0]Ao[5848,13,2729,2729,2457,2022,0]Ao[5848,13,2729,2729,4909,2022,0]Ao[5848,13,2729,2729,6341,2022,0]Ao[5848,13,2972,3264,3143,2022,0]Ao[5848,13,2972,3264,6368,2022,0]Ao[5848,13,2972,3738,7109,2022,0]Ao[5848,13,2972,2972,6373,2022,0]Ao[5848,13,2972,2972,6063,2022,0]Ao[5848,13,2972,2972,6338,2022,0]Ao[5848,13,2972,2972,2453,2022,0]Ao[5848,13,2972,2972,4964,2022,0]Ao[5848,13,2972,2972,4353,2022,0]Ao[5848,13,2972,2972,2477,2022,0]Ao[5848,13,2972,2972,6736,2022,0]Ao[5848,13,2972,2972,4907,2022,0]Ao[5848,13,2972,2972,2499,2022,0]Cm[5848,13,2972,2972,4980,3130,0,\"impl-Display-for-SpawnError\"]Ck[5848,13,2972,2972,4980,2022,0,\"impl-Debug-for-SpawnError\"]Db[5848,13,2972,2972,6776,3130,0,\"impl-Display-for-SupervisorError\"]D`[5848,13,2972,2972,6776,2022,0,\"impl-Debug-for-SupervisorError\"]Ao[5848,13,2735,2735,4298,2022,0]Da[5848,13,2735,2735,6632,3130,0,\"impl-Display-for-FrameTypeError\"]Co[5848,13,2735,2735,6632,2022,0,\"impl-Debug-for-FrameTypeError\"]Ch[5848,13,2423,2423,2044,3130,0,\"impl-Display-for-Error\"]Cf[5848,13,2423,2423,2044,2022,0,\"impl-Debug-for-Error\"]Ao[5848,13,2423,2423,7039,2022,0]Ao[5848,13,2423,2423,7020,2022,0]Ao[5848,13,2423,2423,4289,2022,0]Cf[5848,13,4736,4736,2043,2022,0,\"impl-Debug-for-Error\"]Ch[5848,13,4736,4736,2043,3130,0,\"impl-Display-for-Error\"]Cf[5848,13,1805,1805,2042,2022,0,\"impl-Debug-for-Error\"]Ch[5848,13,1805,1805,2042,3130,0,\"impl-Display-for-Error\"]Ao[5848,13,1805,1805,4962,2022,0]Ci[5848,13,508,508,3537,3130,0,\"impl-Display-for-DnsError\"]Cg[5848,13,508,508,3537,2022,0,\"impl-Debug-for-DnsError\"]Cj[5848,13,508,508,6055,2022,0,\"impl-Debug-for-LookupError\"]Cl[5848,13,508,508,6055,3130,0,\"impl-Display-for-LookupError\"]Df[5848,13,508,508,6650,3130,0,\"impl-Display-for-StaggeredError%3CE%3E\"]Dd[5848,13,508,508,6650,2022,0,\"impl-Debug-for-StaggeredError%3CE%3E\"]Am[5848,13,508,508,3119,2022,0]Am[5848,13,508,508,6035,2022,0]Am[5848,13,508,508,6037,2022,0]Cn[5848,13,508,508,6485,3130,0,\"impl-Display-for-TxtRecordData\"]Cl[5848,13,508,508,6485,2022,0,\"impl-Debug-for-TxtRecordData\"]D`[5848,13,4754,4754,6462,3130,0,\"impl-Display-for-EncodingError\"]Cn[5848,13,4754,4754,6462,2022,0,\"impl-Debug-for-EncodingError\"]D`[5848,13,4754,4754,6457,3130,0,\"impl-Display-for-DecodingError\"]Cn[5848,13,4754,4754,6457,2022,0,\"impl-Debug-for-DecodingError\"]Ao[5848,13,4754,4754,3568,2022,0]Ck[5848,13,4754,4754,3597,3130,0,\"impl-Display-for-UserData\"]Ci[5848,13,4754,4754,3597,2022,0,\"impl-Debug-for-UserData\"]Dg[5848,13,4754,4754,7312,2022,0,\"impl-Debug-for-MaxLengthExceededError\"]Di[5848,13,4754,4754,7312,3130,0,\"impl-Display-for-MaxLengthExceededError\"]Ao[5848,13,4754,4754,3573,2022,0]Ck[5848,13,4754,4754,4957,2022,0,\"impl-Debug-for-ParseError\"]Cm[5848,13,4754,4754,4957,3130,0,\"impl-Display-for-ParseError\"]Ai[1767,12,1768,0,3173,0,0]Ai[5848,14,2037,0,6780,0,0]Ai[1767,14,3614,0,3593,0,0]Ai[1767,14,4949,0,6604,0,0]0Ai[5848,14,4952,0,6605,0,0]Ai[1767,13,1768,0,3580,0,0]Al[1767,13,4715,4715,7195,0,0]Ai[1767,14,6450,0,6470,0,0]Al[5848,13,5849,4769,3581,0,0]Ai[5848,14,6451,0,6471,0,0]Ai[1767,13,1768,0,3173,0,0]Ai[1767,13,1768,0,3564,0,0]Ai[1767,13,4715,0,3567,0,0]Ai[1767,13,4715,0,3572,0,0]Al[1767,13,4715,4715,6458,0,0]Al[1767,13,2416,2416,7036,0,0]Al[1767,13,7007,7007,6651,0,0]Ah[1767,13,506,0,6036,0,0]Ai[1767,13,3614,0,6372,0,0]Ai[1767,13,3614,0,3586,0,0]Al[1767,13,3614,3614,6611,0,0]Al[1767,13,3736,3736,6482,0,0]Al[1767,13,3736,3736,6026,0,0]Al[4743,13,4744,4750,3565,0,0]Al[4743,13,3100,1786,4943,0,0]Al[5847,13,2440,2440,6654,0,0]Al[6989,13,6990,2446,4363,0,0]Aj[6989,13,509,509,4925,0,0]Al[5848,13,5849,6425,6062,0,0]Al[5848,13,2729,2729,6447,0,0]Al[5848,13,1805,1805,4962,0,0]Aj[5848,13,508,508,6037,0,0]Al[5848,13,4754,4754,3568,0,0]Al[5848,13,4754,4754,3573,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[1767,14,3614,0,4322,0,0]Al[1767,13,6018,7285,6626,0,0]Ae[5847,2,5848,0,0,0,0]Ai[5848,14,6627,0,7050,0,0]Al[5848,14,2972,2972,6063,0,0]Al[1767,13,2416,2416,7274,0,0]Aj[1767,13,502,502,3118,0,0]Al[1767,14,3614,4746,4922,0,0]Al[5848,13,2423,2423,7039,0,0]Ai[1767,14,1768,0,4339,0,0]Ai[1767,14,4959,0,6745,0,0]Al[5848,14,5849,4769,4340,0,0]Ai[5848,14,6346,0,7201,0,0]Ai[5848,14,6346,0,6746,0,0]Ai[5848,14,4290,0,4933,0,0]Af[5847,18,1767,0,0,0,0]Af[5847,18,2420,0,0,0,0]Al[5848,15,2972,2972,2453,0,0]Al[5848,15,2729,2729,6349,0,0]Al[5847,15,5848,5848,7023,0,0]Al[5847,15,5848,5848,7137,0,0]Al[5847,15,5848,5848,3529,0,0]Al[4743,19,3100,3100,2506,0,0]Al[4743,15,3100,3100,4955,0,0]Af[1767,18,1774,0,0,0,0]Al[1767,15,3614,5864,6617,0,0]Al[1767,15,3614,5864,4920,0,0]Al[5848,15,2735,2735,4298,0,0]Al[5848,15,2423,2423,7039,0,0]Al[5848,15,2423,2423,7020,0,0]3210Ai[1767,15,3614,0,6643,0,0]Al[1767,15,4715,4715,7145,0,0]Al[1767,15,4715,4715,6621,0,0]Al[1767,15,3736,3736,6025,0,0]Ai[1767,15,4715,0,4954,0,0]0Al[5848,15,4754,4754,4957,0,0]Ai[1767,14,3614,0,4928,0,0]Al[1767,14,3614,5864,6618,0,0]Al[1767,14,3614,4746,4922,0,0]Ai[5848,14,4979,0,6731,0,0]Al[1767,13,3614,3614,4911,0,0]Al[1767,13,3614,3614,4918,0,0]Al[1767,13,3614,3614,3117,0,0]Aa[896,3,0,0,0,0,0]Al[5848,14,2972,2972,4353,0,0]Ai[1767,14,3614,0,6656,0,0]Ai[5848,14,6346,0,7340,0,0]Ai[1767,14,3614,0,4322,0,0]Ai[1767,14,4715,0,3572,0,0]0Al[5848,14,4754,4754,3573,0,0]Al[1767,13,1768,0,4327,4323,0]Al[1767,13,1768,0,6757,4323,0]Al[1767,13,1768,0,4345,4323,0]Al[1767,13,1768,0,3564,4323,0]Al[1767,13,1768,0,3583,4323,0]Al[1767,13,1768,0,7153,4323,0]Al[1767,13,1768,0,3580,4323,0]Al[1767,13,1768,0,4339,4323,0]Al[1767,13,3262,0,6640,4323,0]Al[1767,13,3262,0,7034,4323,0]Al[1767,13,3262,0,6367,4323,0]Ao[1767,13,3262,3262,6743,4323,0]Al[1767,13,4715,0,3567,4323,0]Al[1767,13,4715,0,3596,4323,0]Al[1767,13,4715,0,3572,4323,0]Al[1767,13,4715,0,4954,4323,0]Ao[1767,13,4715,4715,7022,4323,0]Ao[1767,13,4715,4715,7145,4323,0]Ao[1767,13,4715,4715,6621,4323,0]Ao[1767,13,4715,4715,6458,4323,0]Ao[1767,13,4715,4715,7195,4323,0]Am[1767,13,507,507,6354,4323,0]Am[1767,13,507,507,7200,4323,0]Ao[1767,13,2416,2416,4960,4323,0]Ao[1767,13,2416,2416,7274,4323,0]Ao[1767,13,2416,2416,6639,4323,0]Ao[1767,13,2416,2416,7242,4323,0]Ao[1767,13,2416,2416,6478,4323,0]Ao[1767,13,2416,2416,7036,4323,0]Am[1767,13,502,502,6352,4323,0]Am[1767,13,502,502,3118,4323,0]Ao[1767,13,1774,1774,6475,4323,0]Ao[1767,13,1774,1774,7241,4323,0]Ao[1767,13,1774,1774,6623,4323,0]Ao[1767,13,7007,7007,6651,4323,0]Ak[1767,13,506,0,6036,4323,0]Al[1767,13,3614,0,3145,4323,0]Al[1767,13,3614,0,2487,4323,0]Al[1767,13,3614,0,4272,4323,0]Al[1767,13,3614,0,3525,4323,0]Al[1767,13,3614,0,6366,4323,0]Al[1767,13,3614,0,7244,4323,0]Al[1767,13,3614,0,7111,4323,0]Al[1767,13,3614,0,4973,4323,0]Al[1767,13,3614,0,4967,4323,0]Ak[1767,13,3614,0,4967,846,0]Al[1767,13,3614,0,6643,4323,0]Al[1767,13,3614,0,4332,4323,0]Al[1767,13,3614,0,4968,4323,0]Al[1767,13,3614,0,6642,4323,0]Ak[1767,13,3614,0,4975,846,0]Al[1767,13,3614,0,4975,4323,0]Al[1767,13,3614,0,4984,4323,0]Al[1767,13,3614,0,6377,4323,0]Al[1767,13,3614,0,6778,4323,0]Al[1767,13,3614,0,2509,4323,0]Al[1767,13,3614,0,2018,4323,0]Al[1767,13,3614,0,3593,4323,0]Al[1767,13,3614,0,4928,4323,0]Al[1767,13,3614,0,4322,4323,0]Al[1767,13,3614,0,6742,4323,0]Al[1767,13,3614,0,3174,4323,0]Ao[1767,13,3614,5864,4920,4323,0]Ao[1767,13,3614,5864,6618,4323,0]Ao[1767,13,3614,5864,6617,4323,0]Al[1767,13,3614,0,6344,4323,0]Ao[1767,13,3614,3733,2502,4323,0]Al[1767,13,3614,0,6741,4323,0]Al[1767,13,3614,0,7134,4323,0]Al[1767,13,3614,0,7151,4323,0]Al[1767,13,3614,0,6372,4323,0]Al[1767,13,3614,0,7367,4323,0]Al[1767,13,3614,0,6032,4323,0]Al[1767,13,3614,0,7160,4323,0]Al[1767,13,3614,0,6737,4323,0]Al[1767,13,3614,0,7017,4323,0]Ao[1767,13,3614,4746,7016,4323,0]Al[1767,13,3614,0,6656,4323,0]Al[1767,13,3614,0,7159,4323,0]Al[1767,13,3614,0,3586,4323,0]Ao[1767,13,3614,4746,4922,4323,0]Ao[1767,13,3614,4746,6619,4323,0]Ao[1767,13,3614,3614,6477,4323,0]Ao[1767,13,3614,3614,3117,4323,0]Ao[1767,13,3614,3614,3546,4323,0]Ao[1767,13,3614,3614,7227,4323,0]Ao[1767,13,3614,3614,6348,4323,0]Ao[1767,13,3614,3614,4280,4323,0]Ao[1767,13,3614,3614,7310,4323,0]Ao[1767,13,3614,3614,6611,4323,0]Ao[1767,13,3614,3614,2452,4323,0]Ao[1767,13,3614,3614,3551,4323,0]Ao[1767,13,3614,3614,6635,4323,0]Ao[1767,13,3614,3614,4911,4323,0]Ao[1767,13,3614,3614,4275,4323,0]Ao[1767,13,3614,3614,6783,4323,0]Ao[1767,13,3614,3614,4918,4323,0]Ao[1767,13,3614,3614,7110,4323,0]Ao[1767,13,3614,3614,4338,4323,0]Ao[1767,13,5860,3263,3140,4323,0]Ao[1767,13,5860,2955,2050,4323,0]Ao[1767,13,5860,2969,2492,4323,0]Ao[1767,13,5860,2969,6644,4323,0]Ao[1767,13,5860,4778,4963,4323,0]An[1767,13,5860,782,3146,4323,0]Ao[1767,13,3736,3736,2497,4323,0]Ao[1767,13,3736,3736,6482,4323,0]Ao[1767,13,3736,3736,6025,4323,0]Ao[1767,13,3736,3736,6026,4323,0]Al[1767,13,4753,0,6461,4323,0]Al[1767,13,4753,0,6455,4323,0]Al[1767,13,4753,0,7311,4323,0]Ao[1767,13,6018,6018,7018,4323,0]Ao[1767,13,6018,7285,6626,4323,0]Ao[5847,13,5848,5848,7023,4323,0]Ao[5847,13,5848,5848,7137,4323,0]Ao[5847,13,5848,5848,3529,4323,0]An[5847,13,5848,5848,282,4323,0]Ao[5847,13,5848,5848,6031,4323,0]Ao[5847,13,2440,2440,2065,4323,0]Ao[5847,13,2440,2440,6073,4323,0]Ao[5847,13,2440,2440,6654,4323,0]Al[5847,13,821,821,283,4323,0]Ao[5848,13,5849,6425,6062,4323,0]Ao[5848,13,5849,4769,3581,4323,0]Ao[5848,13,5849,4769,4340,4323,0]Ao[5848,13,5849,4769,6772,4323,0]An[5848,13,2729,901,4348,4323,0]An[5848,13,2729,901,4336,4323,0]Ao[5848,13,2729,2729,6349,4323,0]Ao[5848,13,2729,2729,4291,4323,0]Ao[5848,13,2729,2729,6447,4323,0]Ao[5848,13,2729,2729,2457,4323,0]Ao[5848,13,2729,2729,4909,4323,0]Ao[5848,13,2729,2729,6341,4323,0]Ao[5848,13,2972,3264,3143,4323,0]Ao[5848,13,2972,3264,6368,4323,0]Ao[5848,13,2972,3738,7109,4323,0]Ao[5848,13,2972,2972,6373,4323,0]Ao[5848,13,2972,2972,6063,4323,0]Ao[5848,13,2972,2972,6338,4323,0]Ao[5848,13,2972,2972,2453,4323,0]Ao[5848,13,2972,2972,4964,4323,0]Ao[5848,13,2972,2972,4353,4323,0]Ao[5848,13,2972,2972,2477,4323,0]Ao[5848,13,2972,2972,6736,4323,0]Ao[5848,13,2972,2972,4907,4323,0]Ao[5848,13,2972,2972,2499,4323,0]Ao[5848,13,2972,2972,4980,4323,0]Ao[5848,13,2972,2972,6776,4323,0]Ao[5848,13,2735,2735,4298,4323,0]Ao[5848,13,2735,2735,6632,4323,0]Ao[5848,13,2423,2423,2044,4323,0]Ao[5848,13,2423,2423,7039,4323,0]Ao[5848,13,2423,2423,7020,4323,0]Ao[5848,13,2423,2423,4289,4323,0]Ao[5848,13,4736,4736,2043,4323,0]Ao[5848,13,1805,1805,2042,4323,0]Ao[5848,13,1805,1805,4962,4323,0]Am[5848,13,508,508,3537,4323,0]Am[5848,13,508,508,6055,4323,0]Am[5848,13,508,508,6650,4323,0]Am[5848,13,508,508,3119,4323,0]Am[5848,13,508,508,6035,4323,0]Am[5848,13,508,508,6037,4323,0]Am[5848,13,508,508,6485,4323,0]Ao[5848,13,4754,4754,6462,4323,0]Ao[5848,13,4754,4754,6457,4323,0]Ao[5848,13,4754,4754,3568,4323,0]Ao[5848,13,4754,4754,3597,4323,0]Ao[5848,13,4754,4754,7312,4323,0]Ao[5848,13,4754,4754,3573,4323,0]Ao[5848,13,4754,4754,4957,4323,0]Ak[1767,13,1768,0,4327,847,0]0Dl[1767,13,1768,0,6757,847,0,\"impl-From%3CDecodeError%3E-for-KeyParsingError\"]Ak[1767,13,1768,0,6757,847,0]Df[1767,13,1768,0,6757,847,0,\"impl-From%3CError%3E-for-KeyParsingError\"]Ak[1767,13,1768,0,4345,847,0]Dg[1767,13,1768,0,4345,847,0,\"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey\"]De[1767,13,1768,0,4345,847,0,\"impl-From%3CSigningKey%3E-for-SecretKey\"]G`[1767,13,1768,0,3564,847,0,\"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr\"]Dd[1767,13,1768,0,3564,847,0,\"impl-From%3CNodeTicket%3E-for-NodeAddr\"]Db[1767,13,1768,0,3564,847,0,\"impl-From%3CNodeInfo%3E-for-NodeAddr\"]Dc[1767,13,1768,0,3564,847,0,\"impl-From%3CPublicKey%3E-for-NodeAddr\"]Ak[1767,13,1768,0,3564,847,0]Ak[1767,13,1768,0,3583,847,0]0Ak[1767,13,1768,0,7153,847,0]Ak[1767,13,1768,0,3580,847,0]Dc[1767,13,1768,0,3580,847,0,\"impl-From%3CRelayNode%3E-for-RelayMap\"]Db[1767,13,1768,0,3580,847,0,\"impl-From%3CRelayUrl%3E-for-RelayMap\"]Ak[1767,13,1768,0,4339,847,0]0Ak[1767,13,3262,0,6640,847,0]Ak[1767,13,3262,0,7034,847,0]Ak[1767,13,3262,0,6367,847,0]An[1767,13,3262,3262,6743,847,0]Ak[1767,13,4715,0,3567,847,0]0Ak[1767,13,4715,0,3596,847,0]E`[1767,13,4715,0,3572,847,0,\"impl-From%3CTxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo\"]Ec[1767,13,4715,0,3572,847,0,\"impl-From%3C%26TxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo\"]Dg[1767,13,4715,0,3572,847,0,\"impl-From%3CDiscoveryItem%3E-for-NodeInfo\"]Ak[1767,13,4715,0,3572,847,0]Db[1767,13,4715,0,3572,847,0,\"impl-From%3CNodeAddr%3E-for-NodeInfo\"]Ak[1767,13,4715,0,4954,847,0]0An[1767,13,4715,4715,7022,847,0]An[1767,13,4715,4715,7145,847,0]An[1767,13,4715,4715,6621,847,0]0An[1767,13,4715,4715,6458,847,0]An[1767,13,4715,4715,7195,847,0]0Al[1767,13,507,507,6354,847,0]Al[1767,13,507,507,7200,847,0]An[1767,13,2416,2416,4960,847,0]An[1767,13,2416,2416,7274,847,0]An[1767,13,2416,2416,6639,847,0]An[1767,13,2416,2416,7242,847,0]An[1767,13,2416,2416,6478,847,0]An[1767,13,2416,2416,7036,847,0]Al[1767,13,502,502,6352,847,0]Al[1767,13,502,502,3118,847,0]An[1767,13,1774,1774,6475,847,0]An[1767,13,1774,1774,7241,847,0]An[1767,13,1774,1774,6623,847,0]An[1767,13,7007,7007,6651,847,0]Aj[1767,13,506,0,6036,847,0]Ak[1767,13,3614,0,3145,847,0]Ak[1767,13,3614,0,2487,847,0]Ak[1767,13,3614,0,4272,847,0]Ak[1767,13,3614,0,3525,847,0]Ak[1767,13,3614,0,6366,847,0]Ak[1767,13,3614,0,7244,847,0]Ak[1767,13,3614,0,7111,847,0]0Ak[1767,13,3614,0,4973,847,0]Ak[1767,13,3614,0,4967,847,0]Ak[1767,13,3614,0,6643,847,0]0De[1767,13,3614,0,4332,847,0,\"impl-From%3CResetError%3E-for-ReadError\"]Ak[1767,13,3614,0,4332,847,0]Dj[1767,13,3614,0,4332,847,0,\"impl-From%3CConnectionError%3E-for-ReadError\"]Dh[1767,13,3614,0,4332,847,0,\"impl-From%3CReadableError%3E-for-ReadError\"]Ak[1767,13,3614,0,4968,847,0]0Ak[1767,13,3614,0,6642,847,0]0Ak[1767,13,3614,0,4975,847,0]Ak[1767,13,3614,0,4984,847,0]Dh[1767,13,3614,0,4984,847,0,\"impl-From%3CStoppedError%3E-for-WriteError\"]Dh[1767,13,3614,0,4984,847,0,\"impl-From%3CClosedStream%3E-for-WriteError\"]Dk[1767,13,3614,0,4984,847,0,\"impl-From%3CConnectionError%3E-for-WriteError\"]Ak[1767,13,3614,0,6377,847,0]0Ak[1767,13,3614,0,6778,847,0]Da[1767,13,3614,0,2509,847,0,\"impl-From%3CFrameType%3E-for-VarInt\"]D`[1767,13,3614,0,2509,847,0,\"impl-From%3CStreamId%3E-for-VarInt\"]Ck[1767,13,3614,0,2509,847,0,\"impl-From%3Cu16%3E-for-VarInt\"]Cj[1767,13,3614,0,2509,847,0,\"impl-From%3Cu8%3E-for-VarInt\"]Ak[1767,13,3614,0,2509,847,0]Ck[1767,13,3614,0,2509,847,0,\"impl-From%3Cu32%3E-for-VarInt\"]Ak[1767,13,3614,0,2018,847,0]Ak[1767,13,3614,0,3593,847,0]Ak[1767,13,3614,0,4928,847,0]Ak[1767,13,3614,0,4322,847,0]Ak[1767,13,3614,0,6742,847,0]Ak[1767,13,3614,0,3174,847,0]An[1767,13,3614,5864,4920,847,0]An[1767,13,3614,5864,6618,847,0]An[1767,13,3614,5864,6617,847,0]Ak[1767,13,3614,0,6344,847,0]An[1767,13,3614,3733,2502,847,0]Df[1767,13,3614,0,6741,847,0,\"impl-From%3CClose%3E-for-ConnectionError\"]Do[1767,13,3614,0,6741,847,0,\"impl-From%3CTransportError%3E-for-ConnectionError\"]Ak[1767,13,3614,0,6741,847,0]Ak[1767,13,3614,0,7134,847,0]Ak[1767,13,3614,0,7151,847,0]Ak[1767,13,3614,0,6372,847,0]Ak[1767,13,3614,0,7367,847,0]Ak[1767,13,3614,0,6032,847,0]0Ak[1767,13,3614,0,7160,847,0]Ak[1767,13,3614,0,6737,847,0]0Ak[1767,13,3614,0,7017,847,0]An[1767,13,3614,4746,7016,847,0]De[1767,13,3614,0,6656,847,0,\"impl-From%3CError%3E-for-TransportError\"]Ak[1767,13,3614,0,6656,847,0]Eb[1767,13,3614,0,6656,847,0,\"impl-From%3CTransportErrorCode%3E-for-TransportError\"]Dl[1767,13,3614,0,6656,847,0,\"impl-From%3CInvalidFrame%3E-for-TransportError\"]Ak[1767,13,3614,0,7159,847,0]Ak[1767,13,3614,0,3586,847,0]0An[1767,13,3614,4746,4922,847,0]An[1767,13,3614,4746,6619,847,0]An[1767,13,3614,3614,6477,847,0]An[1767,13,3614,3614,3117,847,0]An[1767,13,3614,3614,3546,847,0]An[1767,13,3614,3614,7227,847,0]0Ee[1767,13,3614,3614,6348,847,0,\"impl-From%3CConnectWithOptsError%3E-for-ConnectError\"]E`[1767,13,3614,3614,6348,847,0,\"impl-From%3CConnectionError%3E-for-ConnectError\"]An[1767,13,3614,3614,6348,847,0]An[1767,13,3614,3614,4280,847,0]An[1767,13,3614,3614,7310,847,0]An[1767,13,3614,3614,6611,847,0]An[1767,13,3614,3614,2452,847,0]An[1767,13,3614,3614,3551,847,0]An[1767,13,3614,3614,6635,847,0]An[1767,13,3614,3614,4911,847,0]An[1767,13,3614,3614,4275,847,0]0An[1767,13,3614,3614,6783,847,0]An[1767,13,3614,3614,4918,847,0]An[1767,13,3614,3614,7110,847,0]An[1767,13,3614,3614,4338,847,0]An[1767,13,5860,3263,3140,847,0]An[1767,13,5860,2955,2050,847,0]An[1767,13,5860,2969,2492,847,0]An[1767,13,5860,2969,6644,847,0]An[1767,13,5860,4778,4963,847,0]Am[1767,13,5860,782,3146,847,0]An[1767,13,3736,3736,2497,847,0]An[1767,13,3736,3736,6482,847,0]Fd[1767,13,3736,3736,6025,847,0,\"impl-From%3CBox%3Cdyn+Error+%2B+Send+%2B+Sync%3E%3E-for-AcceptError\"]Do[1767,13,3736,3736,6025,847,0,\"impl-From%3CConnectionError%3E-for-AcceptError\"]An[1767,13,3736,3736,6025,847,0]De[1767,13,3736,3736,6025,847,0,\"impl-From%3CError%3E-for-AcceptError\"]Ea[1767,13,3736,3736,6025,847,0,\"impl-From%3CRemoteNodeIdError%3E-for-AcceptError\"]Dl[1767,13,3736,3736,6025,847,0,\"impl-From%3CClosedStream%3E-for-AcceptError\"]An[1767,13,3736,3736,6026,847,0]Ak[1767,13,4753,0,6461,847,0]0Ak[1767,13,4753,0,6455,847,0]Ak[1767,13,4753,0,7311,847,0]An[1767,13,6018,6018,7018,847,0]An[1767,13,6018,7285,6626,847,0]Ge[4743,13,4744,0,4351,847,0,\"impl-From%3C%26%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature\"]Gb[4743,13,4744,0,4351,847,0,\"impl-From%3C%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature\"]Dl[4743,13,4744,0,4351,847,0,\"impl-From%3CInternalSignature%3E-for-Signature\"]Ak[4743,13,4744,0,4351,847,0]Am[4743,13,4744,784,4328,847,0]0Am[4743,13,4744,784,6758,847,0]Dh[4743,13,4744,784,6758,847,0,\"impl-From%3CError%3E-for-KeyParsingError\"]Dn[4743,13,4744,784,6758,847,0,\"impl-From%3CDecodeError%3E-for-KeyParsingError\"]Di[4743,13,4744,784,4346,847,0,\"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey\"]Am[4743,13,4744,784,4346,847,0]Dg[4743,13,4744,784,4346,847,0,\"impl-From%3CSigningKey%3E-for-SecretKey\"]Gc[4743,13,4744,4750,3565,847,0,\"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr\"]Dg[4743,13,4744,4750,3565,847,0,\"impl-From%3CNodeTicket%3E-for-NodeAddr\"]Df[4743,13,4744,4750,3565,847,0,\"impl-From%3CPublicKey%3E-for-NodeAddr\"]An[4743,13,4744,4750,3565,847,0]An[4743,13,4744,4771,3584,847,0]0An[4743,13,4744,4771,7154,847,0]An[4743,13,3100,1786,4943,847,0]0An[4743,13,3100,3100,4955,847,0]Dj[4743,13,3100,3100,4955,847,0,\"impl-From%3CDecodeError%3E-for-ParseError\"]Dd[4743,13,3100,3100,4955,847,0,\"impl-From%3CError%3E-for-ParseError\"]An[5847,13,5848,5848,7023,847,0]An[5847,13,5848,5848,7137,847,0]An[5847,13,5848,5848,3529,847,0]Am[5847,13,5848,5848,282,847,0]An[5847,13,5848,5848,6031,847,0]An[5847,13,2440,2440,2065,847,0]An[5847,13,2440,2440,6073,847,0]An[5847,13,2440,2440,6654,847,0]Ak[5847,13,821,821,283,847,0]An[6989,13,6990,2446,4363,847,0]An[6989,13,2437,2437,3526,847,0]An[6989,13,2927,2927,2459,847,0]An[6989,13,2927,2927,6068,847,0]An[6989,13,2927,2927,6476,847,0]An[6989,13,2927,2927,6637,847,0]An[6989,13,2927,2927,6735,847,0]Al[6989,13,509,509,4296,847,0]Al[6989,13,509,509,4295,847,0]Al[6989,13,509,509,4925,847,0]Al[6989,13,509,509,2469,847,0]An[6989,13,1389,1389,4931,847,0]An[6989,13,1389,6520,6771,847,0]Am[6989,13,1389,825,3528,847,0]An[6989,13,1389,1389,4930,847,0]An[6989,13,1389,1389,6048,847,0]An[6989,13,3265,3265,3141,847,0]An[6989,13,2973,2973,2498,847,0]An[5848,13,5849,6425,6062,847,0]An[5848,13,5849,4769,3581,847,0]Df[5848,13,5849,4769,3581,847,0,\"impl-From%3CRelayNode%3E-for-RelayMap\"]De[5848,13,5849,4769,3581,847,0,\"impl-From%3CRelayUrl%3E-for-RelayMap\"]An[5848,13,5849,4769,4340,847,0]0An[5848,13,5849,4769,6772,847,0]Am[5848,13,2729,901,4348,847,0]0Am[5848,13,2729,901,4336,847,0]Db[5848,13,2729,901,4336,847,0,\"impl-From%3CError%3E-for-RecvError\"]0Dj[5848,13,2729,2729,6349,847,0,\"impl-From%3CDialError%3E-for-ConnectError\"]Df[5848,13,2729,2729,6349,847,0,\"impl-From%3CError%3E-for-ConnectError\"]0An[5848,13,2729,2729,6349,847,0]Dc[5848,13,2729,2729,4291,847,0,\"impl-From%3CError%3E-for-DialError\"]An[5848,13,2729,2729,4291,847,0]De[5848,13,2729,2729,4291,847,0,\"impl-From%3CElapsed%3E-for-DialError\"]Df[5848,13,2729,2729,4291,847,0,\"impl-From%3CDnsError%3E-for-DialError\"]An[5848,13,2729,2729,6447,847,0]An[5848,13,2729,2729,2457,847,0]An[5848,13,2729,2729,4909,847,0]An[5848,13,2729,2729,6341,847,0]An[5848,13,2972,3264,3143,847,0]An[5848,13,2972,3264,6368,847,0]An[5848,13,2972,3738,7109,847,0]An[5848,13,2972,2972,6373,847,0]An[5848,13,2972,2972,6063,847,0]An[5848,13,2972,2972,6338,847,0]An[5848,13,2972,2972,2453,847,0]An[5848,13,2972,2972,4964,847,0]An[5848,13,2972,2972,4353,847,0]An[5848,13,2972,2972,2477,847,0]An[5848,13,2972,2972,6736,847,0]An[5848,13,2972,2972,4907,847,0]An[5848,13,2972,2972,2499,847,0]An[5848,13,2972,2972,4980,847,0]An[5848,13,2972,2972,6776,847,0]0An[5848,13,2735,2735,4298,847,0]An[5848,13,2735,2735,6632,847,0]Co[5848,13,2423,2423,2044,847,0,\"impl-From%3CError%3E-for-Error\"]Dh[5848,13,2423,2423,2044,847,0,\"impl-From%3CFrameTypeError%3E-for-Error\"]An[5848,13,2423,2423,2044,847,0]An[5848,13,2423,2423,7039,847,0]An[5848,13,2423,2423,7020,847,0]An[5848,13,2423,2423,4289,847,0]0An[5848,13,4736,4736,2043,847,0]Dh[5848,13,4736,4736,2043,847,0,\"impl-From%3CFrameTypeError%3E-for-Error\"]Co[5848,13,4736,4736,2043,847,0,\"impl-From%3CError%3E-for-Error\"]Df[5848,13,1805,1805,2042,847,0,\"impl-From%3CConnectError%3E-for-Error\"]An[5848,13,1805,1805,2042,847,0]Dc[5848,13,1805,1805,2042,847,0,\"impl-From%3CRecvError%3E-for-Error\"]Di[5848,13,1805,1805,2042,847,0,\"impl-From%3CConnectionError%3E-for-Error\"]An[5848,13,1805,1805,4962,847,0]Dg[5848,13,508,508,3537,847,0,\"impl-From%3CResolveError%3E-for-DnsError\"]Db[5848,13,508,508,3537,847,0,\"impl-From%3CElapsed%3E-for-DnsError\"]Al[5848,13,508,508,3537,847,0]Al[5848,13,508,508,6055,847,0]Al[5848,13,508,508,6650,847,0]Al[5848,13,508,508,3119,847,0]Al[5848,13,508,508,6035,847,0]Al[5848,13,508,508,6037,847,0]Al[5848,13,508,508,6485,847,0]0An[5848,13,4754,4754,6462,847,0]0An[5848,13,4754,4754,6457,847,0]An[5848,13,4754,4754,3568,847,0]0An[5848,13,4754,4754,3597,847,0]An[5848,13,4754,4754,7312,847,0]An[5848,13,4754,4754,3573,847,0]0An[5848,13,4754,4754,4957,847,0]0Ak[1767,13,1768,0,4327,848,0]Ak[1767,13,1768,0,3564,848,0]Ak[1767,13,1768,0,3583,848,0]Ak[1767,13,4715,0,3596,848,0]Ak[1767,13,3614,0,2509,848,0]An[1767,13,3614,3733,2502,848,0]Ak[1767,13,3614,0,3586,848,0]An[1767,13,3614,4746,4922,848,0]An[1767,13,3614,4746,6619,848,0]Am[4743,13,4744,784,4328,848,0]An[4743,13,4744,4750,3565,848,0]An[4743,13,4744,4771,3584,848,0]An[5848,13,4754,4754,3597,848,0]Ae[6989,2,6990,0,0,0,0]Al[6989,14,2927,2927,2459,0,0]Ae[5848,2,5849,0,0,0,0]Al[1767,13,1768,0,4327,4323,0]Al[1767,13,1768,0,6757,4323,0]Al[1767,13,1768,0,4345,4323,0]Al[1767,13,1768,0,3564,4323,0]Al[1767,13,1768,0,3583,4323,0]Al[1767,13,1768,0,7153,4323,0]Al[1767,13,1768,0,3580,4323,0]Al[1767,13,1768,0,4339,4323,0]Al[1767,13,3262,0,6640,4323,0]Al[1767,13,3262,0,7034,4323,0]Al[1767,13,3262,0,6367,4323,0]Ao[1767,13,3262,3262,6743,4323,0]Al[1767,13,4715,0,3567,4323,0]Al[1767,13,4715,0,3596,4323,0]Al[1767,13,4715,0,3572,4323,0]Al[1767,13,4715,0,4954,4323,0]Ao[1767,13,4715,4715,7022,4323,0]Ao[1767,13,4715,4715,7145,4323,0]Ao[1767,13,4715,4715,6621,4323,0]Ao[1767,13,4715,4715,6458,4323,0]Ao[1767,13,4715,4715,7195,4323,0]Am[1767,13,507,507,6354,4323,0]Am[1767,13,507,507,7200,4323,0]Ao[1767,13,2416,2416,4960,4323,0]Ao[1767,13,2416,2416,7274,4323,0]Ao[1767,13,2416,2416,6639,4323,0]Ao[1767,13,2416,2416,7242,4323,0]Ao[1767,13,2416,2416,6478,4323,0]Ao[1767,13,2416,2416,7036,4323,0]Am[1767,13,502,502,6352,4323,0]Am[1767,13,502,502,3118,4323,0]Ao[1767,13,1774,1774,6475,4323,0]Ao[1767,13,1774,1774,7241,4323,0]Ao[1767,13,1774,1774,6623,4323,0]Ao[1767,13,7007,7007,6651,4323,0]Ak[1767,13,506,0,6036,4323,0]Al[1767,13,3614,0,3145,4323,0]Al[1767,13,3614,0,2487,4323,0]Al[1767,13,3614,0,4272,4323,0]Al[1767,13,3614,0,3525,4323,0]Al[1767,13,3614,0,6366,4323,0]Al[1767,13,3614,0,7244,4323,0]Al[1767,13,3614,0,7111,4323,0]Al[1767,13,3614,0,4973,4323,0]Al[1767,13,3614,0,4967,4323,0]Al[1767,13,3614,0,6643,4323,0]Al[1767,13,3614,0,4332,4323,0]Al[1767,13,3614,0,4968,4323,0]Al[1767,13,3614,0,6642,4323,0]Al[1767,13,3614,0,4975,4323,0]Al[1767,13,3614,0,4984,4323,0]Al[1767,13,3614,0,6377,4323,0]Al[1767,13,3614,0,6778,4323,0]Al[1767,13,3614,0,2509,4323,0]Al[1767,13,3614,0,2018,4323,0]Al[1767,13,3614,0,3593,4323,0]Al[1767,13,3614,0,4928,4323,0]Al[1767,13,3614,0,4322,4323,0]Al[1767,13,3614,0,6742,4323,0]Al[1767,13,3614,0,3174,4323,0]Ao[1767,13,3614,5864,4920,4323,0]Ao[1767,13,3614,5864,6618,4323,0]Ao[1767,13,3614,5864,6617,4323,0]Al[1767,13,3614,0,6344,4323,0]Ao[1767,13,3614,3733,2502,4323,0]Al[1767,13,3614,0,6741,4323,0]Al[1767,13,3614,0,7134,4323,0]Al[1767,13,3614,0,7151,4323,0]Al[1767,13,3614,0,6372,4323,0]Al[1767,13,3614,0,7367,4323,0]Al[1767,13,3614,0,6032,4323,0]Al[1767,13,3614,0,7160,4323,0]Al[1767,13,3614,0,6737,4323,0]Al[1767,13,3614,0,7017,4323,0]Ao[1767,13,3614,4746,7016,4323,0]Al[1767,13,3614,0,6656,4323,0]Al[1767,13,3614,0,7159,4323,0]Al[1767,13,3614,0,3586,4323,0]Ao[1767,13,3614,4746,4922,4323,0]Ao[1767,13,3614,4746,6619,4323,0]Ao[1767,13,3614,3614,6477,4323,0]Ao[1767,13,3614,3614,3117,4323,0]Ao[1767,13,3614,3614,3546,4323,0]Ao[1767,13,3614,3614,7227,4323,0]Ao[1767,13,3614,3614,6348,4323,0]Ao[1767,13,3614,3614,4280,4323,0]Ao[1767,13,3614,3614,7310,4323,0]Ao[1767,13,3614,3614,6611,4323,0]Ao[1767,13,3614,3614,2452,4323,0]Ao[1767,13,3614,3614,3551,4323,0]Ao[1767,13,3614,3614,6635,4323,0]Ao[1767,13,3614,3614,4911,4323,0]Ao[1767,13,3614,3614,4275,4323,0]Ao[1767,13,3614,3614,6783,4323,0]Ao[1767,13,3614,3614,4918,4323,0]Ao[1767,13,3614,3614,7110,4323,0]Ao[1767,13,3614,3614,4338,4323,0]Ao[1767,13,5860,3263,3140,4323,0]Ao[1767,13,5860,2955,2050,4323,0]Ao[1767,13,5860,2969,2492,4323,0]Ao[1767,13,5860,2969,6644,4323,0]Ao[1767,13,5860,4778,4963,4323,0]An[1767,13,5860,782,3146,4323,0]Ao[1767,13,3736,3736,2497,4323,0]Ao[1767,13,3736,3736,6482,4323,0]Ao[1767,13,3736,3736,6025,4323,0]Ao[1767,13,3736,3736,6026,4323,0]Al[1767,13,4753,0,6461,4323,0]Al[1767,13,4753,0,6455,4323,0]Al[1767,13,4753,0,7311,4323,0]Ao[1767,13,6018,6018,7018,4323,0]Ao[1767,13,6018,7285,6626,4323,0]Ao[5847,13,5848,5848,7023,4323,0]Ao[5847,13,5848,5848,7137,4323,0]Ao[5847,13,5848,5848,3529,4323,0]An[5847,13,5848,5848,282,4323,0]Ao[5847,13,5848,5848,6031,4323,0]Ao[5847,13,2440,2440,2065,4323,0]Ao[5847,13,2440,2440,6073,4323,0]Ao[5847,13,2440,2440,6654,4323,0]Al[5847,13,821,821,283,4323,0]Ao[5848,13,5849,6425,6062,4323,0]Ao[5848,13,5849,4769,3581,4323,0]Ao[5848,13,5849,4769,4340,4323,0]Ao[5848,13,5849,4769,6772,4323,0]An[5848,13,2729,901,4348,4323,0]An[5848,13,2729,901,4336,4323,0]Ao[5848,13,2729,2729,6349,4323,0]Ao[5848,13,2729,2729,4291,4323,0]Ao[5848,13,2729,2729,6447,4323,0]Ao[5848,13,2729,2729,2457,4323,0]Ao[5848,13,2729,2729,4909,4323,0]Ao[5848,13,2729,2729,6341,4323,0]Ao[5848,13,2972,3264,3143,4323,0]Ao[5848,13,2972,3264,6368,4323,0]Ao[5848,13,2972,3738,7109,4323,0]Al[5848,13,2972,3738,7109,0,0]Ao[5848,13,2972,2972,6373,4323,0]Ao[5848,13,2972,2972,6063,4323,0]Ao[5848,13,2972,2972,6338,4323,0]Ao[5848,13,2972,2972,2453,4323,0]Ao[5848,13,2972,2972,4964,4323,0]Ao[5848,13,2972,2972,4353,4323,0]Ao[5848,13,2972,2972,2477,4323,0]Ao[5848,13,2972,2972,6736,4323,0]Ao[5848,13,2972,2972,4907,4323,0]Ao[5848,13,2972,2972,2499,4323,0]Ao[5848,13,2972,2972,4980,4323,0]Ao[5848,13,2972,2972,6776,4323,0]Ao[5848,13,2735,2735,4298,4323,0]Ao[5848,13,2735,2735,6632,4323,0]Ao[5848,13,2423,2423,2044,4323,0]Ao[5848,13,2423,2423,7039,4323,0]Ao[5848,13,2423,2423,7020,4323,0]Ao[5848,13,2423,2423,4289,4323,0]Ao[5848,13,4736,4736,2043,4323,0]Ao[5848,13,1805,1805,2042,4323,0]Ao[5848,13,1805,1805,4962,4323,0]Am[5848,13,508,508,3537,4323,0]Am[5848,13,508,508,6055,4323,0]Am[5848,13,508,508,6650,4323,0]Am[5848,13,508,508,3119,4323,0]Am[5848,13,508,508,6035,4323,0]Am[5848,13,508,508,6037,4323,0]Am[5848,13,508,508,6485,4323,0]Ao[5848,13,4754,4754,6462,4323,0]Ao[5848,13,4754,4754,6457,4323,0]Ao[5848,13,4754,4754,3568,4323,0]Ao[5848,13,4754,4754,3597,4323,0]Ao[5848,13,4754,4754,7312,4323,0]Ao[5848,13,4754,4754,3573,4323,0]Ao[5848,13,4754,4754,4957,4323,0]Ak[1767,13,1768,0,4327,849,0]Ak[1767,13,1768,0,6757,849,0]Ak[1767,13,1768,0,4345,849,0]Ak[1767,13,1768,0,3564,849,0]Ak[1767,13,1768,0,3583,849,0]Ak[1767,13,1768,0,7153,849,0]Ak[1767,13,1768,0,3580,849,0]Ak[1767,13,1768,0,4339,849,0]Ak[1767,13,3262,0,6640,849,0]Ak[1767,13,3262,0,7034,849,0]Ak[1767,13,3262,0,6367,849,0]An[1767,13,3262,3262,6743,849,0]Ak[1767,13,4715,0,3567,849,0]Ak[1767,13,4715,0,3596,849,0]Ak[1767,13,4715,0,3572,849,0]Ak[1767,13,4715,0,4954,849,0]An[1767,13,4715,4715,7022,849,0]An[1767,13,4715,4715,7145,849,0]An[1767,13,4715,4715,6621,849,0]An[1767,13,4715,4715,6458,849,0]An[1767,13,4715,4715,7195,849,0]Al[1767,13,507,507,6354,849,0]Al[1767,13,507,507,7200,849,0]An[1767,13,2416,2416,4960,849,0]An[1767,13,2416,2416,7274,849,0]An[1767,13,2416,2416,6639,849,0]An[1767,13,2416,2416,7242,849,0]An[1767,13,2416,2416,6478,849,0]An[1767,13,2416,2416,7036,849,0]Al[1767,13,502,502,6352,849,0]Al[1767,13,502,502,3118,849,0]An[1767,13,1774,1774,6475,849,0]An[1767,13,1774,1774,7241,849,0]An[1767,13,1774,1774,6623,849,0]An[1767,13,7007,7007,6651,849,0]Aj[1767,13,506,0,6036,849,0]Ak[1767,13,3614,0,3145,849,0]Ak[1767,13,3614,0,2487,849,0]Ak[1767,13,3614,0,4272,849,0]Ak[1767,13,3614,0,3525,849,0]Ak[1767,13,3614,0,6366,849,0]Ak[1767,13,3614,0,7244,849,0]Ak[1767,13,3614,0,7111,849,0]Ak[1767,13,3614,0,4973,849,0]Ak[1767,13,3614,0,4967,849,0]Ak[1767,13,3614,0,6643,849,0]Ak[1767,13,3614,0,4332,849,0]Ak[1767,13,3614,0,4968,849,0]Ak[1767,13,3614,0,6642,849,0]Ak[1767,13,3614,0,4975,849,0]Ak[1767,13,3614,0,4984,849,0]Ak[1767,13,3614,0,6377,849,0]Ak[1767,13,3614,0,6778,849,0]Ak[1767,13,3614,0,2509,849,0]Ak[1767,13,3614,0,2018,849,0]Ak[1767,13,3614,0,3593,849,0]Ak[1767,13,3614,0,4928,849,0]Ak[1767,13,3614,0,4322,849,0]Ak[1767,13,3614,0,6742,849,0]Ak[1767,13,3614,0,3174,849,0]An[1767,13,3614,5864,4920,849,0]An[1767,13,3614,5864,6618,849,0]An[1767,13,3614,5864,6617,849,0]Ak[1767,13,3614,0,6344,849,0]An[1767,13,3614,3733,2502,849,0]Ak[1767,13,3614,0,6741,849,0]Ak[1767,13,3614,0,7134,849,0]Ak[1767,13,3614,0,7151,849,0]Ak[1767,13,3614,0,6372,849,0]Ak[1767,13,3614,0,7367,849,0]Ak[1767,13,3614,0,6032,849,0]Ak[1767,13,3614,0,7160,849,0]Ak[1767,13,3614,0,6737,849,0]Ak[1767,13,3614,0,7017,849,0]An[1767,13,3614,4746,7016,849,0]Ak[1767,13,3614,0,6656,849,0]Ak[1767,13,3614,0,7159,849,0]Ak[1767,13,3614,0,3586,849,0]An[1767,13,3614,4746,4922,849,0]An[1767,13,3614,4746,6619,849,0]An[1767,13,3614,3614,6477,849,0]An[1767,13,3614,3614,3117,849,0]An[1767,13,3614,3614,3546,849,0]An[1767,13,3614,3614,7227,849,0]An[1767,13,3614,3614,6348,849,0]An[1767,13,3614,3614,4280,849,0]An[1767,13,3614,3614,7310,849,0]An[1767,13,3614,3614,6611,849,0]An[1767,13,3614,3614,2452,849,0]An[1767,13,3614,3614,3551,849,0]An[1767,13,3614,3614,6635,849,0]An[1767,13,3614,3614,4911,849,0]An[1767,13,3614,3614,4275,849,0]An[1767,13,3614,3614,6783,849,0]An[1767,13,3614,3614,4918,849,0]An[1767,13,3614,3614,7110,849,0]An[1767,13,3614,3614,4338,849,0]An[1767,13,5860,3263,3140,849,0]An[1767,13,5860,2955,2050,849,0]An[1767,13,5860,2969,2492,849,0]An[1767,13,5860,2969,6644,849,0]An[1767,13,5860,4778,4963,849,0]Am[1767,13,5860,782,3146,849,0]An[1767,13,3736,3736,2497,849,0]An[1767,13,3736,3736,6482,849,0]An[1767,13,3736,3736,6025,849,0]An[1767,13,3736,3736,6026,849,0]Ak[1767,13,4753,0,6461,849,0]Ak[1767,13,4753,0,6455,849,0]Ak[1767,13,4753,0,7311,849,0]An[1767,13,6018,6018,7018,849,0]An[1767,13,6018,7285,6626,849,0]Ak[4743,13,4744,0,4351,849,0]Am[4743,13,4744,784,4328,849,0]Am[4743,13,4744,784,6758,849,0]Am[4743,13,4744,784,4346,849,0]An[4743,13,4744,4750,3565,849,0]An[4743,13,4744,4771,3584,849,0]An[4743,13,4744,4771,7154,849,0]An[4743,13,3100,1786,4943,849,0]An[4743,13,3100,3100,4955,849,0]An[5847,13,5848,5848,7023,849,0]An[5847,13,5848,5848,7137,849,0]An[5847,13,5848,5848,3529,849,0]Am[5847,13,5848,5848,282,849,0]An[5847,13,5848,5848,6031,849,0]An[5847,13,2440,2440,2065,849,0]An[5847,13,2440,2440,6073,849,0]An[5847,13,2440,2440,6654,849,0]Ak[5847,13,821,821,283,849,0]An[6989,13,6990,2446,4363,849,0]An[6989,13,2437,2437,3526,849,0]An[6989,13,2927,2927,2459,849,0]An[6989,13,2927,2927,6068,849,0]An[6989,13,2927,2927,6476,849,0]An[6989,13,2927,2927,6637,849,0]An[6989,13,2927,2927,6735,849,0]Al[6989,13,509,509,4296,849,0]Al[6989,13,509,509,4295,849,0]Al[6989,13,509,509,4925,849,0]Al[6989,13,509,509,2469,849,0]An[6989,13,1389,1389,4931,849,0]An[6989,13,1389,6520,6771,849,0]Am[6989,13,1389,825,3528,849,0]An[6989,13,1389,1389,4930,849,0]An[6989,13,1389,1389,6048,849,0]An[6989,13,3265,3265,3141,849,0]An[6989,13,2973,2973,2498,849,0]An[5848,13,5849,6425,6062,849,0]An[5848,13,5849,4769,3581,849,0]An[5848,13,5849,4769,4340,849,0]An[5848,13,5849,4769,6772,849,0]Am[5848,13,2729,901,4348,849,0]Am[5848,13,2729,901,4336,849,0]An[5848,13,2729,2729,6349,849,0]An[5848,13,2729,2729,4291,849,0]An[5848,13,2729,2729,6447,849,0]An[5848,13,2729,2729,2457,849,0]An[5848,13,2729,2729,4909,849,0]An[5848,13,2729,2729,6341,849,0]An[5848,13,2972,3264,3143,849,0]An[5848,13,2972,3264,6368,849,0]An[5848,13,2972,3738,7109,849,0]An[5848,13,2972,2972,6373,849,0]An[5848,13,2972,2972,6063,849,0]An[5848,13,2972,2972,6338,849,0]An[5848,13,2972,2972,2453,849,0]An[5848,13,2972,2972,4964,849,0]An[5848,13,2972,2972,4353,849,0]An[5848,13,2972,2972,2477,849,0]An[5848,13,2972,2972,6736,849,0]An[5848,13,2972,2972,4907,849,0]An[5848,13,2972,2972,2499,849,0]An[5848,13,2972,2972,4980,849,0]An[5848,13,2972,2972,6776,849,0]An[5848,13,2735,2735,4298,849,0]An[5848,13,2735,2735,6632,849,0]An[5848,13,2423,2423,2044,849,0]An[5848,13,2423,2423,7039,849,0]An[5848,13,2423,2423,7020,849,0]An[5848,13,2423,2423,4289,849,0]An[5848,13,4736,4736,2043,849,0]An[5848,13,1805,1805,2042,849,0]An[5848,13,1805,1805,4962,849,0]Al[5848,13,508,508,3537,849,0]Al[5848,13,508,508,6055,849,0]Al[5848,13,508,508,6650,849,0]Al[5848,13,508,508,3119,849,0]Al[5848,13,508,508,6035,849,0]Al[5848,13,508,508,6037,849,0]Al[5848,13,508,508,6485,849,0]An[5848,13,4754,4754,6462,849,0]An[5848,13,4754,4754,6457,849,0]An[5848,13,4754,4754,3568,849,0]An[5848,13,4754,4754,3597,849,0]An[5848,13,4754,4754,7312,849,0]An[5848,13,4754,4754,3573,849,0]An[5848,13,4754,4754,4957,849,0]Al[1767,14,5860,4778,4963,0,0]Ai[5848,14,3536,0,6064,0,0]10Ab[1767,3,0,0,0,0,0]Ae[5847,2,5848,0,0,0,0]Al[1767,13,5860,2969,6644,0,0]Aj[5848,13,508,508,6485,0,0]Al[6989,13,2927,2927,2459,0,0]Ac[896,7,897,0,0,0,0]Ae[1767,2,4715,0,0,0,0]Al[1767,13,3262,0,6640,6363,0]Al[1767,13,3262,0,7034,6363,0]Al[1767,13,3262,0,6367,6363,0]Ao[1767,13,3262,3262,6743,6762,0]Ai[1767,14,2501,0,4292,0,0]Ai[1767,14,2501,0,3561,0,0]Ao[1767,13,5860,3263,3140,6363,0]Ao[6989,13,3265,3265,3141,6363,0]Ao[5848,13,2972,3264,3143,6363,0]Ao[5848,13,2972,3264,6368,6762,0]Ai[1767,12,3614,0,3114,0,0]Ai[1767,14,3614,0,6742,0,0]Ai[1767,14,3614,0,4928,0,0]Al[1767,13,3614,0,3145,2468,0]Al[1767,13,3614,0,2487,2468,0]Al[1767,13,3614,0,4272,2468,0]Al[1767,13,3614,0,3525,2468,0]Al[1767,13,3614,0,6366,2468,0]Ao[1767,13,3614,3614,2452,2468,0]Ao[1767,13,3614,3614,6635,2468,0]Ao[1767,13,3614,3614,4911,2468,0]Ao[1767,13,3614,3614,6783,2468,0]Aj[6989,14,509,509,4295,0,0]Al[6989,14,1389,1389,4930,0,0]Al[6989,14,1389,1389,6048,0,0]Al[5848,14,5849,4769,6772,0,0]Ae[1767,2,3604,0,0,0,0]Ai[1767,14,1768,0,4339,0,0]Ae[5848,2,5849,0,0,0,0]Al[5848,14,5849,4769,4340,0,0]Al[5848,14,2972,2972,6373,0,0]Ai[1767,13,3614,0,4967,0,0]9Ai[1767,12,3614,0,3114,0,0]Ai[1767,13,1768,0,4345,0,0]Ak[4743,13,4744,784,4346,0,0]Al[5847,14,2440,2440,6654,0,0]Ai[5848,14,4347,0,7232,0,0]51Ai[1767,13,1768,0,3580,0,0]Al[5848,13,5849,4769,3581,0,0]Ak[1767,13,1768,0,4327,888,0]Ak[1767,13,1768,0,6757,888,0]Ak[1767,13,1768,0,4345,888,0]Ak[1767,13,1768,0,3564,888,0]Ak[1767,13,1768,0,3583,888,0]Ak[1767,13,1768,0,7153,888,0]Ak[1767,13,1768,0,3580,888,0]Ak[1767,13,1768,0,4339,888,0]Ak[1767,13,3262,0,6640,888,0]Ak[1767,13,3262,0,7034,888,0]Ak[1767,13,3262,0,6367,888,0]An[1767,13,3262,3262,6743,888,0]Ak[1767,13,4715,0,3567,888,0]Ak[1767,13,4715,0,3596,888,0]Ak[1767,13,4715,0,3572,888,0]Ak[1767,13,4715,0,4954,888,0]An[1767,13,4715,4715,7022,888,0]An[1767,13,4715,4715,7145,888,0]An[1767,13,4715,4715,6621,888,0]An[1767,13,4715,4715,6458,888,0]An[1767,13,4715,4715,7195,888,0]Al[1767,13,507,507,6354,888,0]Al[1767,13,507,507,7200,888,0]An[1767,13,2416,2416,4960,888,0]An[1767,13,2416,2416,7274,888,0]An[1767,13,2416,2416,6639,888,0]An[1767,13,2416,2416,7242,888,0]An[1767,13,2416,2416,6478,888,0]An[1767,13,2416,2416,7036,888,0]Al[1767,13,502,502,6352,888,0]Al[1767,13,502,502,3118,888,0]An[1767,13,1774,1774,6475,888,0]An[1767,13,1774,1774,7241,888,0]An[1767,13,1774,1774,6623,888,0]An[1767,13,7007,7007,6651,888,0]Aj[1767,13,506,0,6036,888,0]Ak[1767,13,3614,0,3145,888,0]Ak[1767,13,3614,0,2487,888,0]Ak[1767,13,3614,0,4272,888,0]Ak[1767,13,3614,0,3525,888,0]Ak[1767,13,3614,0,6366,888,0]Ak[1767,13,3614,0,7244,888,0]Ak[1767,13,3614,0,7111,888,0]Ak[1767,13,3614,0,4973,888,0]Ak[1767,13,3614,0,4967,888,0]Ak[1767,13,3614,0,6643,888,0]Ak[1767,13,3614,0,4332,888,0]Ak[1767,13,3614,0,4968,888,0]Ak[1767,13,3614,0,6642,888,0]Ak[1767,13,3614,0,4975,888,0]Ak[1767,13,3614,0,4984,888,0]Ak[1767,13,3614,0,6377,888,0]Ak[1767,13,3614,0,6778,888,0]Ak[1767,13,3614,0,2509,888,0]Ak[1767,13,3614,0,2018,888,0]Ak[1767,13,3614,0,3593,888,0]Ak[1767,13,3614,0,4928,888,0]Ak[1767,13,3614,0,4322,888,0]Ak[1767,13,3614,0,6742,888,0]Ak[1767,13,3614,0,3174,888,0]An[1767,13,3614,5864,4920,888,0]An[1767,13,3614,5864,6618,888,0]An[1767,13,3614,5864,6617,888,0]Ak[1767,13,3614,0,6344,888,0]An[1767,13,3614,3733,2502,888,0]Ak[1767,13,3614,0,6741,888,0]Ak[1767,13,3614,0,7134,888,0]Ak[1767,13,3614,0,7151,888,0]Ak[1767,13,3614,0,6372,888,0]Ak[1767,13,3614,0,7367,888,0]Ak[1767,13,3614,0,6032,888,0]Ak[1767,13,3614,0,7160,888,0]Ak[1767,13,3614,0,6737,888,0]Ak[1767,13,3614,0,7017,888,0]An[1767,13,3614,4746,7016,888,0]Ak[1767,13,3614,0,6656,888,0]Ak[1767,13,3614,0,7159,888,0]Ak[1767,13,3614,0,3586,888,0]An[1767,13,3614,4746,4922,888,0]An[1767,13,3614,4746,6619,888,0]An[1767,13,3614,3614,6477,888,0]An[1767,13,3614,3614,3117,888,0]An[1767,13,3614,3614,3546,888,0]An[1767,13,3614,3614,7227,888,0]An[1767,13,3614,3614,6348,888,0]An[1767,13,3614,3614,4280,888,0]An[1767,13,3614,3614,7310,888,0]An[1767,13,3614,3614,6611,888,0]An[1767,13,3614,3614,2452,888,0]An[1767,13,3614,3614,3551,888,0]An[1767,13,3614,3614,6635,888,0]An[1767,13,3614,3614,4911,888,0]An[1767,13,3614,3614,4275,888,0]An[1767,13,3614,3614,6783,888,0]An[1767,13,3614,3614,4918,888,0]An[1767,13,3614,3614,7110,888,0]An[1767,13,3614,3614,4338,888,0]An[1767,13,5860,3263,3140,888,0]An[1767,13,5860,2955,2050,888,0]An[1767,13,5860,2969,2492,888,0]An[1767,13,5860,2969,6644,888,0]An[1767,13,5860,4778,4963,888,0]Am[1767,13,5860,782,3146,888,0]An[1767,13,3736,3736,2497,888,0]An[1767,13,3736,3736,6482,888,0]An[1767,13,3736,3736,6025,888,0]An[1767,13,3736,3736,6026,888,0]Ak[1767,13,4753,0,6461,888,0]Ak[1767,13,4753,0,6455,888,0]Ak[1767,13,4753,0,7311,888,0]An[1767,13,6018,6018,7018,888,0]An[1767,13,6018,7285,6626,888,0]An[5847,13,5848,5848,7023,888,0]An[5847,13,5848,5848,7137,888,0]An[5847,13,5848,5848,3529,888,0]Am[5847,13,5848,5848,282,888,0]An[5847,13,5848,5848,6031,888,0]An[5847,13,2440,2440,2065,888,0]An[5847,13,2440,2440,6073,888,0]An[5847,13,2440,2440,6654,888,0]Ak[5847,13,821,821,283,888,0]An[6989,13,6990,2446,4363,888,0]An[6989,13,2437,2437,3526,888,0]An[6989,13,2927,2927,2459,888,0]An[6989,13,2927,2927,6068,888,0]An[6989,13,2927,2927,6476,888,0]An[6989,13,2927,2927,6637,888,0]An[6989,13,2927,2927,6735,888,0]Al[6989,13,509,509,4296,888,0]Al[6989,13,509,509,4295,888,0]Al[6989,13,509,509,4925,888,0]Al[6989,13,509,509,2469,888,0]An[6989,13,1389,1389,4931,888,0]An[6989,13,1389,6520,6771,888,0]Am[6989,13,1389,825,3528,888,0]An[6989,13,1389,1389,4930,888,0]An[6989,13,1389,1389,6048,888,0]An[6989,13,3265,3265,3141,888,0]An[6989,13,2973,2973,2498,888,0]An[5848,13,5849,6425,6062,888,0]An[5848,13,5849,4769,3581,888,0]An[5848,13,5849,4769,4340,888,0]An[5848,13,5849,4769,6772,888,0]Am[5848,13,2729,901,4348,888,0]Am[5848,13,2729,901,4336,888,0]An[5848,13,2729,2729,6349,888,0]An[5848,13,2729,2729,4291,888,0]An[5848,13,2729,2729,6447,888,0]An[5848,13,2729,2729,2457,888,0]An[5848,13,2729,2729,4909,888,0]An[5848,13,2729,2729,6341,888,0]An[5848,13,2972,3264,3143,888,0]An[5848,13,2972,3264,6368,888,0]An[5848,13,2972,3738,7109,888,0]An[5848,13,2972,2972,6373,888,0]An[5848,13,2972,2972,6063,888,0]An[5848,13,2972,2972,6338,888,0]An[5848,13,2972,2972,2453,888,0]An[5848,13,2972,2972,4964,888,0]An[5848,13,2972,2972,4353,888,0]An[5848,13,2972,2972,2477,888,0]An[5848,13,2972,2972,6736,888,0]An[5848,13,2972,2972,4907,888,0]An[5848,13,2972,2972,2499,888,0]An[5848,13,2972,2972,4980,888,0]An[5848,13,2972,2972,6776,888,0]An[5848,13,2735,2735,4298,888,0]An[5848,13,2735,2735,6632,888,0]An[5848,13,2423,2423,2044,888,0]An[5848,13,2423,2423,7039,888,0]An[5848,13,2423,2423,7020,888,0]An[5848,13,2423,2423,4289,888,0]An[5848,13,4736,4736,2043,888,0]An[5848,13,1805,1805,2042,888,0]An[5848,13,1805,1805,4962,888,0]Al[5848,13,508,508,3537,888,0]Al[5848,13,508,508,6055,888,0]Al[5848,13,508,508,6650,888,0]Al[5848,13,508,508,3119,888,0]Al[5848,13,508,508,6035,888,0]Al[5848,13,508,508,6037,888,0]Al[5848,13,508,508,6485,888,0]An[5848,13,4754,4754,6462,888,0]An[5848,13,4754,4754,6457,888,0]An[5848,13,4754,4754,3568,888,0]An[5848,13,4754,4754,3597,888,0]An[5848,13,4754,4754,7312,888,0]An[5848,13,4754,4754,3573,888,0]An[5848,13,4754,4754,4957,888,0]Al[5848,15,2972,2972,2453,0,0]Ah[1767,5,3614,4367,0,0,0]Al[1767,15,3614,4746,7016,0,0]Ae[5848,6,1805,0,0,0,0]Ae[5848,6,4736,0,0,0,0]Ae[5848,6,2423,0,0,0,0]Al[1767,15,5860,2955,2050,0,0]Aj[5848,15,508,508,6035,0,0]Al[1767,15,3614,4746,6619,0,0]Af[5848,18,2401,0,0,0,0]Al[1767,15,3614,5864,6617,0,0]Ah[1767,6,5860,2955,0,0,0]Al[1767,15,3614,3614,7227,0,0]Al[5847,15,5848,5848,7023,0,0]Al[5847,15,5848,5848,7137,0,0]Al[5847,15,5848,5848,3529,0,0]5Al[1767,15,3614,3733,2502,0,0]Ai[1767,15,3614,0,4332,0,0]Ai[1767,15,3614,0,6741,0,0]2Al[5848,15,2423,2423,2044,0,0]Al[6989,15,1389,6520,6771,0,0]Ae[5847,5,2440,0,0,0,0]Ai[1767,17,1768,0,3173,0,0]Al[1767,13,3614,3614,3117,0,0]Aj[1767,13,507,507,7200,0,0]Al[1767,13,2416,2416,7274,0,0]Al[1767,13,2416,2416,7242,0,0]Aj[1767,13,502,502,3118,0,0]Al[1767,13,1774,1774,7241,0,0]Ai[1767,12,3614,0,7097,0,0]Aj[5848,13,508,508,3119,0,0]Ai[1767,14,3614,0,2018,0,0]Ai[1767,14,3614,0,3593,0,0]Ai[1767,14,3614,0,3174,0,0]Al[1767,13,1768,0,6757,2027,0]Al[1767,13,1768,0,7153,2027,0]Al[1767,13,4715,0,4954,2027,0]Ao[1767,13,4715,4715,7145,2027,0]Ao[1767,13,4715,4715,6621,2027,0]Ao[1767,13,2416,2416,4960,2027,0]Ao[1767,13,3614,4746,7016,2027,0]Ao[1767,13,3614,3614,7227,2027,0]Ao[1767,13,3614,3614,6348,2027,0]Ao[1767,13,3614,3614,4280,2027,0]Ao[1767,13,3614,3614,7310,2027,0]Ao[1767,13,3614,3614,4275,2027,0]Ao[1767,13,3614,3614,7110,2027,0]Ao[1767,13,3736,3736,6025,2027,0]Al[1767,13,4753,0,6461,2027,0]Al[1767,13,4753,0,6455,2027,0]Al[1767,13,4753,0,7311,2027,0]An[4743,13,4744,784,6758,2027,0]Ao[4743,13,4744,4771,7154,2027,0]Ao[4743,13,3100,3100,4955,2027,0]An[5848,13,2729,901,4348,2027,0]An[5848,13,2729,901,4336,2027,0]Ao[5848,13,2729,2729,6349,2027,0]Ao[5848,13,2729,2729,4291,2027,0]Ao[5848,13,2972,2972,4980,2027,0]Ao[5848,13,2972,2972,6776,2027,0]Ao[5848,13,2735,2735,6632,2027,0]Ao[5848,13,2423,2423,2044,2027,0]Ao[5848,13,4736,4736,2043,2027,0]Ao[5848,13,1805,1805,2042,2027,0]Am[5848,13,508,508,3537,2027,0]Am[5848,13,508,508,6055,2027,0]Am[5848,13,508,508,6650,2027,0]Ao[5848,13,4754,4754,6462,2027,0]Ao[5848,13,4754,4754,6457,2027,0]Ao[5848,13,4754,4754,7312,2027,0]Ao[5848,13,4754,4754,4957,2027,0]Ai[5848,14,4906,0,2479,0,0]Al[1767,13,1768,0,4327,2019,0]Al[1767,13,1768,0,4345,2019,0]Al[1767,13,1768,0,3564,2019,0]Al[1767,13,1768,0,3583,2019,0]Al[1767,13,1768,0,3580,2019,0]Al[1767,13,1768,0,4339,2019,0]Ao[1767,13,3262,3262,6743,2019,0]Al[1767,13,4715,0,3567,2019,0]Al[1767,13,4715,0,3596,2019,0]Al[1767,13,4715,0,3572,2019,0]Ao[1767,13,4715,4715,6458,2019,0]Ao[1767,13,4715,4715,7195,2019,0]Ao[1767,13,2416,2416,6639,2019,0]Ao[1767,13,2416,2416,6478,2019,0]Ao[1767,13,2416,2416,7036,2019,0]Am[1767,13,502,502,6352,2019,0]Ao[1767,13,1774,1774,6475,2019,0]Ao[1767,13,1774,1774,6623,2019,0]Ao[1767,13,7007,7007,6651,2019,0]Ak[1767,13,506,0,6036,2019,0]Al[1767,13,3614,0,7111,2019,0]Al[1767,13,3614,0,6643,2019,0]Al[1767,13,3614,0,4332,2019,0]Al[1767,13,3614,0,4968,2019,0]Al[1767,13,3614,0,6642,2019,0]Al[1767,13,3614,0,4984,2019,0]Al[1767,13,3614,0,6377,2019,0]Al[1767,13,3614,0,2509,2019,0]Al[1767,13,3614,0,3593,2019,0]Al[1767,13,3614,0,4928,2019,0]Al[1767,13,3614,0,4322,2019,0]Al[1767,13,3614,0,6742,2019,0]Al[1767,13,3614,0,3174,2019,0]Ao[1767,13,3614,5864,4920,2019,0]Ao[1767,13,3614,5864,6618,2019,0]Ao[1767,13,3614,5864,6617,2019,0]Al[1767,13,3614,0,6344,2019,0]Ao[1767,13,3614,3733,2502,2019,0]Al[1767,13,3614,0,6741,2019,0]Al[1767,13,3614,0,7134,2019,0]Al[1767,13,3614,0,7151,2019,0]Al[1767,13,3614,0,6372,2019,0]Al[1767,13,3614,0,6737,2019,0]Al[1767,13,3614,0,7017,2019,0]Al[1767,13,3614,0,6656,2019,0]Al[1767,13,3614,0,7159,2019,0]Al[1767,13,3614,0,3586,2019,0]Ao[1767,13,3614,4746,4922,2019,0]Ao[1767,13,3614,4746,6619,2019,0]Ao[1767,13,3614,3614,6477,2019,0]Ao[1767,13,3614,3614,3546,2019,0]Ao[1767,13,3614,3614,6611,2019,0]Ao[1767,13,3614,3614,4918,2019,0]Ao[1767,13,3614,3614,4338,2019,0]Ao[1767,13,5860,2955,2050,2019,0]Ao[1767,13,5860,2969,2492,2019,0]Ao[1767,13,5860,2969,6644,2019,0]Ao[1767,13,5860,4778,4963,2019,0]An[1767,13,5860,782,3146,2019,0]Ao[1767,13,3736,3736,2497,2019,0]Ao[1767,13,3736,3736,6026,2019,0]Al[4743,13,4744,0,4351,2019,0]An[4743,13,4744,784,4328,2019,0]An[4743,13,4744,784,4346,2019,0]Ao[4743,13,4744,4750,3565,2019,0]Ao[4743,13,4744,4771,3584,2019,0]Ao[4743,13,3100,1786,4943,2019,0]Ao[5847,13,5848,5848,3529,2019,0]An[5847,13,5848,5848,282,2019,0]Al[5847,13,821,821,283,2019,0]Ao[6989,13,6990,2446,4363,2019,0]Ao[6989,13,2437,2437,3526,2019,0]Ao[6989,13,2927,2927,6068,2019,0]Am[6989,13,509,509,4295,2019,0]Am[6989,13,509,509,4925,2019,0]Am[6989,13,509,509,2469,2019,0]Ao[6989,13,1389,6520,6771,2019,0]An[6989,13,1389,825,3528,2019,0]Ao[6989,13,1389,1389,4930,2019,0]Ao[6989,13,1389,1389,6048,2019,0]Ao[5848,13,5849,4769,3581,2019,0]Ao[5848,13,5849,4769,4340,2019,0]Ao[5848,13,5849,4769,6772,2019,0]Ao[5848,13,2729,2729,6447,2019,0]Ao[5848,13,2972,3264,6368,2019,0]Ao[5848,13,2972,2972,2453,2019,0]Ao[5848,13,2972,2972,6736,2019,0]Ao[5848,13,2735,2735,4298,2019,0]Ao[5848,13,2423,2423,7039,2019,0]Ao[5848,13,2423,2423,7020,2019,0]Ao[5848,13,2423,2423,4289,2019,0]Ao[5848,13,1805,1805,4962,2019,0]Am[5848,13,508,508,3119,2019,0]Am[5848,13,508,508,6035,2019,0]Am[5848,13,508,508,6037,2019,0]Am[5848,13,508,508,6485,2019,0]Ao[5848,13,4754,4754,3568,2019,0]Ao[5848,13,4754,4754,3597,2019,0]Ao[5848,13,4754,4754,3573,2019,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,13,3614,3614,4918,0,0]Al[5847,13,5848,5848,7023,0,0]Al[5847,13,5848,5848,7137,0,0]Al[1767,13,1768,0,4327,2023,0]Al[1767,13,1768,0,4327,4323,0]Al[1767,13,1768,0,6757,4323,0]Al[1767,13,1768,0,4345,4323,0]Al[1767,13,1768,0,3564,4323,0]Al[1767,13,1768,0,3583,4323,0]Al[1767,13,1768,0,3583,2023,0]Al[1767,13,1768,0,7153,4323,0]Al[1767,13,1768,0,3580,4323,0]Al[1767,13,1768,0,4339,4323,0]Al[1767,13,3262,0,6640,4323,0]Al[1767,13,3262,0,7034,4323,0]Al[1767,13,3262,0,6367,4323,0]Ao[1767,13,3262,3262,6743,4323,0]Al[1767,13,4715,0,3567,4323,0]Al[1767,13,4715,0,3596,4323,0]Al[1767,13,4715,0,3572,2023,0]Al[1767,13,4715,0,3572,4323,0]Al[1767,13,4715,0,4954,4323,0]Ao[1767,13,4715,4715,7022,4323,0]Ao[1767,13,4715,4715,7145,4323,0]Ao[1767,13,4715,4715,6621,4323,0]Ao[1767,13,4715,4715,6458,2023,0]Ao[1767,13,4715,4715,6458,4323,0]Ao[1767,13,4715,4715,7195,4323,0]Am[1767,13,507,507,6354,4323,0]Am[1767,13,507,507,7200,4323,0]Ao[1767,13,2416,2416,4960,4323,0]Ao[1767,13,2416,2416,7274,4323,0]Ao[1767,13,2416,2416,6639,4323,0]Ao[1767,13,2416,2416,7242,4323,0]Ao[1767,13,2416,2416,6478,4323,0]Ao[1767,13,2416,2416,7036,4323,0]Am[1767,13,502,502,6352,4323,0]Am[1767,13,502,502,3118,4323,0]Ao[1767,13,1774,1774,6475,4323,0]Ao[1767,13,1774,1774,7241,4323,0]Ao[1767,13,1774,1774,6623,4323,0]Ao[1767,13,7007,7007,6651,4323,0]Ak[1767,13,506,0,6036,4323,0]Al[1767,13,3614,0,3145,4323,0]Al[1767,13,3614,0,2487,4323,0]Al[1767,13,3614,0,4272,4323,0]Al[1767,13,3614,0,3525,4323,0]Al[1767,13,3614,0,6366,4323,0]Al[1767,13,3614,0,7244,4323,0]Al[1767,13,3614,0,7111,4323,0]Al[1767,13,3614,0,4973,4323,0]Al[1767,13,3614,0,4967,4323,0]Al[1767,13,3614,0,6643,4323,0]Al[1767,13,3614,0,4332,4323,0]Al[1767,13,3614,0,4968,4323,0]Al[1767,13,3614,0,6642,4323,0]Al[1767,13,3614,0,4975,4323,0]Al[1767,13,3614,0,4984,4323,0]Al[1767,13,3614,0,6377,4323,0]Al[1767,13,3614,0,6778,4323,0]Al[1767,13,3614,0,2509,4323,0]Al[1767,13,3614,0,2018,4323,0]Al[1767,13,3614,0,3593,4323,0]Al[1767,13,3614,0,4928,4323,0]Al[1767,13,3614,0,4322,4323,0]Al[1767,13,3614,0,6742,4323,0]Al[1767,13,3614,0,3174,4323,0]Ao[1767,13,3614,5864,4920,4323,0]Ao[1767,13,3614,5864,6618,4323,0]Ao[1767,13,3614,5864,6617,4323,0]Al[1767,13,3614,0,6344,4323,0]Ao[1767,13,3614,3733,2502,4323,0]Al[1767,13,3614,0,6741,4323,0]Al[1767,13,3614,0,7134,4323,0]Al[1767,13,3614,0,7151,4323,0]Al[1767,13,3614,0,6372,4323,0]Al[1767,13,3614,0,7367,4323,0]Al[1767,13,3614,0,6032,4323,0]Al[1767,13,3614,0,7160,4323,0]Al[1767,13,3614,0,6737,4323,0]Al[1767,13,3614,0,7017,4323,0]Ao[1767,13,3614,4746,7016,4323,0]Al[1767,13,3614,0,6656,4323,0]Al[1767,13,3614,0,7159,4323,0]Al[1767,13,3614,0,3586,4323,0]Ao[1767,13,3614,4746,4922,4323,0]Ao[1767,13,3614,4746,6619,4323,0]Ao[1767,13,3614,3614,6477,4323,0]Ao[1767,13,3614,3614,3117,4323,0]Ao[1767,13,3614,3614,3546,4323,0]Ao[1767,13,3614,3614,7227,4323,0]Ao[1767,13,3614,3614,6348,4323,0]Ao[1767,13,3614,3614,4280,4323,0]Ao[1767,13,3614,3614,7310,4323,0]Ao[1767,13,3614,3614,6611,4323,0]Ao[1767,13,3614,3614,2452,4323,0]Ao[1767,13,3614,3614,3551,4323,0]Ao[1767,13,3614,3614,6635,4323,0]Ao[1767,13,3614,3614,4911,4323,0]Ao[1767,13,3614,3614,4275,4323,0]Ao[1767,13,3614,3614,6783,4323,0]Ao[1767,13,3614,3614,4918,4323,0]Ao[1767,13,3614,3614,7110,4323,0]Ao[1767,13,3614,3614,4338,4323,0]Ao[1767,13,5860,3263,3140,4323,0]Ao[1767,13,5860,2955,2050,4323,0]Ao[1767,13,5860,2969,2492,4323,0]Ao[1767,13,5860,2969,6644,4323,0]Ao[1767,13,5860,4778,4963,4323,0]An[1767,13,5860,782,3146,4323,0]Ao[1767,13,3736,3736,2497,4323,0]Ao[1767,13,3736,3736,6482,4323,0]Ao[1767,13,3736,3736,6025,4323,0]Ao[1767,13,3736,3736,6026,4323,0]Al[1767,13,4753,0,6461,4323,0]Al[1767,13,4753,0,6455,4323,0]Al[1767,13,4753,0,7311,4323,0]Ao[1767,13,6018,6018,7018,4323,0]Ao[1767,13,6018,7285,6626,4323,0]An[4743,13,4744,784,4328,2023,0]Ao[4743,13,4744,4771,3584,2023,0]Ao[5847,13,5848,5848,7023,4323,0]Ao[5847,13,5848,5848,7137,4323,0]Ao[5847,13,5848,5848,3529,4323,0]An[5847,13,5848,5848,282,4323,0]Ao[5847,13,5848,5848,6031,4323,0]Ao[5847,13,2440,2440,2065,4323,0]Ao[5847,13,2440,2440,6073,4323,0]Ao[5847,13,2440,2440,6654,4323,0]Al[5847,13,821,821,283,4323,0]Ao[5848,13,5849,6425,6062,4323,0]Ao[5848,13,5849,4769,3581,4323,0]Ao[5848,13,5849,4769,4340,4323,0]Ao[5848,13,5849,4769,6772,4323,0]An[5848,13,2729,901,4348,4323,0]An[5848,13,2729,901,4336,4323,0]Ao[5848,13,2729,2729,6349,4323,0]Ao[5848,13,2729,2729,4291,4323,0]Ao[5848,13,2729,2729,6447,4323,0]Ao[5848,13,2729,2729,2457,4323,0]Ao[5848,13,2729,2729,4909,4323,0]Ao[5848,13,2729,2729,6341,4323,0]Ao[5848,13,2972,3264,3143,4323,0]Ao[5848,13,2972,3264,6368,4323,0]Ao[5848,13,2972,3738,7109,4323,0]Ao[5848,13,2972,3738,7109,2023,0]Ao[5848,13,2972,2972,6373,4323,0]Ao[5848,13,2972,2972,6063,4323,0]Ao[5848,13,2972,2972,6338,4323,0]Ao[5848,13,2972,2972,2453,4323,0]Ao[5848,13,2972,2972,4964,4323,0]Ao[5848,13,2972,2972,4353,4323,0]Ao[5848,13,2972,2972,2477,4323,0]Ao[5848,13,2972,2972,6736,4323,0]Ao[5848,13,2972,2972,4907,4323,0]Ao[5848,13,2972,2972,2499,4323,0]Ao[5848,13,2972,2972,4980,4323,0]Ao[5848,13,2972,2972,6776,4323,0]Ao[5848,13,2735,2735,4298,4323,0]Ao[5848,13,2735,2735,6632,4323,0]Ao[5848,13,2423,2423,2044,4323,0]Ao[5848,13,2423,2423,7039,4323,0]Ao[5848,13,2423,2423,7020,4323,0]Ao[5848,13,2423,2423,4289,4323,0]Ao[5848,13,4736,4736,2043,4323,0]Ao[5848,13,1805,1805,2042,4323,0]Ao[5848,13,1805,1805,4962,4323,0]Am[5848,13,508,508,3537,4323,0]Am[5848,13,508,508,6055,4323,0]Am[5848,13,508,508,6650,4323,0]Am[5848,13,508,508,3119,4323,0]Am[5848,13,508,508,6035,4323,0]Am[5848,13,508,508,6037,4323,0]Am[5848,13,508,508,6485,4323,0]Ao[5848,13,4754,4754,6462,4323,0]Ao[5848,13,4754,4754,6457,4323,0]Ao[5848,13,4754,4754,3568,4323,0]Ao[5848,13,4754,4754,3597,4323,0]Ao[5848,13,4754,4754,7312,4323,0]Ao[5848,13,4754,4754,3573,4323,0]Ao[5848,13,4754,4754,3573,2023,0]Ao[5848,13,4754,4754,4957,4323,0]Ae[5848,2,2956,0,0,0,0]Ai[1767,13,1768,0,3580,0,0]Al[1767,13,4715,4715,7195,0,0]Al[5848,13,5849,4769,3581,0,0]Ai[1767,14,3614,0,6656,0,0]Ak[1767,13,5860,782,3146,0,0]Al[6989,14,2927,2927,2459,0,0]Ai[1767,13,3614,0,3586,0,0]Ai[1767,14,4949,0,6763,0,0]0Ai[5848,14,4952,0,6764,0,0]86Ae[1767,2,4715,0,0,0,0]Al[5847,13,5848,5848,6031,0,0]Al[5847,13,2440,2440,2065,0,0]Ae[5847,2,5848,0,0,0,0]Al[5848,14,2972,2972,6373,0,0]>Ah[1767,13,506,0,6036,0,0]Ai[1767,13,3614,0,4975,0,0]Aj[5848,12,508,508,3585,0,0]Aj[5848,13,508,508,6037,0,0]Al[1767,13,3614,3614,3551,0,0]Aj[6989,14,509,509,4295,0,0]Al[1767,13,3736,3736,6482,0,0]Aj[6989,13,509,509,4296,0,0]Al[6989,13,1389,1389,4931,0,0]Al[6989,13,2973,2973,2498,0,0]Al[5848,13,2972,2972,2499,0,0]Al[5848,13,2729,2729,2457,0,0]Ae[6989,2,6990,0,0,0,0]Ai[5848,14,4906,0,6051,0,0]Al[1767,13,3614,3614,4918,0,0]Ae[5847,2,5848,0,0,0,0]Al[5847,13,5848,5848,7137,0,0]Ak[5847,14,5848,5848,282,0,0]Al[6989,14,2437,2437,3526,0,0]Ai[5848,14,2036,0,7331,0,0]Ai[1767,13,3614,0,4975,0,0]Ae[1767,5,3614,0,0,0,0]Ae[5848,6,2972,0,0,0,0]Ae[5848,5,2729,0,0,0,0]Ae[6989,5,2927,0,0,0,0]Al[1767,15,3614,3614,4338,0,0]Al[6989,15,2927,2927,6735,0,0]Ai[1767,15,1768,0,6757,0,0]Ak[4743,15,4744,784,6758,0,0]Al[1767,15,3614,5864,6617,0,0]Ad[6989,5,509,0,0,0,0]Al[5848,15,2735,2735,4298,0,0]Al[5848,15,2423,2423,7039,0,0]Ai[1767,19,1768,0,4327,0,0]Ak[4743,19,4744,784,4328,0,0]Ae[5848,5,2972,0,0,0,0]Ak[6989,15,1389,825,3528,0,0]Al[5848,15,2972,2972,4907,0,0]Ag[1767,8,1768,784,0,0,0]Ag[4743,8,4744,784,0,0,0]Ah[1767,5,3614,5670,0,0,0]Ah[1767,5,5860,2969,0,0,0]Ae[1767,5,3736,0,0,0,0]Ae[6989,5,2973,0,0,0,0]8Al[6989,15,1389,6520,6771,0,0]Ah[1767,6,3614,3733,0,0,0]Af[4743,10,3100,0,0,0,0]Ah[1767,5,3614,3110,0,0,0]Al[1767,15,2416,2416,4960,0,0]Al[4743,15,3100,3100,4955,0,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,13,3614,3614,3551,0,0]Al[1767,12,3736,3736,6768,0,0]Al[1767,12,3736,3736,7141,0,0]Al[1767,13,3736,3736,6482,0,0]Ao[1767,13,3736,3736,6026,7141,0]Ao[1767,13,3736,3736,6026,6768,0]Al[5848,14,2972,2972,6063,0,0]Al[1767,13,1768,0,4327,2014,0]Al[1767,13,4715,0,3596,2014,0]An[4743,13,4744,784,4328,2014,0]Ao[5848,13,4754,4754,3597,2014,0]Al[1767,13,1768,0,4327,2454,0]0Al[1767,13,1768,0,6757,2454,0]Al[1767,13,1768,0,4345,2454,0]Al[1767,13,1768,0,3564,2454,0]Al[1767,13,1768,0,3583,2454,0]Al[1767,13,1768,0,7153,2454,0]Al[1767,13,1768,0,3580,2454,0]Al[1767,13,1768,0,4339,2454,0]Al[1767,13,3262,0,6640,2454,0]Al[1767,13,3262,0,7034,2454,0]Al[1767,13,3262,0,6367,2454,0]Ao[1767,13,3262,3262,6743,2454,0]Al[1767,13,4715,0,3567,2454,0]Al[1767,13,4715,0,3596,2454,0]Al[1767,13,4715,0,3572,2454,0]Al[1767,13,4715,0,4954,2454,0]Ao[1767,13,4715,4715,7022,2454,0]Ao[1767,13,4715,4715,7145,2454,0]Ao[1767,13,4715,4715,6621,2454,0]Ao[1767,13,4715,4715,6458,2454,0]Ao[1767,13,4715,4715,7195,2454,0]Am[1767,13,507,507,6354,2454,0]Am[1767,13,507,507,7200,2454,0]Ao[1767,13,2416,2416,4960,2454,0]Ao[1767,13,2416,2416,7274,2454,0]Ao[1767,13,2416,2416,6639,2454,0]Ao[1767,13,2416,2416,7242,2454,0]Ao[1767,13,2416,2416,6478,2454,0]Ao[1767,13,2416,2416,7036,2454,0]Am[1767,13,502,502,6352,2454,0]Am[1767,13,502,502,3118,2454,0]Ao[1767,13,1774,1774,6475,2454,0]Ao[1767,13,1774,1774,7241,2454,0]Ao[1767,13,1774,1774,6623,2454,0]Ao[1767,13,7007,7007,6651,2454,0]Ak[1767,13,506,0,6036,2454,0]Al[1767,13,3614,0,3145,2454,0]Al[1767,13,3614,0,2487,2454,0]Al[1767,13,3614,0,4272,2454,0]Al[1767,13,3614,0,3525,2454,0]Al[1767,13,3614,0,6366,2454,0]Al[1767,13,3614,0,7244,2454,0]Al[1767,13,3614,0,7111,2454,0]Al[1767,13,3614,0,4973,2454,0]Al[1767,13,3614,0,4967,2454,0]Al[1767,13,3614,0,6643,2454,0]Al[1767,13,3614,0,4332,2454,0]Al[1767,13,3614,0,4968,2454,0]Al[1767,13,3614,0,6642,2454,0]Al[1767,13,3614,0,4975,2454,0]Al[1767,13,3614,0,4984,2454,0]Al[1767,13,3614,0,6377,2454,0]Al[1767,13,3614,0,6778,2454,0]Al[1767,13,3614,0,2509,2454,0]Al[1767,13,3614,0,2018,2454,0]Al[1767,13,3614,0,3593,2454,0]Al[1767,13,3614,0,4928,2454,0]Al[1767,13,3614,0,4322,2454,0]Al[1767,13,3614,0,6742,2454,0]Al[1767,13,3614,0,3174,2454,0]Ao[1767,13,3614,5864,4920,2454,0]Ao[1767,13,3614,5864,6618,2454,0]Ao[1767,13,3614,5864,6617,2454,0]Al[1767,13,3614,0,6344,2454,0]Ao[1767,13,3614,3733,2502,2454,0]Al[1767,13,3614,0,6741,2454,0]Al[1767,13,3614,0,7134,2454,0]Al[1767,13,3614,0,7151,2454,0]Al[1767,13,3614,0,6372,2454,0]Al[1767,13,3614,0,7367,2454,0]Al[1767,13,3614,0,6032,2454,0]Al[1767,13,3614,0,7160,2454,0]Al[1767,13,3614,0,6737,2454,0]Al[1767,13,3614,0,7017,2454,0]Ao[1767,13,3614,4746,7016,2454,0]Al[1767,13,3614,0,6656,2454,0]Al[1767,13,3614,0,7159,2454,0]Al[1767,13,3614,0,3586,2454,0]Ao[1767,13,3614,4746,4922,2454,0]Ao[1767,13,3614,4746,6619,2454,0]Ao[1767,13,3614,3614,6477,2454,0]Ao[1767,13,3614,3614,3117,2454,0]Ao[1767,13,3614,3614,3546,2454,0]Ao[1767,13,3614,3614,7227,2454,0]Ao[1767,13,3614,3614,6348,2454,0]Ao[1767,13,3614,3614,4280,2454,0]Ao[1767,13,3614,3614,7310,2454,0]Ao[1767,13,3614,3614,6611,2454,0]Ao[1767,13,3614,3614,2452,2454,0]Ao[1767,13,3614,3614,3551,2454,0]Ao[1767,13,3614,3614,6635,2454,0]Ao[1767,13,3614,3614,4911,2454,0]Ao[1767,13,3614,3614,4275,2454,0]Ao[1767,13,3614,3614,6783,2454,0]Ao[1767,13,3614,3614,4918,2454,0]Ao[1767,13,3614,3614,7110,2454,0]Ao[1767,13,3614,3614,4338,2454,0]Ao[1767,13,5860,3263,3140,2454,0]Ao[1767,13,5860,2955,2050,2454,0]Ao[1767,13,5860,2969,2492,2454,0]Ao[1767,13,5860,2969,6644,2454,0]Ao[1767,13,5860,4778,4963,2454,0]An[1767,13,5860,782,3146,2454,0]Ao[1767,13,3736,3736,2497,2454,0]Ao[1767,13,3736,3736,6482,2454,0]Ao[1767,13,3736,3736,6025,2454,0]Ao[1767,13,3736,3736,6026,2454,0]Al[1767,13,4753,0,6461,2454,0]Al[1767,13,4753,0,6455,2454,0]Al[1767,13,4753,0,7311,2454,0]Ao[1767,13,6018,6018,7018,2454,0]Ao[1767,13,6018,7285,6626,2454,0]Al[4743,13,4744,0,4351,2454,0]An[4743,13,4744,784,4328,2454,0]0An[4743,13,4744,784,6758,2454,0]An[4743,13,4744,784,4346,2454,0]Ao[4743,13,4744,4750,3565,2454,0]Ao[4743,13,4744,4771,3584,2454,0]Ao[4743,13,4744,4771,7154,2454,0]Ao[4743,13,3100,1786,4943,2454,0]Ao[4743,13,3100,3100,4955,2454,0]Ao[5847,13,5848,5848,7023,2454,0]Ao[5847,13,5848,5848,7137,2454,0]Ao[5847,13,5848,5848,3529,2454,0]An[5847,13,5848,5848,282,2454,0]Ao[5847,13,5848,5848,6031,2454,0]Ao[5847,13,2440,2440,2065,2454,0]Ao[5847,13,2440,2440,6073,2454,0]Ao[5847,13,2440,2440,6654,2454,0]Al[5847,13,821,821,283,2454,0]Ao[6989,13,6990,2446,4363,2454,0]Ao[6989,13,2437,2437,3526,2454,0]Ao[6989,13,2927,2927,2459,2454,0]Ao[6989,13,2927,2927,6068,2454,0]Ao[6989,13,2927,2927,6476,2454,0]Ao[6989,13,2927,2927,6637,2454,0]Ao[6989,13,2927,2927,6735,2454,0]Am[6989,13,509,509,4296,2454,0]Am[6989,13,509,509,4295,2454,0]Am[6989,13,509,509,4925,2454,0]Am[6989,13,509,509,2469,2454,0]Ao[6989,13,1389,1389,4931,2454,0]Ao[6989,13,1389,6520,6771,2454,0]An[6989,13,1389,825,3528,2454,0]Ao[6989,13,1389,1389,4930,2454,0]Ao[6989,13,1389,1389,6048,2454,0]Ao[6989,13,3265,3265,3141,2454,0]Ao[6989,13,2973,2973,2498,2454,0]Ao[5848,13,5849,6425,6062,2454,0]Ao[5848,13,5849,4769,3581,2454,0]Ao[5848,13,5849,4769,4340,2454,0]Ao[5848,13,5849,4769,6772,2454,0]An[5848,13,2729,901,4348,2454,0]An[5848,13,2729,901,4336,2454,0]Ao[5848,13,2729,2729,6349,2454,0]Ao[5848,13,2729,2729,4291,2454,0]Ao[5848,13,2729,2729,6447,2454,0]Ao[5848,13,2729,2729,2457,2454,0]Ao[5848,13,2729,2729,4909,2454,0]Ao[5848,13,2729,2729,6341,2454,0]Ao[5848,13,2972,3264,3143,2454,0]Ao[5848,13,2972,3264,6368,2454,0]Ao[5848,13,2972,3738,7109,2454,0]Ao[5848,13,2972,2972,6373,2454,0]Ao[5848,13,2972,2972,6063,2454,0]Ao[5848,13,2972,2972,6338,2454,0]Ao[5848,13,2972,2972,2453,2454,0]Ao[5848,13,2972,2972,4964,2454,0]Ao[5848,13,2972,2972,4353,2454,0]Ao[5848,13,2972,2972,2477,2454,0]Ao[5848,13,2972,2972,6736,2454,0]Ao[5848,13,2972,2972,4907,2454,0]Ao[5848,13,2972,2972,2499,2454,0]Ao[5848,13,2972,2972,4980,2454,0]Ao[5848,13,2972,2972,6776,2454,0]Ao[5848,13,2735,2735,4298,2454,0]Ao[5848,13,2735,2735,6632,2454,0]Ao[5848,13,2423,2423,2044,2454,0]Ao[5848,13,2423,2423,7039,2454,0]Ao[5848,13,2423,2423,7020,2454,0]Ao[5848,13,2423,2423,4289,2454,0]Ao[5848,13,4736,4736,2043,2454,0]Ao[5848,13,1805,1805,2042,2454,0]Ao[5848,13,1805,1805,4962,2454,0]Am[5848,13,508,508,3537,2454,0]Am[5848,13,508,508,6055,2454,0]Am[5848,13,508,508,6650,2454,0]Am[5848,13,508,508,3119,2454,0]Am[5848,13,508,508,6035,2454,0]Am[5848,13,508,508,6037,2454,0]Am[5848,13,508,508,6485,2454,0]Ao[5848,13,4754,4754,6462,2454,0]Ao[5848,13,4754,4754,6457,2454,0]Ao[5848,13,4754,4754,3568,2454,0]Ao[5848,13,4754,4754,3597,2454,0]Ao[5848,13,4754,4754,7312,2454,0]Ao[5848,13,4754,4754,3573,2454,0]Ao[5848,13,4754,4754,4957,2454,0]Ai[1767,14,3614,0,3174,0,0]Al[5847,14,2440,2440,6073,0,0]Al[5847,14,2440,2440,6654,0,0]Aj[1767,13,502,502,3118,0,0]Ae[5847,7,1767,0,0,0,0]Ae[5847,7,2420,0,0,0,0]Ae[5848,2,5849,0,0,0,0]Al[1767,13,3614,3614,4918,0,0]Ae[5848,2,2956,0,0,0,0]Al[1767,13,1768,0,4327,4283,0]Al[1767,13,1768,0,6757,4283,0]Al[1767,13,1768,0,4345,4283,0]Al[1767,13,1768,0,3564,4283,0]Al[1767,13,1768,0,3583,4283,0]Al[1767,13,1768,0,7153,4283,0]Al[1767,13,1768,0,3580,4283,0]Al[1767,13,1768,0,4339,4283,0]Al[1767,13,3262,0,6640,4283,0]Al[1767,13,3262,0,7034,4283,0]Al[1767,13,3262,0,6367,4283,0]Ao[1767,13,3262,3262,6743,4283,0]Al[1767,13,4715,0,3567,4283,0]Al[1767,13,4715,0,3596,4283,0]Al[1767,13,4715,0,3572,4283,0]Al[1767,13,4715,0,4954,4283,0]Ao[1767,13,4715,4715,7022,4283,0]Ao[1767,13,4715,4715,7145,4283,0]Ao[1767,13,4715,4715,6621,4283,0]Ao[1767,13,4715,4715,6458,4283,0]Ao[1767,13,4715,4715,7195,4283,0]Am[1767,13,507,507,6354,4283,0]Am[1767,13,507,507,7200,4283,0]Ao[1767,13,2416,2416,4960,4283,0]Ao[1767,13,2416,2416,7274,4283,0]Ao[1767,13,2416,2416,6639,4283,0]Ao[1767,13,2416,2416,7242,4283,0]Ao[1767,13,2416,2416,6478,4283,0]Ao[1767,13,2416,2416,7036,4283,0]Am[1767,13,502,502,6352,4283,0]Am[1767,13,502,502,3118,4283,0]Ao[1767,13,1774,1774,6475,4283,0]Ao[1767,13,1774,1774,7241,4283,0]Ao[1767,13,1774,1774,6623,4283,0]Ao[1767,13,7007,7007,6651,4283,0]Ak[1767,13,506,0,6036,4283,0]Al[1767,13,3614,0,3145,4283,0]Al[1767,13,3614,0,2487,4283,0]Al[1767,13,3614,0,4272,4283,0]Al[1767,13,3614,0,3525,4283,0]Al[1767,13,3614,0,6366,4283,0]Al[1767,13,3614,0,7244,4283,0]Al[1767,13,3614,0,7111,4283,0]Al[1767,13,3614,0,4973,4283,0]Al[1767,13,3614,0,4967,4283,0]Al[1767,13,3614,0,6643,4283,0]Al[1767,13,3614,0,4332,4283,0]Al[1767,13,3614,0,4968,4283,0]Al[1767,13,3614,0,6642,4283,0]Al[1767,13,3614,0,4975,4283,0]Al[1767,13,3614,0,4984,4283,0]Al[1767,13,3614,0,6377,4283,0]Al[1767,13,3614,0,6778,4283,0]Al[1767,13,3614,0,2509,4283,0]Al[1767,13,3614,0,2018,4283,0]Al[1767,13,3614,0,3593,4283,0]Al[1767,13,3614,0,4928,4283,0]Al[1767,13,3614,0,4322,4283,0]Al[1767,13,3614,0,6742,4283,0]Al[1767,13,3614,0,3174,4283,0]Ao[1767,13,3614,5864,4920,4283,0]Ao[1767,13,3614,5864,6618,4283,0]Ao[1767,13,3614,5864,6617,4283,0]Al[1767,13,3614,0,6344,4283,0]Ao[1767,13,3614,3733,2502,4283,0]Al[1767,13,3614,0,6741,4283,0]Al[1767,13,3614,0,7134,4283,0]Al[1767,13,3614,0,7151,4283,0]Al[1767,13,3614,0,6372,4283,0]Al[1767,13,3614,0,7367,4283,0]Al[1767,13,3614,0,6032,4283,0]Al[1767,13,3614,0,7160,4283,0]Al[1767,13,3614,0,6737,4283,0]Al[1767,13,3614,0,7017,4283,0]Ao[1767,13,3614,4746,7016,4283,0]Al[1767,13,3614,0,6656,4283,0]Al[1767,13,3614,0,7159,4283,0]Al[1767,13,3614,0,3586,4283,0]Ao[1767,13,3614,4746,4922,4283,0]Ao[1767,13,3614,4746,6619,4283,0]Ao[1767,13,3614,3614,6477,4283,0]Ao[1767,13,3614,3614,3117,4283,0]Ao[1767,13,3614,3614,3546,4283,0]Ao[1767,13,3614,3614,7227,4283,0]Ao[1767,13,3614,3614,6348,4283,0]Ao[1767,13,3614,3614,4280,4283,0]Ao[1767,13,3614,3614,7310,4283,0]Ao[1767,13,3614,3614,6611,4283,0]Ao[1767,13,3614,3614,2452,4283,0]Ao[1767,13,3614,3614,3551,4283,0]Ao[1767,13,3614,3614,6635,4283,0]Ao[1767,13,3614,3614,4911,4283,0]Ao[1767,13,3614,3614,4275,4283,0]Ao[1767,13,3614,3614,6783,4283,0]Ao[1767,13,3614,3614,4918,4283,0]Ao[1767,13,3614,3614,7110,4283,0]Ao[1767,13,3614,3614,4338,4283,0]Ao[1767,13,5860,3263,3140,4283,0]Ao[1767,13,5860,2955,2050,4283,0]Ao[1767,13,5860,2969,2492,4283,0]Ao[1767,13,5860,2969,6644,4283,0]Ao[1767,13,5860,4778,4963,4283,0]An[1767,13,5860,782,3146,4283,0]Ao[1767,13,3736,3736,2497,4283,0]Ao[1767,13,3736,3736,6482,4283,0]Ao[1767,13,3736,3736,6025,4283,0]Ao[1767,13,3736,3736,6026,4283,0]Al[1767,13,4753,0,6461,4283,0]Al[1767,13,4753,0,6455,4283,0]Al[1767,13,4753,0,7311,4283,0]Ao[1767,13,6018,6018,7018,4283,0]Ao[1767,13,6018,7285,6626,4283,0]Ao[5847,13,5848,5848,7023,4283,0]Ao[5847,13,5848,5848,7137,4283,0]Ao[5847,13,5848,5848,3529,4283,0]An[5847,13,5848,5848,282,4283,0]Ao[5847,13,5848,5848,6031,4283,0]Ao[5847,13,2440,2440,2065,4283,0]Ao[5847,13,2440,2440,6073,4283,0]Ao[5847,13,2440,2440,6654,4283,0]Al[5847,13,821,821,283,4283,0]Ao[6989,13,6990,2446,4363,4283,0]Ao[6989,13,2437,2437,3526,4283,0]Ao[6989,13,2927,2927,2459,4283,0]Ao[6989,13,2927,2927,6068,4283,0]Ao[6989,13,2927,2927,6476,4283,0]Ao[6989,13,2927,2927,6637,4283,0]Ao[6989,13,2927,2927,6735,4283,0]Am[6989,13,509,509,4296,4283,0]Am[6989,13,509,509,4295,4283,0]Am[6989,13,509,509,4925,4283,0]Am[6989,13,509,509,2469,4283,0]Ao[6989,13,1389,1389,4931,4283,0]Ao[6989,13,1389,6520,6771,4283,0]An[6989,13,1389,825,3528,4283,0]Ao[6989,13,1389,1389,4930,4283,0]Ao[6989,13,1389,1389,6048,4283,0]Ao[6989,13,3265,3265,3141,4283,0]Ao[6989,13,2973,2973,2498,4283,0]Ao[5848,13,5849,6425,6062,4283,0]Ao[5848,13,5849,4769,3581,4283,0]Ao[5848,13,5849,4769,4340,4283,0]Ao[5848,13,5849,4769,6772,4283,0]An[5848,13,2729,901,4348,4283,0]An[5848,13,2729,901,4336,4283,0]Ao[5848,13,2729,2729,6349,4283,0]Ao[5848,13,2729,2729,4291,4283,0]Ao[5848,13,2729,2729,6447,4283,0]Ao[5848,13,2729,2729,2457,4283,0]Ao[5848,13,2729,2729,4909,4283,0]Ao[5848,13,2729,2729,6341,4283,0]Ao[5848,13,2972,3264,3143,4283,0]Ao[5848,13,2972,3264,6368,4283,0]Ao[5848,13,2972,3738,7109,4283,0]Ao[5848,13,2972,2972,6373,4283,0]Ao[5848,13,2972,2972,6063,4283,0]Ao[5848,13,2972,2972,6338,4283,0]Ao[5848,13,2972,2972,2453,4283,0]Ao[5848,13,2972,2972,4964,4283,0]Ao[5848,13,2972,2972,4353,4283,0]Ao[5848,13,2972,2972,2477,4283,0]Ao[5848,13,2972,2972,6736,4283,0]Ao[5848,13,2972,2972,4907,4283,0]Ao[5848,13,2972,2972,2499,4283,0]Ao[5848,13,2972,2972,4980,4283,0]Ao[5848,13,2972,2972,6776,4283,0]Ao[5848,13,2735,2735,4298,4283,0]Ao[5848,13,2735,2735,6632,4283,0]Ao[5848,13,2423,2423,2044,4283,0]Ao[5848,13,2423,2423,7039,4283,0]Ao[5848,13,2423,2423,7020,4283,0]Ao[5848,13,2423,2423,4289,4283,0]Ao[5848,13,4736,4736,2043,4283,0]Ao[5848,13,1805,1805,2042,4283,0]Ao[5848,13,1805,1805,4962,4283,0]Am[5848,13,508,508,3537,4283,0]Am[5848,13,508,508,6055,4283,0]Am[5848,13,508,508,6650,4283,0]Am[5848,13,508,508,3119,4283,0]Am[5848,13,508,508,6035,4283,0]Am[5848,13,508,508,6037,4283,0]Am[5848,13,508,508,6485,4283,0]Ao[5848,13,4754,4754,6462,4283,0]Ao[5848,13,4754,4754,6457,4283,0]Ao[5848,13,4754,4754,3568,4283,0]Ao[5848,13,4754,4754,3597,4283,0]Ao[5848,13,4754,4754,7312,4283,0]Ao[5848,13,4754,4754,3573,4283,0]Ao[5848,13,4754,4754,4957,4283,0]Ae[6989,2,6990,0,0,0,0]Ai[1767,13,3614,0,7159,0,0]Ai[1767,14,3614,0,4928,0,0]Ai[1767,14,3614,0,6372,0,0]Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,6037,0,0]Al[1767,13,3614,0,2509,2021,0]Al[1767,13,3614,0,7159,2021,0]Al[1767,13,3614,0,3586,2021,0]210Ai[1767,13,3614,0,4975,0,0]Ao[1767,13,3262,3262,6743,6762,0]Ao[5848,13,2972,3264,6368,6762,0]Al[1767,13,3614,3614,3551,0,0]Al[6989,13,6990,2446,4363,0,0]Al[1767,13,3614,3614,3117,0,0]Al[5848,14,2972,2972,6063,0,0]Aj[1767,13,507,507,6354,0,0]Al[1767,13,2416,2416,6639,0,0]Al[1767,13,2416,2416,6478,0,0]Ai[1767,14,3614,0,2018,0,0]Ai[1767,13,3614,0,4921,0,0]Al[1767,13,3614,3614,3546,0,0]Ae[5848,2,5849,0,0,0,0]Ai[1767,14,7015,0,6040,0,0]Ai[1767,13,1768,0,4327,0,0]Ai[1767,13,1768,0,4345,0,0]Ak[4743,13,4744,784,4328,0,0]Ak[4743,13,4744,784,4346,0,0]Ai[1767,14,3614,0,6737,0,0]Ai[1767,14,3614,0,7017,0,0]Ai[1767,14,3614,0,6656,0,0]Ai[5848,14,2036,0,7040,0,0]Al[1767,13,3614,3614,3551,0,0]Al[5848,13,2972,3738,7109,0,0]86Ae[5847,7,1767,0,0,0,0]Ae[5847,7,2420,0,0,0,0]Ae[6989,2,6990,0,0,0,0]>Al[5848,14,2972,3264,6368,0,0]Al[1767,13,1768,0,6757,2027,0]Al[1767,13,1768,0,7153,2027,0]Al[1767,13,4715,0,4954,2027,0]Ao[1767,13,4715,4715,7145,2027,0]Ao[1767,13,4715,4715,6621,2027,0]Ao[1767,13,2416,2416,4960,2027,0]Ai[1767,14,4959,0,4325,0,0]Ai[1767,14,4959,0,2510,0,0]Ai[1767,14,4959,0,3548,0,0]Ai[1767,14,4959,0,6044,0,0]Ai[1767,14,4959,0,3540,0,0]Ah[1767,14,4949,0,883,0,0]Ai[1767,14,4949,0,6449,0,0]Ah[1767,14,7144,0,877,0,0]Ah[1767,14,6620,0,878,0,0]Al[1767,13,3614,0,7111,2027,0]Al[1767,13,3614,0,6643,2027,0]Al[1767,13,3614,0,4332,2027,0]Al[1767,13,3614,0,4968,2027,0]Al[1767,13,3614,0,6642,2027,0]Al[1767,13,3614,0,4984,2027,0]Al[1767,13,3614,0,6377,2027,0]Al[1767,13,3614,0,6741,2027,0]Ao[1767,13,3614,4746,7016,2027,0]Ao[1767,13,3614,3614,7227,2027,0]Ao[1767,13,3614,3614,6348,2027,0]Ao[1767,13,3614,3614,4280,2027,0]Ao[1767,13,3614,3614,7310,2027,0]Ao[1767,13,3614,3614,4275,2027,0]Ao[1767,13,3614,3614,7110,2027,0]Ai[1767,14,6345,0,3121,0,0]Ai[1767,14,6345,0,4912,0,0]Ai[1767,14,4279,0,4937,0,0]Ai[1767,14,7226,0,6027,0,0]Ai[1767,14,7226,0,4308,0,0]Ai[1767,14,7226,0,2051,0,0]Ai[1767,14,7309,0,6624,0,0]Ai[1767,14,7309,0,3534,0,0]Ai[1767,14,4274,0,6738,0,0]Ao[1767,13,3736,3736,6025,2027,0]Ai[1767,14,6024,0,4913,0,0]Ai[1767,14,6024,0,7203,0,0]Ah[1767,14,6024,0,879,0,0]Ai[1767,14,6755,0,2462,0,0]Ah[1767,14,6755,0,276,0,0]Al[1767,13,4753,0,6461,2027,0]Al[1767,13,4753,0,6455,2027,0]Al[1767,13,4753,0,7311,2027,0]Ah[1767,14,4949,0,883,0,0]Ai[1767,14,4949,0,6449,0,0]Ai[1767,14,6459,0,7235,0,0]Ai[1767,14,6459,0,6751,0,0]Ai[1767,14,6450,0,7146,0,0]Ai[1767,14,6450,0,7029,0,0]An[4743,13,4744,784,6758,2027,0]Ao[4743,13,4744,4771,7154,2027,0]Ao[4743,13,3100,3100,4955,2027,0]Ai[4743,14,4950,0,3576,0,0]Ai[4743,14,4950,0,3541,0,0]Ai[4743,14,6756,0,2463,0,0]Ah[4743,14,6756,0,277,0,0]An[5848,13,2729,901,4348,2027,0]An[5848,13,2729,901,4336,2027,0]Ao[5848,13,2729,2729,6349,2027,0]Ao[5848,13,2729,2729,4291,2027,0]Ai[5848,14,4335,0,3578,0,0]Ai[5848,14,4335,0,6069,0,0]Ai[5848,14,4347,0,6070,0,0]Ai[5848,14,6346,0,4359,0,0]Ai[5848,14,6346,0,4299,0,0]Ah[5848,14,6346,0,844,0,0]Ai[5848,14,6346,0,3171,0,0]Ah[5848,14,6346,0,289,0,0]Ah[5848,14,4290,0,274,0,0]Ai[5848,14,4290,0,3162,0,0]Af[5848,14,4290,0,9,0,0]Ai[5848,14,4290,0,6364,0,0]Ao[5848,13,2972,2972,4980,2027,0]Ao[5848,13,2972,2972,6776,2027,0]Ai[5848,14,6775,0,3139,0,0]Ai[5848,14,6775,0,4304,0,0]Ai[5848,14,4979,0,4306,0,0]Ai[5848,14,4979,0,4329,0,0]Ai[5848,14,4979,0,6652,0,0]Ai[5848,14,4979,0,6733,0,0]Ai[5848,14,4979,0,6059,0,0]Ao[5848,13,2735,2735,6632,2027,0]Ao[5848,13,2423,2423,2044,2027,0]Ai[5848,14,2037,0,2061,0,0]Ai[5848,14,2037,0,6629,0,0]Ai[5848,14,2037,0,7027,0,0]Ai[5848,14,2037,0,7419,0,0]Ao[5848,13,4736,4736,2043,2027,0]Ai[5848,14,2036,0,4360,0,0]Ai[5848,14,2036,0,6628,0,0]Ai[5848,14,2036,0,7230,0,0]Ao[5848,13,1805,1805,2042,2027,0]Ai[5848,14,2035,0,3122,0,0]Ai[5848,14,2035,0,4914,0,0]Ai[5848,14,2035,0,4357,0,0]Am[5848,13,508,508,3537,2027,0]Am[5848,13,508,508,6055,2027,0]Am[5848,13,508,508,6650,2027,0]Ai[5848,14,3536,0,3163,0,0]Ai[5848,14,3536,0,3154,0,0]Ai[5848,14,6054,0,4951,0,0]Ai[5848,14,6054,0,6361,0,0]Ao[5848,13,4754,4754,6462,2027,0]Ao[5848,13,4754,4754,6457,2027,0]Ao[5848,13,4754,4754,7312,2027,0]Ao[5848,13,4754,4754,4957,2027,0]Ah[5848,14,4952,0,884,0,0]Ai[5848,14,4952,0,6452,0,0]Ai[5848,14,6460,0,7236,0,0]Ai[5848,14,6460,0,6752,0,0]Ai[5848,14,6451,0,7147,0,0]Ai[5848,14,6451,0,7030,0,0]Ai[1767,14,4959,0,6046,0,0]Ai[5848,14,4290,0,7368,0,0]Ai[1767,13,1768,0,3173,0,0]Ai[1767,14,3614,0,4928,0,0]Ae[4743,2,4744,0,0,0,0]Ai[4743,13,4744,0,4351,0,0]Al[1767,13,1768,0,4327,4314,0]Ai[1767,12,4753,0,4314,0,0]Al[5848,12,4754,4754,4315,0,0]Ai[1767,14,3614,0,6742,0,0]0Al[1767,14,5860,2969,2492,0,0]0Ai[1767,13,1768,0,4327,0,0]Ak[4743,13,4744,784,4328,0,0]Ai[1767,12,3614,0,4921,0,0]Ai[1767,10,3614,2929,0,0,0]Ad[5848,8,508,0,0,0,0]Ae[1767,5,3614,0,0,0,0]Ad[1767,5,502,0,0,0,0]Ad[5848,5,508,0,0,0,0]Al[1767,15,3614,3614,6348,0,0]Al[5848,15,1805,1805,2042,0,0]Al[1767,15,3614,3614,4338,0,0]Al[6989,15,2927,2927,6735,0,0]Al[1767,15,1774,1774,6623,0,0]Ah[1767,5,5860,3263,0,0,0]Ae[6989,5,3265,0,0,0,0]Al[5848,15,2972,2972,6776,0,0]Ah[5848,5,2972,3264,0,0,0]Ah[1767,5,3614,5670,0,0,0]Ag[1767,5,5860,782,0,0,0]Al[1767,15,5860,2955,2050,0,0]0Aj[5848,15,508,508,3537,0,0]:Ai[1767,15,3614,0,4984,0,0]Ai[1767,18,5860,3750,0,0,0]Al[5848,15,2729,2729,4291,0,0]3Ai[1767,15,3614,0,6643,0,0]Al[1767,15,3614,4746,6619,0,0]Al[5848,15,2729,2729,6349,0,0]Ai[1767,10,1768,5858,0,0,0]Ah[1767,5,3614,1813,0,0,0]Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]Aj[1767,13,507,507,6354,0,0]Al[1767,13,2416,2416,6639,0,0]Al[1767,13,2416,2416,6478,0,0]Aj[1767,13,502,502,6352,0,0]Al[1767,13,1774,1774,6475,0,0]Ah[1767,13,506,0,6036,0,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,13,3736,3736,2497,0,0]Aj[5848,13,508,508,6037,0,0]Ak[5847,14,5848,5848,282,0,0]Ao[5847,13,5848,5848,3529,6610,0]An[5847,13,5848,5848,282,6610,0]Al[5847,13,821,821,283,6610,0]Al[1767,13,1768,0,4327,4910,0]Al[1767,13,1768,0,3564,4910,0]Al[1767,13,1768,0,3583,4910,0]Al[1767,13,1768,0,4339,4910,0]Al[1767,13,4715,0,3596,4910,0]Al[1767,13,3614,0,2509,4910,0]Al[1767,13,3614,0,3586,4910,0]Ao[1767,13,3614,4746,4922,4910,0]Ao[1767,13,3614,4746,6619,4910,0]Ao[1767,13,5860,2955,2050,4910,0]Ao[5848,13,5849,4769,4340,4910,0]Ao[5848,13,5849,4769,6772,4910,0]Ao[5848,13,4754,4754,3597,4910,0]Al[1767,13,3614,3614,3546,0,0]Al[5848,13,2729,2729,6447,0,0]Al[1767,13,3262,0,6640,3127,0]Al[1767,13,3262,0,7034,3127,0]Al[1767,13,3262,0,6367,3127,0]Ao[1767,13,3262,3262,6743,3127,0]Al[1767,13,4715,0,3567,3127,0]Ao[1767,13,4715,4715,7195,3127,0]Am[1767,13,502,502,6352,3127,0]Am[1767,13,502,502,3118,3127,0]Ao[1767,13,1774,1774,7241,3127,0]Ao[1767,13,7007,7007,6651,3127,0]Ak[1767,13,506,0,6036,3127,0]Al[1767,13,3614,0,6778,3127,0]Al[1767,13,3614,0,2509,3127,0]Al[1767,13,3614,0,3593,3127,0]Al[1767,13,3614,0,4928,3127,0]Al[1767,13,3614,0,4322,3127,0]Al[1767,13,3614,0,6742,3127,0]Al[1767,13,3614,0,3174,3127,0]Ao[1767,13,3614,5864,6617,3127,0]Al[1767,13,3614,0,6344,3127,0]Al[1767,13,3614,0,7134,3127,0]Al[1767,13,3614,0,7151,3127,0]Ao[1767,13,3614,3614,6477,3127,0]Ao[1767,13,3614,3614,3117,3127,0]Ao[1767,13,3614,3614,6611,3127,0]Ao[1767,13,5860,3263,3140,3127,0]Ao[1767,13,5860,2969,2492,3127,0]Ao[1767,13,5860,2969,6644,3127,0]An[1767,13,5860,782,3146,3127,0]Ao[5847,13,5848,5848,6031,3127,0]Ao[5847,13,2440,2440,2065,3127,0]Ao[5847,13,2440,2440,6073,3127,0]Ao[6989,13,2927,2927,2459,3127,0]Ao[6989,13,2927,2927,6068,3127,0]Ao[6989,13,2927,2927,6637,3127,0]Ao[6989,13,2927,2927,6735,3127,0]Db[6989,13,1389,6520,6771,3127,0,\"impl-Default-for-RateLimitConfig\"]De[6989,13,1389,6520,6771,3127,0,\"impl-Default-for-%26RateLimitConfig\"]Ao[6989,13,3265,3265,3141,3127,0]Ao[5848,13,5849,6425,6062,3127,0]Ao[5848,13,5849,4769,6772,3127,0]Ao[5848,13,2972,3264,3143,3127,0]Ao[5848,13,2972,3264,6368,3127,0]Ao[5848,13,2972,2972,6373,3127,0]Ao[5848,13,2972,2972,2477,3127,0]Am[5848,13,508,508,3119,3127,0]Am[5848,13,508,508,6035,3127,0]Am[5848,13,508,508,6037,3127,0]Ao[5848,13,4754,4754,3568,3127,0]Al[6989,14,1389,1389,6048,0,0]Al[6989,14,2927,2927,6637,0,0]Al[1767,13,5860,2969,2492,0,0]Ai[1767,13,3614,0,4967,0,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,14,3614,5864,6618,0,0]Ai[4743,14,4950,0,2511,0,0]Ae[1767,2,1768,0,0,0,0]3Ak[5847,14,5848,5848,282,0,0]Ae[6989,2,6990,0,0,0,0]Al[6989,14,2437,2437,3526,0,0]Al[6989,14,2927,2927,2459,0,0]Al[5848,13,2972,2972,2499,0,0]Ai[1767,13,3614,0,6778,0,0]Ai[1767,14,1768,0,3564,0,0]Al[1767,13,4715,4715,7022,0,0]Al[1767,13,4715,4715,6458,0,0]Ai[1767,14,4715,0,3572,0,0]Ai[1767,14,6622,0,3132,0,0]Ai[1767,14,6620,0,4312,0,0]?2Al[4743,14,4744,4750,3565,0,0]Al[5848,14,4754,4754,3573,0,0]Al[1767,13,6018,7285,6626,0,0]Ai[1767,13,3614,0,4921,0,0]Al[1767,13,3614,3614,4918,0,0]Aj[6989,14,509,509,4295,0,0]Ai[5848,14,7038,0,2471,0,0]Al[1767,13,4715,4715,4294,0,0]Ao[1767,13,4715,4715,7195,4294,0]Ao[1767,13,2416,2416,6639,4294,0]Al[1767,13,2416,2416,7036,0,0]Am[1767,13,502,502,6352,4294,0]Ao[1767,13,1774,1774,6475,4294,0]Ao[1767,13,7007,7007,6651,4294,0]Ai[4743,13,4744,0,4351,0,0]Al[1767,14,5860,3263,3140,0,0]87Am[1767,13,507,507,6354,4294,0]Ao[1767,13,2416,2416,6478,4294,0]7654Ak[1767,13,506,0,6036,3155,0]Al[6989,13,6990,2446,4363,0,0]Ao[5848,13,2972,3738,7109,7155,0]Am[5848,13,508,508,6037,3155,0]Aj[6989,14,509,509,4295,0,0]Ac[896,7,897,0,0,0,0]9Al[1767,14,3614,5864,6618,0,0]Ae[1767,2,3604,0,0,0,0]Ai[1767,13,3614,0,4975,0,0]Ak[5847,14,5848,5848,282,0,0]Al[5847,14,2440,2440,2065,0,0]Ae[5848,2,2956,0,0,0,0]Ae[5848,2,2972,0,0,0,0]Al[5848,13,5849,6425,6062,0,0]Ai[5848,14,7038,0,4969,0,0]Ak[1767,13,1768,0,4327,267,0]Ak[1767,13,1768,0,6757,267,0]Ak[1767,13,1768,0,4345,267,0]Ak[1767,13,1768,0,3564,267,0]Ak[1767,13,1768,0,3583,267,0]Ak[1767,13,1768,0,7153,267,0]Ak[1767,13,1768,0,3580,267,0]Ak[1767,13,1768,0,4339,267,0]Ak[1767,13,3262,0,6640,267,0]Ak[1767,13,3262,0,7034,267,0]Ak[1767,13,3262,0,6367,267,0]An[1767,13,3262,3262,6743,267,0]Ak[1767,13,4715,0,3567,267,0]Ak[1767,13,4715,0,3596,267,0]Ak[1767,13,4715,0,3572,267,0]Ak[1767,13,4715,0,4954,267,0]An[1767,13,4715,4715,7022,267,0]An[1767,13,4715,4715,7145,267,0]An[1767,13,4715,4715,6621,267,0]An[1767,13,4715,4715,6458,267,0]An[1767,13,4715,4715,7195,267,0]Al[1767,13,507,507,6354,267,0]Al[1767,13,507,507,7200,267,0]An[1767,13,2416,2416,4960,267,0]An[1767,13,2416,2416,7274,267,0]An[1767,13,2416,2416,6639,267,0]An[1767,13,2416,2416,7242,267,0]An[1767,13,2416,2416,6478,267,0]An[1767,13,2416,2416,7036,267,0]Al[1767,13,502,502,6352,267,0]Al[1767,13,502,502,3118,267,0]An[1767,13,1774,1774,6475,267,0]An[1767,13,1774,1774,7241,267,0]An[1767,13,1774,1774,6623,267,0]An[1767,13,7007,7007,6651,267,0]Aj[1767,13,506,0,6036,267,0]Ak[1767,13,3614,0,3145,267,0]Ak[1767,13,3614,0,2487,267,0]Ak[1767,13,3614,0,4272,267,0]Ak[1767,13,3614,0,3525,267,0]Ak[1767,13,3614,0,6366,267,0]Ak[1767,13,3614,0,7244,267,0]Ak[1767,13,3614,0,7111,267,0]Ak[1767,13,3614,0,4973,267,0]Ak[1767,13,3614,0,4967,267,0]Ak[1767,13,3614,0,6643,267,0]Ak[1767,13,3614,0,4332,267,0]Ak[1767,13,3614,0,4968,267,0]Ak[1767,13,3614,0,6642,267,0]Ak[1767,13,3614,0,4975,267,0]Ak[1767,13,3614,0,4984,267,0]Ak[1767,13,3614,0,6377,267,0]Ak[1767,13,3614,0,6778,267,0]Ak[1767,13,3614,0,2509,267,0]Ak[1767,13,3614,0,2018,267,0]Ak[1767,13,3614,0,3593,267,0]Ak[1767,13,3614,0,4928,267,0]Ak[1767,13,3614,0,4322,267,0]Ak[1767,13,3614,0,6742,267,0]Ak[1767,13,3614,0,3174,267,0]An[1767,13,3614,5864,4920,267,0]An[1767,13,3614,5864,6618,267,0]An[1767,13,3614,5864,6617,267,0]Ak[1767,13,3614,0,6344,267,0]An[1767,13,3614,3733,2502,267,0]Ak[1767,13,3614,0,6741,267,0]Ak[1767,13,3614,0,7134,267,0]Ak[1767,13,3614,0,7151,267,0]Ak[1767,13,3614,0,6372,267,0]Ak[1767,13,3614,0,7367,267,0]Ak[1767,13,3614,0,6032,267,0]Ak[1767,13,3614,0,7160,267,0]Ak[1767,13,3614,0,6737,267,0]Ak[1767,13,3614,0,7017,267,0]An[1767,13,3614,4746,7016,267,0]Ak[1767,13,3614,0,6656,267,0]Ak[1767,13,3614,0,7159,267,0]Ak[1767,13,3614,0,3586,267,0]An[1767,13,3614,4746,4922,267,0]An[1767,13,3614,4746,6619,267,0]An[1767,13,3614,3614,6477,267,0]An[1767,13,3614,3614,3117,267,0]An[1767,13,3614,3614,3546,267,0]An[1767,13,3614,3614,7227,267,0]An[1767,13,3614,3614,6348,267,0]An[1767,13,3614,3614,4280,267,0]An[1767,13,3614,3614,7310,267,0]An[1767,13,3614,3614,6611,267,0]An[1767,13,3614,3614,2452,267,0]An[1767,13,3614,3614,3551,267,0]An[1767,13,3614,3614,6635,267,0]An[1767,13,3614,3614,4911,267,0]An[1767,13,3614,3614,4275,267,0]An[1767,13,3614,3614,6783,267,0]An[1767,13,3614,3614,4918,267,0]An[1767,13,3614,3614,7110,267,0]An[1767,13,3614,3614,4338,267,0]An[1767,13,5860,3263,3140,267,0]An[1767,13,5860,2955,2050,267,0]An[1767,13,5860,2969,2492,267,0]An[1767,13,5860,2969,6644,267,0]An[1767,13,5860,4778,4963,267,0]Am[1767,13,5860,782,3146,267,0]An[1767,13,3736,3736,2497,267,0]An[1767,13,3736,3736,6482,267,0]An[1767,13,3736,3736,6025,267,0]An[1767,13,3736,3736,6026,267,0]Ak[1767,13,4753,0,6461,267,0]Ak[1767,13,4753,0,6455,267,0]Ak[1767,13,4753,0,7311,267,0]An[1767,13,6018,6018,7018,267,0]An[1767,13,6018,7285,6626,267,0]Ak[4743,13,4744,0,4351,267,0]Am[4743,13,4744,784,4328,267,0]Am[4743,13,4744,784,6758,267,0]Am[4743,13,4744,784,4346,267,0]An[4743,13,4744,4750,3565,267,0]An[4743,13,4744,4771,3584,267,0]An[4743,13,4744,4771,7154,267,0]An[4743,13,3100,1786,4943,267,0]An[4743,13,3100,3100,4955,267,0]An[5847,13,5848,5848,7023,267,0]An[5847,13,5848,5848,7137,267,0]An[5847,13,5848,5848,3529,267,0]Am[5847,13,5848,5848,282,267,0]An[5847,13,5848,5848,6031,267,0]An[5847,13,2440,2440,2065,267,0]An[5847,13,2440,2440,6073,267,0]An[5847,13,2440,2440,6654,267,0]Ak[5847,13,821,821,283,267,0]An[6989,13,6990,2446,4363,267,0]An[6989,13,2437,2437,3526,267,0]An[6989,13,2927,2927,2459,267,0]An[6989,13,2927,2927,6068,267,0]An[6989,13,2927,2927,6476,267,0]An[6989,13,2927,2927,6637,267,0]An[6989,13,2927,2927,6735,267,0]Al[6989,13,509,509,4296,267,0]Al[6989,13,509,509,4295,267,0]Al[6989,13,509,509,4925,267,0]Al[6989,13,509,509,2469,267,0]An[6989,13,1389,1389,4931,267,0]An[6989,13,1389,6520,6771,267,0]Am[6989,13,1389,825,3528,267,0]An[6989,13,1389,1389,4930,267,0]An[6989,13,1389,1389,6048,267,0]An[6989,13,3265,3265,3141,267,0]An[6989,13,2973,2973,2498,267,0]An[5848,13,5849,6425,6062,267,0]An[5848,13,5849,4769,3581,267,0]An[5848,13,5849,4769,4340,267,0]An[5848,13,5849,4769,6772,267,0]Am[5848,13,2729,901,4348,267,0]Am[5848,13,2729,901,4336,267,0]An[5848,13,2729,2729,6349,267,0]An[5848,13,2729,2729,4291,267,0]An[5848,13,2729,2729,6447,267,0]An[5848,13,2729,2729,2457,267,0]An[5848,13,2729,2729,4909,267,0]An[5848,13,2729,2729,6341,267,0]An[5848,13,2972,3264,3143,267,0]An[5848,13,2972,3264,6368,267,0]An[5848,13,2972,3738,7109,267,0]An[5848,13,2972,2972,6373,267,0]An[5848,13,2972,2972,6063,267,0]An[5848,13,2972,2972,6338,267,0]An[5848,13,2972,2972,2453,267,0]An[5848,13,2972,2972,4964,267,0]An[5848,13,2972,2972,4353,267,0]An[5848,13,2972,2972,2477,267,0]An[5848,13,2972,2972,6736,267,0]An[5848,13,2972,2972,4907,267,0]An[5848,13,2972,2972,2499,267,0]An[5848,13,2972,2972,4980,267,0]An[5848,13,2972,2972,6776,267,0]An[5848,13,2735,2735,4298,267,0]An[5848,13,2735,2735,6632,267,0]An[5848,13,2423,2423,2044,267,0]An[5848,13,2423,2423,7039,267,0]An[5848,13,2423,2423,7020,267,0]An[5848,13,2423,2423,4289,267,0]An[5848,13,4736,4736,2043,267,0]An[5848,13,1805,1805,2042,267,0]An[5848,13,1805,1805,4962,267,0]Al[5848,13,508,508,3537,267,0]Al[5848,13,508,508,6055,267,0]Al[5848,13,508,508,6650,267,0]Al[5848,13,508,508,3119,267,0]Al[5848,13,508,508,6035,267,0]Al[5848,13,508,508,6037,267,0]Al[5848,13,508,508,6485,267,0]An[5848,13,4754,4754,6462,267,0]An[5848,13,4754,4754,6457,267,0]An[5848,13,4754,4754,3568,267,0]An[5848,13,4754,4754,3597,267,0]An[5848,13,4754,4754,7312,267,0]An[5848,13,4754,4754,3573,267,0]An[5848,13,4754,4754,4957,267,0]Ai[1767,13,1768,0,3173,0,0]Ah[1767,5,3614,5670,0,0,0]Ae[6989,5,2437,0,0,0,0]Ag[6989,6,1389,825,0,0,0]Ae[5847,6,5848,0,0,0,0]Ai[1767,15,3614,0,7111,0,0]Al[1767,15,3614,3614,4338,0,0]Al[6989,15,1389,6520,6771,0,0]Al[1767,15,3614,3614,7310,0,0]Ad[5848,6,508,0,0,0,0]Al[1767,15,2416,2416,4960,0,0]Al[4743,15,3100,3100,4955,0,0]Ah[1767,4,1768,3614,0,0,0]Ae[1767,5,3614,0,0,0,0]Al[5848,15,2972,2972,6338,0,0]41Ai[1767,19,3614,0,2509,0,0]Ai[1767,19,3614,0,7159,0,0]Al[1767,15,3614,3733,2502,0,0]Ah[1767,5,1768,4750,0,0,0]Ah[4743,5,4744,4750,0,0,0]Ah[1767,5,4753,4754,0,0,0]Ah[1767,5,4715,4754,0,0,0]Ae[5848,5,4754,0,0,0,0]Al[5848,15,2735,2735,4298,0,0]Al[5848,15,2423,2423,7039,0,0]432=Ak[5848,15,2729,901,4336,0,0]Ah[1767,5,1768,4769,0,0,0]Ah[5848,5,5849,4769,0,0,0]Ah[1767,5,1768,4771,0,0,0]Ah[4743,5,4744,4771,0,0,0]Ae[5848,10,508,0,0,0,0]Ah[1767,5,3614,7069,0,0,0]Ai[1767,15,3614,0,6741,0,0]Ai[1767,15,3614,0,7111,0,0]Al[5848,15,2423,2423,2044,0,0]Ah[1767,5,3614,2441,0,0,0]?>=Ai[1767,13,1768,0,4327,0,0]Ak[4743,13,4744,784,4328,0,0]Al[5848,14,2423,2423,4289,0,0]Al[6989,13,2927,2927,2459,0,0]Ai[1767,14,3614,0,4928,0,0]Ae[1767,2,1768,0,0,0,0]Ae[5848,2,5849,0,0,0,0]Ak[1767,13,5860,782,3146,0,0]Al[6989,13,2927,2927,6476,0,0]Al[6989,14,2927,2927,6476,0,0]Al[5847,14,2440,2440,6654,0,0]Al[1767,13,3736,3736,2497,0,0]Al[1767,13,3736,3736,6482,0,0]7Ah[4743,14,4950,0,856,0,0]Ai[5848,14,2037,0,6780,0,0]Ai[1767,14,3614,0,6742,0,0]0Al[1767,13,4715,4715,7145,0,0]Al[1767,13,4715,4715,6621,0,0]Al[1767,13,3736,3736,6025,0,0]Al[1767,13,1768,0,4327,3134,0]Al[1767,13,1768,0,4345,3134,0]Al[1767,13,1768,0,3564,3134,0]Al[1767,13,1768,0,3583,3134,0]Al[1767,13,1768,0,3580,3134,0]Al[1767,13,1768,0,4339,3134,0]Ao[1767,13,3262,3262,6743,3134,0]Al[1767,13,4715,0,3567,3134,0]Al[1767,13,4715,0,3596,3134,0]Al[1767,13,4715,0,3572,3134,0]Ao[1767,13,4715,4715,6458,3134,0]Ao[1767,13,4715,4715,7195,3134,0]Ao[1767,13,2416,2416,6639,3134,0]Ao[1767,13,2416,2416,6478,3134,0]Ao[1767,13,2416,2416,7036,3134,0]Am[1767,13,502,502,6352,3134,0]Ao[1767,13,1774,1774,6475,3134,0]Ao[1767,13,1774,1774,6623,3134,0]Ao[1767,13,7007,7007,6651,3134,0]Ak[1767,13,506,0,6036,3134,0]Al[1767,13,3614,0,7111,3134,0]Al[1767,13,3614,0,6643,3134,0]Al[1767,13,3614,0,4332,3134,0]Al[1767,13,3614,0,4968,3134,0]Al[1767,13,3614,0,6642,3134,0]Al[1767,13,3614,0,4984,3134,0]Al[1767,13,3614,0,6377,3134,0]Al[1767,13,3614,0,2509,3134,0]Al[1767,13,3614,0,3593,3134,0]Al[1767,13,3614,0,4928,3134,0]Al[1767,13,3614,0,4322,3134,0]Al[1767,13,3614,0,6742,3134,0]Al[1767,13,3614,0,3174,3134,0]Ao[1767,13,3614,5864,4920,3134,0]Ao[1767,13,3614,5864,6618,3134,0]Ao[1767,13,3614,5864,6617,3134,0]Al[1767,13,3614,0,6344,3134,0]Ao[1767,13,3614,3733,2502,3134,0]Al[1767,13,3614,0,6741,3134,0]Al[1767,13,3614,0,7134,3134,0]Al[1767,13,3614,0,7151,3134,0]Al[1767,13,3614,0,6372,3134,0]Al[1767,13,3614,0,6737,3134,0]Al[1767,13,3614,0,7017,3134,0]Al[1767,13,3614,0,6656,3134,0]Al[1767,13,3614,0,7159,3134,0]Al[1767,13,3614,0,3586,3134,0]Ao[1767,13,3614,4746,4922,3134,0]Ao[1767,13,3614,4746,6619,3134,0]Ao[1767,13,3614,3614,6477,3134,0]Ao[1767,13,3614,3614,3546,3134,0]Ao[1767,13,3614,3614,6611,3134,0]Ao[1767,13,3614,3614,4918,3134,0]Ao[1767,13,3614,3614,4338,3134,0]Ao[1767,13,5860,2955,2050,3134,0]Ao[1767,13,5860,2969,2492,3134,0]Ao[1767,13,5860,2969,6644,3134,0]Ao[1767,13,5860,4778,4963,3134,0]An[1767,13,5860,782,3146,3134,0]Ao[1767,13,3736,3736,2497,3134,0]Ao[1767,13,3736,3736,6026,3134,0]Ao[5847,13,5848,5848,3529,3134,0]An[5847,13,5848,5848,282,3134,0]Al[5847,13,821,821,283,3134,0]Ao[6989,13,6990,2446,4363,3134,0]Ao[6989,13,2437,2437,3526,3134,0]Ao[6989,13,2927,2927,6068,3134,0]Am[6989,13,509,509,4295,3134,0]Am[6989,13,509,509,4925,3134,0]Am[6989,13,509,509,2469,3134,0]Ao[6989,13,1389,6520,6771,3134,0]An[6989,13,1389,825,3528,3134,0]Ao[6989,13,1389,1389,4930,3134,0]Ao[6989,13,1389,1389,6048,3134,0]Al[1767,13,1768,0,4327,3135,0]Al[1767,13,1768,0,4345,3135,0]Al[1767,13,1768,0,3583,3135,0]Al[1767,13,4715,0,3596,3135,0]Al[4743,13,4744,0,4351,3135,0]An[4743,13,4744,784,4328,3135,0]An[4743,13,4744,784,4346,3135,0]Ao[4743,13,4744,4771,3584,3135,0]Ao[4743,13,3100,1786,4943,3135,0]Ao[5848,13,4754,4754,3597,3135,0]Ai[1767,13,3614,0,2509,0,0]0Al[1767,13,1768,0,4327,4314,0]Ai[1767,12,4753,0,4314,0,0]Al[5848,12,4754,4754,4315,0,0]Ai[1767,13,1768,0,4345,0,0]Ak[4743,13,4744,784,4346,0,0]Ai[1767,13,1768,0,3580,0,0]Al[5848,13,5849,4769,3581,0,0]Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]Am[5847,13,5848,5848,282,842,0]Ak[5847,13,821,821,283,842,0]Al[5848,13,2972,2972,2499,0,0]Ai[1767,13,3614,0,7151,0,0]Ai[1767,12,3614,0,4921,0,0]Ai[1767,13,3614,0,7244,0,0]Ai[1767,13,1768,0,3564,0,0]:Al[1767,13,4715,4715,7195,0,0]Al[4743,13,4744,4750,3565,0,0];Al[1767,13,3614,3614,3551,0,0]Al[6989,14,2927,2927,2459,0,0]Ai[1767,14,3614,0,4928,0,0]Al[5848,13,5849,6425,6062,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[1767,13,3614,0,4975,0,0]Ae[1767,2,1768,0,0,0,0]Ac[896,7,897,0,0,0,0]Al[1767,13,3736,3736,6768,0,0]Al[1767,13,3736,3736,7141,0,0]Al[1767,13,3736,3736,2497,0,0]Ao[1767,13,3736,3736,6026,6768,0]Ao[1767,13,3736,3736,6026,7141,0]Aj[6989,13,509,509,4296,0,0]Al[6989,13,1389,1389,4931,0,0]Al[6989,13,2973,2973,2498,0,0]Al[5848,13,2972,3738,7109,0,0]Al[5848,13,2972,2972,2499,0,0]Ai[1767,13,1768,0,4345,0,0]Bj[4743,13,4744,0,4351,0,0,\"impl-Signature\"]Dc[4743,13,4744,0,4351,7112,0,\"impl-SignatureEncoding-for-Signature\"]Ak[4743,13,4744,784,4346,0,0]Al[4743,12,3100,3100,2506,0,0]Ao[4743,13,3100,1786,4943,2506,0]Al[1767,13,1768,0,4327,3166,0]Al[1767,13,1768,0,4345,3166,0]Al[1767,13,1768,0,3564,3166,0]Al[1767,13,1768,0,3583,3166,0]Al[1767,13,1768,0,3580,3166,0]Al[1767,13,1768,0,4339,3166,0]Ao[1767,13,3262,3262,6743,3166,0]Al[1767,13,4715,0,3567,3166,0]Al[1767,13,4715,0,3596,3166,0]Al[1767,13,4715,0,3572,3166,0]Ao[1767,13,4715,4715,6458,3166,0]Ao[1767,13,4715,4715,7195,3166,0]Ao[1767,13,2416,2416,6639,3166,0]Ao[1767,13,2416,2416,6478,3166,0]Ao[1767,13,2416,2416,7036,3166,0]Am[1767,13,502,502,6352,3166,0]Ao[1767,13,1774,1774,6475,3166,0]Ao[1767,13,1774,1774,6623,3166,0]Ao[1767,13,7007,7007,6651,3166,0]Ak[1767,13,506,0,6036,3166,0]Al[1767,13,3614,0,7111,3166,0]Al[1767,13,3614,0,6643,3166,0]Al[1767,13,3614,0,4332,3166,0]Al[1767,13,3614,0,4968,3166,0]Al[1767,13,3614,0,6642,3166,0]Al[1767,13,3614,0,4984,3166,0]Al[1767,13,3614,0,6377,3166,0]Al[1767,13,3614,0,2509,3166,0]Al[1767,13,3614,0,3593,3166,0]Al[1767,13,3614,0,4928,3166,0]Al[1767,13,3614,0,4322,3166,0]Al[1767,13,3614,0,6742,3166,0]Al[1767,13,3614,0,3174,3166,0]Ao[1767,13,3614,5864,4920,3166,0]Ao[1767,13,3614,5864,6618,3166,0]Ao[1767,13,3614,5864,6617,3166,0]Al[1767,13,3614,0,6344,3166,0]Ao[1767,13,3614,3733,2502,3166,0]Al[1767,13,3614,0,6741,3166,0]Al[1767,13,3614,0,7134,3166,0]Al[1767,13,3614,0,7151,3166,0]Al[1767,13,3614,0,6372,3166,0]Al[1767,13,3614,0,6737,3166,0]Al[1767,13,3614,0,7017,3166,0]Al[1767,13,3614,0,6656,3166,0]Al[1767,13,3614,0,7159,3166,0]Al[1767,13,3614,0,3586,3166,0]Ao[1767,13,3614,4746,4922,3166,0]Ao[1767,13,3614,4746,6619,3166,0]Ao[1767,13,3614,3614,6477,3166,0]Ao[1767,13,3614,3614,3546,3166,0]Ao[1767,13,3614,3614,6611,3166,0]Ao[1767,13,3614,3614,4918,3166,0]Ao[1767,13,3614,3614,4338,3166,0]Ao[1767,13,5860,2955,2050,3166,0]Ao[1767,13,5860,2969,2492,3166,0]Ao[1767,13,5860,2969,6644,3166,0]Ao[1767,13,5860,4778,4963,3166,0]An[1767,13,5860,782,3146,3166,0]Ao[1767,13,3736,3736,2497,3166,0]Ao[1767,13,3736,3736,6026,3166,0]Al[4743,13,4744,0,4351,3166,0]An[4743,13,4744,784,4328,3166,0]An[4743,13,4744,784,4346,3166,0]Ao[4743,13,4744,4750,3565,3166,0]Ao[4743,13,4744,4771,3584,3166,0]Ao[4743,13,3100,1786,4943,3166,0]Ao[5847,13,5848,5848,3529,3166,0]An[5847,13,5848,5848,282,3166,0]Al[5847,13,821,821,283,3166,0]Ao[6989,13,6990,2446,4363,3166,0]Ao[6989,13,2437,2437,3526,3166,0]Ao[6989,13,2927,2927,6068,3166,0]Am[6989,13,509,509,4295,3166,0]Am[6989,13,509,509,4925,3166,0]Am[6989,13,509,509,2469,3166,0]Ao[6989,13,1389,6520,6771,3166,0]An[6989,13,1389,825,3528,3166,0]Ao[6989,13,1389,1389,4930,3166,0]Ao[6989,13,1389,1389,6048,3166,0]Ao[5848,13,5849,4769,3581,3166,0]Ao[5848,13,5849,4769,4340,3166,0]Ao[5848,13,5849,4769,6772,3166,0]Ao[5848,13,2729,2729,6447,3166,0]Ao[5848,13,2972,3264,6368,3166,0]Ao[5848,13,2972,2972,2453,3166,0]Ao[5848,13,2972,2972,6736,3166,0]Ao[5848,13,2735,2735,4298,3166,0]Ao[5848,13,2423,2423,7039,3166,0]Ao[5848,13,2423,2423,7020,3166,0]Ao[5848,13,2423,2423,4289,3166,0]Ao[5848,13,1805,1805,4962,3166,0]Am[5848,13,508,508,3119,3166,0]Am[5848,13,508,508,6035,3166,0]Am[5848,13,508,508,6037,3166,0]Am[5848,13,508,508,6485,3166,0]Ao[5848,13,4754,4754,3568,3166,0]Ao[5848,13,4754,4754,3597,3166,0]Ao[5848,13,4754,4754,3573,3166,0]Dn[1767,13,1768,0,4327,3168,0,\"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey\"]Dj[1767,13,1768,0,4327,3168,0,\"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey\"]Al[1767,13,1768,0,4327,3168,0]Al[1767,13,1768,0,6757,3168,0]Al[1767,13,1768,0,4345,3168,0]0Al[1767,13,1768,0,3564,3168,0]Al[1767,13,1768,0,3583,3168,0]Al[1767,13,1768,0,7153,3168,0]Al[1767,13,1768,0,3580,3168,0]Al[1767,13,1768,0,4339,3168,0]Al[1767,13,3262,0,6640,3168,0]Al[1767,13,3262,0,7034,3168,0]Al[1767,13,3262,0,6367,3168,0]Ao[1767,13,3262,3262,6743,3168,0]Al[1767,13,4715,0,3567,3168,0]Al[1767,13,4715,0,3596,3168,0]0Al[1767,13,4715,0,3572,3168,0]Al[1767,13,4715,0,4954,3168,0]Ao[1767,13,4715,4715,7022,3168,0]Ao[1767,13,4715,4715,7145,3168,0]Ao[1767,13,4715,4715,6621,3168,0]Ao[1767,13,4715,4715,6458,3168,0]Ao[1767,13,4715,4715,7195,3168,0]Am[1767,13,507,507,6354,3168,0]Am[1767,13,507,507,7200,3168,0]Ao[1767,13,2416,2416,4960,3168,0]Ao[1767,13,2416,2416,7274,3168,0]Ao[1767,13,2416,2416,6639,3168,0]Ao[1767,13,2416,2416,7242,3168,0]Ao[1767,13,2416,2416,6478,3168,0]Ao[1767,13,2416,2416,7036,3168,0]Am[1767,13,502,502,6352,3168,0]Am[1767,13,502,502,3118,3168,0]Ao[1767,13,1774,1774,6475,3168,0]Ao[1767,13,1774,1774,7241,3168,0]Ao[1767,13,1774,1774,6623,3168,0]Ao[1767,13,7007,7007,6651,3168,0]Ak[1767,13,506,0,6036,3168,0]Al[1767,13,3614,0,3145,3168,0]Al[1767,13,3614,0,2487,3168,0]Al[1767,13,3614,0,4272,3168,0]Al[1767,13,3614,0,3525,3168,0]Al[1767,13,3614,0,6366,3168,0]Al[1767,13,3614,0,7244,3168,0]Al[1767,13,3614,0,7111,3168,0]Al[1767,13,3614,0,4973,3168,0]Al[1767,13,3614,0,4967,3168,0]Al[1767,13,3614,0,6643,3168,0]Al[1767,13,3614,0,4332,3168,0]Al[1767,13,3614,0,4968,3168,0]Al[1767,13,3614,0,6642,3168,0]Al[1767,13,3614,0,4975,3168,0]Al[1767,13,3614,0,4984,3168,0]Al[1767,13,3614,0,6377,3168,0]Al[1767,13,3614,0,6778,3168,0]D`[1767,13,3614,0,2509,3168,0,\"impl-TryFrom%3Cu128%3E-for-VarInt\"]Da[1767,13,3614,0,2509,3168,0,\"impl-TryFrom%3Cusize%3E-for-VarInt\"]Co[1767,13,3614,0,2509,3168,0,\"impl-TryFrom%3Cu64%3E-for-VarInt\"]Al[1767,13,3614,0,2509,3168,0]Al[1767,13,3614,0,2018,3168,0]Al[1767,13,3614,0,3593,3168,0]Al[1767,13,3614,0,4928,3168,0]Al[1767,13,3614,0,4322,3168,0]Al[1767,13,3614,0,6742,3168,0]Al[1767,13,3614,0,3174,3168,0]Ao[1767,13,3614,5864,4920,3168,0]Ao[1767,13,3614,5864,6618,3168,0]Ao[1767,13,3614,5864,6617,3168,0]Al[1767,13,3614,0,6344,3168,0]Ao[1767,13,3614,3733,2502,3168,0]Al[1767,13,3614,0,6741,3168,0]Al[1767,13,3614,0,7134,3168,0]Al[1767,13,3614,0,7151,3168,0]Al[1767,13,3614,0,6372,3168,0]Al[1767,13,3614,0,7367,3168,0]Al[1767,13,3614,0,6032,3168,0]Al[1767,13,3614,0,7160,3168,0]Al[1767,13,3614,0,6737,3168,0]Al[1767,13,3614,0,7017,3168,0]Ao[1767,13,3614,4746,7016,3168,0]Al[1767,13,3614,0,6656,3168,0]Al[1767,13,3614,0,7159,3168,0]Al[1767,13,3614,0,3586,3168,0]Ao[1767,13,3614,4746,4922,3168,0]Ao[1767,13,3614,4746,6619,3168,0]Ao[1767,13,3614,3614,6477,3168,0]Ao[1767,13,3614,3614,3117,3168,0]Ao[1767,13,3614,3614,3546,3168,0]Ao[1767,13,3614,3614,7227,3168,0]Ao[1767,13,3614,3614,6348,3168,0]Ao[1767,13,3614,3614,4280,3168,0]Ao[1767,13,3614,3614,7310,3168,0]Ao[1767,13,3614,3614,6611,3168,0]Ao[1767,13,3614,3614,2452,3168,0]Ao[1767,13,3614,3614,3551,3168,0]Ao[1767,13,3614,3614,6635,3168,0]Ao[1767,13,3614,3614,4911,3168,0]Ao[1767,13,3614,3614,4275,3168,0]Ao[1767,13,3614,3614,6783,3168,0]Ao[1767,13,3614,3614,4918,3168,0]Ao[1767,13,3614,3614,7110,3168,0]Ao[1767,13,3614,3614,4338,3168,0]Ao[1767,13,5860,3263,3140,3168,0]Ao[1767,13,5860,2955,2050,3168,0]Ao[1767,13,5860,2969,2492,3168,0]Ao[1767,13,5860,2969,6644,3168,0]Ao[1767,13,5860,4778,4963,3168,0]An[1767,13,5860,782,3146,3168,0]Ao[1767,13,3736,3736,2497,3168,0]Ao[1767,13,3736,3736,6482,3168,0]Ao[1767,13,3736,3736,6025,3168,0]Ao[1767,13,3736,3736,6026,3168,0]Al[1767,13,4753,0,6461,3168,0]Al[1767,13,4753,0,6455,3168,0]Al[1767,13,4753,0,7311,3168,0]Ao[1767,13,6018,6018,7018,3168,0]Ao[1767,13,6018,7285,6626,3168,0]Al[4743,13,4744,0,4351,3168,0]0An[4743,13,4744,784,4328,3168,0]Dl[4743,13,4744,784,4328,3168,0,\"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey\"]E`[4743,13,4744,784,4328,3168,0,\"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey\"]An[4743,13,4744,784,6758,3168,0]An[4743,13,4744,784,4346,3168,0]0Ao[4743,13,4744,4750,3565,3168,0]Ao[4743,13,4744,4771,3584,3168,0]Ao[4743,13,4744,4771,7154,3168,0]Ao[4743,13,3100,1786,4943,3168,0]Ao[4743,13,3100,3100,4955,3168,0]Ao[5847,13,5848,5848,7023,3168,0]Ao[5847,13,5848,5848,7137,3168,0]Ao[5847,13,5848,5848,3529,3168,0]An[5847,13,5848,5848,282,3168,0]Ao[5847,13,5848,5848,6031,3168,0]Ao[5847,13,2440,2440,2065,3168,0]Ao[5847,13,2440,2440,6073,3168,0]Ao[5847,13,2440,2440,6654,3168,0]Al[5847,13,821,821,283,3168,0]Ao[6989,13,6990,2446,4363,3168,0]Ao[6989,13,2437,2437,3526,3168,0]Ao[6989,13,2927,2927,2459,3168,0]Ao[6989,13,2927,2927,6068,3168,0]Ao[6989,13,2927,2927,6476,3168,0]Ao[6989,13,2927,2927,6637,3168,0]Ao[6989,13,2927,2927,6735,3168,0]Am[6989,13,509,509,4296,3168,0]Am[6989,13,509,509,4295,3168,0]Am[6989,13,509,509,4925,3168,0]Am[6989,13,509,509,2469,3168,0]Ao[6989,13,1389,1389,4931,3168,0]Ao[6989,13,1389,6520,6771,3168,0]An[6989,13,1389,825,3528,3168,0]Ao[6989,13,1389,1389,4930,3168,0]Ao[6989,13,1389,1389,6048,3168,0]Ao[6989,13,3265,3265,3141,3168,0]Ao[6989,13,2973,2973,2498,3168,0]Ao[5848,13,5849,6425,6062,3168,0]Ao[5848,13,5849,4769,3581,3168,0]Ao[5848,13,5849,4769,4340,3168,0]Ao[5848,13,5849,4769,6772,3168,0]An[5848,13,2729,901,4348,3168,0]An[5848,13,2729,901,4336,3168,0]Ao[5848,13,2729,2729,6349,3168,0]Ao[5848,13,2729,2729,4291,3168,0]Ao[5848,13,2729,2729,6447,3168,0]Ao[5848,13,2729,2729,2457,3168,0]Ao[5848,13,2729,2729,4909,3168,0]Ao[5848,13,2729,2729,6341,3168,0]Ao[5848,13,2972,3264,3143,3168,0]Ao[5848,13,2972,3264,6368,3168,0]Ao[5848,13,2972,3738,7109,3168,0]Ao[5848,13,2972,2972,6373,3168,0]Ao[5848,13,2972,2972,6063,3168,0]Ao[5848,13,2972,2972,6338,3168,0]Ao[5848,13,2972,2972,2453,3168,0]Ao[5848,13,2972,2972,4964,3168,0]Ao[5848,13,2972,2972,4353,3168,0]Ao[5848,13,2972,2972,2477,3168,0]Ao[5848,13,2972,2972,6736,3168,0]Ao[5848,13,2972,2972,4907,3168,0]Ao[5848,13,2972,2972,2499,3168,0]Ao[5848,13,2972,2972,4980,3168,0]Ao[5848,13,2972,2972,6776,3168,0]Ao[5848,13,2735,2735,4298,3168,0]0Ao[5848,13,2735,2735,6632,3168,0]Ao[5848,13,2423,2423,2044,3168,0]Ao[5848,13,2423,2423,7039,3168,0]Ao[5848,13,2423,2423,7020,3168,0]Ao[5848,13,2423,2423,4289,3168,0]Ao[5848,13,4736,4736,2043,3168,0]Ao[5848,13,1805,1805,2042,3168,0]Ao[5848,13,1805,1805,4962,3168,0]Am[5848,13,508,508,3537,3168,0]Am[5848,13,508,508,6055,3168,0]Am[5848,13,508,508,6650,3168,0]Am[5848,13,508,508,3119,3168,0]Am[5848,13,508,508,6035,3168,0]Am[5848,13,508,508,6037,3168,0]Am[5848,13,508,508,6485,3168,0]Ao[5848,13,4754,4754,6462,3168,0]Ao[5848,13,4754,4754,6457,3168,0]Ao[5848,13,4754,4754,3568,3168,0]Ao[5848,13,4754,4754,3597,3168,0]0Ao[5848,13,4754,4754,7312,3168,0]Ao[5848,13,4754,4754,3573,3168,0]Ao[5848,13,4754,4754,4957,3168,0]Al[1767,13,1768,0,4327,3169,0]Al[1767,13,1768,0,6757,3169,0]Al[1767,13,1768,0,4345,3169,0]Al[1767,13,1768,0,3564,3169,0]Al[1767,13,1768,0,3583,3169,0]Al[1767,13,1768,0,7153,3169,0]Al[1767,13,1768,0,3580,3169,0]Al[1767,13,1768,0,4339,3169,0]Al[1767,13,3262,0,6640,3169,0]Al[1767,13,3262,0,7034,3169,0]Al[1767,13,3262,0,6367,3169,0]Ao[1767,13,3262,3262,6743,3169,0]Al[1767,13,4715,0,3567,3169,0]Al[1767,13,4715,0,3596,3169,0]Al[1767,13,4715,0,3572,3169,0]Al[1767,13,4715,0,4954,3169,0]Ao[1767,13,4715,4715,7022,3169,0]Ao[1767,13,4715,4715,7145,3169,0]Ao[1767,13,4715,4715,6621,3169,0]Ao[1767,13,4715,4715,6458,3169,0]Ao[1767,13,4715,4715,7195,3169,0]Am[1767,13,507,507,6354,3169,0]Am[1767,13,507,507,7200,3169,0]Ao[1767,13,2416,2416,4960,3169,0]Ao[1767,13,2416,2416,7274,3169,0]Ao[1767,13,2416,2416,6639,3169,0]Ao[1767,13,2416,2416,7242,3169,0]Ao[1767,13,2416,2416,6478,3169,0]Ao[1767,13,2416,2416,7036,3169,0]Am[1767,13,502,502,6352,3169,0]Am[1767,13,502,502,3118,3169,0]Ao[1767,13,1774,1774,6475,3169,0]Ao[1767,13,1774,1774,7241,3169,0]Ao[1767,13,1774,1774,6623,3169,0]Ao[1767,13,7007,7007,6651,3169,0]Ak[1767,13,506,0,6036,3169,0]Al[1767,13,3614,0,3145,3169,0]Al[1767,13,3614,0,2487,3169,0]Al[1767,13,3614,0,4272,3169,0]Al[1767,13,3614,0,3525,3169,0]Al[1767,13,3614,0,6366,3169,0]Al[1767,13,3614,0,7244,3169,0]Al[1767,13,3614,0,7111,3169,0]Al[1767,13,3614,0,4973,3169,0]Al[1767,13,3614,0,4967,3169,0]Al[1767,13,3614,0,6643,3169,0]Al[1767,13,3614,0,4332,3169,0]Al[1767,13,3614,0,4968,3169,0]Al[1767,13,3614,0,6642,3169,0]Al[1767,13,3614,0,4975,3169,0]Al[1767,13,3614,0,4984,3169,0]Al[1767,13,3614,0,6377,3169,0]Al[1767,13,3614,0,6778,3169,0]Al[1767,13,3614,0,2509,3169,0]Al[1767,13,3614,0,2018,3169,0]Al[1767,13,3614,0,3593,3169,0]Al[1767,13,3614,0,4928,3169,0]Al[1767,13,3614,0,4322,3169,0]Al[1767,13,3614,0,6742,3169,0]Al[1767,13,3614,0,3174,3169,0]Ao[1767,13,3614,5864,4920,3169,0]Ao[1767,13,3614,5864,6618,3169,0]Ao[1767,13,3614,5864,6617,3169,0]Al[1767,13,3614,0,6344,3169,0]Ao[1767,13,3614,3733,2502,3169,0]Al[1767,13,3614,0,6741,3169,0]Al[1767,13,3614,0,7134,3169,0]Al[1767,13,3614,0,7151,3169,0]Al[1767,13,3614,0,6372,3169,0]Al[1767,13,3614,0,7367,3169,0]Al[1767,13,3614,0,6032,3169,0]Al[1767,13,3614,0,7160,3169,0]Al[1767,13,3614,0,6737,3169,0]Al[1767,13,3614,0,7017,3169,0]Ao[1767,13,3614,4746,7016,3169,0]Al[1767,13,3614,0,6656,3169,0]Al[1767,13,3614,0,7159,3169,0]Al[1767,13,3614,0,3586,3169,0]Ao[1767,13,3614,4746,4922,3169,0]Ao[1767,13,3614,4746,6619,3169,0]Ao[1767,13,3614,3614,6477,3169,0]Ao[1767,13,3614,3614,3117,3169,0]Ao[1767,13,3614,3614,3546,3169,0]Ao[1767,13,3614,3614,7227,3169,0]Ao[1767,13,3614,3614,6348,3169,0]Ao[1767,13,3614,3614,4280,3169,0]Ao[1767,13,3614,3614,7310,3169,0]Ao[1767,13,3614,3614,6611,3169,0]Ao[1767,13,3614,3614,2452,3169,0]Ao[1767,13,3614,3614,3551,3169,0]Ao[1767,13,3614,3614,6635,3169,0]Ao[1767,13,3614,3614,4911,3169,0]Ao[1767,13,3614,3614,4275,3169,0]Ao[1767,13,3614,3614,6783,3169,0]Ao[1767,13,3614,3614,4918,3169,0]Ao[1767,13,3614,3614,7110,3169,0]Ao[1767,13,3614,3614,4338,3169,0]Ao[1767,13,5860,3263,3140,3169,0]Ao[1767,13,5860,2955,2050,3169,0]Ao[1767,13,5860,2969,2492,3169,0]Ao[1767,13,5860,2969,6644,3169,0]Ao[1767,13,5860,4778,4963,3169,0]An[1767,13,5860,782,3146,3169,0]Ao[1767,13,3736,3736,2497,3169,0]Ao[1767,13,3736,3736,6482,3169,0]Ao[1767,13,3736,3736,6025,3169,0]Ao[1767,13,3736,3736,6026,3169,0]Al[1767,13,4753,0,6461,3169,0]Al[1767,13,4753,0,6455,3169,0]Al[1767,13,4753,0,7311,3169,0]Ao[1767,13,6018,6018,7018,3169,0]Ao[1767,13,6018,7285,6626,3169,0]Al[4743,13,4744,0,4351,3169,0]An[4743,13,4744,784,4328,3169,0]An[4743,13,4744,784,6758,3169,0]An[4743,13,4744,784,4346,3169,0]Ao[4743,13,4744,4750,3565,3169,0]Ao[4743,13,4744,4771,3584,3169,0]Ao[4743,13,4744,4771,7154,3169,0]Ao[4743,13,3100,1786,4943,3169,0]Ao[4743,13,3100,3100,4955,3169,0]Ao[5847,13,5848,5848,7023,3169,0]Ao[5847,13,5848,5848,7137,3169,0]Ao[5847,13,5848,5848,3529,3169,0]An[5847,13,5848,5848,282,3169,0]Ao[5847,13,5848,5848,6031,3169,0]Ao[5847,13,2440,2440,2065,3169,0]Ao[5847,13,2440,2440,6073,3169,0]Ao[5847,13,2440,2440,6654,3169,0]Al[5847,13,821,821,283,3169,0]Ao[6989,13,6990,2446,4363,3169,0]Ao[6989,13,2437,2437,3526,3169,0]Ao[6989,13,2927,2927,2459,3169,0]Ao[6989,13,2927,2927,6068,3169,0]Ao[6989,13,2927,2927,6476,3169,0]Ao[6989,13,2927,2927,6637,3169,0]Ao[6989,13,2927,2927,6735,3169,0]Am[6989,13,509,509,4296,3169,0]Am[6989,13,509,509,4295,3169,0]Am[6989,13,509,509,4925,3169,0]Am[6989,13,509,509,2469,3169,0]Ao[6989,13,1389,1389,4931,3169,0]Ao[6989,13,1389,6520,6771,3169,0]An[6989,13,1389,825,3528,3169,0]Ao[6989,13,1389,1389,4930,3169,0]Ao[6989,13,1389,1389,6048,3169,0]Ao[6989,13,3265,3265,3141,3169,0]Ao[6989,13,2973,2973,2498,3169,0]Ao[5848,13,5849,6425,6062,3169,0]Ao[5848,13,5849,4769,3581,3169,0]Ao[5848,13,5849,4769,4340,3169,0]Ao[5848,13,5849,4769,6772,3169,0]An[5848,13,2729,901,4348,3169,0]An[5848,13,2729,901,4336,3169,0]Ao[5848,13,2729,2729,6349,3169,0]Ao[5848,13,2729,2729,4291,3169,0]Ao[5848,13,2729,2729,6447,3169,0]Ao[5848,13,2729,2729,2457,3169,0]Ao[5848,13,2729,2729,4909,3169,0]Ao[5848,13,2729,2729,6341,3169,0]Ao[5848,13,2972,3264,3143,3169,0]Ao[5848,13,2972,3264,6368,3169,0]Ao[5848,13,2972,3738,7109,3169,0]Ao[5848,13,2972,2972,6373,3169,0]Ao[5848,13,2972,2972,6063,3169,0]Ao[5848,13,2972,2972,6338,3169,0]Ao[5848,13,2972,2972,2453,3169,0]Ao[5848,13,2972,2972,4964,3169,0]Ao[5848,13,2972,2972,4353,3169,0]Ao[5848,13,2972,2972,2477,3169,0]Ao[5848,13,2972,2972,6736,3169,0]Ao[5848,13,2972,2972,4907,3169,0]Ao[5848,13,2972,2972,2499,3169,0]Ao[5848,13,2972,2972,4980,3169,0]Ao[5848,13,2972,2972,6776,3169,0]Ao[5848,13,2735,2735,4298,3169,0]Ao[5848,13,2735,2735,6632,3169,0]Ao[5848,13,2423,2423,2044,3169,0]Ao[5848,13,2423,2423,7039,3169,0]Ao[5848,13,2423,2423,7020,3169,0]Ao[5848,13,2423,2423,4289,3169,0]Ao[5848,13,4736,4736,2043,3169,0]Ao[5848,13,1805,1805,2042,3169,0]Ao[5848,13,1805,1805,4962,3169,0]Am[5848,13,508,508,3537,3169,0]Am[5848,13,508,508,6055,3169,0]Am[5848,13,508,508,6650,3169,0]Am[5848,13,508,508,3119,3169,0]Am[5848,13,508,508,6035,3169,0]Am[5848,13,508,508,6037,3169,0]Am[5848,13,508,508,6485,3169,0]Ao[5848,13,4754,4754,6462,3169,0]Ao[5848,13,4754,4754,6457,3169,0]Ao[5848,13,4754,4754,3568,3169,0]Ao[5848,13,4754,4754,3597,3169,0]Ao[5848,13,4754,4754,7312,3169,0]Ao[5848,13,4754,4754,3573,3169,0]Ao[5848,13,4754,4754,4957,3169,0]Al[1767,13,3614,0,3145,4354,0]Al[1767,13,3614,0,2487,4354,0]Al[1767,13,3614,0,4272,4354,0]Al[1767,13,3614,0,3525,4354,0]Al[1767,13,3614,0,6366,4354,0]Ao[1767,13,3614,3614,6635,4354,0]Ao[1767,13,3614,3614,4911,4354,0]Ah[1767,5,3614,5670,0,0,0]Ae[1767,6,3614,0,0,0,0]Ai[4743,19,4744,0,4351,0,0]1Al[5848,15,2423,2423,7039,0,0]Al[5848,15,2423,2423,7020,0,0]Ae[5848,5,2423,0,0,0,0]Ae[5848,6,2729,0,0,0,0]Al[1767,15,3614,3733,2502,0,0]Af[1767,10,4715,0,0,0,0]Ad[6989,5,509,0,0,0,0]0Ae[5848,6,2735,0,0,0,0]Al[5848,15,2729,2729,6349,0,0]Al[5848,15,2972,2972,6776,0,0]Al[5848,15,2972,2972,4980,0,0]Al[1767,15,3614,3614,7227,0,0]Al[1767,15,3614,3614,7310,0,0]Al[1767,15,4715,4715,6621,0,0]Ai[1767,10,4753,4754,0,0,0]Af[5848,10,4754,0,0,0,0]Ai[1767,15,4715,0,4954,0,0]0Al[5848,15,4754,4754,4957,0,0]Ah[1767,5,3614,2441,0,0,0]Al[1767,15,2416,2416,4960,0,0]Ag[1767,5,1768,784,0,0,0]Ag[4743,5,4744,784,0,0,0];Ai[1767,15,3614,0,6642,0,0]Ah[1767,6,3614,6328,0,0,0]Ag[5848,6,2729,901,0,0,0]Ah[1767,4,1768,3614,0,0,0]Ae[1767,6,3614,0,0,0,0]Ah[1767,5,1768,4769,0,0,0]Ah[5848,5,5849,4769,0,0,0]Al[1767,15,3614,3614,6477,0,0]Al[5848,15,2972,2972,4907,0,0]:96Ah[4743,5,4744,3255,0,0,0]Ae[5848,5,2972,0,0,0,0]Al[5848,15,1805,1805,2042,0,0]Al[5848,15,2729,2729,6349,0,0]Al[5848,15,4736,4736,2043,0,0]Ah[6989,5,6990,2446,0,0,0]Al[1767,13,3614,3614,4918,0,0]Al[1767,13,4715,4715,7195,0,0]Al[1767,13,1774,1774,7241,0,0]Al[1767,13,1768,0,6757,6042,0]Al[1767,13,1768,0,7153,6042,0]Al[1767,13,4715,0,4954,6042,0]Ao[1767,13,4715,4715,7145,6042,0]Ao[1767,13,4715,4715,6621,6042,0]Ao[1767,13,2416,2416,4960,6042,0]Ai[1767,14,4949,0,7045,0,0]Ai[1767,14,4949,0,6604,0,0]Ai[1767,14,4949,0,4316,0,0]Ah[1767,14,4949,0,883,0,0]Ai[1767,14,4949,0,6763,0,0]Ai[1767,14,4949,0,6449,0,0]Ah[1767,14,7144,0,877,0,0]Ai[1767,14,6620,0,7205,0,0]Ai[1767,14,6620,0,4312,0,0]Ah[1767,14,6620,0,878,0,0]Ao[1767,13,3614,4746,7016,6042,0]Ao[1767,13,3614,3614,7227,6042,0]Ao[1767,13,3614,3614,6348,6042,0]Ao[1767,13,3614,3614,4280,6042,0]Ao[1767,13,3614,3614,7310,6042,0]Ao[1767,13,3614,3614,4275,6042,0]Ao[1767,13,3614,3614,7110,6042,0]Ai[1767,14,7015,0,2024,0,0]Ai[1767,14,7015,0,6040,0,0]Ai[1767,14,7015,0,4946,0,0]Ai[1767,14,6345,0,3121,0,0]Ai[1767,14,6345,0,4912,0,0]Ai[1767,14,4279,0,4937,0,0]Ai[1767,14,7226,0,6027,0,0]Ai[1767,14,7226,0,6066,0,0]Ai[1767,14,7226,0,4308,0,0]Ai[1767,14,7226,0,2051,0,0]Ai[1767,14,7309,0,6624,0,0]Ai[1767,14,7309,0,3534,0,0]Ai[1767,14,7309,0,4309,0,0]Ai[1767,14,4274,0,6738,0,0]Ai[1767,14,4274,0,6074,0,0]Ai[1767,14,4274,0,7052,0,0]Ao[1767,13,3736,3736,6025,6042,0]Ai[1767,14,6024,0,4913,0,0]Ai[1767,14,6755,0,2462,0,0]Ah[1767,14,6755,0,276,0,0]Ai[1767,14,6755,0,7196,0,0]Al[1767,13,4753,0,6461,6042,0]Al[1767,13,4753,0,6455,6042,0]Al[1767,13,4753,0,7311,6042,0]Ai[1767,14,4949,0,7045,0,0]Ai[1767,14,4949,0,6604,0,0]Ai[1767,14,4949,0,4316,0,0]Ah[1767,14,4949,0,883,0,0]Ai[1767,14,4949,0,6763,0,0]Ai[1767,14,4949,0,6449,0,0]Ai[1767,14,6459,0,7235,0,0]Ai[1767,14,6459,0,6751,0,0]Ai[1767,14,6450,0,7146,0,0]Ai[1767,14,6450,0,6470,0,0]Ai[1767,14,6450,0,7029,0,0]An[4743,13,4744,784,6758,6042,0]Ao[4743,13,4744,4771,7154,6042,0]Ao[4743,13,3100,3100,4955,6042,0]Ah[4743,14,4950,0,856,0,0]Ai[4743,14,4950,0,3576,0,0]Ai[4743,14,4950,0,3541,0,0]Ai[4743,14,4950,0,2511,0,0]Ai[4743,14,6756,0,2463,0,0]Ah[4743,14,6756,0,277,0,0]Ai[4743,14,6756,0,7197,0,0]An[5848,13,2729,901,4348,6042,0]An[5848,13,2729,901,4336,6042,0]Ao[5848,13,2729,2729,6349,6042,0]Ao[5848,13,2729,2729,4291,6042,0]Ai[5848,14,4335,0,3578,0,0]Ai[5848,14,4335,0,6069,0,0]Ai[5848,14,4347,0,6070,0,0]Ai[5848,14,4347,0,7232,0,0]Ai[5848,14,4347,0,6038,0,0]Ai[5848,14,6346,0,7201,0,0]Ai[5848,14,6346,0,6746,0,0]Ai[5848,14,6346,0,4359,0,0]Ai[5848,14,6346,0,4299,0,0]Ah[5848,14,6346,0,844,0,0]Ai[5848,14,6346,0,7340,0,0]Ai[5848,14,6346,0,3171,0,0]Ai[5848,14,6346,0,7239,0,0]Ai[5848,14,6346,0,6058,0,0]Ah[5848,14,6346,0,289,0,0]Ai[5848,14,4290,0,7105,0,0]Ah[5848,14,4290,0,274,0,0]Ai[5848,14,4290,0,3162,0,0]Af[5848,14,4290,0,9,0,0]Ai[5848,14,4290,0,4933,0,0]Ai[5848,14,4290,0,7368,0,0]Ai[5848,14,4290,0,6769,0,0]Ai[5848,14,4290,0,6364,0,0]Ai[5848,14,4290,0,7370,0,0]Ai[5848,14,4290,0,7315,0,0]Ao[5848,13,2972,2972,4980,6042,0]Ao[5848,13,2972,2972,6776,6042,0]Ai[5848,14,6775,0,3139,0,0]Ai[5848,14,6775,0,7329,0,0]Ai[5848,14,6775,0,4304,0,0]Ai[5848,14,6775,0,7313,0,0]Ai[5848,14,6775,0,6483,0,0]Ai[5848,14,4979,0,4306,0,0]Ai[5848,14,4979,0,4329,0,0]Ai[5848,14,4979,0,6652,0,0]Ai[5848,14,4979,0,6733,0,0]Ai[5848,14,4979,0,6059,0,0]Ai[5848,14,4979,0,6731,0,0]Ao[5848,13,2735,2735,6632,6042,0]Ai[5848,14,6627,0,6486,0,0]Ai[5848,14,6627,0,7050,0,0]Ao[5848,13,2423,2423,2044,6042,0]Ai[5848,14,2037,0,6780,0,0]Ai[5848,14,2037,0,6464,0,0]Ai[5848,14,2037,0,2061,0,0]Ai[5848,14,2037,0,6629,0,0]Ai[5848,14,2037,0,7027,0,0]Ai[5848,14,2037,0,6358,0,0]Ai[5848,14,2037,0,7025,0,0]Ai[5848,14,2037,0,7419,0,0]Ai[5848,14,2037,0,3590,0,0]Ao[5848,13,4736,4736,2043,6042,0]Ai[5848,14,2036,0,7331,0,0]Ai[5848,14,2036,0,4360,0,0]Ai[5848,14,2036,0,6487,0,0]Ai[5848,14,2036,0,6628,0,0]Ai[5848,14,2036,0,7040,0,0]Ai[5848,14,2036,0,7208,0,0]Ai[5848,14,2036,0,7230,0,0]Ao[5848,13,1805,1805,2042,6042,0]Ai[5848,14,2035,0,3122,0,0]Ai[5848,14,2035,0,4914,0,0]Ai[5848,14,2035,0,4357,0,0]Am[5848,13,508,508,3537,6042,0]Am[5848,13,508,508,6055,6042,0]Am[5848,13,508,508,6650,6042,0]Ai[5848,14,3536,0,3163,0,0]Ai[5848,14,3536,0,4940,0,0]Ai[5848,14,3536,0,6064,0,0]Ai[5848,14,3536,0,6056,0,0]Ai[5848,14,3536,0,3154,0,0]Ai[5848,14,3536,0,6749,0,0]Ai[5848,14,6054,0,4951,0,0]Ai[5848,14,6054,0,6361,0,0]Ao[5848,13,4754,4754,6462,6042,0]Ao[5848,13,4754,4754,6457,6042,0]Ao[5848,13,4754,4754,7312,6042,0]Ao[5848,13,4754,4754,4957,6042,0]Ai[5848,14,4952,0,7046,0,0]Ai[5848,14,4952,0,6605,0,0]Ai[5848,14,4952,0,4317,0,0]Ah[5848,14,4952,0,884,0,0]Ai[5848,14,4952,0,6764,0,0]Ai[5848,14,4952,0,6452,0,0]Ai[5848,14,6460,0,7236,0,0]Ai[5848,14,6460,0,6752,0,0]Ai[5848,14,6451,0,7147,0,0]Ai[5848,14,6451,0,6471,0,0]Ai[5848,14,6451,0,7030,0,0]Al[6989,14,2927,2927,6476,0,0]Aj[6989,14,509,509,4295,0,0]Al[6989,14,1389,1389,4930,0,0]Al[6989,14,1389,1389,6048,0,0]Al[5848,14,2972,2972,4964,0,0]Al[6989,14,2927,2927,6637,0,0]2Al[5848,14,2972,2972,2477,0,0]Ai[1767,12,3614,0,4921,0,0]Al[1767,13,3614,3614,3546,0,0]Ai[1767,14,3614,0,3593,0,0]Ai[5848,14,7019,0,4285,0,0]Ai[5848,14,7038,0,4286,0,0]Al[1767,13,1768,0,4327,4323,0]Al[1767,13,1768,0,6757,4323,0]Al[1767,13,1768,0,4345,4323,0]Al[1767,13,1768,0,3564,4323,0]Al[1767,13,1768,0,3583,4323,0]Al[1767,13,1768,0,7153,4323,0]Al[1767,13,1768,0,3580,4323,0]Al[1767,13,1768,0,4339,4323,0]Al[1767,13,3262,0,6640,4323,0]Al[1767,13,3262,0,7034,4323,0]Al[1767,13,3262,0,6367,4323,0]Ao[1767,13,3262,3262,6743,4323,0]Al[1767,13,4715,0,3567,4323,0]Al[1767,13,4715,0,3596,4323,0]Al[1767,13,4715,0,3572,4323,0]Al[1767,13,4715,0,3572,3530,0]Al[1767,13,4715,0,4954,4323,0]Ao[1767,13,4715,4715,7022,4323,0]Ao[1767,13,4715,4715,7145,4323,0]Ao[1767,13,4715,4715,6621,4323,0]Ao[1767,13,4715,4715,6458,4323,0]Ao[1767,13,4715,4715,7195,4323,0]Am[1767,13,507,507,6354,4323,0]Am[1767,13,507,507,7200,4323,0]Ao[1767,13,2416,2416,4960,4323,0]Ao[1767,13,2416,2416,7274,4323,0]Ao[1767,13,2416,2416,6639,4323,0]Ao[1767,13,2416,2416,7242,4323,0]Ao[1767,13,2416,2416,6478,4323,0]Ao[1767,13,2416,2416,7036,4323,0]Am[1767,13,502,502,6352,4323,0]Am[1767,13,502,502,3118,4323,0]Ao[1767,13,1774,1774,6475,4323,0]Ao[1767,13,1774,1774,7241,4323,0]Ao[1767,13,1774,1774,6623,4323,0]Ao[1767,13,7007,7007,6651,4323,0]Ak[1767,13,506,0,6036,4323,0]Al[1767,13,3614,0,3145,4323,0]Al[1767,13,3614,0,2487,4323,0]Al[1767,13,3614,0,4272,4323,0]Al[1767,13,3614,0,3525,4323,0]Al[1767,13,3614,0,6366,4323,0]Al[1767,13,3614,0,7244,4323,0]Al[1767,13,3614,0,7111,4323,0]Al[1767,13,3614,0,4973,4323,0]Al[1767,13,3614,0,4967,4323,0]Al[1767,13,3614,0,6643,4323,0]Al[1767,13,3614,0,4332,4323,0]Al[1767,13,3614,0,4968,4323,0]Al[1767,13,3614,0,6642,4323,0]Al[1767,13,3614,0,4975,4323,0]Al[1767,13,3614,0,4984,4323,0]Al[1767,13,3614,0,6377,4323,0]Al[1767,13,3614,0,6778,4323,0]Al[1767,13,3614,0,2509,4323,0]Al[1767,13,3614,0,2018,4323,0]Al[1767,13,3614,0,3593,4323,0]Al[1767,13,3614,0,4928,4323,0]Al[1767,13,3614,0,4322,4323,0]Al[1767,13,3614,0,6742,4323,0]Al[1767,13,3614,0,3174,4323,0]Ao[1767,13,3614,5864,4920,4323,0]Ao[1767,13,3614,5864,6618,4323,0]Ao[1767,13,3614,5864,6617,4323,0]Al[1767,13,3614,0,6344,4323,0]Ao[1767,13,3614,3733,2502,4323,0]Al[1767,13,3614,0,6741,4323,0]Al[1767,13,3614,0,7134,4323,0]Al[1767,13,3614,0,7151,4323,0]Al[1767,13,3614,0,6372,4323,0]Al[1767,13,3614,0,7367,4323,0]Al[1767,13,3614,0,6032,4323,0]Al[1767,13,3614,0,7160,4323,0]Al[1767,13,3614,0,6737,4323,0]Al[1767,13,3614,0,7017,4323,0]Ao[1767,13,3614,4746,7016,4323,0]Al[1767,13,3614,0,6656,4323,0]Al[1767,13,3614,0,7159,4323,0]Al[1767,13,3614,0,3586,4323,0]Ao[1767,13,3614,4746,4922,4323,0]Ao[1767,13,3614,4746,6619,4323,0]Ao[1767,13,3614,3614,6477,4323,0]Ao[1767,13,3614,3614,3117,4323,0]Ao[1767,13,3614,3614,3546,4323,0]Ao[1767,13,3614,3614,7227,4323,0]Ao[1767,13,3614,3614,6348,4323,0]Ao[1767,13,3614,3614,4280,4323,0]Ao[1767,13,3614,3614,7310,4323,0]Ao[1767,13,3614,3614,6611,4323,0]Ao[1767,13,3614,3614,2452,4323,0]Ao[1767,13,3614,3614,3551,4323,0]Ao[1767,13,3614,3614,6635,4323,0]Ao[1767,13,3614,3614,4911,4323,0]Ao[1767,13,3614,3614,4275,4323,0]Ao[1767,13,3614,3614,6783,4323,0]Ao[1767,13,3614,3614,4918,4323,0]Ao[1767,13,3614,3614,7110,4323,0]Ao[1767,13,3614,3614,4338,4323,0]Ao[1767,13,5860,3263,3140,4323,0]Ao[1767,13,5860,2955,2050,4323,0]Ao[1767,13,5860,2969,2492,4323,0]Ao[1767,13,5860,2969,6644,4323,0]Ao[1767,13,5860,4778,4963,4323,0]An[1767,13,5860,782,3146,4323,0]Ao[1767,13,3736,3736,2497,4323,0]Ao[1767,13,3736,3736,6482,4323,0]Ao[1767,13,3736,3736,6025,4323,0]Ao[1767,13,3736,3736,6026,4323,0]Al[1767,13,4753,0,6461,4323,0]Al[1767,13,4753,0,6455,4323,0]Al[1767,13,4753,0,7311,4323,0]Ao[1767,13,6018,6018,7018,4323,0]Ao[1767,13,6018,7285,6626,4323,0]Ao[5847,13,5848,5848,7023,4323,0]Ao[5847,13,5848,5848,7137,4323,0]Ao[5847,13,5848,5848,3529,4323,0]An[5847,13,5848,5848,282,4323,0]Ao[5847,13,5848,5848,6031,4323,0]Ao[5847,13,2440,2440,2065,4323,0]Ao[5847,13,2440,2440,6073,4323,0]Ao[5847,13,2440,2440,6654,4323,0]Al[5847,13,821,821,283,4323,0]Ao[5848,13,5849,6425,6062,4323,0]Ao[5848,13,5849,4769,3581,4323,0]Ao[5848,13,5849,4769,4340,4323,0]Ao[5848,13,5849,4769,6772,4323,0]An[5848,13,2729,901,4348,4323,0]An[5848,13,2729,901,4336,4323,0]Ao[5848,13,2729,2729,6349,4323,0]Ao[5848,13,2729,2729,4291,4323,0]Ao[5848,13,2729,2729,6447,4323,0]Ao[5848,13,2729,2729,2457,4323,0]Ao[5848,13,2729,2729,4909,4323,0]Ao[5848,13,2729,2729,6341,4323,0]Ao[5848,13,2972,3264,3143,4323,0]Ao[5848,13,2972,3264,6368,4323,0]Ao[5848,13,2972,3738,7109,4323,0]Ao[5848,13,2972,2972,6373,4323,0]Ao[5848,13,2972,2972,6063,4323,0]Ao[5848,13,2972,2972,6338,4323,0]Ao[5848,13,2972,2972,2453,4323,0]Ao[5848,13,2972,2972,4964,4323,0]Ao[5848,13,2972,2972,4353,4323,0]Ao[5848,13,2972,2972,2477,4323,0]Ao[5848,13,2972,2972,6736,4323,0]Ao[5848,13,2972,2972,4907,4323,0]Ao[5848,13,2972,2972,2499,4323,0]Ao[5848,13,2972,2972,4980,4323,0]Ao[5848,13,2972,2972,6776,4323,0]Ao[5848,13,2735,2735,4298,4323,0]Ao[5848,13,2735,2735,6632,4323,0]Ao[5848,13,2423,2423,2044,4323,0]Ao[5848,13,2423,2423,7039,4323,0]Ao[5848,13,2423,2423,7020,4323,0]Ao[5848,13,2423,2423,4289,4323,0]Ao[5848,13,4736,4736,2043,4323,0]Ao[5848,13,1805,1805,2042,4323,0]Ao[5848,13,1805,1805,4962,4323,0]Am[5848,13,508,508,3537,4323,0]Am[5848,13,508,508,6055,4323,0]Am[5848,13,508,508,6650,4323,0]Am[5848,13,508,508,3119,4323,0]Am[5848,13,508,508,6035,4323,0]Am[5848,13,508,508,6037,4323,0]Am[5848,13,508,508,6485,4323,0]Ao[5848,13,4754,4754,6462,4323,0]Ao[5848,13,4754,4754,6457,4323,0]Ao[5848,13,4754,4754,3568,4323,0]Ao[5848,13,4754,4754,3597,4323,0]Ao[5848,13,4754,4754,7312,4323,0]Ao[5848,13,4754,4754,3573,3530,0]Ao[5848,13,4754,4754,3573,4323,0]Ao[5848,13,4754,4754,4957,4323,0]Ae[1767,2,1768,0,0,0,0]Al[1767,13,3614,3614,3117,0,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,13,6018,7285,6626,0,0]Al[1767,13,3262,0,6640,3555,0]Al[1767,13,3262,0,7034,3555,0]Al[1767,13,3262,0,6367,3555,0]Ao[1767,13,5860,3263,3140,3555,0]Ao[6989,13,3265,3265,3141,3555,0]Ao[5848,13,2972,3264,3143,3555,0]Ai[1767,13,1768,0,4327,0,0]Ak[4743,13,4744,784,4328,0,0]Ai[5848,14,2037,0,6464,0,0]Dl[1767,13,1768,0,3580,6355,0,\"impl-FromIterator%3CRelayNode%3E-for-RelayMap\"]Dk[1767,13,1768,0,3580,6355,0,\"impl-FromIterator%3CRelayUrl%3E-for-RelayMap\"]Dn[5848,13,5849,4769,3581,6355,0,\"impl-FromIterator%3CRelayUrl%3E-for-RelayMap\"]Do[5848,13,5849,4769,3581,6355,0,\"impl-FromIterator%3CRelayNode%3E-for-RelayMap\"]Am[5848,13,508,508,6485,6355,0]Al[1767,14,5860,2969,2492,0,0]0Ae[5848,2,2956,0,0,0,0]Al[6989,13,1389,1389,4931,0,0]Al[5848,13,2972,2972,2499,0,0]0Al[6989,13,6990,2446,4363,0,0]Ai[1767,13,3614,0,3586,0,0]Al[1767,13,3614,3614,4911,0,0]Ab[4743,3,0,0,0,0,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,14,3262,3262,6743,0,0]Ai[1767,13,3614,0,6372,0,0]Ai[1767,14,3614,0,4928,0,0]3Al[4743,13,3100,1786,4943,0,0]Ah[1767,2,1768,5849,0,0,0]Al[1767,13,4715,4715,6458,0,0]Ai[1767,14,6622,0,4923,0,0]Ae[5848,2,5849,0,0,0,0]Al[1767,14,6018,7285,6626,0,0]Ao[5848,13,2729,2729,2457,2503,0]Ao[5848,13,2729,2729,6341,2503,0]Bk[1767,13,3614,0,4967,0,0,\"impl-RecvStream\"]Cl[1767,13,3614,0,4967,4276,0,\"impl-AsyncRead-for-RecvStream\"]Al[1767,13,3614,3614,3117,0,0]Al[5848,13,2729,2729,6447,0,0]Ai[5848,14,4290,0,6769,0,0]Al[5848,13,2972,2972,2499,0,0]Al[1767,13,3614,3614,4338,0,0]Ai[1767,13,1768,0,3564,0,0]Ai[1767,14,1768,0,3564,0,0]Ai[1767,13,4715,0,3567,0,0]Al[4743,13,4744,4750,3565,0,0]Al[4743,14,4744,4750,3565,0,0]Al[5848,13,4754,4754,3568,0,0]Ai[1767,12,3614,0,7138,0,0]Ac[896,7,897,0,0,0,0]Ai[1767,14,3262,0,7034,0,0]00Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]Al[1767,13,1768,0,4327,4349,0]Al[1767,13,1768,0,4345,4349,0]Al[1767,13,1768,0,3564,4349,0]Al[1767,13,1768,0,3583,4349,0]Al[1767,13,1768,0,4339,4349,0]Al[1767,13,3262,0,6640,4349,0]Al[1767,13,3262,0,7034,4349,0]Ao[1767,13,3262,3262,6743,4349,0]Ao[1767,13,3614,5864,4920,4349,0]Ao[1767,13,3614,5864,6618,4349,0]Ao[1767,13,3614,5864,6617,4349,0]Ao[1767,13,3614,3733,2502,4349,0]Ao[1767,13,5860,3263,3140,4349,0]Ao[1767,13,5860,2969,2492,4349,0]Ao[1767,13,5860,2969,6644,4349,0]Al[4743,13,4744,0,4351,4349,0]An[4743,13,4744,784,4328,4349,0]An[4743,13,4744,784,4346,4349,0]Ao[4743,13,4744,4750,3565,4349,0]Ao[4743,13,4744,4771,3584,4349,0]Al[4743,13,3100,3100,2506,0,0]Ao[4743,13,3100,1786,4943,4349,0]Ao[6989,13,2927,2927,2459,4349,0]Ao[6989,13,2927,2927,6068,4349,0]Ao[6989,13,2927,2927,6476,4349,0]Ao[6989,13,2927,2927,6637,4349,0]Ao[6989,13,2927,2927,6735,4349,0]Am[6989,13,509,509,4295,4349,0]Ao[6989,13,1389,6520,6771,4349,0]An[6989,13,1389,825,3528,4349,0]Ao[6989,13,1389,1389,4930,4349,0]Ao[6989,13,1389,1389,6048,4349,0]Ao[5848,13,5849,4769,4340,4349,0]Ao[5848,13,5849,4769,6772,4349,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,13,3614,3614,4918,0,0]Al[1767,13,1774,1774,6475,0,0]Al[1767,13,1768,0,4327,3588,0]Al[1767,13,1768,0,6757,3588,0]Al[1767,13,1768,0,3583,3588,0]Al[1767,13,1768,0,7153,3588,0]Al[1767,13,1768,0,3580,3588,0]Al[1767,13,1768,0,4339,3588,0]Al[1767,13,4715,0,3596,3588,0]Al[1767,13,4715,0,4954,3588,0]Ao[1767,13,4715,4715,7145,3588,0]Ao[1767,13,4715,4715,6621,3588,0]Ao[1767,13,2416,2416,4960,3588,0]Al[1767,13,3614,0,7111,3588,0]Al[1767,13,3614,0,4973,3588,0]Al[1767,13,3614,0,6643,3588,0]Al[1767,13,3614,0,4332,3588,0]Al[1767,13,3614,0,4968,3588,0]Al[1767,13,3614,0,6642,3588,0]Al[1767,13,3614,0,4984,3588,0]Al[1767,13,3614,0,6377,3588,0]Al[1767,13,3614,0,2509,3588,0]Ao[1767,13,3614,5864,4920,3588,0]Ao[1767,13,3614,5864,6617,3588,0]Al[1767,13,3614,0,6344,3588,0]Ao[1767,13,3614,3733,2502,3588,0]Al[1767,13,3614,0,6741,3588,0]Al[1767,13,3614,0,6737,3588,0]Al[1767,13,3614,0,7017,3588,0]Ao[1767,13,3614,4746,7016,3588,0]Al[1767,13,3614,0,6656,3588,0]Al[1767,13,3614,0,7159,3588,0]Al[1767,13,3614,0,3586,3588,0]Ao[1767,13,3614,4746,6619,3588,0]Ao[1767,13,3614,3614,7227,3588,0]Ao[1767,13,3614,3614,6348,3588,0]Ao[1767,13,3614,3614,4280,3588,0]Ao[1767,13,3614,3614,7310,3588,0]Ao[1767,13,3614,3614,4275,3588,0]Ao[1767,13,3614,3614,7110,3588,0]Ao[1767,13,5860,2955,2050,3588,0]Ao[1767,13,5860,2969,2492,3588,0]Ao[1767,13,3736,3736,6025,3588,0]Al[1767,13,4753,0,6461,3588,0]Al[1767,13,4753,0,6455,3588,0]Al[1767,13,4753,0,7311,3588,0]Al[4743,13,4744,0,4351,3588,0]An[4743,13,4744,784,4328,3588,0]An[4743,13,4744,784,6758,3588,0]Ao[4743,13,4744,4771,3584,3588,0]Ao[4743,13,4744,4771,7154,3588,0]Ao[4743,13,3100,1786,4943,3588,0]Ao[4743,13,3100,3100,4955,3588,0]An[6989,13,1389,825,3528,3588,0]Ao[5848,13,5849,4769,3581,3588,0]Ao[5848,13,5849,4769,4340,3588,0]An[5848,13,2729,901,4348,3588,0]An[5848,13,2729,901,4336,3588,0]Ao[5848,13,2729,2729,6349,3588,0]Ao[5848,13,2729,2729,4291,3588,0]Ao[5848,13,2972,2972,4980,3588,0]Ao[5848,13,2972,2972,6776,3588,0]Ao[5848,13,2735,2735,6632,3588,0]Ao[5848,13,2423,2423,2044,3588,0]Ao[5848,13,4736,4736,2043,3588,0]Ao[5848,13,1805,1805,2042,3588,0]Am[5848,13,508,508,3537,3588,0]Am[5848,13,508,508,6055,3588,0]Am[5848,13,508,508,6650,3588,0]Am[5848,13,508,508,6485,3588,0]Ao[5848,13,4754,4754,6462,3588,0]Ao[5848,13,4754,4754,6457,3588,0]Ao[5848,13,4754,4754,3597,3588,0]Ao[5848,13,4754,4754,7312,3588,0]Ao[5848,13,4754,4754,4957,3588,0]Ai[1767,13,3614,0,6372,0,0]Ai[1767,14,3614,0,6372,0,0]Al[5847,14,2440,2440,6073,0,0]Ai[1767,13,4715,0,3567,0,0]Al[1767,13,4715,4715,6458,0,0]Al[5848,13,4754,4754,3568,0,0]Ai[1767,13,3614,0,4975,0,0]Ae[5848,6,2972,0,0,0,0]Al[5848,15,2735,2735,4298,0,0]Ae[5848,5,2729,0,0,0,0]Ae[1767,5,3614,0,0,0,0]Al[1767,15,3614,3614,6348,0,0]Al[1767,15,3736,3736,6025,0,0]2Al[5848,15,1805,1805,2042,0,0]Ah[1767,6,3614,5864,0,0,0]Ai[1767,10,3614,5668,0,0,0]Ah[1767,5,3614,4746,0,0,0]Al[1767,15,1774,1774,6623,0,0]Ad[6989,5,509,0,0,0,0]Ah[1767,5,3614,2441,0,0,0]Ae[6989,5,1389,0,0,0,0]0Al[5848,15,2729,2729,4291,0,0]Ai[1767,19,4715,0,3596,0,0]Al[5848,19,4754,4754,3597,0,0]Al[1767,15,3614,3614,4280,0,0]Aj[5848,15,508,508,3537,0,0]Ah[4743,5,3100,1786,0,0,0]>Al[1767,15,3614,4746,7016,0,0]Al[1767,19,7007,7007,6651,0,0]Ah[1767,6,4753,4754,0,0,0]Ah[1767,6,4715,4754,0,0,0]Ae[4743,6,3100,0,0,0,0]Aj[5848,15,508,508,6055,0,0]Ae[5848,6,4754,0,0,0,0]Ae[1767,6,2416,0,0,0,0]Al[1767,15,3614,4746,6619,0,0]Ae[5848,5,1805,0,0,0,0]Ah[1767,5,5860,4778,0,0,0]Ae[5848,5,2972,0,0,0,0]Af[5848,18,1388,0,0,0,0]Ah[1767,5,3614,6328,0,0,0]Ah[1767,6,3614,6328,0,0,0]Al[5848,15,2735,2735,4298,0,0]Al[5848,15,2423,2423,7039,0,0]Al[5848,15,2972,2972,6338,0,0]Ah[1767,5,3614,3720,0,0,0]Ak[6989,15,1389,825,3528,0,0]Ah[1767,5,3614,6329,0,0,0]Ae[5848,6,2972,0,0,0,0]Ah[1767,6,3614,6329,0,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[1767,13,3614,0,6778,0,0]Al[1767,13,1768,0,4327,4282,0]Al[1767,13,1768,0,6757,4282,0]Al[1767,13,1768,0,4345,4282,0]Al[1767,13,1768,0,3564,4282,0]Al[1767,13,1768,0,3583,4282,0]Al[1767,13,1768,0,7153,4282,0]Al[1767,13,1768,0,3580,4282,0]Al[1767,13,1768,0,4339,4282,0]Al[1767,13,3262,0,6640,4282,0]Al[1767,13,3262,0,7034,4282,0]Al[1767,13,3262,0,6367,4282,0]Ao[1767,13,3262,3262,6743,4282,0]Al[1767,13,4715,0,3567,4282,0]Al[1767,13,4715,0,3596,4282,0]Al[1767,13,4715,0,3572,4282,0]Al[1767,13,4715,0,4954,4282,0]Ao[1767,13,4715,4715,7022,4282,0]Ao[1767,13,4715,4715,7145,4282,0]Ao[1767,13,4715,4715,6621,4282,0]Ao[1767,13,4715,4715,6458,4282,0]Ao[1767,13,4715,4715,7195,4282,0]Am[1767,13,507,507,6354,4282,0]Am[1767,13,507,507,7200,4282,0]Ao[1767,13,2416,2416,4960,4282,0]Ao[1767,13,2416,2416,7274,4282,0]Ao[1767,13,2416,2416,6639,4282,0]Ao[1767,13,2416,2416,7242,4282,0]Ao[1767,13,2416,2416,6478,4282,0]Ao[1767,13,2416,2416,7036,4282,0]Am[1767,13,502,502,6352,4282,0]Am[1767,13,502,502,3118,4282,0]Ao[1767,13,1774,1774,6475,4282,0]Ao[1767,13,1774,1774,7241,4282,0]Ao[1767,13,1774,1774,6623,4282,0]Ao[1767,13,7007,7007,6651,4282,0]Ak[1767,13,506,0,6036,4282,0]Al[1767,13,3614,0,3145,4282,0]Al[1767,13,3614,0,2487,4282,0]Al[1767,13,3614,0,4272,4282,0]Al[1767,13,3614,0,3525,4282,0]Al[1767,13,3614,0,6366,4282,0]Al[1767,13,3614,0,7244,4282,0]Al[1767,13,3614,0,7111,4282,0]Al[1767,13,3614,0,4973,4282,0]Al[1767,13,3614,0,4967,4282,0]Al[1767,13,3614,0,6643,4282,0]Al[1767,13,3614,0,4332,4282,0]Al[1767,13,3614,0,4968,4282,0]Al[1767,13,3614,0,6642,4282,0]Al[1767,13,3614,0,4975,4282,0]Al[1767,13,3614,0,4984,4282,0]Al[1767,13,3614,0,6377,4282,0]Al[1767,13,3614,0,6778,4282,0]Al[1767,13,3614,0,2509,4282,0]Al[1767,13,3614,0,2018,4282,0]Al[1767,13,3614,0,3593,4282,0]Al[1767,13,3614,0,4928,4282,0]Al[1767,13,3614,0,4322,4282,0]Al[1767,13,3614,0,6742,4282,0]Al[1767,13,3614,0,3174,4282,0]Ao[1767,13,3614,5864,4920,4282,0]Ao[1767,13,3614,5864,6618,4282,0]Ao[1767,13,3614,5864,6617,4282,0]Al[1767,13,3614,0,6344,4282,0]Ao[1767,13,3614,3733,2502,4282,0]Al[1767,13,3614,0,6741,4282,0]Al[1767,13,3614,0,7134,4282,0]Al[1767,13,3614,0,7151,4282,0]Al[1767,13,3614,0,6372,4282,0]Al[1767,13,3614,0,7367,4282,0]Al[1767,13,3614,0,6032,4282,0]Al[1767,13,3614,0,7160,4282,0]Al[1767,13,3614,0,6737,4282,0]Al[1767,13,3614,0,7017,4282,0]Ao[1767,13,3614,4746,7016,4282,0]Al[1767,13,3614,0,6656,4282,0]Al[1767,13,3614,0,7159,4282,0]Al[1767,13,3614,0,3586,4282,0]Ao[1767,13,3614,4746,4922,4282,0]Ao[1767,13,3614,4746,6619,4282,0]Ao[1767,13,3614,3614,6477,4282,0]Ao[1767,13,3614,3614,3117,4282,0]Ao[1767,13,3614,3614,3546,4282,0]Ao[1767,13,3614,3614,7227,4282,0]Ao[1767,13,3614,3614,6348,4282,0]Ao[1767,13,3614,3614,4280,4282,0]Ao[1767,13,3614,3614,7310,4282,0]Ao[1767,13,3614,3614,6611,4282,0]Ao[1767,13,3614,3614,2452,4282,0]Ao[1767,13,3614,3614,3551,4282,0]Ao[1767,13,3614,3614,6635,4282,0]Ao[1767,13,3614,3614,4911,4282,0]Ao[1767,13,3614,3614,4275,4282,0]Ao[1767,13,3614,3614,6783,4282,0]Ao[1767,13,3614,3614,4918,4282,0]Ao[1767,13,3614,3614,7110,4282,0]Ao[1767,13,3614,3614,4338,4282,0]Ao[1767,13,5860,3263,3140,4282,0]Ao[1767,13,5860,2955,2050,4282,0]Ao[1767,13,5860,2969,2492,4282,0]Ao[1767,13,5860,2969,6644,4282,0]Ao[1767,13,5860,4778,4963,4282,0]An[1767,13,5860,782,3146,4282,0]Ao[1767,13,3736,3736,2497,4282,0]Ao[1767,13,3736,3736,6482,4282,0]Ao[1767,13,3736,3736,6025,4282,0]Ao[1767,13,3736,3736,6026,4282,0]Al[1767,13,4753,0,6461,4282,0]Al[1767,13,4753,0,6455,4282,0]Al[1767,13,4753,0,7311,4282,0]Ao[1767,13,6018,6018,7018,4282,0]Ao[1767,13,6018,7285,6626,4282,0]Al[4743,13,4744,0,4351,4282,0]An[4743,13,4744,784,4328,4282,0]An[4743,13,4744,784,6758,4282,0]An[4743,13,4744,784,4346,4282,0]Ao[4743,13,4744,4750,3565,4282,0]Ao[4743,13,4744,4771,3584,4282,0]Ao[4743,13,4744,4771,7154,4282,0]Ao[4743,13,3100,1786,4943,4282,0]Ao[4743,13,3100,3100,4955,4282,0]Ao[5847,13,5848,5848,7023,4282,0]Ao[5847,13,5848,5848,7137,4282,0]Ao[5847,13,5848,5848,3529,4282,0]An[5847,13,5848,5848,282,4282,0]Ao[5847,13,5848,5848,6031,4282,0]Ao[5847,13,2440,2440,2065,4282,0]Ao[5847,13,2440,2440,6073,4282,0]Ao[5847,13,2440,2440,6654,4282,0]Al[5847,13,821,821,283,4282,0]Ao[6989,13,6990,2446,4363,4282,0]Ao[6989,13,2437,2437,3526,4282,0]Ao[6989,13,2927,2927,2459,4282,0]Ao[6989,13,2927,2927,6068,4282,0]Ao[6989,13,2927,2927,6476,4282,0]Ao[6989,13,2927,2927,6637,4282,0]Ao[6989,13,2927,2927,6735,4282,0]Am[6989,13,509,509,4296,4282,0]Am[6989,13,509,509,4295,4282,0]Am[6989,13,509,509,4925,4282,0]Am[6989,13,509,509,2469,4282,0]Ao[6989,13,1389,1389,4931,4282,0]Ao[6989,13,1389,6520,6771,4282,0]An[6989,13,1389,825,3528,4282,0]Ao[6989,13,1389,1389,4930,4282,0]Ao[6989,13,1389,1389,6048,4282,0]Ao[6989,13,3265,3265,3141,4282,0]Ao[6989,13,2973,2973,2498,4282,0]Ao[5848,13,5849,6425,6062,4282,0]Ao[5848,13,5849,4769,3581,4282,0]Ao[5848,13,5849,4769,4340,4282,0]Ao[5848,13,5849,4769,6772,4282,0]An[5848,13,2729,901,4348,4282,0]An[5848,13,2729,901,4336,4282,0]Ao[5848,13,2729,2729,6349,4282,0]Ao[5848,13,2729,2729,4291,4282,0]Ao[5848,13,2729,2729,6447,4282,0]Ao[5848,13,2729,2729,2457,4282,0]Ao[5848,13,2729,2729,4909,4282,0]Ao[5848,13,2729,2729,6341,4282,0]Ao[5848,13,2972,3264,3143,4282,0]Ao[5848,13,2972,3264,6368,4282,0]Ao[5848,13,2972,3738,7109,4282,0]Ao[5848,13,2972,2972,6373,4282,0]Ao[5848,13,2972,2972,6063,4282,0]Ao[5848,13,2972,2972,6338,4282,0]Ao[5848,13,2972,2972,2453,4282,0]Ao[5848,13,2972,2972,4964,4282,0]Ao[5848,13,2972,2972,4353,4282,0]Ao[5848,13,2972,2972,2477,4282,0]Ao[5848,13,2972,2972,6736,4282,0]Ao[5848,13,2972,2972,4907,4282,0]Ao[5848,13,2972,2972,2499,4282,0]Ao[5848,13,2972,2972,4980,4282,0]Ao[5848,13,2972,2972,6776,4282,0]Ao[5848,13,2735,2735,4298,4282,0]Ao[5848,13,2735,2735,6632,4282,0]Ao[5848,13,2423,2423,2044,4282,0]Ao[5848,13,2423,2423,7039,4282,0]Ao[5848,13,2423,2423,7020,4282,0]Ao[5848,13,2423,2423,4289,4282,0]Ao[5848,13,4736,4736,2043,4282,0]Ao[5848,13,1805,1805,2042,4282,0]Ao[5848,13,1805,1805,4962,4282,0]Am[5848,13,508,508,3537,4282,0]Am[5848,13,508,508,6055,4282,0]Am[5848,13,508,508,6650,4282,0]Am[5848,13,508,508,3119,4282,0]Am[5848,13,508,508,6035,4282,0]Am[5848,13,508,508,6037,4282,0]Am[5848,13,508,508,6485,4282,0]Ao[5848,13,4754,4754,6462,4282,0]Ao[5848,13,4754,4754,6457,4282,0]Ao[5848,13,4754,4754,3568,4282,0]Ao[5848,13,4754,4754,3597,4282,0]Ao[5848,13,4754,4754,7312,4282,0]Ao[5848,13,4754,4754,3573,4282,0]Ao[5848,13,4754,4754,4957,4282,0]Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]10Al[5847,14,2440,2440,6073,0,0]0Al[1767,13,1768,0,4327,3166,0]Al[1767,13,1768,0,4345,3166,0]Al[1767,13,1768,0,3564,3166,0]Al[1767,13,1768,0,3583,3166,0]Al[1767,13,1768,0,3580,3166,0]Al[1767,13,1768,0,4339,3166,0]Ao[1767,13,3262,3262,6743,3166,0]Al[1767,13,4715,0,3567,3166,0]Al[1767,13,4715,0,3596,3166,0]Al[1767,13,4715,0,3572,3166,0]Ao[1767,13,4715,4715,6458,3166,0]Ao[1767,13,4715,4715,7195,3166,0]Ao[1767,13,2416,2416,6639,3166,0]Ao[1767,13,2416,2416,6478,3166,0]Ao[1767,13,2416,2416,7036,3166,0]Am[1767,13,502,502,6352,3166,0]Ao[1767,13,1774,1774,6475,3166,0]Ao[1767,13,1774,1774,6623,3166,0]Ao[1767,13,7007,7007,6651,3166,0]Ak[1767,13,506,0,6036,3166,0]Al[1767,13,3614,0,7111,3166,0]Al[1767,13,3614,0,6643,3166,0]Al[1767,13,3614,0,4332,3166,0]Al[1767,13,3614,0,4968,3166,0]Al[1767,13,3614,0,6642,3166,0]Al[1767,13,3614,0,4984,3166,0]Al[1767,13,3614,0,6377,3166,0]Al[1767,13,3614,0,2509,3166,0]Al[1767,13,3614,0,3593,3166,0]Al[1767,13,3614,0,4928,3166,0]Al[1767,13,3614,0,4322,3166,0]Al[1767,13,3614,0,6742,3166,0]Al[1767,13,3614,0,3174,3166,0]Ao[1767,13,3614,5864,4920,3166,0]Ao[1767,13,3614,5864,6618,3166,0]Ao[1767,13,3614,5864,6617,3166,0]Al[1767,13,3614,0,6344,3166,0]Ao[1767,13,3614,3733,2502,3166,0]Al[1767,13,3614,0,6741,3166,0]Al[1767,13,3614,0,7134,3166,0]Al[1767,13,3614,0,7151,3166,0]Al[1767,13,3614,0,6372,3166,0]Al[1767,13,3614,0,6737,3166,0]Al[1767,13,3614,0,7017,3166,0]Al[1767,13,3614,0,6656,3166,0]Al[1767,13,3614,0,7159,3166,0]Al[1767,13,3614,0,3586,3166,0]Ao[1767,13,3614,4746,4922,3166,0]Ao[1767,13,3614,4746,6619,3166,0]Ao[1767,13,3614,3614,6477,3166,0]Ao[1767,13,3614,3614,3546,3166,0]Ao[1767,13,3614,3614,6611,3166,0]Ao[1767,13,3614,3614,4918,3166,0]Ao[1767,13,3614,3614,4338,3166,0]Ao[1767,13,5860,2955,2050,3166,0]Ao[1767,13,5860,2969,2492,3166,0]Ao[1767,13,5860,2969,6644,3166,0]Ao[1767,13,5860,4778,4963,3166,0]An[1767,13,5860,782,3146,3166,0]Ao[1767,13,3736,3736,2497,3166,0]Ao[1767,13,3736,3736,6026,3166,0]Al[4743,13,4744,0,4351,3166,0]An[4743,13,4744,784,4328,3166,0]An[4743,13,4744,784,4346,3166,0]Ao[4743,13,4744,4750,3565,3166,0]Ao[4743,13,4744,4771,3584,3166,0]Ao[4743,13,3100,1786,4943,3166,0]Ao[5847,13,5848,5848,3529,3166,0]An[5847,13,5848,5848,282,3166,0]Al[5847,13,821,821,283,3166,0]Ao[6989,13,6990,2446,4363,3166,0]Ao[6989,13,2437,2437,3526,3166,0]Ao[6989,13,2927,2927,6068,3166,0]Am[6989,13,509,509,4295,3166,0]Am[6989,13,509,509,4925,3166,0]Am[6989,13,509,509,2469,3166,0]Ao[6989,13,1389,6520,6771,3166,0]An[6989,13,1389,825,3528,3166,0]Ao[6989,13,1389,1389,4930,3166,0]Ao[6989,13,1389,1389,6048,3166,0]Ao[5848,13,5849,4769,3581,3166,0]Ao[5848,13,5849,4769,4340,3166,0]Ao[5848,13,5849,4769,6772,3166,0]Ao[5848,13,2729,2729,6447,3166,0]Ao[5848,13,2972,3264,6368,3166,0]Ao[5848,13,2972,2972,2453,3166,0]Ao[5848,13,2972,2972,6736,3166,0]Ao[5848,13,2735,2735,4298,3166,0]Ao[5848,13,2423,2423,7039,3166,0]Ao[5848,13,2423,2423,7020,3166,0]Ao[5848,13,2423,2423,4289,3166,0]Ao[5848,13,1805,1805,4962,3166,0]Am[5848,13,508,508,3119,3166,0]Am[5848,13,508,508,6035,3166,0]Am[5848,13,508,508,6037,3166,0]Am[5848,13,508,508,6485,3166,0]Ao[5848,13,4754,4754,3568,3166,0]Ao[5848,13,4754,4754,3597,3166,0]Ao[5848,13,4754,4754,3573,3166,0]Al[1767,13,1768,0,4327,4283,0]Al[1767,13,1768,0,6757,4283,0]Al[1767,13,1768,0,4345,4283,0]Al[1767,13,1768,0,3564,4283,0]Al[1767,13,1768,0,3583,4283,0]Al[1767,13,1768,0,7153,4283,0]Al[1767,13,1768,0,3580,4283,0]Al[1767,13,1768,0,4339,4283,0]Al[1767,13,3262,0,6640,4283,0]Al[1767,13,3262,0,7034,4283,0]Al[1767,13,3262,0,6367,4283,0]Ao[1767,13,3262,3262,6743,4283,0]Al[1767,13,4715,0,3567,4283,0]Al[1767,13,4715,0,3596,4283,0]Al[1767,13,4715,0,3572,4283,0]Al[1767,13,4715,0,4954,4283,0]Ao[1767,13,4715,4715,7022,4283,0]Ao[1767,13,4715,4715,7145,4283,0]Ao[1767,13,4715,4715,6621,4283,0]Ao[1767,13,4715,4715,6458,4283,0]Ao[1767,13,4715,4715,7195,4283,0]Am[1767,13,507,507,6354,4283,0]Am[1767,13,507,507,7200,4283,0]Ao[1767,13,2416,2416,4960,4283,0]Ao[1767,13,2416,2416,7274,4283,0]Ao[1767,13,2416,2416,6639,4283,0]Ao[1767,13,2416,2416,7242,4283,0]Ao[1767,13,2416,2416,6478,4283,0]Ao[1767,13,2416,2416,7036,4283,0]Am[1767,13,502,502,6352,4283,0]Am[1767,13,502,502,3118,4283,0]Ao[1767,13,1774,1774,6475,4283,0]Ao[1767,13,1774,1774,7241,4283,0]Ao[1767,13,1774,1774,6623,4283,0]Ao[1767,13,7007,7007,6651,4283,0]Ak[1767,13,506,0,6036,4283,0]Al[1767,13,3614,0,3145,4283,0]Al[1767,13,3614,0,2487,4283,0]Al[1767,13,3614,0,4272,4283,0]Al[1767,13,3614,0,3525,4283,0]Al[1767,13,3614,0,6366,4283,0]Al[1767,13,3614,0,7244,4283,0]Al[1767,13,3614,0,7111,4283,0]Al[1767,13,3614,0,4973,4283,0]Al[1767,13,3614,0,4967,4283,0]Al[1767,13,3614,0,6643,4283,0]Al[1767,13,3614,0,4332,4283,0]Al[1767,13,3614,0,4968,4283,0]Al[1767,13,3614,0,6642,4283,0]Al[1767,13,3614,0,4975,4283,0]Al[1767,13,3614,0,4984,4283,0]Al[1767,13,3614,0,6377,4283,0]Al[1767,13,3614,0,6778,4283,0]Al[1767,13,3614,0,2509,4283,0]Al[1767,13,3614,0,2018,4283,0]Al[1767,13,3614,0,3593,4283,0]Al[1767,13,3614,0,4928,4283,0]Al[1767,13,3614,0,4322,4283,0]Al[1767,13,3614,0,6742,4283,0]Al[1767,13,3614,0,3174,4283,0]Ao[1767,13,3614,5864,4920,4283,0]Ao[1767,13,3614,5864,6618,4283,0]Ao[1767,13,3614,5864,6617,4283,0]Al[1767,13,3614,0,6344,4283,0]Ao[1767,13,3614,3733,2502,4283,0]Al[1767,13,3614,0,6741,4283,0]Al[1767,13,3614,0,7134,4283,0]Al[1767,13,3614,0,7151,4283,0]Al[1767,13,3614,0,6372,4283,0]Al[1767,13,3614,0,7367,4283,0]Al[1767,13,3614,0,6032,4283,0]Al[1767,13,3614,0,7160,4283,0]Al[1767,13,3614,0,6737,4283,0]Al[1767,13,3614,0,7017,4283,0]Ao[1767,13,3614,4746,7016,4283,0]Al[1767,13,3614,0,6656,4283,0]Al[1767,13,3614,0,7159,4283,0]Al[1767,13,3614,0,3586,4283,0]Ao[1767,13,3614,4746,4922,4283,0]Ao[1767,13,3614,4746,6619,4283,0]Ao[1767,13,3614,3614,6477,4283,0]Ao[1767,13,3614,3614,3117,4283,0]Ao[1767,13,3614,3614,3546,4283,0]Ao[1767,13,3614,3614,7227,4283,0]Ao[1767,13,3614,3614,6348,4283,0]Ao[1767,13,3614,3614,4280,4283,0]Ao[1767,13,3614,3614,7310,4283,0]Ao[1767,13,3614,3614,6611,4283,0]Ao[1767,13,3614,3614,2452,4283,0]Ao[1767,13,3614,3614,3551,4283,0]Ao[1767,13,3614,3614,6635,4283,0]Ao[1767,13,3614,3614,4911,4283,0]Ao[1767,13,3614,3614,4275,4283,0]Ao[1767,13,3614,3614,6783,4283,0]Ao[1767,13,3614,3614,4918,4283,0]Ao[1767,13,3614,3614,7110,4283,0]Ao[1767,13,3614,3614,4338,4283,0]Ao[1767,13,5860,3263,3140,4283,0]Ao[1767,13,5860,2955,2050,4283,0]Ao[1767,13,5860,2969,2492,4283,0]Ao[1767,13,5860,2969,6644,4283,0]Ao[1767,13,5860,4778,4963,4283,0]An[1767,13,5860,782,3146,4283,0]Ao[1767,13,3736,3736,2497,4283,0]Ao[1767,13,3736,3736,6482,4283,0]Ao[1767,13,3736,3736,6025,4283,0]Ao[1767,13,3736,3736,6026,4283,0]Al[1767,13,4753,0,6461,4283,0]Al[1767,13,4753,0,6455,4283,0]Al[1767,13,4753,0,7311,4283,0]Ao[1767,13,6018,6018,7018,4283,0]Ao[1767,13,6018,7285,6626,4283,0]Ao[5847,13,5848,5848,7023,4283,0]Ao[5847,13,5848,5848,7137,4283,0]Ao[5847,13,5848,5848,3529,4283,0]An[5847,13,5848,5848,282,4283,0]Ao[5847,13,5848,5848,6031,4283,0]Ao[5847,13,2440,2440,2065,4283,0]Ao[5847,13,2440,2440,6073,4283,0]Ao[5847,13,2440,2440,6654,4283,0]Al[5847,13,821,821,283,4283,0]Ao[6989,13,6990,2446,4363,4283,0]Ao[6989,13,2437,2437,3526,4283,0]Ao[6989,13,2927,2927,2459,4283,0]Ao[6989,13,2927,2927,6068,4283,0]Ao[6989,13,2927,2927,6476,4283,0]Ao[6989,13,2927,2927,6637,4283,0]Ao[6989,13,2927,2927,6735,4283,0]Am[6989,13,509,509,4296,4283,0]Am[6989,13,509,509,4295,4283,0]Am[6989,13,509,509,4925,4283,0]Am[6989,13,509,509,2469,4283,0]Ao[6989,13,1389,1389,4931,4283,0]Ao[6989,13,1389,6520,6771,4283,0]An[6989,13,1389,825,3528,4283,0]Ao[6989,13,1389,1389,4930,4283,0]Ao[6989,13,1389,1389,6048,4283,0]Ao[6989,13,3265,3265,3141,4283,0]Ao[6989,13,2973,2973,2498,4283,0]Ao[5848,13,5849,6425,6062,4283,0]Ao[5848,13,5849,4769,3581,4283,0]Ao[5848,13,5849,4769,4340,4283,0]Ao[5848,13,5849,4769,6772,4283,0]An[5848,13,2729,901,4348,4283,0]An[5848,13,2729,901,4336,4283,0]Ao[5848,13,2729,2729,6349,4283,0]Ao[5848,13,2729,2729,4291,4283,0]Ao[5848,13,2729,2729,6447,4283,0]Ao[5848,13,2729,2729,2457,4283,0]Ao[5848,13,2729,2729,4909,4283,0]Ao[5848,13,2729,2729,6341,4283,0]Ao[5848,13,2972,3264,3143,4283,0]Ao[5848,13,2972,3264,6368,4283,0]Ao[5848,13,2972,3738,7109,4283,0]Ao[5848,13,2972,2972,6373,4283,0]Ao[5848,13,2972,2972,6063,4283,0]Ao[5848,13,2972,2972,6338,4283,0]Ao[5848,13,2972,2972,2453,4283,0]Ao[5848,13,2972,2972,4964,4283,0]Ao[5848,13,2972,2972,4353,4283,0]Ao[5848,13,2972,2972,2477,4283,0]Ao[5848,13,2972,2972,6736,4283,0]Ao[5848,13,2972,2972,4907,4283,0]Ao[5848,13,2972,2972,2499,4283,0]Ao[5848,13,2972,2972,4980,4283,0]Ao[5848,13,2972,2972,6776,4283,0]Ao[5848,13,2735,2735,4298,4283,0]Ao[5848,13,2735,2735,6632,4283,0]Ao[5848,13,2423,2423,2044,4283,0]Ao[5848,13,2423,2423,7039,4283,0]Ao[5848,13,2423,2423,7020,4283,0]Ao[5848,13,2423,2423,4289,4283,0]Ao[5848,13,4736,4736,2043,4283,0]Ao[5848,13,1805,1805,2042,4283,0]Ao[5848,13,1805,1805,4962,4283,0]Am[5848,13,508,508,3537,4283,0]Am[5848,13,508,508,6055,4283,0]Am[5848,13,508,508,6650,4283,0]Am[5848,13,508,508,3119,4283,0]Am[5848,13,508,508,6035,4283,0]Am[5848,13,508,508,6037,4283,0]Am[5848,13,508,508,6485,4283,0]Ao[5848,13,4754,4754,6462,4283,0]Ao[5848,13,4754,4754,6457,4283,0]Ao[5848,13,4754,4754,3568,4283,0]Ao[5848,13,4754,4754,3597,4283,0]Ao[5848,13,4754,4754,7312,4283,0]Ao[5848,13,4754,4754,3573,4283,0]Ao[5848,13,4754,4754,4957,4283,0]Al[1767,13,1768,0,4327,4283,0]Al[1767,13,1768,0,6757,4283,0]Al[1767,13,1768,0,4345,4283,0]Al[1767,13,1768,0,3564,4283,0]Al[1767,13,1768,0,3583,4283,0]Al[1767,13,1768,0,7153,4283,0]Al[1767,13,1768,0,3580,4283,0]Al[1767,13,1768,0,4339,4283,0]Al[1767,13,3262,0,6640,4283,0]Al[1767,13,3262,0,7034,4283,0]Al[1767,13,3262,0,6367,4283,0]Ao[1767,13,3262,3262,6743,4283,0]Al[1767,13,4715,0,3567,4283,0]Al[1767,13,4715,0,3596,4283,0]Al[1767,13,4715,0,3572,4283,0]Al[1767,13,4715,0,4954,4283,0]Ao[1767,13,4715,4715,7022,4283,0]Ao[1767,13,4715,4715,7145,4283,0]Ao[1767,13,4715,4715,6621,4283,0]Ao[1767,13,4715,4715,6458,4283,0]Ao[1767,13,4715,4715,7195,4283,0]Am[1767,13,507,507,6354,4283,0]Am[1767,13,507,507,7200,4283,0]Ao[1767,13,2416,2416,4960,4283,0]Ao[1767,13,2416,2416,7274,4283,0]Ao[1767,13,2416,2416,6639,4283,0]Ao[1767,13,2416,2416,7242,4283,0]Ao[1767,13,2416,2416,6478,4283,0]Ao[1767,13,2416,2416,7036,4283,0]Am[1767,13,502,502,6352,4283,0]Am[1767,13,502,502,3118,4283,0]Ao[1767,13,1774,1774,6475,4283,0]Ao[1767,13,1774,1774,7241,4283,0]Ao[1767,13,1774,1774,6623,4283,0]Ao[1767,13,7007,7007,6651,4283,0]Ak[1767,13,506,0,6036,4283,0]Al[1767,13,3614,0,3145,4283,0]Al[1767,13,3614,0,2487,4283,0]Al[1767,13,3614,0,4272,4283,0]Al[1767,13,3614,0,3525,4283,0]Al[1767,13,3614,0,6366,4283,0]Al[1767,13,3614,0,7244,4283,0]Al[1767,13,3614,0,7111,4283,0]Al[1767,13,3614,0,4973,4283,0]Al[1767,13,3614,0,4967,4283,0]Al[1767,13,3614,0,6643,4283,0]Al[1767,13,3614,0,4332,4283,0]Al[1767,13,3614,0,4968,4283,0]Al[1767,13,3614,0,6642,4283,0]Al[1767,13,3614,0,4975,4283,0]Al[1767,13,3614,0,4984,4283,0]Al[1767,13,3614,0,6377,4283,0]Al[1767,13,3614,0,6778,4283,0]Al[1767,13,3614,0,2509,4283,0]Al[1767,13,3614,0,2018,4283,0]Al[1767,13,3614,0,3593,4283,0]Al[1767,13,3614,0,4928,4283,0]Al[1767,13,3614,0,4322,4283,0]Al[1767,13,3614,0,6742,4283,0]Al[1767,13,3614,0,3174,4283,0]Ao[1767,13,3614,5864,4920,4283,0]Ao[1767,13,3614,5864,6618,4283,0]Ao[1767,13,3614,5864,6617,4283,0]Al[1767,13,3614,0,6344,4283,0]Ao[1767,13,3614,3733,2502,4283,0]Al[1767,13,3614,0,6741,4283,0]Al[1767,13,3614,0,7134,4283,0]Al[1767,13,3614,0,7151,4283,0]Al[1767,13,3614,0,6372,4283,0]Al[1767,13,3614,0,7367,4283,0]Al[1767,13,3614,0,6032,4283,0]Al[1767,13,3614,0,7160,4283,0]Al[1767,13,3614,0,6737,4283,0]Al[1767,13,3614,0,7017,4283,0]Ao[1767,13,3614,4746,7016,4283,0]Al[1767,13,3614,0,6656,4283,0]Al[1767,13,3614,0,7159,4283,0]Al[1767,13,3614,0,3586,4283,0]Ao[1767,13,3614,4746,4922,4283,0]Ao[1767,13,3614,4746,6619,4283,0]Ao[1767,13,3614,3614,6477,4283,0]Ao[1767,13,3614,3614,3117,4283,0]Ao[1767,13,3614,3614,3546,4283,0]Ao[1767,13,3614,3614,7227,4283,0]Ao[1767,13,3614,3614,6348,4283,0]Ao[1767,13,3614,3614,4280,4283,0]Ao[1767,13,3614,3614,7310,4283,0]Ao[1767,13,3614,3614,6611,4283,0]Ao[1767,13,3614,3614,2452,4283,0]Ao[1767,13,3614,3614,3551,4283,0]Ao[1767,13,3614,3614,6635,4283,0]Ao[1767,13,3614,3614,4911,4283,0]Ao[1767,13,3614,3614,4275,4283,0]Ao[1767,13,3614,3614,6783,4283,0]Ao[1767,13,3614,3614,4918,4283,0]Ao[1767,13,3614,3614,7110,4283,0]Ao[1767,13,3614,3614,4338,4283,0]Ao[1767,13,5860,3263,3140,4283,0]Ao[1767,13,5860,2955,2050,4283,0]Ao[1767,13,5860,2969,2492,4283,0]Ao[1767,13,5860,2969,6644,4283,0]Ao[1767,13,5860,4778,4963,4283,0]An[1767,13,5860,782,3146,4283,0]Ao[1767,13,3736,3736,2497,4283,0]Ao[1767,13,3736,3736,6482,4283,0]Ao[1767,13,3736,3736,6025,4283,0]Ao[1767,13,3736,3736,6026,4283,0]Al[1767,13,4753,0,6461,4283,0]Al[1767,13,4753,0,6455,4283,0]Al[1767,13,4753,0,7311,4283,0]Ao[1767,13,6018,6018,7018,4283,0]Ao[1767,13,6018,7285,6626,4283,0]Ao[5847,13,5848,5848,7023,4283,0]Ao[5847,13,5848,5848,7137,4283,0]Ao[5847,13,5848,5848,3529,4283,0]An[5847,13,5848,5848,282,4283,0]Ao[5847,13,5848,5848,6031,4283,0]Ao[5847,13,2440,2440,2065,4283,0]Ao[5847,13,2440,2440,6073,4283,0]Ao[5847,13,2440,2440,6654,4283,0]Al[5847,13,821,821,283,4283,0]Ao[6989,13,6990,2446,4363,4283,0]Ao[6989,13,2437,2437,3526,4283,0]Ao[6989,13,2927,2927,2459,4283,0]Ao[6989,13,2927,2927,6068,4283,0]Ao[6989,13,2927,2927,6476,4283,0]Ao[6989,13,2927,2927,6637,4283,0]Ao[6989,13,2927,2927,6735,4283,0]Am[6989,13,509,509,4296,4283,0]Am[6989,13,509,509,4295,4283,0]Am[6989,13,509,509,4925,4283,0]Am[6989,13,509,509,2469,4283,0]Ao[6989,13,1389,1389,4931,4283,0]Ao[6989,13,1389,6520,6771,4283,0]An[6989,13,1389,825,3528,4283,0]Ao[6989,13,1389,1389,4930,4283,0]Ao[6989,13,1389,1389,6048,4283,0]Ao[6989,13,3265,3265,3141,4283,0]Ao[6989,13,2973,2973,2498,4283,0]Ao[5848,13,5849,6425,6062,4283,0]Ao[5848,13,5849,4769,3581,4283,0]Ao[5848,13,5849,4769,4340,4283,0]Ao[5848,13,5849,4769,6772,4283,0]An[5848,13,2729,901,4348,4283,0]An[5848,13,2729,901,4336,4283,0]Ao[5848,13,2729,2729,6349,4283,0]Ao[5848,13,2729,2729,4291,4283,0]Ao[5848,13,2729,2729,6447,4283,0]Ao[5848,13,2729,2729,2457,4283,0]Ao[5848,13,2729,2729,4909,4283,0]Ao[5848,13,2729,2729,6341,4283,0]Ao[5848,13,2972,3264,3143,4283,0]Ao[5848,13,2972,3264,6368,4283,0]Ao[5848,13,2972,3738,7109,4283,0]Ao[5848,13,2972,2972,6373,4283,0]Ao[5848,13,2972,2972,6063,4283,0]Ao[5848,13,2972,2972,6338,4283,0]Ao[5848,13,2972,2972,2453,4283,0]Ao[5848,13,2972,2972,4964,4283,0]Ao[5848,13,2972,2972,4353,4283,0]Ao[5848,13,2972,2972,2477,4283,0]Ao[5848,13,2972,2972,6736,4283,0]Ao[5848,13,2972,2972,4907,4283,0]Ao[5848,13,2972,2972,2499,4283,0]Ao[5848,13,2972,2972,4980,4283,0]Ao[5848,13,2972,2972,6776,4283,0]Ao[5848,13,2735,2735,4298,4283,0]Ao[5848,13,2735,2735,6632,4283,0]Ao[5848,13,2423,2423,2044,4283,0]Ao[5848,13,2423,2423,7039,4283,0]Ao[5848,13,2423,2423,7020,4283,0]Ao[5848,13,2423,2423,4289,4283,0]Ao[5848,13,4736,4736,2043,4283,0]Ao[5848,13,1805,1805,2042,4283,0]Ao[5848,13,1805,1805,4962,4283,0]Am[5848,13,508,508,3537,4283,0]Am[5848,13,508,508,6055,4283,0]Am[5848,13,508,508,6650,4283,0]Am[5848,13,508,508,3119,4283,0]Am[5848,13,508,508,6035,4283,0]Am[5848,13,508,508,6037,4283,0]Am[5848,13,508,508,6485,4283,0]Ao[5848,13,4754,4754,6462,4283,0]Ao[5848,13,4754,4754,6457,4283,0]Ao[5848,13,4754,4754,3568,4283,0]Ao[5848,13,4754,4754,3597,4283,0]Ao[5848,13,4754,4754,7312,4283,0]Ao[5848,13,4754,4754,3573,4283,0]Ao[5848,13,4754,4754,4957,4283,0]Al[1767,13,1768,0,4327,4926,0]0Al[1767,13,1768,0,4327,4927,0]Al[1767,13,1768,0,3564,4926,0]Al[1767,13,1768,0,3564,4927,0]1Al[1767,13,1768,0,3583,4926,0]0Al[1767,13,1768,0,3583,4927,0]Al[1767,13,1768,0,3580,4926,0]Al[1767,13,1768,0,3580,4927,0]1Al[1767,13,1768,0,4339,4926,0]Al[1767,13,1768,0,4339,4927,0]1Al[1767,13,4715,0,3567,4926,0]0Al[1767,13,4715,0,3567,4927,0]Al[1767,13,4715,0,3596,4927,0]Al[1767,13,4715,0,3596,4926,0]0Al[1767,13,4715,0,3572,4926,0]0Al[1767,13,4715,0,3572,4927,0]Ao[1767,13,4715,4715,6458,4927,0]Ao[1767,13,4715,4715,6458,4926,0]0Ao[1767,13,1774,1774,6623,4926,0]0Ao[1767,13,1774,1774,6623,4927,0]Al[1767,13,3614,0,7111,4926,0]Al[1767,13,3614,0,7111,4927,0]1Al[1767,13,3614,0,6643,4927,0]Al[1767,13,3614,0,6643,4926,0]0Al[1767,13,3614,0,4332,4926,0]0Al[1767,13,3614,0,4332,4927,0]Al[1767,13,3614,0,4968,4927,0]Al[1767,13,3614,0,4968,4926,0]0Al[1767,13,3614,0,6642,4927,0]Al[1767,13,3614,0,6642,4926,0]0Al[1767,13,3614,0,4984,4926,0]Al[1767,13,3614,0,4984,4927,0]1Al[1767,13,3614,0,6377,4926,0]0Al[1767,13,3614,0,6377,4927,0]Al[1767,13,3614,0,2509,4926,0]0Al[1767,13,3614,0,2509,4927,0]Al[1767,13,3614,0,2018,4927,0]Al[1767,13,3614,0,2018,4926,0]0Al[1767,13,3614,0,3174,4926,0]Al[1767,13,3614,0,3174,4927,0]1Ao[1767,13,3614,5864,4920,4927,0]Ao[1767,13,3614,5864,4920,4926,0]0Ao[1767,13,3614,5864,6618,4927,0]Ao[1767,13,3614,5864,6618,4926,0]0Ao[1767,13,3614,5864,6617,4927,0]Ao[1767,13,3614,5864,6617,4926,0]0Al[1767,13,3614,0,6344,4926,0]0Al[1767,13,3614,0,6344,4927,0]Ao[1767,13,3614,3733,2502,4926,0]Ao[1767,13,3614,3733,2502,4927,0]1Al[1767,13,3614,0,6741,4926,0]0Al[1767,13,3614,0,6741,4927,0]Al[1767,13,3614,0,7367,4927,0]Al[1767,13,3614,0,7367,4926,0]0Al[1767,13,3614,0,6737,4926,0]Al[1767,13,3614,0,6737,4927,0]1Al[1767,13,3614,0,7017,4926,0]Al[1767,13,3614,0,7017,4927,0]1Al[1767,13,3614,0,6656,4926,0]Al[1767,13,3614,0,6656,4927,0]1Al[1767,13,3614,0,7159,4926,0]0Al[1767,13,3614,0,7159,4927,0]Al[1767,13,3614,0,3586,4926,0]Al[1767,13,3614,0,3586,4927,0]1Ao[1767,13,3614,4746,4922,4926,0]Ao[1767,13,3614,4746,4922,4927,0]1Ao[1767,13,3614,4746,6619,4927,0]Ao[1767,13,3614,4746,6619,4926,0]0Ao[1767,13,3614,3614,6477,4926,0]Ao[1767,13,3614,3614,6477,4927,0]1Ao[1767,13,3614,3614,4338,4927,0]Ao[1767,13,3614,3614,4338,4926,0]0Ao[1767,13,5860,2955,2050,4926,0]Ao[1767,13,5860,2955,2050,4927,0]1Ao[1767,13,5860,2969,2492,4926,0]Ao[1767,13,5860,2969,2492,4927,0]1Ao[1767,13,5860,2969,6644,4927,0]Ao[1767,13,5860,2969,6644,4926,0]0An[6989,13,1389,825,3528,4926,0]An[6989,13,1389,825,3528,4927,0]1Ao[5848,13,5849,4769,3581,4926,0]Ao[5848,13,5849,4769,3581,4927,0]1Ao[5848,13,5849,4769,4340,4926,0]0Ao[5848,13,5849,4769,4340,4927,0]Ao[5848,13,5849,4769,6772,4926,0]0Ao[5848,13,5849,4769,6772,4927,0]Ao[5848,13,2972,2972,2453,4926,0]Ao[5848,13,2972,2972,2453,4927,0]1Ao[5848,13,2735,2735,4298,4926,0]0Ao[5848,13,2735,2735,4298,4927,0]Ao[5848,13,2423,2423,7039,4927,0]Ao[5848,13,2423,2423,7039,4926,0]0Ao[5848,13,2423,2423,7020,4926,0]Ao[5848,13,2423,2423,7020,4927,0]1Ao[5848,13,2423,2423,4289,4927,0]Ao[5848,13,2423,2423,4289,4926,0]0Am[5848,13,508,508,6035,4926,0]0Am[5848,13,508,508,6035,4927,0]Ao[5848,13,4754,4754,3568,4927,0]Ao[5848,13,4754,4754,3568,4926,0]0Ao[5848,13,4754,4754,3597,4926,0]Ao[5848,13,4754,4754,3597,4927,0]1Ao[5848,13,4754,4754,3573,4926,0]0Ao[5848,13,4754,4754,3573,4927,0]Ai[1767,14,3614,0,6737,0,0]Ai[1767,14,3614,0,7017,0,0]1Ai[5848,14,2037,0,7025,0,0]Ai[5848,14,2036,0,7208,0,0]Ai[5848,14,2036,0,7230,0,0]Ai[1767,13,1768,0,4327,0,0]Ai[1767,13,1768,0,4345,0,0]Ai[4743,13,4744,0,4351,0,0]Ak[4743,13,4744,784,4328,0,0]Ak[4743,13,4744,784,4346,0,0]Al[4743,12,3100,3100,2506,0,0]Ao[4743,13,3100,1786,4943,2506,0]Ai[1767,13,1768,0,3564,0,0]Ai[1767,13,4715,0,3572,0,0]Al[4743,13,4744,4750,3565,0,0]Al[5848,13,4754,4754,3573,0,0]8Al[6989,13,1389,1389,4931,0,0]Al[5848,13,2972,2972,2499,0,0]Ai[1767,13,3614,0,2509,0,0]Ab[5847,3,0,0,0,0,0]Ab[5848,3,0,0,0,0,0]Al[5848,13,2972,2972,6338,0,0]Al[1767,14,3614,5864,6618,0,0]Aj[6989,13,509,509,4296,0,0]Al[5848,13,2729,2729,6341,0,0]Ah[1767,13,506,0,6036,0,0]Aj[5848,12,508,508,3585,0,0]Aj[5848,13,508,508,6037,0,0]Ai[1767,14,3614,0,4322,0,0]Al[1767,14,6018,7285,6626,0,0]Ae[1767,2,1768,0,0,0,0]Al[1767,14,3262,3262,6743,0,0]Aj[1767,13,502,502,3118,0,0]Ai[1767,14,4949,0,4316,0,0]0Ai[5848,14,4952,0,4317,0,0]Ak[5847,14,5848,5848,282,0,0]Ai[1767,14,3262,0,6640,0,0]Al[6989,13,6990,2446,4363,0,0]An[5848,13,2729,2729,2457,875,0]An[5848,13,2729,2729,4909,875,0]Al[1767,13,3614,0,4975,4905,0]2121Bk[1767,13,3614,0,4975,0,0,\"impl-SendStream\"]Cm[1767,13,3614,0,4975,4905,0,\"impl-AsyncWrite-for-SendStream\"];Al[1767,13,4715,4715,6458,0,0]Ah[1767,14,7144,0,877,0,0]Ah[1767,14,6620,0,878,0,0]Ai[1767,13,3614,0,4967,0,0]0Al[1767,13,3614,3614,3117,0,0]Al[1767,13,4715,4715,7022,0,0]Aj[1767,13,502,502,3118,0,0]2Al[1767,13,3614,3614,3546,0,0]Ai[1767,14,3262,0,7034,0,0]Ai[1767,14,4949,0,7045,0,0]Ai[1767,14,4949,0,6604,0,0]Ai[1767,14,4949,0,4316,0,0]Ah[1767,14,4949,0,883,0,0]Ai[1767,14,4949,0,6763,0,0]Ai[1767,14,4949,0,6449,0,0]=Ai[1767,14,6620,0,7205,0,0]Ai[1767,14,6620,0,4312,0,0]>Ai[1767,14,7015,0,2024,0,0]Ai[1767,14,7015,0,6040,0,0]Ai[1767,14,7015,0,4946,0,0]Ai[1767,14,6345,0,3121,0,0]Ai[1767,14,6345,0,4912,0,0]Ai[1767,14,4279,0,4937,0,0]Ai[1767,14,7226,0,6027,0,0]Ai[1767,14,7226,0,6066,0,0]Ai[1767,14,7226,0,4308,0,0]Ai[1767,14,7226,0,2051,0,0]Ai[1767,14,7309,0,6624,0,0]Ai[1767,14,7309,0,3534,0,0]Ai[1767,14,7309,0,4309,0,0]Ai[1767,14,4274,0,6738,0,0]Ai[1767,14,4274,0,6074,0,0]Ai[1767,14,4274,0,7052,0,0]Ai[1767,14,6024,0,4913,0,0]Ai[1767,14,6755,0,2462,0,0]Ah[1767,14,6755,0,276,0,0]Ai[1767,14,6755,0,7196,0,0]Ai[1767,14,4949,0,7045,0,0]Ai[1767,14,4949,0,6604,0,0]Ai[1767,14,4949,0,4316,0,0]Ah[1767,14,4949,0,883,0,0]Ai[1767,14,4949,0,6763,0,0]Ai[1767,14,4949,0,6449,0,0]Ai[1767,14,6459,0,7235,0,0]Ai[1767,14,6459,0,6751,0,0]Ai[1767,14,6450,0,7146,0,0]Ai[1767,14,6450,0,6470,0,0]Ai[1767,14,6450,0,7029,0,0]Ah[4743,14,4950,0,856,0,0]Ai[4743,14,4950,0,3576,0,0]Ai[4743,14,4950,0,3541,0,0]Ai[4743,14,4950,0,2511,0,0]Ai[4743,14,6756,0,2463,0,0]Ah[4743,14,6756,0,277,0,0]Ai[4743,14,6756,0,7197,0,0]Ai[5848,14,4335,0,3578,0,0]Ai[5848,14,4335,0,6069,0,0]Ai[5848,14,4347,0,6070,0,0]Ai[5848,14,4347,0,7232,0,0]Ai[5848,14,4347,0,6038,0,0]Ai[5848,14,6346,0,7201,0,0]Ai[5848,14,6346,0,6746,0,0]Ai[5848,14,6346,0,4359,0,0]Ai[5848,14,6346,0,4299,0,0]Ah[5848,14,6346,0,844,0,0]Ai[5848,14,6346,0,7340,0,0]Ai[5848,14,6346,0,3171,0,0]Ai[5848,14,6346,0,7239,0,0]Ai[5848,14,6346,0,6058,0,0]Ah[5848,14,6346,0,289,0,0]Ai[5848,14,4290,0,7105,0,0]Ah[5848,14,4290,0,274,0,0]Ai[5848,14,4290,0,3162,0,0]Af[5848,14,4290,0,9,0,0]Ai[5848,14,4290,0,4933,0,0]Ai[5848,14,4290,0,7368,0,0]Ai[5848,14,4290,0,6769,0,0]Ai[5848,14,4290,0,6364,0,0]Ai[5848,14,4290,0,7370,0,0]Ai[5848,14,4290,0,7315,0,0]Ai[5848,14,6775,0,3139,0,0]Ai[5848,14,6775,0,7329,0,0]Ai[5848,14,6775,0,4304,0,0]Ai[5848,14,6775,0,7313,0,0]Ai[5848,14,6775,0,6483,0,0]Ai[5848,14,4979,0,4306,0,0]Ai[5848,14,4979,0,4329,0,0]Ai[5848,14,4979,0,6652,0,0]Ai[5848,14,4979,0,6733,0,0]Ai[5848,14,4979,0,6059,0,0]Ai[5848,14,4979,0,6731,0,0]Ai[5848,14,6627,0,6486,0,0]Ai[5848,14,6627,0,7050,0,0]Ai[5848,14,2037,0,6780,0,0]Ai[5848,14,2037,0,6464,0,0]Ai[5848,14,2037,0,2061,0,0]Ai[5848,14,2037,0,6629,0,0]Ai[5848,14,2037,0,7027,0,0]Ai[5848,14,2037,0,6358,0,0]Ai[5848,14,2037,0,7025,0,0]Ai[5848,14,2037,0,7419,0,0]Ai[5848,14,2037,0,3590,0,0]Ai[5848,14,2036,0,7331,0,0]Ai[5848,14,2036,0,4360,0,0]Ai[5848,14,2036,0,6487,0,0]Ai[5848,14,2036,0,6628,0,0]Ai[5848,14,2036,0,7040,0,0]Ai[5848,14,2036,0,7208,0,0]Ai[5848,14,2036,0,7230,0,0]Ai[5848,14,2035,0,3122,0,0]Ai[5848,14,2035,0,4914,0,0]Ai[5848,14,2035,0,4357,0,0]Ai[5848,14,3536,0,3163,0,0]Ai[5848,14,3536,0,4940,0,0]Ai[5848,14,3536,0,6064,0,0]Ai[5848,14,3536,0,6056,0,0]Ai[5848,14,3536,0,3154,0,0]Ai[5848,14,3536,0,6749,0,0]Ai[5848,14,6054,0,4951,0,0]Ai[5848,14,6054,0,6361,0,0]Ai[5848,14,4952,0,7046,0,0]Ai[5848,14,4952,0,6605,0,0]Ai[5848,14,4952,0,4317,0,0]Ah[5848,14,4952,0,884,0,0]Ai[5848,14,4952,0,6764,0,0]Ai[5848,14,4952,0,6452,0,0]Ai[5848,14,6460,0,7236,0,0]Ai[5848,14,6460,0,6752,0,0]Ai[5848,14,6451,0,7147,0,0]Ai[5848,14,6451,0,6471,0,0]Ai[5848,14,6451,0,7030,0,0]An[5848,13,2729,2729,2457,875,0]An[5848,13,2729,2729,4909,875,0]Ae[1767,2,1768,0,0,0,0]Al[5847,14,2440,2440,6654,0,0]Ae[5848,7,3322,0,0,0,0]Al[5847,14,2440,2440,2065,0,0]Al[6989,14,2927,2927,2459,0,0]Ae[1767,6,3736,0,0,0,0]Ae[1767,5,3736,0,0,0,0]Al[1767,15,3614,3614,7227,0,0]Al[1767,15,3614,5864,4920,0,0]Ae[5847,5,5848,0,0,0,0]Ah[1767,5,3614,2929,0,0,0]Ad[5848,6,508,0,0,0,0]Af[1767,5,506,508,0,0,0]Ad[5848,5,508,0,0,0,0]Ak[5848,15,2729,901,4348,0,0]Al[1767,15,3614,4746,7016,0,0]Al[1767,15,2416,2416,4960,0,0]0Ae[6989,5,1389,0,0,0,0]Ak[6989,15,1389,825,3528,0,0]Al[5848,15,2972,2972,4907,0,0]8Aj[5848,15,508,508,3537,0,0]Al[5848,15,2729,2729,6349,0,0]Al[5848,15,2972,2972,4980,0,0]Ah[5848,5,5849,6425,0,0,0]Ae[5848,5,2972,0,0,0,0]4Al[1767,15,3614,3614,7227,0,0]Ae[6989,5,2927,0,0,0,0]Ae[1767,5,1774,0,0,0,0]Ae[6989,5,2927,0,0,0,0]Ae[1767,6,3614,0,0,0,0]Ae[1767,5,2416,0,0,0,0]Al[1767,15,3614,4746,6619,0,0]Ae[1767,5,3736,0,0,0,0]Al[5848,15,2972,2972,6776,0,0]Ad[5848,5,508,0,0,0,0]Al[5848,15,2735,2735,6632,0,0]Al[5848,15,4736,4736,2043,0,0]Ai[1767,14,3614,0,4928,0,0]Al[1767,13,3614,3614,3117,0,0]Al[1767,13,7007,7007,6651,0,0]Al[1767,13,3614,3614,3546,0,0]Al[1767,14,5860,4778,4963,0,0]Ai[1767,13,1768,0,3580,0,0]Al[5848,13,5849,4769,3581,0,0]5Ak[5847,14,5848,5848,282,0,0]Al[5847,14,2440,2440,6073,0,0]Al[1767,13,4715,4715,7195,0,0]7Ao[1767,13,3262,3262,6743,6762,0]Ao[5848,13,2972,3264,6368,6762,0]Al[6989,14,3265,3265,3141,0,0]Al[1767,13,3736,3736,6768,0,0]Al[1767,13,3736,3736,7141,0,0]Ao[1767,13,3736,3736,6026,6768,0]Ao[1767,13,3736,3736,6026,7141,0]Ai[1767,12,3614,0,4921,0,0]Ai[1767,14,3614,0,4928,0,0]Ai[1767,14,3262,0,6640,0,0]Al[1767,13,3614,3614,4918,0,0]Al[1767,13,3614,0,4975,4905,0]Al[5848,13,5849,6425,6062,0,0]2Al[1767,14,5860,2969,2492,0,0]3Ai[1767,13,3614,0,6778,0,0]Am[6989,13,509,509,2469,6773,0]Al[5848,14,2972,2972,4964,0,0]Al[5848,14,2972,2972,4353,0,0]Ae[5848,7,3322,0,0,0,0]Al[1767,13,7007,7007,6651,0,0]Ai[1767,13,4715,0,3567,0,0]Al[5848,13,4754,4754,3568,0,0]10Ai[1767,12,3614,0,7138,0,0]Al[5848,13,2423,2423,4289,0,0]Ao[5848,13,2729,2729,2457,4355,0]Ao[5848,13,2729,2729,6341,4355,0]Al[1767,13,1768,0,4327,7043,0]Al[1767,13,1768,0,6757,7043,0]Al[1767,13,1768,0,3583,7043,0]Al[1767,13,1768,0,7153,7043,0]Al[1767,13,1768,0,3580,7043,0]Al[1767,13,1768,0,4339,7043,0]Al[1767,13,4715,0,3596,7043,0]Al[1767,13,4715,0,4954,7043,0]Ao[1767,13,4715,4715,7145,7043,0]Ao[1767,13,4715,4715,6621,7043,0]Ao[1767,13,2416,2416,4960,7043,0]Al[1767,13,3614,0,7111,7043,0]Al[1767,13,3614,0,4973,7043,0]Al[1767,13,3614,0,6643,7043,0]Al[1767,13,3614,0,4332,7043,0]Al[1767,13,3614,0,4968,7043,0]Al[1767,13,3614,0,6642,7043,0]Al[1767,13,3614,0,4984,7043,0]Al[1767,13,3614,0,6377,7043,0]Al[1767,13,3614,0,2509,7043,0]Ao[1767,13,3614,5864,4920,7043,0]Ao[1767,13,3614,5864,6617,7043,0]Al[1767,13,3614,0,6344,7043,0]Ao[1767,13,3614,3733,2502,7043,0]Al[1767,13,3614,0,6741,7043,0]Al[1767,13,3614,0,6737,7043,0]Al[1767,13,3614,0,7017,7043,0]Ao[1767,13,3614,4746,7016,7043,0]Al[1767,13,3614,0,6656,7043,0]Al[1767,13,3614,0,7159,7043,0]Al[1767,13,3614,0,3586,7043,0]Ao[1767,13,3614,4746,6619,7043,0]Ao[1767,13,3614,3614,7227,7043,0]Ao[1767,13,3614,3614,6348,7043,0]Ao[1767,13,3614,3614,4280,7043,0]Ao[1767,13,3614,3614,7310,7043,0]Ao[1767,13,3614,3614,4275,7043,0]Ao[1767,13,3614,3614,7110,7043,0]Ao[1767,13,5860,2955,2050,7043,0]Ao[1767,13,5860,2969,2492,7043,0]Ao[1767,13,3736,3736,6025,7043,0]Al[1767,13,4753,0,6461,7043,0]Al[1767,13,4753,0,6455,7043,0]Al[1767,13,4753,0,7311,7043,0]An[6989,13,1389,825,3528,7043,0]Ao[5848,13,5849,4769,3581,7043,0]Ao[5848,13,5849,4769,4340,7043,0]An[5848,13,2729,901,4348,7043,0]An[5848,13,2729,901,4336,7043,0]Ao[5848,13,2729,2729,6349,7043,0]Ao[5848,13,2729,2729,4291,7043,0]Ao[5848,13,2972,2972,4980,7043,0]Ao[5848,13,2972,2972,6776,7043,0]Ao[5848,13,2735,2735,6632,7043,0]Ao[5848,13,2423,2423,2044,7043,0]Ao[5848,13,4736,4736,2043,7043,0]Ao[5848,13,1805,1805,2042,7043,0]Am[5848,13,508,508,3537,7043,0]Am[5848,13,508,508,6055,7043,0]Am[5848,13,508,508,6650,7043,0]Am[5848,13,508,508,6485,7043,0]Ao[5848,13,4754,4754,6462,7043,0]Ao[5848,13,4754,4754,6457,7043,0]Ao[5848,13,4754,4754,3597,7043,0]Ao[5848,13,4754,4754,7312,7043,0]Ao[5848,13,4754,4754,4957,7043,0]Ai[1767,15,4715,0,4954,0,0]0Al[5848,15,4754,4754,4957,0,0]Ae[1767,5,3614,0,0,0,0]Ai[1767,15,3614,0,7111,0,0]Ai[1767,15,3614,0,4332,0,0]Ai[1767,15,3614,0,4968,0,0]Ai[1767,15,3614,0,4984,0,0]Ai[1767,15,3614,0,6377,0,0]Ah[1767,6,3614,5864,0,0,0]Ah[1767,5,3614,5864,0,0,0]Ah[1767,6,3614,4746,0,0,0]Ae[1767,6,4715,0,0,0,0]Ae[1767,6,1774,0,0,0,0]Al[1767,15,3614,3614,7310,0,0]Ah[1767,5,6018,7285,0,0,0]Al[5848,15,2423,2423,2044,0,0]Al[5848,15,4736,4736,2043,0,0]Ae[5848,6,2735,0,0,0,0]Ai[1767,19,3614,0,7159,0,0]Ae[1767,5,3614,0,0,0,0]Ae[6989,5,2927,0,0,0,0]2Ae[1767,5,2416,0,0,0,0]Ae[1767,5,3262,0,0,0,0]Ah[1767,6,3614,6328,0,0,0]0Ah[1767,5,5860,2969,0,0,0]Ah[4743,8,4744,2941,0,0,0]Ad[5848,5,508,0,0,0,0]Ae[1767,5,7007,0,0,0,0]Al[5848,15,2972,2972,4980,0,0]Ae[5847,5,2440,0,0,0,0]Ai[1767,15,3614,0,6741,0,0];Ai[1767,14,3262,0,7034,0,0]Ai[1767,12,3614,0,7103,0,0]Aj[6989,13,509,509,4925,0,0]Al[5847,14,2440,2440,6654,0,0]Al[1767,14,5860,2969,2492,0,0]Ae[5847,7,5848,0,0,0,0]Ae[5847,7,1767,0,0,0,0]Ae[5847,7,2420,0,0,0,0]Ai[5848,14,2036,0,7208,0,0]Al[1767,13,7007,7007,6651,0,0]Am[6989,13,509,509,4925,6645,0]Al[1767,13,3614,3614,4911,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[1767,14,3614,0,4928,0,0]Ao[5847,13,5848,5848,3529,4982,0]Al[5848,14,2972,2972,6063,0,0]Ai[1767,12,3614,0,4921,0,0]Al[1767,12,4715,4715,6469,0,0]Ao[1767,13,4715,4715,7195,6469,0]Am[1767,13,507,507,6354,6469,0]Am[1767,13,507,507,7200,6469,0]Ao[1767,13,2416,2416,7274,6469,0]Ao[1767,13,2416,2416,6639,6469,0]Ao[1767,13,2416,2416,7242,6469,0]Ao[1767,13,2416,2416,6478,6469,0]Am[1767,13,502,502,6352,6469,0]Am[1767,13,502,502,3118,6469,0]Ao[1767,13,1774,1774,6475,6469,0]Ao[1767,13,1774,1774,7241,6469,0]Ao[1767,13,7007,7007,6651,6469,0]Ai[1767,13,4715,0,3572,0,0]Al[1767,13,4715,4715,6458,0,0]Al[5848,13,4754,4754,3573,0,0]Ai[1767,13,3614,0,7151,0,0]Al[1767,13,3614,3614,3546,0,0]Ai[1767,14,3614,0,4928,0,0]Al[1767,13,3614,3614,3117,0,0]Ai[1767,14,3262,0,6640,0,0]1Ai[5848,14,4290,0,7370,0,0]Al[5848,14,2972,2972,4353,0,0]Ak[5847,14,5848,5848,282,0,0]Ai[1767,13,3614,0,6778,0,0]Ai[1767,13,3614,0,4967,0,0]Ai[1767,14,3262,0,7034,0,0]000Al[1767,13,3614,3614,3551,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[5848,14,7038,0,4286,0,0]Aj[6989,13,509,509,4296,0,0]Al[6989,13,1389,1389,4931,0,0]Ai[1767,13,3614,0,2509,0,0]66Ae[5847,7,2440,0,0,0,0]9Ai[1767,13,4715,0,3572,0,0]Al[5848,13,4754,4754,3573,0,0]Al[5847,14,2440,2440,2065,0,0]Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]Ai[1767,14,3262,0,6640,0,0]Ai[1767,13,1768,0,3564,0,0]Ai[1767,13,4715,0,3567,0,0]7Al[4743,13,4744,4750,3565,0,0]Al[5848,13,4754,4754,3568,0,0]82908Al[5848,15,2972,2972,4980,0,0]0Ae[6989,6,2927,0,0,0,0]Ae[5848,5,2972,0,0,0,0]Ah[1767,5,3614,2406,0,0,0]Al[1767,15,3614,3614,4275,0,0]Ah[1767,6,3614,5669,0,0,0]Ah[1767,5,3614,2441,0,0,0]Ae[1767,5,3262,0,0,0,0]Al[1767,15,2416,2416,4960,0,0]Al[5848,15,2729,2729,6349,0,0]Aj[5848,15,508,508,3537,0,0]Ai[1767,15,4753,0,6461,0,0]Al[5848,15,4754,4754,6462,0,0]Ag[1767,6,1768,784,0,0,0]Ag[4743,6,4744,784,0,0,0]Ah[5848,4,5849,2423,0,0,0]Af[5848,18,2423,0,0,0,0]Ai[1767,15,4715,0,4954,0,0]0Al[5848,15,4754,4754,4957,0,0]Af[1767,10,3736,0,0,0,0]Al[5848,15,2729,2729,4291,0,0]Ah[6989,6,1389,6520,0,0,0]Ah[5848,5,5849,4769,0,0,0]Al[5848,15,2735,2735,4298,0,0]Ae[5848,6,2972,0,0,0,0]Ah[1767,5,3614,4897,0,0,0]Al[5848,15,2423,2423,2044,0,0]Ai[1767,15,3614,0,6741,0,0]Ae[1767,5,3614,0,0,0,0]Ai[1767,15,3614,0,4332,0,0]Ai[1767,15,3614,0,4968,0,0]Ai[1767,15,3614,0,4984,0,0]Ai[1767,15,3614,0,6377,0,0]Ai[1767,14,3262,0,7034,0,0]Al[1767,13,1768,0,6757,6445,0]Al[1767,13,1768,0,7153,6445,0]Al[1767,13,4715,0,4954,6445,0]Ao[1767,13,4715,4715,7145,6445,0]Ao[1767,13,4715,4715,6621,6445,0]Ao[1767,13,2416,2416,4960,6445,0]Al[1767,13,3614,0,7111,6445,0]Al[1767,13,3614,0,4973,6445,0]Al[1767,13,3614,0,6643,6445,0]Al[1767,13,3614,0,4332,6445,0]Al[1767,13,3614,0,4968,6445,0]Al[1767,13,3614,0,6642,6445,0]Al[1767,13,3614,0,4984,6445,0]Al[1767,13,3614,0,6377,6445,0]Al[1767,13,3614,0,6344,6445,0]Al[1767,13,3614,0,6741,6445,0]Ao[1767,13,3614,4746,7016,6445,0]Al[1767,13,3614,0,6656,6445,0]Ao[1767,13,3614,3614,7227,6445,0]Ao[1767,13,3614,3614,6348,6445,0]Ao[1767,13,3614,3614,4280,6445,0]Ao[1767,13,3614,3614,7310,6445,0]Ao[1767,13,3614,3614,4275,6445,0]Ao[1767,13,3614,3614,7110,6445,0]Ao[1767,13,3736,3736,6025,6445,0]Al[1767,13,4753,0,6461,6445,0]Al[1767,13,4753,0,6455,6445,0]Al[1767,13,4753,0,7311,6445,0]An[4743,13,4744,784,6758,6445,0]Ao[4743,13,4744,4771,7154,6445,0]Ao[4743,13,3100,3100,4955,6445,0]An[5848,13,2729,901,4348,6445,0]An[5848,13,2729,901,4336,6445,0]Ao[5848,13,2729,2729,6349,6445,0]Ao[5848,13,2729,2729,4291,6445,0]Ao[5848,13,2972,2972,4980,6445,0]Ao[5848,13,2972,2972,6776,6445,0]Ao[5848,13,2735,2735,6632,6445,0]Ao[5848,13,2423,2423,2044,6445,0]Ao[5848,13,4736,4736,2043,6445,0]Ao[5848,13,1805,1805,2042,6445,0]Am[5848,13,508,508,3537,6445,0]Am[5848,13,508,508,6055,6445,0]Am[5848,13,508,508,6650,6445,0]Ao[5848,13,4754,4754,6462,6445,0]Ao[5848,13,4754,4754,6457,6445,0]Ao[5848,13,4754,4754,7312,6445,0]Ao[5848,13,4754,4754,4957,6445,0]Al[1767,13,3614,3614,3117,0,0]Al[1767,13,1768,0,4327,6448,0]Al[1767,13,1768,0,4345,6448,0]Al[1767,13,1768,0,3564,6448,0]Al[1767,13,1768,0,3583,6448,0]Al[1767,13,1768,0,3580,6448,0]Al[1767,13,1768,0,4339,6448,0]Ao[1767,13,3262,3262,6743,6448,0]Al[1767,13,4715,0,3567,6448,0]Al[1767,13,4715,0,3596,6448,0]Al[1767,13,4715,0,3572,6448,0]Ao[1767,13,4715,4715,6458,6448,0]Ao[1767,13,4715,4715,7195,6448,0]Ao[1767,13,2416,2416,6639,6448,0]Ao[1767,13,2416,2416,6478,6448,0]Ao[1767,13,2416,2416,7036,6448,0]Am[1767,13,502,502,6352,6448,0]Ao[1767,13,1774,1774,6475,6448,0]Ao[1767,13,1774,1774,6623,6448,0]Ao[1767,13,7007,7007,6651,6448,0]Ak[1767,13,506,0,6036,6448,0]Al[1767,13,3614,0,7111,6448,0]Al[1767,13,3614,0,6643,6448,0]Al[1767,13,3614,0,4332,6448,0]Al[1767,13,3614,0,4968,6448,0]Al[1767,13,3614,0,6642,6448,0]Al[1767,13,3614,0,4984,6448,0]Al[1767,13,3614,0,6377,6448,0]Al[1767,13,3614,0,2509,6448,0]Al[1767,13,3614,0,3593,6448,0]Al[1767,13,3614,0,4928,6448,0]Al[1767,13,3614,0,4322,6448,0]Al[1767,13,3614,0,6742,6448,0]Al[1767,13,3614,0,3174,6448,0]Ao[1767,13,3614,5864,4920,6448,0]Ao[1767,13,3614,5864,6618,6448,0]Ao[1767,13,3614,5864,6617,6448,0]Al[1767,13,3614,0,6344,6448,0]Ao[1767,13,3614,3733,2502,6448,0]Al[1767,13,3614,0,6741,6448,0]Al[1767,13,3614,0,7134,6448,0]Al[1767,13,3614,0,7151,6448,0]Al[1767,13,3614,0,6372,6448,0]Al[1767,13,3614,0,6737,6448,0]Al[1767,13,3614,0,7017,6448,0]Al[1767,13,3614,0,6656,6448,0]Al[1767,13,3614,0,7159,6448,0]Al[1767,13,3614,0,3586,6448,0]Ao[1767,13,3614,4746,4922,6448,0]Ao[1767,13,3614,4746,6619,6448,0]Ao[1767,13,3614,3614,6477,6448,0]Ao[1767,13,3614,3614,3546,6448,0]Ao[1767,13,3614,3614,6611,6448,0]Ao[1767,13,3614,3614,4918,6448,0]Ao[1767,13,3614,3614,4338,6448,0]Ao[1767,13,5860,2955,2050,6448,0]Ao[1767,13,5860,2969,2492,6448,0]Ao[1767,13,5860,2969,6644,6448,0]Ao[1767,13,5860,4778,4963,6448,0]An[1767,13,5860,782,3146,6448,0]Ao[1767,13,3736,3736,2497,6448,0]Ao[1767,13,3736,3736,6026,6448,0]Al[4743,13,4744,0,4351,6448,0]An[4743,13,4744,784,4328,6448,0]An[4743,13,4744,784,4346,6448,0]Ao[4743,13,4744,4750,3565,6448,0]Ao[4743,13,4744,4771,3584,6448,0]Ao[4743,13,3100,1786,4943,6448,0]Ao[5847,13,5848,5848,3529,6448,0]An[5847,13,5848,5848,282,6448,0]Al[5847,13,821,821,283,6448,0]Ao[6989,13,6990,2446,4363,6448,0]Ao[6989,13,2437,2437,3526,6448,0]Ao[6989,13,2927,2927,6068,6448,0]Am[6989,13,509,509,4295,6448,0]Am[6989,13,509,509,4925,6448,0]Am[6989,13,509,509,2469,6448,0]Ao[6989,13,1389,6520,6771,6448,0]An[6989,13,1389,825,3528,6448,0]Ao[6989,13,1389,1389,4930,6448,0]Ao[6989,13,1389,1389,6048,6448,0]Ao[5848,13,5849,4769,3581,6448,0]Ao[5848,13,5849,4769,4340,6448,0]Ao[5848,13,5849,4769,6772,6448,0]Ao[5848,13,2729,2729,6447,6448,0]Ao[5848,13,2972,3264,6368,6448,0]Ao[5848,13,2972,2972,2453,6448,0]Ao[5848,13,2972,2972,6736,6448,0]Ao[5848,13,2735,2735,4298,6448,0]Ao[5848,13,2423,2423,7039,6448,0]Ao[5848,13,2423,2423,7020,6448,0]Ao[5848,13,2423,2423,4289,6448,0]Ao[5848,13,1805,1805,4962,6448,0]Am[5848,13,508,508,3119,6448,0]Am[5848,13,508,508,6035,6448,0]Am[5848,13,508,508,6037,6448,0]Am[5848,13,508,508,6485,6448,0]Ao[5848,13,4754,4754,3568,6448,0]Ao[5848,13,4754,4754,3597,6448,0]Ao[5848,13,4754,4754,3573,6448,0]Al[5848,13,5849,6425,6062,0,0]Ai[4743,13,4744,0,4351,0,0]Ai[1767,13,4715,0,3572,0,0]Al[5848,13,4754,4754,3573,0,0]Al[5848,14,2972,2972,4353,0,0]Al[1767,13,1768,0,6757,6744,0]Al[1767,13,1768,0,7153,6744,0]Al[1767,13,4715,0,4954,6744,0]Ao[1767,13,4715,4715,7145,6744,0]Ao[1767,13,4715,4715,6621,6744,0]Ao[1767,13,2416,2416,4960,6744,0]Al[1767,13,3614,0,7111,6744,0]Al[1767,13,3614,0,4973,6744,0]Al[1767,13,3614,0,6643,6744,0]Al[1767,13,3614,0,4332,6744,0]Al[1767,13,3614,0,4968,6744,0]Al[1767,13,3614,0,6642,6744,0]Al[1767,13,3614,0,4984,6744,0]Al[1767,13,3614,0,6377,6744,0]Al[1767,13,3614,0,6344,6744,0]Al[1767,13,3614,0,6741,6744,0]Ao[1767,13,3614,4746,7016,6744,0]Al[1767,13,3614,0,6656,6744,0]Ao[1767,13,3614,3614,7227,6744,0]Ao[1767,13,3614,3614,6348,6744,0]Ao[1767,13,3614,3614,4280,6744,0]Ao[1767,13,3614,3614,7310,6744,0]Ao[1767,13,3614,3614,4275,6744,0]Ao[1767,13,3614,3614,7110,6744,0]Ao[1767,13,3736,3736,6025,6744,0]Al[1767,13,4753,0,6461,6744,0]Al[1767,13,4753,0,6455,6744,0]Al[1767,13,4753,0,7311,6744,0]An[4743,13,4744,784,6758,6744,0]Ao[4743,13,4744,4771,7154,6744,0]Ao[4743,13,3100,3100,4955,6744,0]An[5848,13,2729,901,4348,6744,0]An[5848,13,2729,901,4336,6744,0]Ao[5848,13,2729,2729,6349,6744,0]Ao[5848,13,2729,2729,4291,6744,0]Ao[5848,13,2972,2972,4980,6744,0]Ao[5848,13,2972,2972,6776,6744,0]Ao[5848,13,2735,2735,6632,6744,0]Ao[5848,13,2423,2423,2044,6744,0]Ao[5848,13,4736,4736,2043,6744,0]Ao[5848,13,1805,1805,2042,6744,0]Am[5848,13,508,508,3537,6744,0]Am[5848,13,508,508,6055,6744,0]Am[5848,13,508,508,6650,6744,0]Ao[5848,13,4754,4754,6462,6744,0]Ao[5848,13,4754,4754,6457,6744,0]Ao[5848,13,4754,4754,7312,6744,0]Ao[5848,13,4754,4754,4957,6744,0]Ab[6989,3,0,0,0,0,0]Al[5848,14,2972,2972,6736,0,0]Ai[1767,14,3614,0,4928,0,0]0Al[1767,13,3614,3614,3117,0,0]Ai[1767,14,3262,0,7034,0,0]Al[1767,14,5860,2969,2492,0,0]111Aj[1767,13,502,502,3118,0,0]Al[6989,13,2973,2973,2498,0,0]Al[1767,13,6018,7285,6626,0,0]44Ae[5847,7,1767,0,0,0,0]Ae[5847,7,2420,0,0,0,0]Ae[1767,2,4715,0,0,0,0]Al[5847,13,2440,2440,2065,0,0]Al[5847,14,2440,2440,6073,0,0]Al[1767,13,3614,3614,3546,0,0]Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,3119,0,0]Aj[5848,13,508,508,6037,0,0]Ah[1767,6,3614,4746,0,0,0]Ah[1767,5,3614,2406,0,0,0]Ae[1767,5,6018,0,0,0,0]Ae[5848,6,2423,0,0,0,0]Ai[1767,15,3614,0,6741,0,0]Ae[1767,5,4715,0,0,0,0]Ae[5847,6,5848,0,0,0,0]Ai[1767,19,3614,0,7159,0,0]Al[5848,15,2423,2423,2044,0,0]0Ai[1767,15,4753,0,6455,0,0]Al[5848,15,4754,4754,6457,0,0]3Ae[1767,5,3262,0,0,0,0]Ae[1767,4,3262,0,0,0,0]Ae[1767,5,2416,0,0,0,0]Af[5848,18,1388,0,0,0,0];Al[5848,15,4736,4736,2043,0,0]Al[5848,15,2735,2735,4298,0,0]Ai[1767,15,4715,0,4954,0,0]0Al[5848,15,4754,4754,4957,0,0]Al[5848,15,2735,2735,6632,0,0]Al[1767,15,3614,3614,4275,0,0]Ai[1767,14,3262,0,7034,0,0]Al[5848,14,2972,2972,6736,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[1767,14,3614,0,4928,0,0]Ai[1767,13,1768,0,3564,0,0]Ai[1767,14,1768,0,3564,0,0]Ai[1767,13,4715,0,3567,0,0]Al[4743,13,4744,4750,3565,0,0]Al[4743,14,4744,4750,3565,0,0]Al[5848,13,4754,4754,3568,0,0]Al[6989,14,3265,3265,3141,0,0]0Ao[5847,13,5848,5848,3529,6633,0]An[5847,13,5848,5848,282,6633,0]Al[5847,13,821,821,283,6633,0]Al[6989,14,1389,1389,6048,0,0]Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,6037,0,0]Ai[1767,14,3262,0,6640,0,0]0Ai[1767,13,3614,0,6778,0,0]?0Ai[1767,14,3262,0,7034,0,0]Al[1767,13,7007,7007,6651,0,0]Ae[1767,7,6018,0,0,0,0]222Ai[1767,13,3614,0,6372,0,0]Al[1767,13,3614,3614,3117,0,0]Ae[5847,7,1767,0,0,0,0]Ae[5847,7,2420,0,0,0,0]Al[1767,13,2416,2416,6639,0,0]Ai[1767,14,3614,0,6372,0,0]Aj[5848,13,508,508,3119,0,0]6Ai[1767,13,3614,0,4975,0,0]Ai[1767,19,3614,0,7159,0,0]Af[1767,18,1803,0,0,0,0]Ai[1767,15,3614,0,6741,0,0]Ai[1767,10,3614,5668,0,0,0]Af[1767,18,3604,0,0,0,0]Af[5848,18,3605,0,0,0,0]Af[1767,18,2416,0,0,0,0]Af[1767,18,3315,0,0,0,0]6Ai[1767,10,3614,2929,0,0,0]Al[5848,15,2729,2729,4291,0,0]28Ah[5848,5,2972,3738,0,0,0]Ae[1767,5,3614,0,0,0,0]Ah[1767,6,3614,5670,0,0,0]Ai[1767,15,3614,0,7111,0,0]Al[5848,14,2972,2972,2477,0,0]0Ai[1767,14,3262,0,7034,0,0]Ac[896,7,897,0,0,0,0]Ai[1767,14,3614,0,4322,0,0]Al[1767,13,3614,3614,3546,0,0]Ae[1767,7,3315,0,0,0,0]Ae[1767,7,1803,0,0,0,0]Al[6989,13,6990,2446,4363,0,0]Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,6037,0,0]Al[1767,13,3614,3614,4918,0,0]Ai[1767,14,3614,0,4928,0,0]:Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]10Al[1767,13,2416,2416,7036,0,0]Ai[1767,19,3614,0,7159,0,0]Ah[1767,5,3614,4897,0,0,0]Af[5848,18,1388,0,0,0,0]2Ae[5847,6,5848,0,0,0,0]Af[1767,10,3614,0,0,0,0]Af[1767,18,3604,0,0,0,0]Af[5848,18,3605,0,0,0,0]Af[1767,10,3736,0,0,0,0]7Ai[1767,15,3614,0,4332,0,0]Ae[1767,6,4715,0,0,0,0]Ai[1767,15,4753,0,6455,0,0]Al[5848,15,4754,4754,6457,0,0]:;Ah[1767,5,1768,4771,0,0,0]Ah[4743,5,4744,4771,0,0,0]==Al[5848,15,2735,2735,4298,0,0]Ae[1767,5,3614,0,0,0,0]Ah[1767,5,3614,2929,0,0,0]Ai[1767,14,3262,0,7034,0,0]Ao[5847,13,5848,5848,3529,6610,0]An[5847,13,5848,5848,282,6610,0]Al[5847,13,821,821,283,6610,0]Ai[1767,13,3614,0,6778,0,0]Ae[1767,7,3614,0,0,0,0]Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]10Al[6989,14,3265,3265,3141,0,0]0Ai[1767,13,3614,0,2509,0,0]Al[5848,13,2729,2729,6447,0,0]Al[5848,14,2972,2972,6063,0,0]Ai[1767,14,3262,0,6640,0,0]Aj[1767,13,502,502,3118,0,0]7676==5==Al[1767,13,2416,2416,7274,0,0]Al[1767,13,3614,3614,4918,0,0]Ao[5848,13,2735,2735,4298,7044,0]:94Af[5848,18,1805,0,0,0,0]Ae[1767,5,4715,0,0,0,0]Ai[1767,15,1768,0,6757,0,0]Ak[4743,15,4744,784,6758,0,0]Ad[1767,5,507,0,0,0,0]Al[5848,15,2729,2729,6349,0,0]Al[1767,15,3736,3736,6025,0,0]Al[1767,15,4715,4715,6621,0,0]Al[5848,15,4736,4736,2043,0,0]Ao[5847,13,5848,5848,3529,4982,0]Ai[1767,13,3614,0,7151,0,0]Al[6989,14,3265,3265,3141,0,0]Ae[1767,7,3614,0,0,0,0]1Ai[1767,13,3614,0,6778,0,0]Al[6989,14,1389,1389,6048,0,0]Ai[1767,14,3614,0,4322,0,0]Ai[1767,12,3614,0,4921,0,0]Ai[1767,14,3262,0,7034,0,0]2Ai[1767,14,3614,0,4928,0,0]Ai[1767,13,1768,0,3173,0,0]12Al[4743,13,3100,3100,4955,0,0]Ae[1767,6,3614,0,0,0,0]Af[1767,18,3604,0,0,0,0]Af[5848,18,3605,0,0,0,0]?Ak[5848,15,2729,901,4348,0,0]Ai[1767,19,3614,0,7159,0,0]Ai[1767,15,4753,0,6461,0,0]Al[5848,15,4754,4754,6462,0,0]Al[5848,15,2729,2729,6349,0,0]Ae[1767,5,1774,0,0,0,0]Ae[1767,5,2416,0,0,0,0]Ah[1767,5,3614,5670,0,0,0]Ai[1767,13,3614,0,6778,0,0]Ai[1767,13,4715,0,3567,0,0]Al[5848,13,4754,4754,3568,0,0]Al[4743,13,4744,0,4351,7426,0]Ai[1767,14,3614,0,4322,0,0]Ao[5847,13,5848,5848,3529,6633,0]An[5847,13,5848,5848,282,6633,0]Al[5847,13,821,821,283,6633,0]Ae[5847,7,1767,0,0,0,0]Ae[5847,7,2420,0,0,0,0]Ai[1767,13,3614,0,6372,0,0]:Ai[1767,13,3614,0,7244,0,0]Ai[1767,14,3262,0,7034,0,0]0Al[6989,14,3265,3265,3141,0,0]Al[6989,14,2927,2927,2459,0,0]442Ai[1767,13,3614,0,7134,0,0]Ai[1767,14,3614,0,4928,0,0]6Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]2Ai[1767,14,3262,0,6640,0,0]Aj[5848,13,508,508,3119,0,0]Al[5848,15,2735,2735,4298,0,0]Ae[1767,5,2416,0,0,0,0]1Ae[1767,7,1803,0,0,0,0]Ae[1767,7,3315,0,0,0,0]10176;Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,6037,0,0]10>98>Ae[1767,7,6018,0,0,0,0]>>>Ai[1767,13,3614,0,6778,0,0]Al[1767,13,3614,3614,6611,0,0]Ai[1767,13,1768,0,3564,0,0]Ai[1767,13,4715,0,3567,0,0]Ai[1767,13,4715,0,3572,0,0]Al[4743,13,4744,4750,3565,0,0]Al[5848,13,4754,4754,3568,0,0]Al[5848,13,4754,4754,3573,0,0]6Ai[1767,19,3614,0,7159,0,0]Ae[1767,6,3614,0,0,0,0]Ah[1767,5,4753,4754,0,0,0]Ae[5848,5,4754,0,0,0,0]Al[5848,15,2972,2972,6776,0,0]Al[5848,15,2729,2729,4291,0,0]Af[5848,18,1388,0,0,0,0];8Al[1767,13,3614,3614,4918,0,0]Al[1767,13,5860,2969,2492,0,0]Ai[1767,14,3262,0,7034,0,0]0Al[6989,14,3265,3265,3141,0,0]>;Al[6989,13,6990,2446,4363,0,0]7Al[5848,15,4736,4736,2043,0,0]Ai[1767,18,3604,3605,0,0,0]Af[5848,18,3605,0,0,0,0]Ag[1767,18,507,508,0,0,0]Ag[1767,18,506,508,0,0,0]Ae[5848,18,508,0,0,0,0]Af[1767,18,2416,0,0,0,0]Al[5848,15,2729,2729,6349,0,0]Ai[1767,13,3614,0,7134,0,0]Al[5848,13,2729,2729,6447,0,0]Am[5847,13,5848,5848,282,842,0]Ak[5847,13,821,821,283,842,0]Al[1767,13,3614,3614,3117,0,0]?Ao[5847,13,5848,5848,3529,6633,0]An[5847,13,5848,5848,282,6633,0]Al[5847,13,821,821,283,6633,0]3Ai[1767,13,3614,0,6372,0,0]Af[1767,18,3614,0,0,0,0]Ai[1767,14,3262,0,7034,0,0]Ai[1767,14,3262,0,6640,0,0]Ai[1767,13,4715,0,3572,0,0]Al[5848,13,4754,4754,3573,0,0]Aj[1767,13,502,502,3118,0,0]Ae[5848,7,2401,0,0,0,0]555Al[1767,13,3614,3614,3551,0,0]6Al[6989,13,2927,2927,2459,0,0]Ai[1767,19,3614,0,7159,0,0]Ah[1767,5,3614,2929,0,0,0]Al[5848,15,2729,2729,4291,0,0]0Af[5848,18,1805,0,0,0,0]3Al[1767,13,3614,3614,3546,0,0]Ai[1767,13,3614,0,6778,0,0]Al[6989,14,3265,3265,3141,0,0]Al[5848,13,2729,2729,6447,0,0]Al[5848,15,2735,2735,4298,0,0]Af[5848,18,3605,0,0,0,0]Af[1767,18,2416,0,0,0,0]Ag[1767,18,507,508,0,0,0]Ag[1767,18,506,508,0,0,0]Ae[5848,18,508,0,0,0,0]35Ai[1767,14,3262,0,7034,0,0]Ai[1767,14,3262,0,6367,0,0]Al[5848,14,2972,3264,3143,0,0]10Al[1767,13,3614,3614,4918,0,0]Ai[1767,13,3614,0,6372,0,0]Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,6037,0,0]10?Af[5848,18,1805,0,0,0,0]Ai[1767,13,3614,0,6778,0,0]32Al[1767,14,5860,2969,2492,0,0]01Al[1767,13,3614,3614,3546,0,0]Ao[5847,13,5848,5848,3529,6633,0]An[5847,13,5848,5848,282,6633,0]Al[5847,13,821,821,283,6633,0]Ai[5848,18,2972,3738,0,0,0]Ae[5847,7,5848,0,0,0,0]?7Ae[5848,7,2729,0,0,0,0]Ae[6989,7,2973,0,0,0,0]99>Al[5848,15,2423,2423,2044,0,0]Ao[5847,13,5848,5848,3529,4982,0]Al[1767,13,3614,3614,4918,0,0]Al[1767,13,3614,3614,3117,0,0]Ak[1767,13,5860,782,3146,0,0]>Ai[1767,14,3262,0,7034,0,0]?Ae[5848,7,3322,0,0,0,0]1Ah[1767,13,506,0,6036,0,0]Aj[5848,13,508,508,6037,0,0]") \ No newline at end of file diff --git a/pr/3367/docs/search.index/function/0115eda9b6ed.js b/pr/3367/docs/search.index/function/0115eda9b6ed.js new file mode 100644 index 0000000000..27d97ebcb6 --- /dev/null +++ b/pr/3367/docs/search.index/function/0115eda9b6ed.js @@ -0,0 +1 @@ +rd_("Aa[\"{CG@jACIb}\",[]]0Aa[\"{CG@lACIb}\",[]]Aa[\"{BFLfAKK`}\",[]]Bf[\"{{{BED`{BALn}}{BED`{BALn}}}G@`}\",[]]Bf[\"{{{BED`{AKMh}}{BED`{AKMh}}}G@`}\",[]]Bf[\"{{{BED`{AKOn}}{BED`{AKOn}}}G@`}\",[]]Bf[\"{{{BED`{AKOh}}{BED`{AKOh}}}G@`}\",[]]Bf[\"{{{BED`{BANf}}{BED`{BANf}}}G@`}\",[]]Bf[\"{{{BED`{AKMn}}{BED`{AKMn}}}G@`}\",[]]Bf[\"{{{BED`{ALAh}}{BED`{ALAh}}}G@`}\",[]]Bf[\"{{{BED`{AKNh}}{BED`{AKNh}}}G@`}\",[]]Bf[\"{{{BED`{CBGd}}{BED`{CBGd}}}G@`}\",[]]Bf[\"{{{BED`{CCKn}}{BED`{CCKn}}}G@`}\",[]]Bf[\"{{{BED`{CGHn}}{BED`{CGHn}}}G@`}\",[]]Bf[\"{{{BED`{CCNf}}{BED`{CCNf}}}G@`}\",[]]Bf[\"{{{BED`{BAMh}}{BED`{BAMh}}}G@`}\",[]]Bf[\"{{{BED`{BFM`}}{BED`{BFM`}}}G@`}\",[]]Bf[\"{{{BED`{CCNd}}{BED`{CCNd}}}G@`}\",[]]Bf[\"{{{BED`{BFO`}}{BED`{BFO`}}}G@`}\",[]]Bf[\"{{{BED`{CAMb}}{BED`{CAMb}}}G@`}\",[]]Bf[\"{{{BED`{ACIj}}{BED`{ACIj}}}G@`}\",[]]Bd[\"{{{BED`{OLd}}{BED`{OLd}}}G@`}\",[]]Bf[\"{{{BED`{AHLl}}{BED`{AHLl}}}G@`}\",[]]Bf[\"{{{BED`{BFG`}}{BED`{BFG`}}}G@`}\",[]]Bf[\"{{{BED`{CCKd}}{BED`{CCKd}}}G@`}\",[]]Bf[\"{{{BED`{CCKb}}{BED`{CCKb}}}G@`}\",[]]Bf[\"{{{BED`{CAI`}}{BED`{CAI`}}}G@`}\",[]]Bf[\"{{{BED`{ACHl}}{BED`{ACHl}}}G@`}\",[]]Bf[\"{{{BED`{CDJj}}{BED`{CDJj}}}G@`}\",[]]Bf[\"{{{BED`{CIHn}}{BED`{CIHn}}}G@`}\",[]]Bf[\"{{{BED`{CDJb}}{BED`{CDJb}}}G@`}\",[]]Bf[\"{{{BED`{CFMb}}{BED`{CFMb}}}G@`}\",[]]Bf[\"{{{BED`{CD@`}}{BED`{CD@`}}}G@`}\",[]]Bf[\"{{{BED`{CGNn}}{BED`{CGNn}}}G@`}\",[]]Bf[\"{{{BED`{AL@d}}{BED`{AL@d}}}G@`}\",[]]Bf[\"{{{BED`{BFGd}}{BED`{BFGd}}}G@`}\",[]]Bf[\"{{{BED`{CCKf}}{BED`{CCKf}}}G@`}\",[]]Bf[\"{{{BED`{CBIj}}{BED`{CBIj}}}G@`}\",[]]Bf[\"{{{BED`{BANd}}{BED`{BANd}}}G@`}\",[]]Bf[\"{{{BED`{A@@d}}{BED`{A@@d}}}G@`}\",[]]Bf[\"{{{BED`{ACGh}}{BED`{ACGh}}}G@`}\",[]]Bf[\"{{{BED`{CCNh}}{BED`{CCNh}}}G@`}\",[]]Bf[\"{{{BED`{BAOn}}{BED`{BAOn}}}G@`}\",[]]Bf[\"{{{BED`{BAM`}}{BED`{BAM`}}}G@`}\",[]]Bf[\"{{{BED`{AKMj}}{BED`{AKMj}}}G@`}\",[]]Bf[\"{{{BED`{AL@`}}{BED`{AL@`}}}G@`}\",[]]Bf[\"{{{BED`{BFIn}}{BED`{BFIn}}}G@`}\",[]]Bf[\"{{{BED`{AKI`}}{BED`{AKI`}}}G@`}\",[]]Bf[\"{{{BED`{AKOj}}{BED`{AKOj}}}G@`}\",[]]Bf[\"{{{BED`{BANh}}{BED`{BANh}}}G@`}\",[]]Bf[\"{{{BED`{CDNh}}{BED`{CDNh}}}G@`}\",[]]Bf[\"{{{BED`{ACBj}}{BED`{ACBj}}}G@`}\",[]]Bf[\"{{{BED`{BAId}}{BED`{BAId}}}G@`}\",[]]Bf[\"{{{BED`{CFOn}}{BED`{CFOn}}}G@`}\",[]]Bf[\"{{{BED`{CFMh}}{BED`{CFMh}}}G@`}\",[]]Bf[\"{{{BED`{BAHb}}{BED`{BAHb}}}G@`}\",[]]Bf[\"{{{BED`{BOBf}}{BED`{BOBf}}}G@`}\",[]]Bf[\"{{{BED`{AKN`}}{BED`{AKN`}}}G@`}\",[]]Bf[\"{{{BED`{ALAj}}{BED`{ALAj}}}G@`}\",[]]Bf[\"{{{BED`{AKNj}}{BED`{AKNj}}}G@`}\",[]]Ak[\"{{{BED`{BFLn}}}AL@d}\",[]]Ak[\"{{{BED`{BFMn}}}AL@d}\",[]]Ek[\"{{{AHLj{}{{A@Bf{c}}}}e}{{ACB`{{AHLj{}{{A@Bf{c}}}}e}}}{OLfl}AHLj}\",[\"Watcher::Value\",\"W\"]]Co[\"{g{{Af{ig}}}{}{}{{ACGd{ce}}}{{ACGd{ce}}}}\",[\"B\",\"E\",\"P\",\"T\"]]00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000o[\"{{}AHJj}\",[]]Ba[\"{{{BED`{CHCf}}c}NCjBAHl}\",[\"\"]]D`[\"{g{{BAd{ig}}}{}{}{{ACGd{ce}}}{{ACGd{ce}}}}\",[\"B\",\"E\",\"P\",\"T\"]]00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000Bg[\"{{{BED`{BALn}}{BED`{BALn}}}AKNn}\",[]]Bg[\"{{{BED`{AKMh}}{BED`{AKMh}}}AKNn}\",[]]Bg[\"{{{BED`{AKOn}}{BED`{AKOn}}}AKNn}\",[]]Bg[\"{{{BED`{BANf}}{BED`{BANf}}}AKNn}\",[]]Bg[\"{{{BED`{ALAh}}{BED`{ALAh}}}AKNn}\",[]]Bg[\"{{{BED`{ACIj}}{BED`{ACIj}}}AKNn}\",[]]Bg[\"{{{BED`{AL@d}}{BED`{AL@d}}}AKNn}\",[]]Bg[\"{{{BED`{BFGd}}{BED`{BFGd}}}AKNn}\",[]]Bg[\"{{{BED`{CCKf}}{BED`{CCKf}}}AKNn}\",[]]Bg[\"{{{BED`{A@@d}}{BED`{A@@d}}}AKNn}\",[]]Bg[\"{{{BED`{BAM`}}{BED`{BAM`}}}AKNn}\",[]]Bg[\"{{{BED`{AKMj}}{BED`{AKMj}}}AKNn}\",[]]Bg[\"{{{BED`{AL@`}}{BED`{AL@`}}}AKNn}\",[]]Bg[\"{{{BED`{BANh}}{BED`{BANh}}}AKNn}\",[]]Bg[\"{{{BED`{CDNh}}{BED`{CDNh}}}AKNn}\",[]]Bg[\"{{{BED`{ALAj}}{BED`{ALAj}}}AKNn}\",[]]Af[\"{{AHElG@`}AHEl}\",[]]A`[\"{AL@dBBb}\",[]]Aa[\"{ACCfBAHn}\",[]]Aa[\"{BAHbACG`}\",[]]Cf[\"{{{BED`{BALn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CDLj}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BAOb}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{AKMh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{AKOn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CGNb}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{AKOh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BANf}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CCN`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Bj[\"{{{BED`{CFOd}}{BED`{FCdBAIb}}}ACGj}\",[]]Cf[\"{{{BED`{CAKn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Bj[\"{{{BED`{CDJn}}{BED`{FCdBAIb}}}ACGj}\",[]]Cf[\"{{{BED`{AKMn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{ALAh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{AKNh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{BFKd}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Bj[\"{{{BED`{CFMl}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CGMb}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CCKj}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CBGd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CHCf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CAJd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CHD`}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFL`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CHMd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCMn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CHId}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CBIl}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CFOh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CAJ`}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AHEl}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CBIf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CHIb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCKn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCOf}}{BED`{FCdBAIb}}}ACGj}\",[]]Cf[\"{{{BED`{BOBh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CHIh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CGHn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BFMj}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BFLn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CCNf}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BAMh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BFM`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CCNd}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{BFMn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{BFO`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CAMb}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CDOd}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{ACIj}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Ce[\"{{{BED`{OLd}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{ALAb}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{BFH`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{BALd}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CDJl}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{AHLl}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Bj[\"{{{BED`{BFG`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CCKd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCKb}}{BED`{FCdBAIb}}}ACGj}\",[]]0Cf[\"{{{BED`{CAI`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{ACHl}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Bj[\"{{{BED`{ACHl}}{BED`{FCdBAIb}}}ACGj}\",[]]Cf[\"{{{BED`{CDJj}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CGKl}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CGMn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CALh}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CIHn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{BOB`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CGO`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Cf[\"{{{BED`{CDJb}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CFMb}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Bj[\"{{{BED`{CFM`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Cf[\"{{{BED`{CD@`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CGNn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{AL@d}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Bj[\"{{{BED`{BFGd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCKf}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CBIj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AHEj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AKKd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CHGf}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CAIh}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BAG`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CIAl}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CCJf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ACBh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AKKn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCMf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFEn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BAFf}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CDOn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFFl}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CGHl}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BANd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AHHh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{A@@d}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{ACGh}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CCNh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFLf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AHId}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ACHb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CBJd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOAb}}{BED`{FCdBAIb}}}ACGj}\",[]]0Cn[\"{{{BED`{{BOAd{c}}}}{BED`{FCdBAIb}}}ACGj{OLlCDN`OLf}}\",[\"P\"]]Cf[\"{{{BED`{CBGj}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CBFn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Cf[\"{{{BED`{CIAn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]0Bj[\"{{{BED`{CFMd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCLd}}{BED`{FCdBAIb}}}ACGj}\",[]]Cf[\"{{{BED`{BAOn}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]000Bj[\"{{{BED`{BAM`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CDLl}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BAOd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AKMj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AL@`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CGNd}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BFIn}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BFKf}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{AKIb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bi[\"{{{BED`{BCd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{A@Bb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOGb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCOl}}{BED`{FCdBAIb}}}ACGj}\",[]]Bi[\"{{{BED`{BCf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BBAf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ACCf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOFh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CBIh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCMj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CDIn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BAHn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFGj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ACDj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CDNf}}{BED`{FCdBAIb}}}ACGj}\",[]]Cf[\"{{{BED`{AKI`}}{BED`{FCdBAIb}}}{{ACGl{NCjOMd}}}}\",[]]Bj[\"{{{BED`{AKI`}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFHd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOD`}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AHHj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOEl}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AKOj}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BANh}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CDNh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BAOh}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BAN`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CAIj}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BAHf}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CBEn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ACCb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFEj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CAHj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AHHn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CAL`}}{BED`{FCdBAIb}}}ACGj}\",[]]Co[\"{{{BED`{{CGHj{c}}}}{BED`{FCdBAIb}}}ACGj{OLlFMb}}\",[\"Loader\"]]Co[\"{{{BED`{{CALj{ce}}}}{BED`{FCdBAIb}}}ACGjOLlOLl}\",[\"EC\",\"EA\"]]Co[\"{{{BED`{{BOEn{ce}}}}{BED`{FCdBAIb}}}ACGjOLlOLl}\",[\"EC\",\"EA\"]]Bj[\"{{{BED`{CAHd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ACBj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFLh}}{BED`{FCdBAIb}}}ACGj}\",[]]Co[\"{{{BED`{{BB@b{ce}}}}{BED`{FCdBAIb}}}ACGjOLlOLl}\",[\"EC\",\"EA\"]]Bj[\"{{{BED`{ACEj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CDJ`}}{BED`{FCdBAIb}}}ACGj}\",[]]Co[\"{{{BED`{{BFEf{ce}}}}{BED`{FCdBAIb}}}ACGjOLlOLl}\",[\"EC\",\"EA\"]]Bj[\"{{{BED`{ACHf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFNh}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CDO`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BAId}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CCM`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bi[\"{{{BED`{OOh}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CFOn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CFMh}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BAHb}}{BED`{FCdBAIb}}}ACGj}\",[]]Bi[\"{{{BED`{OOf}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bi[\"{{{BED`{OOd}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BFLd}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{AKJb}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{BODn}}{BED`{FCdBAIb}}}ACGj}\",[]]0Ck[\"{{{BED`{{CCOd{c}}}}{BED`{FCdBAIb}}}ACGj{OLlAHGd}}\",[\"E\"]]Cn[\"{{{BED`{{CCOd{c}}}}{BED`{FCdBAIb}}}ACGj{OLlOLlAHGd}}\",[\"E\"]]Bj[\"{{{BED`{AHEn}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOBf}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BOBj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{CBJj}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CBGl}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CBGb}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{AKN`}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{ALAj}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{CIB`}}{BED`{FCdBAIb}}}ACGj}\",[]]0Bj[\"{{{BED`{AKNj}}{BED`{FCdBAIb}}}ACGj}\",[]]Bj[\"{{{BED`{BFKj}}{BED`{FCdBAIb}}}ACGj}\",[]]0D`[\"{{{BED`{FCd{AHLj{}{{A@Bf{c}}}}}}}c{OLfl}}\",[\"Watcher::Value\"]]Aa[\"{CDOhBAId}\",[]]A`[\"{ALAbFHb}\",[]]Aa[\"{CCIhACIb}\",[]]0Aa[\"{CCIjACIb}\",[]]Ak[\"{{{BED`{AKOh}}}ACBb}\",[]]Ak[\"{{{BED`{CHCf}}}ACBb}\",[]]Aa[\"{CBHlACBb}\",[]]Ak[\"{{{BED`{AKOj}}}ACBb}\",[]]Aa[\"{CBHnACBb}\",[]]Hd[\"{{{AHLj{}{{A@Bf{c}}}}g}{{ACGl{{BCb{{AHLj{}{{A@Bf{c}}}}e}}CAJb}}}{OLfl}{OLfl}{{n{c}{{ACGb{e}}}}FMbFMh}}\",[\"Watcher::Value\",\"T\",\"\"]]Aa[\"{BALnAKMh}\",[]]Bg[\"{{{ACG`{AKOn}}{AKHn{BFNd}}}AKMn}\",[]]Aa[\"{BALnAKNh}\",[]]Bi[\"{{AKNh{BED`{FFn}}{ACG`{FHb}}}CBGd}\",[]]A`[\"{BDlCFOh}\",[]]o[\"{{}CCOf}\",[]]o[\"{{}BOBh}\",[]]Be[\"{{{BAl{CGLd}}{BAl{CGGn}}}CALh}\",[]]Ah[\"{{FMdBBbFHb}AL@d}\",[]]o[\"{{}CCJf}\",[]]Aa[\"{AKKdCBJd}\",[]]Df[\"{{ce}{{BOAd{c}}}{CDN`OLf}{{n{ACFd}{{ACGb{G@`}}}}FMbFMh}}\",[\"P\",\"F\"]]Aa[\"{BAM`AKMj}\",[]]Aa[\"{AKMjBFIn}\",[]]Am[\"{{AKJdFHbAKJdFHb}CCOl}\",[]]k[\"{{}}\",[]]Cd[\"{{BBAf{BED`{BAHn}}{BAl{AHHj}}}{{ACH`{BFGj}}}}\",[]]Aa[\"{AKJdBOEl}\",[]]Bg[\"{{cBAO`BOBj}CBEn{{FJb{AKOl}}}}\",[\"\"]]Ag[\"{{AKK`CAHh}BFLd}\",[]]o[\"{{}BOBj}\",[]]Bg[\"{{{ACG`{AKOl}}{AKHn{BFNd}}}AKN`}\",[]]Aa[\"{ACFhAKNj}\",[]]Ak[\"{{{BED`{BFFl}}}AKJd}\",[]]Aa[\"{BALdAKJd}\",[]]Ai[\"{{}{{ACGn{CCLd}}}}\",[]]Aa[\"{CGAdACIh}\",[]]Aa[\"{BOEnACG`}\",[]]Af[\"{{CHMdFH`}CHMd}\",[]]Af[\"{{AHElFH`}AHEl}\",[]]Aa[\"{BFGdCCKf}\",[]]Ak[\"{{{BED`{CFOn}}}BAId}\",[]]Aa[\"{BANfAKOn}\",[]]Aa[\"{CDKbAKOn}\",[]]Aa[\"{BANhAKOl}\",[]]A`[\"{CHDbBDl}\",[]]A`[\"{CDKdBDl}\",[]]A`[\"{BFHjBDl}\",[]]o[\"{{}BED`}\",[]]00A`[\"{BFH`FHb}\",[]]Aa[\"{CCKdBFNd}\",[]]Aa[\"{BFGdBFNd}\",[]]Aa[\"{CDIfBFNd}\",[]]Cb[\"{{{BED`{FCdBFEn}}}{{ACGl{{BDn{BA`}}BAFf}}}}\",[]]Bk[\"{{{BED`{BFFl}}}{{ACG`{{BDn{BA`}}}}}}\",[]]Ao[\"{AHEj{{ACGl{AKKdBAG`}}}}\",[]]Aa[\"{BB@bBFEf}\",[]]Aa[\"{CD@`CGNn}\",[]]Aa[\"{CIEhBFNj}\",[]]A`[\"{BALdFHb}\",[]]Aa[\"{AKNhAKMn}\",[]]0Aa[\"{AKNjAKN`}\",[]]A`[\"{ACBbNCj}\",[]]00000000000000000000000000000000000000000000Am[\"{{{BED`{FCdBFLn}}}NCj}\",[]]1111Am[\"{{{BED`{FCdBFMn}}}NCj}\",[]]22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222A`[\"{cc{}}\",[\"T\"]]Aa[\"{CAMdBALn}\",[]]Aa[\"{BOBbCDLj}\",[]]2A`[\"{ONbCDLj}\",[]]3Aj[\"{{{A@Bl{BA`}}}BAOb}\",[]]Aa[\"{BFNbBAOb}\",[]]Ck[\"{{{ACB`{BALn{ACG`{AKOn}}{BED`{{ABOl{BFNd}}}}}}}AKMh}\",[]]Aa[\"{BFIlAKMh}\",[]]Aa[\"{AKNhAKMh}\",[]]Aa[\"{BALnAKMh}\",[]]99A`[\"{BDlAKOn}\",[]]::Aa[\"{BANfAKOh}\",[]]Aa[\"{AKOnAKOh}\",[]]Aa[\"{AKOnBANf}\",[]]=====Aa[\"{AKMhAKMn}\",[]]>>Ak[\"{{{ALA`{AKLd}}}AKNh}\",[]]Bc[\"{{{BED`{{ALA`{AKLd}}}}}AKNh}\",[]]Aa[\"{CBGdAKNh}\",[]]A`[\"{cc{}}\",[\"T\"]]Aa[\"{AKMhAKNh}\",[]]1Aa[\"{CBFnBFKd}\",[]]22Aa[\"{BFL`CCKj}\",[]]333Bo[\"{cCHCf{{CAJj{}{{FJj{{BAn{BAHl}}}}}}}}\",[\"T\"]]4444444444444444444444Aa[\"{CDJjCGHn}\",[]]555Aa[\"{BAMhCCNf}\",[]]Aa[\"{BFM`BAMh}\",[]]7Aa[\"{CDJjBAMh}\",[]]Aa[\"{CBJbBAMh}\",[]]9Aa[\"{CDJjBFM`}\",[]]:Aa[\"{BAMhCCNd}\",[]];;Aa[\"{CAMbBFO`}\",[]]Aa[\"{CAI`BFO`}\",[]]Aa[\"{CDJjBFO`}\",[]]>Aa[\"{CDJjCAMb}\",[]]?Aa[\"{BAIdACIj}\",[]]Aa[\"{AL@dACIj}\",[]]A`[\"{FGnACIj}\",[]]A`[\"{BA`ACIj}\",[]]A`[\"{cc{}}\",[\"T\"]]A`[\"{FH`ACIj}\",[]]11111111111A`[\"{OLhCDJj}\",[]]Aa[\"{CD@`CDJj}\",[]]333333Aa[\"{BOGhBOB`}\",[]]44Aa[\"{CD@`CDJb}\",[]]55A`[\"{ONnCD@`}\",[]]6Aa[\"{CGNnCD@`}\",[]]Aa[\"{CAJnCD@`}\",[]]88Aa[\"{ACIjAL@d}\",[]]999999Aa[\"{CFM`CHGf}\",[]]Aa[\"{CHGfCAIh}\",[]]Aa[\"{CDJjCAIh}\",[]]<<<<<<<Aa[\"{BOBbBFKf}\",[]]A`[\"{ONdBFKf}\",[]]A`[\"{cc{}}\",[\"T\"]]0000000000000000000000000000Aa[\"{BANhAKOj}\",[]]Aa[\"{AKOlAKOj}\",[]]2Aa[\"{AKOlBANh}\",[]]33A`[\"{OObBAOh}\",[]]4A`[\"{OOhBAN`}\",[]]A`[\"{OObBAN`}\",[]]Aa[\"{BAHfCAIj}\",[]]A`[\"{OOfCAIj}\",[]]A`[\"{OObCAIj}\",[]]9A`[\"{OMhBAHf}\",[]]:Aa[\"{AHGfBAHf}\",[]]Aa[\"{AKJbBAHf}\",[]]<<<<<<<<<<<<<<<<<Be[\"{{{BED`{FFn}}{BED`{CAKf}}}NCj}\",[]]A`[\"{BALdFHb}\",[]]E`[\"{{{BED`{AKKd}}c{BED`{{ABOl{BA`}}}}CCJf}{{ACGl{BFEnCHGf}}}{{FJb{AKMh}}}}\",[\"\"]]o[\"{{}AKOh}\",[]]0Cf[\"{{{BED`{BBAf}}{BED`{`}}}{{ACH`{{ACG`{CALl}}}}}}\",[]]D`[\"{{{BED`{BOBh}}{BED`{BALn}}{BED`{FFn}}}{{ACGl{AKNhBODn}}}}\",[]]D`[\"{{{BED`{BOBj}}{BED`{ACFh}}{BED`{FFn}}}{{ACGl{AKNjBODn}}}}\",[]]Be[\"{{{BED`{BFFl}}}{{ACG`{ACBb}}}}\",[]]A`[\"{BFH`FHb}\",[]]Aa[\"{CFOdAHFl}\",[]]Aa[\"{CAKnAHFl}\",[]]Aa[\"{AHHnAHFl}\",[]]10Af[\"{{BDlBOBh}CFOh}\",[]]o[\"{{}BFHb}\",[]]n[\"{{}FGn}\",[]]05o[\"{{}AHF`}\",[]]00Bo[\"{{{BED`{FCdCDOd}}ACBb}{{BED`{FCdCDOd}}}}\",[]]o[\"{{}BANd}\",[]]7676Aa[\"{AHHjAHFl}\",[]]0A`[\"{FHbACIj}\",[]]Ag[\"{{CBEnACBb}CBEn}\",[]]Aa[\"{BOEnACG`}\",[]]Aa[\"{CCN`AHFl}\",[]]Aa[\"{AHElAHEl}\",[]]=<=<>Aa[\"{CFOdBAIj}\",[]]6??Ag[\"{{CHMdAKJd}CHMd}\",[]]An[\"{{{BED`{BFFl}}ACIj}NCj}\",[]]Dc[\"{c{{ACGl{BAId{CHMh{BAId}}}}}{}}\",[\"TryFromPrimitive::Primitive\"]]Aa[\"{CAKnAHFl}\",[]]Aa[\"{AHHnAHFl}\",[]]7o[\"{{}BED`}\",[]]Aa[\"{AHF`AHF`}\",[]]Bo[\"{{{BED`{FCdCGMn}}AKJd}{{BED`{FCdCGMn}}}}\",[]]>n[\"{{}G@`}\",[]]?Cg[\"{{{BED`{FCdCDOd}}{ACG`{AKJd}}}{{BED`{FCdCDOd}}}}\",[]]Aa[\"{BOD`ACG`}\",[]]A`[\"{BALdFHb}\",[]]Bk[\"{{{BED`{FCdBFGb}}AHHbAHHbG@`FHb}NCj}\",[]]Aa[\"{CFOdAHFl}\",[]]2A`[\"{BFH`FHb}\",[]]Ea[\"{{{AHLj{}{{A@Bf{c}}}}}{{ACI`{{AHLj{}{{A@Bf{c}}}}}}}{OLfl}}\",[\"Watcher::Value\"]]12Aj[\"{{{BED`{FFn}}}BFKf}\",[]]n[\"{{}FGn}\",[]]0Cg[\"{{{BED`{FCdCDOd}}{ACG`{CGKl}}}{{BED`{FCdCDOd}}}}\",[]]Cg[\"{{{BED`{FCdAKMn}}c}NCj{{CAJj{}{{FJj{BFNd}}}}}}\",[\"\"]]Cg[\"{{{BED`{FCdAKN`}}c}NCj{{CAJj{}{{FJj{BFNd}}}}}}\",[\"\"]]Be[\"{BED`{{ACGl{{CHCd{BAh}}ON`}}}}\",[]]:Bk[\"{{{BED`{FCdBFE`}}}{{ACGl{AKIbOMl}}}}\",[]]Bj[\"{{{BED`{FCdBFE`}}}{{ACGl{BCdOMl}}}}\",[]]Bj[\"{{{BED`{FCdBFE`}}}{{ACGl{BCfOMl}}}}\",[]]Cg[\"{{{BED`{BFFl}}FHbG@`}{{ACH`{{ACB`{CCOlCCOl}}}}}}\",[]]Cg[\"{{{BED`{BFFf}}FHbG@`}{{ACH`{{ACB`{CCOlCCOl}}}}}}\",[]]Bn[\"{{{BED`{FCdCALh}}FHb}{{BED`{FCdCALh}}}}\",[]]Cg[\"{{{BED`{FCdCDOd}}{ACG`{CGMn}}}{{BED`{FCdCDOd}}}}\",[]]Aj[\"{{{BED`{CHIh}}}G@`}\",[]]Aa[\"{CFOdAHFl}\",[]]Aa[\"{CFOdBAIj}\",[]]Aa[\"{AHHjAHFl}\",[]]Aa[\"{ACCfCDNf}\",[]]Cg[\"{{{BED`{FCdCALh}}{ACG`{CALn}}}{{BED`{FCdCALh}}}}\",[]]Cg[\"{{{BED`{FCdCALh}}{ACG`{CAM`}}}{{BED`{FCdCALh}}}}\",[]]5Bo[\"{{{BED`{FCdCGKl}}ACIj}{{BED`{FCdCGKl}}}}\",[]]A`[\"{BFH`FHb}\",[]]Bo[\"{{{BED`{FCdCALh}}AKJd}{{BED`{FCdCALh}}}}\",[]]Aa[\"{CAKnAHFl}\",[]]Aa[\"{AHHnAHFl}\",[]]3Aa[\"{CCN`AHFl}\",[]]Aa[\"{AHEnAHEn}\",[]]o[\"{{}BANf}\",[]]000043;Fe[\"{{{BED`{BOBh}}cAKJd{BED`{{ABOl{FHb}}}}}{{ACGl{{`{{AKLh{}{{FJj{ACEd}}}}}}{CCOd{AKJb}}}}}AL@h}\",[\"\"]]Fe[\"{{{BED`{BOBj}}cAKJd{BED`{{ABOl{FHb}}}}}{{ACGl{{`{{AKLh{}{{FJj{ACEd}}}}}}{CCOd{AKJb}}}}}AL@h}\",[\"\"]]10?65>Bn[\"{G@`{{ACGl{{ACB`{AKOhAKOnACHf}}BFNh}}}}\",[]]>>>Bo[\"{{{BED`{FCdCDOd}}ACIj}{{BED`{FCdCDOd}}}}\",[]]Bd[\"{{CCJf{BDn{{BDn{BA`}}}}}CCJf}\",[]]Bm[\"{{AKMhc}AKMh{{CAJj{}{{FJj{BFNd}}}}}}\",[\"\"]]Ao[\"{{AKMn{AKHn{BFNd}}}AKMn}\",[]]Ao[\"{{AKNh{AKHn{BFNd}}}AKNh}\",[]]Bm[\"{{AKMjc}AKMj{{CAJj{}{{FJj{BFNd}}}}}}\",[\"\"]]Ao[\"{{AKN`{AKHn{BFNd}}}AKN`}\",[]]Ao[\"{{AKNj{AKHn{BFNd}}}AKNj}\",[]]An[\"{{CCJf{BAl{CDOd}}}CCJf}\",[]]o[\"{{}BED`}\",[]]Am[\"{{{BED`{FCdAKMn}}}NCj}\",[]]Am[\"{{{BED`{FCdAKN`}}}NCj}\",[]]Fd[\"{{{BED`{BFFl}}{BED`{FCd{ABOl{BA`}}}}{BED`{{ABOl{BA`}}}}{BED`{{ABOl{BA`}}}}}{{ACGl{NCjCIHn}}}}\",[]]Bd[\"{{{BED`{ACGh}}}{{ACG`{G@`}}}}\",[]]Aa[\"{CFOdAHFl}\",[]]0Aa[\"{AHHjAHFl}\",[]]Ch[\"{{{BED`{AKNh}}{BED`{BAOb}}FH`}{{ACGl{CALlCBGj}}}}\",[]]Ch[\"{{{BED`{AKNj}}{BED`{BAO`}}FH`}{{ACGl{CALlCBGl}}}}\",[]]Ag[\"{{BBAfCDIn}BBAf}\",[]]n[\"{{}FGn}\",[]]0::::Bo[\"{{{BED`{FCdCGKl}}ACIj}{{BED`{FCdCGKl}}}}\",[]]Ca[\"{{CBEnc}CBEn{{n{}{{ACGb{G@`}}}}FMbFMh}}\",[\"S\"]]Aa[\"{AHF`AHF`}\",[]]0Aa[\"{AHEjAHEj}\",[]]9Cf[\"{{{BED`{FCdAKIb}}{BED`{BFE`}}}{{ACGl{NCjOMl}}}}\",[]]Ce[\"{{{BED`{FCdBCd}}{BED`{BFE`}}}{{ACGl{NCjOMl}}}}\",[]]Ce[\"{{{BED`{FCdBCf}}{BED`{BFE`}}}{{ACGl{NCjOMl}}}}\",[]]Ag[\"{{AHEjALAh}AHEj}\",[]]Bo[\"{{{BED`{FCdCALh}}CHMj}{{BED`{FCdCALh}}}}\",[]]o[\"{{}BED`}\",[]]?Aa[\"{CCN`AHFl}\",[]]Bi[\"{{{BED`{CALl}}}{{ACGl{AKNhBFKd}}}}\",[]]Bi[\"{{{BED`{CALl}}}{{ACGl{AKNjBFKj}}}}\",[]]Af[\"{{AHElG@`}AHEl}\",[]]Ba[\"{{{BED`{{ABOl{BA`}}}}}G@`}\",[]]Aa[\"{CFOdAHFl}\",[]]00Aj[\"{{{BED`{AKKn}}}G@`}\",[]]1Ai[\"{{}{{ACH`{AHIf}}}}\",[]]o[\"{{}ACIh}\",[]]Cg[\"{{{BED`{AKKd}}AKMh{BED`{FFn}}}{{ACGl{NCjCFM`}}}}\",[]]Bo[\"{{{BED`{FCdCDOd}}ACBb}{{BED`{FCdCDOd}}}}\",[]]Aa[\"{AHHjAHFl}\",[]]Af[\"{{CBEnG@`}CBEn}\",[]]o[\"{{}ACBb}\",[]]o[\"{{}AKJd}\",[]]????9Aa[\"{CAKnAHFl}\",[]]Aa[\"{AHHnAHFl}\",[]]10Ak[\"{{{BED`{BFFl}}}ACBb}\",[]]Bn[\"{{{BED`{FCdCALh}}FHb}{{BED`{FCdCALh}}}}\",[]]Fe[\"{{{BED`{BOBh}}cAKJd{BED`{{ABOl{FHb}}}}}{{ACGl{{`{{AKLh{}{{FJj{ACEd}}}}}}{CCOd{AKJb}}}}}AL@h}\",[\"\"]]Fe[\"{{{BED`{BOBj}}cAKJd{BED`{{ABOl{FHb}}}}}{{ACGl{{`{{AKLh{}{{FJj{ACEd}}}}}}{CCOd{AKJb}}}}}AL@h}\",[\"\"]]Cd[\"{{{BED`{BOBh}}{BED`{FFn}}}{{ACGl{AKNhBODn}}}}\",[]]Cd[\"{{{BED`{BOBj}}{BED`{FFn}}}{{ACGl{AKNjBODn}}}}\",[]]Bo[\"{{{BED`{FCdCDOd}}ACIj}{{BED`{FCdCDOd}}}}\",[]]o[\"{{}BED`}\",[]]Bn[\"{{{BED`{FCdCDOd}}G@`}{{BED`{FCdCDOd}}}}\",[]]Ek[\"{{{BED`{BOBh}}{BED`{BALn}}{BED`{FFn}}{BED`{{ABOl{FHb}}}}}{{ACGl{AKNh{CCOd{BODn}}}}}}\",[]]Ek[\"{{{BED`{BOBj}}{BED`{ACFh}}{BED`{FFn}}{BED`{{ABOl{FHb}}}}}{{ACGl{AKNj{CCOd{BODn}}}}}}\",[]]Aa[\"{ACGhACG`}\",[]]05Bf[\"{{{BED`{AKKd}}{ACG`{ALAh}}}NCj}\",[]]Ci[\"{{{BED`{FCdAKIb}}{BED`{FCdBFE`}}}{{ACGl{NCjOMl}}}}\",[]]Ch[\"{{{BED`{FCdBCd}}{BED`{FCdBFE`}}}{{ACGl{NCjOMl}}}}\",[]]Ch[\"{{{BED`{FCdBCf}}{BED`{FCdBFE`}}}{{ACGl{NCjOMl}}}}\",[]]o[\"{{}AKJd}\",[]]n[\"{{}NCj}\",[]]Aa[\"{CFOdAHFl}\",[]]Cg[\"{{{BED`{FCdCDOd}}{ACG`{ACBb}}}{{BED`{FCdCDOd}}}}\",[]]o[\"{{}CAHh}\",[]]Aj[\"{ACCf{{ACH`{NCj}}}}\",[]]Cf[\"{{{BED`{FCdCDOd}}{BAl{CGGb}}}{{BED`{FCdCDOd}}}}\",[]]>An[\"{{{BED`{BFFl}}ACIj}NCj}\",[]]Aa[\"{AHF`AHF`}\",[]]1Af[\"{{AHEjG@`}AHEj}\",[]]Af[\"{{AHIdG@`}AHId}\",[]]Bn[\"{{{BED`{FCdCDOd}}FH`}{{BED`{FCdCDOd}}}}\",[]]9Bn[\"{{{BED`{FCdCDOd}}G@`}{{BED`{FCdCDOd}}}}\",[]]Bd[\"{{}{{ACB`{{BDn{CCJb}}CALf}}}}\",[]];Do[\"{{{BED`{BOBh}}{BED`{FFn}}{BED`{{ABOl{FHb}}}}}{{ACGl{AKNh{CCOd{BODn}}}}}}\",[]]Do[\"{{{BED`{BOBj}}{BED`{FFn}}{BED`{{ABOl{FHb}}}}}{{ACGl{AKNj{CCOd{BODn}}}}}}\",[]]") \ No newline at end of file diff --git a/pr/3367/docs/search.index/generic_inverted_index/b07d705b456a.js b/pr/3367/docs/search.index/generic_inverted_index/b07d705b456a.js new file mode 100644 index 0000000000..d48cff9100 --- /dev/null +++ b/pr/3367/docs/search.index/generic_inverted_index/b07d705b456a.js @@ -0,0 +1 @@ +rb_("Q0djADswAAABAACCAQIAHAbFAB8HvAA7MAAAAQAAvgI8ADYEAAA5BAAAOwQAAEIEAQBFBAEASgQEAFAEAQBVBAAAVwQAAFkEAQBcBAIAYAQVAHcEAgB8BAAAfwQAAIEEAACDBAEAiAQAAIoEAACPBAAAkQQKAJ4EBQClBAEAqAQBAKsEAACuBAEAsQQFALoEBwDDBAwA0gQAANYEAADYBAQA4AQAAOIEAQDnBAAA7AQAAO4EAgDyBAAA9QQcABQFAAAWBQEAGQUAAB8FAAAhBQAAJAURADcFAgA8BQIAQAUBAEUFAABIBQAASwUGAFQFAQBXBQIAWwUAAF0FAACwCrwArA5iAOIPxQCCGAAA/hgRADswAAABAACCAhQArggEALQICAC+CAQAxAhcACMJFwA8CSEAXwkAAN4JcABQClQAdAsBACUOSQARDwEAFA8LACEPJgBLDzsAiA8AAIsPAACNDzsAyg8SAN4PAwA7MAAAAQAASgIPAMMIAAAhCQEAXgkAAHUMDADdDwAAvREOAM0RmQBoEgEAbBIAAGYVvAAmFpsATBgTAGEYDACOGBEAWxkAADswAAABAABZAQ0AJwEAAD8FAADrBgAAJA4AAHQOBAB4EgMAsRITAMYSDAB6E8UARhRiACIZAAA1GgAAFBwAADswAAABAADIAAsALAMAAF8EAAA7CQAAfg4BAIkPAQCMDwAAZxIAAKkUvABcGQAAhBwAAIccAAA7MAAAAQAAGwAKAF4FDAB2CwUArwwAACIOAQCjDgAAfBIAAEcYAAAQGQAAgBkAAAkaAAA6MAAAAQAAAAAAGAAQAAAACgNACIIIggmXCwgMqBCpEKoQqxCsEK0QrhCYEc8W0RbtFn8XgBcaGxsbsRtNHE4crhw6MAAAAQAAAAAACgAQAAAA1wL3AvgFAgcDBwQHBQfXCRkMCho1HDswAAABAACFAQsASQC8ACgBvACTAgAA2AIBAN0CAADgAgAA+AIAANUJAACeDgAAlxIBAIcZAQA6MAAAAQAAAAAADwAQAAAAggzDDd0W3xbuFu8W8RbyFvMW9BaHGIkYihiMGJ4bnxsESAAAACUDAADsDAAAzhsAAAFvGQAAARkZAAA7MAAAAQAABgADAHsYAAB2HAMA4RwBAAAAAAAAARgDAAAAAAAAAAAAAAABfBkAAElkAAAAOzAAAAEAAMUACQARDwEAFA8LACEPJgBLDzsAiA8AAIsPAACNDzsAyg8SAN4PAwAAAAE7CQAAAq8MAAAJGgAAAYIJAAAAOzAAAAEAAH4BBgBJALwAKAG8ANgCAQDdAgAA4AIAANUJAAAAAkgAAAAlAwAAAAABexgAAAAAAAAAARgDAAAAAAAAAAAAAAABfBkAAENuAAAAAAAAAAAAADswAAABAAB5AQIASQC8ACgBvAAAAAAAAXsYAAAAAAAAAAEYAwAAAAAAAAAAAAAAAXwZAABDZgAAAAAAAAAAAAA7MAAAAQAAeQECAEkAvAAoAbwAAAAAAAAAAAAAAAAAAAAAAAAAAAABfBkAAA==") \ No newline at end of file diff --git a/pr/3367/docs/search.index/name/d00df074fb9f.js b/pr/3367/docs/search.index/name/d00df074fb9f.js new file mode 100644 index 0000000000..706e902c97 --- /dev/null +++ b/pr/3367/docs/search.index/name/d00df074fb9f.js @@ -0,0 +1 @@ +rd_("as00b()b->bEqbFnbIdbIo0bOrb[]bepbeq00000000000000000000000000000000000000000000000000000000bid0bor000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000brtbu8cAllcAndcAny0cAppcArccBoxcBufcDircDns0cKey000cMAXcMapcOpt0cOrdcPincQadcS2ncTcpcTls00cUdp0cUrlcVeccaddcand00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccmp000000000000000cdht00cdircdns00000000cecncf32cf64cfmt00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cgetcgotci32cimpciosckey000clen0000cmapcmutcnew0000000000000000000000crtt0cruncs2n0cstrctagctls0cttl0ctyp0cu16cu32cu64curl00000dALPN0dArgsdDenydDial0dDropdFromdHashdIntodIroh00dItemdKINDdKeysdKind0dNAMEdName0dNonedPathdPing000dPolldPong000dReaddSenddSidedSinkdSyncdUser00000dUtf80000dVZipdacksdaddr00dalpn0dbinddbooldbulkdcertdcode0dconndcwndddata00ddrop0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dfrom0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dhash000000000000dhttp0000dinit000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dinto00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dipv40dipv60diroh00diter0dloaddmaindmdns0dname000000000dnodedopendpathdpingdpoll00000000dport000dprod0dquic0000dreaddrr_adsealdsenddsign0dsize0dstopdttfbdu128dunitdurls0dvzip00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eAlloweAsRefeBoxed0eByteseChunkeCloneeCloseeCodeceDebugeDerefeEmpty0eError000000000000000000eHttps0eLocaleMAGICeMixedeProbeeQuinn0000eRelay0eReset0eSavedeSerDe0eSizedeSmarteStatseUnpineValue0ealpnsearrayebuild000000ebytes00ecause000000000000000000000000000000000000ecertseclone00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eclose000ederef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000edisco0eempty00eframe0ehttps0eindexelabel00enodes0epkarr0eprint0equinn0erelay0ereset000eretryerr_nsesliceespawn0000esplitestate00estats00000estore0etupleeusizeevalueewritefAcceptfAccessfBorrowfBufMutfClient0fCompatfConfigfCustom0fDecode000fDirect0fFuturefHandlefHasherfHealth00fIpAddrfLENGTH0fLimitsfLoaderfManual00fNodeId0000fOpenBifOptionfOutputfPolicyfRecordfReportfResult000fRouterfServer0fSimplefSource0fStream0fStringfTicketfTypeIdfVarInt0fVerify000faccept000000faccessfas_ref000fborrow0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fchunks00fclient0000fclosedfcommon0fcompat00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fconfig00fcrypto000fcustom0fdecode00fencode00ferrorsffinishfgroups0fignorefinsertfkeylogflimitsfn0_dns00foffsetfon_ackfonlinefprobesfprotos0fprunedfpublic000freason000frefusefreloadfreportfsecret0fserver000000fsource00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fstatus0fstream0fticket0fto_vecfto_z3200fudp_rxfudp_txfudp_v4fudp_v6fvarintfverify0fwindowgAeadKeygBoxIter0gBuilder00gCommandgConnect000gContextgCountergDefault00gDisplaygElapsedgExpired0gFromRefgFromStrgHashMapgInstantgLayeredgMetrics0000gNextFutgOpenUnigOptionsgPathBufgPrivategQadIpv4gQadIpv6gReadBufgRequest0gResolve00gRuntimegSessiongStaginggStoppedgTIMEOUTgTimeout000gToOwnedgTooLonggTryFromgTryIntogUnknowngUpgrade0gWatchergWrittengaccepts0gbuilder00000000gclientsgcommand00gcompare000000000000gconnect0gdefault000000000000000000000000000000000000000000000000gdomainsged25519genabledghas_udpgis_0rttglatency0gmessagegmetrics0000000000gmin_mtugnode_id000000000gon_nodegon_sentgopen_bigoriginsgpointergproblemgpublish000000gr_bytesgreportsgresolve00000000000grr_aaaagrun_s2ngs_bytesgsourcesgstaging0gstoppedgstreams000gtesting0gtimeoutgtry_forgtype_id00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000gupdatedhAcceptBihAppStatehBTreeSethCertModehCommandshDerefMuthDisabled00hDiscover0hDnsError0hDurationhDynClonehEncoding000hEndpoint00hEveryonehHttpSend0hIncoming0hIpv4AddrhIpv6AddrhIrohAttrhIterablehIteratorhLayerExthLowerHexhMAX_SIZEhNO_ERRORhNamedApp0hNodeAddr00hNodeData00hNodeGone0hNodeInfo00hNullablehOrderinghPostcard0hProtocol0hRelayMap0hRelayUrl00hResolverhStreamIdhTimedOuthToStringhTooLargehTooSmall0hTxtAttrshUdpStatshUpperHexhUserData00hZ32Errorhas_bytes0hcontentshdata_dirhdatagramhdefaults000hdisabled00hdurationhendpoint00hexpected0hframe_rxhframe_txhfrom_err00hfrom_ref0000000000000000000000000000000000000000000000000000000000000000000000000hfrom_str000000000hfrom_u32hfrom_u64hfrom_z3200hgenerate0hget_node0hgot_ping0hgroup_id0hhttp_urlhincominghintervalhinto_anyhis_alivehis_empty0000hlocal_iphmainlinehmax_datahnew_pinghnode_maphopen_unihpriorityhprotocol0hresolverhrun_irohhshutdown000000000htimeoutshto_bytes00000hto_owned00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000htry_from000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000htry_into00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000htry_poll000000iAcceptUniiAcmeStateiAlpnError0iAsyncReadiBYTE_SIZEiBacktraceiBindError0iBitStringiBorrowMutiCompatExtiCryptoRngiDatagrams0000iDialError0iDiscovery00iDnsConfigiDnsServeriFormatteriFrameTypeiHandshake0iHistogram0iJoinError00iLocalAddr0iNoAddress000iNoResults0iNodeIdExt0iNumLabels0000iPartialEqiPathStatsiPointableiPolicyExtiPublicKey000iQuicSpawn0iReadError0iRecordSetiRecvError00iRelayMode0iRelayNode0iRelayOnlyiReloadingiResolvingiSecretKey00iSendError0iSerializeiSignature0iSpanTraceiTlsConfigiTryFutureiTryStreamiUtf8ErroriWatchRecv0iWebsocket000iZoneStoreiaccept_biiadd_boxediadvertiseiassembleribacktrace0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ibind_addr0000ibootstrapicert_modeiclient_rxiclone_boxiconn_typeidatagrams00ideref_mut0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000idiscovery0000ifield_ref00000ifmt_short0iframe_lenifrom_iter0000iglobal_v4iglobal_v6ihandshake0ihttp_addr0ihttps_urliin_memoryiinitiatoriinto_0rttiiroh_baseiis_closedimagicsock0imigrationinew_tokeninode_addr00inode_info00000ipkarr_urlipoll_next0ipoll_read0iproxy_url00iquic_addrireferenceirelay_map0irelay_url000000ireportgeniretry_tagirun_quinnisend_dataisend_ipv4isend_ipv6isent_pong0iserialize000000000000000000000000000000000iset_alpnsistable_idisubscribeito_string000000000000000000000000000000000000000000000000000000000000000000000000itoken_keyitransport0ittfb_histiuser_data00iwrite_alljArgMatchesjAsyncWritejCertConfig0jClientAuthjClientSinkjComparablejConnectingjConnection0000000jControlMsgjControllerjDirectAddrjDiscovered0jDnsHandlerjEquivalent0jFrameStatsjHeaderNamejHttpConfigjHttpServerjIntoFuturejInvalidUrl0jMAX_LENGTH0jMagicSpawn0jMetricItemjNoResponse0jNodeTicket0jNonZeroU32jNotAllowedjOwnAddress0jPROVENANCEjParseError00000000jPartialOrdjPkarrError0jPortmappedjQuicClientjQuicConfig0jRELAY_PATHjRecordTypejRecvStreamjResetErrorjRestarting00jRestrictedjRetryErrorjSelfSignedjSendStreamjSerializerjSigningKeyjSocketAddrjSpawnError0jStatusCodejSubcommandjTimeSourcejWriteErrorjaccept_unijallow_spinjborrow_mut00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jbytes_recv0jbytes_sent0jchunk_sizejchunk_timejclone_into00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jcompat_mut00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jcompat_ref00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jcongestionjconnection0jequivalent00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jerror_code0jframe_type000jfrom_bytes000000jfrom_parts000jfrom_slicejhttps_addr0jinto_innerjiroh_benchjiroh_relayjis_allowedjlast_alivejlocal_addr0jlookup_txt00jlost_bytesjn0_watcherjnameserverjnet_report00jno_publishjnode_statejnum_labels00jonly_relayjpcp_probesjpersistentjpoll_close0jpoll_flush00jpoll_ready0jpoll_write0jportmapperjprovenance00jread_chunkjread_exactjrelay_modejsecret_key000jsend_relayjspan_trace000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jstart_send0jtest_utils0jthroughputjtls_configjtotal_sizejzone_storekAcceptError0kAccessLimitkAddNodeAddr0kCallMeMaybekClientHellokClientStatskCryptoErrorkDecodeErrorkDeserializekDnsProtocolkDnsResolver0kEmptyPacket0kEmptyPruned0kErrorCompatkHeaderValuekHttpPayload0kHttpRequest0kHttpsConfigkIdleTimeoutkIntoRequestkLetsEncrypt00kLookupError0kMissingHost0kNoLocalAddr000kPingTrackerkRelayConfigkResolveBoth0kSelfConnect0kStoreConfigkStreamError000kStreamStatskUnavailable0kUnspecifiedk__clone_box00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000kaccept_withkas_iterable00000kclear_cache00kcreate_connkcurrent_mtukdefault_soakdefault_ttlkdescription000000000000000000000000000000000000kdeserialize000000000000000000000000000000000kdisconnects0kdns_handlerkdst_node_idkfield_count00000kinitial_mtu0kinitial_rttkinitializedkinto_future000000000kis_shutdownklookup_ipv400klookup_ipv600kmax_streamsknamed_layer00000000000000000knode_originkon_end_ackskpartial_cmp000000000000000kpkarr_relaykquic_config0kread_chunkskread_to_endkrecv_streamksend_streamksend_windowktask_handlektime_sourcekupload_sizekupnp_probeskupper_boundkwith_cryptokwrite_chunklAccessConfiglCertifiedKeylClientConfiglClientStreamlClosedStream00lConnectError0000lConnectionIdlDeserializerlDhtDiscoverylDisconnectedlDnsDiscoverylFromIteratorlIntoIterablelIntoIteratorlInvalidFrame00lLookupFailed0lMetricsGrouplProxyConnect0lReadDatagramlRelayMetrics0lResolveErrorlRttEstimatorlServerConfig00lSignedPacketlSocketAddrV4lSocketAddrV6lStoppedErrorlVerifyingKeylas_protocolslaugment_args0lbind_addr_v4lbind_addr_v6lcertificateslclose_reasonldata_blockedldiscovery_n0ldns_requestsldns_resolver000000lfrom_err_box0linitial_keyslinto_request00000000000000000lis_connectedllast_controlllast_payloadllast_updated0llost_packetslmax_incominglmetrics_addrlping_trackerlpoll_updatedlreconnect_inlrelay_configlreports_fulllreset_streamlresolve_host0lsegment_sizelsent_packetslservice_namelset_prioritylstop_sendinglstream_statslto_bitstringlto_node_addr00lwrite_chunkslwrong_prefixmAsErrorSourcemCidsExhaustedmClientBuildermCloneToUninitmDecodingError00000000mDiscoveryItemmEncodingError000mFinishedEarlymFrameTooLarge0mINVALID_TOKENmIROH_TXT_NAME0mIntoDiscoverymInvalidLength000mLocallyClosedmMdnsDiscoverymMetricsConfigmPathSelectionmPkarrResolvermPrivateKeyDermQad4LocalPortmReadableErrormRouterBuildermTaskCancelled0mTxtRecordDatamUnexpectedEnd0000mack_frequencymadd_discoverymadd_node_infombound_socketsmclient_configmcontains_node0mdiscovery_dhtmdownload_sizemduration_histmfrom_servicesmget_node_infomgroups_cloned0mhttp_requestsmimmediate_ackminto_incomingmmax_ack_delaymobserved_addrmon_connecting000mon_mtu_updatempath_responsempcp_availablempeer_identitympoll_shutdownmpong_receivedmrate_limitingmread_datagrammrelay_latencymsend_datagrammsend_fairnessmsend_responsemserver_config00mset_node_infomset_relay_url0mset_user_data0mstart_sessionmtake_segmentsmtry_poll_next0mtry_to_string00000000000000000000000000000000000000000000000000000000000000000nAttrFromString0000nCertificateDernCommandFactorynConnectOptionsnConnectionLost0000nConnectionTypenDirectAddrInfonDirectAddrTypenDiscoveryError0nDiscoveryEvent0nDiscoveryStart0nDnsPkarrServernFrameTypeError00000nFromArgMatchesnINTERNAL_ERRORnIncomingFuturenInitializedFutnMainlineConfignNO_VIABLE_PATHnPkarrPublishernPortmapMetricsnPublicKeyErrornReadExactErrornReadToEndErrornRelayLatenciesnRequestHandlernSignatureError00nSimpleDnsErrornStaggeredErrornStaticProvidernTlsHeaderParse0nTransferResultnTransportError0nactor_tick_msgnaead_from_hkdfnanswer_requestnavg_chunk_sizencaptive_portalnclient_handlernconnect_client0nexpected_typesnfrom_node_infonhandle_requestnhandshake_data0nhandshake_donenhas_subcommandnhttp_bind_addrninitial_windowninto_discovery000000000000ninto_node_addr00nminimum_changennetwork_changenpath_challengenpath_selectionnprobes_startednproxy_from_envnproxy_hostnamenquic_bind_addrnread_unorderednreceive_windownreceived_resetnrecv_data_ipv4nrecv_data_ipv6nrecv_datagramsnrecv_disco_udpnremote_addressnremote_node_id0nrun_until_done0nsaturating_addnsend_disco_udpnsent_disco_udpnthroughput_bpsntime_thresholdnto_txt_strings0ntotal_durationnunknown_frames0nupnp_availablenwith_relay_url00000nwith_user_data000oBindTcpListener0oBindTlsListener0oBootstrapOptionoClientRateLimitoConnectionCloseoConnectionError000oConnectionStatsoEndpointMetricsoInstrumentErroroInvalidRelayUrl000oInvalidResponse0oInvalidTxtEntry000oKeyParsingError000oMAX_PACKET_SIZE0oMessageResponseoMetricsGroupSetoNotAnIrohRecord0000oProtocolHandleroProxyInvalidUrl0oRateLimitConfigoRelayQuicConfigoResponseHandleroServerChallengeoSupervisorError0oTransportConfig0oTryReserveErroroUnexpectedFrame0oVersionMismatchoZeroRttAcceptedoZeroRttRejected000oactor_tick_mainoas_error_source00000000000000000000000000000000000000000000000oclear_discoveryoclone_to_uninit00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000odefault_timeoutofrom_componentsofrom_txt_lookup0ohttps_bind_addroin_current_span00000000000000000000000000000000000000000000000oiroh_dns_serveromax_burst_bytesomax_stream_dataomax_streams_uniomax_tls_ticketsonodes_contactedopreferred_relayorecv_data_relayorecv_disco_pingorecv_disco_pongorepublish_delayorun_until_errororun_with_originosent_disco_pingosent_disco_pongoserver_endpoint0ostatic_provider0ostream_finishedothroughput_histowatch_node_addrowith_nameserver00A`AddNodeAddrError0A`ApplicationCloseA`CleanupDropGuardA`ClientToRelayMsg0A`ConnectionClosedA`DiscoveryContextA`EndpointSelectorA`FINAL_SIZE_ERRORA`InvalidFrameType0A`InvalidPublicKey0A`InvalidSignature000A`KEY_UPDATE_ERRORA`MagicsockMetricsA`NetReportMetricsA`PkarrRelayClientA`RELAY_PROBE_PATHA`RelayToClientMsg0A`ServerDeniedAuth0A`ServerDeniesAuthA`ToStringFallibleA`TryFromPrimitiveA`UnexpectedFormat0000A`UnknownFrameType0A`UnknownHandshake0A`actor_tick_otherA`bytes_per_secondA`congestion_stateA`connection_closeA`direct_addresses00000A`dns_lookup_errorA`dns_requests_udpA`from_arg_matches00A`iroh_quinn_protoA`letsencrypt_prodA`lookup_ipv4_ipv60A`mapping_attemptsA`mapping_failuresA`max_idle_timeoutA`max_streams_bidiA`packet_thresholdA`recv_disco_relayA`remove_node_infoA`run_relay_serverA`send_disco_relayA`send_relay_errorA`sent_disco_relayA`transport_config000A`update_node_dataA`validation_tokenA`with_nameserversA`with_single_certA`write_all_chunksAaAPPLICATION_ERRORAaAP_RELAY_HOSTNAMEAaAbortOnDropHandleAaApplicationClosedAaControllerFactoryAaDEFAULT_HTTP_PORT0AaDEFAULT_PKARR_TTLAaEU_RELAY_HOSTNAME0AaHandshakeTokenKeyAaInternalSignatureAaInvalidTargetPort0AaNA_RELAY_HOSTNAME0AaReloadingResolverAaRemoteNodeIdErrorAaSendDatagramErrorAaSignatureEncodingAaUnsupportedByPeerAaaccept_conn_burstAaaccept_conn_limitAaactor_link_changeAacollect_and_printAacongestion_eventsAaconnect_with_optsAadefault_relay_map0Aaget_signed_packetAalookup_node_by_id0Aamax_datagram_sizeAanew_connection_idAarelay_home_changeAasend_packets_recv0Aasend_packets_sent0Aawith_dns_resolverAbAEAD_LIMIT_REACHEDAbAckFrequencyConfigAbCLIENT_AUTH_HEADERAbCONNECTION_REFUSEDAbConnectionSelectorAbCryptoServerConfigAbDEFAULT_HTTPS_PORT0AbDynProtocolHandlerAbFLOW_CONTROL_ERRORAbIllegalOrderedReadAbIntoDiscoveryError0AbInvalidEncodingZ32000AbInvalidHeaderValueAbMtuDiscoveryConfigAbPROTOCOL_VIOLATIONAbRelayUrlParseError0AbResolvesServerCertAbSTREAM_LIMIT_ERRORAbSTREAM_STATE_ERRORAbServerConfirmsAuthAbTransportErrorCodeAbUnsupportedVersionAbactor_tick_re_stunAbcommand_for_update00Abcrypto_buffer_sizeAbdefault_relay_modeAbdisco_packets_recv0Abdisco_packets_sent0Abdns_lookup_successAbdns_requests_httpsAbfrom_u64_uncheckedAbkey_cache_capacity0Ablocal_port_updatesAbn0_dns_pkarr_relayAbother_packets_recv0Abother_packets_sent0Abpath_ping_failuresAbpath_quality_scoreAbpkarr_publish_noopAbrecv_disco_bad_keyAbrecv_gro_datagramsAbrepublish_intervalAbset_receive_windowAbtry_from_primitiveAbunique_client_keys0Abupnp_probes_failedAcALPN_QUIC_ADDR_DISCAcAlgorithmIdentifierAcConcurrentDiscoveryAcDecodeInvalidLength000AcDnsDiscoveryBuilderAcInvalidWebsocketUrl0AcMissingRemoteNodeId0AcNoServiceConfigured0AcTransportParametersAcUnexpectedFrameType0Acaugment_subcommandsAcblack_hole_cooldownAcdns_lookup_notfoundAcforce_staging_infraAchttp_requests_errorAckeep_alive_intervalAcletsencrypt_contactAclost_plpmtud_probesAcon_congestion_eventAcpath_failure_resetsAcsent_plpmtud_probesAcstream_data_blockedAcstream_updates_onlyAcstreams_blocked_uniAcupdate_direct_addrsAcverification_failedAdConnectWithOptsError0AdDEFAULT_METRICS_PORT0AdDeserializationError0AdExceedsMaxPacketSize0AdFRAME_ENCODING_ERRORAdFailedBuildingPacket000AdInvalidTlsServername0AdMdnsDiscoveryBuilderAdPkarrResolverBuilderAdVarIntBoundsExceededAdWeakConnectionHandleAdack_frequency_configAdadd_direct_addresses0Adalgorithm_identifierAdblack_holes_detectedAdfrom_arg_matches_mut00Adhandle_client_stream0Adincoming_buffer_sizeAdmtu_discovery_configAdnetwork_path_changedAdpath_marked_outdatedAdpath_rtt_variance_msAdpkarr_publish_updateAdpkarr_put_rate_limitAdpreferred_address_v4Adpreferred_address_v6Adrecv_disco_bad_parseAdreordering_thresholdAdretire_connection_idAdretry_token_lifetimeAdsend_packets_dropped0Adstreams_blocked_bidiAdupnp_gateway_updatedAdwith_system_defaultsAeClientToRelayDatagramAePkarrPublisherBuilderAeRelayToClientDatagramAeTryFromPrimitiveErrorAeValidationTokenConfigAedefault_ap_relay_nodeAedefault_eu_relay_node0Aedefault_na_relay_node0Aedisco_packets_dropped0Aedns_and_pkarr_serversAehttp_requests_successAelookup_ipv4_staggered0Aelookup_ipv6_staggered0Aenum_relay_conns_addedAeother_packets_dropped0Aepath_packet_loss_rateAerun_relay_server_withAestore_packets_expiredAestore_packets_removedAestore_packets_updatedAestream_receive_windowAewith_additional_alpnsAewith_direct_addresses00000Aewith_transport_configAfCRYPTO_BUFFER_EXCEEDEDAfGetMappingAddressError0AfMaxLengthExceededError0AfNoRelayServicesEnabled0AfProxyInvalidTargetPort0AfRELAY_PROTOCOL_VERSIONAfSignedPacketBuildErrorAfclear_direct_addresses0Afexport_keying_materialAfmapping_varies_by_destAfnum_direct_conns_addedAfsend_data_network_downAfstore_packets_insertedAfto_pkarr_signed_packet0Afwith_mainline_fallbackAgAcmeEventStreamFinished0AgClientAuthHeaderInvalid0AgDEFAULT_RELAY_QUIC_PORT0AgN0_DNS_NODE_ORIGIN_PROD00AgN0_DNS_PKARR_RELAY_PRODAgSignedPacketVerifyErrorAgUnexpectedUpgradeStatus0Agack_eliciting_thresholdAgaddress_family_selectorAgaugment_args_for_update0Agdiscovery_local_networkAgnum_relay_conns_removedAgupdate_from_arg_matches00Aguser_data_for_discoveryAgvalidation_token_configAhENV_FORCE_STAGING_RELAYSAhconnection_became_directAhexternal_address_updatedAhfrom_pkarr_signed_packet0Ahinclude_direct_addressesAhlooks_like_disco_wrapperAhnodes_contacted_directlyAhnum_direct_conns_removedAhrecv_disco_call_me_maybeAhremote_address_validatedAhsent_disco_call_me_maybeAhsigned_packet_store_pathAiCONNECTION_ID_LIMIT_ERRORAiExportKeyingMaterialErrorAiProxyConnectInvalidStatus0AiProxyInvalidTlsServername0AiQUIC_ADDR_DISC_CLOSE_CODEAiTRANSPORT_PARAMETER_ERRORAiadd_node_addr_with_sourceAidatagram_send_buffer_sizeAihttp_requests_duration_msAiinsecure_skip_cert_verifyAjClientToRelayDatagramBatchAjDEFAULT_KEY_CACHE_CAPACITYAjDEFAULT_REPUBLISH_INTERVALAjN0_DNS_NODE_ORIGIN_STAGING00AjN0_DNS_PKARR_RELAY_STAGINGAjRelayToClientDatagramBatchAjSignatureBitStringEncodingAjactor_tick_portmap_changedAjbytes_rx_ratelimited_total0Ajconns_rx_ratelimited_total0Ajdatagram_send_buffer_spaceAjincoming_buffer_size_totalAjlookup_ipv4_ipv6_staggered0Ajlookup_node_by_domain_name0Ajmax_concurrent_uni_streamsAkQUIC_ADDR_DISC_CLOSE_REASONAkenable_segmentation_offloadAklookup_node_by_id_staggered0Akmapping_varies_by_dest_ipv4Akmapping_varies_by_dest_ipv6Akmax_concurrent_bidi_streamsAkset_user_data_for_discoveryAkupdate_from_arg_matches_mut00AlDEFAULT_CERT_RELOAD_INTERVALAlconfigure_tracing_subscriberAlconnection_handshake_successAldatagram_receive_buffer_sizeAlmake_dangerous_client_configAlrun_with_config_until_ctrl_cAmcongestion_controller_factoryAmsend_observed_address_reportsAmset_max_concurrent_bi_streamsAnInvalidProtocolMessageEncoding0Anaugment_subcommands_for_updateAnset_max_concurrent_uni_streamsAoinsecure_skip_relay_cert_verify0Aopersistent_congestion_thresholdB`DynAssociatedAlgorithmIdentifierB`actor_tick_direct_addr_heartbeatB`receive_observed_address_reportsB`self_signed_tls_certs_and_configBbrecv_disco_call_me_maybe_bad_discoBdlookup_node_by_domain_name_staggered0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/normalizedName/6a7a83122975.js b/pr/3367/docs/search.index/normalizedName/6a7a83122975.js new file mode 100644 index 0000000000..1c7b41f529 --- /dev/null +++ b/pr/3367/docs/search.index/normalizedName/6a7a83122975.js @@ -0,0 +1 @@ +rd_("as00b()b->beqbfnbidbio0borb[]bep666666666666666666666666666666666666666666666666666666666442222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222brtbu8callcandcany0cappcarccboxcbufcdircdns0ckey000cmaxcmapcopt0cordcpincqadcs2nctcpctls00cudp0curlcveccaddcand00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ccmp000000000000000cdht00cdircdns00000000cecncf32cf64cfmt00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cgetcgotci32cimpciosckey000clen0000cmapcmutcnew0000000000000000000000crtt0cruncs2n0cstrctagctls0cttl0ctyp0cu16cu32cu64curl00000dalpn0dargsddenyddial0ddropdfromdhashdintodiroh00ditemdkinddkeys11dname00dnonedpathdping000dpolldpong000dreaddsenddsidedsinkdsyncduser00000dutf80000dvzipdacksdaddr00dalpn0dbinddbooldbulkdcertdcode0dconndcwndddata00ddrop0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dfrom0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dhash000000000000dhttp0000dinit000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dinto00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dipv40dipv60diroh00diter0dloaddmaindmdns0dname000000000dnodedopendpathdpingdpoll00000000dport000dprod0dquic0000dreadcrradsealdsenddsign0dsize0dstopdttfbdu128dunitdurls0dvzip00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ealloweasrefeboxed0ebytesechunkecloneecloseecodecedebugederefeempty0eerror000000000000000000ehttps0elocalemagicemixedeprobeequinn0000erelay0ereset0esavedeserde0esizedesmartestatseunpinevalue0ealpnsearrayebuild000000ebytes00ecause000000000000000000000000000000000000ecertseclone00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eclose000ederef0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000edisco0eempty00eframe0ehttps0eindexelabel00enodes0epkarr0eprint0equinn0erelay0ereset000eretrydrrnsesliceespawn0000esplitestate00estats00000estore0etupleeusizeevalueewritefacceptfaccessfborrowfbufmutfclient0fcompatfconfigfcustom0fdecode000fdirect0ffuturefhandlefhasherfhealth00fipaddrflength0flimitsfloaderfmanual00fnodeid0000fopenbifoptionfoutputfpolicyfrecordfreportfresult000frouterfserver0fsimplefsource0fstream0fstringfticketftypeidfvarint0fverify000faccept000000faccesseasref000fborrow0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fchunks00fclient0000fclosedfcommon0fcompat00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fconfig00fcrypto000fcustom0fdecode00fencode00ferrorsffinishfgroups0fignorefinsertfkeylogflimitsen0dns00foffseteonackfonlinefprobesfprotos0fprunedfpublic000freason000frefusefreloadfreportfsecret0fserver000000fsource00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fstatus0fstream0fticket0etovecetoz3200eudprxeudptxeudpv4eudpv6fvarintfverify0fwindowgaeadkeygboxiter0gbuilder00gcommandgconnect000gcontextgcountergdefault00gdisplaygelapsedgexpired0gfromrefgfromstrghashmapginstantglayeredgmetrics0000gnextfutgopenunigoptionsgpathbufgprivategqadipv4gqadipv6greadbufgrequest0gresolve00gruntimegsessiongstaginggstoppedgtimeout0000gtoownedgtoolonggtryfromgtryintogunknowngupgrade0gwatchergwrittengaccepts0gbuilder00000000gclientsgcommand00gcompare000000000000gconnect0gdefault000000000000000000000000000000000000000000000000gdomainsged25519genabledfhasudpfis0rttglatency0gmessagegmetrics0000000000fminmtufnodeid000000000fonnodefonsentfopenbigoriginsgpointergproblemgpublish000000frbytesgreportsgresolve00000000000frraaaafruns2nfsbytesgsourcesgstaging0gstoppedgstreams000gtesting0gtimeoutftryforftypeid00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000gupdatedhacceptbihappstatehbtreesethcertmodehcommandshderefmuthdisabled00hdiscover0hdnserror0hdurationhdynclonehencoding000hendpoint00heveryonehhttpsend0hincoming0hipv4addrhipv6addrhirohattrhiterablehiteratorhlayerexthlowerhexgmaxsizegnoerrorhnamedapp0hnodeaddr00hnodedata00hnodegone0hnodeinfo00hnullablehorderinghpostcard0hprotocol0hrelaymap0hrelayurl00hresolverhstreamidhtimedouthtostringhtoolargehtoosmall0htxtattrshudpstatshupperhexhuserdata00hz32errorgasbytes0hcontentsgdatadirhdatagramhdefaults000hdisabled00hdurationhendpoint00hexpected0gframerxgframetxgfromerr00gfromref0000000000000000000000000000000000000000000000000000000000000000000000000gfromstr000000000gfromu32gfromu64gfromz3200hgenerate0ggetnode0ggotping0ggroupid0ghttpurlhincominghintervalgintoanygisalivegisempty0000glocaliphmainlinegmaxdatagnewpinggnodemapgopenunihpriorityhprotocol0hresolvergrunirohhshutdown000000000htimeoutsgtobytes00000gtoowned00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000gtryfrom000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000gtryinto00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000gtrypoll000000iacceptuniiacmestateialpnerror0iasyncreadhbytesizeibacktraceibinderror0ibitstringiborrowmuticompatexticryptorngidatagrams0000idialerror0idiscovery00idnsconfigidnsserveriformatteriframetypeihandshake0ihistogram0ijoinerror00ilocaladdr0inoaddress000inoresults0inodeidext0inumlabels0000ipartialeqipathstatsipointableipolicyextipublickey000iquicspawn0ireaderror0irecordsetirecverror00irelaymode0irelaynode0irelayonlyireloadingiresolvingisecretkey00isenderror0iserializeisignature0ispantraceitlsconfigitryfutureitrystreamiutf8erroriwatchrecv0iwebsocket000izonestorehacceptbihaddboxediadvertiseiassembleribacktrace0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000hbindaddr0000ibootstraphcertmodehclientrxhcloneboxhconntypeidatagrams00hderefmut0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000idiscovery0000hfieldref00000hfmtshort0hframelenhfromiter0000hglobalv4hglobalv6ihandshake0hhttpaddr0hhttpsurlhinmemoryiinitiatorhinto0rtthirohbasehisclosedimagicsock0imigrationhnewtokenhnodeaddr00hnodeinfo00000hpkarrurlhpollnext0hpollread0hproxyurl00hquicaddrireferencehrelaymap0hrelayurl000000ireportgenhretrytaghrunquinnhsenddatahsendipv4hsendipv6hsentpong0iserialize000000000000000000000000000000000hsetalpnshstableidisubscribehtostring000000000000000000000000000000000000000000000000000000000000000000000000htokenkeyitransport0httfbhisthuserdata00hwritealljargmatchesjasyncwritejcertconfig0jclientauthjclientsinkjcomparablejconnectingjconnection0000000jcontrolmsgjcontrollerjdirectaddrjdiscovered0jdnshandlerjequivalent0jframestatsjheadernamejhttpconfigjhttpserverjintofuturejinvalidurl0imaxlength0jmagicspawn0jmetricitemjnoresponse0jnodeticket0jnonzerou32jnotallowedjownaddress0jprovenancejparseerror00000000jpartialordjpkarrerror0jportmappedjquicclientjquicconfig0irelaypathjrecordtypejrecvstreamjreseterrorjrestarting00jrestrictedjretryerrorjselfsignedjsendstreamjserializerjsigningkeyjsocketaddrjspawnerror0jstatuscodejsubcommandjtimesourcejwriteerroriacceptuniiallowspiniborrowmut00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ibytesrecv0ibytessent0ichunksizeichunktimeicloneinto00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000icompatmut00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000icompatref00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jcongestionjconnection0jequivalent00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ierrorcode0iframetype000ifrombytes000000ifromparts000ifromsliceihttpsaddr0iintoinneriirohbenchiirohrelayiisallowedilastaliveilocaladdr0ilookuptxt00ilostbytesin0watcherjnameserverinetreport00inopublishinodestateinumlabels00ionlyrelayipcpprobesjpersistentipollclose0ipollflush00ipollready0ipollwrite0jportmapperjprovenance00ireadchunkireadexactirelaymodeisecretkey000isendrelayispantrace000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000istartsend0itestutils0jthroughputitlsconfigitotalsizeizonestorekaccepterror0kaccesslimitkaddnodeaddr0kcallmemaybekclienthellokclientstatskcryptoerrorkdecodeerrorkdeserializekdnsprotocolkdnsresolver0kemptypacket0kemptypruned0kerrorcompatkheadervaluekhttppayload0khttprequest0khttpsconfigkidletimeoutkintorequestkletsencrypt00klookuperror0kmissinghost0knolocaladdr000kpingtrackerkrelayconfigkresolveboth0kselfconnect0kstoreconfigkstreamerror000kstreamstatskunavailable0kunspecifiedhclonebox00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000jacceptwithjasiterable00000jclearcache00jcreateconnjcurrentmtujdefaultsoajdefaultttlkdescription000000000000000000000000000000000000kdeserialize000000000000000000000000000000000kdisconnects0jdnshandleridstnodeidjfieldcount00000jinitialmtu0jinitialrttkinitializedjintofuture000000000jisshutdownjlookupipv400jlookupipv600jmaxstreamsjnamedlayer00000000000000000jnodeoriginionendacksjpartialcmp000000000000000jpkarrrelayjquicconfig0jreadchunksireadtoendjrecvstreamjsendstreamjsendwindowjtaskhandlejtimesourcejuploadsizejupnpprobesjupperboundjwithcryptojwritechunklaccessconfiglcertifiedkeylclientconfiglclientstreamlclosedstream00lconnecterror0000lconnectionidldeserializerldhtdiscoveryldisconnectedldnsdiscoverylfromiteratorlintoiterablelintoiteratorlinvalidframe00llookupfailed0lmetricsgrouplproxyconnect0lreaddatagramlrelaymetrics0lresolveerrorlrttestimatorlserverconfig00lsignedpacketlsocketaddrv4lsocketaddrv6lstoppederrorlverifyingkeykasprotocolskaugmentargs0jbindaddrv4jbindaddrv6lcertificateskclosereasonkdatablockedkdiscoveryn0kdnsrequestskdnsresolver000000jfromerrbox0kinitialkeyskintorequest00000000000000000kisconnectedklastcontrolklastpayloadklastupdated0klostpacketskmaxincomingkmetricsaddrkpingtrackerkpollupdatedkreconnectinkrelayconfigkreportsfullkresetstreamkresolvehost0ksegmentsizeksentpacketskservicenameksetprioritykstopsendingkstreamstatsktobitstringjtonodeaddr00kwritechunkskwrongprefixmaserrorsourcemcidsexhaustedmclientbuildermclonetouninitmdecodingerror00000000mdiscoveryitemmencodingerror000mfinishedearlymframetoolarge0linvalidtokenkirohtxtname0mintodiscoveryminvalidlength000mlocallyclosedmmdnsdiscoverymmetricsconfigmpathselectionmpkarrresolvermprivatekeydermqad4localportmreadableerrormrouterbuildermtaskcancelled0mtxtrecorddatamunexpectedend0000lackfrequencyladddiscoverykaddnodeinfolboundsocketslclientconfiglcontainsnode0ldiscoverydhtldownloadsizeldurationhistlfromserviceskgetnodeinfolgroupscloned0lhttprequestslimmediateacklintoincomingkmaxackdelaylobservedaddrlonconnecting000konmtuupdatelpathresponselpcpavailablelpeeridentitylpollshutdownlpongreceivedlratelimitinglreaddatagramlrelaylatencylsenddatagramlsendfairnesslsendresponselserverconfig00ksetnodeinfoksetrelayurl0ksetuserdata0lstartsessionltakesegmentsktrypollnext0ktrytostring00000000000000000000000000000000000000000000000000000000000000000nattrfromstring0000ncertificatederncommandfactorynconnectoptionsnconnectionlost0000nconnectiontypendirectaddrinfondirectaddrtypendiscoveryerror0ndiscoveryevent0ndiscoverystart0ndnspkarrservernframetypeerror00000nfromargmatchesminternalerrornincomingfutureninitializedfutnmainlineconfiglnoviablepathnpkarrpublishernportmapmetricsnpublickeyerrornreadexacterrornreadtoenderrornrelaylatenciesnrequesthandlernsignatureerror00nsimplednserrornstaggerederrornstaticproviderntlsheaderparse0ntransferresultntransporterror0lactortickmsglaeadfromhkdfmanswerrequestlavgchunksizemcaptiveportalmclienthandlermconnectclient0mexpectedtypeslfromnodeinfomhandlerequestmhandshakedata0mhandshakedonemhassubcommandlhttpbindaddrminitialwindowmintodiscovery000000000000lintonodeaddr00mminimumchangemnetworkchangempathchallengempathselectionmprobesstartedlproxyfromenvmproxyhostnamelquicbindaddrmreadunorderedmreceivewindowmreceivedresetlrecvdataipv4lrecvdataipv6mrecvdatagramslrecvdiscoudpmremoteaddresslremotenodeid0lrununtildone0msaturatingaddlsenddiscoudplsentdiscoudpmthroughputbpsmtimethresholdltotxtstrings0mtotaldurationmunknownframes0mupnpavailablelwithrelayurl00000lwithuserdata000obindtcplistener0obindtlslistener0obootstrapoptionoclientratelimitoconnectioncloseoconnectionerror000oconnectionstatsoendpointmetricsoinstrumenterroroinvalidrelayurl000oinvalidresponse0oinvalidtxtentry000okeyparsingerror000mmaxpacketsize0omessageresponseometricsgroupsetonotanirohrecord0000oprotocolhandleroproxyinvalidurl0oratelimitconfigorelayquicconfigoresponsehandleroserverchallengeosupervisorerror0otransportconfig0otryreserveerrorounexpectedframe0oversionmismatchozerorttacceptedozerorttrejected000mactortickmainmaserrorsource00000000000000000000000000000000000000000000000ncleardiscoverymclonetouninit00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ndefaulttimeoutnfromcomponentsmfromtxtlookup0mhttpsbindaddrmincurrentspan00000000000000000000000000000000000000000000000mirohdnsservermmaxburstbytesmmaxstreamdatammaxstreamsunimmaxtlsticketsnnodescontactednpreferredrelaymrecvdatarelaymrecvdiscopingmrecvdiscopongnrepublishdelaymrununtilerrormrunwithoriginmsentdiscopingmsentdiscopongnserverendpoint0nstaticprovider0nstreamfinishednthroughputhistmwatchnodeaddrnwithnameserver00A`addnodeaddrerror0A`applicationcloseA`cleanupdropguardA`clienttorelaymsg0A`connectionclosedA`discoverycontextA`endpointselectornfinalsizeerrorA`invalidframetype0A`invalidpublickey0A`invalidsignature000nkeyupdateerrorA`magicsockmetricsA`netreportmetricsA`pkarrrelayclientnrelayprobepathA`relaytoclientmsg0A`serverdeniedauth0A`serverdeniesauthA`tostringfallibleA`tryfromprimitiveA`unexpectedformat0000A`unknownframetype0A`unknownhandshake0nactortickothernbytespersecondocongestionstateoconnectioncloseodirectaddresses00000ndnslookuperrorndnsrequestsudpnfromargmatches00nirohquinnprotooletsencryptprodnlookupipv4ipv60omappingattemptsomappingfailuresnmaxidletimeoutnmaxstreamsbidiopacketthresholdnrecvdiscorelaynremovenodeinfonrunrelayservernsenddiscorelaynsendrelayerrornsentdiscorelayotransportconfig000nupdatenodedataovalidationtokenowithnameserversnwithsinglecertnwriteallchunksA`applicationerroroaprelayhostnameAaabortondrophandleAaapplicationclosedAacontrollerfactoryodefaulthttpport0odefaultpkarrttloeurelayhostname0AahandshaketokenkeyAainternalsignatureAainvalidtargetport0onarelayhostname0AareloadingresolverAaremotenodeiderrorAasenddatagramerrorAasignatureencodingAaunsupportedbypeeroacceptconnburstoacceptconnlimitoactorlinkchangeocollectandprintA`congestioneventsoconnectwithoptsodefaultrelaymap0ogetsignedpacketnlookupnodebyid0omaxdatagramsizeonewconnectionidorelayhomechangeosendpacketsrecv0osendpacketssent0owithdnsresolverA`aeadlimitreachedAbackfrequencyconfigA`clientauthheaderAaconnectionrefusedAbconnectionselectorAbcryptoserverconfigA`defaulthttpsport0AbdynprotocolhandlerA`flowcontrolerrorAbillegalorderedreadAbintodiscoveryerror0Abinvalidencodingz32000AbinvalidheadervalueAbmtudiscoveryconfigAaprotocolviolationAbrelayurlparseerror0AbresolvesservercertA`streamlimiterrorA`streamstateerrorAbserverconfirmsauthAbtransporterrorcodeAbunsupportedversionoactortickrestunA`commandforupdate00A`cryptobuffersizeA`defaultrelaymodeA`discopacketsrecv0A`discopacketssent0A`dnslookupsuccessA`dnsrequestshttpsA`fromu64uncheckedA`keycachecapacity0A`localportupdateson0dnspkarrrelayA`otherpacketsrecv0A`otherpacketssent0A`pathpingfailuresA`pathqualityscoreA`pkarrpublishnooporecvdiscobadkeyA`recvgrodatagramsAarepublishintervalA`setreceivewindowA`tryfromprimitiveA`uniqueclientkeys0A`upnpprobesfailedA`alpnquicaddrdiscAcalgorithmidentifierAcconcurrentdiscoveryAcdecodeinvalidlength000AcdnsdiscoverybuilderAcinvalidwebsocketurl0Acmissingremotenodeid0Acnoserviceconfigured0ActransportparametersAcunexpectedframetype0AbaugmentsubcommandsAablackholecooldownAadnslookupnotfoundAaforcestaginginfraAahttprequestserrorAakeepaliveintervalAbletsencryptcontactAalostplpmtudprobesAaoncongestioneventAapathfailureresetsAasentplpmtudprobesAastreamdatablockedAastreamupdatesonlyAastreamsblockeduniAaupdatedirectaddrsAbverificationfailedAdconnectwithoptserror0Abdefaultmetricsport0Addeserializationerror0Adexceedsmaxpacketsize0AbframeencodingerrorAdfailedbuildingpacket000Adinvalidtlsservername0AdmdnsdiscoverybuilderAdpkarrresolverbuilderAdvarintboundsexceededAdweakconnectionhandleAbackfrequencyconfigAbadddirectaddresses0AcalgorithmidentifierAbblackholesdetectedAafromargmatchesmut00Abhandleclientstream0AbincomingbuffersizeAbmtudiscoveryconfigAbnetworkpathchangedAbpathmarkedoutdatedAapathrttvariancemsAbpkarrpublishupdateAapkarrputratelimitAbpreferredaddressv4Abpreferredaddressv6AarecvdiscobadparseAcreorderingthresholdAbretireconnectionidAbretrytokenlifetimeAbsendpacketsdropped0AbstreamsblockedbidiAbupnpgatewayupdatedAbwithsystemdefaultsAeclienttorelaydatagramAepkarrpublisherbuilderAerelaytoclientdatagramAetryfromprimitiveerrorAevalidationtokenconfigAbdefaultaprelaynodeAbdefaulteurelaynode0Abdefaultnarelaynode0Acdiscopacketsdropped0AbdnsandpkarrserversAchttprequestssuccessAclookupipv4staggered0Aclookupipv6staggered0AbnumrelayconnsaddedAcotherpacketsdropped0AbpathpacketlossrateAbrunrelayserverwithAcstorepacketsexpiredAcstorepacketsremovedAcstorepacketsupdatedAcstreamreceivewindowAcwithadditionalalpnsAcwithdirectaddresses00000AcwithtransportconfigAdcryptobufferexceededAfgetmappingaddresserror0Afmaxlengthexceedederror0Afnorelayservicesenabled0Afproxyinvalidtargetport0AdrelayprotocolversionAfsignedpacketbuilderrorAdcleardirectaddresses0AdexportkeyingmaterialAcmappingvariesbydestAcnumdirectconnsaddedAcsenddatanetworkdownAdstorepacketsinsertedActopkarrsignedpacket0AdwithmainlinefallbackAgacmeeventstreamfinished0Agclientauthheaderinvalid0Addefaultrelayquicport0Acn0dnsnodeoriginprod00Acn0dnspkarrrelayprodAgsignedpacketverifyerrorAgunexpectedupgradestatus0AeackelicitingthresholdAeaddressfamilyselectorAdaugmentargsforupdate0AediscoverylocalnetworkAdnumrelayconnsremovedAdupdatefromargmatches00AduserdatafordiscoveryAevalidationtokenconfigAeenvforcestagingrelaysAfconnectionbecamedirectAfexternaladdressupdatedAefrompkarrsignedpacket0AfincludedirectaddressesAelookslikediscowrapperAfnodescontacteddirectlyAenumdirectconnsremovedAdrecvdiscocallmemaybeAfremoteaddressvalidatedAdsentdiscocallmemaybeAesignedpacketstorepathAfconnectionidlimiterrorAiexportkeyingmaterialerrorAiproxyconnectinvalidstatus0Aiproxyinvalidtlsservername0AequicaddrdiscclosecodeAgtransportparametererrorAeaddnodeaddrwithsourceAfdatagramsendbuffersizeAfhttprequestsdurationmsAfinsecureskipcertverifyAjclienttorelaydatagrambatchAgdefaultkeycachecapacityAhdefaultrepublishintervalAfn0dnsnodeoriginstaging00Afn0dnspkarrrelaystagingAjrelaytoclientdatagrambatchAjsignaturebitstringencodingAgactortickportmapchangedAgbytesrxratelimitedtotal0Agconnsrxratelimitedtotal0AgdatagramsendbufferspaceAgincomingbuffersizetotalAglookupipv4ipv6staggered0Aflookupnodebydomainname0AgmaxconcurrentunistreamsAgquicaddrdiscclosereasonAienablesegmentationoffloadAglookupnodebyidstaggered0Agmappingvariesbydestipv4Agmappingvariesbydestipv6AhmaxconcurrentbidistreamsAgsetuserdatafordiscoveryAgupdatefromargmatchesmut00AidefaultcertreloadintervalAjconfiguretracingsubscriberAjconnectionhandshakesuccessAidatagramreceivebuffersizeAimakedangerousclientconfigAgrunwithconfiguntilctrlcAkcongestioncontrollerfactoryAjsendobservedaddressreportsAisetmaxconcurrentbistreamsAninvalidprotocolmessageencoding0AkaugmentsubcommandsforupdateAjsetmaxconcurrentunistreamsAkinsecureskiprelaycertverify0AmpersistentcongestionthresholdB`dynassociatedalgorithmidentifierAlactortickdirectaddrheartbeatAmreceiveobservedaddressreportsAkselfsignedtlscertsandconfigAlrecvdiscocallmemaybebaddiscoAolookupnodebydomainnamestaggered0") \ No newline at end of file diff --git a/pr/3367/docs/search.index/path/10e9b1fcf710.js b/pr/3367/docs/search.index/path/10e9b1fcf710.js new file mode 100644 index 0000000000..59e6ff3bb3 --- /dev/null +++ b/pr/3367/docs/search.index/path/10e9b1fcf710.js @@ -0,0 +1 @@ +rd_("f[1,\"\"]0Al[10,\"core::cmp\",\"core::cmp\"]Al[10,\"core::ops\",\"core::ops\"]Ce[5,\"clap_builder::util::id\",\"clap_builder::util::id\"]Bd[15,\"iroh_relay::client::DialError\"]Eg[5,\"tower_http::follow_redirect::policy::or\",\"tower_http::follow_redirect::policy::or\"]55Ei[5,\"tower_http::follow_redirect::policy::and\",\"tower_http::follow_redirect::policy::and\"]A`[10,\"core::any\"]Cm[5,\"der::asn1::any::allocating\",\"der::asn1::any::allocating\"]Ao[5,\"alloc::sync\",\"alloc::sync\"]Ba[5,\"alloc::boxed\",\"alloc::boxed\"]Cb[10,\"bytes::buf::buf_impl\",\"bytes::buf::buf_impl\"]Bi[6,\"iroh_quinn_proto\",\"iroh_quinn_proto\"]8Al[15,\"iroh::KeyParsingError\"]Ba[15,\"iroh_base::KeyParsingError\"]Am[5,\"n0_watcher\",\"n0_watcher\"]Am[5,\"iroh_bench\",\"iroh_bench\"]Bg[5,\"iroh_bench::s2n\",\"iroh_bench::s2n\"]A`[10,\"core::cmp\"]Ak[5,\"core::pin\",\"core::pin\"]Bg[15,\"iroh_relay::client::ConnectError\"]o[5,\"url\",\"url\"]Am[5,\"alloc::vec\",\"alloc::vec\"]Al[2,\"iroh::discovery::pkarr\"]j[2,\"iroh\"]Ae[2,\"iroh::discovery\"]A`[2,\"iroh_relay\"]Ae[2,\"iroh_dns_server\"]f[1,\"\"]00Ao[2,\"iroh::net_report::options\"]o[2,\"iroh_base\"]f[0,\"\"]A`[2,\"iroh_bench\"]4Ak[2,\"iroh_dns_server::http\"]555Ak[10,\"clap_builder::derive\"]>Af[10,\"core::ops::drop\"]Ad[10,\"core::convert\"]Aa[10,\"core::hash\"]1g[17,\"\"]Ci[5,\"iroh_quinn_proto::crypto\",\"iroh_quinn_proto::crypto\"]Bd[15,\"iroh_base::ticket::ParseError\"]Cc[5,\"reqwest::dns::resolve\",\"reqwest::dns::resolve\"]Dg[5,\"hickory_proto::rr::domain::name\",\"hickory_proto::rr::domain::name\"]Ak[5,\"std::path\",\"std::path\"]Bi[6,\"core::task::poll\",\"core::task::poll\"]Bb[10,\"core::marker\",\"core::marker\"]Bi[6,\"iroh_quinn_proto\",\"iroh_quinn_proto\"]Ac[10,\"futures_sink\"]2Bj[15,\"iroh::discovery::IntoDiscoveryError\"]Bf[15,\"iroh::discovery::DiscoveryError\"]Bb[15,\"iroh::protocol::AcceptError\"]Bb[15,\"iroh::discovery::ParseError\"]Bh[15,\"iroh_relay::node_info::ParseError\"]Ah[10,\"ppv_lite86::types\"]f[1,\"\"]f[3,\"\"]Ah[2,\"iroh_relay::client\"]A`[2,\"iroh_relay\"]Ae[2,\"iroh_dns_server\"]A`[2,\"iroh_bench\"]4Ae[2,\"iroh::discovery\"]Ag[2,\"iroh_base::ticket\"]Ad[2,\"iroh::defaults\"]5Bk[2,\"iroh_quinn_proto::connection::streams\"]99Ad[10,\"core::convert\"]Ca[8,\"futures_lite::future\",\"futures_lite::future\"]Ca[8,\"futures_lite::stream\",\"futures_lite::stream\"]Ba[5,\"bytes::bytes\",\"bytes::bytes\"]Ad[5,\"iroh::endpoint\"]Ab[10,\"core::clone\"]Cg[6,\"iroh_quinn_proto::frame\",\"iroh_quinn_proto::frame\"]Ao[10,\"iroh_quinn_proto::coding\"]A`[10,\"core::fmt\"]Ag[10,\"core::ops::deref\"]Bg[15,\"iroh::endpoint::AddNodeAddrError\"]Ak[5,\"core::fmt\",\"core::fmt\"]Ab[10,\"core::error\"]Be[5,\"std::io::error\",\"std::io::error\"]Bc[6,\"rustls::error\",\"rustls::error\"]Ba[8,\"clap_builder\",\"clap_builder\"]Am[5,\"der::error\",\"der::error\"]Ao[6,\"spki::error\",\"spki::error\"]Bi[5,\"signature::error\",\"signature::error\"]Bg[6,\"postcard::error\",\"postcard::error\"]Af[2,\"iroh_relay::quic\"]Bc[2,\"iroh_relay::protos::handshake\"]Ao[2,\"iroh_relay::protos::relay\"]Ba[5,\"hyper::error\",\"hyper::error\"]Ee[6,\"iroh_quinn_proto::transport_parameters\",\"iroh_quinn_proto::transport_parameters\"]Be[5,\"reqwest::error\",\"reqwest::error\"]Cg[6,\"tokio_websockets::error\",\"tokio_websockets::error\"]Bi[6,\"iroh_relay::quic\",\"iroh_relay::quic\"]Dc[6,\"iroh_relay::protos::handshake\",\"iroh_relay::protos::handshake\"]Ck[6,\"iroh_relay::protos::relay\",\"iroh_relay::protos::relay\"]Ca[6,\"iroh::net_report\",\"iroh::net_report::probes\"]Bk[15,\"iroh::endpoint::ConnectWithOptsError\"]Bg[15,\"iroh_relay::protos::relay::Error\"]Bb[10,\"core::marker\",\"core::marker\"]Bk[5,\"iroh_bench::stats\",\"iroh_bench::stats\"]1g[17,\"\"]f[1,\"\"]Ah[2,\"iroh_relay::protos\"]Af[2,\"iroh_quinn_proto\"]Ae[2,\"iroh::discovery\"]A`[2,\"iroh_bench\"]34Ae[2,\"iroh_dns_server\"]1Bb[2,\"iroh_quinn_proto::connection\"]166Be[5,\"iroh::endpoint\",\"iroh::endpoint\"]Bm[6,\"iroh_relay::server\",\"iroh_relay::server\"]Ac[10,\"core::borrow\"]C`[10,\"bytes::buf::buf_mut\",\"bytes::buf::buf_mut\"]Bc[5,\"pkarr::client\",\"pkarr::client\"]Bm[5,\"iroh_relay::client\",\"iroh_relay::client\"]Ba[5,\"async_compat\",\"async_compat\"]Cg[5,\"iroh_dns_server::config\",\"iroh_dns_server::config\"]Al[15,\"iroh::KeyParsingError\"]Ba[15,\"iroh_base::KeyParsingError\"]Am[5,\"n0_watcher\",\"n0_watcher\"]Cb[10,\"core::future::future\",\"core::future::future\"]Ca[5,\"iroh_dns_server::dns\",\"iroh_dns_server::dns\"]An[10,\"core::hash\",\"core::hash\"]Cb[15,\"iroh_relay::protos::relay::RelayToClientMsg\"]Bm[6,\"core::net::ip_addr\",\"core::net::ip_addr\"]Bm[5,\"iroh_relay::server\",\"iroh_relay::server\"]Bh[10,\"reloadable_core\",\"reloadable_core\"]Be[15,\"iroh_relay::server::CertConfig\"]Ak[8,\"iroh\",\"iroh_base::key\"]B`[8,\"iroh_base\",\"iroh_base::key\"]Be[8,\"iroh_base::key\",\"iroh_base::key\"]Ad[5,\"iroh::endpoint\"]Ba[6,\"core::option\",\"core::option\"]g[17,\"\"]E`[10,\"tower_http::follow_redirect::policy\",\"tower_http::follow_redirect::policy\"]Co[5,\"hickory_proto::rr::resource\",\"hickory_proto::rr::resource\"]Ca[5,\"iroh::net_report\",\"iroh::net_report::report\"]Ak[8,\"core::fmt\",\"core::fmt\"]Ba[6,\"core::result\",\"core::result\"]Be[8,\"std::io::error\",\"std::io::error\"]Bg[8,\"n0_snafu::error\",\"n0_snafu::error\"]Be[5,\"iroh::protocol\",\"iroh::protocol\"]Cg[5,\"iroh_dns_server::server\",\"iroh_dns_server::server\"]Bm[5,\"iroh_relay::server\",\"iroh_relay::server\"]Ad[2,\"iroh::endpoint\"]C`[6,\"iroh::endpoint\",\"iroh::magicsock::node_map\"]Ak[10,\"futures_core::stream\"]Am[5,\"n0_watcher\",\"n0_watcher\"]Bc[5,\"alloc::string\",\"alloc::string\"]Bl[10,\"iroh_base::ticket\",\"iroh_base::ticket\"]Ak[5,\"core::any\",\"core::any\"]Ci[5,\"iroh_quinn_proto::varint\",\"iroh_quinn_proto::varint\"]Ad[5,\"iroh::endpoint\"]Bi[15,\"iroh::discovery::pkarr::PkarrError\"]Bd[15,\"iroh_base::ticket::ParseError\"]A`[2,\"iroh_relay\"]Ah[2,\"iroh_relay::protos\"]Af[2,\"iroh_quinn_proto\"]Ae[2,\"iroh_dns_server\"]1Ac[2,\"ed25519_dalek\"]Af[2,\"iroh::net_report\"]5052o[2,\"iroh_base\"]4Ae[10,\"iroh::endpoint\"]Bg[8,\"iroh_relay::dns\",\"iroh_relay::dns\"]Be[5,\"iroh::endpoint\",\"iroh::endpoint\"]Co[5,\"iroh::discovery::pkarr::dht\",\"iroh::discovery::pkarr::dht\"]Bg[5,\"iroh_relay::dns\",\"iroh_relay::dns\"]De[5,\"clap_builder::builder::command\",\"clap_builder::builder::command\"]Bc[15,\"iroh::endpoint::ConnectError\"]An[15,\"iroh_relay::quic::Error\"]Bi[5,\"core::task::wake\",\"core::task::wake\"]Cc[5,\"iroh_metrics::metrics\",\"iroh_metrics::metrics\"]Ad[10,\"core::default\"]A`[10,\"core::fmt\"]Bm[5,\"tokio::time::error\",\"tokio::time::error\"]Bl[15,\"iroh::discovery::mdns::DiscoveryEvent\"]Bc[10,\"axum_core::extract::from_ref\"]Ah[10,\"core::str::traits\"]Co[5,\"std::collections::hash::map\",\"std::collections::hash::map\"]Ak[5,\"std::time\",\"std::time\"]Cg[5,\"tonic::service::layered\",\"tonic::service::layered\"]Bj[15,\"iroh_relay::server::SupervisorError\"]Cb[5,\"iroh::net_report\",\"iroh::net_report::metrics\"]Ci[5,\"iroh_dns_server::metrics\",\"iroh_dns_server::metrics\"]Cf[5,\"iroh_relay::server\",\"iroh_relay::server::metrics\"]Am[5,\"n0_watcher\",\"n0_watcher\"]Ad[5,\"iroh::endpoint\"]Cg[5,\"iroh::net_report\",\"iroh::net_report::options::imp\"]Ak[5,\"std::path\",\"std::path\"]Bk[5,\"dyn_clone::sealed\",\"dyn_clone::sealed\"]Bo[5,\"tokio::io::read_buf\",\"tokio::io::read_buf\"]Be[5,\"tonic::request\",\"tonic::request\"]Eg[5,\"hickory_server::server::request_handler\",\"hickory_server::server::request_handler\"]B`[15,\"iroh_relay::dns::DnsError\"]Al[10,\"reqwest::dns::resolve\"]Cg[5,\"tokio::runtime::runtime\",\"tokio::runtime::runtime\"]Cj[10,\"iroh_quinn_proto::crypto\",\"iroh_quinn_proto::crypto\"]Bd[15,\"iroh_relay::client::DialError\"]4Ad[10,\"alloc::borrow\"]Ad[10,\"core::convert\"]0Bg[15,\"iroh_relay::client::ConnectError\"]k[10,\"iroh\"]?f[3,\"\"]j[2,\"iroh\"]Af[2,\"iroh::net_report\"]Ah[2,\"iroh_relay::server\"]Ae[2,\"iroh_dns_server\"]f[1,\"\"]Ad[2,\"iroh::defaults\"]Bb[2,\"iroh_quinn_proto::connection\"]4Ad[5,\"iroh::endpoint\"]Ce[5,\"iroh_dns_server::state\",\"iroh_dns_server::state\"]De[5,\"alloc::collections::btree::set\",\"alloc::collections::btree::set\"]Ch[6,\"iroh_dns_server::http\",\"iroh_dns_server::http::tls\"]Am[6,\"iroh_bench\",\"iroh_bench\"]Ag[10,\"core::ops::deref\"]Bm[15,\"iroh::endpoint::GetMappingAddressError\"]Ae[2,\"iroh_relay::dns\"]Bg[6,\"iroh_relay::dns\",\"iroh_relay::dns\"]Am[5,\"core::time\",\"core::time\"]A`[10,\"dyn_clone\"]Bi[15,\"iroh::discovery::pkarr::PkarrError\"]Bd[15,\"iroh_base::ticket::ParseError\"]Ca[5,\"iroh_quinn::endpoint\",\"iroh_quinn::endpoint\"]Be[5,\"iroh::endpoint\",\"iroh::endpoint\"]3Ca[5,\"iroh_quinn::incoming\",\"iroh_quinn::incoming\"]1Bm[5,\"core::net::ip_addr\",\"core::net::ip_addr\"]0Cc[6,\"iroh_relay::node_info\",\"iroh_relay::node_info\"]Am[10,\"iroh_metrics::iterable\"]Db[10,\"core::iter::traits::iterator\",\"core::iter::traits::iterator\"]An[10,\"tonic::service::layered\"]A`[10,\"core::fmt\"]Am[15,\"iroh::endpoint::Source\"]Ca[5,\"iroh_base::node_addr\",\"iroh_base::node_addr\"]j[5,\"iroh\"]Bf[5,\"iroh_base\",\"iroh_base::node_addr\"]Ae[5,\"iroh::discovery\"]Cc[5,\"iroh_relay::node_info\",\"iroh_relay::node_info\"]10An[10,\"n0_watcher\",\"n0_watcher\"]Ak[6,\"core::cmp\",\"core::cmp\"]Bd[15,\"iroh_base::ticket::ParseError\"]Bd[15,\"iroh_relay::client::RecvError\"]7Bh[5,\"iroh_relay\",\"iroh_relay::relay_map\"]Ca[5,\"iroh_base::relay_url\",\"iroh_base::relay_url\"]9Bf[5,\"iroh_base\",\"iroh_base::relay_url\"]Bh[10,\"iroh_relay::dns\",\"iroh_relay::dns\"]Ad[5,\"iroh::endpoint\"]Ad[10,\"alloc::string\"]Bg[15,\"iroh_relay::protos::relay::Error\"];2A`[10,\"core::fmt\"]=Ad[6,\"iroh::endpoint\"]Ck[5,\"hickory_proto::rr::rr_set\",\"hickory_proto::rr::rr_set\"]Ck[5,\"tokio::sync::watch::error\",\"tokio::sync::watch::error\"]Ah[2,\"iroh_relay::client\"]Cc[6,\"iroh_relay::client\",\"iroh_relay::client::conn\"]Be[6,\"iroh::endpoint\",\"iroh::endpoint\"]7Bh[5,\"iroh_relay\",\"iroh_relay::relay_map\"]Cc[8,\"reqwest::dns::resolve\",\"reqwest::dns::resolve\"]Be[5,\"iroh_base::key\",\"iroh_base::key\"]:954Af[10,\"serde_core::ser\"]Ag[5,\"ed25519\",\"ed25519\"]o[5,\"iroh_base\"]Bo[5,\"n0_snafu::spantrace\",\"n0_snafu::spantrace\"]Bm[5,\"iroh_relay::server\",\"iroh_relay::server\"]Ak[10,\"futures_core::future\"]Ak[10,\"futures_core::stream\"]Bi[5,\"core::str::error\",\"core::str::error\"]An[15,\"iroh_relay::quic::Error\"]Bg[15,\"iroh_relay::client::ConnectError\"]Bk[15,\"iroh_relay::protos::handshake::Error\"]Bn[5,\"iroh_dns_server\",\"iroh_dns_server::store\"]Bb[2,\"iroh_quinn_proto::connection\"]j[2,\"iroh\"]Ah[2,\"iroh_relay::protos\"]f[3,\"\"]2o[2,\"iroh_base\"]3A`[2,\"iroh_relay\"]f[1,\"\"]12Af[2,\"iroh::net_report\"]An[2,\"iroh_quinn_proto::config\"]Em[5,\"clap_builder::parser::matches::arg_matches\",\"clap_builder::parser::matches::arg_matches\"]Am[10,\"tokio::io::async_write\"]Ah[2,\"iroh_relay::server\"]Bm[6,\"iroh_relay::server\",\"iroh_relay::server\"]Bm[5,\"iroh_relay::client\",\"iroh_relay::client\"]Aa[10,\"equivalent\"]Be[5,\"iroh::endpoint\",\"iroh::endpoint\"]Bc[15,\"iroh::endpoint::ConnectError\"]Bb[15,\"iroh::protocol::AcceptError\"]An[15,\"iroh_relay::quic::Error\"]Ce[5,\"iroh_quinn::connection\",\"iroh_quinn::connection\"]4Cl[6,\"iroh::endpoint\",\"iroh::magicsock::node_map::node_state\"]Ae[10,\"iroh::endpoint\"]Bf[5,\"iroh::endpoint\",\"iroh::magicsock\"]Bl[15,\"iroh::discovery::mdns::DiscoveryEvent\"]Ca[5,\"iroh_dns_server::dns\",\"iroh_dns_server::dns\"]A`[10,\"hashbrown\"];Ad[5,\"iroh::endpoint\"]Bm[5,\"http::header::name\",\"http::header::name\"]Cc[5,\"iroh_dns_server::http\",\"iroh_dns_server::http\"]0B`[10,\"core::future::into_future\"]Bd[15,\"iroh_relay::client::DialError\"]B`[15,\"iroh::endpoint::BindError\"]Bm[5,\"iroh_metrics::base\",\"iroh_metrics::base\"]B`[15,\"iroh_relay::dns::DnsError\"]Cg[5,\"iroh_base::ticket::node\",\"iroh_base::ticket::node\"]Ca[5,\"iroh_base::ticket\",\"iroh_base::ticket::node\"]Bm[8,\"core::num::nonzero\",\"core::num::nonzero\"]Bg[15,\"iroh::endpoint::AddNodeAddrError\"]Ae[2,\"iroh::discovery\"]Ag[2,\"iroh_base::ticket\"]Bc[15,\"iroh_relay::dns::LookupError\"]Ak[2,\"iroh_relay::node_info\"]Ae[6,\"iroh::discovery\"]Bk[6,\"iroh_base::ticket\",\"iroh_base::ticket\"]Cc[6,\"iroh_relay::node_info\",\"iroh_relay::node_info\"]A`[10,\"core::cmp\"]Al[2,\"iroh::discovery::pkarr\"]Ce[6,\"iroh::discovery::pkarr\",\"iroh::discovery::pkarr\"]Bi[5,\"iroh_relay::quic\",\"iroh_relay::quic\"]Cd[5,\"iroh::net_report\",\"iroh::net_report::reportgen\"]Bm[5,\"iroh_relay::server\",\"iroh_relay::server\"]De[6,\"hickory_proto::rr::record_type\",\"hickory_proto::rr::record_type\"]Ad[5,\"iroh::endpoint\"]Ad[6,\"iroh::endpoint\"]Cb[15,\"iroh_relay::protos::relay::RelayToClientMsg\"]22Bh[10,\"serde_core::ser\",\"serde_core::ser\"]Ce[5,\"ed25519_dalek::signing\",\"ed25519_dalek::signing\"]Ce[6,\"core::net::socket_addr\",\"core::net::socket_addr\"]Ah[2,\"iroh_relay::server\"]Bm[6,\"iroh_relay::server\",\"iroh_relay::server\"]Ba[5,\"http::status\",\"http::status\"]Ak[10,\"clap_builder::derive\"]Cj[10,\"iroh_quinn_proto::config\",\"iroh_quinn_proto::config\"]9Af[2,\"iroh_quinn_proto\"]0A`[2,\"iroh_quinn\"]f[3,\"\"]00j[2,\"iroh\"]Ao[2,\"iroh::magicsock::node_map\"]1Ad[2,\"iroh::protocol\"]Be[6,\"iroh::protocol\",\"iroh::protocol\"]Be[5,\"iroh::protocol\",\"iroh::protocol\"]Bk[15,\"iroh::endpoint::ConnectWithOptsError\"]Co[5,\"rustls::server::server_conn\",\"rustls::server::server_conn\"]Am[5,\"iroh_bench\",\"iroh_bench\"]Ad[5,\"iroh::endpoint\"]Bc[5,\"data_encoding\",\"data_encoding\"]Ae[10,\"serde_core::de\"]Bg[6,\"iroh_relay::dns\",\"iroh_relay::dns\"]o[5,\"iroh::dns\"]Bg[5,\"iroh_relay::dns\",\"iroh_relay::dns\"]Bd[15,\"iroh_relay::client::SendError\"]Bg[15,\"iroh::endpoint::AddNodeAddrError\"]l[10,\"snafu\"]Bo[5,\"http::header::value\",\"http::header::value\"]Bi[15,\"iroh::discovery::pkarr::PkarrError\"]0Cc[5,\"iroh_dns_server::http\",\"iroh_dns_server::http\"]Do[5,\"iroh_quinn_proto::config::transport\",\"iroh_quinn_proto::config::transport\"]Ae[10,\"tonic::request\"]Be[15,\"iroh_relay::server::CertConfig\"]Ae[2,\"iroh_relay::dns\"]=Am[5,\"n0_watcher\",\"n0_watcher\"]Cg[5,\"iroh_dns_server::config\",\"iroh_dns_server::config\"]Ce[5,\"iroh::discovery::pkarr\",\"iroh::discovery::pkarr\"]Ac[5,\"iroh::metrics\"]Ao[6,\"pkarr::keys\",\"pkarr::keys\"]Ad[6,\"iroh::endpoint\"]0Ca[5,\"iroh::net_report\",\"iroh::net_report::report\"]Bn[10,\"hickory_server::server::request_handler\"]Bg[8,\"iroh_base\",\"ed25519_dalek::errors\"]Cc[8,\"ed25519_dalek::errors\",\"ed25519_dalek::errors\"]Da[6,\"simple_dns::simple_dns_error\",\"simple_dns::simple_dns_error\"]Bg[5,\"iroh_relay::dns\",\"iroh_relay::dns\"]Di[5,\"iroh::discovery::static_provider\",\"iroh::discovery::static_provider\"]Be[15,\"iroh_relay::server::SpawnError\"]Bk[5,\"iroh_bench::stats\",\"iroh_bench::stats\"]Ad[5,\"iroh::endpoint\"]22Cg[6,\"iroh_dns_server::config\",\"iroh_dns_server::config\"]Bm[5,\"iroh_relay::server\",\"iroh_relay::server\"]2B`[15,\"iroh::endpoint::AlpnError\"]Da[6,\"iroh_quinn_proto::connection\",\"iroh_quinn_proto::connection\"]>4Bc[5,\"iroh::metrics\",\"iroh::metrics\"]Ak[10,\"tracing_error::error\"]Bi[15,\"iroh::discovery::pkarr::PkarrError\"]Bg[15,\"iroh_relay::client::ConnectError\"]B`[15,\"iroh_relay::dns::DnsError\"]Be[15,\"iroh::node_info::EncodingError\"]Bk[15,\"iroh_relay::node_info::EncodingError\"]j[2,\"iroh\"]o[2,\"iroh_base\"]j[6,\"iroh\"]B`[6,\"iroh_base\",\"iroh_base::key\"]Eo[5,\"hickory_server::authority::message_response\",\"hickory_server::authority::message_response\"]Ai[10,\"iroh_metrics::base\"]Bb[15,\"iroh::discovery::ParseError\"]Bh[15,\"iroh_relay::node_info::ParseError\"]Bf[10,\"iroh::protocol\",\"iroh::protocol\"]Bd[15,\"iroh_relay::client::DialError\"]Db[6,\"iroh_dns_server::http\",\"iroh_dns_server::http::rate_limiting\"]Bh[5,\"iroh_relay\",\"iroh_relay::relay_map\"]Bo[10,\"hickory_server::server::response_handler\"]Ah[2,\"iroh_relay::server\"]Bm[6,\"iroh_relay::server\",\"iroh_relay::server\"]Do[5,\"iroh_quinn_proto::config::transport\",\"iroh_quinn_proto::config::transport\"]Ad[5,\"iroh::endpoint\"]Bm[5,\"alloc::collections\",\"alloc::collections\"]Bg[15,\"iroh_relay::protos::relay::Error\"]Be[5,\"iroh::endpoint\",\"iroh::endpoint\"]f[3,\"\"]Ae[2,\"iroh::discovery\"]Ad[2,\"iroh::endpoint\"]Bf[6,\"iroh::endpoint\",\"iroh::magicsock\"]7Bi[5,\"iroh::test_utils\",\"iroh::test_utils\"]Ao[2,\"iroh_relay::protos::relay\"]Ck[6,\"iroh_relay::protos::relay\",\"iroh_relay::protos::relay\"]Bg[5,\"iroh::discovery\",\"iroh::discovery\"]Am[6,\"iroh_bench\",\"iroh_bench\"]::Be[15,\"iroh::node_info::DecodingError\"]Bk[15,\"iroh_relay::node_info::DecodingError\"]Ac[5,\"iroh::metrics\"]Ce[5,\"iroh::discovery::pkarr\",\"iroh::discovery::pkarr\"]76Bk[15,\"iroh_relay::protos::handshake::Error\"]Ai[10,\"iri_string::format\"]o[10,\"num_enum\"]Bb[15,\"iroh::discovery::ParseError\"]Bh[15,\"iroh_relay::node_info::ParseError\"]Ca[15,\"iroh_relay::protos::common::FrameTypeError\"]B`[15,\"iroh::endpoint::AlpnError\"]f[3,\"\"]Dg[5,\"tokio_util::task::abort_on_drop\",\"tokio_util::task::abort_on_drop\"]Ae[10,\"iroh::endpoint\"]0Ci[5,\"ed25519_dalek::signature\",\"ed25519_dalek::signature\"]Bd[15,\"iroh_relay::client::DialError\"]Cg[5,\"iroh_relay::server\",\"iroh_relay::server::resolver\"]Be[5,\"iroh::endpoint\",\"iroh::endpoint\"]Ad[6,\"iroh::endpoint\"]Aj[10,\"signature::encoding\"]Ad[5,\"iroh::endpoint\"]Am[6,\"iroh_bench\",\"iroh_bench\"]8Bf[10,\"iroh::protocol\",\"iroh::protocol\"]Ae[2,\"iroh::discovery\"]Bg[6,\"iroh::discovery\",\"iroh::discovery\"]Be[15,\"iroh::node_info::DecodingError\"]Bk[15,\"iroh_relay::node_info::DecodingError\"]Bo[5,\"http::header::value\",\"http::header::value\"]7j[5,\"iroh\"]Bf[5,\"iroh_base\",\"iroh_base::relay_url\"]Bb[10,\"rustls::server::server_conn\"]::Bg[5,\"spki::algorithm\",\"spki::algorithm\"]Bg[5,\"iroh::discovery\",\"iroh::discovery\"]Al[15,\"iroh::KeyParsingError\"]Ba[15,\"iroh_base::KeyParsingError\"]Ca[5,\"iroh::discovery::dns\",\"iroh::discovery::dns\"]Bg[15,\"iroh_relay::client::ConnectError\"]Bb[15,\"iroh::protocol::AcceptError\"]Bf[15,\"iroh::discovery::DiscoveryError\"]Ee[5,\"iroh_quinn_proto::transport_parameters\",\"iroh_quinn_proto::transport_parameters\"]Bk[15,\"iroh_relay::protos::handshake::Error\"]Ad[2,\"iroh::endpoint\"]Be[6,\"iroh::endpoint\",\"iroh::endpoint\"]2Bd[15,\"iroh_relay::client::SendError\"]Be[15,\"iroh::node_info::EncodingError\"]Bk[15,\"iroh_relay::node_info::EncodingError\"]9Cc[5,\"iroh::discovery::mdns\",\"iroh::discovery::mdns\"]Ce[5,\"iroh::discovery::pkarr\",\"iroh::discovery::pkarr\"]Ci[5,\"iroh_quinn_proto::varint\",\"iroh_quinn_proto::varint\"]Ad[5,\"iroh::endpoint\"]2Ai[5,\"num_enum\",\"num_enum\"]Ci[5,\"iroh_quinn_proto::config\",\"iroh_quinn_proto::config\"]Af[2,\"iroh::test_utils\"];:Ae[5,\"iroh::node_info\"]Cc[5,\"iroh_relay::node_info\",\"iroh_relay::node_info\"]Bj[15,\"iroh_relay::server::SupervisorError\"]Bd[15,\"iroh_relay::client::DialError\"]Ca[6,\"pkarr::signed_packet\",\"pkarr::signed_packet\"]2Bk[15,\"iroh_relay::protos::handshake::Error\"]1Bg[15,\"iroh_relay::client::ConnectError\"]:33Ac[10,\"spki::traits\"]Bg[15,\"iroh_relay::protos::relay::Error\"]1") \ No newline at end of file diff --git a/pr/3367/docs/search.index/root.js b/pr/3367/docs/search.index/root.js new file mode 100644 index 0000000000..45b1d55225 --- /dev/null +++ b/pr/3367/docs/search.index/root.js @@ -0,0 +1 @@ +rr_('{"normalizedName":{"I":"AQABoEAAABEDZTswAAABAAAGAAMABwEAAHIDBAAbBwAAAYACoBAAAAy2oCAAAAy2MTUBAQGgQAAADg1lOjAAAAEAAAAAAA4AEAAAAAMCDAM/Ax4MHwwgDHkOew58Dn0OTxPpG+ob6xvsGwGAA6AQAAAHG6AAAAADPqAAAAAMtjI2OQEBADswAAABAAC9AAIAdwMAAB8HvAAAB25lc3RvcmUAAPIKEQAAfAYAAQABoCAAABnrZvIOCAAAbRAAB2VqZWN0ZWQAAPR/GgAAAQABAAEAAAAHY2NlcHRlZAAAAX4aAAAA8oJ0dAIAYXISgAEBoCAAABNPcnXyAAEAbwDybxMAAF8FMgABA6BAAAAbb6BAAAAc4HJkZXQAOzAAAAEAAFkAFQAXBwEAkAkAAOYNAAC0EAAA/BAAALESIQBEFAAAhRcAAJEXAABMGCEAvBgAACAZAABiGQAAAxoAAGYaAQDUGwAA/BsAAD8cAQBWHAAAzhwAAPQcAAAABHJyb3IAAAENDgAAAPIBMgEAZQA7MAAAAQAACQADAB4MAgB7DgIA6RsDAHYBAIADArCQHD0AATNlb2FpAQIDoFAAABoioDAAAByboKAAABxYY2RwAbEcAAABAgA7MAAAAQAAxgACALkQAAB6E8UAAYICoIAAABvVoIAAABvlbnQACG5ncHJlZml4AAABKxkAAAAAAmVuAAABZQwAAAAIAwAAAXcTAAAAAARodW5rAQDAAAAAGSpzAcAYAAAAAAVodW5rcwAAAbMbAAAA8gJsbAEAYwEmEwAAAPIAAwBhY2UBkgkAAPMoEwAAzQMBAPKBdAIAZXQygAIBoEAAABy+aW9hAQIBsEAcOQABZQHOGwAAE4ACoEAAABtZcHIAB3NlcmRhdGEAAPRGGgAAAQABAAEAAAAOcmFuc3BvcnRjb25maWcAAAGKHAAAAAAMc3RlbWRlZmF1bHRzAAABZxwAAAAACG5nbGVjZXJ0AAABshsAAAAygAIBoEAAABzNaXlvAAdlbGF5dXJsAAA7MAAAAQAABQABAEAaBQAAAAlhbWVzZXJ2ZXIBAMAAAAAbsXPzYxsAAAEAAQAAAA9haW5saW5lZmFsbGJhY2sAAAGfHAAAAAAJc3Jlc29sdmVyAAAB2xsAAAAADXJlY3RhZGRyZXNzZXMAADswAAABAAAFAAEAhBwFAADygAIAaW4ABHlwdG8AAAG/GAAAABKAAQGg4AAAHPZybwAOZGRpdGlvbmFsYWxwbnMAAAGDHAAAAPIBaImBDTAPAEAAAPIZGAAAZQQAA2RvdwAAASgMAAD1uRgAAFcBGgDpAW8A8oACAG50AYACoCAAAA3loGAAABoCaHIABnNvY2tldAABsCAcIAABdfQGEQAAAQABAAEAAAARa2Nvbm5lY3Rpb25oYW5kbGUAAAFLHAAAALKAAgKwABNQA4lhYmRyAANlY3YAAPIEEQAAAQAAAAdvZGVhZGRyAAABYhsAAAAAAXIAAAFkDAAAAeEWAADygmNoAwBlbnISgAEBoHAAABxmdHn2CwAAhIclu4PUElmgMAAADpOgMAAAE3mgQAAAEowRAQEE8AYAOzAAAAEAAOYACgAaAxYA3AcAAJUJAADdCccAKAwAALkYAAAQGgAAKhoAABMcAACCHAAAAYACoIAAABoDoKAAABwRY3IAAmlwAAA7MAAAAQAAvQACAHcDAAAfB7wAAAEFAPMqGgAA6QFvAAEAAbDAHKAAAXQBzRsAAPMAAXPz3RkAAAEAUwIBAwD0UxMAAKUDAQABAFOAA6BgAAAbpmFvdAEEAPPgGAAAmgHxAQEDAbCQHPgAC2UBbBkAABMAAqBAAAAaK2Fy9QsIAABrEQoDMgAOAAGAArAgF68AAaCAAAAc9G91AQIA8+0QAAABAAEAAQMA9EYcAAABAIIAAQABgAKwABM6AAGwYBtcAAFkbgGEArBAG38AAaBAAAAbgWRzAQAAOzAAAAEAAAYAAwDiGAIAfRkCAOEbAAATgwKgYAAAG/VnckOAA6AgAAAb8qBwAAAadWVobwAHaXNtYXRjaAAAAX0aAAAA8gJvbgEAbQDy9xsAAJ0A8gABAGkA8rEbAADDAAAFbmdrZXkAAAHpGAAAABIAAQGgQAAAHKppZTswAAABAAAFAAIAzQkDACYMAQDz0BwAAC4AAQAADGNhdGlvbmZhaWxlZAAAATgcAAAA8oFmAgBpebYPAACCiaBgAAAcSaAwAAARDaAwAAAcflWo57cP6AABAh4gVQA6MAAAAQAAAAAAIQAQAAAAwQnCCZsLnAudC54LnwugC6ELzQ3ODQAOmQ7HEEIT4haTF5QX9Bj1GPYY9xj4GPkY+hhNGeEZTRtjG2QbZRunG8Qb2xsAAAAAASYBAAABHQwAAPaJAACCirAwGR4AAaBwAAAcLqFQAAAdA6BQAAAaBKCgAAAb8gQAAZrhEgA7MAAAAQAAEgAGAFEMAgDiDAsAig4AANoWAACDGwAAFBwAAAEBAaBQAAAZTmsBSwwAAAEFAPS5FwAAAQC5AcwAAYICoAAAABzqoAAAABzrNDbzBwFpAZkcAAAADW91bmRzZXhjZWVkZWQAAAFKHAAAAPoaAQBi88sJAAABAFkCAFKBaQECoFAAABxabmFlAQIAOzAAAAEAAJ0AAgA9EwEAJhabAAABZQAA8xIIAAABAH4B8poXAABTBAECAPREEwAAAQArBwEAAQYA9F4aAAABAAEAAQABCwD0RhwAAAEAggABAAEIAPTAGwAAAQDRAAEAs4CEoDAAABlBAUggAQcA9HQbAAABAAEAAQATgAKwQBzHAAFpdAEFAPRYGgAAAQABAAEAE4ECsFAaXAABbHMBgAKxUBz6AAGwcBtyAAFydQEFADswAAABAAAHAAIARRkDABscAwABBAGwMBtwAAF089UYAAABAAEAAQoA9OkbAAABAAEAAQAABW9uZmlnAADybBwAAEsAAPIHb250b2tlbgEAYwGwGwAAABqEAQGgEAAAHMJpZXY/AAFkgYqgoAAAG+2wsBwgAAEBAACwiB8A8qIcAAABAPIAAgFpdWUA9YgOAACKDRwApQAeAPKAAgJscml0dggAAMPHJjf5YNKaHK4ua6tGLXDWS+UKoRAAABy4aUkjvBg3sFATZgVRQAQAgChaAAEAOjAAAAEAAAAAAAoAEAAAAAQRBRFAFEEUJhrXG9gb/hv/GwkcChwBAgGgQAAAHOB09PwbAABaAHgAJgATgAKgMAAAHN9pcCOCAqBwAAAci2VzEwACoCAAAAmWZm3zDwEAADsLBAABBADzAhwAAHMAfgABAAGgcAAAHA5p864JAAABAAEAE4ACoBAAABtpbHIBAgA7MAAAAQAADQAFAKMJAAABEQAAQxMAAHwYCQDqGQAAAQUBsGAcogABaQHeGwAAEwACoCAAABthaGn1KxMAAFQIAQABAHQAAQEBoGAAABlRYgHACQAAAQIAOzAAAAEAAAsAAwCbDgkAhhgAAHUZAAAjgAKgMAAAHFlhbwglAAABAxEAAADyATgBAGX1cgMAAAEAAQABAAEAANYhAACBiaAgAAAaOLAgF4EAAaAgAAAJuKCAAAAcXKAAAAAOpSAAAJqBCwA7MAAAAQAARwITABkDAACWCQAAuAkAAEcMAABYDAQA+wwAAMkNAAACDgAAuRAAAL0RrAB6E8UAqRS8AIMXAACgFwAA6xkAABgbAACiGwAAURwCAO4cAgABAQD0mwkAAAEA2AEBACOAAqAQAAAZLWVvAYACoKAAABz1oCAAABN0bG8AAnplAAABkAkAAAAAC29yZGlzY292ZXJ5AAABthwAAAHtHAAA8gNhdGEBAGY7MAAAAQAABQACAAoOAgAjEwIAOzAAAAEAAAUAAgCDGQEARhoDAPIAAQBkOzAAAAEAAAUAAQBsAwUAABIAAQGgAAAAG99yZAA7MAAAAQAAJQACACAIJACWCwAAdgEAAAIDgBbwABABZWljaHQA9hcMAAABAJMQAQAbAAEAAQEBoEAAABtOYgHJGwAAAQMAOzAAAAEAAC8AAQAdGy8AAYECoIAAABzsoGAAABz5ZHOXAACDhaCAAAAcGqAgAAAYJLCQHOUAGAoQCgEBAaAAAAAM8XM7MAAAAQAAqgAHAMQJAQCiC3QAdhMAALsYAAAsGQAAhBovAM0cAAABAQKgMAAAGWOgEAAAHM9obfPRDQAASQAiDCOCAqBAAAAaNW5vAAABAdAABx0AAbCQG/AAAXNwOzAAAAEAAAYAAgAlAQAAQQMFADswAAABAAAhAAwA/Q0CAIYOAACDEgAAlhIAAJsSAgCiEgYARBMBAIEZAQBAGgUAWBoDAHAaAQAgHAEAdgMAgAEFO78KGnXabGFjZXJzAQIA890WAAABAAEAAQADsFAZZgABoBAAABppoFAAABwCY2V18n4LAAABAAECAPOlFwAAAQDxAxOBArCQGnYAAXJ2AYQCoFAAABvIoGAAABv3YnYAAmV4AAABCQ4AAAAABG91bmQAAAG+GAAAAPqWAgBiaPKAAQFlbwEBAbCAHOgAAXPy0hsAAAEAAQkBsIAdBgABc/LjHAAAAQDzgwJkaROAAqBQAAAcK2R0AAVhaWxlZAAAARccAAAA8gVyb2JlcwEAZgG9GAAAAAANYXRld2F5dXBkYXRlZAAAAWYcAAAAAAh2YWlsYWJsZQAAAT8aAAAA8oADAGFncPKAAQFwbwAGYWRzaXplAAABvBgAAAASgAEBoAAAAAmPb2UABHJhZGUAAbBQHKsAAXPyYgwAAAEAAAEAAaAwAAAcNW8BBxwAAAAHb2RlZGF0YQAAAa8bAAAAAAJ1dAAA8+4cAAABAAEAAPINcm9tYXJnbWF0Y2hlcwEAbfOzHAAAAQABAAAACXJlY3RhZGRycwAAATccAAAA8gABAGkBww0AAPYTGQAAAQAFAE0DGwA5AHYBAAJ0ZQMCoEAAABt4ZGZuZXMAOjAAAAEAAAAAAAcAEAAAAHEZ+Rv6G/sbWxyvHLAc/BwSgAEBoHAAABtpYXL2MwAAhYWwUBjYAAF0uDuWuRFIqAAwAQYA89oYAABAAgEAAYMCoPAAABz2oFAAABtZY28BhAKwMBozAAGgQAAAG1hkZQGAA6BAAAAc9rAwGjMAAaBAAAAbWGNkZROAAqAQAAAMVGxtIwACoBAAAAw1ZWk7MAAAAQAABQABAHIYBQABCgGgMAAAHH53AacbAAABgAKgcAAAHEqgUAAAGV1lb/MAAXPyvhgAAG0DAAZlcnNpb24AAAH3GwAAAAAFeXBlZXIAAAHIGwAAAPKHcHBvcnRlZAIAYnYAB2VjaWZpZWQAAAG7FwAAADKAAgGgEAAADO9wdTIAAmluAAABEQgAAAABAAGwIBREBb9p9qUKAAABAAEADg51AIkCAAhhbmRzaGFrZQAA8osbAAABAAAAA3lwZQAA8okbAAABAAAihHJhbWUCANAAGj0AAXN08gNvd24CAGZoAWEMAAAAMgABAqAwAAAURW5zdADz4QcAABoPxQEBAgA7MAAAAQAAYwACAC8ZAAC1GmIAAAx1ZWNsaWVudGtleXMAAPIVHAAAAQAAVgAAAAIDwAAAAAccoCAAAA6asGAc5QAYcXRucnMA9kgMAABNAhoCyQLYB+YAAAxwZ3JhZGVzdGF0dXMAAPKrHAAAAQAACAQAAPInHAAAAQAA8gNhbWUBAHTyexoAAAEAAAAEcm1hdAAA9YQbAAABAAEAAQABAADygAIAb3IAAm5kAAD1VRkAAAEAAQABAAEAAPKGcGVjdGVkAwBlZnUSgAEBgAuNwKABeGQIFwAA8rkXAAABAAD2ywMAxsigYAAAHASgYAAAGimgQAAAEqtARCEBAAPQFgDyMwMAAMUYAIACAMAAAAAMI8AAAAAMJDQ2AAR0YXRzAAABCA4AAAAAgAEBwAAAAAwhsDAcMAADeG+yAAQA54AAAAwicnN0dvIjAQAAAQD1uAwAAHcNBwABAGEBEoABAqDwAAAcvbDQG+4AaXBlaQABNAABoIAAABwEdQFAAwAAAXoOAAAITgAAAT8DAADyeQ4AANYEAIACAOOAAAAHG8AAAAADPjI2dn8FAAoKwAAAAAEHa7ueg6r5Fa8XFd40RU1Lp3+EFSGFKWxYZ7wS15WTBonpiH48oFAAABlxMTM2OGRucHJzdGFiY2VmZ2lsbXUA9MgMAABcC1QAAQABAwGwQBw5AAFlAc4bAADzAgFvARkYAADxgAIAzmlvAQQBoEAAAByqZfPQHAAALgABACOAAqCAAAAcWmFlAQoBoEAAABzGZQGYHAAAIwIDoMAAABzSsAAcFQABY2lzOzAAAAEAAAYAAgD3EAIA/hYDAAEAAaAwAAATImgBGgcAAAEAAaBAAAARA2X1cgMAAAEAAQABAAEAM4AEoDAAABwroBAAAAxHOGJvdQEEADswAAABAAAFAAEA4hkFAAgnAAA7MAAAAQAAxgACAMoJAAD9DMUAADIAAQKgAAAAGghpZXMAOjAAAAEAAAAAAA4AEAAAAMkQuRFlE8QWxRbGFscW2BnaGXAbcRuJG4obJxwoHBIAAQKwQBeVAAGwQBeXAAFlYXLyPAMAAAEAABIAAQGgQAAAHA5wcwA6MAAAAQAAAAAADwAQAAAA5wfoB2IJYwlkCYsOjA6NDo4Ojw6WDiMZdBkFHAYc0hwBBAD0XhoAAAEAAQABAAAJZWNvcmRkYXRhAAABVBkAAAAABHR0cnMAAAEHDgAAAHYAAAACBLBQGxoAAbAwGUIAAbBgGjoAAWFyZWxucwDz3RYAAAEAAQDyAAEAdADyIgwAAP8BAQUBoLAAABztZvKDGQAAAQAjAAKgMAAAE3RjZfYXDAAAAQCTEAEAGwABAAEAAbBgHOUAGHPyrxAAAMkC8wABaQH4GwAAAYACsNAb7gBpsFAcMAADaXABgwKwABkTAAGgAAAAHAdkcyKAAQHmUAAACY9sZHYBAACBhjEmm0cwa7AwF4EAAaBQAAAZcQCAAAggDwD0yAwAAFwLVAABAAEJAPXLGQAAAQABAAEAAQABBgD0fxoAAAEAAQABADMAA6AAAAAOB2VmcwHhDQAAAQcBoEAAABzRYgFoHAAAE4UCsCAbagABZG0BgISgMAAAG6CgAAAADGWgAAAAEMigcAAAGOEAMAMAAAAA8joDAAABAPImGAAAlQMAA2lzdAAAASITAAAA8gFiAQBoARoHAAAAthQAAMLJoHAAABp+oHAAABukoFAAABsYKD6GWF5goBAAABgmoJAAABxaAAgCAEBksAoA9TEDAAABAIcJzQX0BQECAbBgG7gBP2YBOBMAACMBA6BAAAAb5aAgAAATN2VsbQERGQAAAAV0cmluZwAAOzAAAAEAAEEAAQCJGUEAABKAAQGgoAAAHGJzaxKAAQGgEAAAEqpvYQAFdHJlYW0AAAECEQAAAAALZXNlcnZlZXJyb3IAAAF6GgAAAAADZXh0AADyhxkAAAEAAPIDb2xsAQBuOzAAAAEAAAYAAQCoEAYAAAADbnRvAAA7MAAAAQAAxgACAGAMAADiD8UAAAAEdHVyZQAAAQERAAAACDIAAAFrHAAAAPIIcmltaXRpdmUBAGXygxsAAJEAAPICb20BAHA7MAAAAQAA0wACAF8MAAAPD9IAAGKAAwDnIAAADPxvcnX2AwAAhoGgQAAAE2wggQcQAAAA9XsJAADjEAEAAQABAAEAAaBQAAAaTm8BtREAAAEAADswAAABAAAeAQQAtRAAAP8QAAAPEaAAAxd7ABOAA6DAAAAc8rAgF60Ba2VpawgCAAABzBwAAAASiGFyYW1ldGVyAgDAAAAAHCZlcwADb2RlAAAB9hsAAAD6AgEAY/L+GQAAAQAACD0AADswAAABAAAFAAIAeBoBAKsbAwABihwAAPIDb3J0AwBjZXDyIBMAAAEAAAAIZXJyZXN1bHQAAAH9GQAAAPKBcwIAZnBygAEDsGAaTwINbmNwdLQEAACCiAAMAaaf6nmbJVdb+X6D5aAQAAAc9hqgAAAADgegkAAAGlegAAAAEbcBAEAwSSoAOzAAAAEAAAwABAA2AwAAPgwAAOENAABvDgkAAQUAOzAAAAEAAGMAAgAvGQAAtRpiAAEAAPSbCQAAAQDYAQEAAYMCoCAAABjToCAAABjUYnQBgAKgUAAAGWqgIAAAFtZjbvOAAm50AQUAOzAAAAEAAAoAAgBDEwAAfBgJAAEBAaBAAAAZ8mUBthgAABOAAqAwAAAXj25yAQgBsEAb5wABZTswAAABAAANAAIARBkAABEaDAAAAjMyAADzHgwAAAEAAQAAAAJlYwAAAR0MAAAAAAh0c3RyaW5ncwAA8joaAAABAAAAA2l6ZQAAAYUXAAAAAAd1cmF0aW9uAAABPBoAAADyAWwCAGRzAPXbHAAAAQABAAEAAgDygAIAYXgAB2FsbGlibGUAAAGCGwAAAPIEcmluZwEAZjswAAABAABJAAIAAw4AANYSSAA7MAAAAQAAQQABAIkZQQASAAEBoKAAABvhdGUA8osLAAABAAECAaBAAAAY6GXyVwwAAJ0AAA9hcnJzaWduZWRwYWNrZXQAAPKdHAAAAQAAMgABA6BgAAAZJKBAAAAZ0mtwc3QAARkHAAAAA25lZAAAOzAAAAEAAGMAAgBdDAAArA5iAAAABG1hbGwAAPIFDgAAAQAAAAJuZwAAAV4MAAAAAANyZ2UAAAEEDgAA8j8ZAAABAPKAAgBhb/KAAwBsc3cABmRlYWRkcgAA8ycZAAABAAEA8x4aAAABAAEAEoABAaCQAAAbtm9kAAJleQAAAR8TAAABvhsAABpzAQKwUBxsAEugcAAAHGJrY2wA84wSAAC1Bm8CAYQCoHAAAByLoDAAABv8ZXMAA3RlcwAAOzAAAAEAAAUAAQCmDgUAAAAHdHN0cmluZwAAASYZAAAA8oACAWl5dfYftwAJC6AwAAAShqAgAAAOiQXpte8PoLAwEMwAAVr0NFNq0GJrbm9wc3R2ejBhY2RlZmdpbXJ1ADswAAABAAD2AQgAUAMAABwGxQBwCwMAYAwAAOIPxQBGFGIAvxgAAJwbAAABgAKwMBsaAAGgUAAAHH1vcwEJAPRGHAAAAQCCAAEAAAplYWRlcnBhcnNlAADy+xkAAAEAAAAEbmZpZwAA8gARAACEBgASgAEBoMAAAB0Eb2W2AAAAAgOwcBpMAAGgYAAAG1FjaGxzdPUgAQAAAQABABYCAQAAMgABAqAAAAAcv3NveQD0OgMAAAEA6xSVAwEBAqBAAAAca6BQAAAaBGVw8oMbAACRAAGBAqAAAAAc6qAAAAAc6zQ2AYABPE6gz1/8bgEAAqAgAAAaNaCAAAAcrWF0OzAAAAEAAAoABQD5DAEALhMAAGgTAgBtGQMAdxkAABMAArCgHMcAAWd2ARoZAAABgISgQAAAHPawMBozAAGgQAAAG1iwABeBAAEcAAIBgAKgMAAAGMKAHBkDYLJkcgGDAqAgAAAZ0KAAAAAY72Rz84ECY2UACGhyZXNob2xkAAABORoAAAAABW91cmNlAADydhMAAEUFAAhEAQDAAAAADqVzOzAAAAEAAAUAAgBYDAQA+wwAAPOgFwAAeAOKAAADb3V0AAABAg4AAADyAISACEAGAPNUDAAA8QcdCBKAAQGgMAAAGOFlYQEHAPP6GQAAZAEBAAGAAqAgAAAag6AQAAAaAGFzCFcAAaAAAAAbUXPzyQkAAFICAQDyTRMAAAEAVgAAgAEFoSAAAB0CoEAAABuNoNAAABzaoFAAABv4ZWRtb3By8oABAWtwto8AgMLKN83BGO1HoNAAABxhoBAAABENoBAAABl0AAEEAEAIugsBBwD0RhoAAAEAAQABAAGBArAwG7kAAbBAG+IAAXBzI4ACoNAAAByKcnQBgIWwcBlMANiggAAAG7KgQAAAHM2gMAAAEOGgwAAAHGcQQUQBgAKgwAAAHH2goAAAHA1haQEJAaAAAAAbsXPzYxsAAAEAAQABCQDzGRwAADYAsgABgAKg0AAAHJ+gsAAAHFlpcvOAAmFpAYYDsGAcewABsDAcCQABsDAcCwABZHJz8wABcAGNGwAAI4ADoCAAABeNsLAcjgABbHJ4AQ0AOzAAAAEAAAUAAQCEHAUAE4ACoJAAABvbaW4BgQKgUAAAGiOgMAAAHFhsbhOAA6DgAAAc9qBAAAAYv2hvcgGAAqDQAAAcg7BAGfQAEWRuAQMA9TkaAABrAbwATQBTABOAAqBAAAAZcmhwAQUAOzAAAAEAAAUAAQBAGgUA84ACbHMILAAAAWEbAAAAAAJwcwAAATgaAAAA8gZ1Z2hwdXQCAGJoAYMXAAAAMoABAqCwAAAcWm9ldLRrHQDB0AAIoCAAAAxKCQsNoMAAABwy/6AgAAAbYRATPt1elZfXFKCwAAAcDhUWGAAAgADAb3wHADowAAABAAAAAAAdABAAAABdA/sGpgmnCagJqgmrCSsTRhNHE2QTrxewFxkYRRlGGUcZSBntGXwbfxuAG4Eb9RsbHBwcHRweHH4cxBwBAQDzNAwAAIYEswoBAAKgcAAAHGegIAAAG6BkcPNUAwAA9g/vBQEGAPTbHAAAAQABAAEAIwQDoFAAABpyoCAAABl3Y2Vp8k8aAAANAgECAPPuHAAAAQABAPMNAW3zsxwAAAEAAQABBADzdxMAAAEIfAABAwGgAAAAGSpzAcAYAAATgAOgIAAAGCOgIAAAHFBob3QBAQGgUAAAG7NjASYTAAABBQGggAAAHMJ2ATAaAABjgAOgEAAAGWljZGwBgAKwIBRAAAGxABzbAAFleAAEdGlscwAA8oEXAAABAAAAgAEB9nAM+QABoEAAABjhbm3ygAIAaXUWAQAAAQWgIAAAELSgMAAAHDWggAAAG46wMBRCAAF0aW9wcnMAOzAAAAEAABgACwDgBwAAHQgCAOAMAADwDAAADg4BAKYOBQDIFgYA4BYAAO8YAABOGwAABxwAAHYbAgCBjWgfHF+mw6BQAAAZTl02/KLAiwknf0gUIbCQHG4AAaCQAAAcZgAAAj08OQA6MAAAAQAAAAAAFgAQAAAAhAmFCYYJkglLDMUNfg5/DrAQKBPnFvUW9hZxGY8b+Rv6G/sbWxx9HK8csBz8HAGAAXCOy9KRGW4AAAABsHAaSgABbAEfAQAAABYCAIABBbAgDfcAAaEAAAAc8QvRFQ2ZGLBAGgYAAXBhZWhsbwECATf2C0m64GgBKxMAAAEJAPVqGgAAAQABAAEAAQBDgISgUAAAG8ygkAAAHJugAAAADEAYAQQBAIWgcAAAGjygIAAAFtqgQAAAE1CgIAAAEtOgMAAAF4UIiQL2BBoAANcCAQABAAEAAgABgQKgAAAAGiygAAAAGi00NiOAArBQGV8AAW5wAQEBoHAAABy/ZAFSGwAA8wABZQEvHAAAI4ACoFAAABp+Y3QBAAGgEAAAEtRpAeIQAAATgQKwQBjxA0NlbwAFYW5kbGUAAAG6GAAAAAAIYW5jZWxsZWQAAPJSGQAAAQAA8oFrAgBjaAAJZXNlZ21lbnRzAAABhhkAAAABAgKgQAAAHCygUAAAHLhpcjswAAABAAAGAAMAVgwAAPIMAQDUHAMAAQQBoEAAABn5ZTswAAABAAAJAAQAdhwDAOEcAQDoHAEABh0BADIAAAMlsOtJbzZnaXIBNwMAAAGqEgAA9jkCAIOLRydHpheOsLActgA3oJAAABxtat+i1HDiLMicWZOCQAQCLqkNADswAAABAAAYAAwAhgMCAO0NAgAKDgIAkg4AAKwSAAAjEwIAVBkAAIMZAQALGgEARhoDAE8bAACvGwAAAADMy30/DE4D7VzdmKlJRSxcfdoV2HFCckFeDzxolEMfp2BLFS4UjFiIfw3sQHNwtltfKA2mfhm0gknRPIucWTHTxVxDDyZJm+W6YC7j7bM3mBCVbF0QamxEq2LSjaAgAAASqScklhzYpV4Asul6jX6kJ2b0B0yhkjCjvBUVTFoMB0rjMHY2sWhkEzkjr0BlkmaAGi0ZADswAAABAADLBoAABgEAABkBAQD1AQIABQIGARkDAAAxAwEAgQMAAHAFqwAGBwMAHAcAAAkIAQAPCAAAcQkBAHcJAwCDCQAAkwkAAJYJAwChCQEAuAkAALsJBADJCQAAywkBANEJBgCoCgQAsAq8AIELAACHCwAAmAsCABsMAQAlDAAAMAwEADYMAgBADAAARwwAAE8MAQBYDAQAggwyALkMAADUDAAA+wwAAMYNAADJDQAA1w0CAOQNAAACDgAAGw4CALkQAQDZEAEA4xAAAOwQAAAGEQMAvRGsAHUSAQCGEgAAlxIBACATAgA9EwEATRMBAGETAAB6E8UAQhQBAKkUvAAmFpsA3RYCAOMWAgDtFgAA/BYAAIMXAACJFwAAlRcBAJkXAACdFwEAoBcEAKcXAQCxFwEAchgFAHoYAADbGAEA5RgAAP4YEQAeGQEALxkAAE8ZAABhGQAAYxkAAIcZAQDTGQQA3RkDAOsZAAD9GQAAAhoAAAYaAQAKGgAAKxoAAE8aAABpGgAAtRpjAFwbAQBhGwAAbRsAAHsbAACEGwQAohsAALIbAAC5GwEAwBsBAMkbAQDMGwAA0RsAANkbAQDiGwEA8hsAAAAcAQALHAEALxwAADEcAAA7HAEAQhwDAFEcAgBcHAAAkhwBAJkcAACdHAEApBwBALkcAAC7HAEA7hwCAAIdAAABgAOgAAAAHF2gAAAAHF6gcAAAHMI0NmEBBgDz1BwAAAEAAQABAwDzphwAAAEAAQDzhQJwc/MDAW/yXxkAAAEAAYECoJAAABzQsOAc/gABY3JDgAOwgBlSAAGgUAAAGLpjaGkBAwGgIAAAGmlzAdoYAADzAAFy9jcTAADJBmoBAQASAAEAAQcA868cAAABAEwAAYACoDAAABwXoLAAAByuaW1TgISgcAAAGf2gIAAAGRwRQAgBBQD2YxwAAAEADgABAAgAAQABBwGwYBwfACli8tEYAAB5AGOAhKBgAAAcUKCAAAAczxABCQABYwACoDAAABCzoEAAABMocncBawMAAAASgAEBoLAAABxnbnMBAQGwABDXAAFz9bwJAAABAAEAAQA+EAGFAqBQAAAbyKBgAAAb92J2AAtydmlzb3JlcnJvcgAA8nYaAAABAABSgAECsEAcgQA5ZWRwAAVjcmliZQABoAAAABzycgHVEgAAAAEAAaCAAAAc/GYBKRwAAPIGb21tYW5kAAFzAXUTAAABDhoAAPKAAgBjczYBAICChV5ZuzJ+1bAQDLgO4KAQAAAbUKAQAAASgwKAAAwoAQGAA6AAAAAb+LBQGRMAAbAwF4EAAW5wdAEAhaCQAAAcz6BAAAAcLaBAAAAcA6BgAAAcdaAgAAAbmJgACvLzGAAAdQABgAKgQAAAGRWgQAAAGRJjeROAAqCwAAAcMGFsAQIA9icaAACOAQcAAQAFAAEAE4ACoEAAABhxYW8BAAGhIAAAHQBjAe0WAAABAQD0ShoAAAEAAQABAPOAAmV0Q4ADoAAAABktoIAAABxnZG1uAYACsCAN9wABoFAAABkRYW8BAQGgUAAAGk5vAbURAAAAAWcAA6BwAAAc2aBwAAAbgrAAGjoAAWVmcwHICQAAOzAAAAEAAJIABQADDgAAuBAAANYSSAAmGQAAiRlGABKAAQGgMAAAE2tuYwAKcGRhdGVzb25seQAAATUcAAAAAAVlcnJvcgAAAfQbAAAAEoJhdAIA0AAXuAFtZXMAAm5pAAABNhwAAAAAA2lkaQAAAWUcAAAA8oVvY2tlZAIAYnUSgAEBoCAAABujbGkyAAIBoCAAABtQYnR19PUMAAABAAEAAQD1jRgAAFgEBwANAAQAAAxlY2VpdmV3aW5kb3cAAAGCHAAAAAAJaW1pdGVycm9yAAAB8xsAAAAAB2luaXNoZWQAAAFgGwAA8qAcAAABAAgzAAD0tBcAAAEAAQABAAAABmxvY2tlZAAAATQcAAAA+moBAGIAAU8bAAB2DwACYW2IgOZAAAAOATgJC/TGCQAAAQBSAgEAOjAAAAEAAAAAAAsAEAAAAAIRZhNuE7cYuBjEGMUYxhjHGB0ZVBxVHHIAAgKgkAAAGldlaWF1ATYDAAA7MAAAAQAACgACAD4MAABvDgkAAAZwZGF0ZWQAAAGBHAAAAAAGZW1vdmVkAAABgBwAAAAAB25zZXJ0ZWQAAAGcHAAAAAAGeHBpcmVkAAABfxwAAADyhGtldHOEgBABCRKBYQEBoBAAABzEY3QIPAAAAbMXAAAA+nwCAGNw8o0JAAABAPIKEQAAfAYABmVuZGluZwAAASQZAAAACAwAAAHoGAAAAPICZWQBAGXyVwwAAJ0AAPIAAgBwcwEZBwAAALCAAgIABLAwEMwAAcZwcmdtCEMAAAF0EwAAAPo/AQBj8hcMAAABAPSrHAAAAQAbAAEAAAAAADswAAABAAAGAAIAEAgAAIcJBQD3CA4AANkCXgJPBCoAbQEwAQAJY3Byb3ZpZGVyAADz+hkAAGQBAQAAAAAAAaBAAAAb9GXzhAkAAAEAAQD0xQ0AAOsCNwaoBPKAhIAQAQoBAgDzaBMAAAEAAQAABHNpb24AAAGFGQAAACqHAgD2QBd/AAFuc1oqAQKgEAAAGiVzZWkA8t8ZAAABAAg4AAKgQAAAHCygUAAAHLhpcvNWDAAAnAABAPTUHAAAAQABAAEACAgAAAH5GQAAAPIEZXJlZAEAZQA7MAAAAQAACQAEAHYcAwDhHAEA6BwBAAYdAQDygAIAZ2kABGxlaWQAAAHUEgAAAPYAAIAEAqAwAAAW2qAQAAAMQGJncnRsbnbzAACDibBAFuAEbqBgAAAZ9DyKFqO+4wFAAZahCgA7MAAAAQAAJgAOAE8MAQAiEwAAnRcBAKEXAACnFwEA/hgRAB4ZAQBjGQAA0xkEAAIaAAAKGgAAYRsAAMkbAACZHAAAAQYBoAAAABjqcwGSFwAAAQQCoDAAABypoGAAABzXcHMBCBwAABODAqBQAAAZ4XJzAYACoFAAABe7oGAAABuOY3IAgAEB50AAAAmDoBAAAAw5aWEIAgAA8nITAAABAADyAW4BAGX1fgkAAAEAAQABAAEA9OgQAAABAF8CAQAABHJhY2UAADswAAABAAB8AAIA/xAAAAMXewAA8gABAHQAOzAAAAEAAC8AAQAdGy8AMoACAaAQAAAc3253Y3YFAICChaAQAAATeVPn90C9zwEIABBFAQEAAaAQAAAcNWz2kgsAAAEAAQABAFsN9gMBgAFPEV5V0/p2AANyY2UBAMAAAAAM8XM7MAAAAQAAdgACAMQJAQCiC3QAOzAAAAEAADMABQB2EwAAuxgAACwZAACEGi8AzRwAAACAAgDAAAAAGObAAAAAGOc0NvIDZGRyAQB2AXETAAAAGgkBAqAAAAAZXbAgHCAAAWFzdQD0BhEAAAEAAQABABIAAQGgYAAAG3llbQDyiRIAAAEAEoABAaFwAAAdAWtptgEAgAIEoAAAABglsFAadgABY3VhbG5yAQEAOzAAAAEAAAUAAgBRHAIA7hwCAACAAQPnQAAACA+wEA4FAAGgIAAAGn2woBw/AAFybHR48oABAWF1AYQDoEAAABuXoHAAABwroGAAABwCZW5zCAsAAAF9CQAAAdMWAAASgAEDoNAAABy+oCAAABeJsFAaTAABY2ttc/KAAQFpbwEGADswAAABAAAFAAEAGhgFAAEEAaEgAAAdAGMB7RYAAAEBAaBwAAAafW30VQwAADANcgKdAAgAAQLAAAAACA6gQAAAG2+gQAAAHOBkZXTyFwcAAAEAOjAAAAEAAAAAABEAEAAAAJAJ5g20EEQUhRe8GCAZYhkDGmYaZxrUG/wbPxxAHFYczhz0HAEEAPRiGgAAAQABAAEAE4CEsDAXpwABoFAAABuysLAcIgABkAgBAAAAAAFqAwAAASwTAAAygAECoFAAAByca2dzAAduc2Vycm9yAAAB+BkAAADyA3BsZQEAZAHDCQAAAAAFbmdrZXkAAAFwEwAAAAAKZXJpZnllcnJvcgAAAaocAAAAAAh0b3JlcGF0aAAAAcQcAAAAAAl1aWxkZXJyb3IAAAGVHAAAAPIFYWNrZXQDAGJzdgHlGAAA9dEbAADMAAEAHQABABptAQGhAAAAHQRwdAABbRMAAAADcm9yAADz9RkAAAEAAQAAAAZjb2RpbmcAAAHHGwAAAPKAAgBucgAQaXRzdHJpbmdlbmNvZGluZwAAAdkcAAAA+mYCAGJl8v0QAAABAPV0GwAAAQABAAEASAD6EgMAYWVp8hUHAAABAADmDwCAhYPmUAAAA2lIMIAAQAYBAQD1ORoAAGsBvABNAFMAE4ACsBASdQABbHIBAAGgYAAAHGli8qUJAABJEAEAAaBAAAAZPmXzYBsAAEABAQBjgAOwgBn7AAFhZHIBgAKwIBoLAAGgIAAAGg1hbxMBA6BgAAAc86BwAAAbvmRzdPbKEAAAAQC0AQEACwkBABOAArBAEzwFNGtuAARkb3duAAA7MAAAAQAACQABAJsOCQDyhhgAAO8AEoABAaBAAAAcW3RwtggAAIGIoEAAABtXsHAcEgDBoCAAAAw/oDAAABwPoDAAABwDAAAIGXEEADswAAABAAAZAAYATwMAAF4FDAB9CwAA2QwGAOYWAADwFgIAAYADoFAAABxKoGAAABktoEAAABx/Y2hwAQIA9YsOAAABAAEAAQABACOAAqAwAAARDmJwAQQAOzAAAAEAAAoAAgBUEwgA8BsBAAEFAPPFGAAAAQABAPMAAXP3rQoAAI0BTgbBBiMCSwAoAAEAAaBAAAAZHXQBMhwAAAALb3JkaXNjb3ZlcnkAAAHtHAAAAPIHc2VyZGF0YQEAZvKDGQAAAQAAAAVheXVybAAA8oEZAAABAAAACmVpdmV3aW5kb3cAAAETHAAAAPqSAgBjbAAHcmlvcml0eQAAASMZAAAAAAdvZGVpbmZvAAABgBkAAAAACW5pc3RyZWFtcwAAAf0cAAAAAAhpc3RyZWFtcwAAAfkcAAAA8oxheGNvbmN1cnJlbnQCAGJ1AARscG5zAAAB0xIAAAD2CwAAhoKgQAAAE2cBsAkQAAIAOjAAAAEAAAAAAAoAEAAAAAkICgh3CXgJeQl6CYcLxg3sECsaaRoAA2lvbgAAAVUMAAABhRkAAPIAAQBzADswAAABAAAQAAUAkRsFAE0cAQCEHAUAlhwBAL0cAAABAAGgEAAAHJxlAYELAAABBQA7MAAAAQAAMAACACwZAACEGi8A8wIBczowAAABAAAAAAAHABAAAADPDdAN+BktHDkcOhyMHI0cAQABsGAckAABZQFkGQAAAANhbWUAAAEiGQAAAFKCY2UBArCQHCQAAW5jcwEEAbCQHPgAC2UBbBkAAAAHbmRwb2ludAAA8lwbAAABAAAABGF1dGgAAAGBGwAAAAgAAADyfxsAAAEAAPKEZW5pZQIAZHMABm1zYXV0aAAAAfUbAAAAAAAAADswAAABAAAFAAIA4hgCAH0ZAgAB4RsAAPKDbmZpAgBncgAHYWxsZW5nZQAAAXUaAAAAMoACAaAgAAAb8mhvZXYAAACDgwyRp4P46LAAG7EAw6AwAAAcfhwAAAAgEjswAAABAAAIAAIAwQkBAJsLBgA6MAAAAQAAAAAACAAQAAAAxxBCE+IW4RlNG2MbZBtlG6cbMoABAqBAAAAaenJkZfKAAgBlaQAAAAABbxMAAAHOGAAA8gABAHI7MAAAAQAAIgACAPwQAACxEiEAOzAAAAEAACIAAgCRFwAATBghABKEYWxpegEBsJAcPQABZWEBAgGwsBy2ADdmOzAAAAEAAAsABAAKDgIAIxMCAIMZAQBGGgMAIoABAdAACAwAAWVhdgMAAAMDsEAY8AP2ZGl2ZXJ0ADswAAABAAAFAAEAbAMFAAEEAqBgAAAcL6AwAAAbnWNw86IXAAABAAEACC8AAPKvEgAAAQAAAAtwbXR1ZHByb2JlcwAAATMcAAAAAAVja2V0cwAAASEZAAAA8oADAGFsbwACZHAAAAE3GgAAAAAEZWxheQAAAaobAAAACAQAAAFbGwAAAAgAAAABWhsAAADygAIAaW8ACmFsbG1lbWF5YmUAAAHDHAAAAPKEaXNjb4SABIAJ8gACAGRwADowAAABAAAAAAAIABAAAADUDEIUQxTZG9obABwBHAscDBwBhgKgIAAAHM6gMAAAHN9pcAAFaW5kb3cAAAG5GAAAAAAFdHJlYW0AAPJuEwAASgUAAAVwb25zZQAAAXwZAAAACDcAAAGpGwAAAPICYXkBAGUBAhcAAAD6nwIAbHMAA2VudAAA8tkbAAABAAAAA2VjdgAA8tcbAAABAAAABnJvcHBlZAAA8mMcAAABAADyhmFja2V0cwMAZHJzABVic2VydmVkYWRkcmVzc3JlcG9ydHMAAAH4HAAAAACBdgIAwAAAABKtwAAAABKuNDYSgAEBoBAAABkkcG4AB2Fpcm5lc3MAAAF7GQAAAAgJAADy+hAAAAEAAAgTAAABNhoAAAAIEwAAAagbAAAA8oNzY28CAHJ1AApldHdvcmtkb3duAAABmxwAAAAIBAAAAcYbAAAA8gNyYW0BAGUBehkAAADyAnRhAgBnbgGsEgAAAPKAAgBhafIAiYE4wRMCAADyaAMAAKwD9NsNAAABAKMJAQCygAICsEAckAABZHRhYwEBAPNuGwAAcgDOACOCArAgGUwA2GlvABBsc2NlcnRzYW5kY29uZmlnAAABBB0AAADyBWlnbmVkAQB0AW0TAAAAAAZvbm5lY3QAAPKxFwAAAQAA8oACAGNz8oABAWZlAAJ6ZQAAASAZAAAA8gABAGkAAYYZAAAShG1lbnQBAaCwAAAc53NhAYYCoJAAABzQsOAc/gABY3IBgAKgEAAAHMugEAAAG45kbgACZXkAADswAAABAAAGAAIA9xACAP4WAwAA8gJldAEAa/KZCwAAAQAA8oABAnJvdea/AQCIhebAAAAHE6BgAAAadEUoB5gQIAA7MAAAAQAAOwARAOMHAAAgCCQAqQgDAJYLAAANEQAAhxIAAEsTAQDuFgEAchkAAHwZAAD7GQEAUBoAAFwaAQBoGgAAaBsAAJAbAABfHAAAAYUCoDAAABxloCAAABw2YnUBgAKgEAAAG6OgUAAAGxxkbgEDAUhG5OwBDGkBmRwAAAACZXMAAAHwDAAA8g4OAAABAPKAAQF0ZPKAAQJ5aWwBgQKgUAAAHQSgsAAAHHRjcAGAAqAgAAAOiqBAAAAW2WlsAQECsHAc+gABoHAAABpoZXIBvAwAAAGBArAQHHoAIIAW1AASQmVyAQMAOzAAAAEAAAUAAgDKDQIAFw4CAAhcAAABCwgAAAAACnVyYXRpbmdhZGQAAAE1GgAAAPYHAIACBrAgG4EAdHR2YmRnbG51CD8AAPMeAQAAFgIBAAHvDAAAAAANC3we+OcbzR7GOYuFIxwfLIfLcjyU2NcWjDSPu6uFbAGA1SN7dE0lGF0CnCmHzi1XdHBSi9ncHGG0jj3lUXweOwg3XUORcRd5TjML/WEuoqAwAAAMuQbpVFYUuB044eVbnSPFdnlTYgPvgYK8VhIvCe8gin0PZtjJu0rz4dWY+guC9dVWaE9jzEUoOaCQAAAaAjJhYmVoaWxtb3B0dXkwY2RmZ2tucnN2d/MAAAAAAQABADowAAABAAAAAAD/ABAAAAARARIBIAEhASIB+QH6AfsB/AH9Af4B/wEAAgECDgM4AzkDSQNWA3gD7QbuBh0HHgfgB/wH/QcQCBQIHQgeCB8IRQhnCWgJbQluCXwJhwmICYkJigmLCYwJlAmsCdgJpQqmCqcKfAt+C38LgwuEC4ULhguKC4sLjAsXDBgMQgxDDEQMRQxGDEkMZgxnDHEMtQy9DL4MvwzADMEMwgzDDMQMxQzGDMcM1gzgDOEM8AzxDPUM9gz3DPgMyA0HDggODg4PDhAOEw4UDhUOFg6lDqYOpw6oDqkOqg6rDrwQvRC+EL8QwBDTENQQ1RDWENcQ2BDbENwQ3RDeEN8Q4RC6EbsRvBHTEicTPxNRE1ITyBbJFsoWyxbMFs0WzhbPFtAW0RbSFuAW6BbpFuoW7BaBF4IXjhe4F24YbxiNGKEYtRi9GN4Y3xjqGOsY7BjvGPMY/RgVGSEZJRkqGV0ZZBloGXsZhhnSGegZ7xnzGQgaLhowGjgaOho7Gj0aPhpVGlYaGRtOG1EbeRt6G5EbkhuTG5QblRuWG5kbmhubG6AboRuxG7MbzRvOGwIcAxwHHA0cERwVHBYcJhwpHDAcMhwzHDccTRxOHFocZxx0HHUcgxyEHIUchhyHHIgciRyWHJccqxysHLMctBy1HLgcvRzHHMgczxzlHOwc8xz4HPkc/RwDHQEPAPTbHAAAAQABAAEA8wABcvMhDAAA/wGXAwEDAaBQAAAczXMBfhwAAAEBAaAgAAAQyHT1hBsAAAEAAQABAAEAE4ACoEAAABv1YXMBAISgUAAAGiKgMAAAHJugkAAAHFmgoAAAHFgcgAABsRwAAAGBAqBgAAAdArAADeUAJGF4AQgA9csZAAABAAEAAQABACOAArBQG7gBP2FyAQQA9vkbAAABAAEAtAABAEwAAQEA840LAAAKDAEAAAVyaWdpbgAAAVkbAAAAAA9vbmZpZ3VudGlsY3RybGMAAAH2HAAAAPKDaXRoAgBjbwgQAAABWBsAAAAAA29uZQAA8jMaAAABAADyhG50aWwCAGRlAANpbWUAAAFUDAAAAAACMm4AAAHvDAAAAAgFAAABfhwAAADyCmVsYXlzZXJ2ZXIBAHcBpxsAAAAABHVpbm4AAAGrEgAAAAADcm9oAAABmg4AAADyAAcBaXFyc3R1d2UBMwMAAABSgAEDoIAAABpXoBAAABKWbm1wcgEFAPPQHAAALgABAAGIAqBAAAAczKAAAAAcJmVzAYECoAAAABNgoAAAABb3ZHJDgQOgYAAAHNqgYAAAGe9jbXATgAOgUAAAG3qwIA3HA+9hZW8BDQGgQAAAHMZlAZgcAAABAwGgMAAAG/Zj8v4ZAAABAAEAAqBQAAAbyKBgAAAb92J28iUaAAB3AvOAAmRyAQUAOzAAAAEAAAgABAApEwEAeBoBAKsbAwCKHAAAAQcA9H8aAAABAAEAAQAACHN0aW1hdG9yAAAB4RgAAACWAAAAAQSgcAAAGn6gAAAAG7ugkAAAHFplYWxydvIxAwAAAQDzuQwAAM0F9AWWWQQAwc+gEAAAGgSgMAAAHQKgIAAAEql/r49tpY2gsAAAG7ag0AAAHPFz2tdJoj6gYAAAHAegIAAAGdoAAAACwFW1TQEGAQAAOjAAAAEAAAAAACAAEAAAAIEDBgcHBwgHCQcPCLsJgQuYC3USdhIgEyET4xbkFuUWTxnfGeAZshu5G7obwBvBG+Ib4xvyGzscPBySHJMcpBylHAEKAPSdHAAAAQAdAAEAAQQBoAAAABx0cwHhGQAA84ACZWkBBQGgYAAAHEliAU0ZAAABAgOgUAAAG3ugMAAAHKmgYAAAHNdjcHPyshgAAFYD84ECbHMBAQGgYAAAHGliAe4ZAAAThAOgMAAAHA+gUAAAHFtlbnUTgQKgkAAAHFxidAACYWEAAAHuDAAAABIAAQGgAAAACBVheQESBwAAABYOAACCiOcwAAAJfLAgGPsAAU8I8aYmgSk1+xWBR6AgAAAbu6AgAAASlgEgABLADwD1bwkAAAEAsgQBAAEAAQABISg13awgbTswAAABAADIAAIAlQkAAN0JxwABAwDz+hkAAGQBAQABBQD0UxMAAKUDAQABAPOAAmVpAQIA9mMcAAABAA4AAQAIAAEAQwADoEAAABtpoFAAABu2Z2hwOzAAAAEAAK0AAgBNAwAAiQOsAAEAA6BAAAAb5SGz6t/lEaAgAAATN2VsbQERGQAAAQABoHAAABwRYTswAAABAAAGAAMACgcBAJ0bAACmHAMAAQACoFAAABwXoGAAABolZnP1igsAAGIL0QFzAwMAIwACoDAAABt8cHMBAQgAABOAAqAgAAAM2GVsAQACsFAZZgABoBAAABppY2XyfgsAAAEAIwACsBAOhAABaXMB2hgAAAEEAqAgAAAaOKAwAAAbYWJoAYMXAAAABnVpbGRlcgAAAVEZAAAA8gJlcgEAYgHACQAAANYAAIABBKAQAAATT6DAAAAc9XQzZ3BzdskAgMHMZ7vuJInLebe73US+oHAAABkrYS40E8OaLkZiRzJGRDpgTS7KAAAABIAirjoBgAKgUAAAHIugAAAADeRjdAECAPdeEwAAAQAXBwEA7wABAGUBI4ACoEAAABwyZXIBBQD0fxoAAAEAAQABAAEDAPP1GQAAAQABACOAA6BgAAAbx6AgAAANxm5ycwECADswAAABAAAGAAIA9xACAP4WAwAAC2tlbmxpZmV0aW1lAAABYhwAAAAigAIA5nAAABKqYW8IDQAAAWwTAAAA8gACAGV0AXsJAAAAEoABAaDgAAAc8nlhAA5yZWNvbm5lY3Rpb25pZAAAAWEcAAAA8gACAWlyawDymQsAAAEAAYICoJAAABzQsOAc/gABY3IAAmx0AAGwABDXAAFz9LwJAAABAAEAAQAB/RkAAAAFaWN0ZWQAAAFrEwAAAAAFcnRpbmcAAPNoEwAAAQABAAAygAIBoBAAABv4YXJ1AAZhbmRsZXIAAAF0GgAAAPIEb25zZQEAaAD3SxMAAAEAJgYKAOAAAQALAAg6AAAB9hAAAAAACnNlcnZlcmNlcnQAAAHyGwAAAAAAAAGgYAAAHEli8gAOAACZADswAAABAAALAAUAkxcBAPQYBgBNGQAAxBsAANsbAAAAA29zdAAA8h4ZAAABAAAICQAAAeAYAAAAAANvdGgAAPKvFwAAAQAA8gCFgJIAAzswAAABAAAOAAIAUQwCAOIMCwAA8oJsdgIAZWkABHJlYW0AAAEdGQAAAPIAAQB0AAEyHAAACAMAAAFnEwAAAPIAAgBlczswAAABAAAFAAIACQgBAHcJAwABKxoAABKAAQGgcAAAGnp0cvYFAACFgxlc/coL3hgoxjy16xDADIAEAgDyoRsAAGwAAQIBsFAb3QBvYwFaGQAACAkAAAH0GQAAABpwAQFhhi/ai9hoc/JPDAAAAQA7MAAAAQAAFgAFAJ0XAQChFwAA/hgRAAIaAAAKGgAA8oJ1ZQEBc24BhISgYAAAHH+gcAAAHJygYAAAHICgYAAAHIEQAQkTgAKgEAAAHMRjdAAHbnRlcnZhbAAAARIcAAAB0xwAAAg0AAABVxsAAADyhWJsaXNoAgBkaQADdWxsAAABHBkAAADyAAEAZgHhDAAA8vgcAAALAAACZW4AAAGpEgAAADICcnQCAaBgAAAbemdzbfK7CQAA3QHz4xYAAAEAAQDygAIBb3VhABByZGVyaW5ndGhyZXNob2xkAAABYBwAAAAIYgAAAaYbAAAAGsUBAYAcgAMgDm5kCAwAAAHFGwAAAPIFb2RlaWQBAGXyMRoAAAEA8iIcAAABAAAIYWxpZGF0ZWQAAAHCHAAAAPIGZGRyZXNzAQB2ATAaAAAA+oQCAGFu8oFvAgB0dgAHZXNvbHZlcgAAAcQbAAAA8gABAHIB9RAAAAAaswEBoFAAABzxZ3TyAmFkAQBpAZcLAAAAAQEBoDAAABx+dwGnGwAAE4ICsKAckAABZWkTAAKgUAAAHNdldAG4HAAAAAlhcnNlZXJyb3IAAPLwGwAAAQAA8gJybAEAcDswAAABAAAJAAIA/Q0CAKISBgA7MAAAAQAACwADAIEZAQBAGgUAWBoDAAACc2cAAPJ9GwAAAQAAAARhdGNoAAAB2BwAAADyB2F0YWdyYW0BAGIBahwAAADyh29jbGllbnQCAGRtAAVvbmZpZwAAAXMaAAAAEoN1aWMBAbAwHKQAAWNwAAtvY29sdmVyc2lvbgAAAZQcAAAAAAVlcGF0aAAAAXwbAAAAOo0CAaAAAAAcqWJ0ZAACdGgAAAFkEwAAAPKAAgBhcgADbmx5AAAB9BAAAAAAA29kZQAA8vIQAAABAPVtHAAAAQABAAEAAQAAAmRlAADz8BAAAAEADAYB/RsAAAAFdHJpY3MAAPLeGAAAAQAAAAFwAAD0+w0AAAEApAQBAPLPGwAAAQBygAMBsBAbagABYWVvcwhJAAAB8xkAAAAShWF0ZW5jAgDAAAAAGXlpeQEFAPW1GwAABwABAAUAAQAAB2VjaGFuZ2UAAAHWGwAAAPqJAQFtcwGBAqBAAAAceqBgAAAcsmFyAAJpZwAA8q4XAABtAQD6lwEBZm4SgAECsIAc/gABoEAAABt7b2Vs9j8BAXnKwwlp04TjVaBAAAAbqQAhfgYABgAB9AcIAAABAG0BAQA6MAAAAQAAAAAACQAQAAAA2BbrFgIXshhTG1QbpRuoG6obCBzygAIAYW8BAgA7MAAAAQAArQACAMkNAAC9EawAAAJzZQABoAAAABvfZAGWCwAAAAGHAqAAAAAcXaAAAAAcXjQ2E4ICoEAAABtTYXIAA25jZQAAAZ8SAAAA8oFyAQFlcrIAAgKgEAAAGStldWltADswAAABAADGAQgA3QcAAOYHAACtCLIA2QkDAD0MAAAlDkkAbxIFAGYVvAAIbgAA8mYTAABRBQAAC3JvZGF0YWdyYW1zAAABERwAAAAIJQAA8+0QAAABAAEAAAhkAAABLxoAAAAILwAAAaUbAAAACDwAAAFWGwAAAAgAAAABVRsAAADygAIAaW8AB2FkZGlzY28AAAEFHQAAAPp5AQBiAcEcAAAAAARhcnNlAAABXxwAAAAIXwAAARAcAAAA+qYCAGtw+uuFgAaACQgIAAABVBsAAAAAgnB2AgDAAAAAGizAAAAAGi00NgAEcmFtcwAAAS4aAAAA+usDAGdpcvKAAgBhafIAhIBYAAIAOjAAAAEAAAAAAAkAEAAAAAQRBRFAFEEU1xvYG/4b/xsJHAocAAN5cGUAAAFlEwAAAAhmAAAB7BAAAAAyAWQCAaAwAAAZVHN0ZAG6CQAA9WoaAAABAAEAAQABAACEZWN0aQEBwAAAABkaoDAAABxhbm8SgAEBoCAAABezbmbygAIAbnIABWluZG93AAABKhoAAPITHAAAbwAIewAAAQMdAAAAAARlc2V0AAABKxoAAADyAAEAcgABdhkAAHKDaXZlAwGgkAAAHPRkb3dicoADAQx5KmvzcmVvdnQAAm9uAAD0kgsAAAEAAQABAPLwGAAA9gMACG5vcmRlcmVkAAABKRoAAAAIGAAAAfIZAAAA8gRvZW5kAQBlAbYYAAAACAEAAAHxGQAAAPIDYWN0AQBlAfwWAAAAAANyb3IAAPLqEAAAAQAA8oACAHJ4CDYAAPLdGAAAmwAAAARodW5rAQDAAAAAGLVzAfsWAAAAAAJ1ZgAAAU4MAAAAAAhibGVlcnJvcgAAAVAZAAAA9gcAAIeBsAAW8wABHwAMAABA8mcDAACqA/SzEAAA5gEBAEwJNgAAgAIDoDAAABvcFoyQqx6soFAAABgjZHNjbXT2PxsAysehAAAAHNkVOVoLHKtzw4Zqit5ACXYDgIaIIAA7MAAAAQAAJwAOAI0JAQCjCQAAgAsAAHUMDAD9EAEAAREAAAoRAABDEwAAhhcAAHwYCQDqGQAAdBsDAL8bAAAOHAAAAQUA81EZAAD4AiAAAYACoCAAABi+sAAY+wABdXgAA3RlcwAAAeAMAAAA8oABAnlvdQEAAqBQAAAaTqAgAAAcvm9wAbURAAABgAFdiyO8nCBzAQEBsFAcqwABc/JiDAAAAQABAgA7MAAAAQAACAAEAOINAAAtEwAAGhgFANMYAAABAQDz4w0AAO8KAgABAQKgMAAAGWOgEAAAHM9obfTRDQAASQBxBLEHI4ACoEAAABo1bm8IHgAAAXcZAAAACDoAAAFyGgAAADIEaW1pdAIBQYxYxBEdY2llAPJPGgAADQLyAAEAbADzfg4AAAEA/g3ygAECZWlvVg0AAIGIoCAAAAzuXh6ZWhzRVu/x93j/oAAAAAgVAAAED7BAAPISBwAAGhUAAMfQdP16bqqLP8PdyezqO4WEUt7mV2HRjJFhLJwl4xWXASaiCxxMCFaF21K3QQ/CTnp8J2yOjA0GXRaZEh87T2LYF7NjdW1wqq2iBm0RdXStDkGZwE/zMNh3aDCKBi5DvaZEEWejGjssR39LxBexRywRe/HeSFuLsd6JNHKg85hVSn4Xk0d4e/f8irbzwASQBgB7L3kAOzAAAAEAAB8CkwAKAAAASAC9ABABAAD4AQAANgMAAGwDBQB5AwIA6QYBAOkHEgBvCQEApQkAAKkJAACtCQAAwAkCAJsLBgAqDAQANQwAAD4MAABkDAAAaAwIANcMAAD8DAAAzQ0DAN8NAgDjDQAA5w0AAOoNAgAADgAADQ4AABEOAAAiDgIAbw4JAJkOAACxEAEAthABAMEQAQDHEAEAzhAEAOoQAQDtEAIA+hABAAMRAAAOEQAAsBEEAHgSBACBEgEAhRIAAI0SAgCeEgAAOBMBADwTAABCEwAAVBMIAF4TAQBnEwAAbBMAAG8TAABxEwIAdxMAANQWAgDbFgEA4RYBAPcWAACHFwEAihcBAI8XAQCTFwEApRcBAKkXBAC0FwMAcBgAAI4YEQDIGAQAzhgAANIYAADUGAAA4BgBAOgYAAD0GAYAFxkBACcZAgAuGQAAMBkIADoZAwBNGQEAUBkBAGwZAADQGQAA2xkBAOEZBgDpGQAA7hkAAPAZAgD0GQYA/hkBAAUaAAAPGgAAHhoCACgaAABKGgMAURoDAFcaAABiGgMAbxoAAHQaAAB2GgEAehoAABwbAABNGwAAWBsAAF4bAQBiGwUAbhsBAHgbAACNGwAAlxsAAKcbAACpGwAAtBsAAMQbAgDIGwAA2xsAAN4bAADgGwAA5BsBAOcbAQDwGwEA8xsBABkcAAAfHAAALRwAADkcAQA9HAEAQRwAAEgcAQBPHAAAaRwAAGscAACMHAMAlRwAAKocAACuHAAAvhwAAMUcAQDMHAAA8hwAAAEdAAABBQA7MAAAAQAAnQACAD0TAQAmFpsACCwAAaBAAAAbnHA7MAAAAQAABgACAAIIBABzCQEAAasSAAAABHBhd24AAPLoEAAAAQAAAARuZmlnAAD0YhMAAAEAUAUBAAFzGgAAAARpZW50AAABYRMAAADygAIAbG8AB2luZGFkZHIAAAEoGgAAAAAFZWFzb24AAAHmHAAAAAg7AAAByxwAAADyhGxvc2UCAGNy8gNpc2MBAGMAARgcAADyA2RkcgEAZAGeEgAAAPYAAAAEAbAwHKQAAWFiY3Nw9QwHAAABAAEAAQABAADygAIBY252EoABAqCQAAAcDhGFf3jcQmlhZQijAgDAAAAADEzAAAAADE00NgAJbG9jYWxwb3J0AAABTxkAAAD6IAIANGkBHQEAAADyAAIAYXUAOzAAAAEAADoAAwAFAAAADQA4AOAQAAABgAKgUAAAGe+wgBwwAANldAEDAbBQHKsAAXPyYgwAAAEAI4ADoMAAABxmoDAAABtpYXJ1AQADoCAAABo4oDAAABthoIAAABxcYmhy8rgJAADLDSQAAAFogIWgQAAAG1fVsHAcEgDBoDAAABwPoFAAABxbGCEIOzAAAAEAAAYAAQDZDAYAAeYWAAAIGAAAAfAZAAAA+iwBAGX05BAAAAEAAQABAPJyGwAAAQDyAAEAa/SOCwAAAQABAAEAAPKCbGkCAGNzUoABAqAQAAAOhmJydAADbmVkAAABjQsAAPKXFwAAAQAIUwAA85sSAAABAAEAAAgAAADycBoAAAEAAAALc3NlcnZlcm5hbWUAAPLJHAAAAQAAAAhyZ2V0cG9ydAAA8pIcAAABAADygAIAYWzyhm52YWxpZAIAdHUAB29zdG5hbWUAAAEnGgAAAAAGcm9tZW52AAABJhoAAAAADG52YWxpZHN0YXR1cwAA8sccAAABAADyBm9ubmVjdAEAafLbGAAAAQAA+saFgKQBCAAFbmFuY2UAAPRTEwAApQMBAAEAAPCAAQEA4WVpAAdvbGF0aW9uAAAB7xsAAAASgAEBoFAAAByUaWUIdQAAAW8aAAAB5BsAADICb2wCArDgHPoAAaAAAAAY6mh2bXP0+Q0AAAEAnQABAAGSFwAAGk4CANAAC4sAAWNzAAGcGwAAAAAAAPIKBwAAAQD1nRsAAAkBAQABAAEAAAJlbQAAAdgMAAAAAAZ0YXJ0ZWQAAAElGgAAABIAAQGgUAAAHBdzZgGKCwAA9OwWAADRAXMDAwASAAEBoDAAABt8c3ABAQgAAADygAIAZWzygMXAgAIAKgEFAaBAAAAca2XygxsAAJEAAAVleWRlcgAAAU4ZAAAA8gNhdGUBAGsBSwwAAAAABHJpdHkAAAGWDgAAASMZAAAIfAAA8nEJAAABAAHMGwAA8oADAW5vdm0BAAOgkAAAHM+gQAAAHC2gYAAAHHVkZXMBaBkAAPMEAXPynRcAAAEAAYIDsJAc/gABoHAAABu1oDAAABxtY2huCEEAAAFTGwAAAACHZGRyZXNzdgIAwAAAABxdwAAAABxeNDbyhHJyZWQCAGFyEoABAaAQAAAZK2Vp8oABAmZscfYAAIAEAaAAAAAMIWVpb3V4AAV0Y2FyZAAA8vcNAAABAAABAAGgMAAAGRxm8+EMAAAXEAsAAYACoFAAABvIoGAAABv3YnYTgAI7TnXnd2RkcgEFADswAAABAAAGAAMAeBoBAKsbAwCKHAAACPICAMAAAAATYMAAAAAW92RyAAZldHJpY3MAAAHvGQAAADrfAgGgYAAAHNptcGMSgAEBoFAAABt6YWXeCAAHgYigEAAAGgSgIAAAEqkn4+0/gGQ4J4Wf49GgYAAAHAcAEABVhAr0BgcAAAEAAQABADowAAABAAAAAAATABAAAAC7CZgLIBMhE+MW5BblFk8ZuRu6G8AbwRviG+MbOxw8HJIckxykHKUcAQEBoGAAABp0aPdLEwAAAQAmBgoA4AABAAsAAAdlY2VpdmVkAAABdhkAAADyAAEAcvRjAwAAAQABAAEA9K8SAAABAKYIBQBSgAECoDAAABsZZ2VzAARyaXRlAADy9RYAAAEAAAAGcGRhdGVkAAABGRkAAAAAB2h1dGRvd24AAAF1GQAAAAADZWFkAQDQABbzAAF58pkSAAABAAAAA2V4dAAA8pcSAAABAPKHGQAAAQAABGx1c2gAAPPwFgAAAQABAAAILgAA8u4WAAABAADyAIeAJCAbOzAAAAEAAAkAAgBiAwAA/QYIADswAAABAAAGAAEAqBAGAAACeHQAAAHjEAAAAPICY3kBAGUBuQkAAADygAIAaWwAA2JsZQAAAeIQAAAAEgJudAIC5yAAAAzXoGAAABpWoHAAABtuYWVtcwA7MAAAAQAABwADANcNAgAbDgIAXBsBAPYBAIAFAaBAAAAaTmlsbnJzcAgnAAABlhIAAAAABnVpbGRlcgAAAUkcAAAA8gVvbHZlcgEAYgFNGQAAAAAFbGllbnQAAAF7GwAAABICYXkBAqAwAAAcqaBgAAAc12NwcwGyGAAAAQgcAAD6lAIAbHMACXJhdGVsaW1pdAAAAVwcAAAAAAVwZGF0ZQAAAVscAAAAAANvb3AAAAEPHAAAAAgHAAABaRwAAAD6bQEAYgHuGQAAAPKEbGlzaAMAZW518oF1AgBidAg5AADyXhMAAAEAAPYAAANhcnIEAh+1IWj1pqAgAAAbu2VwcnVzdPJvCQAAAQAAAQIA8zsMAAABAEMQAQABsIAceAABc/OKGAAAAQABAAEDAbCAHOEAAXPynhsAAAEAEwACsIAcdgABaXPzhxgAAAEAAQDzgQI0NgELAUhG5OwBDGkBmRwAAAGAArCgHIwAAaBgAAAboGR0AAZyYWNrZXIAAPKtFwAAawEAsgABA7BwG6EAbHRhZnb1XgMAAAEAAQABAJsD9YIOAAABABAAwgwFAPIAAQBnARwBAADyEQgAAGgL0oABA7AADoQAAW5kcHIBAAKwEAm2Ax+wIAxIAk1idQH6BgAAAQEAOzAAAAEAAMYAAgDKCQAA/QzFAAEAAaBAAAAY6GU6MAAAAQAAAAAACAAQAAAAVwz0DGATYxxkHHIccxx7HHwcABJvbmdlc3Rpb250aHJlc2hvbGQAAAEAHQAAAPIFc3RlbnQBAGMB7RYAAAASgAEBoEAAABuOaWUWAAAAAQSgQAAAGL6gIAAADglbQ7IQa7GwkBp2AAFzYmhydgDy9xYAAMcFAQIAOzAAAAEAAAUAAQDiGQUAAAdkZW50aXR5AAABdBkAAAD6CAEBaXIAAcgbAAC2AwAAgoUNI8MfGFegAAAAGggQAAEMIQIAOjAAAAEAAAAAAA4AEAAAAMkQuRFlE8QWxRbGFscW2BnaGXAbcRuJG4obJxwoHAAFcm9iZXMAAAHsFgAAAAAIdmFpbGFibGUAAAFzGQAAAPKAAgBhcBKAAQOggAAAHNCgUAAAHNqgQAAAE0FwZWhvAQQA85sXAAABAHYBAQEBsEATcgABZTswAAABAAAIAAMAfgkEAOgQAQBIEwEAAQQAOzAAAAEAAHwAAgD/EAAAAxd7APMAAXQ7MAAAAQAALwABAB0bLwABAgDzqQkAANgIAQABAgA7MAAAAQAAvAABAGYVvAABAgA7MAAAAQAAvAABAKkUvAAAA2F0cwAAAeEQAAAAAAdsZWN0aW9uAADyTBkAANgAAPKAAgBldAALdHZhcmlhbmNlbXMAAAFaHAAAAAAGc3BvbnNlAAABchkAAADygAIAZXQAC3VhbGl0eXNjb3JlAAABDhwAAAAACm5nZmFpbHVyZXMAAAENHAAAAAAMY2tldGxvc3NyYXRlAAABfRwAAADygAIAYWkADWFya2Vkb3V0ZGF0ZWQAAAFZHAAAAAAMYWlsdXJlcmVzZXRzAAABMhwAAAAABWxlbmdlAAABIxoAAAASgmhhAQGgMAAAHFhsbghhAAABSgwAAADyAMjAgAnkAfJdAwAAngP0ZBMAAIkGjwFIAdIAAQOgIAAAELpoZW1yADswAAABAAC+AAMAmQkAALAKvACZFwAAAQAAOzAAAAEAAAwAAQB1DAwAAYQCoEAAABzMoAAAABwmZXMjgAKgIAAAEy1ibQEAAPTPFgAAAQABAAEAAAJyZAAAAV0TAAAAAAJtcAAAOzAAAAEAAA8AAQCiGA8AAFKCYWwDAOcQAAAQ4GNlb/KAAQFpcwEHAPRiGgAAAQABAAEACBcAADswAAABAAAIAAEAVBMIAPLwGwAAAQDyAAEAZQDz+xkAAAEAYwLygAEBZWnygAICc3RhZQECAPMFHAAAAQDMAAAIaHJlc2hvbGQAAAGkGwAAAB4AAHcBBKCQAAAclaBwAAAcfSn/34NIcaCgAAAcqnRibHN2ADowAAABAAAAAAALABAAAACVF5YX5RjRG0IcQxxEHEUcnRyeHLscvBxSgAECoAAAABzfa2Vp9hoAgMPGoLAAABwusHAZcwDMAAGAAgACClj2jwQAyMygcAAAGg9ZpsLr1QGwUBjYAAGgUAAAG7Y/OnFqail3e+3PlTIUBclK1aENIJe/TQ0IWTAsAvkwtKZeZS1ARZEEgDouCwA7MAAAAQAAsAEfAAwAAAAMAQAAGAEAAB8BAAAjAQEA5QEPAA0DAAAYAwAAPAMBAE0DAAB3AwAAiQOsAGsFBAAZBwAAHwe8AD8MAAC4DAAA6A0BAPsNAQCQDgAAlA4AALURAACgEgEAohgPANoYAAAvGgAANhoBABobAQCYGwAAzxsBAA8cAAABAgDzHgwAAAEAAQABAAGwIBDMAAFyAYILAAABgAI5mJBLFC+wMA3nCahucgGAArAAE1ADiaAwAAAN5WRyAYQCsAAaPQABsDAbiQABc3QBAQA7MAAAAQAAYwACAF0MAACsDmIAAAZkZHJlc3MAAPJREwAAAQAAdgAAAAEEsIAbiwABoHAAABliYWVmaGwAOzAAAAEAAA4ABgBhDAAAmw4JAIYYAAB1GQAAKhwAAJscAABWAAAAAQWgsAAAG+UhKDXdrCCgUAAAHL6gMAAAE3luY2VtcnMAOzAAAAEAAM8ACQDcBwAAlQkAAN0JxwAoDAAAuRgAABAaAAAqGgAAExwAAIIcAAABAgGgAAAADPFzOzAAAAEAAKoABwDECQEAogt0AHYTAAC7GAAALBkAAIQaLwDNHAAAAQEA8y8aAAAHAAEAAAJ1dAAAAbgJAAAAEgABA6BAAAAcWRbwWyY6fKAAAAAOpXBkZXMAOjAAAAEAAAAAAAkAEAAAAFgMWQxaDFsMXAz7DAIOoBcYG6IbVgQAgAEHoBAAABNPKzAReLh6HAs6BcJnPZMzVHueoMAAABz1dDNkZ25wcnMBBAGgUAAAGk5vAbURAAABBQGgQAAAG8Vl9DEaAAABAPABAQABBgGggAAAHMJ2ATAaAADzgAJhbgEKAPVqGgAAAQABAAEAAQABAAOgcAAAGjygQAAAE1CgMAAAF4VkbHP12xwAAAEAAQABAAIA84ACbG4AA2VudAAA8gscAAABAAAAA2VjdgAA8gkcAAABAAAABnJvcHBlZAAA8nscAAABAADyhmFja2V0cwMAZHJz+hoBAHAAAY0bAADyAAEAZQDyrxcAAAEAdgQAAIGHoEAAABwrexdYxLKysDAOggABsIAaOgABgAAAMcAiAAELAwAAAQAA9IQSAABNB+cBPwEBBQD2+RsAAAEAAQC0AAEATAABBAA7MAAAAQAAMAACACwZAACEGi8A8wABbwF8CwAAAQIBISg13awgbTswAAABAADIAAIAlQkAAN0JxwABAgGgIAAAEMh09YQbAAABAAEAAQABAAEAA6BQAAAaIqAwAAAcm6CgAAAcWGNkcAGxHAAAAQEA88IWAAABADMFE4ACoDAAABeZZG0BhwKgQAAAHCygUAAAHLhpcvOAAmVvAQsA8xkcAAA2ALIAE4ACsAAOlgqNaHkBBQDz1BwAAAEAAQDyAAABdAHWDAAAABICaW4BAS+QiloqNXNwAPKgGAAAuQLygAEBZ3QBAQGgMAAAG+ZyASkaAAAIbQABoIAAABxgdAH2DQAAAPqCAQFpZRYAAAABBKAwAAAZVLBwHLYAN6AgAAAQ7KAwAAATZWVkaXN0ARsBAAA7MAAAAQAABgADALoJAABdEwAAahoEAHa1AQCCiwtfK90oy6CQAAAby6AQAAAQuykLUUYEwggBABQ8TzswAAABAAC+AAIACgAAAEgAvQA7MAAAAQAAnwBEAOkHEgD8DAAAzw0BAOMNAADnDQAADQ4AALEQAQC2EAEAwRABAM4QAgDqEAEA7RACAPoQAQADEQAAhRIAAFQTCABeEwEAZxMAAGwTAAByEwEAdxMAAIcXAQCPFwEApRcBALQXAwDIGAQA0hgAANQYAADgGAEA6BgAADAZCAA6GQMAUBkAANsZAQDiGQUA6RkAAPAZAgD1GQQA/hkBAFEaAwBXGgAAYhoDAHYaAQB6GgAAWBsAAGYbAQBuGwEAeBsAAJcbAACpGwAAtBsAAMUbAQDgGwAA5RsAAOcbAQDwGwEA8xsBAC0cAAA5HAEAPRwBAEEcAABrHAAAjBwDAJUcAACqHAAArhwAAMUcAQDMHAAAAQIBoEAAABjoZTowAAABAAAAAAAHABAAAABXDPQMYxxkHHIccxx7HHwcAYUDsGAccgABsDAb/gABsDAcAAABZHJzAQABsEAcOQABZQHOGwAAAAAAAAFJDAAAAdIZAAD6ewEAcwG3CQAAAU4aAADyAAEBaXPyGQEAAAEAAAACbmkAAPJIDAAATQIAKm4CAPaQCbYDH2J1AfoGAAAAdhAAAIKJoEAAABtpoFAAABu2sCAbVQAFsPAcnQABsCAbVgAFoGAAABkkoFAAABbmEAAEwcUKADswAAABAACvAAQATQMAAIkDrAAZBwAADxwAAAEFADswAAABAAAFAAIAJxkCAB4aAgATgAKgUAAAHOdkZgEBAaCQAAAcxWzzzRgAAAgDjAABggKgEAAAHEugsAAAHPNscxOAAqAgAAAZY2FpAQABoIAAABu2cgGOGwAAAYICoAAAABuPoAAAABpVZXMAAAEC50AAAAzUoGAAABp0oFAAABvgbmhsAPdLEwAAAQAmBgoA4AABAAsA8gABAWV0APJJDAAAiQ0BgAKwUByyAA6xABzdAAFleCOAArBAHHoAIGFyAYEBKVNkfN4NdAACZGUAAAHTDAAAAFYBAAABBaBAAAAbyaBAAAAbyqAwAAARuW9iZWxzdADyhAMAAJ8UAAd1dXBkYXRlAAABcRkAAAASgAECoGAAABp9oAAAABzPdGlzAQIA9dMZAAABAAEAAQABAAhKAAAB6xYAAADyAAEAcgDy9BAAAEELAAJuZQAAAYkLAAAA8oACAWl5bwEDAaAAAAAbzXMBMRwAAAEHADswAAABAABjAAIALxkAALUaYgABAwA7MAAAAQAABgADAFEaAwC0GwAAPRwBAAEDADswAAABAABiAAEARhRiAAECADswAAABAABdAAIAuBEAALwXXAAABGFja3MAAAGhGAAAABKAAQGgEAAAGxlkdLYNAAABB7AAGWYAAbBAEQoGfG5iZGlyc3R2ADswAAABAABrAAgAXAMAAOIHAABGCGIA0g0AANoNAADwDQEADRoAADMaAQABhQNR80ZtxLSggAAAHBqwkBzlABhiZHUBAwGwABtsAEtk81AaAAAYASgAAAZlY3RpbmcAAPRtGQAAAQABAAEAAAALZXN0aW9uZXZlbnQAAAExHAAAADqHAgGg0AAAHPdnbnTygAECb2x1AIABAeawAAALiKBQAAAcg2Ns9pcDAIeKoLAAABy5NVLjG09xHed3TpV9oGAAABvfcsMSytZBoGAAABNPFTgC6kGFADswAAABAABEABQAtwkAAK4KAQCSCwMAVQwAANENAAAaDgAAixIAAC8TBwAjFgIAJxgkAPAYAABMGQAAhRkAACQaAAA8GgAAThoAAO8bAAD3GwAAlBwAAOYcAAABBAA7MAAAAQAACgACAEMTAAB8GAkACBUAAAGHCwAAABKAAQGgMAAAHOdzbPKAAQFmdQEDADswAAABAAAFAAEApg4FAAGBAqAAAAASfaAAAAASfjQ2AYACoCAAABwQoEAAABxfa3DzgAJkbAAJZXJ2ZWRhZGRyAAGwkBz4AAtlAWwZAAAANgQAgIGGLqRd1O3QoHAAABkmoCAAAAzYLk/FyRRjAAACEQlIAAAIEF5PEUGjvz5rXeq+AB1k+keqXWurTlPCSy2DpYHobVVmhfyKBXcgxae/aFCT0Ip+n6AwAAAShk6T+SrAVAfEPI/RZmF7qqAEGyA5/6S1CQLTMKse/We77iSJyzeQxmx5EUE3IslouW/JDe7RKnV2IXY0vTGlLXoOmmCENCCAV2JYTSyMhF5vuBSwVXvbWuaBVGJmbnBydHV3MGFjZGVnaGlrbG1vc3Z4egA7MAAAAQAACwIUAAgAAQBQAwAAHAbFAGAJAQBwCwMAYAwAAPINAgDiD8UAkBIFAEYUYgCNFwAAvxgAAFwZAABlGQAAgBkAANkZAAAJGgAAnBsAAKYbAAAFHQAAAQAA9AoBAAABAD8CPwsBCAGgMAAAHH53AacbAAAjgQKgQAAAG99mbAGCAqCAAAAcGKAQAAASq2NuAQEBoFAAABlxdQHIDAAAg4CEoEAAABKEoGAAABp9oAAAABzPEAEGAQQBoGAAABzzc/KLGwAAAQAjggKgEAAAHEtscxOAAqAgAAAZY2FpAYADoKAAABy5sAAJtgMfoDAAABvJZWl1AYICsDAaMwABoEAAABtYZGUjgAKwAAxIAk1pdAEBAPOuCQAAAQABAAAGZW1vdmVkAAABshwAAAAABGRkZWQAAAF6HAAAAPKJZWxheWNvbm5zAgBhcgAFYWJlbHMAADswAAABAAAHAAIA2xAEAOgWAgAACAMAAAHAHAAAAAgDAAABmhwAAADyimlyZWN0Y29ubnMCAGFy8oADAGRscgAFbGFibGUAAAH1DQAAAPYAAIACA6CQAAAbaWxtYW5wEQECfbCAG4sAAWZoAWEMAAAACWlhYmxlcGF0aAAAAe0ZAAAAAAppcm9ocmVjb3JkAAD1ahoAAAEAAQABAAEAAAAFbG93ZWQAAAFQEwAAAPKAAgBsbhKAAQGgQAAAHCthZgAQZXJ2aWNlY29uZmlndXJlZAAA8iQcAAABAAAAA2x0cwAA8tcQAAABAAAABG9uc2UAAPJLEwAAAQAA8oACAHB1ABFheXNlcnZpY2VzZW5hYmxlZAAA8pAcAAABAADyAAIAbHMAAYALAAASgAEBoEAAABopZWQABnVibGlzaAAAAeYWAAAAAAZlcm91MzIAAAFPEwAAACKAAgDAAAAAA1xlegAIb2NhbGFkZHIAAPSpFwAAAQABAAEAAAgrAAAB5w0AAAABgQJOZ6/GvbdjGlg8apxkaQAFaWNrZXQAAPJNEwAAAQAACGkAAAHnFgAAAAAHaXJlY3RseQAAAb8cAAAA8ghvbnRhY3RlZAEAZAFSGwAAAPIAAgBjdPJtCQAAAQAAAAVyaWdpbgACL5CKWio1ATtEwem3cHMBoBgAAAAAAmFwAAABlA4AAAAAAmZvAAA7MAAAAQAACAACAPINAgCQEgUA9VwZAAAJABsAiQCdAQCAAQH3QBDZAAGgMAAAG8V4cvIAAQBlOzAAAAEAAA4AAgCxCQQAyQwJAPVxGAAAwAEBAPABAQDygAIAZG4AA29uZQAA8vANAAABAAAAA2F0YQAA8+0NAAABAAEAAa8bAAAAA2RkcgACsEAbZgABoJAAABzNZXc7MAAAAQAABQACAOoNAgCNEgIAOzAAAAEAAAgABACKFwEAJxkCAB4aAgBiGwAA+laIgUlRBgIAAAH5BgAAOzAAAAEAAAsABQDTDAAAgA4BAPIQAQBfGQEAbRwEAAg0AAD00xAAAAEAAQABAAD2PwGAysOgUAAAHOegEAAAHA9ABqoLAAgQEAGAAqAAAAAZe7AwEQoGfHN0AQIAOzAAAAEAAA0ABgCxEAEAzhACAHITAQBRGgMAtBsAAD0cAQAjAAKwIA5+AAFhcvXWFgAAdAMBAAEAAQABgAKgQAAAGKGgEAAAGxlkdAGAAqBAAAAZ7ClTZHzeDW90CDQAAAFHDAAAAPIAAQBmAPSXEgAAAQDvBgEAEoABATPovh2ajXRwAARva2VuAAABjBIAAAAAA2luZwAAAZMOAAAAAAtvbm5lY3Rpb25pZAAAAdUbAAAA8gADAGNwdDswAAABAAAWAAEAGgMWAAABBgA7MAAAAQAAYwACAC8ZAAC1GmIAAAphdGhjaGFuZ2VkAAABWBwAAAAABWhhbmdlAAABIhoAAAAyA29yawIBoDAAABybY3BkAAGxHAAACHMAAAF6GwAAAPIFZXBvcnQBAG3z4xYAAAEAAQAA8oACAXJ3b/T5AADDyQAHC2QOXuon6v4ZoHAAAByfZQ8QEmgAAAAygEuICQA7MAAAAQAAbQAKAFwDAADiBwAARghiAIkLAADSDQAA2g0AAPANAQCRDgAADRoAADMaAQABgAKgYAAAG8dIOIimud5uciMDAqEAAAAc2WJlOzAAAAEAAAYAAwD9EAEAdBsDAL8bAAABAgD0UxMAAKUDAQABAAGBAqBgAAAbv6BgAAAbb2d6AYACoMAAABy6oDAAAByDZGxTgAOgQAAAGelhZXMBggKADLf9kAGhIAAAHOdkcwAHb3N0bmFtZQAA8sIbAAABAAAasAEBsDAccAABaG4ABHJ2ZXIAAaAAAAAbsXMB4hYAAPNjGwAAAQABABKAAQGwcB0GAAFldAAEYXllcgAAOzAAAAEAABEAAQCOGBEAAAACcHAAAPLoDQAAAQAA8oACAGFs+g8CAGRzOzAAAAEAAAwAAgBZAwIA7wYJADowAAABAAAAAAAPABAAAABAEyIZQhlDGScatRu8G70bwhvDG0YcRxzJHMoc4xzkHHYWAIDCyKAQAAALiLBQE1EAAaGwAAAdAbBwF7kAAQAAhACAAwoLAAZhdGNoZXIAAAHhFgAAAAAGdGFnaW5nAAAB1xwAAAAAA3JvZAAAAakcAAAA8glrYXJycmVsYXkCAHBzAQgcAAAACAIAAPPUHAAAAQABAAAIAgAA86YcAAABAAEAAPKJb2Rlb3JpZ2luAgBwc/ICbnMCAG5w84QLAAABAAEAAPIAAgBkdwAB8hgAAAAABRQYRckM/8scK1A46Xx56w7m7UdfF0CE3q1xXdygOvYvaIkcw6Jzj7YxaiZcG2Oj0kIieHANeR0rW5um57hs547CxGotQuSP5QET9aKFkLosujTkOdcFyHTbVaJtncaZDxFrTAiThnc3Af5YW3RwSQt4nDEGCwNuYoo8SzozHOsr7DHUikJZFM3mj8I9M5+3z3agYAAAE08wYWVvdWJjZGZnaGlrbG1ucHFyc3R2d3l6ADswAAABAAC4ADoABgAAABwBAAAeAQAAAgIAABMDBAAzAwIARwMBAHwDAQCEAwAA7AYAAPoGAAAVBwEAAggEABEIAABzCQEAfgkEALcJAACuCgEAkgsDAFUMAABhDAAAZQwAAO8MAADRDQAAGg4AAJsOCQDoEAEAdxIAAIsSAQCpEgAAqxIAAC8TBwBIEwEAeRMAACMWAgAjGAAAJxgkAIYYAACgGAAA8BgAABoZAABBGQAATBkAAHUZAACFGQAAJBoAADwaAABOGgAAgxoAAB0bLwBZGwAAsBsAAO8bAAD3GwEAKhwAAJQcAACbHAAA5hwAAAECAPN7DgAAAQABAAGHAqBAAAAceqBgAAAcsmFyAQAAOzAAAAEAAEoAAgA9DAAAJQ5JAAGEAqCQAAAc9KBQAAAcgmJ384EDY2ZsAQQAOzAAAAEAAAcAAgDbEAQA6BYCABOAAqCAAAAb82FpAQcA82AbAABAAQEAAYACoEAAABohoIAAABsZaG8BAwA7MAAAAQAABgABAMgWBgBDgAOwMBzRAAegIAAAEQ5hbHkBAQGggAAAHAR1AXoOAAAAAAAAARkDAAA7MAAAAQAAOAIIAJYJAADJDQAAuRAAAL0RrAB6E8UAqRS8AFEcAgDuHAIAVgAAgAEEoBAAAA55oGAAABohoJAAABw1dDM2bXAADXNjb3Zlcnljb25maWcAAPLuGwAAaQAAEoABAbBQHDAAA2lwEgABAaBQAAAZcWR1APTIDAAAXAtUAAEAEgABArBAEnUAAbBwGxoAAXVzeAA7MAAAAQAABAEBAAUCBAEBBwDzGRwAADYAsgDzAAFlAQEOAAAAAmVkAAABAAgAAAAAC2Vtb3Rlbm9kZWlkAADyIhwAAAEAAAADb3N0AADypxcAAAEAAPqYAgBochKAAQGgQAAAGn1zbQEJAaBAAAAc4HQBVhwAABMAAqBQAAAZ6mJm9d0NAAABAKkAjwpUAAACdHUAAAHIDAAAAAAJbXVtY2hhbmdlAAABIRoAAADygAIBaW1nAAZyYXRpb24AAAGLEgAAAPYBAICEg6CQAAAcrjKnSUlL4UAgIggIBAEBAPW0FwAAAQABAAEADwQjAAKwIBj7AAFib/MiDgAAAQABABOAAqAAAAAOIHJ4AQIBoAAAAA6lczowAAABAAAAAAAIABAAAABYDFkMWgxbDFwM+wygFxgbohsBAwGgcAAAHQVi84wXAAA1BQIAE4ACoCAAABKEYW8BgAKgsAAAHEGxEBygAAFudgEEADswAAABAAARAAEAjhgRAAGAAqBQAAAZaaAwAAAcuWFyY4CEsCAN6AABoCAAAA4CAUkAAQIBIwiVx/IhZTswAAABAAAKAAUAyRAAAMQWAwBwGwEAiRsBACccAQABgQKgQAAAHMygAAAAHCZlcwg/AAABaRoAAADyBHJvdXABAHMB2hgAAAAABW9uZmlnAAABSxkAAAAIJAAAARcZAAAAcgADAbAwHDsAAWFjZ3A7MAAAAQAADwACAEIMBAC9DAoA9t4YAAABABABZwAjAQEAAAN0ZW0AAAFKEwAAAPKCaWMCAGlzNgIAgAEFoHAAABo5sGAZPwABoAAAAA4hcmVob3h5AYACoAAAABCwoAAAABM/ZXMjgQKwUB0GAAFndAEEAaAAAAAbsXP04hYAAIEEAQABAAAHZXNwb25zZQAAAWgaAAAAEgNhZ2UBAbBwHPoAAXJlAbwMAAAAsgABA7BAE3YFRXNlb3QA8j0aAAABALY1AACCiKBQAAAb1qAgAAASd0FlmVw0zAAABhx4AQA7MAAAAQAAJgASAFkDAgDvBgkAZQkBAFQMAABAEwAARRQAANUYAgAiGQAAQhkBACcaAAB7GgEAtRsAALwbAQDCGwEARhwBAGIcAADJHAEA4xwBAAGJAqBAAAAcmqBgAAAcwGFyAQIBoGAAABw0YgFPGwAACHsAAAFIHAAAAPIIaXNjb3ZlcnkBAGIBShkAAADyAXMBAGTy7QYAAAEAALKAAQOgYAAAHGduYWVpAQIBoHAAAB0FYvOMFwAANQUCAAAJbHN0aWNrZXRzAAABURsAAAAIVQAAAVAbAAAAAANpZGkAAAGjGwAAAPIAAgBidQGNGAAAAAgwAAABTxsAAADyhHJlYW0CAGRzAAJ6ZQAAAeYNAAAA8oACAGl0AAlhY2tldHNpemUAAPJmGgAAAQDyPxwAAAEAAAx4Y2VlZGVkZXJyb3IAAPKOHAAAAQAA8gVlbmd0aAEAZfJGEwAAAQAAAAZjb21pbmcAAAEWGQAAAAAJbGV0aW1lb3V0AAABohsAAADygAIAZG4AB3JhbXNpemUAAAHUGwAAAPoIAQBnAZIOAAAAAAluaXN0cmVhbXMAAAHlHAAAAf0cAAAACGlzdHJlYW1zAAAB7BwAAAASgWkBAaBgAAAc+WRz8olvbmN1cnJlbnQCAGJ1AAl1cnN0Ynl0ZXMAAAFOGwAAAAAHY2tkZWxheQAAAWsZAAAA8gCJgA+JBgEXAQAAAAGAAqAAAAATYKAAAAAW92RyAIJwdgIAwAAAABzqwAAAABzrNDbyC2FyaWVzYnlkZXN0AQBpAZkcAAAAAAdhaWx1cmVzAAABoRsAAAAABnRlbXB0cwAAAaAbAAAAEoABAbCgHIwAAXRk+u4DAGFmdvKAAQFpZRIAAQKgYAAAHNqgYAAAGe9wY23yGAEAAAACOjAAAAEAAAAAAAcAEAAAAD8M+w38DZQOoBKhEs8b0BsBAAGggAAAHPxm8sgNAABhDgEHAPP5GwAAAQABACOAAqBQAAAZ0WFv8wACZnP2LwwAAEMAAQABAAEHmQYIewAA864JAAABAAEAAPKAAQF1ZAAWZWRhbmdlcm91c2NsaWVudGNvbmZpZwAAAfUcAAAAAQMBsIAdBgABc/LjHAAAAQAIIgAAAewZAAAAEgNpbmUBAaBwAAAcn2NmAZEOAAAAOmcBAqAAAAAMtWxucwHsBgAAAYMaAAAAA2F3bgAA8kgTAAABAAAIQAAAAXkbAAAA8gJjawEAbfKJEgAAAQAA8oACAG9w+iUBAHMB/wcAAAD2IwCAhoSwEA4FAAEKRhaKnGF+A5bKYJBApSAACEX2XygAhoygMAAAGgF74XBXQl+gcAAAGgkn4wCDzwhKD5WvC5JmZ+KX1wkZAQym+IMAOzAAAAEAABwCGgBOAwAAVAMAADYEJwGbCQEAxgkBAHQLAQAZDAEAXwwAANgMAAASDgAADw/SAMwQAQACEQAAShMAAGYTAABuEwAAtxgBAMQYAwDdGAAAHRkAADkZAAB4GQAAehkAAFQcAQBoHAAAahwAAAEAA6BQAAAZSaBAAAAW66BwAAAcrmNyc/T0EAAASgj3AooAAYACoEAAABoQsDAW9QABaXIBAgGwABbzAAF58pkSAAABABOAAqAQAAAYemV0AQEA9JcSAAABAO8GAQAjgQKgQAAAHLF0eAEEAaBwAAAdBWLzjBcAADUFAgATgAKwwBz6AAFtcxOAA6AQAAATN7AQGHgAAWVzdAEAAaAgAAAY/WUBgAMAAAEQAPMZHAAANgCyAAEFAaEAAAAdBHQBbRMAAAEDAPPwFgAAAQABAGOAA7BgF7EAAWNscwEBADswAAABAAAPAAEAohgPAEMAhKBAAAAbs7AwFu4AAaAwAAAc9oAYBAH2HAAAAQEBoHAAABvmZQFdEwAAAYMCoAAAABJ9oAAAABJ+NDYAA2hleAAAAeUNAAAAEoABAbAAE1ADiXJkEgABAqCwAAAb5aAwAAATeWVjcwAB3AcAAAALcG10dWRwcm9iZXMAAAEwHAAAAAAFY2tldHMAAAEVGQAAAPKAAgBhbAAEeXRlcwAAAeAWAAAA8gACAGJwAPXTGQAAAQABAAEAAQASgAECERf8yuQ8oEAAABx9dGVzAAJ4dAAA890WAAABAAEAAAAIdGFnZ2VyZWQAAPLoHAAAAQAA8gFkAQBz8tIbAAABAAAIAQAA8gYdAAABAADyCW9tYWlubmFtZQEAc/LjHAAAAQAA8oNlYnkCAGRpEoFvAQGgUAAAHCtkdAgDAADyeBwAAAEAAPIAAQBz84oYAAABAAEAAAgAAADydhwAAAEAAAgAAADy4RwAAAEAAPIDcHY2AQBz8p4bAAABAADyAAIAaXPzhxgAAAEAAQAA+pwCADQ2AAVhaWxlZAAA8tgYAAABAAAIaAAA8qUXAAABAAGXGwAA9gEAAXAFAaBgAAAcAmVmaW50cwDyGhsAAAEAABBsaWtlZGlzY293cmFwcGVyAAABvhwAAADygWsCAHN1AQICoDAAABxloCAAABw2YnXy8RgAAEMDAAZwZGF0ZXMAAAEHHAAAAPIDb3J0AQB1AAFPGQAAAAd5Y2xvc2VkAAABSRkAAAAIQAAA9NEQAAABAAkGAQD0qRcAAAEAAQABANYAAAFsBAHnAAAADpCgYAAAHLFhaWxwbgH+BwAAAPKAAQFhawEAAaBwAAAbxHIB9RAAABOBAqBQAAAc8Wd0KhMBAucgAAAJrbAwGLwApmVpcwHrBgAA9ZcLAAAEDAEAdgHVA/YTAACFhKAAAAALggZriD5tPwVAEkIgAQABjRcAAAEAAaAgAAAZ62YBexgAABMAArAAE28FX2RyOzAAAAEAAEUABAD8EAAAsRIhAJEXAABMGCEAI4ACsJAcPQABYWUBAQGgcAAAHC5p8ooOAABQCAEAAaBQAAAcDnkBgwkAAAEAAqBQAAAZ7KBwAAAcn2Nm8okLAAAIAxOAAqBgAAAby2VrAYEBV8axgi/LdAEFAPTbHAAAAQABAAEAE4ACsDAb8wDSZHJGAAACaXQBBNAACawB16BQAAAacqAgAAAZd6BgAAAb3HNjZWlyAPSJFwAAxgJ7AZIAFskBgMHMoCAAABuCek6FD1SUNQ5AFLZFoFAAABxioNAAABy+oAAAAA6QP3lMrQgCAAAEAIAPKYsBgAKgcAAAHFChEAAAHOdkZQGAA6BwAAAbzLAgGUwA2AlcWehdDGFpb4OAhKAgAAAbsrCgHFQAAaBgAAAcKhBIBAGBArDAHJYAAaBgAAAatHJzAQQA8yAYAAABAAEA84ACY2QjgAKgsAAAG2lucghSAAABnRsAAAAABm9udGFjdAAAAS8cAAAA8gdlbmNyeXB0AgBjcPOiFwAAAQABAAASgAEBsFAXoAQCc2kBAAA7MAAAAQAAnQACAD0TAQAmFpsAAAFoAAGwwByOAAFl8qoJAAABADswAAABAAAJAAMARhMBAEUZAwAbHAMAEoABAbAAGiMAUnRl8gABAWd09RMDAAABAAEAAQABAAF3EgAA9gABAMLLJm9uxWqMoEAAABlQoNAAABvmoBAAABLUoAAAAAzYoDAAABntoAAAABDgU2SVmUqsAAAIAkBX5AEAOjAAAAEAAAAAABUAEAAAAI8JpAnDCeIN9Q3iEC0TuRe6FxoYGxgcGB0YHhgfGLoY0xhzGT8aghu2G0scAQIA8wQOAAA7CwEAAQIBoJAAABy6ZTswAAABAAAHAAMA0RABANsWAQCpFwMAAYUCoHAAABwqoIAAABxQY3MBAgGwkBvwAAFwOzAAAAEAABUABQD9DQIAohIGAIEZAQBAGgUAWBoDAAEHAaBAAAAc2GIBahwAABOHArAgG30AAWRtAYMCoFAAABpzsDAcpAABY3ABgQOgUAAAG3ygAAAAHKmgsAAAHJRiZHQjgAKgIAAAE2RhcgEDADswAAABAAAGAAIA8hABAG0cBAABAgD08BAAAAEADAYABQEBAPb7DQAAAQCkBAEALgkBAFOAhLBQGN4AAbAQG2oAARFAAgGFAqAgAAAZ86AAAAAZeWl5AYECoHAAABvWQbuqTUwPbXMBgQKwIBeuAW1WMltYP7VmbkOAA7CAHP4AAaBAAAAbe2VsbwCAAgDAAAAADEHnQAAADeRkeBIBcgEBoCAAABupZXIAOzAAAAEAABEAAQCOGBEAtrcBAMHMCWnThONVoDAAABD0MnzzOp0TAAQAAAAjfgcAOjAAAAEAAAAAABAAEAAAAAcICAh1CXYJOQzYFusWAheyGGsZUxtUG1cbpRuoG6obCBwAAAAA8roMAAABAAF5GQAAEoJuYwEBoCAAABnzeWkSgAEBoCAAABvvZWkABnBkYXRlZAAA8hMZAAABAAAABmF5bG9hZAAAARIZAAAAAAZvbnRyb2wAAAERGQAAAAAEbGl2ZQAAAdoWAAAA8oF0hIAFgAgBAQD19Q0AAMQJAQC5AcwAAQAAOzAAAAEAAAcAAgDbEAQA6BYCAPoNAAFz82oJAAABAAEAAPKAAQFlbPYTAICEhaAwAAAcg6AwAAAMOgIARgyIAQAAxNIYZ/Hw53VDAXa2U+pFVlD+VPN3OpuWp32gMAAAHJ8cQj6cKetrqTWEcVN3sQbChNJ0lBze0RewYBpvAXUNe3YFbkhFBMZUGgdwFDmIMpZfj9qEHuZMC24n1ERry2tM7k87iwwg2bUPJK+jtYMwR3HcGvcjv8EpyydRI3+1GlI2q3pMdiFARBAAgDuvXwA7MAAAAQAAXwArAAgBAAAlAQAAOgMBAEEDBQBLAwEAYgMAAH8DAAD9BggAEwcAAP4HAABqCQIArgkCAPkNAQD9DQIABQ4BAIYOAACIDgAAlw4BAKgQBgCDEgAAlhIAAJsSAgCiEgYAJhMAAEQTAQCSFwAAJhgAABEZAAAcGQAAgRkBAAQaAABAGgUAWBoDAHAaAQC7GwAAEhwAACAcAQAuHAAAmBwAANMcAADbHAMA4BwAAPEcAAABgAELr+M7Sz1wAQMAOzAAAAEAAKEAAgC1EAAADxGgACOAAqAgAAAURWlyAQACsCAURAW/oPAAABy+aWw6MAAAAQAAAAAABwAQAAAAeAOlCqYKpwqhGLUYKhmzGwGAAqCQAAAcWKDAAAAc2mFvAQMCWzNK4JlksIAbiwABZmgBYQwAAAGAA6AgAAAag6BQAAAbeaAQAAAaAGFlcwGCAqBwAAAcKqCAAAAcUGNzI4ACoEAAABi6YW8BCAGwUBvdAG9jAVoZAAABgISgMAAAGWugAAAAGgGhEAAAHQKgIAAAHJswQQABgAOwcBlSAAGwQBoiAamg4AAAHEthaG8BgQEYsPZJAMZyAYACoJAAABzQsOAc/gABY3IIDQAA81UDAAACAAEAAPKAAQFucAGAAqBgAAAZhqBQAAAc82V1AQADsFAcbABLsCATHwifoHAAABxiY2ts84wSAAC1Bm8CAApwZGF0ZWVycm9yAAABeBsAAAAAAAAAAVYDAADz/RgAABgDAQAAC2Fyc2luZ2Vycm9yAAD0YhoAAAEAAQABAAAAAm9nAAABggsAAAAADGFjaGVjYXBhY2l0eQAA8gUcAAABAAHSHAAA9gEAAIWDoCAAABlOoEAAABnwA2dUs9BqBIgKGAEAOzAAAAEAAAcAAgATAQMADwMDADowAAABAAAAAAATABAAAAApDOQQ5RDmEOcQ9xD4EPkQHxNwE/4W/xYAFwEXwhjpGHIbcxu+GxAcAA5wYWxpdmVpbnRlcnZhbAAAAS4cAAAANgUAAIKGJm0qJ0anoQAAABytsAAXrQFrdB96tkBoEABACCgHAPbKEAAAAQC0AQEACwkBAPZfBwCCjaBAAAAbjaBQAAAb+BABAK3wDwA6MAAAAQAAAAAACwAQAAAAagOAA+EHiAuJEooSLBP7FsAYaRmfHLEcAQQA9H8aAAABAAEAAQAAB2luZXJyb3IAAPPOEAAAAQABAADygAEBb2UBAAGgEAAACABlASsZAAABAAGgAAAAHPJyAdUSAAATgAKgEAAAG4JlbAEAAaBAAAAcDnP2lg4AAI0KUQCRAgEAzAABBAGgcAAAHNll8rgQAABuCPMAAXTyrAkAANcBAQQBoAAAABkqcwHAGAAAAQIBoFAAABuzYwEmEwAAAAJvcgAAAeMNAADy0hgAAAIAAAJsZQAAAeINAAA7MAAAAQAABgACABoYBQDTGAAA8oACAGJ0EgABAbAgG/MA0mFy8ukGAAABADswAAABAAAGAAIAKgwBAHgSBAAAAAAAAVQDAADyShMAAO8F9AEAAAIEAAEFBmCgQAAAE3dtcmFjZGUA9JIJAACWCc0DAQAWCgAAgYegUAAAGnJtVpqVH+0T9DbdGomgYAAAG9ygIAAADGUQAACEAUcAOzAAAAEAABUBCQBwBasAHAcAAIMJAACJFwAALxkAAE8aAAC1GmIAyhsAAFwcAAABggKwMBenAAGwsBwiAAFocgAGdXRkb3duAAABhhgAAADygAEBaGkAA3B0eQAA9YsOAAABAAEAAQABAADyAAEAbQABDREAAAGEAqAwAAAcy6BQAAAc5mNyAYEBF36QR6lJcgECAPMvGgAABwABAAEEAPOlGwAAAwACAAGAAxPm0gswNbAgG1UABbAgG1YABWFpbwEKAaBwAAAdBWLywRwAAAIAAYICoCAAABwQoEAAABxfa3AICgAAARAZAAAB0BgAABKEbmVjdAEBsAAYbgABZXP2BwAAAQegYAAAHL5uYmNwcnV2dwDzYAkAAAEApBMABG9zZWQAAAGIEgAAAPIAAgFsb2MAARgcAAAABG93ZWQAAAHZFgAAAAACdmUAAAGKDgAAAPKAAgBpbBKAAQFpEhQMcB1sYgADcnR0AAABuQwAAAD2AQCABQUpY9vmNDqgQAAAGn2wYBp2AAGgMAAADDl34dpSLjYwYWNlc2htb3B0AQAA8zsMAAABAEMQAYACoKAAABxhDHkqa/Nyb3TzgAJjZAAGeHRuYW1lAADyQhkAAAEAAAEDAPVqGgAAAQABAAEAAQAAAmF5AAAB2BYAAAD69wEBbGMACXVpbm5wcm90bwAAAZwbAAAAAAhuc3NlcnZlcgAAAU0bAAAAAANuY2gAAAHXFgAAAAACc2UAAAGHEgAAAPKAAgBhZQADdHRyAAAB4Q0AAAD6IcbAwALAAjswAAABAAAFAAIAUQMCAOYGAgABmg4AADIAAQOgUAAAG/WgMAAAGXtvZW1uAPMQAQAA6AAZDAEDADswAAABAAAkAAEAJxgkAAEIAPR4HAAAAQBoAAEACCkAAAHgDQAAAPIAAQFhc/LkBgAAAQA6MAAAAQAAAAAACAAQAAAATQyuEooYixiMGC0anhufG+scCAAAAAHfDQAAABIAAQIZDC1ubriwgBx2AAFhaXPy4gYAAAEA90wMAABhBtoFAQABAKMBvgLygAIANDYIAAAAAakJAAAANgEAAAIDoJAAABzQsOAc/gABYXZjcnQAOzAAAAEAAL4AAwB3AwAAHwe8AJAOAAAAAAEDwAAAAAMOoFAAABvvfiTeBekysDAOlgqNc2xucvIIAAAAAQAAAQIBsIAdBgABc/LjHAAAAQATAAOgEAAAFtagQAAAG5xhZXA7MAAAAQAABwADAAIIBABzCQEAqxIAAAEDAqBQAAAZ7KBwAAAcn2NmAZEOAAABAAGgUAAAG8tj8moDAADCDwEAADowAAABAAAAAAAOABAAAADyDfMN9A2QEpESkhKTEpQSlRJcGWUZgBnZGQkaphsTgAKgEAAAHCxvcgEDAPPOEAAAAQABAEMAA6BQAAAZ7KBwAAAcn2NmcvKJCwAACAMAC2Vic29ja2V0dXJsAADyIBwAAAEAAAACcmwAAPJEEwAAAQDycBoAAAEAAAZ0ZW50cnkAAPReGgAAAQABAAEAAAADa2VuAAABQRkAAAAAC3NzZXJ2ZXJuYW1lAADyRhwAAAEA8skcAAABAAAIcmdldHBvcnQAAPLAGwAAAQDykhwAAAEA8oCEgAFIIAAHZ25hdHVyZQAA9HQbAAABAAEAAQAAEoABAbBAHMcAAWl0AAVwb25zZQAA8lwaAAABAAAABWF5dXJsAAD0WBoAAAEAAQABAAD6kgIAbHMAB2JsaWNrZXkAAPJyGwAAAQAAABVvdG9jb2xtZXNzYWdlZW5jb2RpbmcAAPL6HAAAAQAA8oACAHJ1CGkAAPRFGQAAAQABAAEA9BscAAABAAEAAQAACmVhZGVydmFsdWUAAAHtGwAAAAADeXBlAADycBsAAAEAAPIEcmFtZQEAdPPVGAAAAQABAAAACm5jb2Rpbmd6MzIAAPTpGwAAAQABAAEAAPIEYWxpZIqAsIgfAPKiHAAAAQAABmVxdWVzdAAAOzAAAAEAABIAAgChFwAA/hgRAAAAB29kZWFkZHIAAPMeGgAAAQABAAAIKQAAAdQYAAAACCkAAAHTGAAAAPKDZXJhAgBidAACZXIAAAHWFgAAAAAFb21pbmcAAAFqGQAAAPKAAgBjbvKAAgBudAAFdXR1cmUAADswAAABAAAKAAIAQxMAAHwYCQAACE0AAPLnGwAAAQAA8ghpc2NvdmVyeQEAZTswAAABAAANAAIARBkAABEaDAAAAAJueQAAAYkOAAAACCkAAAGGEgAAAPIABwAwYWRmaW5yOzAAAAEAAMYAAgBQAwAAHAbFADswAAABAAApAQMAYAwAAOIPxQBGFGIACGsAAAGIDgAA9BIcAAAcAKUAHgAACGlnbmF0dXJlAAABvxsAAAAIBQAAAekZAAAA+oICAGVz+kYCAG52AAHXDAAANgAAAAIEoDAAABDioNAAABxKoGAAABpWoHAAABtuZW9hYm1zADowAAABAAAAAAANABAAAABxCXIJywnMCSUM1w3YDdkNGw4cDh0OXBtdG8wbAAp1bWVudGVycm9yAAABVxoAAAABAwDz1BwAAAEAAQAigAEB50AAAAxAbmfygAIAYXIIQgABoBAAABycZQGBCwAAAAAOZWxheWNlcnR2ZXJpZnkAAPL+HAAAAQAAAAllcnR2ZXJpZnkAAAHQHAAAAPKHdXJlc2tpcAIAY3LygAIAY3IyAAIBsDAZXwABZXRuAPK1DAAAIQAABG1vcnkAAAGEEgAAABKAAQGgEAAADMhldAEBAaBAAAAZPmXzYBsAAEABAQDzAQFlAX0LAAAIFAAAAYUSAAAAAAVpbmRvdwAAARAaAAAAAAJ0dAAAAXoYAAAAAAJ0dQAA8ngYAAABAAAAA2V5cwAAAf0YAAAAAAJ1dAAAAesZAAAA8gN6ZWQBAGYBexgAAADygIWAABUR8oFhAgBsdPIAAQBpOzAAAAEAAKsAAQBwBasAOzAAAAEAAGMAAgAvGQAAtRpiAFKAAQKggAAAGiF0bXMBgAKwkBpKAAGwkBpMAAFjbAEBAPYoDAAAkQxXARoA6QFvAAGAAqAAAAAY7aAAAAAY7jQ28wMBdjowAAABAAAAAAAHABAAAACwEbERshGzEbQRDxooGhwbAIABAcAAAAAJabAwELYAAXhy8gABA2Vhb3QA9FUDAAACAAEAJgAACXJyZW50c3BhbgAAOzAAAAEAAC8AAQAdGy8AAAgYAAAB6hkAAAAABG90YWwAAAHgHAAAAPIJdWZmZXJzaXplAQB0AVYcAAAA8gRtaW5nAgBiZvPdDQAAAQCpAPIWGQAAVAAAEnVkZWRpcmVjdGFkZHJlc3NlcwAAAb0cAAAA8oADAGxvdfa3AwDHyKCgAAAbby1UFUg/Si+QiloqNQBDBAtAHCsAADowAAABAAAAAAAHABAAAAAcAewGEQh5E6AYGhmDGlkbAQEBoHAAABn4ZAHDCQAA8gAAAWwBDQMAAAAACWVkaWF0ZWFjawAAAWkZAAAANgAAgAIEoDAAABjhWudDr1dodyRn4Y4HoHAAABohbXBhZWl1AYICoFAAABwysAAboQBscnMBDQD0QhwAAAEAAQABAPMAAWL02BgAAAEAPgMhABOAAqAwAAAbWGRyAQMA9LkXAAABALkBzAAAD2VnYWxvcmRlcmVkcmVhZAAAAeYbAAAANgUAgIGHoEAAABz2J3FXIS94sAAXgQABoIAAAByuAAgAHQBKAYECsAAcJAABoQAAABzyZHQjgAKggAAAHPZucgEAAXr7gZzyw3QB1gwAACMBAi+QiloqNXBz8qAYAAC5AgEFA6CQAAAclaCAAAAcxKCgAAAcqmJzdvblGAAA7ALMAAEAHQABABMBAqEAAAAdBHB0AW0TAAABBAKhAAAAHNlbgcTrFqpiZTswAAABAAAGAAMA/RABAHQbAwC/GwAAAAJyZQAAAYALAAAAcgABA6BQAAATcG9hZWkA8hUHAAABALIAAQOgUAAAEotuaXJ1ADowAAABAAAAAAAuABAAAACaCW0LbgtvC8YQABEpEyoTQRNiE2MThBefF64XsxezGLQYwRjDGOIY4xjkGBsZSxleGX0Zfhl/GewZchpzGngaeRqrG6wbrRuuG90b4RvuG0wcVxxsHIoctxz1HAQdAYECsFAc6AABsCAcxwABZ3RDgAOggAAAGS0eaJ5RuHllaXQBAAGgYAAAHOxz8qMbAADCAAEHAbBQHGwAS2MBsBsAACOBAqAQAAAcwmVpAQMAOzAAAAEAAAcAAgBFGQMAGxwDAAAGaW1lb3V0AAABoBcAAAGiGwAA8oABAXRuEoABAaCAAAAcxWVpNhIAAIGLVCOzgxJnF/tEa1GYoKAAABvtJtLuan3ISZlw/ICtTT0gDiZtHOtCUkk3sLAcIAABAAgAsYEf8wcAAAA/AAEAOzAAAAEAAOUADwCxCQQAygkAAMkMCQD9DMUAAQ4AAIQOAQDUEgAAcRgAAM0YAAAxGgEA0hsBANUbAAAiHAEAYRwAAKIcAQAAAMvK4yAAAAMME6IxcGrwdCRXcUdkUHeEVqLQcnrIKrtHWjjPWzN3U5WN90HpH6KPmu2NVkqHQe5rB88S4v3Hav97Zx48Ot42RWk6ELD7hIKYWsbHvx1cPs9llzjjVG/ZNQtooNAAABy+sMAcFQABJMzk99GoEs16vmbSX5iCY969BBK+A8ANQagAOjAAAAEAAAAAAAsAEAAAALYJSAzVDMQNlQ6vEAsReBNQG6MbNhxlHAGBAqCQAAAcDqBwAAAbnGFpAQECoCAAABo4oDAAABthYmgBgxcAAEOAA6DAAAAcfaCgAAAcDWFpdQGAAqBQAAAbYqAQAAAcD2RvAQgBoAAAABuxc/NjGwAAAQABAPOAAmFvAYADoNAAAByfoAAAAAw/oLAAABxZaXByE4ACYk+VdNOPYWkBgQKgcAAAG9ugUAAAG01yc0OAA6AwAAAbVy3idMFBOWVpbgGAA6AgAAASh6AwAAAW16AQAAAMSmFldQg5AAABhg4AAAAIAAAAAYMSAAAAAAN2ZXIAAAFCEwAAACKAAgD2QA3bAAFucgAFb25maWcAAAGfFwAAAAAHaW5kYWRkcgAAARwbAAAACEAAAPLUFgAAAQAA9gEAAAUBsDAb4gABYWJjZXVw9PwHAAABAGoBAQABAxwAAAAGdWNjZXNzAAABdRwAAAAIIQAAAS0cAAAAAAl1cmF0aW9ubXMAAAHPHAAAAPIAAwBkZXMBaBkAAAD6MQEAc/KdFwAAAQAAAAV5bG9hZAAA8psXAAABAAASgAEBsCAbuQABYW8IBwAAAUETAAAACAcAAAEPGgAAAAgHAADygRIAAAEAAPp7h4AHgAv1awUAAAEAAQABAAEAABIAAQOggAAAGM+g0AAAHIqwUBlCAAF0ZHJ4APT1AQAAAQABAGoXAARncmFtAADyzBAAAAEAAPomAQBvAPMiEwAAQQb+ARKAAQGwYBwSAMFzbgEAAbCgHI4AAWPy5Q0AACQAAQIAOzAAAAEAAAUAAgBRHAIA7hwCAPMAAW06MAAAAQAAAAAABwAQAAAAJxPoGZkbmhubG7MctBy1HAEAAqBgAAAcaSfK4U7q5mJw9aUJAAC/An0KDQOfAQEAAaBAAAAZPmX0YBsAAHwAxAABAAEGAPMFHAAAAQDMABOAAqAgAAAcBGFrAAJ0aAAA86YJAAABAAEAAAAEYWx1ZQAAAZoXAAAB7RsAAAADYW1lAAABQBMAAAA6NwICsGAcogABsEAZ+wABbnZpcAAB3hsAADKAAgGgUAAAHQJkbHJ2BwAAgYagIAAAF40BAAAMCCMA8yAYAAABAAEAAAJkcAAAAbgMAAAAAAl1YmNvbW1hbmQAAAEOGgAAAAACYXAAAAE/DAAAACIAAgDnIAAACaVlbTswAAABAAANAAIATwMAAF4FDAAA8oADAGhzdQEBAbAAHFgAgmT0IRoAAAEAqQELAAAHb2tlbmtleQAAAb4bAAAAAAJuZQAAAQ0aAAAAAAJ0YQAA8gsaAAABAADygAIAYW8yBGhha2UCAaBgAAAc82R0c/TKEAAAAQC0AQEA8osbAAABAAAFcXVlc3QAAAEKGgAAAPIAAQBlAPc8EwAANAWEAREAagAFAHABAAtsaWVudHN0cmVhbQAA8lQcAAABAAD6TwIAY3IBpAkAAPO6GAAA/AKVAPKAAgBsc/KAAQFkZzYAAICChaDQAAAcg3yNy1C9YLBQGiMAUqAgAAAN4aBAAAAZLQAgAggMDPbFBgDEzlRmUAQhp6DAAAAcMjf2C0m64KAgAAAaAStdHn9J7EYj8EpteQfYRNZG+mtziEB04kBEAAKAK/0FADswAAABAABCAB4ATwMAAFEDAgBdAwAAXgUMAOYGAgD7BgAApgkCAKoJAQB9CwAA2QwGAJoOAAArEwAARhMBAGQTAADXFgAA5hYAAPAWAgCvFwEAGRgAAEUZAwDtGQAAfRoAAHwbAAB/GwIA9RsAABscAwB+HAAAxBwAANEcAADYHAAAAQIA9OkbAAABAAEAAQBBgAOgIAAAG2mggAAAHPZXYW5yAQACsMAcjgABsGAcYABNZXI7MAAAAQAACwAEAKoJAQBGEwEARRkDABscAwATgAKwUBetAWtocgEAArCAHK8AAaCAAAAc8mZ19UkDAACiFQEATgEBAAEEAPRCHAAAAQABAAEAE4ACoEAAABkrYXIBAgKgIAAAGjigMAAAG2FiaAGDFwAAI4ACsCAXpwABb3ABgAKwUBuhAGygUAAAG4JpbBOAAqBAAAAZ6mF1AYACoKAAABxmoFAAABugZXQBAQGwgByMAAFyATUaAABTgAOgsAAAG+ZkbHQBgISgUAAAGXagMAAAHLiwkBwiAAGgUAAAG8QEGAIABWxvbmVkAADyZhkAAAEAABIAAQGgEAAAGmljZfJ+CwAAAQAAKhECAPZADoQAAWlzAAHaGAAAEoABAaCAAAAcEXVkUoABAkMGyk3SGG9hZQEOAPMZHAAANgCyAAADaW5nAADygg4AAAEAAPIAAQBwAQsDAAAAUoABArAQDfAAAXRucgCEYmFsdgIAwAAAABJ9wAAAABJ+NDYSgAEBoEAAABuyb2UBBAGgAAAAG81zATEcAAAjBIShAAAAHPegQAAAG4+ggAAAHQAUAAYBIxYAAAEDAPTAGwAAAQDRAAEAAAtpZ25lZHBhY2tldAAAAdEbAAAAAANuZm8AAAFlGQAAAPIDb2RlAQBp8oAOAAABAAAAEmFwcGluZ2FkZHJlc3NlcnJvcgAA8owcAAABAADyAAMBbW5zcAEKAwAAAAAEcmF0ZQAA8n4OAAABAAASAAEBoFAAABzZZWMAAakSAAA2AgAAAgSwABxYAIKwcBz6AAEh//dJUgFudGRlcnMAOjAAAAEAAAAAAAkAEAAAALwMBA4/GUAZIRoiGiMadRrLG9Yb9im8AMTQCoFI/pLLoIAAABoDQNAZ+QmUP7XHfKqmsCATcAV5S5JkWCcANNPrUeuZNvqMnC6SAASSAMB5LY8AOzAAAAEAAAMBTAA3AwAAXgMDAGMDAwD8BgAA5QcAAJoJAADICQAAbQsCAIILAABWDAAAXgwAAPIMAQD5DAEA0w0DAN0NAQD2DQAAAw4AAIIOAQCHDgAAkw4AALgQAAC7EAAAxhAAAPUQAQAAEQAAqhIAAK8SAQDWEkgAKRMBAC4TAAA3EwAAQRMAAGITAQBoEwIAhBcAAJ8XAACuFwAAsxcAALMYAQDBGAAAwxgAAOIYAgAWGQAAGxkAACQZAAAmGQAASxkAAF4ZAABqGQAAbRkDAHcZAAB9GQIAiRlGAOwZAAAAGgAAchoBAHgaAQBVGwEAWhsBAGobAQB9GwEAqxsDAMcbAADdGwAA4RsAAO4bAABMHAAAVxwAAGwcAACKHAAAtxwAANQcAwDZHAAA9RwAAPocAQAEHQAAAQACoEAAAByqoFAAABjpZWk7MAAAAQAACAAEAM0JAwAmDAEA0BwAAP4cAQABBAGhAAAAHQR0AW0TAAAjgAKgEAAAC4dlaQGBAqBwAAAciy7qOKRF82VzE4ADoDAAABznoCAAAAuHZWxzAQEBoAAAABvfZAGWCwAACCkAAAGjCQAAOzAAAAEAAAwABAABEQAAQxMAAHwYCQDqGQAA8gABAHUA8kcMAACkDVKAAQKgEAAAGRx0bHMBBgGwUBvdAG9jAVoZAAAAAjMyAADzew4AAAEAAQAAAAhuY2hlY2tlZAAAAQQcAAAA8gE0AQB1AXoOAAAAIoACAOMgAAAOeTM2AAh4dGxvb2t1cAAA8hobAAABAAABAgD1yxkAAAEAAQABAAEA+kUAAWk7MAAAAQAACgACAD4MAABvDgkAAAADaWNlAAAB0xYAAAAABnJ2aWNlcwAAAWQZAAAA8oADAGVsdAACZWYAADswAAABAABKAAIAPQwAACUOSQAAAQcBoEAAABxrZfKDGwAAkQAAD2FycnNpZ25lZHBhY2tldAAA8rscAAABAAAAA3J0cwAA9M8WAAABAAEAAQAA8oACAWFrcgAHb2RlaW5mbwAAAQkaAAAAAAN0b3IAAAHSGAAAAPIDdGVyAQBh9XgSAAABAAEAAQABAAAAAm94AADy+xgAAAEAAPoJAQBi8yIOAAABAAEAABKAAQGgEAAAGiZybgAJb21wb25lbnRzAAABGRsAAAAABHl0ZXMAADswAAABAAAGAAEAyBYGAAAIRgAA81EcAAABAAEA8+4cAAABAAEA8glyZ21hdGNoZXMBAG306BkAALEBAQABAPOzHAAAAQABAPb/AAFtjIGgMAAAGgEXoY+AAAA7MAAAAQAAKAECAE4DAAA2BCcBOzAAAAEAANMAAgBfDAAADw/SAAg1AAA7MAAAAQAABQABAOIZBQAA8gJwZQEAZfXJEAAA+wUBAAEAAQD2cBsAAAEAGAABAJ0AAQAABm9sYXJnZQAA8j8ZAAABAABSgAMAwAAAAA4hb3h5AANhdHMAAAE/EwAAAPIAAQB0API9GgAAAQAAAmVuAAABdxIAAAAADG5jb2RpbmdlcnJvcgAAAUEcAAAAvgEAJIWA54AAAA4gEAgH8mUJAAABAPXVGAAAAQABAKQBAQDyAAEAbQABLBwAAPKAAgFhb2UILwAAAcgQAAAA8gJhdAEAdAD1hBsAAAEAAQABAAEAAARuZnJhAAABLBwAAAASiGVzdGFnaW5nAQGgUAAAHLhpcjIAAgKwgBy2ADcZwOecEIZjbWR1AAH8DAAAEgABAaAgAAAcK3J1ADowAAABAAAAAAAOABAAAADyDfMN9A2QEpESkhKTEpQSlRJcGWUZgBnZGQkaphsBAQA7MAAAAQAArgADAJYJAADJDQAAvRGsAAAEaG9ydAAA8nUSAAABAADyAAEAczswAAABAAAEAQEABQIEAQDygAEBdHUBAgDz8BYAAAEAAQAADGNvbnRyb2xlcnJvcgAAAeUbAAAAEoABAaAQAAAc53dh8oABAW91AYACoCAAABnQoAAAABjvZHMTggKggAAAHDhlaQAEYXJseQAAAT4ZAAAA8gFkAQBlAPNgGwAAQAEBAPICc2gBAGUBfQsAAAAACmxzaXplZXJyb3IAAAFvGwAAAPKAAgBhaQEAAaAgAAAYwmsBuxcAAAgdAAA7MAAAAQAABQABAG8SBQAAAARvdW50AAA7MAAAAQAABQABAHIYBQAA+oQCAGNyMoABAoAcGQNgsmxkcnYAAIACBCBa47lY2qBgAAAb9aAAAAAZK2VuY2dyeAGBAXani864yHQBgQKgMAAAHJ+gMAAAG4JiaQEEAPPRGQAA5wE/AQANdWlsZGluZ3BhY2tldAAA9EIcAAABAAEAAQAA+gEBAGIA9NgYAAABAD4DIQDwgAEBANJldRKAAQGgQAAAGXtscnYBAIABBKCwAAAcrmljbG11xjscAAoH4yAAAAID40AAAAIEwAAAAAAGVtDL0o68LTDrZ7tGsGAXsQABI3yVQieoMzZhaWxtbm9ydThiY2Vmc3kAOzAAAAEAAMoBDAAPAQAA3QcAAOYHAACtCLIA2QkDAD0MAABKDAAATgwAACUOSQBvEgUAZhW8AAEaAAABBADzKhoAAOkBbwBHAAAAhaCAAAAcZqCwAAAb1aAwAAAOk6BAAAASjAWBBDswAAABAAAWAAEAGgMWAAGAAqBQAAAadLAgGR4AAWFvAQABoCAAABkgaQGGGQAAI4MCoLAAABznYXMjgAOgwAAAG+awIA3wAAFhbW8BAgGgQAAAGfFlAfwWAAAAEnJuYWxhZGRyZXNzdXBkYXRlZAAAAbocAAAAEgABAaAgAAAMR2VmADowAAABAAAAAAAKABAAAAA0DOQNuhDZENoQ4xCXEpgShxmIGW0bCBYAAAHGHAAAAPIQcnRrZXlpbmdtYXRlcmlhbAEAZQGYHAAAAAADcmVkAADyOwwAAAEAAX8cAAABAwGwMBwnAAF08nsaAAABAAEEAPWEGwAAAQABAAEAAQDzgAJvcgECAPVVGQAAAQABAAEAAQAABHlwZXMAAAEIGgAAAHIEY3RlZAEDsMAcqwABdGVmdfIeDgAAAQAA8oADAGVpbwEBAbBAHI4AAWXyShwAAEEAAA1tYXhwYWNrZXRzaXplAADyPxwAAAEAAPKDZWVkAQFzZfYAAAADAqBgAAAZLWNwdGFoAPNpCQAAfAQkAAEBASr3BRzzMnPz3RkAAAEAUwIABHlvbmUAAAHaDQAAAPqYAQFybgAHb3N0bmFtZQAA8rwbAAABAAAShXJlbGF5AQGwMBxuAAFobgGEA7BgHHsAAbAwHAkAAbAwHAsAAWRycxOBArAgGfsAAWNyAYACoBAAABNPoMAAABz1M3MBggKgcAAAGn5XtT2Mg9VhcvOAAnJ1AQEA9UATAAAGCQEAggABAAGAA6DQAAAcuqBAAAAZ6aCAAAAbv2Flc/OBAmxtAYACoDAAABi+dUV7uEYVb3UBgAKwAA5+AAFzOZi0yG9lbwECADswAAABAAAHAAMA4g0AABoYBQDTGAAA84ACYnQBgAJ0AseXW32gQAAAG1NhchOAA6BAAAAaAqAwAAAZ/WRxcwAAAAE8BkHrbzVvAXwLAAAAAANwYXQAAAGZFwAAAAgDAADywhYAAAEAAfYbAADygW8CAGRt+ioCAGNzOzAAAAEAABIAAQDpBxIAOzAAAAEAAIMAPADPDQEA5w0AAA0OAACxEAEAthABAMEQAQDOEAIA6hABAO0QAgD6EAEAAxEAAFQTCABeEwEAZxMAAGwTAAByEwEAdxMAAIcXAQCPFwEApRcBALQXAwDIGAQA4BgAAOgYAAAwGQgAOhkDAFAZAADbGQEA4hkFAOkZAADwGQIA9RkEAP4ZAQBRGgMAVxoAAGIaAwB2GgEAehoAAFgbAABmGwEAbxsAAHgbAACXGwAAqRsAALQbAADFGwEA5RsAAOcbAQDwGwEA8xsBAC0cAAA5HAEAPRwBAEEcAABrHAAAjBwDAJUcAACqHAAAxRwBAMwcAABSAAECsCAY+wABb2JlAPMiDgAAAQABAHbgAADB0UZX0rPGAyAu6O1cGxRMHlykmbBgG7gBP7AgDeUAJHHAp+3y4lpO+nAya01OGMOKW10hCm6na6AwAAAcfqAAAAAOIFWo57cP6AAAgADAbzh7ADswAAABAAB9AD0AbAMFAOkGAQClCQAArQkAAMAJAgCbCwYAKgwEADUMAABkDAAAaAwIANcMAADNDQEAAA4AAJkOAADHEAEADhEAAHgSBAA4EwAAPBMAAEITAABvEwAA1hYAAOEWAQD3FgAAkxcBAK0XAABwGAAAjhgRAM4YAAD0GAYAGBkAAC4ZAABNGQEAURkAANAZAADhGQAA7hkAAPQZAAD6GQAABRoAAEoaAwBvGgAAdBoAAE0bAABeGwEAYxsCAI0bAACnGwAAxBsAAMgbAADbGwAA3hsAAOQbAAAZHAAAHxwAAEgcAQBPHAAAaRwAAL4cAADyHAAAAR0AAAAGdmFsZW50AAA7MAAAAQAAnQACAD0TAQAmFpsAABKAAQFxMM7QWJtpZfIAAQB1OzAAAAEAADkAAgAFAAAADQA4AAHgEAAAAYUCoEAAABtXsHAcEgDBZGkBAoSgEAAAGgSgIAAAEqmgYAAAG3pZ3Gj3iG9BEAL1uwkAAN0BSwsBAAEAAQEA8+0ZAACPAUgBQ4ADdHp6JE+goLAAABwuY2x0sgCAhDVAp2vpxQFADAEMAAAAAAEAAaBAAAAbxWX0MRoAAAEA8AEBABOAAqAgAAAbpmRuI4ICoDAAABuvZGkBgQKwQBt/AAGgQAAAG4FkcwEBAbDAHI4AAWU7MAAAAQAACwAEAKoJAQBGEwEARRkDABscAwAjgAKwABojAFJldAEBAbAgDn4AAWH0ShoAAAEAAQABAAARb3JjZXN0YWdpbmdyZWxheXMAAAG4HAAAAPIAAQBmAAEmGgAAAQIBoEAAABupZQECFwAAE4ECoFAAABl8bHMBgQKgAAAAEq2gAAAAEq40NiOAAqAQAAAZJG5wAQQA8/oQAAABAPcIAYMCoEAAABuooCAAABo2cnUBAwGgQAAAG8ZlAXoZAAATAgKgoAAAHJtnbgGsEgAA84ACYWkBhQOwYBxjAAGwMBvXAAGwMBvZAAFkcnMAB2VsZWN0b3IAAAFuGwAAAAAGZXRyaWNzAAABVhoAAADyA2ludAIAbXM7MAAAAQAABQACANcNAgAbDgIA8lwbAAABAPKAAQFvYZYVAACBiqAwAAAYoV+1KPWvZqBwAAAZe6FQAAAc+LBQE24FSqBQAAAYuQCAADtBEwA6MAAAAQAAAAAACwAQAAAAaAMUB9sN3A1/F4AXthhVGVYZVxlYGVkZAQABsFAb3QBvY/S6DAAAAQCfDB8AAQMCoGAAABwvoDAAABudY3DzohcAAAEAAQAIEwAA9DoZAAABAAEAAQABQRwAAPACbmcBAQDMZXr00w0AAAEAAQABAPTHGwAAEgEhAAEAAAAAAPN5CwAAAQABAADygAIAZWkSgAEBsDAcbABLZG4WAwCAAQWgAAAAEp+gAAAAFtegIAAAGfNvZWhpcnkAEmVnbWVudGF0aW9ub2ZmbG9hZAAAAeccAAAAAAAAAAG3DAAA8pAcAAABAPKCbGUCAGRzEoABAqAQAAAZIgzPLd7nXmJtbvZOAADEyrAQCbYDH7AgEx8In6BwAAAcYh4WhJ2g9LAgDEgCTaAAAAADSkADAAiAVBNGADowAAABAAAAAAALABAAAAATAxQDFQMWAxcD+gZlDHcSjBKpEkEZsBsBgAKgAAAADpRiHoph5vBweQAEdW5lZAAA8pcXAAABAAAABGNrZXQAAPKVFwAAAQAA8oACAGFy8gABAHD15wcAAAEAegEBAAEA9YsOAAABAAEAAQABABrdAQGgAAAAG6B5czYAAAABBaAwAAARDqBwAAAcZ0Wp9DHnYaAAAAAcWnBhYmRvcwD0VAMAAIQJcgbvBQECAUfIdXLavWkBlwsAAAGAArAQGVIAAaAAAAAXjWVvAQIDoFAAABpyQYxYxBEdoCAAABl3Y2Vp8k8aAAANAiOAAqDgAAAcrWNtAYACsGAXsQABJJ1t2dBTY3MBgQKwIBlMANgJXFnoXQxpbxOAAqAAAAASd2NuAQIAOzAAAAEAAAUAAQBvEgUAAQQAOzAAAAEAAAUAAQByGAUA84ACY3IAA3NlZAAAAToMAAAAEoABAVp+4jy8QXB59gcAAIGHE/0d9VEOAQAAOEkCAPNqCQAAAQABAAGAAqAQAAAcNrCwHKsAAW5wAQMA9NscAAABAAEAAQAjgAOg8AAAHQSgMAAAGghsb3kBBADzxRgAAAEAAQAjgAKwwBw/AAFtdAGBA6AQAAAb5qAgAAAbU6AgAAAaK2FscwEBAaBAAAAcWWQBAg4AACOAAqAQAAAaDW51AYMCoEAAABy9oAAAABw3ZXPzAwFhAbkcAAAjgAOgUAAAGWmgkAAAHL5hcnMxgANvcKAQAAAZ629ydQEMAPRCHAAAAQABAAEAI4ADoCAAABxloEAAABvIaXV5AAQ1NTE5AAABtgwAAABWRg8AwdAl8iSON7CgcAAAHL9XrYoKnW+gIAAAGMIslhPMlpugYAAAGfgi+hgbfeygYAAAG/cCAAAAwE67DwA7MAAAAQAAzgBKAN4HAQAACAAACwgAAA4IAACtCgAAjQsAADoMAgBBDAAAVwwAAF0MAAC3DAAA9AwAAMMNAADKDQIAFw4CAB4OAQCsDmIADBEAAIgSAAA6EwEAUBMAAGATAABrEwAAbRMAANkWAACXFwEAuxcAAHsYAADQGAAA2BgBAPEYAAAQGQAAExkBABkZAAAtGQAASRkAAFIZAQBmGQEAdhkAACUaAAApGgAAfhoEAFIbAABgGwAAbBsAALcbAADcGwAA3xsAAAQcAAAXHAAAJBwBADQcAAA4HAAAShwAAFAcAABYHAEAYxwBAGYcAAByHAEAdhwGAH8cAgCLHAAAkBwBAJocAACcHAAAoBwBALIcAAC6HAAAwBwAAMIcAADaHAAA4RwBAOgcAQAGHQEAAQIBI4dIppAoa/KZCwAAAQABhAKwMBwVAAGwUBxUAAFrcwECAaAAAAAZKnMBwBgAACOAAqAwAAAb1mF1AQABoEAAABorcgF2GQAAI4KEoJAAABz0oVAAAB0DMsV5y3vuCkAQE4ACoBAAABuyaXIBBQDzBRwAAAEAzAAjgAKgcAAAHLltcOYUAADBy8AAAAACAqBAAAAXu6AgAAAcBBfcDTnqTHy/oRu5+mnCEWFnV1Rer78L6AAACABAZJMOAPMmAQAAvgY5BAAAy857adCvb8Ifq+/NRMUX9UqCH4MuxqGTAkFJAVM+GxJHBWnGIaUUAKxXv2ZTaKUzm2I6b9WISxVmeAYgdG8JGfHVXj4BIrybkrEJW95N/moFJ/O7HTdcOokJ1WsKOffQv1o+ZstR3hBH4Pc4fO5VQ1O2ffGgUAAAGU4SZAzgPsNz4hPRJm0rDLQEVDN0UBMCdZx88ezCj5AAA+4swPwRUwA7MAAAAQAAuQOXAFkDAwBpAwAAggMBAO8GCgAXBwEA4gcBAAEIAAAMCAEAEggBACAIJABGCGYAZQkBAH0JAACECQIAjQkFAJ0JAwCjCQEAwwkCAHYLBQCACwAAiQsAAJYLAACiC3QASwwAAFEMAwBiDAEAdQwMALwMAADTDAAA4gwLAMUNAADHDQAA0g0AANoNAADiDQAA5g0AAPANAQD1DQAABA4AAH4OAwCKDgAAkQ4AALAQAAC0EAEAyRACAOIQAADwEAMA/BADAAERAAAKEQAADREAAA8RoAC2EQAAuREAAH8SAQCHEgAAnxIAALESIQDVEgAAKBMAAC0TAABAEwAAQxMAAEsTAQBTEwAAZRMAAHQTAAB2EwAARBQBAMIWBQDTFgAA2hYAAOcWAADuFgEA9RYBAPgWAgD9FgAAAxd7AIUXAQCMFwAAkRcAAJoXAAC5FwEAGhgIAEwYIQB8GAkAuhgCANMYAADVGAIAIBkAACIZAAAsGQAAPxkBAEIZAQBfGQEAYhkAAHEZAgB8GQAA2BkAANoZAADqGQAA+xkBAAMaAAANGgAAIRoCACcaAAAzGgEAPxoAAFAaAABcGgEAZhoCAHUaAAB7GgEAhBovAGgbAABwGwEAdBsDAIIbAQCJGwMAjxsBALUbAQC8GwEAvxsAAMIbAQDLGwAA1BsAANYbAADtGwAA9hsAAPkbBAAOHAAAFBwAACccAQA/HAEARhwBAEscAABWHAAAWxwAAF8cAABiHAAAbRwEAH0cAACvHAEAwRwAAMMcAADJHAIAzRwBAN8cAADjHAEA9BwAAPwcAAABgAKwoBwgAAGgQAAAGLllaQGCAqAwAAAb96AwAAARDXN0AQIA8ykMAACZDE4DAQIAOzAAAAEAAAUAAQByGAUAI4ACoDAAAB0EbnUBAwGgAAAAGLVzAfsWAADzgAJobwAOcm90b2NvbGhhbmRsZXIAAAHkGwAAAAAEbG9uZQAAAdINAAAAABxzc29jaWF0ZWRhbGdvcml0aG1pZGVudGlmaWVyAAABAR0AAADygAMAYWNw8gABAG4A8vMWAAABAAGAAqAAAAAcNqBgAAAaKWlvAQAA9EQTAAABACsHAQAAA2lzdAAAAWMZAAAAEgR0aW9uAQGgEAAAHM9obfLRDQAASQABPBoAAPKAAQFhbDKAAQKwsByrAAFybnABBgD0dBsAAAEAAQABABOAArAQGLwApmd6AQMDYbLh/PMioGAAABzzoHAAABu+ZHN09soQAAABALQBAQALCQEAAYACoFAAABxKoGAAABktY2gjgAKgAAAAEOx0eAEDAPVuEwAASgUNAAEAAQABgAKwUBzoAAGwIBzHAAFndAAFb2RlaWQAAAFxGAAAAPKAAQJuYXK2AQAAgYaggAAAHPywwBw/AAGgUAAAGV0AAASwUQAA8sgNAABhDgGAArAAGOYAB7AAGOcABzQ2AQMBQ3iYjK8sYwEYHAAACFYAA6BAAAAbaaBQAAAbtjB/S7ZoiGdocDswAAABAACtAAIATQMAAIkDrAAANggAAMHILqUvYOTGoIAAAB0CoDAAABnZoAAAABw3oDAAABnaoJAAABzNAAAQAABmABsAOjAAAAEAAAAAAC0AEAAAAHkDegN7A6kJ3w3gDeoN6w3sDdEQ0hCwEbERshGzEbQRgRKCEo0SjhKPEp4SORNxE9QW1RbbFtwWiheLF6kXqherF6wXFxknGSgZKRlsGQ8aHhofGiAaKBocG2IbAQEA8w0aAAAmAAEAAAdvYWRzaXplAAABYhkAAADyAAEAbAA7MAAAAQAADQAFAJsOCQCGGAAAdRkAACocAACbHAAA8gABAG4A9igMAACRDFcBGgDpAW8AAINhaW4BAcAAAAAMtTct7ElyAHNutAEAgAIDAAGhQAAAHPgEOW13Ym51AQMCsEAbZgABoJAAABzNZXfyihcAAAEAE4ICoDAAABlcYWkBiQIvkIpaKjUBO0TB6bdwcwAFZXJ2ZXIAAAHHEAAAAU0bAAAABW9sdmVyAAA7MAAAAQAACAACAJMXAQD0GAYAAdsbAAAIZgAAAZgbAAAAAAR0dHBzAAABAxwAAADyBXVlc3RzAgBodQHzGAAAAPqeAgBxcwAGb3RvY29sAAABkhcAAAAIBgAAAeEZAAAAEoNhcnIBAXy6jyJtxnNy8oACAGtyCHwAAAECHAAAAAAHb3Rmb3VuZAAAASscAAAACBwAAAGXGwAAAPKFb29rdXADAGVucwAGYW5kbGVyAADyPBMAADQFAAgCAADyzw0AAAEAAfgZAAAABnVpbGRlcgAAAR8cAAABSBwAAPIIaXNjb3ZlcnkBAGIB0RgAAAFKGQAAAAVvbmZpZwAAAcYQAAAAAA5uZHBrYXJyc2VydmVycwAAAXQcAAAA8gCJgZ2IAwAgADswAAABAAAKAAIAEQEBAPkBCAD17QYAAAEAlgQBAAEA8oABAXNvAYECsAAMTAZhsAAMTQZhNDYAA2xheQAAATkMAAAAAAR0YXJ0AADy3xkAAAEAAAALb2NhbG5ldHdvcmsAAAGxHAAAAAADdGVtAAABORkAAAAAA2VudAAA8t0ZAAABAAAAA3JvcgAA8tsZAAABAPLnGwAAAQDygAIAcnYAAmh0AAABYRkAAAAAA2V4dAAAAW0bAAAAEoJvbgEBsCAb7gBpdGb2BQAAh4HjAAAAGPKwYBwfACkcKQICAAA7MAAAAQAABwACAMMQAgBqEgQAOzAAAAEAABUACgDPGAAA0RgAAEQZAABKGQAAWxkAABEaDAC0GgAAGhwAALYcAADtHAAAKlECAPZAEzoAAWV58s0NAAABAAAIBQAA8gAcAAABAAAAA2VjdgAA8v4bAAABAAAABnJvcHBlZAAA8nIcAAABAADyhWNrZXRzAwBkcnMSgAECsCAbVQAFsCAbVgAFYWlvAIRuZWN0AgDmQAAAGNDQABhuAAFlc3YAAAADBSWguesYYwUv0B76/DzzDIccDwP1JOU8tKBgAAAcvm5wdmJjcnV38mAJAAABAAEFHQAAEgABAUN4mIyvLG9jAAEYHAAAAARibGVkAAA7MAAAAQAABQACAMoNAgAXDgIAAHKAAwGgUAAAHOxhY3B0AYQCoEAAAByaoGAAABzAYXIAA3lwZQAAAdoZAAAACHkAAAHZGQAAAAAEc3NlcwAAOzAAAAEAAAUAAQCRGwUAOzAAAAEAAAoABABNHAEAhBwFAJYcAQC9HAAAdgAAA2RkcgMCoIAAAB0CoAAAABw3ZWl0aHMBORMAAAAyAmN0AQKgEAAAHL9hY2zyoQkAAAEAAbkcAADyAAEAZfIQAQAA6AABEQ4AAAgZAADywRAAAAEAAPIAAQBl8ksDAAABAAASgAEBoEAAABlpbHR2AQAAg4NH+rnwRt6goAAAHIMBAAMAoAQA8qMbAADCAAgYAAABzxgAAADyAAEAZPP1AQAAAQABAAFhGQAAEoABAaCQAAAb7XRlEQAC6rAAENkAAWF0AWkJAAABgAKgQAAAHFCwQBNNAAFlaQEFAi+QiloqNQE7RMHpt3BzAaAYAAABAgD07Q0AAAEAAQDADRMAA7BAHI4AAaDQAAAcvWFlafRKHAAAMAARAA8AAQICsEAbZgABoJAAABzNZXc7MAAAAQAADgAGAOoNAgCNEgIAihcBACcZAgAeGgIAYhsAABOAAqAgAAAZPmRyAYECoAAAABbnsBAcqwABZXUTAAJIRuTsAQxhaQGZHAAAAAABAMAAAAAYznI7MAAAAQAAIgACAJEXAABMGCEAAAAJdGlvbmVycm9yAADyPRwAAAEAAPKGcmlhbGl6AgBhZQEHAaBwAAAcv2QBUhsAAAAGaXB0aW9uAAA7MAAAAQAAJAABACcYJAAA8oABAXJv8gACAWNldADybQkAAAEAAQIAOjAAAAEAAAAAAAwAEAAAALYQtxDqEOsQ+hD7EOgY8hn5GcUbjhyPHJUcAQABoIAAABxgdAH2DQAAE4ECsEAcogABZ3YBAAGgMAAAG+ZyASkaAAAIbAAAOzAAAAEAAK0AAgDJDQAAvRGsAADyAAEAbTswAAABAACzAAIA5gcAAK0IsgAA8oABAWZkNgEAAAEFoDAAABNAsEAZ+wABsEAXmgRTZWlucHJ2ADowAAABAAAAAAAYABAAAACtCSwMLQwuDGgMaQxqDGsMbAxtDG4MbwxwDC4ZThlRGdAZ+hleG18b3hsfHEgcSRxpHAEDAPMZHAAANgCyABOBAqAQAAAZdGZ0AQAA9VUZAAABAAEAAQABAAEIAPTpGwAAAQABAAEA5AEAgAEEwAAAAANKAAHQAnljZGl0AAVtZW91dAAAARgbAAAAEoACAObAAAAYJml0AAABAOYQAAAYJW/0Ew4AAAEAAQABAAFnHAAAAA51Ymxpc2hpbnRlcnZhbAAAAdMcAAAAAAd1aWNwb3J0AADypBwAAAEAAAACZGUAAAH9GwAAACKAAgD3ABvPAAFhb/KCYXkCAG1x+q0CAGxwAAdrYXJydHRsAAABuxsAAAAACmFyZWxheW5vZGUAAPJwHAAAAQAAAApldHJpY3Nwb3J0AADyOxwAAAEAAAAPZXljYWNoZWNhcGFjaXR5AAAB0hwAAAAABHBvcnQAAPLiGwAAAQAAAANvcnQAAPK5GwAAAQAA8oN0dHACAHBzAAp1cmVsYXlub2RlAADybhwAAAEAAAARZXJ0cmVsb2FkaW50ZXJ2YWwAAAHxHAAAAAAKcHJlbGF5bm9kZQAAAW0cAAAA8gRhdWx0i4CVtAc7MAAAAQAAMwACADYMAgCEDDAAAAAHbmdlcnJvcgAAOzAAAAEAAAgAAQAwGQgAAAAMbnZhbGlkbGVuZ3RoAAD0GxwAAAEAAQABAAAIGAAAAZAXAAAA8gACAGVpOzAAAAEAAAYAAgCdCQMAdgsCAAD66QIAZWnyAAEAbwAB5AcAAAGAAk5nr8a9t2MaWDxqnGRpIoABAeZwAAAH5XV59g8OAIaKoEAAABeQsDAN8AABNBUkq32KsCAZawHsoCAAAA6UJiADWVkkADswAAABAAAoABQAaQMAAIIDAQD5BgAADAgBAJ0JAwB2CwUAYgwBANMMAADHDQAAgA4BAPAQAwC2EQAAdBMAAMIWAQD9FgAAXxkBAPYbAAD9GwAAbRwEAMscAAABggKgAAAAGiygAAAAGi00NgADYWNlAAAB3xwAAAAAAnplAAABzhwAAADyiW5kYnVmZmVycwIAaXASAAEBoCAAABvUZWk7MAAAAQAABwACALwQBAC6EQIA8i4aAADjAQAQZWNlaXZlYnVmZmVyc2l6ZQAAAfQcAAAAMgNyYW0CArBAHNEAB6BAAAAbxnJzYmUBEg4AAPXdGAAAmwACAO4CAgAAAmlyAAABEQ4AAAAABmxvY2tlZAAAAfEYAAABNBwAAHYBAACDhLCwHLYAN6CgAAAcm6BAAAAbVEoAACAhAfOGAwAAAQABADowAAABAAAAAAAVABAAAADtDe4N7w0KDgsODA6SDqwSIxMkEyUTVBmDGYQZCxoMGkYaRxpIGkkaTxuvGxKAAQJ3WROO+mEudpNUV4hhZWkWAACAgYegcAAAGVCgIAAAGKEZIwylTwihEAAAHQGhIAAAHPWwEA3oAAGwIBt/AAEAAAQOqAgAAMrMIvJ5OK5NfXONVt3CKQeRBiC3YJ5G5kquPi8no9DtAbydELAqcyMtDEgwLjUfhoIuXp8DYMy6ZnXI8TxCoEAAAAy2oJAAABlPNPLdWfPjFZVO4nEfCAimWb8iVbzCZGarWbkm0gLJd+FFQ4kDGA/RtzbmAz0ClwZaXZnURBqYAAoXGD/aQGSYRYoLIxoAOzAAAAEAALwCggAHAAAARgABAAkBAAAbAQAAHQEAACcBvQBVAwAAVwMBAGcDAQB+AwAAhQMAAOsGAAAKBwEAEQcAABQHAADeBwEAAAgAAAsIAAAOCAAAFggGALEJBAC6CQAAygkAAK0KAACNCwAAlwsAAC8MAAA6DAIAQQwAAFcMAABdDAAAcgwCALcMAADJDAkA9AwAAP0MxgDKDQIA2w0BAPcNAQABDgAAFw4CAB4OAQCEDgEArA5iALMQAAAMEQAAiBIAAJkSAQDUEgAAOhMBAFATAABdEwAAYBMAAGsTAABtEwAAdRMAANkWAAB/FwEAlxcBAJsXAQC7FwAAcRgAAHsYAAC2GAAAvhgAAM0YAADQGAAA2BgBAPEYAAAQGQAAEhkCABkZAAAtGQAASRkAAFIZAQBVGQQAZhkBAHYZAAAOGgAAJRoAACkaAAAxGgEANRoAADkaAABqGgQAfhoEAFIbAABgGwAAaRsAAGwbAACOGwAAnRsAAKQbAAC3GwAA0hsBANUbAADcGwAA3xsAAOYbAAAEHAAAFxwAACIcAwArHAAANBwAADgcAABKHAAAUBwAAFgcAQBgHAEAYxwBAGYcAAByHAEAdhwGAH8cAgCLHAAAkBwBAJocAACcHAAAoBwDAKYcAwCtHAAAshwAALocAADAHAAAwhwAANocAADhHAEA5xwCAAAdAAAGHQEAAQACsFAb3QBvoCAAABDjY2X1uQkAAAEDAQCfDB8AAQYA8/oZAABkAQEABwEAAIWggAAAGXOwcBpKAAGwIBykAAGgUAAAFuwByAEBHwEAAACAAQHmQAAAA4WgMAAAEyhucgADdG9tAAD0mwkAAAEA2AEBAAABhAKgkAAAHNCw4Bz+AAFjcgACdHUAAAEkGAAAAB4AAK4BBFHzRm3EtKCAAAAcGmaxGH1h0rCQHOUAGG1iZHN18oABAXJl8oACAHJzAQQAOzAAAAEAACQAAQAnGCQAAQEBoAAAABzycgHVEgAA84ACYnAAC2VydmVyY29uZmlnAAAB4RsAAAAIXgAAAbsQAAAACA0AAAGPFwAAAAADaXplAAAB/BsAAAAAB3hjZWVkZWQAAAGLHAAAAPKFdWZmZXICAGVz8gCEgBIAA/RwCwAAAQABAAEAAb8YAAASAnB0AQKgYAAAHC+gMAAAG51vY3AA86IXAAABAAEAAQABI4dIppAoa/KZCwAAAQAABWVjb25uAAABIxgAAAASgAEBoAAAABCzdGTygAEBYXTygAIBZXlpCGABAOcgAAAMNWUAOzAAAAEAAAUAAQByGAUAEoABAQln0WfrDG5kAAJzZwAAATcTAAAAAAZhY3RvcnkAAAG4GwAAAfccAAD6OwEAZgE4EwAAADICb2wCAaBAAAAb5WxtZQABERkAAAgEAAABNAwAAAFtGwAAAAJ0cwAAARAOAAAA8oACAG54AQEBJebM5RBwZQEvHAAAAAZuc25vZGUAAPJfGQAAAQAA8oABAWlj8oADAGFlcgg5AAABuREAAAAAEHJhdGVsaW1pdGVkdG90YWwAAPLdHAAAAQAAEoABAbBQHLIADnhlEoABAbBAHHoAIHJhCA8AAPI5HAAAAQAA8gdpdGhvcHRzAQBlAc4bAAAAAAZwdGlvbnMAAAHSGQAAAAgEAAAB2BkAAAAAA2F0cwAAAVUaAAAAAAZsZWN0b3IAAAHgGwAAAPKAAgBldAAGZWZ1c2VkAAAB3xsAAAAAA29zdAAA9dMZAAABAAEAAQABAAAACWltaXRlcnJvcgAAAcUcAAAA+iUBAGwBzRgAAPLVGwAAjAAAC2hha2VzdWNjZXNzAAAB8xwAAAASg2FuZAEBoBAAABxLc2wICwAA9FEaAAABAAEAAQAAAARsb3NlAQDAAAAAG2xk8lAaAABAAQAAC2VjYW1lZGlyZWN0AAABuRwAAADyAW6JgJYJBzswAAABAAAJAAIALxMHACQWAQAAAAAAAAEuEwAA9G0ZAAABAAEAAQASAAEBsKAcxwABZ3YAARoZAADygAIAbm8IVgAA9cgYAAABAAEAAQABAAASgAEBsAAY0ABAcmQABWxpZW50AADyBhoAAAEAAP4BAEkFAbAAGG4AAWNlaW93czswAAABAAAFAAIAMAwDAIIMAQD0sRcAAAEAKQEBAHYAAAADAqBAAAAbyaBAAAAbymVzdGJsAYQDAAABIxgAAAAEdGF0ZQAAAY8bAAAAAAR2ZW50AQDAAAAAG81zAAExHAAAABBvbnRyb2xsZXJmYWN0b3J5AAAB9xwAAAByBmVzdGlvbgMBoIAAAB0AY2VzdAEjFgAAAAAQcmFjaW5nc3Vic2NyaWJlcgAAAfIcAAAAGsMBAbAAHCQAAXRkEoABAaCAAAAc9nJu8gABAHX0mgkAANMBAQABADowAAABAAAAAAAqABAAAADGEAARKRMqE0ETYhNjE4QXnxeuF7MXsxi0GMEYwxjiGOMY5BgbGUsZXhl9GX4ZfxnsGXIacxp4GnkaqxusG60brhvdG+Eb7htMHFccbByKHLcc9RwEHRKBaQEBoGAAABv1Z3IITwAAARocAAAAEoZ1cnJlbnQBAlHzRm3EtLCQHOUAGGRidfYBAIAFAaAAAAAbjmNmZ250ZAECAgqBSP6Sy6BQAAAZ6mJm9d0NAAABAKkAjwpUAAACZWYAADswAAABAAC8AAEAZhW8AAAITgAAOzAAAAEAALwAAQCpFLwAAAACeHQAAAG6EAAAAPIAAwBlbXI7MAAAAQAAvQACAJkJAACwCrwAAZkXAAAAAAAAOzAAAAEAAAwAAQB1DAwAAAADYmxlAAABLRMAAADygAIAYWXygAIAcnQSgAEBoFAAABsZYW8AAAABoIAAABz8ZgHIDQAAASkcAAAAB3J1cGRhdGUAAPP5GwAAAQABAAAABWN0b3J5AAAB0RkAAADygAIAYW/yAm5kAgBmc/QvDAAAQwABAAEA8nUTAACZBhKAAgD24AquAAFhb/KAAgFtcGkBgAKgUAAAHJSgcAAAG+9laQALZWN0YW5kcHJpbnQAAAHMGwAAABYBAAABBLBgGm8BdbDgHPoAAaAAAAAY6mxobXN2APX5DQAAAQCdAAEA+ggBDAD0GxwAAAEAAQABAEIAAQLAAAAAB+SgQAAAF5BjZWnyggMAAAEAOzAAAAEAAA4ABgCdCQMAdgsFAHQTAADCFgEA9hsAAMscAAASgAEBXtdxCvDcZWn2AQAAxccloLnrGGMFL9Ae+vygUAAAHCoOtXMrh7QcK+gkHUZaChqk7R2gYAAAHL4AAg4EgAGwGADzYAkAAAEApBMBgAKxIBygAAGgQAAAELBlcwAAAAA7MAAAAQAADwABAOUBDwA7MAAAAQAADwABAKIYDwDygAEBcGUABWVhc29uAAAB8BgAAAHmHAAAAAV0cmVhbQAA88UYAAABAAEAAPIAAQBzAa0KAAD0iBIAAMEGIwJLADoNAgGgMAAAHMtkcmP14wcAAMYAAQABAAEA9e4WAAABAGEDGAEoAAAHb3VuaW5pdAAAOzAAAAEAAGMAAgAvGQAAtRpiAAAAA250bwAAOzAAAAEAAGIAAQBGFGIAAAACb3gAADswAAABAABdAAIAuBEAALwXXAAAegMDAbAAGWYAAWJpdGQ7MAAAAQAAYwACAOIHAABGCGIAAdINAADygAIAbnMIMwAA8mobAAABAAAABGF0Y2gAAAHRHAAAAPIHYXRhZ3JhbQEAYgFoHAAAAPKGb3JlbGF5AgBkbQADZWFtAAABxBgAAPJUHAAAAQAIMwAAAY4XAAAA8oACAGFyAAJuawAAASwTAAAA8gACAGl0AXEMAAAAAAd0ZWxpbWl0AAABTxoAAAASgAIAwAAAABG3YXgAA2xsbwAAAY0XAAAAAAVuZGxlcgAAAQUaAAAA8oACAGFlAAVvbmZpZwAA8sMYAACbAAH1HAAAAAZ1aWxkZXIAAAEuGQAAAAAGbnZhbGlkAADyohwAAAEAAPIFZWFkZXIBAGkB3hsAAADyA3V0aAEAaAErEwAAAP4HAEyHg0y23xvJR7AwHBUAAbAgG30AAYcABwgUADswAAABAAAGAAIAlwkBAKgKBAD0YRMAAKUGAQB0AQAGY292ZXJ5AAABtBoAAAAADGVjdGFkZHJlc3NlcwAA8pYcAAABAAD6owIAcnMABGFjaGUAAPMgGAAAAQABAADygAIAY2QAC3VwZHJvcGd1YXJkAAABaRsAAADygWECAG5ycoADAaEQAAAcvWVpb3UBgAOgEAAAE0qgsAAAHK2AHAUAEMxlaXkACnNleGhhdXN0ZWQAAAEtGQAAABYCAIABBaFgAAAdAaAQAAAZ86AwAAAXu6CwAAAc8mRhZWZudAECAbAAHFgAgmT0IRoAAAEAqQELACOAArBQGiMAUmxuAANpbWUAAAFFFAAAAAhdAAABRBQAAAEDGgAA8gABAGnzpQoAAAEAAQDztRgAAHUAiQL6EgIAc3QB4QcAAPL7FgAAxQE2AAAAAQQ1+tMSVAGgcAAAG2KwMBEEAAF1YWVucgD01xYAAKYDVAIHAAGBAhcsnsP2h7DQHD8AAWVzAAAAAaCAAAAdBGEBRQgAAAAAA29kZQAA8scNAADvAwAABGRrZXkAAAHCGAAAAAhNAAAB0BkAAAASg2F0ZQIAwAAAABjvZHPygmZpAgBjZQgUAADyKRMAAAEAAP4AAE8EAqDQAAAc8VjUQZ32UGNpbXNydgGBAwAA8rIbAABAAFYAAACBiLCQHCQAARz5rIXms7AwGVIAAaAQAAAcWqAwAAAZIg7H8jHZLHREYCl4vAAAARS5AgA7MAAAAQAA0QERAH0JAADECQEAogt0ALUQAAD/EAAADxGgAJ8SAABTEwAAdhMAANMWAAD4FgIAAxd7ALsYAAAsGQAAhBovAM0cAADfHAAAAQQBoAAAABu3ZAFoGwAAE4IDoEAAABu0oFAAABw4Y2VmI4ACfFNrmf4iZWkBAgF/1qs7WTFkAZ4SAAABBwDzBRwAAAEAzADzAgFj8yAYAAABAAEAAAJzZQAAOzAAAAEAACQAAQAgCCQAAAEEAPMFHAAAAQDMAAAJaXZlcG9ydGFsAAABBBoAAADygAEBdGEBAwGgYAAAHAd1AU8ZAAABAwA7MAAAAQAABwADANEQAQDbFgEAqRcDAAAGZW1heWJlAAGgcAAAHQViAYwXAADywRwAAAIAEoABAaBgAAAZSW15NgEAAAEEoBAAAA6QoGAAAByxbGFpbnAAAf4HAAD2EQCAg4agcAAAHLmwYBlSAAGwEA33AAEAiAgMMAX2P0QAysmgcAAAGigf8WaRJP8YHO4J2/2gAAAAAgI2svyMEcxWhlWkX5BUXq+/C+hAZJYUgAEpSwA6MAAAAQAAAAAAEAAQAAAADQEmAWsDDAcNBw4HDwcQB+QH/weOC48LkAuRCx0MGBz2HAEEAbAgHCAAAXX0BhEAAAEAAQABAAEIAbCQHPgAC2UBbBkAAAEEAaAAAAAc8nIB1RIAAPOAA2NlbwEGATwOs2BIkXPydRMAAJkGAQgBsIAdBgABc/LjHAAAAQABAgFIRuTsAQxpAZkcAADzgAJlbwgUAADyQhQAAAEAAAhQAADy2xwAAAEAAAACY3YAAPJAFAAAAQAA8oACAGV4AAhlcnNlY29uZAAAAY4bAAAACA8AAAG0EAAAAPICZXOEgACBA/TgBwAAPQABAAEAOzAAAAEAABIABwDgDAAA8AwAAA4OAQCmDgUAyBYGAOAWAABOGwAAMoABA2MaWDxqnKAwAAAbyHRkaXABAgGgQAAAG05iAckbAAABCAD0QhwAAAEAAQABAAABcgABoCAAAByVcjswAAABAAALAAIALAwCAGgMCAD2LhkAACMAzgIpAAEAIADyAmxkAQFlaTswAAABAAAGAAEAFggGAAAIOQAAAZYJAAAAEgABAQlrLO/mcm1mAQ8BAADySgwAAAQANgEAgAMC5rAAAAOAoAAAAAflZmlsZ3IABnJlZXNldAAAAcYNAAAAAAN0ZXIAAPIqDAAAAQAACFAAAPLeBwAAAQABDBEAAPIAAgBlaQEOAQAAOzAAAAEAAF8AAwC4EQAAvBdcAPsYAQAABWNrZXRzAAABXRkAAAASgAEBoHAAABxKb2X6OQEAcwABvhgAAAgFAAA7MAAAAQAAxgACALkQAAB6E8UAAPICb3cBAG07MAAAAQAAyAACAJUJAADdCccAABKAAQGgwAAAG7ZydAAFcHRpb24AAAFOGgAAAPIFc3RyYXABAG8BtREAAAAigAIAwAAAAAN/bHT2AACABAGwEBevAAFvcnV4dAEEAqAwAAAcZaAgAAAcNmJ18vEYAABDAwAIZGV0ZWN0ZWQAAAFQHAAAAAAHb29sZG93bgAAASocAAAA8oZja2hvbGUCAGNzkoABA1FVcgtz8AsashnxtWFlaW8BAQGgYAAAHOxz8qMbAADCAAAGc3RyaW5nAAGgcAAAHNllAbgQAAABJhkAAAAJc2xpc3RlbmVyAADyTBoAAAEAAAAJcGxpc3RlbmVyAADyShoAAAEAAPKAAgBjbAhaAADythAAAAEAAACAAgDAAAAAGO3AAAAAGO40NvIDZGRyAQB29bARAAABAAEAAQABAPMPGgAAGQD0APoOAwBhZXQBfgMAAAByAAICoGAAABz5bnRkcwD0tgkAAB8D7wBHAwGAA6BAAAAdBaAgAAAcEKBAAAAcX2RrcAAEcmFjZQAAOzAAAAEAAKEAAgC1EAAADxGgAADyAWsBAHQAAZ8cAAA2AACAAQQf4TTkHuegEAAAEoewIBzRAAdjZGxzdPaPAACHhQWeAH1ErKAwAAATIqAQAAAaOAFJTJSAAgABGgcAAAEAAaAAAAAM7mEB7gwAAPMAAWEB7gwAAAEGAPS5FwAAAQC5AcwAAAljaHVua3NpemUAAAEDGgAAADKAAQKgEAAACAtnYWUBAQE39gtJuuBo9SsTAABUCAEAAQB0AAEAADswAAABAAAkAAEAIAgkABOAAqAgAAAZLWV0AYABdqeLzrjIdAAIb3J1cGRhdGUAAAH8HAAAAPIKdWJjb21tYW5kcwEAZgEpHAAAAAgBAADyrxwAAAEAAPIDcmdzAQBm8usYAAABAADyhG1lbnQCAGFz8oABA2dsc3QBAAA6MAAAAQAAAAAADQAQAAAAEAiHCYgJiQmKCYsJjAkIDuEQPxOOF7gXJRlVGgEBAPXjDQAAogRNBgIADQABgAEL0RUNmRhoAYACoDAAABugoAAAABDIbXIACXJvbXN0cmluZwAA9csZAAABAAEAAQABAAASAAEBoAAAAA4HZnMAAeENAADygAEBcmVWKAAAgYoKGDKLpQpbTXw0vBAAnSBhKCQyU+962yNm3zLJ6yhwOvdJi51WFd2HaVkAAASVUQsAOzAAAAEAAMQABQCZCQAAsAq8AJkXAACEGwQAAh0AAAGAhKBAAAAW2qBgAAAZEaBgAAAZErBgGRMAAQWACAEBAPaSCwAAAQABAAEAWw32AwGAArCAGVIAAaBQAAAYumNoAQACoBAAAAmloCAAAAw/ZW07MAAAAQAADQACAE8DAABeBQwAAARyaXRlAAABKBMAAAAAA2VhZAAAAbMQAAAA8oJuYwIAcncABW1ibGVyAAABDhEAAAASgAECoZAAAB0BoIAAABoOZW91CFoAAPXdBwAA/AEBAAEAAQAAAAhyb3RvY29scwAAAeoYAAAAAAd0ZXJhYmxlAAA7MAAAAQAABQABABoYBQAAAAlyb3Jzb3VyY2UAADswAAABAAAwAAIALBkAAIQaLwAA8gABAHIAAYcSAAAABHl0ZXMAAPIODgAAAQAA9n8AgIeFoCAAAAy4EoFDgEQMAQABBzV/P7v8ZfP7GQAAAQBjAhOAAlQxd64ZgWVpAQEBoNAAABxKYvPLCQAAAQBZAkOAA6BQAAAcWkTqUClme2FlbgECArBwG8IAAbAwHHAAAWhuAVQbAADzAAFsOzAAAAEAAAwAAQB1DAwAAYACsMAclgABoGAAABq0cnPzAAFp8/cNAAABAHENAACBhueQAAAIFbBAE14AAR4wPY2ZN2RKvadNDh+1IWj1pqAgAAAbu6AgAAASlgEAABCADwDybwkAAAEAAQQA9MAbAAABANEAAQDzAAF08wQOAAA7CwEAAAAAAbCAHK8AAWYBSQMAAPLrGAAAAQAABmF0Y2hlcwABHrSBm/Z+bQEnEwAAOzAAAAEAAAYAAwDoGQAAmRsCALMcAgDygAIBbXNlAQMA8yAYAAABAAEA8gAAAWEBDQEAAAB2JwCAg4gTmttVj1OgoAAAHFmgEAAAGT4Th9m3BzNEAAEZDQYAB29zdG5hbWUAAAG1GwAAABKEZWxheQEBoDAAABxtaG4BggNVlHqwX7OgcAAAG6E2+oycLpJhZnYBgAKgAAAAE2CwABb3BcdkcghrAAABxQ0AAAAIGAAAAbQbAAAACHMBAMAAAAAbt2QBaBsAAADyh2ljYXRpb24CAGNl8gACAmxzZWkBDAEAAPLoDQAAAQB0AAAAgoYAB4OgYAAAHNqgYAAAGe+gUAAAGk6gIAAADDqgkAAAGgQAgAEFUAYAOjAAAAEAAAAAAAoAEAAAABgBGAM/DPsN/A2UDrURoBKhEs8b0BsBgAJc4ZKrlf2gkAAAG2lhcAEDADswAAABAAB8AAIA/xAAAAMXewDzAAFyAUAMAAABAQKwABxYAIKg8AAAHPVkcvQhGgAAAQCpAQsAAQECsDAZUgABoBAAABxabG30UxMAAKUDAQABAAAAAADyCgEAAAEAAYkOAAAACWVycmVxdWVzdAAAAQIaAAAAEoABAqCAAAAZ/QlBZNMbp3dmcAGAAqCgAAAcdKAwAAAbzGtyAQABoFAAABoKZfc8EwAANAWEAREAagAFAHABIwECsLAcVAABY3L0pAkAABYP/AKVAMYAAACAhaBQAAAdBELqQzJlnSfG1NUqGCSIAjswAAABAAC9AAIACQEAACgBvAD2LwwAAEMAAQABAAEHmQb2GgAAg4agkAAAHJt2og24wegIAEJUAQwAOzAAAAEAAC8AAQAdGy8AAYACoAAAABJ9oAAAABJ+NDYBAQD1EggAAAEAfgEJDlMEAQEA86YJAAABAAEAAQEBoEAAABtvZQGFFwAAI4ECoGAAABu/Z3oBAgGgcAAAG+ZlAV0TAAABAwD0wRAAAAEAJwndAgEBADswAAABAACdAAIAPRMBACYWmwBTgAOgAAAAEOBucXIBAgA7MAAAAQAADwABAKIYDwABgAJpc5GN0aagMAAAHINkbAECAaBgAAAcB3UBTxkAAAAAAAABFAgAAPLTEgAAsAkAC3VpY2FkZHJkaXNjAAABGBwAAAAIBAAA8rEQAAABAADyAAMAZXFz9EcDAAABADQAAQAA8oABAW5vAQYBoHAAAB0FYvOMFwAANQUCAAADcGluAAABeRMAAAASAXcBAbAQE1ADiXNlAdwHAAAAFgIAAIGGoDAAAByfoFAAABuzsDAaIwBSoDAAABuCoGAAABlJAEAAFhFAAQgBAADzBQ4AAAEAIAUAEG9yaXRobWlkZW50aWZpZXIAAPIZHAAANgABAR0AAPaFHgDDz6BwAAAaPDEfbOmMz6AwAAAY/bAgGHgAAaBgAAAcsaAgAAAYeqBQAAAaEAAQIgBAR50fADowAAABAAAAAAASABAAAABLA0wDEwf+B64JrwmwCYgOBBoSHC4cmBzTHNsc3BzdHN4c4BzxHAALaW1pdHJlYWNoZWQAAAHcGwAAAAACZXkAAAEpDAAAAAAHcm9taGtkZgAAAQEaAAAA8oJhZAMAZmtsAQQBoEAAABnyZQG2GAAAAYECoAAAAAxMoAAAAAxNNDYBgAJy7J/u69qgUAAAHPFndDOAA6AAAAAOEW5wcgEEAaAAAAAYtXMB+xYAAAAGZXJ0aXNlAAABDREAAAABgAKgIAAAHQWgoAAAHINzdAEAADswAAABAAAQAAUAkRsFAE0cAQCEHAUAlhwBAL0cAAAjgAKwMByMAAFycwANYW1pbHlzZWxlY3RvcgAAAa4cAAAANgAAAXMBBLBgHPgAC6BgAAAcuk9jzEUoOWZlcnV2ADswAAABAAAGAAMA0xADAFETAQAwGgAAEoABAbAwG2YAAXNyFgAAAAEHf9arO1kxoIAAAB0CoDAAABnZoAAAABw3oDAAABnaWC98k3GdoJAAABzNZWRoaXN0dnfzeQMAAAEAAQA6MAAAAQAAAAAAKgAQAAAAqQnfDeAN6g3rDewN0RDSELARsRGyEbMRtBGBEoISjRKOEo8SnhI5E3ET1BbVFtsW3BaKF4sXqReqF6sXrBcXGScZKBkpGWwZDxoeGh8aIBooGhwbYhsAA25mbwAAAVwZAAAAAAlpdGhzb3VyY2UAAAHNHAAAAAgMAADyZhsAAAEAAPoqAgBld/KKFwAAAQAA+s4CAGFpCFkAAAFbGQAAAAhZAADyTRwAAAEAAPrZAgBycwAEb3hlZAAAAQwRAAAA9gQAAISDsGAY3QCbsBAcegAgCiABEQEAAScBAAABNRoAADYSAgDCzqCQAAAZT6CAAAAZUKAgAAAMTlkMaZBMOqBwAAAaAbAgDCkP56CwAAAb3KBAAAAcX7AwGLwApqCAAAAaKbAAFvMAAQACAAjITSNHADowAAABAAAAAAAMABAAAAAdAWcD6wYRB5cLsxCZEpoSmxecFxIZ5hvnHAEBAPMFHAAAAQDMACOAAqCwAAAc8m50EQECyaAAAAAb3GNk8yAYAAABAAEAAQAAOzAAAAEAAB8BBQC1EAAA/xAAAA8RoAADF3sA3xwAAAEAAaBwAAAcv2QBUhsAABOAAqAwAAAZ8WRyAAVlc3R1bgAAAfgbAAAAAA1vcnRtYXBjaGFuZ2VkAAAB2hwAAAAABHRoZXIAAAGNGwAAAAACaW4AAAGDGgAAABKAAgDmcAAAGgBhcwASaXJlY3RhZGRyaGVhcnRiZWF0AAABAh0AAADyg2lja4WACNABAAlpbmtjaGFuZ2UAAAHLGwAAADrKAgGAGdEecT9sdHnyAAEBb2UA8vwWAAAzBQghAAABsBAAAAAAEnZlbnRzdHJlYW1maW5pc2hlZAAA8qAcAAABAAD6+AIAZXMBBAA7MAAAAQAAoQACALUQAAAPEaAAAYMCoHAAABwqoIAAABxQY3MAAAAAAXgDAAABoRgAAAhZAADy3RsAAG8AAPIIcmVxdWVuY3kBAGMBWhkAAAAAEGljaXRpbmd0aHJlc2hvbGQAAAGtHAAAABKAAQKwABetAWt9UDAkdKZscnR2AwAAg4OgQAAAGWswAAKIAAQA84gLAADhDTYDAARpbWl0AAABiRcAAAAIAwAAAcEYAAAA+hkCAGNs8pQJAABEAAAAA2l0aAAAARkYAAAAAAJuaQAA8q8QAADJAgAAA3JvcgAA8ocXAAABAAASgAEBoAAAABp+cmQIBQAAAcobAAAAAAR1cnN0AAAByRsAAADyg29ubgIAYmxuAwBkhoD2kA3EA0fQAAxmAAEWABo7MAAAAQAABwACAJMJAADRCQYAAPqNAgBwc/KAhIMEFASQAQABAQET/R31UQ5z82oJAAABAAEAAA5ydG9uZHJvcGhhbmRsZQAAAbYbAAAAMoABAnkKA9WsIm9lbAAAzMkShcDl9GlV1bV6QNowaF6WBbpUH/fi3ug7/VrLG5tZ9E/DJTtcVuCuUzAt+nDYDgQ1a3A4PpA+ikbUDPcVX7t1EWEjbBYXCk0iqSIw2rSwsBy2ADd77UX4o1M8X1VfEQMBIuPA2OcSJjWp0fIpO5jZK45uJBd7WVZnP50ALUSAB6oPQFgFcAA6MAAAAQAAAAAAHAAQAAAAhgOHA4gDEgfuDO0N7g3vDQoOCw4MDpIOrBIjEyQTJRMlGFQZgxmEGQsaDBpGGkcaSBpJGk8brxssHACAGw7ikAAAAAPj4AAAAATl0AAAAAtCjHtgZsMKRGGfGnJZC+eOESVoWV4L5vc9AR/HPbpsb0MShpAQgO0TnhdY5DehySNLoDmJIN5PqyWX3Rg7hJxLvZ1peIdLSoEjdEfQLfJ2RT5ugk8r5Udq9slMA49tqpl6n2UvcHwNBK37f6lj0rWVsS88wzFqYBdnneNcWAUd7fgZqi0EQjfNakZk3XyUlhCgAAAAAANkuGtyX5823oQ20ql2+l63wOcA0W3fgtVjGXe8SpNs/f1L1QFVBwEdj31hC2T6n3qgAAAADLagAAAAAASgAAAAAAtW8rsgKOl72cGqyVEoLVthYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3opMDEyMzQ1Njg5Pl14eQ==","N":"AM@h","E":"OjAAAAAAAAA=","H":"anqDEil1"},"crateNames":{"N":"f","E":"OjAAAAAAAAA=","H":"xMF0JDKF"},"name":{"N":"AM@h","E":"OjAAAAAAAAA=","H":"0A3wdPuf"},"path":{"N":"BMf","E":"OzAAAAEAADEaDwEAAAIACQAAAAwA+gAIAQAADAEAABIBAAAVAQIAHQECACEBAwAnAc0A9gECAP0BBQAFAgYBDgMAABADCAAaAxkANQMAADcDAAA5AwQAQQMHAEoDAABMAwAAUQMCAFUDAABYAwEAXAMAAF4DAwBjAwQAbwMCAHQDAgB4AwYAgQMCAIUD5QFtBXgB6AYEAO4GCgD6Bg8ACwcAAA0HBgAVBwUAHQe/AOgHAAD8BwQAAwgIAA0IAAAPCAAAEwgBABYISQFhCQMAZgkIAHAJAgB0CQEAdwkFAH4JBQCFCQEAiQkDAI4JAACRCQEAmwkBAJ8JAQCiCQAApwkBAKoJAQCvCQEAtAkBAMMJAADPCdgAqQoEAK8KvQBvCwAAcQsKAH0LDACMCwsAmQsBAJ0LfQAcDAgAJgwCACsMAAAyDAEANwwBADwMAABFDAAATAwBAFMMAABWDAIAWwwBAF4MAABhDAAAYwwAAGYMTwC3DAUAwQwVANgMGQDzDAEA9gwCAPoMyQDKDQIAzg0AANUNAQDYDQAA2g0AANwNAADmDQEA6Q0AAO0NAADwDQIA+A0AAPoNAAACDgAABA4AAAYOAAAKDgAADg4EABUOBwAeDmgAiA4LAJUOAQCYDgAAmg4KAKYOCAK0EAAAvhABAMQQAADLEAAA0BAAANIQAADVEAEA2BAAAN0QAgDlEAAA6RABAPAQAAD0EAEABREAAAgRAQALEQIADxFaAWsSEwCAEgYAiBIAAIoSAgCOEgEAkhIMAKESAACjEgUAqhJ1ACETBQArEwAAMxMBADYTAAA7EwAARRMCAEkTAABMEwAAUBMAAFITAQBYEwAAWxMAAGATAABkEwAAaRMCAG0TAAB4E6oCJhawANkWBwDiFgAA5BYCAOgWmACCFwQAixcBAJYXAACYFwAAnBcAAJ4XAACjFwEAqBcAAKsXAQCwFwAAshcAALYXAQC6FwAAvBf6ALkYBwDFGAEA1xgAANkYAADcGAAA6hgtABkZEgAtGQAANBkBADcZAAA+GQAAQBkDAEcZAgBPGQAAUxkAAFgZHgB4GVIAzRkCANMZBADgGQAA5RkBAOkZAADtGQAA9xkAAPwZAAD+GQAAABpJAEsaAABNGgAAUxoAAFoaAQBdGgAAYBoBAGYaAQBsGgIAcRoAAHUaAAB8GgEAfxrNAE4bDwBfGwYAbBsAAG8bAABxGwAAcxsAAHYbAgB6GwAAfBsAAIAbAQCGGwIAihsAAIwbDwCdGxgAtxsAALkbBADBGwIAyBsUAN4bAQDiGwEA5RsBAOsbAQDvGwAA8xsCAPgbIAAdHAEAIRwAACMcAAAlHAAAKBwQADscAQA+HAAAQBwBAEQcAQBHHAAATBwcAGocAABtHAYAdRwWAJEcAACTHAEAlhwJAKEcAACjHAYArBwZAMgcAADKHA4A2hwfAPscBQACHQUA","H":"EOmx/PcQ"},"entry":{"N":"AK@n","E":"OjAAAAEAAAAAAPkBEAAAAAMABAAFAAYABwAIAAoACwAHAQkBCgELAQ0BDgEPARABEQETARQBGAEbARwBIAElASYB9QH5AfoB+wH8AQMCBAIMAw0DDwMZAzQDNgM4Az4DPwNAA0kDSwNNA04DTwNQA1QDVgNXA1oDWwNdA2IDaANpA2oDawNsA20DbgNyA3MDdwN/A4QDawVsBeYG7Qb5BgoHDAcUBxsHHAfdB94H3wfgB+IH4wfkB+UH5gfnB+kH6gfrB+wH7QfuB+8H8AfxB/IH8wf0B/UH9gf3B/gHAggMCA4IEQgSCBUIYAllCW8Jcwl9CYQJhwmICY0JjwmQCZUJlgmXCZkJnQmeCaEJowmlCaYJqQmtCa4JsQmyCbMJtwm4CbkJugm8Cb0Jvgm/CcQJxgnHCcgJygnLCc0JzgmoCq4KbQtuC3ALfAuKC4sLmAubC5wLGwwlDCoMLwwwDDEMNAw1DDYMOQw6DDsMPQw+DD8MQAxBDEIMRwxKDEsMTgxPDFAMUQxSDFQMVQxZDFoMXQxfDGAMYgy2DL0Mvgy/DMAM1wzyDPUM+QzGDckNzQ3PDdEN0g3TDdQN1w3bDd0N3w3gDeEN4g3jDeQN5Q3oDeoN9Q32DfcN+Q39DQMOBQ4HDgkODQ4TDhQOhw6UDpcOmQ6lDrAQsRCzELUQthC4ELkQuhC7ELwQvRDBEMMQyBDKEMwQzRDOEM8Q0RDTENQQ1xDbENwQ4BDiEOMQ5BDoEOwQ7RDuEPYQ9xD6EPwQ/RD/EAERAhEDEQQRBhEHEQ4RahJ/EokSjRKQEpESnxKgEqISqRIgEycTKBMpEy0TLxMwEzETMhM6Ez0TPhNAE0MTRBNIE0oTSxNNE08TURNUE1UTVhNXE10TXhNlE2gTbxNwE3ETchN0E3UTdhMjFiQWJRbhFuMW5xaBF4cXiheNF5AXkReVF5cXmReaF5sXnRegF6EXohelF6cXqReqF68XsRe0F7UXuRe7F7cYuBjCGMMYyBjJGMoYzRjOGNAY0hjTGNQY1RjWGNgY2hjbGOAY4RjiGOUY5hjnGOkYGBksGS8ZMBkxGTIZMxk6GTsZPxlFGUYZThlQGVIZVRlWGVcZdxnLGcwZ0BnRGdsZ3RnfGeIZ4xnkGegZ6xnwGfQZ9Rn2GfgZ+xlKGkwaURpSGlcaWBpZGlwaXhpfGmIaYxpoGmkaahprGnAadBp2Gngaehp7Gl4bZhtqG3Abcht0G3UbfRt/G4IbgxuEG4UbiRuLG5wbthu/G8AbxxvnG+kb6hvtG/IbGRwbHBwcIBwiHCQcJhwnHDkcPRw/HEIcQxxGHEocaxxsHHQcjByQHJIclRygHKIcqhyrHMccyRzZHPocAR0=","H":"94dHi1UN"},"desc":{"N":"FFi","E":"OzAAAAEAAJ4WsgEAAAsADQA4AEkAvgAJAQIADQEHABgBBAAeAQAAIAEBACUBAQAoAc0A+QEDAAMCBgELAwIADwMDABUDAAAXAwAAGQMAACgDAAA0AwQAPgMCAEIDAABEAwUASwMJAFYDAQBaAwEAXQMAAGIDAABoAxAAewMAAH8DAQCDAwEAiQOsADcEAQA6BAAAPAQCAEAEAQBEBAAARwQAAEkEAABPBAAAUgQCAFYEAABYBAAAWwQAAF8EAAB2BAAAegQBAH0EAQCABAAAggQAAIUEAgCJBAAAiwQDAJAEAACcBAEApAQAAKcEAACqBAAArAQBALAEAAC3BAIAwgQAANAEAQDTBAIA1wQAAN0EAgDhBAAA5AQCAOgEAQDrBAAA7QQAAPMEAQASBQAAFQUAABgFAAAaBQQAIAUAACIFAQA2BQAAOgUBAD8FAABCBQIARgUBAEkFAQBSBQEAVgUAAFoFAABcBQAAXgUOAHAFhwD5BSIA4wYAAOUGAQDoBgAA7AYBAO8GAwD1BgQA/AYJAAoHAAAMBwAAFAcAABcHAQAaBwIAHwe8AN0HAwDiBxYA+gcAAAIIBAAMCAIAEAgCABUIAAAgCCQARghiAKsItQBlCQAAagkCAG8JAABxCQMAfQkAAIQJAACHCQEAigkBAI0JAACPCQIAlQkCAJkJAACdCQEAoQkAAKMJAAClCQEAqQkAAK0JAQCxCQIAtwkDALwJAwDECQAAxgkCAMoJAQDNCQIA1gkBANkJywCmCgIArgoAALAKvgBwCwAAcgsAAHYLBgB+CwEAigsBAI0LAACVCwAAmAsAAJsLAQCiC3YAGgwBAB4MAAAlDAAAKgwAAC8MBwA5DAIAPQwFAEUMAABHDAAASgwBAE4MBwBZDAQAXwwBAGIMAQByDA8AhAwwALYMAAC8DAQAzgwAANcMAADaDAEA3QwCAOMMAgDnDAMA7AwBAO8MAADyDAAA9QwAAPcMAAD5DAAA/QzFAMYNAADIDQEAzQ0CANENBADXDQEA2w0CAN8NBgDoDQAA6g0AAPUNAgD5DQEA/Q0AAAMOAAAFDgIACQ4AAA0OAAASDgIAGg4AAB8OAAAlDlMAew4AAIQOAQCHDgAAkg4AAJQOAACXDgAAmQ4BAJ4OAQClDgAAqA4AAKsOnABLD2MBsBADALUQCADBEAAAwxAAAMgQAADKEA4A2xAFAOIQAwDoEAEA7BACAPAQAAD2EAEA+hAAAPwQAQD/EAAAAREIAA4RoQC9Ea0AbxIFAHcSAQB7EgEAfxIAAIkSAACMEgEAkBIBAJcSAQCaEgAAnRIAAJ8SAQCiEgAAqRIAAKsSAwCxEhMAxhIMANYSSAAgEwAAIhMAACcTAgAtEwAALxMFADYTAAA6EwAAPRMBAEATAABDEwIASBMFAE8TAwBUEwUAWxMEAGUTAABoEwAAbxMDAHQTAgB6E8UARBR9AsUWAgDOFgAA1xYAAOEWAADjFgAA5xYDAO4WBgD2FgAA+RYBAAIXfwCDFwAAhRcAAIcXAQCKFwEAjRcBAJAXAQCVFwkAoBcCAKUXBwCvFwMAtBdkABoYBQAnGDgAYRgMAHIYBQB8GAkAjhgRAKIYDwC3GAEAwhgBAMgYAwDNGAEA0BgAANIYCgDgGAIA5RgCAOkYAADrGAEA8RgAAP4YEQAYGQAAHRkAACQZAgAsGQAALxkJADoZAwA/GQEARRkDAE4ZAABQGQAAUhkBAFUZBQBjGQAAZhkBAGkZAABsGQAAbxkBAHIZAAB1GQAAdxkAAHwZAACHGQEAyxkGANsZAADdGQAA3xkBAOIZBgDrGQAA8BkAAPQZAgD4GQAA+xkCAAAaAAADGgAACBoAAAoaAAANGgEAEhoLACMaAAAnGgAALBoBAC8aAAA2GgIAPBoAAEoaAwBRGgIAVxoMAGYaAABoGgYAcBoBAHQaAAB2GgAAeBoAAHoaAgCDGjAAtRpiAB0bLwBPGwEAVBsCAFobAQBeGwAAYBsBAGYbAQBqGwAAbhsAAHAbBwB6GwAAfRsAAH8bAQCCGwsAkBsAAJkbAwCjGwAApRsAAKgbAgCtGwEAthsAAL8bAgDFGwAAxxsAAMsbAQDVGwEA4BsAAOcbAADpGwQA8hsAAPgbAwAQHAAAFBwAABkcAAAbHAEAIBwJADQcAAA2HAEAORwBAD0cAwBCHAUAShwAAE8cAABRHAQAXxwAAGEcAABlHAAAaxwBAHQcAACMHAEAkBwDAJUcAACbHAAAoBwCAKocAgCvHAEAsxwCAMEcAADDHAAAxxwDANkcAQDuHAIA8hwAAPocAgABHQEABR0AAA==","H":"vyD9XW7A"},"function":{"N":"AHOd","E":"OzAAAAEAABMEfQADAAgABwEfAPUBAQD5AQYAAQIAAAMCAQAMAwEADwMAABkDAAA0AwIAOAMAAD4DAgBJAw8AWgMdAH8DAQCEAwAAawUCAG8FAADmBgIA7QYBAPkGAAAKBwIADgcAABQHAAAbBwEA3AciAAAIEwAVCAAAYAkBAGUJAABvCQEAcwkBAHYJAAB9CQAAhAkBAIcJAQCKCQAAjQkAAI8JAQCTCT0AqAoAAKwKAACuCgEAbQsDAHwLAACKCwIAmAsAAJsLAQCfCwEAGwwBACUMAAApDC4AWQwMALYMAAC9DAQAxAwAANcMAADyDAEA9QwAAPgMAgDEDUkAEw4DAB0OAACHDgAAlA4AAJcOAgClDgAArxBbAA4RAABqEgEAfxIBAIcSAACJEgAAjRIAAJASAgCVEgAAnxIBAKISAACpEgAAIBMAACcTPABlExIAIxYCANcWAQDhFgAA4xYBAOcWAACBFwEAhxc0ALcYAQDBGCgAGBkAACwZFQBEGRUAdxkAAMsZNABKGhwAaBoaAE0bAABeGwEAZhsVAH0bDwCcGwAAtBsAALYbAgC+GwMAxBsEANwbAQDfGwIA5BsTABkcDwA5HAEAPRwOAGgcBAB0HAAAixwIAJUcAACgHAMAqhwCAMUcBQDMHAAA0RwAANgcAQD6HAEAAR0AAA==","H":"ARXtqbbt"},"type":{"N":"BBd","E":"OzAAAAEAAOMa7AAAAAIACQAAAAwA+gAIAQAADAEAABIBAAAVAQIAGwEAAB0BAgAhAQMAJwHbAAUCBgENAwsAGgMbADcDBgBBAwkATAMDAFEDAgBVAwAAWAMBAFwDAABeAwMAYwMEAGoDAABvAwIAdAMKAIADmgMdB78A5AcAAOYHAADoBwAA8gcCAPwHBAADCAgADQgAAA8IAAATCAEAFghmAX4JEACRCQEAlQkAAJsJAQCfCQEAogkAAKcJAQCqCQEArwkBALQJAQDDCQEAzwlZAisMAAAyDAEANwwBADwMAgBFDAAATAwBAFIMAQBWDAIAWwwGAGMMAABmDHAA2AzrAMkNAwDODQEA0g0AANUNAQDYDQAA2g0AANwNAADkDQMA6Q0AAO0NAADwDQIA+A0AAPoNAAACDgAABA4AAAYOAAAJDgEADg6gArEQAACzEAEAthAAALkQAQC+EAEAwRAAAMQQAADLEAAA0BAAANIQAADVEAEA2BAAAN0QAwDiEAEA5RAAAOkQAQDuEAAA8BAAAPQQAQD6EAAA/BAAAAERAQAFEQAACBEBAAsRkwGgEoYAKBMBACsTAAAtEwAAMxMBADYTAAA7EwAAPRMBAEMTAABFEwIASRMAAEwTAABQEwAAUhMDAFcTAQBbEwAAXRMBAGATAABkEwAAaRMCAG0TAAByEwAAdRMAAHgTDwSLFwEAkRcAAJYXAACYFwEAnBcAAJ4XAAChFwAAoxcCAKgXAACrFwEAsBcAALIXAAC2FwEAuhcAALwXBAHFGAEAyBgBANIYAQDXGAAA2RgAANwYAADqGEMALxkAADEZAQA0GQEANxkAADoZAQA+GQAAQBkDAEcZAgBPGQAAUxkAAFgZcgDNGQIA0RkAANMZBADbGQAA3RkAAOAZAADiGQAA5RkBAOgZAQDtGQAA9BkAAPcZAAD8GQAA/hkAAAAaSQBLGgAATRoAAFMaAABXGgAAWhoBAF0aAABgGgMAZhoBAGkaAABsGgIAcRoAAHUaAQB8GgEAfxrnAGobAABsGwAAbxsAAHEbAABzGwAAdhsCAHobAAB8GwEAgBsDAIYbAgCKGwAAjBspALcbAAC5GwQAwRsCAMcbFQDeGwEA4hsBAOUbAgDrGwEA7xsAAPIbAwD4GyAAHRwBACEcAAAjHAAAJRwAACgcEQA7HAEAPhwAAEAcAQBEHAEARxwAAEwcHABqHAAAbRwfAJEcAACTHAEAlhwJAKEcAACjHAYArBwZAMgcAADKHC8A+xwMAA==","H":"5U7BOpbk"},"alias":{"N":"`","E":"OzAAAAEAAAcdAQAAAAcd","H":"p2IVDFMs"},"generic_inverted_index":{"N":"d","E":"OjAAAAAAAAA=","H":"sH1wW0Vq"}}') \ No newline at end of file diff --git a/pr/3367/docs/search.index/type/e54ec13a96e4.js b/pr/3367/docs/search.index/type/e54ec13a96e4.js new file mode 100644 index 0000000000..228be4263a --- /dev/null +++ b/pr/3367/docs/search.index/type/e54ec13a96e4.js @@ -0,0 +1 @@ +rd_("BMg[\"AAAAAAAAAAADPgQAAOkEAACxGwAA\",\"AALsBgAA8hwAADswAAABAACwAAkAiQMsALcDAwC8A3kAqwgAAIALAACWCwAAhBcAABsZAAB/GQAAOjAAAAEAAAAAABIAEAAAAKkIdwl6CYsJiQvvDJoOoA6hDqIOqxIgGCEYIhgiGjMaNBpYG/YcOjAAAAEAAAAAAA8AEAAAALYDuwNxCXkJewmDCZ0Lngv7DKQOExyWHJcc+Rz9HAQdOzAAAAEAADEBDgAnAQAAcgkAANkMAgDdDAIAnQ4AAAwRAABGFGIAvBdcAHEZAAC1GmIAYBsAAK8bAADMGwAA7RwAADowAAABAAAAAAALABAAAAB9C4YS0xIjGVwZdhl6GYEZghmDGYQZpxs7MAAAAQAAGwANAF4FDAAZBwAAqggAAKwIAAB4CQAAeQsCANMMAQDcDAAAmw4AAKMOAADAGAAABxoAAH4cAAA7MAAAAQAAXwASAAUCDgAVAgAAFwIFADMCHABVAgIAWQILAGcCBQCUAgUAnAIDAL4CAACXCwAAfxcBAAYaAAAxHAAATRwBAFQcAQCzHAIAzRwAADowAAABAAAAAAAIABAAAADpBtcJJhOhGLoYXRvuHO8c8Bw6MAAAAQAAAAAABwAQAAAA0wmICyYMJwyeDvwWXBuzGzswAAABAAAHAAIA7hYGAHUZAAACSAAAABMHAAAAAZoSAAABmBwAAA==\"]Cg[\"AAAAAAAAAAABrhwAAAAAAAElAwAAAAAAAAAAAAABGAMAAA==\",\"\"]Io[\"AAAAAAAAAAEQGQAAAQoDAAACGQwAADUcAAAAAcMNAAABSAAAAAABGRkAAAF7GAAAAAAAAAABGAMAAA==\",\"AAAAAAAAAAABCgMAAAIZDAAANRwAAAABww0AAAFIAAAAAAEZGQAAAXsYAAAAAAAAAAEYAwAA\"]1Ag[\"\",\"AAAChA4AAIUOAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+0LAABpEQAARRcAAA==\",\"\"]Bk[\"\",\"AAAAAAAAAAAAADswAAABAAC8AAEASQC8AA==\"]AKo[\"AAAAAzwEAADeBAAA5gQAAAXdBAAAyRYAAMoWAADMFgAAvhwAAAY/BQAAUgUAAA8PAAAQDwAAEw8AABkbAAA6MAAAAQAAAAAACwAQAAAAFQcWB4cPiQ+KD4wPyBbLFs0WzhbTFnYZBKoIAACsCAAAfBIAAAEaAAACPgQAAOkEAAACkgkAACYTAAAH1QkAACYMAAAnDAAAqhIAAPwWAAAqGQAAsxsAAAURBwAAggwAALUYAAAGHQAABx0AAAITBwAAzhsAAALoHAAA6RwAAAOZEgAA9RYAAPYWAAA6MAAAAQAAAAAABwAQAAAA+gZ2HHcceBx5HJgc4RziHA==\",\"AAAAAASmDgAApw4AAKgOAACpDgAAOjAAAAEAAAAAAAgAEAAAANkJ2wndCU8K4AzwDA4ODw6TDgAAAeoGAAAAAaoSAAAAAAAAAfoGAAA=\"]AJk[\"AAACjgQAAHELAAADPAQAAN4EAADmBAAABd0EAADJFgAAyhYAAMwWAAC+HAAAOzAAAAEAAGoACAA/BQAAUgUAABQIAAAPDwEAEw8AALUaYgAZGwAAgxwAADowAAABAAAAAAAMABAAAAAVBxYHhw+JD4oPjA/TEsgWyxbNFs4W0xZ2GQSqCAAArAgAAHwSAAABGgAAAAKSCQAAJhMAAAXVCQAAJgwAACcMAACqEgAA/BYAAAIRBwAAggwAAAITBwAAzhsAAAADmRIAAPUWAAD2FgAAAvoGAACYHAAA\",\"AAAAADswAAABAAAGAAIAHQwAAKYOBQA6MAAAAQAAAAAACQAQAAAAfQPZCdsJ3QlPCuAM8AwODg8Okw4AAXwDAAAC6gYAALYYAAAAAaoSAAAAAAAAAfoGAAAAAAENGgAA\"]Bk[\"\",\"AAAAAAAAAAAAADswAAABAAC8AAEAKAG8AA==\"]Bg[\"\",\"AAAAAAGJDgAAAnQZAAAMGgAAAAELGgAA\"]Ag[\"\",\"AAAAAAABTxwAAA==\"]Ma[\"AAAAAb8YAAACKQMAAIocAAACIQMAAIQSAAADGwgAAIEJAAAZGAAAAioDAACFGQAABR8TAADtFgAAuxgAAKsbAAD3HAAA\",\"AAAAAAAAAAJmGQAAZxkAAARtCQAAbgkAAIAOAACBDgAAAAAB6wwAAAHsDAAAAAAAAAAHcwsAAKELAADFDAAAihIAACETAADlFgAA9xYAAA==\",1]A@m[\"AAAAAdAEAAACiQ4AAGQZAAAEUgUAAAwRAAD7GAAA/BgAAAFfBAAAAXwSAAAAAAHVCQAA\",\"AAAAAASJDgAAnw4AALgRAACPGwAABdYJAACcDgAAcBkAAHQZAAAMGgAABBsIAADUCQAA6gwAAG4ZAAADhRkAAAEaAAALGgAAAAEKGgAAAAAAAAAAAAA6MAAAAQAAAAAACwAQAAAA4wblBq4LrwuwC8ALwQvMC9MLCwwMDBIMAAAAAAAAAAAAAAAAAXwZAAA=\",1]Bc[\"AAAAAAAAAAN2CwAAdwsAAHgLAAA=\",\"\"]Ao[\"AAAAAAEiAwAA\",\"AAAB+AEAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+sLAABnEQAAQxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA84LAAA5EQAAHxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA94LAABREQAAMRcAAA==\",\"\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAARgDAAA=\"]Kk[\"AAAAA4oIAACaDgAAqxIAAAKdCwAAngsAAAKrCgAABRoAAAKvAgAAqgoAAAEHGgAAAgYaAAC0HAAAAl0bAADvHAAAAVwbAAAAAAAAAAAAOjAAAAEAAAAAAAkAEAAAAIwJcQzDDPYM6xZ5GI0YvBhiGSka\",\"AAAAAYoIAAAAAZobAAABUhwAAA==\"]Dk[\"AAAAAosIAADvDAAAAAABswIAAAABtRwAAAHwHAAA\",\"AAAAAYsIAAAAAZsbAAABUxwAAA==\"]Ng[\"AAAAAAAAAAA7MAAAAQAADQADAP0GBACoEAYAfxcBAAQCBwAAAwcAAAQHAAAFBwAABJcSAACYEgAAhxkAAIgZAAA7MAAAAQAABwACAO4WBgB1GQAAAAADmhIAAPUWAAD2FgAA\",\"AAAAAAGfDgAAA9YJAACcDgAAcBkAAAPUCQAA6gwAAG4ZAAAAAAEKGgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwZAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+oLAABlEQAAQRcAAA==\",\"\"]Hc[\"AAAFHgMAAEQEAADtBAAAaQwAAGoMAAAEmxIAAJwSAACyGAAA2xsAAAAAAAAAAh4ZAAAfGQAA\",\"AAAAAAAAAAAAAAAAAAAAAAAABUQDAABFAwAARgMAAJYSAACdEgAA\"]Jk[\"AAAAAAFkGQAAA1IFAAAUCAAAgxwAAALTEgAAshsAAAAAAAAAARMHAAA=\",\"AAAAAAcdDAAAqg4AAKsOAABdGQAAOhoAADsaAAAEHQAAAn0DAADvGAAAAAF8AwAAAbYYAAAAAAAAAAAAAAAERQgAALUMAADWDAAACBoAAA==\"]Ag[\"AAAAAAAAAAE5GgAA\",\"\"]Bk[\"\",\"AAAAATgaAAAAAAAAAAAAAAAAAAAAAAGDFwAA\"]Bg[\"AAAAAAAAASMZAAA=\",\"AAAAAAABlg4AAA==\"]DCc[\"AAAAAAa2AwAAuwMAAHkJAAD7DAAAlhwAAJccAAA7MAAAAQAAkAEIAJMOAADMEQAAehPFAEYUYgBxGQAAhhkAALUaYgBgGwAAOzAAAAEAAHIBFQAUAgAAFgIAAB0CFQBQAgQAWAIAAGUCAQBtAiUAmgIBAKACHQC/AhcA2gICAN4CAQDhAhUA+QIQAH0LAAB+DgEAZxIAAKkUvAB2GQAAgRkDAFEcAgA6MAAAAQAAAAAAOAAQAAAAfANeBV8FYAVhBWIFYwVkBWUFZgVnBWgFaQVqBRkHeAl2C3cLeAt5C3oLewvIDNQM9AyIDosSeRN4GHoYuRi+GMAYFhl7GQsaIRoqGisaORqkG/wbKhxWHGAcYhyCHK0ctxzOHOAc5RznHOwc+BwAHQMdOzAAAAEAAHQAHAAFAg4AFQIAABcCBQAzAhwAVQICAFkCCwBnAgUAlAIFAJwCAwC+AgAACgMAAP0GBACoEAYAHxMAAH8XAQC2GAAAuxgAAGsZAACiGwAAqxsAAC4cAAAxHAAATBwCAFccAABdHAEAsxwCAPQcAAD3HAAAOjAAAAEAAAAAAA0AEAAAANcC9wICBwMHBAcFB5IJJhP7FqEYuhjuHO8c8Bw6MAAAAQAAAAAADQAQAAAAkwLYAtkC3QLgAvgCiAuXEpgS/BYqGYcZiBmzGzswAAABAAAKAAUAEQcAAMMNAADuFgYAtRgAAHUZAAABEwcAAAAFmRIAAJoSAAD1FgAA9hYAABkZAAAD+gYAAHsYAACYHAAAAAAAAAAAAAAAAAAAAAAAAXwZAAA=\",\"AAAAADswAAABAACqAAMAvREOAM0RmQBoEgEAOzAAAAEAACMBAwDMEQAAehPFALwXXAA7MAAAAQAAvQACAGcSAACpFLwAOjAAAAEAAAAAAB0AEAAAAMgMiA6LEnkTeBh6GLkYvhgWGXsZIRoqGjkapBv8GyocVhxgHGIcghytHLcczhzgHOUc5xzsHPgcAB0DHTowAAABAAAAAAALABAAAAAfE7sYaxmiG6sbLhxMHFccXRxeHPQc9xwBuhgAAAAAAAAAAfoGAAA=\"]Og[\"AAAAAysZAAAOGgAAOBwAAARvDgAAcA4AAHEOAAByDgAAOzAAAAEAAA0ABgByCQAAcw4FAHsOAgBgGAAA+xgBAMwbAAABHQMAAAQiDgAAIw4AAOMcAADkHAAAAiMYAADNHAAAAtIbAADTGwAAAAIGHQAABx0AAAAC6BwAAOkcAAA=\",\"AAAAADswAAABAAAuAAcA7wYDAPUGAwDaCQAA3AkAAPgWAAAnGB8ASBgDAAAAAUcYAAA=\"]Jg[\"AAABjQQAAAKtGwAArhsAAAABcRkAAAEbCAAABMgMAAB4GAAAvhgAACEaAAA=\",\"AAAAAAAAAAAAAAAAAAAAAAA6MAAAAQAAAAAABwAQAAAAuRu6G+Ib4xs7HDwcpBylHAYGBwAABwcAAAgHAAAJBwAAJBgAAHkYAAA=\"]Go[\"AAACkAQAAHkOAAACOgMAADsDAAAAAckPAAAABKwIAACFGQAApBsAAAAdAAAD/RgAAJ0cAACeHAAAAAGqEgAA\",\"AAAAAAAAAAAAAAAAAAAAAAABuxsAAAEmGAAA\"]AEo[\"AAABBBwAAAE4GgAAAyIDAAB6DgAASg8AAAEoAwAAAR0DAAAE1AwAALkYAABWHAAA4BwAAAMxHAAAVBwAAFUcAAABoRgAAAGICwAAAgYdAAAHHQAAAALoHAAA6RwAAAA7MAAAAQAABQACAHYcAwDhHAEA\",\"AAACaQkAANYWAAACKAwAABAaAAABExkAAAAAAAAAAAAAAAAAAAFYDAAAOjAAAAEAAAAAACoAEAAAAA4DeAOFA/wGFwceCKYKpwpyC4cLGgwSDpIOuhGMEuAWhRe8GPEYFRkdGSEZJBlaGWIZaRlsGXIZAxojGk8bUBuQG6MbzRvVGzAcMxw0HDYcUBxhHGUc\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+gLAABgEQAAPBcAAA==\",\"\"]Dm[\"AAAAAAACIhkAADUaAAACLAMAAFwZAAACgBkAAAkaAAAAAAHVCQAAAYIMAAABzhsAAA==\",\"\",1]ABg[\"AAAAAAAEeBIAAHkSAAB6EgAAexIAAANfBAAAhBwAAIccAAACfBIAAAkaAAAHzxYAANEWAAAaGwAAGxsAALEbAABNHAAAThwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfBkAAA==\",\"AAAAAAAAADowAAABAAAAAAAIABAAAAAdBx4Hfgt/C9USZhlnGZEblBsD6gYAAG0JAABuCQAAAekGAAAAOjAAAAEAAAAAAAcAEAAAAN0W3xaHGIkYihiMGJ4bnxsAAAA7MAAAAQAABQACAHYcAwDhHAEA\"]Ak[\"\",\"AAAAAAAAAAAB/RgAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAx4OAABMEQAALBcAAA==\",\"\"]Ak[\"AAAAAAHtDAAAAAHqDAAA\",\"\"]Ao[\"AAAAAAAAAAAAAAAB6wwAAA==\",\"\"]Ao[\"AAAAAAAB6wYAAAAAAe0WAAA=\",\"\"]Ic[\"\",\"AAAAAAAAAAA7MAAAAQAACwACAP0GBACoEAYABAIHAAADBwAABAcAAAUHAAAElxIAAJgSAACHGQAAiBkAADswAAABAAAHAAIA7hYGAHUZAAAAAAWZEgAAmhIAAPUWAAD2FgAAGRkAAA==\"]Jk[\"AAAAAAABJA4AAAE7CQAAAyIOAAAjDgAAow4AAAKXCwAArhwAAALXAgAA+AUAAAAAAiUDAADsDAAAAAAAAAAAAAABGAMAAAAAAAAAAAAAAAF8GQAA\",\"AAAAAAAAAAGbDgAAAAH4BQAAA9MJAACeDgAAbRkAAAAAAW8ZAAA=\"]Ao[\"AAAAAAEiAwAA\",\"AAABhRIAAA==\"]Dg[\"AAAAAAABJA4AAAACIg4AACMOAAABrhwAAAAAAAElAwAAAAAAAAAAAAABGAMAAA==\",\"\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAABK8LAAAbEQAA+RYAAAkXAAA=\",\"\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAABLALAAAeEQAA+hYAAAwXAAA=\",\"\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAcwLAAA=\",\"\"]Dc[\"AAAAAAAAAAAAAAAAAAAAAAAABq0LAADSCwAAGBEAAEERAAAGFwAAJBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxEMAACoEQAAdxcAAA==\",\"\"]AFk[\"AAAAOjAAAAEAAAAAAAcAEAAAAPcBZwmCCw0RvRzQHP4c/xwAAAAHixIAAHkTAAB7GQAAfhwAAOccAAD4HAAAAx0AAAQxHAAAVBwAAFUcAACuHAAABPsWAAChGAAAHhkAAB8ZAAABiAsAAAABJQMAAA==\",\"AAEsHAAAADowAAABAAAAAAAMABAAAAC4DLkMig6LDowOjQ6ODo8OiBKGGA4aWBzCHDswAAABAACeAAQAJhabANkWAACZHAAAvhwAADswAAABAAA6AAIADQA4AF8ZAQABgQsAAAEQGQAAAAAAAAAAAAAAADowAAABAAAAAAAJABAAAADiBuQGjAkjDCQMtwzDDBkO6xYpGg==\"]Ac[\"AAAAAAFIDwAA\",\"\"]BHk[\"\",\"AALsBgAA8hwAADswAAABAACwAAkAiQMsALcDAwC8A3kAqwgAAIALAACWCwAAhBcAABsZAAB/GQAAOjAAAAEAAAAAABIAEAAAAKkIdwl6CYsJiQvvDJoOoA6hDqIOqxIgGCEYIhgiGjMaNBpYG/YcOjAAAAEAAAAAAA0AEAAAALYDuwNxCXkJewmdC54L+wykDhMclhyXHPkc/Rw7MAAAAQAAMQEOACcBAAByCQAA2QwCAN0MAgCdDgAADBEAAEYUYgC8F1wAcRkAALUaYgBgGwAArxsAAMwbAADtHAAAOjAAAAEAAAAAAAkAEAAAAH0L0xIjGVwZdhl6GYEZghmDGYQZOzAAAAEAABkACwBeBQwAGQcAAKoIAACsCAAAeAkAAHkLAgDTDAEA3AwAAJsOAACjDgAAwBgAADswAAABAABcABAABQIOABUCAAAXAgUAMwIcAFUCAgBZAgsAZwIFAJQCBQCcAgMAvgIAAJcLAAB/FwEAMRwAAE0cAQCzHAIAzRwAAAfXCQAAJhMAAKEYAAC6GAAA7hwAAO8cAADwHAAAB9MJAACICwAAJgwAACcMAACeDgAA/BYAALMbAAA7MAAAAQAABwACAO4WBgB1GQAAARMHAAAAAZoSAAABmBwAAA==\"]Bk[\"AAAAAAACPwUAAOsGAAAAAAHtFgAAAAHVCQAA\",\"\"]Bc[\"\",\"AAAAAAAAAAAD3hYAAIgYAACLGAAA\"]Bk[\"\",\"AAAAAAAAAAA7MAAAAQAABgACAOIMAwDnDAIA\"]Fg[\"AAAAAAAAAXoZAAABwBgAAAAAAioZAACzGwAAAbUYAAA=\",\"AAAAAAABAhoAAAAAAAAAAAAAAAAAAAQdCAAAkgsAAJMLAAAQDgAA\"]Dk[\"AAAAAAABHwAAAAAAAUoCAAAAAAAAAAAAAAACHQgAAIcLAAA=\",\"AAAAAAAAAAAAAfsWAAA=\"]Lk[\"AAAAAAAAAAEQGQAAAgoDAACCCAAAA9cJAAAZDAAANRwAAAKTAgAAng4AAAHDDQAAAkgAAAAlAwAAAW8ZAAABGRkAAAF7GAAAAAAAAAABGAMAAA==\",\"AAAAAAAAAAACCgMAAIIIAAACGQwAADUcAAAAAcMNAAACSAAAACUDAAAAARkZAAABexgAAAAAAAAAARgDAAA=\"]Ac[\"AAABnAQAAA==\",\"\"]Gc[\"AAAAAAAAAAFHGAAABEAIAACCCQAACAwAAJgRAAAC1wIAAPcCAAAGkwIAANgCAADZAgAA3QIAAOACAAD4AgAAAAHsDAAA\",\"AAAAAAAAAAGvDAAA\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAiYRAAANFwAA\",\"\"]Eg[\"\",\"AAAAAAAAAAA7MAAAAQAAUgAKAAUCDgAVAgAAFwIFADMCHABVAgIAWQILAGcCBQCUAgUAnAIDAL4CAAA=\"]Kg[\"AAAAAdAEAAAAAyQOAAD7GAAA/BgAAAACIg4AACMOAAA=\",\"AAAAOzAAAAEAAC8AAQCEGi8AADswAAABAABPAA4AIAgfAEEIAwCiCwUAsQsOAMkLAADPCwIA2AsCAN8LAwDvCwEA+AsBAP4LAAACDAAABgwBAA0MAwAAAAJACAAACAwAAA==\"]Fg[\"AAAC0wQAACAFAAA=\",\"AAAAAAAAAAAAAAAC8BYAAHUZAAAAAAKaEgAA9hYAAAAAAAbqCwAA7QsAAPELAADzCwAA9gsAAPcLAAA=\"]Ag[\"\",\"AAAAAAAAAbIbAAA=\"]Eg[\"\",\"AAAAAAADmRsAAJobAACbGwAAA1EcAABSHAAAUxwAAAADsxwAALQcAAC1HAAAA+4cAADvHAAA8BwAAA==\"]Ag[\"\",\"AAAAAAABJhkAAA==\"]Ag[\"\",\"AAAAAAABTxwAAA==\"]Ec[\"AAABOgQAAA==\",\"AAAAAAABcw4AAAOHDwAAyBYAANMWAAAAAAABJgwAAAAAAAAAAAACzgsAANcLAAA=\"]Dc[\"AAAC9AQAADoFAAA=\",\"AAAAAAAAAAAAAAAAAAAAAAAAA9sLAAD6CwAAAQwAAA==\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAukLAADuCwAA\"]Ac[\"AAABqgQAAA==\",\"\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAqoLAACrCwAA\"]Ec[\"AAAEGAUAABsFAAAeBQAAQwUAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAABOQLAADlCwAA5gsAAP8LAAA=\"]Eg[\"AAAAAAFEGAAAAz0IAAACDAAAkhEAAALwAgAA8QIAAA==\",\"AAADRAUAAEYFAABHBQAAAAAAAAABIxgAAA==\"]Fc[\"AAABHQUAAAABQxgAAAM8CAAA/gsAAIoRAAAC7gIAAO8CAAA=\",\"AAACQgUAAEMFAAAAAAAAAAAAAAAAAAAAAAAB5wsAAA==\"]Fc[\"AAABGgUAAAABQhgAAAM7CAAA+QsAAIARAAAC6QIAAOoCAAA=\",\"AAACOgUAADsFAAAAAAAAAAAAAAAAAAAAAAAB4wsAAA==\"]Dg[\"AAAAAXwIAAAAAjEAAADuAQAAA4gCAACJAgAAqxgAAA==\",\"AAAAAXwIAAAB6hgAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8ULAAAvEQAAFhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/oLAACDEQAAWxcAAA==\",\"\"]Ak[\"AAAAAAAAAn4OAAB/DgAA\",\"\"]Do[\"AAAAAAACcgkAAGAbAAABsAIAAAAAAAAAAAAAAAAABPcMAACFFwAAJRkAADwaAAA=\",\"AAGiDAAA\"]Ag[\"\",\"AAAAAAAAAAHVEgAA\"]Kc[\"AAAAAAAAAAKjDgAAEBkAAAIKAwAAlwsAAAP4BQAAGQwAADUcAAAAAcMNAAACSAAAAOwMAAAAARkZAAABexgAAAAAAAAAARgDAAA=\",\"AAAAAAAAAWIbAAAAAAP4BQAAGQwAADUcAAAAAcMNAAABSAAAAAAAAXsYAAAAAAAAAAEYAwAA\"]Jg[\"AAAAAzwEAADeBAAA5gQAAATdBAAAyRYAAMoWAADMFgAAAg8PAAAZGwAABIoPAADIFgAAyxYAAHYZAAA=\",\"AAAAAASmDgAApw4AAKgOAACpDgAAB90JAABPCgAA4AwAAPAMAAAODgAADw4AAJMOAAAAAAAAAaoSAAA=\"]ADg[\"AAAAAAG+HAAABD8FAABSBQAAEA8AABMPAAA6MAAAAQAAAAAABwAQAAAAFQcWB4cPiQ+MD80WzhbTFgSqCAAArAgAAHwSAAABGgAAAj4EAADpBAAAApIJAAAmEwAAB9UJAAAmDAAAJwwAAKoSAAD8FgAAKhkAALMbAAAFEQcAAIIMAAC1GAAABh0AAAcdAAACEwcAAM4bAAAC6BwAAOkcAAADmRIAAPUWAAD2FgAAOjAAAAEAAAAAAAcAEAAAAPoGdhx3HHgceRyYHOEc4hw=\",\"AAAAAAAC2QkAANsJAAAAAAHqBgAAAAAAAAAAAfoGAAA=\"]Gm[\"AAAAAAAAAAADPgQAAOkEAACxGwAA\",\"AAAAAAKDCQAABB0AAAAChhIAAKcbAAACBxoAAH4cAAADBhoAAFQcAABVHAAAAukGAABdGwAAAVwbAAAAAUgAAAA=\",1]AIk[\"AAA7MAAAAQAAqgADAIkDLAC3AwMAvAN5ADswAAABAACuAAoArggEALQICAC+CAQAxAhcACMJFwA8CSEAXwkAAFEbAACtGwEABRwAADswAAABAACsAAUAcQkAAEkPAAC9EQ4AzRGZAGgSAQA7MAAAAQAABgACAG8SBQCGGQAAAAMWGQAA/BsAAM4cAAACthgAAPQcAAAB+xYAAA==\",\"ADswAAABAACqAAIAcAWHAPkFIgAAOzAAAAEAAAoABQATAwEAFgMAANQSAAByGAUA3xwAAAHUGwAAAAAAAAGSCQAAAAIRBwAAtRgAAAAAA5kSAAD1FgAA9hYAAAAAAmcaAADSHAAAOjAAAAEAAAAAAA0AEAAAABUDFwMYBx8IpQqNC3EM9gz3DHcS6BbpFuoWjRg=\"]Bk[\"AAAAAAAAAXwCAAAAAAECBwAA\",\"AAAAAdEJAAA=\"]Bo[\"AAAAAZsIAAAAAT0AAAAB2wIAAA==\",\"AAAAAZsIAAA=\"]Bc[\"AAAAAAAAAAN5CwAAegsAAHsLAAA=\",\"\"]Ac[\"AAAAAakKAAA=\",\"\"]Do[\"AAAAAAGDCQAAAAHSAgAAAAF/FwAAAAGXEgAAA+4WAADxFgAA8xYAAA==\",\"AAAAAAABgwwAAA==\"]Dk[\"\",\"AAA7MAAAAQAAvAABALAKvAAAOzAAAAEAALwAAQBmFbwAADswAAABAAC8AAEAqRS8AA==\"]Gc[\"AAAAAfYcAAAAAccSAAACtQIAAIEJAAAAAAAAAAAAAAAAAAcAAgAAbgUAAGgJAADGDAAAkQ4AAIYXAABcHAAA\",\"AAGkDAAAAAABYhgAAAHrBgAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA80LAAA4EQAAHhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA90LAABQEQAAMBcAAA==\",\"\"]Ag[\"\",\"AAAAAAAAAbkRAAA=\"]Ha[\"\",\"AAAAAAGfDgAAA9YJAACcDgAAcBkAAAPUCQAA6gwAAG4ZAAABmw4AAAABChoAAAPTCQAAng4AAG0ZAAAAAAFvGQAAAAAAAAAAAAAAAAAAAAAAAAABfBkAAA==\",1]Do[\"AAAAAZEIAAAAAAG8AgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwZAAA=\",\"AAAAAZEIAAA=\"]Bg[\"AAAAAAAAADswAAABAAAMAAEAXgUMAA==\",\"\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAdgMAAA=\",\"\"]Fg[\"\",\"AAAAAAGQDgAAAAAAAAIeGQAAHxkAAAAGhxgAAIkYAACKGAAAjBgAAJ4bAACfGwAAAAAAOzAAAAEAAAUAAgB2HAMA4RwBAA==\"]Ek[\"AAAAAAAAAd4CAAAAAAAAAAAAAAAAAAO3EQAAyRsAAMobAAA=\",\"AAGwDAAAAAAAAAAAAAAAAAAAAAAAAAGDCwAA\"]Dc[\"AAAAAAAAAAGjDgAAAZcLAAAB+AUAAAAAAewMAAA=\",\"AAAAAAAAAAAAAfgFAAA=\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAUUIAAA=\",\"\"]Ig[\"AAAAAAAEGggAALoMAABlGQAAphsAAALmDAAAuREAAAHTDAAAOzAAAAEAAAYAAgDiDAMA5wwCAAAAAAElAwAA\",\"AAAAA8oMAADLDAAAzwwAAAABMRoAAAAAAAAAAAAAAAAAAALNDAAAzgwAAA==\"]Cc[\"AAAB6wQAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAAAdEMAAA=\"]Fg[\"AAABMAMAAAHSFgAAAdkWAAAAAAAAAdMbAAAAAAAB6RwAAA==\",\"AAAAAAABfQ4AAAAAAAAAAAAAAAAAAAPSDAAAcRgAADIaAAA=\"]Bg[\"AAAAAAAAAAAB/gYAAA==\",\"AAAAAdUMAAA=\"]CHe[\"AAAAADswAAABAAAIAAMAsxgAAEEaAQBEGgUAAxsDAAAvAwAA7RwAAAYdAwAAqgoAAIEZAACCGQAAgxkAAIQZAAAAOjAAAAEAAAAAAA0AEAAAAD4E6QSACc8W0RZrGQYaohsuHEwcVxxdHF4c9BwBoRgAAAFcGwAA\",\"AAAChA4AAIUOAAAAOjAAAAEAAAAAAA0AEAAAAIYOkA6BEoISgxKeEiQT1BbVFtwW8BgTGdQbmRw7MAAAAQAAhgAoAH0DAAAgCB8AQQgDAKILBQCxCw4AyQsAAM8LAgDYCwIA3wsDAO8LAQD4CwEA/gsAAAIMAAAGDAEADQwDALoMAAAPEQUAHxEGADYRAAA7EQIASRECAFMRAwBwEQEAfREAAIARAACKEQAAkhEAAJYRAQChEQMAbxIFAKMSAAClEgEAqBIAACMTAAAlEwAA7xgAAGUZAAB0GQAADBoAAKYbAAA7MAAAAQAAEAACALkRAACiGA8ABPQMAACAGQAAKxoAANEbAAA6MAAAAQAAAAAACwAQAAAAQAgIDOIM4wzkDOUM5wzoDOkMgA6BDpgRAfsWAAAElxIAAJgSAACHGQAAiBkAAAMRBwAA6wwAALUYAAAB7AwAAAAAAAAAOzAAAAEAAKYALwACAgAAOQMAAG4FAAANBwAADwcBABIHAABmCQAAaAkAAHUJAAB8CQAAuwwAAMYMAADuDAAAkQ4AABURCQAmEQ8ANxEDAD4RCgBMEQYAVxEYAHIRCgB+EQEAgREIAIsRBgCTEQIAmREHAKURDgC1EQAAtxEAAH0SAQCkEgAApxIAAMQWAADaFgAAhhcAABEZAQAUGQAAFxkAACAZAAAEGgAAThsAAFMbAACdGwAAyRsBAAYcAAAvHAAA6hwBAA==\",1]Fg[\"AAAAAAAAAAABrhwAAAAAAAElAwAAAAAAAAAAAAABGAMAAA==\",\"AAAAAAAAAAGbDgAAAAAD0wkAAJ4OAABtGQAAAAABbxkAAA==\"]Eg[\"AAAAAAAAAAAAADswAAABAAB5AQIASQC8ACgBvAA=\",\"AAAAAAAAAAAAADswAAABAAB5AQIASQC8ACgBvAA=\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF8GQAA\",\"\"]Hk[\"AAAAAn0IAAC4DAAAAZkcAAACMgAAAL4SAAACigIAAIsCAAAAAAAAAAAAAAAAADowAAABAAAAAAAIABAAAAAjDCQMfRJ+EnkZBBpTG+oc6xw=\",\"AAGeDAAAAAF9CAAAAVkYAAA=\"]Ik[\"\",\"AAAAAAAAOzAAAAEAAKkADgAUAgAAFgIAAB0CFQBQAgQAWAIAAGUCAQBtAiUAmgIBAKACHQC/AhcA2gICAN4CAQDhAhUA+QIQAAAAAtcCAAD3AgAABpMCAADYAgAA2QIAAN0CAADgAgAA+AIAAA==\"]CGa[\"\",\"AAA7MAAAAQAAxQABAOIPxQA7MAAAAQAAxgAIABEPAQAUDzMASw87AIgPAACLDwAAjQ87AMoPEgDeDwMAOzAAAAEAAHAADAB+AwAAGQgAAHsJAADSCQAAbw4DAHoOAACkDgAASA8CAN0PAABMGBMAYRgMAIkZQQA7MAAAAQAAOwASABoIAACDDAAAcw4FAHsOAgCWDgAAnQ4AAA8PAQATDwAAyQ8AALESEwDGEgwAYBgAACYZAAAxGgAAmRsCABQcAABPHAAAuxwBADowAAABAAAAAAAaABAAAAB9C+YMhw+JD4oPjA+GEsgWyxbNFs4W0xYZGCMZehkSGhMaFhoYGhkaGxodGqcbshtRHFIcUxw6MAAAAQAAAAAAEwAQAAAAfAMZB3gJdgt3C3gL3Az0DMAYCxoRGhQaFRoXGhoaHBorGn4c4xzkHDswAAABAABqABgABQIOABUCAAAXAgUAMwIcAFUCAgBZAgsAZwIFAJQCBQCcAgMAvgIAAIIJAADiDAMA5wwCAN4WAAB/FwEAIxgAAIgYAACLGAAAthgAAP0YAAAaGwEAnRwBALMcAgDNHAAAOjAAAAEAAAAAAAwAEAAAAPgFkgnXCSYT+xa6GB4ZHxnSG9Mb7hzvHPAcOjAAAAEAAAAAAAgAEAAAANMJJgwnDPwWKhltGYcZiBmzGzowAAABAAAAAAAUABAAAAARB4IM3RbfFu4W7xbwFvEW8hbzFvQWhxiJGIoYjBi1GHUZnhufGwYdBx0CEwcAAM4bAAADbxkAAOgcAADpHAAABZkSAACaEgAA9RYAAPYWAAAZGQAAOjAAAAEAAAAAAAcAEAAAAPoGdhx3HHgceRyYHOEc4hwAAAAAAAEYAwAA\",1]Be[\"\",\"AAABMwMAAAFZGwAAAAAAAdMMAAA=\",1]Kk[\"\",\"AAACEQ4AAMQcAAA6MAAAAQAAAAAACQAQAAAA7wyaDqAOoQ6iDqsSMxo0Glgb9hwDfwkAAJ0LAACeCwAABesGAACrCgAAhBIAAAIaAAAFGgAAA4EJAACqCgAAgQsAAAMqAwAABxoAANEbAAAFgAkAAO0WAAAGGgAAVBwAAFUcAAAAAAHrDAAA\"]Ck[\"AAAAAoEIAACGGAAAARsOAAABnQ4AAAGPAgAA\",\"AAABfgkAAAGBCAAA\"]Bg[\"AAAAAqIOAABYGwAA\",\"AAAAAAAAAYEJAAA=\"]Fg[\"AAAAAAfHDAAAhg4AAKQOAACCEgAAgxIAAJ4SAADVFgAAAe8YAAAB4QIAAAAAAboYAAA=\",\"AAAAAAAAAacbAAABfhwAAAGCCQAA\"]Dg[\"AAAAAWsIAAAAAiUAAAC8EgAAAVgCAAABYwUAAAFXAgAA\",\"AAAAAWsIAAABVxgAAA==\"]Ag[\"\",\"AAAAAAAAAAHVEgAA\"]Ao[\"\",\"AAAAAAAAAAAAAhkMAAA1HAAA\"]Nc[\"AAABaAwAAAIgDwAAWRsAAAHdDwAAASIZAAAAAAXeFgAAiBgAAIsYAAAaGwAAGxsAAA==\",\"AAA7MAAAAQAASAABANYSSAAEHgwAAB8MAAAgDAAAxRIAADswAAABAABDAAIAiRlBADoaAQAAAAAAAAAAAAAAAAAAOzAAAAEAABAACQAAAAIAEAMCAPMGAQBqCQIAlAsBANgMAAAlGAAAoBgAACcaAAA=\"]Bo[\"AAAAAcUSAAABqg4AAA==\",\"AAAAAAABYBgAAAHNFgAA\"]Ao[\"\",\"AAA7MAAAAQAAxQABAP0MxQA=\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAByxwAAAE3AwAA\"]A@c[\"AAACsAQAANYWAAABYQgAAAMTHAAA+RwAAP0cAAADHgAAAOoBAAA1GgAAAacYAAA6MAAAAQAAAAAACgAQAAAAYgUZB6oIeAl5CyoaYByCHK0c5RzsHAJIAgAASQIAAA==\",\"AAGQDAAAB4sEAACMBAAAjQQAAI4EAACQBAAAeQ4AAAQcAAABYQgAAAR6DgAASA8AAEkPAABKDwAAATUaAAAAA3YLAAD0DAAAKxoAAAAAAAAAAAAAAAABwxYAAA==\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAakLAAA=\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA7wMAABPEQAALxcAAA==\",\"\"]Cg[\"AAAAAAAAAAAAAAAAARMHAAAAAAH6BgAA\",\"AAAAAAAAAAEBGgAA\"]Bc[\"\",\"AAAAAAAAAAAD3hYAAIgYAACLGAAA\"]No[\"AAAF8hgAAGEZAAAmGgAAtBoAALEcAAA6MAAAAQAAAAAACwAQAAAAggubEv0WABftGO4Y+BgkGlEbrBu2HP4cA34DAABsEgAAWxkAAAEUCAAAAXECAAA=\",\"AAJuDAAAmwwAAAXyGAAAYRkAACYaAAC0GgAAsRwAADowAAABAAAAAAALABAAAACCC5sS/RYAF+0Y7hj4GCQaURusG7Yc/hwCbBIAAFsZAAABFAgAAA==\"]Ic[\"AAAC5hYAAAgcAAAH9wEAADsDAACpCgAA/xYAALIYAABXGwAAvRwAAAEZCAAAAAEuAgAAARoaAAA=\",\"AAJrDAAAiwwAAALmFgAACBwAAAf3AQAAOwMAAKkKAAD/FgAAshgAAFcbAAC9HAAA\"]Fg[\"AAACHAgAAGccAAABoggAAAFkGwAAAAH5AgAAAAGxGwAA\",\"AANtDAAAcAwAALEMAAABZxwAAAGiCAAAAWQbAAAAAAABsRsAAA==\"]Fg[\"AAAG6xgAAOwYAAApHAAArxwAALAcAAD8HAAA\",\"ADswAAABAAAFAAIAcgwCAPkbAgAG6xgAAOwYAAApHAAArxwAALAcAAD8HAAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8ALAAApEQAAEBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwMMAACTEQAAaRcAAA==\",\"\"]Ic[\"AAAAAAAAAAA7MAAAAQAACwACAP0GBACoEAYABAIHAAADBwAABAcAAAUHAAAElxIAAJgSAACHGQAAiBkAADswAAABAAAHAAIA7hYGAHUZAAAAAAWZEgAAmhIAAPUWAAD2FgAAGRkAAA==\",\"\"]AFc[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAOjAAAAEAAAAAAHAAEAAAAGYMZwzhDIIOgw6sEq0SrhKvErASQBRBFEIUQxTsFgIXbhhvGL0Y8xgcGWgZcxkAGiUaLBotGi4aLxo2GjcaPRo+Gj8agxpSG1QbVRtWG1obWxuNG5cbmBugG6EbpRuoG6kbqhvLG9Yb1xvYG9kb2hv4G/4b/xsAHAEcAhwDHAccCRwKHAscDBwNHA8cEBwRHBUcFhwXHCscLRwyHDccWRxbHF8cYxxkHGYcchxzHHUcehx7HHwcfxyAHIEcmhybHJwcshy5HLocvxzAHMEcwxzPHNoc2xzcHN0c3hzzHAIdBR0=\"]Ag[\"\",\"AAAAAAAAAAGvDAAA\"]Dk[\"AAAAAAAAAAFHGAAAA0AIAAAIDAAAmBEAAAH3AgAAAfgCAAA=\",\"AAAAAAJ1EgAAdhIAAA==\"]Ck[\"AAACIgUAAEoFAAA=\",\"AAAAAAAAAAAAAAAAAAAAAAAAAuwLAAAJDAAA\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAc0MAAA=\",\"\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAfEMAAA=\"]Cc[\"AAAAAAAAARsIAAAB1AwAAAExHAAAAaEYAAABiAsAAA==\",\"\"]Bc[\"\",\"AAAAADswAAABAAARAAEAjhgRAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/ELAAByEQAATBcAAA==\",\"\"]Ek[\"AAAAAXUYAAAB9QYAAAJyEgAAvRIAAAGHAgAAAAAAAAAAAAAAAAAC4QwAABwZAAA=\",\"AAGdDAAAAAABWBgAAA==\"]Ig[\"AAAAAXYYAAACKQMAAPYGAAACcxIAAIQSAAACwgIAAIEJAAABKgMAAAHtFgAAAAAAAAAAAAAAOjAAAAEAAAAAAA8AEAAAAPMYaBmXG5gbAhwDHA8cKxwtHFscdRx/HIAcgRycHM8c\",\"AAGqDAAA\"]Hg[\"AAAAAXcYAAAB9wYAAAF0EgAAAdUCAAAAAAAAAAAAAAAAADowAAABAAAAAAASABAAAABnDIMOsBJBFEMUbxg+Gtgb2hv/GwEcChwMHBYcZBxzHHwc3BzeHA==\",\"AAGtDAAA\"]Ao[\"\",\"AAAAAAAAAAAAAAABww0AAA==\"]Bg[\"AAAAAAAAAAAB/QYAAA==\",\"AAAAAZUOAAA=\"]Ek[\"AAAAA4AIAABnCQAA/xwAAAKzGAAA6hgAAAABjgIAAA==\",\"AAKgDAAAFw4AAAADgAgAAGcJAAD/HAAAAbMYAAA=\"]Ag[\"\",\"AAACEQ4AAMQcAAA=\"]Bc[\"AAAAAAA7MAAAAQAAXAABALwXXAA=\",\"\"]Bc[\"AAAAAAAAAAAAAAAAAAABmhIAAA==\",\"\"]Ao[\"\",\"AAA7MAAAAQAAEQABAP4YEQA=\"]Ao[\"AAAAAAABAhoAAAAAAAEKGgAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwoMAACdEQAAcBcAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAV0bAAABXBsAAA==\",\"AAEGAQAA\"]Ag[\"\",\"AAAAAAAAAAGFGQAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+wLAABoEQAARBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwkMAACZEQAAbBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+kLAABiEQAAPhcAAA==\",\"\"]Ik[\"AAAAAAAAAAEQGQAAAQoDAAACGQwAADUcAAAAAcMNAAABSAAAAAABGRkAAAF7GAAAAAAAAAABGAMAAA==\",\"AAAAAAAAAWIbAAAAAAIZDAAANRwAAAABww0AAAFIAAAAAAABexgAAAAAAAAAARgDAAA=\"]Ek[\"AAAAAWYIAAAAASAAAAAAAAFPAgAAAAAAAAAAAAAAAh8IAAClCgAA\",\"AAGVDAAAAAFmCAAAAAAAAAAAASoZAAA=\"]Da[\"AAAAAAA7MAAAAQAAYgABALUaYgA=\",\"AAAAAAA7MAAAAQAAXAABALwXXAA=\",1]Bg[\"AAAAAAAAAAABAAcAAA==\",\"AAAAAQsRAAA=\"]Dg[\"AAAAAY0IAAAAAAAAAYAJAAAAAAAAAAAAAAADjgkAAMUMAABwGAAA\",\"AAAAAY0IAAA=\"]Fc[\"AAAAAASFHAAAhhwAAIgcAACJHAAAAhsDAAAvAwAA\",\"AAAAAAHqGAAAApMbAACWGwAAAAAAAAAAAAAAAAAAApIbAACVGwAA\"]Ek[\"AAAAAZMIAAAAAjkAAADOEgAAAb8CAAAAAb4CAAA=\",\"AAAAAZMIAAABaRgAAAAAAAAAAAAAAAAAAAABthEAAA==\"]Dg[\"AAAAAYkIAAAAAAGuAgAAAAGzHAAAAe4cAAA=\",\"AAAAAYkIAAAAAZkbAAABURwAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8cLAAAxEQAAGBcAAA==\",\"\"]Ko[\"AAABIwUAAAABRRgAAAM+CAAABgwAAJYRAAAC8wIAAPQCAAA=\",\"AAACSQUAAEoFAAAAAAAAAAPeFgAAiBgAAIsYAAACHhkAAB8ZAAAAOjAAAAEAAAAAAAcAEAAAAN0W3xaHGIkYihiMGJ4bnxsAAAA7MAAAAQAABQACAHYcAwDhHAEAAAAB6wsAAA==\"]A@k[\"AAABKwMAAAM4GgAAVxsAABIcAAAAASgDAAAABdMMAACIDgAAehgAACocAABiHAAAAmsZAAAuHAAAA/gFAAAeGQAAHxkAAAA6MAAAAQAAAAAABwAQAAAA3RbfFocYiRiKGIwYnhufGwAAADswAAABAAAFAAIAdhwDAOEcAQA=\",\"AAAAAjEDAAAYGwAAAAG6DAAAAAAAAekGAAAAAAAAAAAAAtMcAADxHAAABjIDAAAaBwAA/AwAABoOAAAaGQAAPBoAAA==\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAawLAAA=\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA9wLAABOEQAALhcAAA==\",\"\"]Dg[\"AAAAAS0DAAABngsAAA==\",\"AAAAAAAAAAEHGgAAAAFdGwAAAAAAAAAAAAABDAAAAA==\"]Lo[\"AAACJAMAAG8MAAA6MAAAAQAAAAAABwAQAAAAeAipCNEJiQvPDIgSjhIiGgadCwAAwgwAAG0SAAABFwAA+RgAAF0ZAAACugwAAO0cAAAEcgIAALkRAADTEgAAYhsAAAABzRwAAAAAAYIMAAABzhsAAA==\",\"AAAAAXgIAAADfgMAABsOAAAcDgAAAAAAAQYaAAAAAVwbAAA=\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAaoLAAA=\",\"\"]Ac[\"\",\"AAABahkAAA==\"]Dg[\"AAADgAsAAJYLAACCGAAAAjAaAADCHAAAA3sJAADSCQAAkA4AAAACfQIAABkYAAA=\",\"\"]Ak[\"\",\"AAAAAAAAAAABiBgAAA==\"]Ak[\"\",\"AAAAAAAAAAABixgAAA==\"]Ak[\"AAAAAVIEAAABUwQAAA==\",\"\"]Ao[\"\",\"AAAAOzAAAAEAAAUAAQAaGAUA\"]Mk[\"AAAAAAAAAAACGhsAABsbAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXwZAAA=\",\"AAAAAAAAADowAAABAAAAAAAHABAAAAAdBx4Hfgt/C2YZZxmRG5QbA+oGAABtCQAAbgkAAAHpBgAAADowAAABAAAAAAAHABAAAADdFt8WhxiJGIoYjBieG58bAAAAOzAAAAEAAAUAAgB2HAMA4RwBAA==\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAfQGAAA=\",\"\"]Dk[\"AAACVgUAAFoFAAAAAAABqgoAAAABBhoAAA==\",\"AAABIBoAAAEpGQAAAAAAAAAAAVwbAAA=\"]No[\"AAACTwQAAFYEAAADSAgAAIsOAABAGgAAAAQOAAAA5gEAAKMSAACzEgAAAqMYAACEHAAAAl8FAACRGwAAAgoCAADNHAAAAAABggwAAAHOGwAAAAAAAAADyQwAAKQSAACSGwAA\",\"AAAGGgMAAD8EAABABAAAQQQAAB4aAAAfGgAABUgIAACOEgAAJxkAACgZAABAGgAAAU4YAAAAAmIbAACEHAAAAAI+BAAAzxYAAA==\"]Ko[\"AAACJwMAAPEEAAADhggAAI4OAABDGgAAAAQ2AAAA8AEAAKYSAADDEgAAA6UCAACtGAAAhxwAAAJoBQAAlBsAAAAAAAAAAAAAAAAD0QwAAKcSAACVGwAA\",\"AAADJgMAAOoEAADrBAAAAoYIAABDGgAAAo8SAABeGAAAAAGHHAAAAALpBAAA0RYAAA==\"]Lk[\"AAAAAk0IAADQFgAABEEaAABGGgAAhRwAAJYcAAA6MAAAAQAAAAAACgAQAAAAEgDZDNoM2wzdDN4M3wylEiMTkxuvGwKBGQAAgxkAAAACFwIAAE0cAAA=\",\"AAGIDAAAAU8EAAABTQgAAANBGgAARhoAAIUcAAABGwMAAAABgBkAAAAAAAAAAAAAAAAChgMAAIcDAAA=\"]Jc[\"AAAAAqYIAADSFgAABEQaAABIGgAAiBwAAJccAAAEQwAAAKgSAAAlEwAAlhsAAAMCAwAAghkAAIQZAAAAAU4cAAA=\",\"AAG0DAAAAVYFAAABpggAAANEGgAASBoAAIgcAAABLwMAAAAAAAAAAAAAAAAAAAGIAwAA\"]AAg[\"AAACQAQAAB4aAAADTwgAAL0IAAAnGQAABDoaAABCGgAARxoAAIYcAAACFAAAAMwRAAACHQMAAFwZAAACgBkAAAkaAAACGgIAAJ0cAAAAAAAAAAAAAAAEhgMAAIcDAADMDAAA0AwAAA==\",\"AAADHAMAAFQEAABWBAAAA1IEAABPCAAA0BYAAAVTBAAAkxIAAEIaAABHGgAAhhwAAANlGQAAphsAALscAAAAAeMcAAABGhsAAAHSGwAAAAEGHQAAAAHoHAAAAAAAAAGUEgAA\"]Lc[\"AAABIBoAAAKoCAAAKRkAAAVeCQAAOxoAAEUaAABJGgAAiRwAAAFFAAAAAgcDAABnEgAAAAGeHAAAAAAAAAAAAAAAAogDAADSDAAA\",\"AAACMAMAAFoFAAACqAgAANIWAAADRRoAAEkaAACJHAAAAbwcAAAAAeQcAAABGxsAAAHTGwAAAAEHHQAAAAHpHAAA\"]Bc[\"\",\"AAAAAAAAAAAAAAAAAAAAAXsYAAA=\"]Dk[\"\",\"AAAAADswAAABAAAMAAEAdQwMADswAAABAAAPAAEA5QEPADswAAABAAAPAAEAohgPAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA9sLAABNEQAALRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+MLAABXEQAAMxcAAA==\",\"\"]Ic[\"AAAAAxMDAABKCAAAjA4AAAACEAAAAF8ZAAAAAR0HAAAEDwIAABACAABtCQAAgA4AAA==\",\"AANiCQAAzxsAANAbAAACRwQAAEgEAAACSggAAKESAAAAAngSAAB5EgAAAacbAAABfhwAAA==\"]Gc[\"AAAAAxYDAACWCAAAjw4AAAACOgAAAGAZAAACxAIAAMUCAAABHgcAAAJuCQAAgQ4AAA==\",\"AAFkCQAAAhIFAAATBQAAAZYIAAAAAnoSAAB7EgAA\"]Ho[\"AAACEwUAABUFAAAAAkQaAABFGgAAAy8DAAB6EgAAYBkAAAMsAwAAqgoAAIIZAAAAAoEOAAAGGgAAAAFcGwAA\",\"AAAAAAKGDgAAgxIAAAGoEgAAAAEeBwAAAAAAAAAAAAAAAAFDAwAA\"]Mo[\"AAACSAQAAEkEAAADSQgAALMIAABAGgAAAkEaAABCGgAABg8AAADnAQAAGwMAAHkSAAC0EgAAXxkAAAKkGAAAgRkAAAFgBQAABQsCAAAMAgAAPgQAAIAOAADPFgAA\",\"AAABRAQAAAFJCAAAAnEOAABPGAAAAqMSAAClEgAAAacbAAACHQcAAH4cAAAAAekGAAAAAAAAAAAAAAJBAwAAQgMAAA==\"]Gg[\"AAAAAocIAABDGgAAASIJAAADNwAAAPEBAADEEgAAA6YCAACnAgAArhgAAAFpBQAAAukEAADRFgAA\",\"AAAB7QQAAAGHCAAAAV8YAAACdg4AAKYSAAA=\"]Ck[\"AAAAA3QLAAB1CwAAIRgAAAF5CQAAAAAAA94WAACIGAAAixgAAA==\",\"\"]Go[\"AAAE+AEAAIwEAABpCQAAhRIAAAF0CAAAAAIsAAAA6wEAAAGoGAAAAmQFAAB7CwAAAmsCAABsAgAA\",\"AAABsAQAAANGAAAARwAAAHQIAAABIgMAAAAAAXgLAAA=\"]Eo[\"AAAAAAAAAAAAAAA6MAAAAQAAAAAABwAQAAAA3RbfFocYiRiKGIwYnhufGwAAADswAAABAAAFAAIAdhwDAOEcAQA=\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAokRAABhFwAA\",\"\"]Ak[\"AAAAAVIEAAABUwQAAA==\",\"\"]Fk[\"AAAAAWIIAAAAAAAAAUsCAAAAAAAAAAAAAAADDgMAAB4IAAC6EQAA\",\"AAGRDAAAAAFiCAAAAAAAAAAAAAAAAAAAAAACIQwAACIMAAA=\"]Go[\"AAAAAk4IAAC2HAAAA9oJAABGGgAARxoAAAMTAAAA6QEAAO0cAAACphgAAIMZAAABYQUAAAIYAgAAGQIAAA==\",\"AAAAAk4IAAAgDwAAAnIOAAAkEwAAASMTAAA=\"]Fo[\"AAAAAacIAAAD3AkAAEgaAABJGgAAAkQAAAD0AQAABAMDAAAEAwAAsRgAAIQZAAABagUAAA==\",\"AAAAAacIAAAB3Q8AAAJ4DgAAJRMAAA==\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAtYLAAAVDAAA\"]Bg[\"AAAAAAAAAAAB/wYAAA==\",\"AAAAAXgTAAA=\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAYYJAAA=\"]Dk[\"AAAAAAEyGAAAAysIAAC+CwAAJBEAAAKAAgAAgQIAAA==\",\"AAABwgQAAAAAAAABfAMAAA==\"]Fk[\"\",\"AAAAAAA7MAAAAQAAIwANAA8RBQAfEQYANhEAADsRAgBJEQIAUxEDAHARAQB9EQAAgBEAAIoRAACSEQAAlhEBAKERAwAAAAGYEQAA\"]Co[\"AAAAAAEwGAAAAykIAAC8CwAAIhEAAAJ3AgAAeAIAAA==\",\"AAAAAAF+AwAA\"]Ag[\"\",\"AAAAAAABJhkAAA==\"]Ak[\"AAAAAAAAAn4OAAB/DgAA\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAArsRAABxGAAA\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAArwRAAAyGgAA\",\"\"]Gk[\"AAAAAaAIAAAAAkEAAACGGQAAAe0CAAAAAAAAAAAAAAAAAAMCAgAAEA4AACAZAAA=\",\"AAAAAaAIAAAAAj8FAACGGQAAAAAAAAAAAAAAAAAAArsRAAC8EQAA\"]Fg[\"AAABHAUAAAABPhgAAAM3CAAA4gsAAFYRAAACzwIAANACAAA=\",\"AAADIAUAACIFAAAjBQAAAAAAAAAAAAAAAAAAAAAAAegLAAA=\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAfMGAAA=\",\"\"]Hc[\"AAAAAAFkGQAAAycBAADZDAAADBEAAAFfBAAAAAHiDAAA\",\"AAAAAAAABxIaAAATGgAAFhoAABgaAAAZGgAAGxoAAB0aAAAGERoAABQaAAAVGgAAFxoAABoaAAAcGgAA\"]Ic[\"AAAAAY8IAAABfwkAAAHMEgAAAboCAAABKgMAAAAAAAAAAAAAAAA6MAAAAQAAAAAABwAQAAAABgcSB3wJ1gzuDLERJRgmGA==\",\"AAAAAY8IAAABZxgAAAAAAAAAAAAAAAAAAAABAAIAAA==\"]Bk[\"AAAAA6AOAADbFgAAMxoAAA==\",\"AAAAAAF/CQAA\"]Mk[\"AAAAAAAAOzAAAAEAAKkADgAUAgAAFgIAAB0CFQBQAgQAWAIAAGUCAQBtAiUAmgIBAKACHQC/AhcA2gICAN4CAQDhAhUA+QIQAAA7MAAAAQAAUgAKAAUCDgAVAgAAFwIFADMCHABVAgIAWQILAGcCBQCUAgUAnAIDAL4CAAAC1wIAAPcCAAAGkwIAANgCAADZAgAA3QIAAOACAAD4AgAA\",\"\"]Gc[\"AAABiwQAAAGdCAAAAAE+AAAAAeYCAAA=\",\"AAAAAj0DAACdCAAAAALJDwAAFBwAAAAAAAAAAAAAAAAAAAULAwAAHw4AAMUWAADGFgAAxxYAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+cLAABfEQAAOxcAAA==\",\"\"]Cc[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAw4cAABaHAAAfRwAAA==\"]Ck[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAABSITAABEFAAARRQAAGMZAABhGwAA\"]Cg[\"AAABNgUAAA==\",\"AAAAAAABnQ4AAAAAAAAAAAAAAAAAAAHyCwAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/ILAAB0EQAAThcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/MLAAB3EQAAURcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8QLAAAuEQAAFRcAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAjIRAAAZFwAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA84MAAAdEQAACxcAAA==\",\"\"]Ac[\"AAAAAR8MAAA=\",\"\"]Ac[\"AAAAASAMAAA=\",\"\"]Dc[\"AAAAAAAAAAAAAAAAAAAAAAAABhcRAABAEQAA6BYAAOkWAAAFFwAAIxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA6cRAADqFgAAdhcAAA==\",\"\"]Hg[\"AAAAAWQIAAAAAAAAAU0CAAAAAAAAAAAAAAA6MAAAAQAAAAAACQAQAAAAMgOFA+AWJBgVGSEZzRswHDMcUBw=\",\"AAGTDAAAAAFkCAAAAAAAAAAAAAAAAAAAAAAB+wYAAA==\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAagLAAA=\",\"\"]Ok[\"AAADGgMAABwDAABBBAAABUYIAACtCAAAjgsAAB4MAADQFgAAAXUSAAAGDQAAAOUBAADZCQAA3QkAAA4OAACxEgAAAaIYAAABXgUAAAQFAgAABgIAAD4EAADPFgAAAdIbAAABJgwAAAAAAegcAAA=\",\"AAABNwQAAAJGCAAAjwsAAAJvDgAATBgAAAR7DgAAfA4AAA8PAAAQDwAAAcgWAAAAAAAAAAAAAAAAAAPJDAAAzAwAANAMAAA=\"]Jk[\"AAABJgMAAAKECAAAkAsAAAIhCQAAdhIAAAY1AAAA7wEAANsJAABPCgAADw4AAMESAAADoAIAAKECAACsGAAAAWcFAAAC6QQAANEWAAAAAScMAAA=\",\"AAAB4QQAAAKECAAAkQsAAAFcGAAAAXQOAAADiQ8AAIoPAADLFgAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/QLAAB4EQAAUhcAAA==\",\"\"]Gk[\"AAACegQAAIIEAAABXAgAAAACGQAAALMLAAAAAAI8AgAAPQIAAA==\",\"AAADewQAAH0EAAB+BAAAAVwIAAAAAAAAAAH7FgAAAAIRBwAAtRgAAAAAAZkSAAA=\"]Ao[\"\",\"AAAAAAAAAAAAAAAB6wwAAA==\"]Cc[\"AAABRgUAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAAAQUMAAA=\"]Dc[\"AAAAAAE8GAAAAzUIAADgCwAAVBEAAALLAgAAzAIAAA==\",\"AAACGgUAABsFAAA=\"]Ck[\"AAAAA3sIAAChEgAA/RYAAAABMAAAAAGGAgAA\",\"AAH9GwAAAAF7CAAA\"]Io[\"AAABRwQAAAFLCAAAAAQRAAAA6AEAAHgSAAC1EgAAAaUYAAAAAhECAAASAgAAAAAAAAAAAAAAAkEDAAANBwAA\",\"AAVtHAAAbhwAAG8cAABwHAAAcRwAAAFJBAAAAUsIAAABUBgAAAAAAAJtCQAAgA4AAA==\"]Hc[\"AAABEgUAAAGXCAAAAAQ7AAAA8gEAAHsSAADREgAAA8YCAADHAgAArxgAAAAAAAAAAAAAAAAAAkMDAAAPBwAA\",\"AAABFQUAAAGXCAAAAWwYAAAAAAACbgkAAIEOAAA=\"]Ac[\"\",\"AAAAAAHtDAAA\"]Ao[\"AAAAAAAAASwDAAAAAZ4cAAA=\",\"\"]Ic[\"AAAABRcIAABHCAAAjwsAAP8WAAAAFwAAA5kLAACmDgAAbhIAAAGyEgAAARUHAAAAAgkCAACdHAAA\",\"AAABPQQAAAI8BAAARwgAAAVwDgAAyRYAAP4WAAABFwAATRgAAAETDwAAAX4OAAA=\"]Fk[\"AAAAAoUIAACRCwAAApoLAACpDgAAAcISAAACpAIAABYHAAA=\",\"AAAB6AQAAALmBAAAhQgAAALMFgAAXRgAAAF1DgAAAn8OAACMDwAA\"]Co[\"AAAAAAE7GAAAAzQIAADfCwAAUxEAAALJAgAAygIAAA==\",\"AAABGAUAAA==\"]Bk[\"AAAAAAAAAAAAAAEmDAAA\",\"AAAAAAAAARUHAAA=\"]Jg[\"AAAAAYMIAAADHQwAAKcOAACoDgAABTQAAADgDAAA8AwAAMASAAAmGQAAAAAEnAIAAJ0CAACeAgAAnwIAAAABJwwAAA==\",\"AAAB3wQAAALeBAAAgwgAAAPdBAAAyhYAAFsYAAACcw4AABkbAAADFgcAAIcPAADTFgAA\"]Cc[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAOzAAAAEAAHsAAQADF3sA\"]Dg[\"AAAAAAAAAAAAAAHdAgAAAAAAAAAAAASBAwAAfhkAACgaAAAcGwAA\",\"AAABhBcAAA==\"]Cg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAABK0LAADSCwAA/QsAABEMAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwUMAACVEQAAaxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+YLAABeEQAAOhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/8LAACMEQAAYxcAAA==\",\"\"]Go[\"AAAAAowIAACfHAAAAAADtAIAAIEJAACBCwAAAioDAADRGwAAAAAAAesMAAA=\",\"AAAAAowIAACfHAAAASkDAAABhBIAAAAAAe0WAAAAAAAAAAAAAAABjgkAAA==\"]LFa[\"AAA7MAAAAQAAcQEDAP0MxQCsDmIA1hJIADswAAABAADvATYARgABABMDAQAWAwAAMQMAAD0DAABGCDsAgwgmAK0IAACzCAAAvQgAAHcJAAB6CQAAiQkAAIsJAADRCQAA3glwAFAKVACtCgAAiQsAAI4LAwAeDAIAKAwAALgMAQDKDAEAzwwAANUMAAAlDkkAig4FAJUOAAALEQAAiBIAAI4SAAChEgAAxRIAANQSAAB4EwAA2xYAABoYCAByGAUAhhgAAPoYAAAnGQIAKxkAAHgZAAAOGgAAEBoAACIaAAAwGgAAhBovABgbAAA4HAAAWBwAAMIcAADfHAAAOzAAAAEAAC4CPwC2AwAAuwMAAFMEAADdBAAA7wYDAPUGAwDDCAAAIQkBAF4JAABxCQAAeQkAANoJAADcCQAAmQsBAB0MAAB1DAwAwgwAAMcMAADtDAAA+wwAABsOAQBvDgMAhg4AAJAOAACfDgAApg4FALgRAABtEgEAdRIBAIESAgCPEgAAkxIAAJ4SAAAkEwAAZhW8ACYWmwDJFgEAzBYAANQWAQDZFgAA3BYAAPgWAAD+FgAAARcAACcYHwBIGAMAjhgRAOoYAADwGAAA9BgAAPkYAAATGQAAXRkAAIkZQQA6GgEAjxsAANQbAAATHAAAlhwBAJkcAAC+HAAA+RwAAP0cAAA7MAAAAQAAFANWAA0AOAAnAQAA5QEPAH0DAAAgCB8AQQgDAHIJAADWCQAA2QkAANsJAADdCQAATwoAAKILBQCxCw4AyQsAAM8LAgDYCwIA3wsDAO8LAQD4CwEA/gsAAAIMAAAGDAEADQwDAIMMAAC6DAAA2QwCAN0MAwDwDAAADg4BAHMOBQB7DgIAkw4AAJYOAACcDgEADw8BABMPAAAMEQAADxEFAB8RBgA2EQAAOxECAEkRAgBTEQMAcBEBAH0RAACAEQAAihEAAJIRAACWEQEAoREDAMwRAABvEgUAoxIAAKUSAQCoEgAAsRITAMYSDAAjEwAAJRMAAHoTxQBGFGIAvBdcAGAYAADvGAAA+xgBACYZAABfGQEAZRkAAHAZAQB0GQAAhhkAAAIaAAAMGgAAMRoAALUaYgBgGwAAkxsAAJYbAACZGwIAphsAAK8bAADMGwAATxwAALscAQDtHAAAOzAAAAEAAKEBMAAUAgAAFgIAAB0CFQBQAgQAWAIAAGUCAQBtAiUAmgIBAKACHQC/AhcA2gICAN4CAQDhAhUA+QIQAB0DAAAVBwEAOwkAANQJAAB9CwAAgQsAAOYMAADqDAAAfg4BAIcPAACJDwEAjA8AALkRAABnEgAA0xIAAKkUvADIFgAAyxYAAM0WAQDTFgAAohgPACMZAABcGQAAbhkAAHYZAAB6GQAAgRkDABIaAQAWGgAAGBoBABsaAAAdGgAAYhsAAFEcAgA6MAAAAQAAAAAAVwAQAAAAKgN8A14FXwVgBWEFYgVjBWQFZQVmBWcFaAVpBWoFGQcdBx4HqgisCHgJdgt3C3gLeQt6C3sLfgt/C8gM0wzUDNwM9AwiDiMOiA6bDosS1RJ5E0cYeBh6GLkYvhjAGBAZFhlmGWcZexmAGYUZARoLGhEaFBoVGhcaGhocGiEaKhorGjkakRuUG6Qb0Rv8GyocVhxgHGIcghytHLcczhzgHOMc5BzlHOcc7Bz4HAAdAx07MAAAAQAAkQAwAAUCDgAVAgAAFwIFADMCHABVAgIAWQILAGcCBQCUAgUAnAIDAL4CAAAKAwAAPgQAAOkEAADqBgAA/QYEAEAIAACCCAAAbQkBAJcLAAAIDAAA4gwDAOcMAgCADgEAqBAGAJgRAAAfEwAA3hYAAH8XAQAjGAAAiBgAAIsYAAC2GAAAuxgAAP0YAABrGQAAohsAAKsbAAAuHAAAMRwAAEwcAgBUHAEAVxwAAF0cAQCdHAEAsxwCAM0cAAD0HAAA9xwAADowAAABAAAAAAAVABAAAADXAvcC6QYCBwMHBAcFB5IJ1wkmE/sWoRi6GB4ZHxkKGl0b0hvTG+4c7xzwHDowAAABAAAAAAAUABAAAACTAtgC2QLdAuAC+ALTCYgLJgwnDJ4OlxKYEqoS/BYqGW0ZhxmIGVwbsxs6MAAAAQAAAAAAFgAQAAAAEQeCDOsMww3dFt8W7hbvFvAW8RbyFvMW9BaHGIkYihiMGLUYdRmeG58bBh0HHQMTBwAA7AwAAM4bAAADbxkAAOgcAADpHAAABZkSAACaEgAA9RYAAPYWAAAZGQAAOjAAAAEAAAAAAAgAEAAAAPoGexh2HHcceBx5HJgc4RziHAAAAAAAAAAAAAAAAAAAAAF8GQAA\",\"AAABqQwAADswAAABAACpAQkArQgVAMQIXAAjCRcAPAkhAF8JAADeCXAAUApUABoYBQCEGi8AOzAAAAEAAKcBGQDvBgMA9QYDAMMIAAAhCQEAXgkAANoJAADcCQAAmQsBAMIMAADHDAAAGw4BAL0RDgDNEZkAaBIBAG0SAACPEgAAkxIAAGYVvAD4FgAA/hYAAAEXAAAnGB8ASBgDAPQYAAD5GAAAOzAAAAEAAEoBKwAgCB8AQQgDANkJAADbCQAA3QkAAE8KAACiCwUAsQsOAMkLAADPCwIA2AsCAN8LAwDvCwEA+AsBAP4LAAACDAAABgwBAA0MAwDgDAAA8AwAAA4OAQAPEQUAHxEGADYRAAA7EQIASRECAFMRAwBwEQEAfREAAIARAACKEQAAkhEAAJYRAQChEQMAzBEAAKMSAAClEgEAqBIAACMTAAAlEwAAehPFAJMbAACWGwAAOzAAAAEAAL4AAwA7CQAAZxIAAKkUvAA6MAAAAQAAAAAAJAAQAAAAHQceB34LfwvIDIgOixJ5E0cYeBh6GLkYvhgWGXsZIRoqGjkakRuUG6Qb/BsqHFYcYBxiHIIcrRy3HM4c4BzlHOcc7Bz4HAAdAx06MAAAAQAAAAAAEwAQAAAA6gZACG0JbgkIDIAOgQ6YER8TuxhrGaIbqxsuHEwcVxxdHF4c9Bz3HALpBgAAuhgAAAAAAAAAAfoGAAAAOjAAAAEAAAAAABgAEAAAAEcDSANZA/8HZBNCGUMZfBu1G7wbvRvCG8MbGByUHKYcpxyoHKkcuBzUHNUc1hzXHOYcBLwMAAAeDgAA+RYAAPoWAAA=\",1]Eg[\"AAAAAAADmRsAAJobAACbGwAAA1EcAABSHAAAUxwAAAADsxwAALQcAAC1HAAAA+4cAADvHAAA8BwAAA==\",\"\"]Ck[\"AAAAAAAAAAAAAAHgAgAA\",\"AAAAAAAAAAAAAAAAAAAAAAAAAYEDAAA=\"]Co[\"AAAAAAAAAdMCAAAAAYAXAAAAAAPvFgAA8hYAAPQWAAA=\",\"AAAAAAGDCQAA\"]Gc[\"AAAAAAABcBkAAAN/AgAAhhIAAG4ZAAACfAMAAAsaAAAAAQQHAAABbRkAAAAAAW8ZAAA=\",\"AAAAAAHSCQAAAAKGEgAAGRgAAAAAAAAAAc4bAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8ELAAAqEQAAERcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8oLAAA3EQAAHRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwQMAACUEQAAahcAAA==\",\"\"]Cc[\"AAAAAAAAAAABVRwAAA==\",\"AAAAAAAAAAEHGgAAASMYAAA=\"]Ng[\"AAAAOjAAAAEAAAAAAAoAEAAAADEDegiJCa0K1QyVDgsR1BJ4E3gZ3xwG8BgAAI8bAADUGwAAExwAAPkcAAD9HAAABX0DAADWCQAAdBkAAAwaAAAxGgAAA4MCAADUCQAAehkAAAGqCAAAAVQcAAAB1wkAAAHTCQAAAAAAAAGYHAAA\",\"AAAAAXoIAAAAAAGGEgAAAAEGGgAAAAFtGQAAAYIMAAAAAW8ZAAA=\"]Co[\"AAAAAWcIAAAAAiEAAAC5EgAAAlACAABRAgAA\",\"AAAAAWcIAAABVBgAAA==\"]Fc[\"AAAAAigMAAAQGgAAAokOAAC4EQAAAXEZAAAAAdQMAAABMRwAAAGhGAAAAYgLAAA=\",\"AAAAAAK4EQAAjxsAAAABGwgAAA==\"]Eg[\"AAAAAXUIAAAAAi0AAADsAQAAAm0CAACpGAAAAWUFAAAAAAAAAAAAAAAAAjwDAAB6AwAA\",\"AAAAAXUIAAA=\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAApQSAAAUGQAA\",\"\"]Ek[\"AAAAAZAIAAABfwkAAAECGgAAAbsCAAAAAAEKGgAA\",\"AAAAAZAIAAAAAAABKgMAAAAAAAAAAAAAAAABcBgAAA==\"]Kc[\"AAAAAWMIAAAAAAAAAUwCAAAAAAAAAAAAAAA6MAAAAQAAAAAAGAAQAAAAeAP8BnILGgwSDpIOjBLxGB0ZJBlaGWkZbBlyGQ0aIxpPG1AbkBujG9UbNBw2HGEcZRw=\",\"AAGSDAAAAAFjCAAAAAAAAAAAAAAAAAAAAAACIA4AACEOAAA=\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAB3hsAAA==\"]Eg[\"AAAAAZQIAAAAAc8SAAABwAIAAAABgAkAAAAAAAAAAAAAAAIHBwAAshEAAA==\",\"AAAAAZQIAAABahgAAA==\"]Cg[\"AAAAAqEOAAA0GgAAAoESAADUFgAA\",\"AAAAAAAAAAABgAkAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA0YDAABqEQAARhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8ILAAArEQAAEhcAAA==\",\"\"]Bc[\"\",\"AAAAAAA7MAAAAQAABQABAG8SBQA=\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAApoRAABtFwAA\",\"\"]Ac[\"AAABPwQAAA==\",\"\"]Fg[\"AAAB6gQAAAGICAAAAqsOAACPEgAAAjgAAADGEgAAAqoCAACrAgAA\",\"AAACJwMAAPEEAAABiAgAAAFhGAAAAXcOAAABzhYAAA==\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAY4bAAA=\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAigRAAAPFwAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwsMAACfEQAAchcAAA==\",\"\"]Do[\"AAAAAAEpGAAAAyIIAACkCwAAEREAAAAAAhsCAAAcAgAA\",\"AAABWAQAAAAAAbscAAAAAAEaGwAA\"]Fc[\"AAAAAAE6GAAAAzMIAADaCwAASxEAAAKsAgAArQIAAA==\",\"AAAC8wQAAPQEAAACKxkAADgcAAAAAWAYAAACzRYAAM4WAAA=\"]Do[\"AAAAAAFLGAAAA0QIAAAQDAAApBEAAAIIAwAACQMAAA==\",\"AAABXAUAAAAAAbwcAAAAAAEbGwAA\"]Dg[\"AAABWwQAAAABLBgAAAMlCAAApwsAABQRAAACJgIAACcCAAA=\",\"AAAAAAAAAAHcDAAA\"]Cc[\"AAAAAaEIAAAAAAHyAgAAAAEjGAAA\",\"AAAAAi0DAAChCAAA\"]Ec[\"AAAAAX8IAAABsxgAAAABjQIAAAAAAAAAAAAAAAAABAwAAADiBgAA5AYAAF4ZAAA=\",\"AAAAAX8IAAA=\"]Ck[\"AAAAAAAAAdwCAAAAAAAAAAAAAAAAAAK0EQAAfRkAAA==\",\"AAG0GAAA\"]Ao[\"AAAAAAAAAAAAAAAB6wwAAA==\",\"\"]Fc[\"AAAAAkYAAAC5DAAAAbYDAAAAAAIZBwAAKxoAAAI5AgAAthgAAAH7FgAAAfwWAAACEQcAALUYAAAAAAKZEgAAmhIAAA==\",\"\"]Do[\"AAABewQAAAFdCAAAAAIaAAAAtAsAAAAAAj4CAAA/AgAA\",\"AAABgAQAAAFdCAAAAAAAASsaAAA=\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAvwMAAAaGQAA\",\"\"]Bo[\"AAABahkAAAAAAAAAAjcCAAA4AgAA\",\"AAAAAAF7CQAA\"]Gg[\"AAAAAUcAAAABuwMAAAGWDgAAAn0LAAAjGQAAA3gJAAD0DAAAwBgAAAFCAgAAApIJAAAmEwAAAioZAACzGwAAAvAWAAB1GQAAAAAC9RYAAPYWAAA=\",\"\"]Bg[\"AAAAAAA7MAAAAQAAIAACALESEwDGEgwA\",\"\"]Bk[\"AAACPQQAAOgEAAA=\",\"AAAAAAKZCwAAmgsAAA==\"]AAc[\"AAACYxsAAGUbAAAABWQbAACFHAAAhhwAAIgcAACJHAAAAxsDAAAvAwAAqwoAAAKEHAAAhxwAAAEHGgAAOjAAAAEAAAAAAAcAEAAAAD4E6QTPFtEWIxixG00cThw=\",\"AAAAAtsWAAAwGgAAB4ESAACCEgAAnhIAANQWAADVFgAA3BYAAF0ZAAACkxsAAJYbAAAAApEbAACUGwAAAAFdGwAAAAAAAAAAAAA6MAAAAQAAAAAABwAQAAAAeQN6A3sDtBHiFg8aKBocGw==\"]Do[\"AAAAAAE/GAAAAzgIAADvCwAAcBEAAALiAgAA4wIAAA==\",\"AAAAAAAAAacbAAABfhwAAAGCCQAA\"]Cc[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAA4MDAAAXDAAAGAwAAA==\"]Ak[\"AAAAAAAAAAABuxgAAA==\",\"\"]Gk[\"AAAAAV8IAAAAAhwAAAC2CwAAAAACQwIAAEQCAAA=\",\"AAADhQQAAIYEAACHBAAAAV8IAAAAAAABwBgAAAACkgkAACYTAAACKhkAALMbAAAAAAAB9RYAAA==\"]Gk[\"AAAAAAE0GAAAAy0IAADJCwAANhEAAAKRAgAAkgIAAA==\",\"AAAE0QQAANMEAADUBAAA1QQAAAHQBAAAAAEkDgAAAAAAAdcJAAAC0wkAAG0ZAAAAAAFvGQAA\"]Ec[\"AAAAAAAAAAABgggAAAHXCQAAApMCAACeDgAAAAABbxkAAA==\",\"AAAAAAAAAAABgggAAAAAAAElAwAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8MLAAAsEQAAExcAAA==\",\"\"]Ao[\"AAAAAAAAAAAAAAAAAewMAAA=\",\"\"]Cc[\"AAAAAAFxCQAA\",\"AAGhDAAAAAAAAqsKAAAFGgAAAaoKAAA=\"]Dc[\"AAAAAAAAAAABXwIAAA==\",\"AAABpAQAAAAAAAAAAAAAAAETBwAAAAAB+gYAAA==\"]Dg[\"AAADOAQAAOUEAADzBAAA\",\"AAAAAAAAAAAAAAAAAAAAAAAAA80LAADcCwAA3QsAAA==\"]Co[\"AAAAAaMIAAABZBsAAAFCAAAAAfoCAAAAAbEbAAA=\",\"AAGyDAAAAAGjCAAA\"]Lg[\"AAAAOjAAAAEAAAAAAAcAEAAAAFkIdwkgGPUY9hj3GPgY2xsAAAHqDAAAAeMcAAABMwIAAAIeGQAA0hsAAAAF3RYAAIcYAACKGAAAnhsAAAYdAAAAAegcAAAAA3YcAAB4HAAA4RwAAA==\",\"AAIgAwAAjgwAAAFjGwAAA1kIAAB0CwAA+hgAAAL0GAAA+RgAAA==\"]Jg[\"AAAAA6QIAAB6CQAAIhgAAAHtDAAAAAL7AgAALAMAAAHkHAAAAAIfGQAA0xsAAAAF3xYAAIkYAACMGAAAnxsAAAcdAAAAAekcAAAAA3ccAAB5HAAA4hwAAA==\",\"AAIuAwAAswwAAAIcCAAAZRsAAAKkCAAAdQsAAA==\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAlsRAAA3FwAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA40LAAAnEQAADhcAAA==\",\"\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAZEJAAA=\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAasLAAA=\",\"\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAARcMAAA=\",\"\"]Fk[\"AAAAAZUIAAAAAdASAAABwQIAAAABgAkAAAAAAAAAAAAAAAYIBwAAtQwAALMRAAC2EQAAnRsAAC8cAAA=\",\"AAAAAZUIAAABaxgAAA==\"]Ak[\"AAAAAAAAAAABohsAAA==\",\"\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAYYJAAA=\",\"\"]Gc[\"AAAAAAFGGAAAAz8IAAAHDAAAlxEAAAL1AgAA9gIAAA==\",\"AAAAAAAAAALjHAAA5BwAAAAC0hsAANMbAAAAAgYdAAAHHQAAAALoHAAA6RwAAA==\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAApwRAABvFwAA\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAmQRAABAFwAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/cLAAB7EQAAVRcAAA==\",\"\"]Ck[\"AAAAARgbAAAB+wwAAAGTDgAAAsMCAAB2GQAA\",\"AAGrDAAAASsDAAA=\"]Do[\"AAAAAAAAAAAAAAHZAgAAAAAAAAAAAAU5AwAA2AkAAIMLAAAPGgAABhwAAA==\",\"AAABGxkAAA==\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAABOMGAADlBgAAmxEAAG4XAAA=\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAi0RAAAUFwAA\",\"\"]Ck[\"AAAAAY4IAAAAAcgSAAABtgIAAA==\",\"AAGlDAAAAAGOCAAAAWMYAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+QLAABYEQAANBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+ULAABZEQAANRcAAA==\",\"\"]Fk[\"AAAAAAAAAbECAAAAAAAAAAAAAAAAAAamCgAAIhMAAEQUAABFFAAAYxkAAGEbAAA=\",\"AAGjDAAAAAAAAAAAAAAAAAAAAAAAAAElGQAA\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAjQRAAAbFwAA\",\"\"]Ac[\"AAABpAQAAA==\",\"\"]Ck[\"AAAAAAHZFgAAAAHaAgAA\",\"AAAAAAAAAAAAAAAAAAAAAAAAAdgJAAA=\"]Dk[\"AAAAAAAAAAGjDgAAAZcLAAAB+AUAAAAAAewMAAA=\",\"AAAAAAAAAAAAAfgFAAAAAAHsDAAA\"]Cg[\"AAAAAS0DAAA=\",\"AAH1HAAAAAAAAAAAAAAAAAAAAAAAAAFeGQAA\"]Cc[\"AAAAAAHcFgAAAAHUAgAAAAAAAZgSAAA=\",\"AAAAAAGDCQAA\"]Fc[\"AAAChgQAANUEAAABaggAAAABJAAAAAAAAlUCAABWAgAA\",\"AAGXDAAAAAFqCAAAAAGWDgAAAn0LAAAjGQAAAhkHAAB4CQAA\"]Cg[\"AAABRAUAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAAAsULAAADDAAA\"]Ec[\"AAAAAAEvGAAAAygIAAC7CwAAIREAAAJ1AgAAdgIAAA==\",\"AAACuAQAALkEAAAAAAAAAAAAAAGCDAAA\"]Ec[\"AAAAAAE9GAAAAzYIAADhCwAAVREAAALNAgAAzgIAAA==\",\"AAADHAUAAB0FAAAeBQAAAAABgwwAAA==\"]Bc[\"AAAAAAAAAAAB/RgAAAABqhIAAA==\",\"\"]Bg[\"AAAAADswAAABAAAgAAIATBgTAGEYDAA=\",\"\"]Dc[\"AAAAAVUIAAAAAd0MAAABLQIAAAAB5wwAAA==\",\"AAGKDAAAAAFVCAAAARkIAAA=\"]Bo[\"\",\"AAAAAAAAAAAAAAAAAAABGRkAAAAAAAAAAAEYAwAA\"]Bk[\"AAAAAAAAASQCAAAAAeQMAAA=\",\"AAABFggAAA==\"]Eo[\"AAAAAAAEeBIAAHkSAAB6EgAAexIAAANfBAAAhBwAAIccAAACfBIAAAkaAAAFzxYAANEWAACxGwAATRwAAE4cAAA=\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAoYRAABeFwAA\",\"\"]Ac[\"AAABrQQAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwwMAACgEQAAcxcAAA==\",\"\"]Cg[\"AAAAAAABzBsAAA==\",\"AAAAAAAAAAR+CwAAfwsAAGYZAABnGQAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA+4LAABtEQAASRcAAA==\",\"\"]Bg[\"AAAAAAAAAAABAQcAAA==\",\"AAAAAXgZAAA=\"]Hg[\"AAAAAXQYAAAB8QYAAAFxEgAAAAABFQIAAAAAAAAAAAAAADowAAABAAAAAAASABAAAABmDIIOrxJAFEIUbhg9Gtcb2Rv+GwAcCRwLHBUcYxxyHHsc2xzdHA==\",\"AAGGDAAA\"]Ek[\"AAAAAZoIAAAB+AYAAAAB1gIAAAJ/CwAAZxkAAAAAAAAAAAAAAAABoQsAAA==\",\"AAGuDAAAAAGaCAAAAccMAAA=\"]Cc[\"AAABSQUAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAAAQoMAAA=\"]Ak[\"AAAAAAAAAAAAAAGICwAA\",\"\"]Cc[\"\",\"AAAAAAEEHQAAAAAAAAAAAAAAAAAAAAJ9GQAAfhkAAA==\"]Mg[\"AAAAAW8IAAAAAAEZGAAABosSAAAWGQAAVhwAAGIcAAC3HAAA4BwAAAZdAgAAHxMAALsYAACrGwAAXRwAAF4cAAAAAAAAAAAAAAADcwsAACETAACwGwAA\",\"AAAAAm8IAAC/GAAAAAEhAwAAAbIbAAAGixIAABYZAABWHAAAYhwAALccAADgHAAABR8TAAC7GAAAqxsAAF0cAABeHAAA\"]Ec[\"AAAAAAAAAAABggkAAAAB2AIAAAAAAAAAAAADEAcAAHUJAAAXGQAA\",\"AAABfxkAAAAAAAABrwwAAA==\"]Dk[\"AAAAAAACuxwAALwcAAABgQsAAAHcDAAA\",\"AAAAAAAAAeYMAAAB0RsAAAKdHAAAnhwAAA==\"]Ao[\"AAAAAe0YAAAAAAAAAV0cAAA=\",\"\"]Ao[\"AAAAAe4YAAAAAAAAAV4cAAA=\",\"\"]Do[\"AAABhQQAAAFgCAAAAAIdAAAAtwsAAAAAAkUCAABGAgAA\",\"AAABiQQAAAFgCAAAAAAAAfQMAAA=\"]Bg[\"AAACNwQAAOEEAAA=\",\"AAAAAo4LAACQCwAA\"]Fg[\"AAAABJkIAACcEgAABRwAANAcAAAAAYMMAAAB0QIAAAABrhwAAA==\",\"AAAABJkIAACcEgAABRwAANAcAAAAAAEsAwAAAAGuHAAA\"]Dc[\"AAAAAAAAAAAAAAAAAAAAAAAABq4LAADTCwAAGhEAAEMRAAAIFwAAJhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxIMAACqEQAAeRcAAA==\",\"\"]Do[\"AAABWAQAAAABNhgAAAMvCAAA0AsAADwRAAAAAAKWAgAAlwIAAA==\",\"AAAAAAACew4AAHwOAAA=\"]Dg[\"AAABXAUAAAABSRgAAANCCAAADgwAAKIRAAACAAMAAAEDAAA=\",\"AAAAAAABfQ4AAA==\"]Hc[\"AAACVAQAAB8aAAADUAgAAMsMAAAoGQAABcMIAACTEgAAJBMAAPgWAAATGQAAARUAAAABIgIAAA==\",\"AAAAAVAIAAAAAAEdAwAAADswAAABAAAGAAIA4gwDAOcMAgA=\"]Eo[\"AAAAAAE1GAAAAy4IAADPCwAAOxEAAAAAApQCAACVAgAA\",\"AAAB1wQAAAAAAAAAAZ0cAAAAAAAAAAAAAAABrAsAAA==\"]Dk[\"AAAAAAFIGAAAA0EIAAANDAAAoREAAAL+AgAA/wIAAA==\",\"AAABUwUAAAAAAAAAAZ4cAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA4IRAAB3EgAAWhcAAA==\",\"\"]Bc[\"AAAAAAJsEgAAWxkAAAAAAREaAAA=\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxUDAABHEQAAKhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxcDAACuEQAAfRcAAA==\",\"\"]Dc[\"AAAAAVYIAAAAAd4MAAABLwIAAAHVEgAAAegMAAA=\",\"AAAAAVYIAAAAARoIAAA=\"]Dk[\"AAAAAAAByRIAAAG3AgAAAAAAAAAAAAAAAAACGQ4AALARAAA=\",\"AAEYDgAAAAABZBgAAA==\"]Cg[\"AAAAAncIAAAkGgAAAAEvAAAAAXACAAA=\",\"AAGaDAAAAAF3CAAA\"]Cc[\"AAAAAVMIAAAAAAErAgAAAAHlDAAA\",\"AAABGAgAAAFTCAAA\"]Ao[\"AAAAAAAAAbIbAAAAAAFdGwAA\",\"\"]Ac[\"AAABfgQAAA==\",\"\"]Dk[\"AAABfgkAAAABHA4AAAABkAIAAAAAAAHVCQAA\",\"AAACJAMAAG8MAAAAAAAAAAAAAdUJAAA=\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAnYRAABQFwAA\",\"\"]Fc[\"AAAAAaUIAAAAAAL8AgAA/QIAAAAD6gYAABobAAAbGwAA\",\"AAAAAaUIAAAAAVIFAAAAAXwSAAAB3hYAAAAAAt0WAADfFgAA\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAn4RAABXFwAA\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAo0RAABkFwAA\",\"\"]Bc[\"\",\"AAAAAAAAAAN2CwAAdwsAAHgLAAA=\"]Dc[\"AAAAAAAAAAAAAAAAAAAAAAAABhADAAARAwAAFhEAAD8RAAAEFwAAIhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxIDAACmEQAAdRcAAA==\",\"\"]Co[\"AAAAAAABqwoAAAGyGwAAAQcaAAAAAV0bAAA=\",\"AAAAAAEEHQAAAe8YAAA=\"]Eg[\"AAAAAXkIAAABihwAAAGDHAAAAXsCAAAAAAAAAAHOGwAA\",\"AAIjAwAAnAwAAAABeQgAAAGKHAAAAYMcAAA=\"]Dk[\"AAAAAWkIAAAAAiMAAAC7EgAAAlMCAABUAgAA\",\"AAGWDAAAAAFpCAAAAVYYAAAAAbkRAAA=\"]Fk[\"AAAAAWgIAAAAAiIAAAC6EgAAAVICAAAAAAAAAAAAAAAAAAZ5AwAAuwwAAPEMAADaFgAAERkAABIZAAA=\",\"AAAAAWgIAAABVRgAAA==\"]Ek[\"AAAAAXYIAAAAAi4AAADtAQAAA24CAABvAgAAqhgAAAFmBQAA\",\"AAAAAXYIAAAAAAAAAAAAAAAAAAAAAAE8AwAA\"]Hg[\"AAAAAAErGAAAAyQIAACmCwAAExEAAAIgAgAAIQIAAA==\",\"AAABWwQAAAAAAfwYAAAB5gwAAAEjDgAAOzAAAAEAAAYAAgDiDAMA5wwCAAAAAAAAAAAAAALGCwAAxwsAAA==\"]Ck[\"AAAAAVcIAAAAARYAAAABMQIAAA==\",\"AAAAAVcIAAAAAAAB1RIAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8YLAAAwEQAAFxcAAA==\",\"\"]Eg[\"AAAAAfoYAAABbhIAAAABmwIAAAHTDAAAAAAAAAAAAAAAAAOWEgAA4hYAAKAYAAA=\",\"AAABMwMAAAFZGwAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwAMAACOEQAAZRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/sLAACEEQAAXBcAAA==\",\"\"]Eo[\"AAACOwUAAEIFAAAAAUEYAAADOggAAPgLAAB9EQAAAucCAADoAgAA\",\"AAAAAAAAAAAAAAAAAAAAAAAAAvsLAAAADAAA\"]Ao[\"AAAAAAAAAX4CAAAAAAEDBwAA\",\"\"]Bc[\"\",\"AAAAAAAAAAAAAAAAAAAAAXsYAAA=\"]Dk[\"AAAAAAAByhIAAAG4AgAAAAAAAAAAAAAAAAACtwwAALURAAA=\",\"AAGmDAAAAAABZRgAAA==\"]Cg[\"AAAAAVIIAAAAAtsMAACvGwAAASkCAAA=\",\"AAAAAhcIAABSCAAA\"]Hc[\"AAAAAXIYAAAB7wYAAAJvEgAAthIAAAAAARMCAAAAAAAAAAAAAAA6MAAAAQAAAAAACgAQAAAA7Ba9GHMZJRo/GqAboRsHHBccZhy6HA==\",\"AAGEDAAAAAABURgAAA==\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAagLAAA=\"]Do[\"AAAAAV4IAAAAAhsAAAC1CwAAAAACQAIAAEECAAA=\",\"AAABggQAAAFeCAAAAAAAAAAAAfwWAAA=\"]Dk[\"AAAAAVsIAAAAAhgAAACyCwAAAAACOgIAADsCAAA=\",\"AAABegQAAAFbCAAAAAAAAAG2GAAA\"]Eo[\"AAAAAX4IAAAAAjMAAAC/EgAAAYwCAAAAAAHpBgAA\",\"AAGfDAAAAAF+CAAAAVoYAAAAAAAAAAAAAAAAAAAAAXkZAAA=\"]Co[\"AAAB5AQAAA==\",\"AAAAAAAAAcsWAAAAAAABJwwAAAAAAAAAAAAB3gsAAA==\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAvwLAAAWDAAA\"]Bk[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAtULAAAUDAAA\"]Gk[\"AAAAAAAAAAFHGAAAA0AIAAAIDAAAmBEAAAH3AgAAAfgCAAA=\",\"AAAAAAAAAAAAAAACBh0AAAcdAAAAAugcAADpHAAAADswAAABAAAFAAIAdhwDAOEcAQA=\"]Eo[\"AAAAAVgIAAAAA98MAABlGQAAphsAAAIyAgAAXBkAAAGAGQAAAekMAAA=\",\"AAIfAwAAjQwAAAABWAgAAAAAAAEJGgAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/ULAAB5EQAAUxcAAA==\",\"\"]Fg[\"AAAAAAABYBsAAAGyAgAAAAAAAAAAAAAAAAAGFwcAABoHAACnCgAAGg4AAIMXAAADGgAA\",\"AAAAAAABKAMAAAAAAlQcAABVHAAA\"]Fo[\"AAACnQQAAKcEAAABcggAAAABKgAAAAAAAmcCAABoAgAAAAAAAAAAAAAAA4IDAABmCQAAlAsAAA==\",\"AAADqgQAAKwEAACtBAAAAXIIAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA3sDAAB8EQAAVhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/YLAAB6EQAAVBcAAA==\",\"\"]Cg[\"AAAAAZ8cAAAAAcsSAAABuQIAAA==\",\"AAGnDAAAAAABZhgAAA==\"]Dc[\"AAAAAZwIAAAAAAHfAgAAAAAAAAAAAAAAAAACThsAAI4bAAA=\",\"AAAAAZwIAAA=\"]Eg[\"AAAAAXAIAAAAASgAAAAAAAJhAgAAYgIAAAAAAAAAAAAAAAOSCwAAwhYAAMQWAAA=\",\"AAABpwQAAAFwCAAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA8gLAAAzEQAAGhcAAA==\",\"\"]Cc[\"AAABRwUAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAAAQQMAAA=\"]Jg[\"AAA6MAAAAQAAAAAABwAQAAAAdgR9BIAEhwSJBLkEwgTRBAFsCAAAAAImAAAAuAsAAAAAAlkCAABaAgAA\",\"AAACnAQAAJ0EAAACbAgAAK0KAAAC0gkAAPAYAAAAARkYAAABCxoAAAAAAAAAAAAAAAACyAsAAMoLAAA=\"]Eo[\"AAAAAWUIAAAAAAAAAU4CAAAAAAAAAAAAAAAF+wYAACEMAAAiDAAAIA4AACEOAAA=\",\"AAGUDAAAAAJlCAAAiQkAAA==\"]Fo[\"AAAAAUwIAAAB8gYAAAG4EgAAARYCAAACfgsAAGYZAAAAAAAAAAAAAAAAA4oSAADlFgAA9xYAAA==\",\"AAGHDAAAAAFMCAAAAsIMAABTGAAA\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAUIDAAA=\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA0UDAABdEQAAORcAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAp4RAABxFwAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA9ULAABFEQAAKBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxQMAACsEQAAexcAAA==\",\"\"]Dc[\"AAAAAAEnGAAAAyAIAACiCwAADxEAAAAAAgcCAAAIAgAA\",\"AAACOAQAADoEAAA=\"]Dc[\"AAAAAAE4GAAAAzEIAADYCwAASREAAAKiAgAAowIAAA==\",\"AAAC5AQAAOUEAAA=\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF8GQAA\",\"\"]Dc[\"AAAAAAAAAAAAAAAAAAAAAAAABmoJAABrCQAAGREAAEIRAAAHFwAAJRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA2wJAACpEQAAeBcAAA==\",\"\"]Fg[\"AAAAAAAAAAGbDgAAAYIIAAAB1wkAAASTAgAA0wkAAJ4OAABtGQAAAAElAwAAAW8ZAAA=\",\"AAAAAAAAAAABgggAAAAAAAElAwAA\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA2wRAACdEgAASBcAAA==\",\"\"]Eo[\"AAAAAZIIAAAAAc0SAAABvQIAAAABgAkAAA==\",\"AAGoDAAAAakMAAABkggAAAFoGAAAAAAAAAAAAAAAAAAAAAFcHAAA\"]Eo[\"AAAAAZgIAAAAAzwAAADzAQAA0hIAAALIAgAAsBgAAAAAAAAAAAAAAAAAAQkHAAA=\",\"AAGsDAAAAAGYCAAAAW0YAAA=\"]Ak[\"AAAAAAAAAAAAAQoaAAA=\",\"\"]Ec[\"AAAAAAFAGAAAAzkIAADwCwAAcREAAALkAgAA5QIAAA==\",\"AAABNgUAAAABpA4AAAAAAAABuhgAAA==\"]Ag[\"\",\"AAAAAq0bAACuGwAA\"]A@c[\"AAAAAawbAAABihwAAAAAOjAAAAEAAAAAABEAEAAAAMgMeRN4GHoYuRh7GSoaORqkG/wbghzOHOUc5xzsHPgcAB0DHTowAAABAAAAAAAHABAAAABHAqIbqxsuHEwcVxz0HPcc\",\"AAGPDAAAAAAAAAA6MAAAAQAAAAAAEQAQAAAAyAx5E3gYehi5GHsZKho5GqQb/BuCHM4c5RznHOwc+BwAHQMdBqIbAAAuHAAATBwAAFccAAD0HAAA9xwAAA==\"]Bc[\"\",\"AAAAADswAAABAABBAAEAiRlBAA==\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAABAsDAAAfDgAAgREAAFkXAAA=\",\"\"]Bo[\"AAAAAAAAAYICAAAAAAEFBwAA\",\"AAAAAAAAAYYSAAA=\"]Ek[\"AAABtwQAAAABLRgAAAMmCAAAuQsAAB8RAAACZQIAAGYCAAA=\",\"AAAAAAAAAAABzRwAAAAAAAAAAAAAAAHDCwAA\"]Do[\"AAAAAXEIAAAAASkAAAAAAAJjAgAAZAIAAAAAAAAAAAAAAAKTCwAAwxYAAA==\",\"AAAAAXEIAAA=\"]Ag[\"AAAAAAAAAZoCAAA=\",\"\"]Ck[\"AAAAAZ8IAAAAAUAAAAAB7AIAAAACfxcAAIAXAAA=\",\"AAAAAZ8IAAA=\"]Fk[\"AAAAAcoMAAAC/hYAAPQYAAAAOjAAAAEAAAAAAAcAEAAAAB0CEhoTGhYaGBoZGhsaHRoGERoAABQaAAAVGgAAFxoAABoaAAAcGgAA\",\"\"]Ak[\"AAABqwgAAAAAAQUaAAA=\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA4cRAADFFgAAXxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/wLAACFEQAAXRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA9cLAABIEQAAKxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxYMAACvEQAAfhcAAA==\",\"\"]Ng[\"AAAAAXMYAAAB8AYAAAJwEgAAtxIAAAEUAgAAAAAAAAAAAAAAAAA6MAAAAQAAAAAAMAAQAAAArBKtEq4SAhcAGiwaLRouGi8aNho3GoMaUhtUG1UbVhtaG1sbjRulG6gbqRuqG8sb1hv4Gw0cDhwQHBEcMhw3HFkcWhxfHHocfRyaHJscshy5HL8cwBzBHMMc2hzzHAIdBR0=\",\"AAGFDAAAAAABUhgAAA==\"]Co[\"AAAAAVQIAAAAAAIsAgAA5gwAAAHcDAAA\",\"AAABHgMAAAJUCAAA2xsAAA==\"]Cc[\"AAAAAj0DAACeCAAAAAE/AAAAAesCAAA=\",\"AAAAAZ4IAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA5ULAACPEQAAZhcAAA==\",\"\"]Dc[\"AAAAAAAAAAAAAAAAAAAAAAAABgAAAAABAAAAFREAAD4RAAADFwAAIRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAwIAAAClEQAAdBcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAzcDAAB/EQAAWBcAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAjURAAAcFwAA\",\"\"]Ak[\"\",\"AAAAAAAAAAAAAboYAAA=\"]Ao[\"AAAAAAAAARsIAAAAAfccAAA=\",\"\"]Bc[\"AAAAAAABIQMAAAABARoAAAEfEwAA\",\"\"]Ac[\"AAAB3wQAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAmYRAABCFwAA\",\"\"]Dg[\"AAAAAAAAATsJAAABow4AAAGXCwAAAdcCAAAAAAHsDAAA\",\"AAAAAAAAAAAAAfgFAAA=\"]Ek[\"AAAB1AQAAAABMxgAAAMsCAAAvwsAACURAAAChAIAAIUCAAA=\",\"AAAAAAABMRoAAAAAAAAAAAAAAAAAAAHLCwAA\"]Dk[\"AAAAAVoIAAAAAhcAAACxCwAAAAACNQIAADYCAAA=\",\"AAABdgQAAAFaCAAAAAABehkAAA==\"]Ek[\"AAAAAW0IAAAAAAACYBwAAK0cAAADWwIAAGsZAABMHAAA\",\"AAGYDAAAAAFtCAAAAAAAAmAcAACtHAAAAWsZAAA=\"]Bc[\"AAAAAYsJAAAAAQUaAAAAAawIAAA=\",\"\"]Cc[\"AAAAAb8YAAAAASEDAAAAAYUZAAAB/RgAAAABqhIAAA==\",\"\"]Bk[\"AAAAAAABnA4AAALUCQAAbhkAAAAAAAHVCQAA\",\"\"]Ik[\"AAAAAAEqGAAAAyMIAAClCwAAEhEAAAIeAgAAHwIAAA==\",\"AAAAAAEZCAAAAhoIAAD7GAAABxIaAAATGgAAFhoAABgaAAAZGgAAGxoAAB0aAAAHIg4AABEaAAAUGgAAFRoAABcaAAAaGgAAHBoAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA9YLAABGEQAAKRcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxUMAACtEQAAfBcAAA==\",\"\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAfULAAA=\"]Fg[\"AAAAAW4IAAAAAAAEiA4AAL4YAAAhGgAAKhwAAAJcAgAAVxwAAA==\",\"AAGZDAAAAAFuCAAAAAAABIgOAAC+GAAAIRoAACocAAA=\"]Cc[\"AAAAAAEoGAAAAyEIAACjCwAAEBEAAAAAAg0CAAAOAgAA\",\"\"]Cc[\"AAAAAAE5GAAAAzIIAADZCwAAShEAAAKoAgAAqQIAAA==\",\"\"]Fg[\"AAABrAQAAAFzCAAAAAErAAAAAAF6CwAAAmkCAABqAgAA\",\"AAABcQsAAAFzCAAAAAAAAXcLAAAAAAAAAAAAAAAAAoIDAADCFgAA\"]Bo[\"AAAAAAAAAAABYAIAAA==\",\"AAAAAAAAAAAB/RgAAA==\"]Ag[\"\",\"AAAAAAABTxwAAA==\"]Fo[\"AAAAAxQDAABRCAAAjQ4AAAADJwEAANoMAAAMEQAAASMCAAAAAeMMAAA=\",\"AAJjCQAAiQwAAAABUQgAAANtEgAAbhIAAGQZAAAAAV8EAAA=\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAjoRAAAgFwAA\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAlIRAAAyFwAA\",\"\"]Co[\"AAABFggAAAH1GAAAAAABJQIAAAEUGgAA\",\"AAGECwAAAWgMAAAB9RgAAA==\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA0QDAABcEQAAOBcAAA==\",\"\"]Bg[\"AAAAAAAAAAAAAAAAAAAAAAAAAcsLAAA=\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAhwRAAAKFwAA\",\"\"]Ag[\"AAAAAAAAAAGFGQAA\",\"\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAABJARAADGFgAAZxcAAAgaAAA=\",\"\"]Ec[\"AAABuAQAAAABLhgAAAMnCAAAugsAACARAAACcwIAAHQCAAA=\",\"AAABtwQAAAAAAAAAAAAAAAHOGwAA\"]Cg[\"AAAAAAAAAAAAAAAAAAAAAAAABAEMAACREQAAxxYAAGgXAAA=\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxgHAABaEQAANhcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA9QLAABEEQAAJxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxMMAACrEQAAehcAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAmMRAAA/FwAA\",\"\"]Do[\"AAAAAQ0RAAAAAhoIAAAiGQAAATACAAABHBoAAA==\",\"AAJsDAAAjAwAAAABDREAAAABIhkAAA==\"]Co[\"AAABGAgAAAH3GAAAAAABKgIAAAEXGgAA\",\"AAGGCwAAAWoMAAAB9xgAAA==\"]Bc[\"\",\"AAAAAAR6DgAASA8AAEkPAABKDwAA\"]Bc[\"AAAAAooOAABYHAAAAAAAAAE0AgAA\",\"\"]Ec[\"AAAABDoDAAAXCAAA9hgAABIcAAAAAAEoAgAAARUaAAA=\",\"AAGFCwAAAWkMAAADOgMAAPYYAAASHAAA\"]Ak[\"\",\"AAAAAAACyQ8AABQcAAA=\"]Cg[\"AAAAAAAAAAG3HAAA\",\"AAAAAAAAAAAAAAAAAAAAAAAAAbAbAAA=\"]Ec[\"AAAAAAExGAAAAyoIAAC9CwAAIxEAAAJ5AgAAegIAAA==\",\"AAAAAAAAAAAAAAAAAAAAAAAAAcQLAAA=\"]Cc[\"AAAAAAE3GAAAAzAIAADRCwAAPREAAAAAApgCAACZAgAA\",\"\"]Cc[\"AAAAAAFKGAAAA0MIAAAPDAAAoxEAAAIFAwAABgMAAA==\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAnURAABPFwAA\",\"\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAm8RAABLFwAA\",\"\"]Ck[\"AAAC1wQAAFMFAAA=\",\"AAAAAAAAAAAAAAAAAAAAAAAAAtQLAAATDAAA\"]Bk[\"AAAAAAAAAAAAAAAAAAAAAAAAAnMRAABNFwAA\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA5EJAACLEQAAYhcAAA==\",\"\"]Bg[\"\",\"AAAAAAAAAAAAAAAAAAAAAAAAAakLAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA4MDAABhEQAAPRcAAA==\",\"\"]Ck[\"AAAAAAABJwAAAAAAAV4CAAA=\",\"AAAAAAAAAAAAAAAAAAAAAZgcAAA=\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAAxgMAABrEQAARxcAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA24RAABKFwAAJxoAAA==\",\"\"]Cc[\"AAAAAAAAAAAAAAAAAAAAAAAAA/0LAACIEQAAYBcAAA==\",\"\"]") \ No newline at end of file diff --git a/pr/3367/docs/settings.html b/pr/3367/docs/settings.html index 0049af3c74..05933f6f3c 100644 --- a/pr/3367/docs/settings.html +++ b/pr/3367/docs/settings.html @@ -1 +1 @@ -Settings

    Rustdoc settings

    Back
    \ No newline at end of file +Settings

    All

    Rustdoc settings

    Back
    \ No newline at end of file diff --git a/pr/3367/docs/src-files.js b/pr/3367/docs/src-files.js index c67eacdde9..8a46a6136d 100644 --- a/pr/3367/docs/src-files.js +++ b/pr/3367/docs/src-files.js @@ -1,3 +1,2 @@ -var srcIndex = new Map(JSON.parse('[["bulk",["",[],["bulk.rs"]]],["iroh",["",[["discovery",[["pkarr",[],["dht.rs"]]],["dns.rs","mdns.rs","pkarr.rs","static_provider.rs"]],["endpoint",[],["rtt_actor.rs"]],["magicsock",[["node_map",[],["best_addr.rs","node_state.rs","path_state.rs","udp_paths.rs"]],["transports",[["relay",[],["actor.rs"]]],["ip.rs","relay.rs"]]],["metrics.rs","node_map.rs","transports.rs"]],["net_report",[],["defaults.rs","ip_mapped_addrs.rs","metrics.rs","options.rs","probes.rs","report.rs","reportgen.rs"]],["tls",[],["name.rs","resolver.rs","verifier.rs"]]],["defaults.rs","disco.rs","discovery.rs","dns.rs","endpoint.rs","key.rs","lib.rs","magicsock.rs","metrics.rs","net_report.rs","protocol.rs","test_utils.rs","tls.rs","util.rs"]]],["iroh_base",["",[["ticket",[],["node.rs"]]],["key.rs","lib.rs","node_addr.rs","relay_url.rs","ticket.rs"]]],["iroh_bench",["",[],["iroh.rs","lib.rs","quinn.rs","s2n.rs","stats.rs"]]],["iroh_dns_server",["",[["dns",[],["node_authority.rs"]],["http",[["doh",[],["extract.rs","response.rs"]]],["doh.rs","error.rs","pkarr.rs","rate_limiting.rs","tls.rs"]],["store",[],["signed_packets.rs"]]],["config.rs","dns.rs","http.rs","lib.rs","metrics.rs","server.rs","state.rs","store.rs","util.rs"]]],["iroh_relay",["",[["client",[],["conn.rs","streams.rs","tls.rs","util.rs"]],["protos",[],["disco.rs","relay.rs"]],["server",[],["client.rs","clients.rs","http_server.rs","metrics.rs","resolver.rs","streams.rs","testing.rs"]]],["client.rs","defaults.rs","dns.rs","http.rs","key_cache.rs","lib.rs","node_info.rs","ping_tracker.rs","protos.rs","quic.rs","relay_map.rs","server.rs"]]]]')); -createSrcSidebar(); -//{"start":36,"fragment_lengths":[28,694,109,75,306,382]} \ No newline at end of file +createSrcSidebar('[["bulk",["",[],["bulk.rs"]]],["iroh",["",[["discovery",[["pkarr",[],["dht.rs"]]],["dns.rs","mdns.rs","pkarr.rs","static_provider.rs"]],["endpoint",[],["rtt_actor.rs"]],["magicsock",[["node_map",[],["node_state.rs","path_state.rs","path_validity.rs","udp_paths.rs"]],["transports",[["relay",[],["actor.rs"]]],["ip.rs","relay.rs"]]],["metrics.rs","node_map.rs","transports.rs"]],["net_report",[],["defaults.rs","ip_mapped_addrs.rs","metrics.rs","options.rs","probes.rs","report.rs","reportgen.rs"]],["tls",[],["name.rs","resolver.rs","verifier.rs"]]],["defaults.rs","disco.rs","discovery.rs","dns.rs","endpoint.rs","key.rs","lib.rs","magicsock.rs","metrics.rs","net_report.rs","protocol.rs","test_utils.rs","tls.rs","util.rs"]]],["iroh_base",["",[["ticket",[],["node.rs"]]],["key.rs","lib.rs","node_addr.rs","relay_url.rs","ticket.rs"]]],["iroh_bench",["",[],["iroh.rs","lib.rs","quinn.rs","s2n.rs","stats.rs"]]],["iroh_dns_server",["",[["dns",[],["node_authority.rs"]],["http",[["doh",[],["extract.rs","response.rs"]]],["doh.rs","error.rs","pkarr.rs","rate_limiting.rs","tls.rs"]],["store",[],["signed_packets.rs"]]],["config.rs","dns.rs","http.rs","lib.rs","metrics.rs","server.rs","state.rs","store.rs","util.rs"]]],["iroh_relay",["",[["client",[],["conn.rs","streams.rs","tls.rs","util.rs"]],["protos",[],["common.rs","disco.rs","handshake.rs","relay.rs","streams.rs"]],["server",[],["client.rs","clients.rs","http_server.rs","metrics.rs","resolver.rs","streams.rs","testing.rs"]]],["client.rs","defaults.rs","dns.rs","http.rs","key_cache.rs","lib.rs","node_info.rs","ping_tracker.rs","protos.rs","quic.rs","relay_map.rs","server.rs"]]]]'); +//{"start":19,"fragment_lengths":[28,698,109,75,306,422]} \ No newline at end of file diff --git a/pr/3367/docs/src/bulk/bulk.rs.html b/pr/3367/docs/src/bulk/bulk.rs.html index 69d5e632a8..7cdbb63fb3 100644 --- a/pr/3367/docs/src/bulk/bulk.rs.html +++ b/pr/3367/docs/src/bulk/bulk.rs.html @@ -1,9 +1,9 @@ -bulk.rs - source

    bulk/
    bulk.rs

    1use std::collections::BTreeMap;
    +bulk.rs - source

    bulk/
    bulk.rs

    1use std::collections::BTreeMap;
     2
     3use clap::Parser;
     4#[cfg(not(any(target_os = "freebsd", target_os = "openbsd", target_os = "netbsd")))]
     5use iroh_bench::quinn;
    -6use iroh_bench::{configure_tracing_subscriber, iroh, rt, s2n, Commands, Opt};
    +6use iroh_bench::{Commands, Opt, configure_tracing_subscriber, iroh, rt, s2n};
     7use iroh_metrics::{MetricValue, MetricsGroup};
     8use n0_snafu::Result;
     9
    @@ -110,7 +110,7 @@
     110    let server_span = tracing::error_span!("server");
     111    let runtime = rt();
     112    let cert = rcgen::generate_simple_self_signed(vec!["localhost".into()]).unwrap();
    -113    let key = PrivatePkcs8KeyDer::from(cert.key_pair.serialize_der());
    +113    let key = PrivatePkcs8KeyDer::from(cert.signing_key.serialize_der());
     114    let cert = CertificateDer::from(cert.cert);
     115
     116    let (server_addr, endpoint) = {
    diff --git a/pr/3367/docs/src/iroh/defaults.rs.html b/pr/3367/docs/src/iroh/defaults.rs.html
    index c4723d7ebe..ea11a1bfc5 100644
    --- a/pr/3367/docs/src/iroh/defaults.rs.html
    +++ b/pr/3367/docs/src/iroh/defaults.rs.html
    @@ -1,4 +1,4 @@
    -defaults.rs - source

    iroh/
    defaults.rs

    1//! Default values used in [`iroh`][`crate`]
    +defaults.rs - source

    iroh/
    defaults.rs

    1//! Default values used in [`iroh`][`crate`]
     2
     3/// The default QUIC port used by the Relay server to accept QUIC connections
     4/// for QUIC address discovery
    @@ -23,11 +23,11 @@
     23    use super::*;
     24
     25    /// Hostname of the default NA relay.
    -26    pub const NA_RELAY_HOSTNAME: &str = "use1-1.relay.iroh.network.";
    +26    pub const NA_RELAY_HOSTNAME: &str = "use1-1.relay.n0.iroh-canary.iroh.link.";
     27    /// Hostname of the default EU relay.
    -28    pub const EU_RELAY_HOSTNAME: &str = "euw1-1.relay.iroh.network.";
    +28    pub const EU_RELAY_HOSTNAME: &str = "euc1-1.relay.n0.iroh-canary.iroh.link.";
     29    /// Hostname of the default Asia-Pacific relay.
    -30    pub const AP_RELAY_HOSTNAME: &str = "aps1-1.relay.iroh.network.";
    +30    pub const AP_RELAY_HOSTNAME: &str = "aps1-1.relay.n0.iroh-canary.iroh.link.";
     31
     32    /// Get the default [`RelayMap`].
     33    pub fn default_relay_map() -> RelayMap {
    diff --git a/pr/3367/docs/src/iroh/disco.rs.html b/pr/3367/docs/src/iroh/disco.rs.html
    index 31db6d9591..de9249beb3 100644
    --- a/pr/3367/docs/src/iroh/disco.rs.html
    +++ b/pr/3367/docs/src/iroh/disco.rs.html
    @@ -1,4 +1,4 @@
    -disco.rs - source

    iroh/
    disco.rs

    1//! Contains the discovery message types.
    +disco.rs - source

    iroh/
    disco.rs

    1//! Contains the discovery message types.
     2//!
     3//! A discovery message is:
     4//!
    @@ -27,7 +27,7 @@
     27use iroh_base::{PublicKey, RelayUrl};
     28use nested_enum_utils::common_fields;
     29use serde::{Deserialize, Serialize};
    -30use snafu::{ensure, Snafu};
    +30use snafu::{Snafu, ensure};
     31use url::Url;
     32
     33use crate::magicsock::transports;
    @@ -193,8 +193,8 @@
     193impl Display for SendAddr {
     194    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
     195        match self {
    -196            SendAddr::Relay(id) => write!(f, "Relay({})", id),
    -197            SendAddr::Udp(addr) => write!(f, "UDP({})", addr),
    +196            SendAddr::Relay(id) => write!(f, "Relay({id})"),
    +197            SendAddr::Udp(addr) => write!(f, "UDP({addr})"),
     198        }
     199    }
     200}
    @@ -431,108 +431,118 @@
     431#[cfg(test)]
     432mod tests {
     433    use iroh_base::SecretKey;
    -434
    -435    use super::*;
    -436    use crate::key::{public_ed_box, secret_ed_box, SharedSecret};
    -437
    -438    #[test]
    -439    fn test_to_from_bytes() {
    -440        struct Test {
    -441            name: &'static str,
    -442            m: Message,
    -443            want: &'static str,
    -444        }
    -445        let tests = [
    -446            Test {
    -447                name: "ping_with_nodekey_src",
    -448                m: Message::Ping(Ping {
    -449                    tx_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into(),
    -450                    node_key: PublicKey::try_from(&[
    -451                        190, 243, 65, 104, 37, 102, 175, 75, 243, 22, 69, 200, 167, 107, 24, 63, 216, 140, 120, 43, 4, 112, 16, 62, 117, 155, 45, 215, 72, 175, 40, 189][..]).unwrap(),
    -452                }),
    -453                want: "01 00 01 02 03 04 05 06 07 08 09 0a 0b 0c be f3 41 68 25 66 af 4b f3 16 45 c8 a7 6b 18 3f d8 8c 78 2b 04 70 10 3e 75 9b 2d d7 48 af 28 bd",
    -454            },
    -455            Test {
    -456                name: "pong",
    -457                m: Message::Pong(Pong{
    -458                    tx_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into(),
    -459                    ping_observed_addr:  SendAddr::Udp("2.3.4.5:1234".parse().unwrap()),
    -460                }),
    -461                want: "02 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 00 00 00 00 00 00 00 00 00 00 00 ff ff 02 03 04 05 d2 04",
    -462            },
    -463            Test {
    -464                name: "pongv6",
    -465                m: Message::Pong(Pong {
    -466                    tx_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into(),
    -467                    ping_observed_addr: SendAddr::Udp("[fed0::12]:6666".parse().unwrap()),
    -468                }),
    -469                want: "02 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 00 fe d0 00 00 00 00 00 00 00 00 00 00 00 00 00 12 0a 1a",
    -470            },
    -471            Test {
    -472                name: "call_me_maybe",
    -473                m: Message::CallMeMaybe(CallMeMaybe { my_numbers: Vec::new() }),
    -474                want: "03 00",
    -475            },
    -476            Test {
    -477                name: "call_me_maybe_endpoints",
    -478                m: Message::CallMeMaybe(CallMeMaybe {
    -479                    my_numbers: vec![
    -480                        "1.2.3.4:567".parse().unwrap(),
    -481                        "[2001::3456]:789".parse().unwrap(),
    -482                    ],
    -483                }),
    -484                want: "03 00 00 00 00 00 00 00 00 00 00 00 ff ff 01 02 03 04 37 02 20 01 00 00 00 00 00 00 00 00 00 00 00 00 34 56 15 03",
    -485            },
    -486        ];
    -487        for test in tests {
    -488            println!("{}", test.name);
    -489
    -490            let got = test.m.as_bytes();
    -491            assert_eq!(
    -492                got,
    -493                data_encoding::HEXLOWER
    -494                    .decode(test.want.replace(' ', "").as_bytes())
    -495                    .unwrap(),
    -496                "wrong as_bytes"
    -497            );
    +434    use rand::SeedableRng;
    +435
    +436    use super::*;
    +437    use crate::key::{SharedSecret, public_ed_box, secret_ed_box};
    +438
    +439    #[test]
    +440    fn test_to_from_bytes() {
    +441        struct Test {
    +442            name: &'static str,
    +443            m: Message,
    +444            want: &'static str,
    +445        }
    +446        let tests = [
    +447            Test {
    +448                name: "ping_with_nodekey_src",
    +449                m: Message::Ping(Ping {
    +450                    tx_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into(),
    +451                    node_key: PublicKey::try_from(
    +452                        &[
    +453                            190, 243, 65, 104, 37, 102, 175, 75, 243, 22, 69, 200, 167, 107, 24,
    +454                            63, 216, 140, 120, 43, 4, 112, 16, 62, 117, 155, 45, 215, 72, 175, 40,
    +455                            189,
    +456                        ][..],
    +457                    )
    +458                    .unwrap(),
    +459                }),
    +460                want: "01 00 01 02 03 04 05 06 07 08 09 0a 0b 0c be f3 41 68 25 66 af 4b f3 16 45 c8 a7 6b 18 3f d8 8c 78 2b 04 70 10 3e 75 9b 2d d7 48 af 28 bd",
    +461            },
    +462            Test {
    +463                name: "pong",
    +464                m: Message::Pong(Pong {
    +465                    tx_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into(),
    +466                    ping_observed_addr: SendAddr::Udp("2.3.4.5:1234".parse().unwrap()),
    +467                }),
    +468                want: "02 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 00 00 00 00 00 00 00 00 00 00 00 ff ff 02 03 04 05 d2 04",
    +469            },
    +470            Test {
    +471                name: "pongv6",
    +472                m: Message::Pong(Pong {
    +473                    tx_id: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into(),
    +474                    ping_observed_addr: SendAddr::Udp("[fed0::12]:6666".parse().unwrap()),
    +475                }),
    +476                want: "02 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 00 fe d0 00 00 00 00 00 00 00 00 00 00 00 00 00 12 0a 1a",
    +477            },
    +478            Test {
    +479                name: "call_me_maybe",
    +480                m: Message::CallMeMaybe(CallMeMaybe {
    +481                    my_numbers: Vec::new(),
    +482                }),
    +483                want: "03 00",
    +484            },
    +485            Test {
    +486                name: "call_me_maybe_endpoints",
    +487                m: Message::CallMeMaybe(CallMeMaybe {
    +488                    my_numbers: vec![
    +489                        "1.2.3.4:567".parse().unwrap(),
    +490                        "[2001::3456]:789".parse().unwrap(),
    +491                    ],
    +492                }),
    +493                want: "03 00 00 00 00 00 00 00 00 00 00 00 ff ff 01 02 03 04 37 02 20 01 00 00 00 00 00 00 00 00 00 00 00 00 34 56 15 03",
    +494            },
    +495        ];
    +496        for test in tests {
    +497            println!("{}", test.name);
     498
    -499            let back = Message::from_bytes(&got).expect("failed to parse");
    -500            assert_eq!(test.m, back, "wrong from_bytes");
    -501        }
    -502    }
    -503
    -504    #[test]
    -505    fn test_extraction() {
    -506        let sender_key = SecretKey::generate(rand::thread_rng());
    -507        let recv_key = SecretKey::generate(rand::thread_rng());
    -508
    -509        let msg = Message::Ping(Ping {
    -510            tx_id: stun_rs::TransactionId::default(),
    -511            node_key: sender_key.public(),
    -512        });
    -513
    -514        let sender_secret = secret_ed_box(sender_key.secret());
    -515        let shared = SharedSecret::new(&sender_secret, &public_ed_box(&recv_key.public().public()));
    -516        let mut seal = msg.as_bytes();
    -517        shared.seal(&mut seal);
    +499            let got = test.m.as_bytes();
    +500            assert_eq!(
    +501                got,
    +502                data_encoding::HEXLOWER
    +503                    .decode(test.want.replace(' ', "").as_bytes())
    +504                    .unwrap(),
    +505                "wrong as_bytes"
    +506            );
    +507
    +508            let back = Message::from_bytes(&got).expect("failed to parse");
    +509            assert_eq!(test.m, back, "wrong from_bytes");
    +510        }
    +511    }
    +512
    +513    #[test]
    +514    fn test_extraction() {
    +515        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +516        let sender_key = SecretKey::generate(&mut rng);
    +517        let recv_key = SecretKey::generate(&mut rng);
     518
    -519        let bytes = encode_message(&sender_key.public(), seal.clone());
    -520
    -521        assert!(looks_like_disco_wrapper(&bytes));
    -522        assert_eq!(source_and_box(&bytes).unwrap().0, sender_key.public());
    +519        let msg = Message::Ping(Ping {
    +520            tx_id: stun_rs::TransactionId::default(),
    +521            node_key: sender_key.public(),
    +522        });
     523
    -524        let (raw_key, seal_back) = source_and_box(&bytes).unwrap();
    -525        assert_eq!(raw_key, sender_key.public());
    -526        assert_eq!(seal_back, seal);
    -527
    -528        let recv_secret = secret_ed_box(recv_key.secret());
    -529        let shared_recv =
    -530            SharedSecret::new(&recv_secret, &public_ed_box(&sender_key.public().public()));
    -531        let mut open_seal = seal_back.to_vec();
    -532        shared_recv
    -533            .open(&mut open_seal)
    -534            .expect("failed to open seal_back");
    -535        let msg_back = Message::from_bytes(&open_seal).unwrap();
    -536        assert_eq!(msg_back, msg);
    -537    }
    -538}
    \ No newline at end of file +524 let sender_secret = secret_ed_box(sender_key.secret()); +525 let shared = SharedSecret::new(&sender_secret, &public_ed_box(&recv_key.public().public())); +526 let mut seal = msg.as_bytes(); +527 shared.seal(&mut seal); +528 +529 let bytes = encode_message(&sender_key.public(), seal.clone()); +530 +531 assert!(looks_like_disco_wrapper(&bytes)); +532 assert_eq!(source_and_box(&bytes).unwrap().0, sender_key.public()); +533 +534 let (raw_key, seal_back) = source_and_box(&bytes).unwrap(); +535 assert_eq!(raw_key, sender_key.public()); +536 assert_eq!(seal_back, seal); +537 +538 let recv_secret = secret_ed_box(recv_key.secret()); +539 let shared_recv = +540 SharedSecret::new(&recv_secret, &public_ed_box(&sender_key.public().public())); +541 let mut open_seal = seal_back.to_vec(); +542 shared_recv +543 .open(&mut open_seal) +544 .expect("failed to open seal_back"); +545 let msg_back = Message::from_bytes(&open_seal).unwrap(); +546 assert_eq!(msg_back, msg); +547 } +548}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/discovery.rs.html b/pr/3367/docs/src/iroh/discovery.rs.html index 80439a4ac3..fccc10f6bd 100644 --- a/pr/3367/docs/src/iroh/discovery.rs.html +++ b/pr/3367/docs/src/iroh/discovery.rs.html @@ -1,4 +1,4 @@ -discovery.rs - source

    iroh/
    discovery.rs

    1//! Node address discovery.
    +discovery.rs - source

    iroh/
    discovery.rs

    1//! Node address discovery.
     2//!
     3//! To connect to an iroh node a [`NodeAddr`] is needed, which may contain a
     4//! [`RelayUrl`] or one or more *direct addresses* in addition to the [`NodeId`].
    @@ -7,1226 +7,1125 @@
     7//! connect directly with a [`NodeId`].
     8//!
     9//! For this to work however, the endpoint has to get the addressing  information by
    -10//! other means.  This can be done by manually calling [`Endpoint::add_node_addr`],
    -11//! but that still requires knowing the other addressing information.
    -12//!
    -13//! Node discovery is an automated system for an [`Endpoint`] to retrieve this addressing
    -14//! information.  Each iroh node will automatically publish their own addressing
    -15//! information.  Usually this means publishing which [`RelayUrl`] to use for their
    -16//! [`NodeId`], but they could also publish their direct addresses.
    -17//!
    -18//! The [`Discovery`] trait is used to define node discovery.  This allows multiple
    -19//! implementations to co-exist because there are many possible ways to implement this.
    -20//! Each [`Endpoint`] can use the discovery mechanisms most suitable to the application.
    -21//! The [`Builder::add_discovery`] method is used to add a discovery mechanism to an
    -22//! [`Endpoint`].
    -23//!
    -24//! Some generally useful discovery implementations are provided:
    -25//!
    -26//! - [`StaticProvider`] which allows application to add and remove out-of-band addressing
    -27//!   information.
    -28//!
    -29//! - The [`DnsDiscovery`] which performs lookups via the standard DNS systems.  To publish
    -30//!   to this DNS server a [`PkarrPublisher`] is needed.  [Number 0] runs a public instance
    -31//!   of a [`PkarrPublisher`] with attached DNS server which is globally available and a
    -32//!   reliable default choice.
    -33//!
    -34//! - The [`PkarrResolver`] which can perform lookups from designated [pkarr relay servers]
    -35//!   using HTTP.
    -36//!
    -37//! - [`MdnsDiscovery`]: mdns::MdnsDiscovery which uses the crate `swarm-discovery`, an
    -38//!   opinionated mDNS implementation, to discover nodes on the local network.
    -39//!
    -40//! - The [`DhtDiscovery`] also uses the [`pkarr`] system but can also publish and lookup
    -41//!   records to/from the Mainline DHT.
    -42//!
    -43//! To use multiple discovery systems simultaneously you can call [`Builder::add_discovery`].
    -44//! This will use [`ConcurrentDiscovery`] under the hood, which performs lookups to all
    -45//! discovery systems at the same time.
    -46//!
    -47//! [`Builder::add_discovery`] takes any type that implements [`IntoDiscovery`]. You can
    -48//! implement that trait on a builder struct if your discovery service needs information
    -49//! from the endpoint it is mounted on. During endpoint construction, your discovery service
    -50//! is built by calling [`IntoDiscovery::into_discovery`], passing a [`DiscoveryContext`] to your
    -51//! builder. The [`DiscoveryContext`] gives access to the endpoint's secret key and DNS resolver.
    -52//!
    -53//! If your discovery service does not need any information from its endpoint, you can
    -54//! pass the discovery service directly to [`Builder::add_discovery`]: All types that
    -55//! implement [`Discovery`] also have a blanket implementation of [`IntoDiscovery`].
    -56//!
    -57//! # Examples
    -58//!
    -59//! A very common setup is to enable DNS discovery, which needs to be done in two parts as a
    -60//! [`PkarrPublisher`] and [`DnsDiscovery`]:
    -61//!
    -62//! ```no_run
    -63//! use iroh::{
    +10//! other means.
    +11//!
    +12//! Node discovery is an automated system for an [`Endpoint`] to retrieve this addressing
    +13//! information.  Each iroh node will automatically publish their own addressing
    +14//! information.  Usually this means publishing which [`RelayUrl`] to use for their
    +15//! [`NodeId`], but they could also publish their direct addresses.
    +16//!
    +17//! The [`Discovery`] trait is used to define node discovery.  This allows multiple
    +18//! implementations to co-exist because there are many possible ways to implement this.
    +19//! Each [`Endpoint`] can use the discovery mechanisms most suitable to the application.
    +20//! The [`Builder::add_discovery`] method is used to add a discovery mechanism to an
    +21//! [`Endpoint`].
    +22//!
    +23//! Some generally useful discovery implementations are provided:
    +24//!
    +25//! - [`StaticProvider`] which allows application to add and remove out-of-band addressing
    +26//!   information.
    +27//!
    +28//! - The [`DnsDiscovery`] which performs lookups via the standard DNS systems.  To publish
    +29//!   to this DNS server a [`PkarrPublisher`] is needed.  [Number 0] runs a public instance
    +30//!   of a [`PkarrPublisher`] with attached DNS server which is globally available and a
    +31//!   reliable default choice.
    +32//!
    +33//! - The [`PkarrResolver`] which can perform lookups from designated [pkarr relay servers]
    +34//!   using HTTP.
    +35//!
    +36//! - [`MdnsDiscovery`]: mdns::MdnsDiscovery which uses the crate `swarm-discovery`, an
    +37//!   opinionated mDNS implementation, to discover nodes on the local network.
    +38//!
    +39//! - The [`DhtDiscovery`] also uses the [`pkarr`] system but can also publish and lookup
    +40//!   records to/from the Mainline DHT.
    +41//!
    +42//! To use multiple discovery systems simultaneously you can call [`Builder::add_discovery`].
    +43//! This will use [`ConcurrentDiscovery`] under the hood, which performs lookups to all
    +44//! discovery systems at the same time.
    +45//!
    +46//! [`Builder::add_discovery`] takes any type that implements [`IntoDiscovery`]. You can
    +47//! implement that trait on a builder struct if your discovery service needs information
    +48//! from the endpoint it is mounted on. During endpoint construction, your discovery service
    +49//! is built by calling [`IntoDiscovery::into_discovery`], passing a [`DiscoveryContext`] to your
    +50//! builder. The [`DiscoveryContext`] gives access to the endpoint's secret key and DNS resolver.
    +51//!
    +52//! If your discovery service does not need any information from its endpoint, you can
    +53//! pass the discovery service directly to [`Builder::add_discovery`]: All types that
    +54//! implement [`Discovery`] also have a blanket implementation of [`IntoDiscovery`].
    +55//!
    +56//! # Examples
    +57//!
    +58//! A very common setup is to enable DNS discovery, which needs to be done in two parts as a
    +59//! [`PkarrPublisher`] and [`DnsDiscovery`]:
    +60//!
    +61//! ```no_run
    +62//! use iroh::{
    +63//!     Endpoint, SecretKey,
     64//!     discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher},
    -65//!     Endpoint, SecretKey,
    -66//! };
    -67//!
    -68//! # async fn wrapper() -> n0_snafu::Result<()> {
    -69//! let ep = Endpoint::builder()
    -70//!     .add_discovery(PkarrPublisher::n0_dns())
    -71//!     .add_discovery(DnsDiscovery::n0_dns())
    -72//!     .bind()
    -73//!     .await?;
    -74//! # Ok(())
    -75//! # }
    -76//! ```
    -77//!
    -78//! To also enable [`MdnsDiscovery`] it can be added as another service.
    -79//!
    -80//! ```no_run
    -81//! #[cfg(feature = "discovery-local-network")]
    -82//! # {
    -83//! # use iroh::{
    -84//! #    discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher, mdns::MdnsDiscovery},
    -85//! #    Endpoint, SecretKey,
    -86//! # };
    -87//! #
    -88//! # async fn wrapper() -> n0_snafu::Result<()> {
    -89//! let ep = Endpoint::builder()
    -90//!     .add_discovery(PkarrPublisher::n0_dns())
    -91//!     .add_discovery(DnsDiscovery::n0_dns())
    -92//!     .add_discovery(MdnsDiscovery::builder())
    -93//!     .bind()
    -94//!     .await?;
    -95//! # Ok(())
    +65//! };
    +66//!
    +67//! # async fn wrapper() -> n0_snafu::Result<()> {
    +68//! let ep = Endpoint::builder()
    +69//!     .add_discovery(PkarrPublisher::n0_dns())
    +70//!     .add_discovery(DnsDiscovery::n0_dns())
    +71//!     .bind()
    +72//!     .await?;
    +73//! # Ok(())
    +74//! # }
    +75//! ```
    +76//!
    +77//! To also enable [`MdnsDiscovery`] it can be added as another service.
    +78//!
    +79//! ```no_run
    +80//! #[cfg(feature = "discovery-local-network")]
    +81//! # {
    +82//! # use iroh::{
    +83//! #    discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher, mdns::MdnsDiscovery},
    +84//! #    Endpoint, SecretKey,
    +85//! # };
    +86//! #
    +87//! # async fn wrapper() -> n0_snafu::Result<()> {
    +88//! let ep = Endpoint::builder()
    +89//!     .add_discovery(PkarrPublisher::n0_dns())
    +90//!     .add_discovery(DnsDiscovery::n0_dns())
    +91//!     .add_discovery(MdnsDiscovery::builder())
    +92//!     .bind()
    +93//!     .await?;
    +94//! # Ok(())
    +95//! # }
     96//! # }
    -97//! # }
    -98//! ```
    -99//!
    -100//! [`NodeAddr`]: iroh_base::NodeAddr
    -101//! [`RelayUrl`]: crate::RelayUrl
    -102//! [`Builder::add_discovery`]: crate::endpoint::Builder::add_discovery
    -103//! [`DnsDiscovery`]: dns::DnsDiscovery
    -104//! [Number 0]: https://n0.computer
    -105//! [`PkarrResolver`]: pkarr::PkarrResolver
    -106//! [`PkarrPublisher`]: pkarr::PkarrPublisher
    -107//! [`DhtDiscovery`]: pkarr::dht::DhtDiscovery
    -108//! [pkarr relay servers]: https://pkarr.org/#servers
    -109//! [`MdnsDiscovery`]: mdns::MdnsDiscovery
    -110//! [`StaticProvider`]: static_provider::StaticProvider
    -111
    -112use std::sync::Arc;
    -113
    -114use iroh_base::{NodeAddr, NodeId};
    -115use n0_future::{
    -116    boxed::BoxStream,
    -117    stream::StreamExt,
    -118    task::{self, AbortOnDropHandle},
    -119    time::{self, Duration},
    -120    Stream, TryStreamExt,
    -121};
    -122use nested_enum_utils::common_fields;
    -123use snafu::{ensure, IntoError, Snafu};
    -124use tokio::sync::oneshot;
    -125use tracing::{debug, error_span, warn, Instrument};
    -126
    -127#[cfg(not(wasm_browser))]
    -128use crate::dns::DnsResolver;
    -129pub use crate::node_info::{NodeData, NodeInfo, ParseError, UserData};
    -130use crate::{Endpoint, SecretKey};
    -131
    -132#[cfg(not(wasm_browser))]
    -133pub mod dns;
    -134
    -135#[cfg(feature = "discovery-local-network")]
    -136pub mod mdns;
    -137pub mod pkarr;
    -138pub mod static_provider;
    -139
    -140/// Trait for structs that can be converted into [`Discovery`].
    -141///
    -142/// This trait is implemented on builders for discovery services. Any type that implements this
    -143/// trait can be added as a discovery service in [`Builder::add_discovery`].
    +97//! ```
    +98//!
    +99//! [`NodeAddr`]: iroh_base::NodeAddr
    +100//! [`RelayUrl`]: crate::RelayUrl
    +101//! [`Builder::add_discovery`]: crate::endpoint::Builder::add_discovery
    +102//! [`DnsDiscovery`]: dns::DnsDiscovery
    +103//! [Number 0]: https://n0.computer
    +104//! [`PkarrResolver`]: pkarr::PkarrResolver
    +105//! [`PkarrPublisher`]: pkarr::PkarrPublisher
    +106//! [`DhtDiscovery`]: pkarr::dht::DhtDiscovery
    +107//! [pkarr relay servers]: https://pkarr.org/#servers
    +108//! [`MdnsDiscovery`]: mdns::MdnsDiscovery
    +109//! [`StaticProvider`]: static_provider::StaticProvider
    +110
    +111use std::sync::{Arc, RwLock};
    +112
    +113use iroh_base::{NodeAddr, NodeId};
    +114use n0_future::{
    +115    boxed::BoxStream,
    +116    stream::StreamExt,
    +117    task::{self, AbortOnDropHandle},
    +118    time::{self, Duration},
    +119};
    +120use nested_enum_utils::common_fields;
    +121use snafu::{IntoError, Snafu, ensure};
    +122use tokio::sync::oneshot;
    +123use tracing::{Instrument, debug, error_span, warn};
    +124
    +125#[cfg(not(wasm_browser))]
    +126use crate::dns::DnsResolver;
    +127pub use crate::node_info::{NodeData, NodeInfo, ParseError, UserData};
    +128use crate::{Endpoint, SecretKey};
    +129
    +130#[cfg(not(wasm_browser))]
    +131pub mod dns;
    +132
    +133#[cfg(feature = "discovery-local-network")]
    +134pub mod mdns;
    +135pub mod pkarr;
    +136pub mod static_provider;
    +137
    +138/// Trait for structs that can be converted into [`Discovery`].
    +139///
    +140/// This trait is implemented on builders for discovery services. Any type that implements this
    +141/// trait can be added as a discovery service in [`Builder::add_discovery`].
    +142///
    +143/// Any type that implements [`Discovery`] also implements [`IntoDiscovery`].
     144///
    -145/// Any type that implements [`Discovery`] also implements [`IntoDiscovery`].
    -146///
    -147/// Iroh uses this trait to allow configuring the set of discovery services on the endpoint
    -148/// builder, while providing the discovery services access to information about the endpoint
    -149/// creation via the [`DiscoveryContext`] parameter to [`IntoDiscovery::into_discovery`].
    -150///
    -151/// [`Builder::add_discovery`]: crate::endpoint::Builder::add_discovery
    -152pub trait IntoDiscovery: Send + Sync + std::fmt::Debug + 'static {
    -153    /// Turns this discovery builder into a ready-to-use discovery service.
    -154    ///
    -155    /// The [`DiscoveryContext`] contains information about the [`Endpoint`] onto which this
    -156    /// discovery service is being added. It can be used by discovery services that need
    -157    /// a DNS resolver, or the endpoint's secret key to sign messages.
    -158    ///
    -159    /// If an error is returned, building the endpoint will fail with this error.
    -160    fn into_discovery(
    -161        self,
    -162        context: &DiscoveryContext,
    -163    ) -> Result<impl Discovery, IntoDiscoveryError>;
    -164}
    -165
    -166/// Blanket no-op impl of `IntoDiscovery` for `T: Discovery`.
    -167impl<T: Discovery> IntoDiscovery for T {
    -168    fn into_discovery(
    -169        self,
    -170        _context: &DiscoveryContext,
    -171    ) -> Result<impl Discovery, IntoDiscoveryError> {
    -172        Ok(self)
    -173    }
    -174}
    -175
    -176/// Non-public dyn-compatible version of [`IntoDiscovery`], used in [`crate::endpoint::Builder`].
    -177pub(crate) trait DynIntoDiscovery: Send + Sync + std::fmt::Debug + 'static {
    -178    /// See [`IntoDiscovery::into_discovery`]
    -179    fn into_discovery(
    -180        self: Box<Self>,
    -181        context: &DiscoveryContext,
    -182    ) -> Result<Box<dyn Discovery>, IntoDiscoveryError>;
    -183}
    -184
    -185impl<T: IntoDiscovery> DynIntoDiscovery for T {
    -186    fn into_discovery(
    -187        self: Box<Self>,
    -188        context: &DiscoveryContext,
    -189    ) -> Result<Box<dyn Discovery>, IntoDiscoveryError> {
    -190        let disco: Box<dyn Discovery> = Box::new(IntoDiscovery::into_discovery(*self, context)?);
    -191        Ok(disco)
    -192    }
    -193}
    -194
    -195/// Context about the [`Endpoint`] for discovery services.
    -196#[derive(Debug)]
    -197pub struct DiscoveryContext<'a> {
    -198    #[cfg(not(wasm_browser))]
    -199    pub(crate) dns_resolver: &'a DnsResolver,
    -200    pub(crate) secret_key: &'a SecretKey,
    -201}
    -202
    -203impl<'a> DiscoveryContext<'a> {
    -204    /// Returns the [`NodeId`] of the endpoint.
    -205    pub fn node_id(&self) -> NodeId {
    -206        self.secret_key.public()
    -207    }
    -208
    -209    /// Returns the [`SecretKey`] of the endpoint.
    -210    pub fn secret_key(&self) -> &SecretKey {
    -211        self.secret_key
    -212    }
    -213
    -214    /// Returns the [`DnsResolver`] used by the endpoint.
    -215    #[cfg(not(wasm_browser))]
    -216    pub fn dns_resolver(&self) -> &DnsResolver {
    -217        self.dns_resolver
    -218    }
    -219}
    -220
    -221/// IntoDiscovery errors
    -222#[common_fields({
    -223    backtrace: Option<snafu::Backtrace>,
    -224    #[snafu(implicit)]
    -225    span_trace: n0_snafu::SpanTrace,
    -226})]
    -227#[allow(missing_docs)]
    -228#[derive(Debug, Snafu)]
    -229#[non_exhaustive]
    -230#[snafu(module)]
    -231pub enum IntoDiscoveryError {
    -232    #[snafu(display("Service '{provenance}' error"))]
    -233    User {
    -234        provenance: &'static str,
    -235        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    -236    },
    -237}
    -238
    -239impl IntoDiscoveryError {
    -240    /// Creates a new user error from an arbitrary error type.
    -241    pub fn from_err<T: std::error::Error + Send + Sync + 'static>(
    -242        provenance: &'static str,
    -243        source: T,
    -244    ) -> Self {
    -245        into_discovery_error::UserSnafu { provenance }.into_error(Box::new(source))
    -246    }
    -247
    -248    /// Creates a new user error from an arbitrary boxed error type.
    -249    pub fn from_err_box(
    -250        provenance: &'static str,
    -251        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    -252    ) -> Self {
    -253        into_discovery_error::UserSnafu { provenance }.into_error(source)
    -254    }
    -255}
    -256
    -257/// Discovery errors
    -258#[common_fields({
    -259    backtrace: Option<snafu::Backtrace>,
    -260    #[snafu(implicit)]
    -261    span_trace: n0_snafu::SpanTrace,
    -262})]
    -263#[allow(missing_docs)]
    -264#[derive(Debug, Snafu)]
    -265#[non_exhaustive]
    -266pub enum DiscoveryError {
    -267    #[snafu(display("No discovery service configured"))]
    -268    NoServiceConfigured {},
    -269    #[snafu(display("Discovery produced no results for {}", node_id.fmt_short()))]
    -270    NoResults { node_id: NodeId },
    -271    #[snafu(display("Service '{provenance}' error"))]
    -272    User {
    -273        provenance: &'static str,
    -274        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    -275    },
    -276}
    -277
    -278impl DiscoveryError {
    -279    /// Creates a new user error from an arbitrary error type.
    -280    pub fn from_err<T: std::error::Error + Send + Sync + 'static>(
    -281        provenance: &'static str,
    -282        source: T,
    -283    ) -> Self {
    -284        UserSnafu { provenance }.into_error(Box::new(source))
    -285    }
    -286
    -287    /// Creates a new user error from an arbitrary boxed error type.
    -288    pub fn from_err_box(
    -289        provenance: &'static str,
    -290        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    -291    ) -> Self {
    -292        UserSnafu { provenance }.into_error(source)
    -293    }
    -294}
    -295
    -296/// Node discovery for [`super::Endpoint`].
    -297///
    -298/// This trait defines publishing and resolving addressing information for a [`NodeId`].
    -299/// This enables connecting to other nodes with only knowing the [`NodeId`], by using this
    -300/// [`Discovery`] system to look up the actual addressing information.  It is common for
    -301/// implementations to require each node to publish their own information before it can be
    -302/// looked up by other nodes.
    -303///
    -304/// The published addressing information can include both a [`RelayUrl`] and/or direct
    -305/// addresses. See [`NodeData`] for details.
    -306///
    -307/// To allow for discovery, the [`super::Endpoint`] will call `publish` whenever
    -308/// discovery information changes. If a discovery mechanism requires a periodic
    -309/// refresh, it should start its own task.
    -310///
    -311/// [`RelayUrl`]: crate::RelayUrl
    -312pub trait Discovery: std::fmt::Debug + Send + Sync + 'static {
    -313    /// Publishes the given [`NodeData`] to the discovery mechanism.
    -314    ///
    -315    /// This is fire and forget, since the [`Endpoint`] can not wait for successful
    -316    /// publishing. If publishing is async, the implementation should start it's own task.
    -317    ///
    -318    /// This will be called from a tokio task, so it is safe to spawn new tasks.
    -319    /// These tasks will be run on the runtime of the [`super::Endpoint`].
    -320    fn publish(&self, _data: &NodeData) {}
    -321
    -322    /// Resolves the [`DiscoveryItem`] for the given [`NodeId`].
    -323    ///
    -324    /// Once the returned [`BoxStream`] is dropped, the service should stop any pending
    -325    /// work.
    -326    fn resolve(
    -327        &self,
    -328        _node_id: NodeId,
    -329    ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -330        None
    -331    }
    -332
    -333    /// Subscribe to all addresses that get *passively* discovered.
    -334    ///
    -335    /// An implementation may choose to defer emitting passively discovered nodes
    -336    /// until the stream is actually polled. To avoid missing discovered nodes,
    -337    /// poll the stream as soon as possible.
    -338    ///
    -339    /// If you do not regularly poll the stream, you may miss discovered nodes.
    -340    ///
    -341    /// Any discovery systems that only discover when explicitly resolving a
    -342    /// specific [`NodeId`] do not need to implement this method. Any nodes or
    -343    /// addresses that are discovered by calling `resolve` should NOT be added
    -344    /// to the `subscribe` stream.
    -345    ///
    -346    /// Discovery systems that are capable of receiving information about [`NodeId`]s
    -347    /// and their addressing information without explicitly calling `resolve`, i.e.,
    -348    /// systems that do "passive" discovery, should implement this method. If
    -349    /// `subscribe` is called multiple times, the passively discovered addresses
    -350    /// should be sent on all streams.
    -351    ///
    -352    /// The [`crate::endpoint::Endpoint`] will `subscribe` to the discovery system
    -353    /// and add the discovered addresses to the internal address book as they arrive
    -354    /// on this stream.
    -355    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>> {
    -356        None
    -357    }
    -358}
    -359
    -360impl<T: Discovery> Discovery for Arc<T> {}
    -361
    -362/// Node discovery results from [`Discovery`] services.
    -363///
    -364/// This is the item in the streams returned from [`Discovery::resolve`] and
    -365/// [`Discovery::subscribe`]. It contains the [`NodeData`] about the discovered node,
    -366/// and some additional metadata about the discovery.
    -367///
    -368/// This struct derefs to [`NodeData`], so you can access the methods from [`NodeData`]
    -369/// directly from [`DiscoveryItem`].
    -370#[derive(Debug, Clone)]
    -371pub struct DiscoveryItem {
    -372    /// The node info for the node, as discovered by the the discovery service.
    -373    node_info: NodeInfo,
    -374    /// A static string to identify the discovery source.
    -375    ///
    -376    /// Should be uniform per discovery service.
    -377    provenance: &'static str,
    -378    /// Optional timestamp when this node address info was last updated.
    -379    ///
    -380    /// Must be microseconds since the unix epoch.
    -381    // TODO(ramfox): this is currently unused. As we develop more `DiscoveryService`s, we may discover that we do not need this. It is only truly relevant when comparing `relay_urls`, since we can attempt to dial any number of socket addresses, but expect each node to have one "home relay" that we will attempt to contact them on. This means we would need some way to determine which relay url to choose between, if more than one relay url is reported.
    -382    last_updated: Option<u64>,
    -383}
    +145/// Iroh uses this trait to allow configuring the set of discovery services on the endpoint
    +146/// builder, while providing the discovery services access to information about the endpoint
    +147/// creation via the [`DiscoveryContext`] parameter to [`IntoDiscovery::into_discovery`].
    +148///
    +149/// [`Builder::add_discovery`]: crate::endpoint::Builder::add_discovery
    +150pub trait IntoDiscovery: Send + Sync + std::fmt::Debug + 'static {
    +151    /// Turns this discovery builder into a ready-to-use discovery service.
    +152    ///
    +153    /// The [`DiscoveryContext`] contains information about the [`Endpoint`] onto which this
    +154    /// discovery service is being added. It can be used by discovery services that need
    +155    /// a DNS resolver, or the endpoint's secret key to sign messages.
    +156    ///
    +157    /// If an error is returned, building the endpoint will fail with this error.
    +158    fn into_discovery(
    +159        self,
    +160        context: &DiscoveryContext,
    +161    ) -> Result<impl Discovery, IntoDiscoveryError>;
    +162}
    +163
    +164/// Blanket no-op impl of `IntoDiscovery` for `T: Discovery`.
    +165impl<T: Discovery> IntoDiscovery for T {
    +166    fn into_discovery(
    +167        self,
    +168        _context: &DiscoveryContext,
    +169    ) -> Result<impl Discovery, IntoDiscoveryError> {
    +170        Ok(self)
    +171    }
    +172}
    +173
    +174/// Non-public dyn-compatible version of [`IntoDiscovery`], used in [`crate::endpoint::Builder`].
    +175pub(crate) trait DynIntoDiscovery: Send + Sync + std::fmt::Debug + 'static {
    +176    /// See [`IntoDiscovery::into_discovery`]
    +177    fn into_discovery(
    +178        self: Box<Self>,
    +179        context: &DiscoveryContext,
    +180    ) -> Result<Box<dyn Discovery>, IntoDiscoveryError>;
    +181}
    +182
    +183impl<T: IntoDiscovery> DynIntoDiscovery for T {
    +184    fn into_discovery(
    +185        self: Box<Self>,
    +186        context: &DiscoveryContext,
    +187    ) -> Result<Box<dyn Discovery>, IntoDiscoveryError> {
    +188        let disco: Box<dyn Discovery> = Box::new(IntoDiscovery::into_discovery(*self, context)?);
    +189        Ok(disco)
    +190    }
    +191}
    +192
    +193/// Context about the [`Endpoint`] for discovery services.
    +194#[derive(Debug)]
    +195pub struct DiscoveryContext<'a> {
    +196    #[cfg(not(wasm_browser))]
    +197    pub(crate) dns_resolver: &'a DnsResolver,
    +198    pub(crate) secret_key: &'a SecretKey,
    +199}
    +200
    +201impl DiscoveryContext<'_> {
    +202    /// Returns the [`NodeId`] of the endpoint.
    +203    pub fn node_id(&self) -> NodeId {
    +204        self.secret_key.public()
    +205    }
    +206
    +207    /// Returns the [`SecretKey`] of the endpoint.
    +208    pub fn secret_key(&self) -> &SecretKey {
    +209        self.secret_key
    +210    }
    +211
    +212    /// Returns the [`DnsResolver`] used by the endpoint.
    +213    #[cfg(not(wasm_browser))]
    +214    pub fn dns_resolver(&self) -> &DnsResolver {
    +215        self.dns_resolver
    +216    }
    +217}
    +218
    +219/// IntoDiscovery errors
    +220#[common_fields({
    +221    backtrace: Option<snafu::Backtrace>,
    +222    #[snafu(implicit)]
    +223    span_trace: n0_snafu::SpanTrace,
    +224})]
    +225#[allow(missing_docs)]
    +226#[derive(Debug, Snafu)]
    +227#[non_exhaustive]
    +228#[snafu(module)]
    +229pub enum IntoDiscoveryError {
    +230    #[snafu(display("Service '{provenance}' error"))]
    +231    User {
    +232        provenance: &'static str,
    +233        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    +234    },
    +235}
    +236
    +237impl IntoDiscoveryError {
    +238    /// Creates a new user error from an arbitrary error type.
    +239    pub fn from_err<T: std::error::Error + Send + Sync + 'static>(
    +240        provenance: &'static str,
    +241        source: T,
    +242    ) -> Self {
    +243        into_discovery_error::UserSnafu { provenance }.into_error(Box::new(source))
    +244    }
    +245
    +246    /// Creates a new user error from an arbitrary boxed error type.
    +247    pub fn from_err_box(
    +248        provenance: &'static str,
    +249        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    +250    ) -> Self {
    +251        into_discovery_error::UserSnafu { provenance }.into_error(source)
    +252    }
    +253}
    +254
    +255/// Discovery errors
    +256#[common_fields({
    +257    backtrace: Option<snafu::Backtrace>,
    +258    #[snafu(implicit)]
    +259    span_trace: n0_snafu::SpanTrace,
    +260})]
    +261#[allow(missing_docs)]
    +262#[derive(Debug, Snafu)]
    +263#[non_exhaustive]
    +264pub enum DiscoveryError {
    +265    #[snafu(display("No discovery service configured"))]
    +266    NoServiceConfigured {},
    +267    #[snafu(display("Discovery produced no results for {}", node_id.fmt_short()))]
    +268    NoResults { node_id: NodeId },
    +269    #[snafu(display("Service '{provenance}' error"))]
    +270    User {
    +271        provenance: &'static str,
    +272        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    +273    },
    +274}
    +275
    +276impl DiscoveryError {
    +277    /// Creates a new user error from an arbitrary error type.
    +278    pub fn from_err<T: std::error::Error + Send + Sync + 'static>(
    +279        provenance: &'static str,
    +280        source: T,
    +281    ) -> Self {
    +282        UserSnafu { provenance }.into_error(Box::new(source))
    +283    }
    +284
    +285    /// Creates a new user error from an arbitrary boxed error type.
    +286    pub fn from_err_box(
    +287        provenance: &'static str,
    +288        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    +289    ) -> Self {
    +290        UserSnafu { provenance }.into_error(source)
    +291    }
    +292}
    +293
    +294/// Node discovery for [`super::Endpoint`].
    +295///
    +296/// This trait defines publishing and resolving addressing information for a [`NodeId`].
    +297/// This enables connecting to other nodes with only knowing the [`NodeId`], by using this
    +298/// [`Discovery`] system to look up the actual addressing information.  It is common for
    +299/// implementations to require each node to publish their own information before it can be
    +300/// looked up by other nodes.
    +301///
    +302/// The published addressing information can include both a [`RelayUrl`] and/or direct
    +303/// addresses. See [`NodeData`] for details.
    +304///
    +305/// To allow for discovery, the [`super::Endpoint`] will call `publish` whenever
    +306/// discovery information changes. If a discovery mechanism requires a periodic
    +307/// refresh, it should start its own task.
    +308///
    +309/// [`RelayUrl`]: crate::RelayUrl
    +310pub trait Discovery: std::fmt::Debug + Send + Sync + 'static {
    +311    /// Publishes the given [`NodeData`] to the discovery mechanism.
    +312    ///
    +313    /// This is fire and forget, since the [`Endpoint`] can not wait for successful
    +314    /// publishing. If publishing is async, the implementation should start it's own task.
    +315    ///
    +316    /// This will be called from a tokio task, so it is safe to spawn new tasks.
    +317    /// These tasks will be run on the runtime of the [`super::Endpoint`].
    +318    fn publish(&self, _data: &NodeData) {}
    +319
    +320    /// Resolves the [`DiscoveryItem`] for the given [`NodeId`].
    +321    ///
    +322    /// Once the returned [`BoxStream`] is dropped, the service should stop any pending
    +323    /// work.
    +324    fn resolve(
    +325        &self,
    +326        _node_id: NodeId,
    +327    ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +328        None
    +329    }
    +330}
    +331
    +332impl<T: Discovery> Discovery for Arc<T> {
    +333    fn publish(&self, data: &NodeData) {
    +334        self.as_ref().publish(data);
    +335    }
    +336
    +337    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +338        self.as_ref().resolve(node_id)
    +339    }
    +340}
    +341
    +342/// Node discovery results from [`Discovery`] services.
    +343///
    +344/// This is the item in the streams returned from [`Discovery::resolve`].
    +345/// It contains the [`NodeData`] about the discovered node,
    +346/// and some additional metadata about the discovery.
    +347///
    +348/// This struct derefs to [`NodeData`], so you can access the methods from [`NodeData`]
    +349/// directly from [`DiscoveryItem`].
    +350#[derive(Debug, Clone, Eq, PartialEq)]
    +351pub struct DiscoveryItem {
    +352    /// The node info for the node, as discovered by the the discovery service.
    +353    node_info: NodeInfo,
    +354    /// A static string to identify the discovery source.
    +355    ///
    +356    /// Should be uniform per discovery service.
    +357    provenance: &'static str,
    +358    /// Optional timestamp when this node address info was last updated.
    +359    ///
    +360    /// Must be microseconds since the unix epoch.
    +361    // TODO(ramfox): this is currently unused. As we develop more `DiscoveryService`s, we may discover that we do not need this. It is only truly relevant when comparing `relay_urls`, since we can attempt to dial any number of socket addresses, but expect each node to have one "home relay" that we will attempt to contact them on. This means we would need some way to determine which relay url to choose between, if more than one relay url is reported.
    +362    last_updated: Option<u64>,
    +363}
    +364
    +365impl DiscoveryItem {
    +366    /// Creates a new [`DiscoveryItem`] from a [`NodeInfo`].
    +367    pub fn new(node_info: NodeInfo, provenance: &'static str, last_updated: Option<u64>) -> Self {
    +368        Self {
    +369            node_info,
    +370            provenance,
    +371            last_updated,
    +372        }
    +373    }
    +374
    +375    /// Returns the node id of the discovered node.
    +376    pub fn node_id(&self) -> NodeId {
    +377        self.node_info.node_id
    +378    }
    +379
    +380    /// Returns the [`NodeInfo`] for the discovered node.
    +381    pub fn node_info(&self) -> &NodeInfo {
    +382        &self.node_info
    +383    }
     384
    -385impl DiscoveryItem {
    -386    /// Creates a new [`DiscoveryItem`] from a [`NodeInfo`].
    -387    pub fn new(node_info: NodeInfo, provenance: &'static str, last_updated: Option<u64>) -> Self {
    -388        Self {
    -389            node_info,
    -390            provenance,
    -391            last_updated,
    -392        }
    -393    }
    -394
    -395    /// Returns the node id of the discovered node.
    -396    pub fn node_id(&self) -> NodeId {
    -397        self.node_info.node_id
    +385    /// Returns the provenance of this discovery item.
    +386    ///
    +387    /// The provenance is a static string which identifies the discovery service that produced
    +388    /// this discovery item.
    +389    pub fn provenance(&self) -> &'static str {
    +390        self.provenance
    +391    }
    +392
    +393    /// Returns the optional timestamp when this node info was last updated.
    +394    ///
    +395    /// The value is microseconds since the unix epoch.
    +396    pub fn last_updated(&self) -> Option<u64> {
    +397        self.last_updated
     398    }
     399
    -400    /// Returns the [`NodeInfo`] for the discovered node.
    -401    pub fn node_info(&self) -> &NodeInfo {
    -402        &self.node_info
    +400    /// Converts into a [`NodeAddr`] by cloning the needed fields.
    +401    pub fn to_node_addr(&self) -> NodeAddr {
    +402        self.node_info.to_node_addr()
     403    }
     404
    -405    /// Returns the provenance of this discovery item.
    -406    ///
    -407    /// The provenance is a static string which identifies the discovery service that produced
    -408    /// this discovery item.
    -409    pub fn provenance(&self) -> &'static str {
    -410        self.provenance
    -411    }
    -412
    -413    /// Returns the optional timestamp when this node info was last updated.
    -414    ///
    -415    /// The value is microseconds since the unix epoch.
    -416    pub fn last_updated(&self) -> Option<u64> {
    -417        self.last_updated
    -418    }
    -419
    -420    /// Converts into a [`NodeAddr`] by cloning the needed fields.
    -421    pub fn to_node_addr(&self) -> NodeAddr {
    -422        self.node_info.to_node_addr()
    -423    }
    -424
    -425    /// Converts into a [`NodeAddr`] without cloning.
    -426    pub fn into_node_addr(self) -> NodeAddr {
    -427        self.node_info.into_node_addr()
    -428    }
    -429
    -430    /// Returns any user-defined data.
    -431    pub fn user_data(&self) -> Option<UserData> {
    -432        self.node_info().data.user_data().cloned()
    -433    }
    -434}
    -435
    -436impl std::ops::Deref for DiscoveryItem {
    -437    type Target = NodeData;
    -438    fn deref(&self) -> &Self::Target {
    -439        &self.node_info.data
    -440    }
    -441}
    -442
    -443impl From<DiscoveryItem> for NodeInfo {
    -444    fn from(item: DiscoveryItem) -> Self {
    -445        item.node_info
    -446    }
    -447}
    -448
    -449/// A discovery service that combines multiple discovery sources.
    -450///
    -451/// The discovery services will resolve concurrently.
    -452#[derive(Debug, Default)]
    -453pub struct ConcurrentDiscovery {
    -454    services: Vec<Box<dyn Discovery>>,
    -455}
    -456
    -457impl ConcurrentDiscovery {
    -458    /// Creates an empty [`ConcurrentDiscovery`].
    -459    pub fn empty() -> Self {
    -460        Self::default()
    -461    }
    -462
    -463    /// Creates a new [`ConcurrentDiscovery`].
    -464    pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self {
    -465        Self { services }
    -466    }
    -467
    -468    /// Adds a [`Discovery`] service.
    -469    pub fn add(&mut self, service: impl Discovery + 'static) {
    -470        self.services.push(Box::new(service));
    +405    /// Converts into a [`NodeAddr`] without cloning.
    +406    pub fn into_node_addr(self) -> NodeAddr {
    +407        self.node_info.into_node_addr()
    +408    }
    +409
    +410    /// Returns any user-defined data.
    +411    pub fn user_data(&self) -> Option<UserData> {
    +412        self.node_info().data.user_data().cloned()
    +413    }
    +414}
    +415
    +416impl std::ops::Deref for DiscoveryItem {
    +417    type Target = NodeData;
    +418    fn deref(&self) -> &Self::Target {
    +419        &self.node_info.data
    +420    }
    +421}
    +422
    +423impl From<DiscoveryItem> for NodeInfo {
    +424    fn from(item: DiscoveryItem) -> Self {
    +425        item.node_info
    +426    }
    +427}
    +428
    +429/// A discovery service that combines multiple discovery sources.
    +430///
    +431/// The discovery services will resolve concurrently.
    +432#[derive(Debug, Default, Clone)]
    +433pub struct ConcurrentDiscovery {
    +434    services: Arc<RwLock<Vec<Box<dyn Discovery>>>>,
    +435    /// The data last published, used to publish when adding a new service.
    +436    last_data: Arc<RwLock<Option<NodeData>>>,
    +437}
    +438
    +439impl ConcurrentDiscovery {
    +440    /// Creates an empty [`ConcurrentDiscovery`].
    +441    pub fn empty() -> Self {
    +442        Self::default()
    +443    }
    +444
    +445    /// Creates a new [`ConcurrentDiscovery`].
    +446    pub fn from_services(services: Vec<Box<dyn Discovery>>) -> Self {
    +447        Self {
    +448            services: Arc::new(RwLock::new(services)),
    +449            last_data: Default::default(),
    +450        }
    +451    }
    +452
    +453    /// Adds a [`Discovery`] service.
    +454    ///
    +455    /// If there is historical discovery data, it will be published immediately on this service.
    +456    pub fn add(&self, service: impl Discovery + 'static) {
    +457        self.add_boxed(Box::new(service))
    +458    }
    +459
    +460    /// Adds an already `Box`ed [`Discovery`] service.
    +461    ///
    +462    /// If there is historical discovery data, it will be published immediately on this service.
    +463    pub fn add_boxed(&self, service: Box<dyn Discovery>) {
    +464        {
    +465            let data = self.last_data.read().expect("poisoned");
    +466            if let Some(data) = &*data {
    +467                service.publish(data)
    +468            }
    +469        }
    +470        self.services.write().expect("poisoned").push(service);
     471    }
    -472}
    -473
    -474impl<T> From<T> for ConcurrentDiscovery
    -475where
    -476    T: IntoIterator<Item = Box<dyn Discovery>>,
    -477{
    -478    fn from(iter: T) -> Self {
    -479        let services = iter.into_iter().collect::<Vec<_>>();
    -480        Self { services }
    +472
    +473    /// Is there any services configured?
    +474    pub fn is_empty(&self) -> bool {
    +475        self.services.read().expect("poisoned").is_empty()
    +476    }
    +477
    +478    /// How many services are configured
    +479    pub fn len(&self) -> usize {
    +480        self.services.read().expect("poisoned").len()
     481    }
     482}
     483
    -484impl Discovery for ConcurrentDiscovery {
    -485    fn publish(&self, data: &NodeData) {
    -486        for service in &self.services {
    -487            service.publish(data);
    -488        }
    -489    }
    -490
    -491    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -492        let streams = self
    -493            .services
    -494            .iter()
    -495            .filter_map(|service| service.resolve(node_id));
    +484impl<T> From<T> for ConcurrentDiscovery
    +485where
    +486    T: IntoIterator<Item = Box<dyn Discovery>>,
    +487{
    +488    fn from(iter: T) -> Self {
    +489        let services = iter.into_iter().collect::<Vec<_>>();
    +490        Self {
    +491            services: Arc::new(RwLock::new(services)),
    +492            last_data: Default::default(),
    +493        }
    +494    }
    +495}
     496
    -497        let streams = n0_future::MergeBounded::from_iter(streams);
    -498        Some(Box::pin(streams))
    -499    }
    -500
    -501    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>> {
    -502        let mut streams = vec![];
    -503        for service in self.services.iter() {
    -504            if let Some(stream) = service.subscribe() {
    -505                streams.push(stream)
    -506            }
    -507        }
    -508
    -509        let streams = n0_future::MergeBounded::from_iter(streams);
    -510        Some(Box::pin(streams))
    -511    }
    -512}
    -513
    -514/// Maximum duration since the last control or data message received from an endpoint to make us
    -515/// start a discovery task.
    -516const MAX_AGE: Duration = Duration::from_secs(10);
    -517
    -518/// A wrapper around a tokio task which runs a node discovery.
    -519pub(super) struct DiscoveryTask {
    -520    on_first_rx: oneshot::Receiver<Result<(), DiscoveryError>>,
    -521    _task: AbortOnDropHandle<()>,
    -522}
    -523
    -524impl DiscoveryTask {
    -525    /// Starts a discovery task.
    -526    pub(super) fn start(ep: Endpoint, node_id: NodeId) -> Result<Self, DiscoveryError> {
    -527        ensure!(ep.discovery().is_some(), NoServiceConfiguredSnafu);
    -528        let (on_first_tx, on_first_rx) = oneshot::channel();
    -529        let me = ep.node_id();
    -530        let task = task::spawn(
    -531            async move { Self::run(ep, node_id, on_first_tx).await }.instrument(
    -532                error_span!("discovery", me = %me.fmt_short(), node = %node_id.fmt_short()),
    -533            ),
    -534        );
    -535        Ok(Self {
    -536            _task: AbortOnDropHandle::new(task),
    -537            on_first_rx,
    -538        })
    -539    }
    -540
    -541    /// Starts a discovery task after a delay and only if no path to the node was recently active.
    -542    ///
    -543    /// This returns `None` if we received data or control messages from the remote endpoint
    -544    /// recently enough. If not it returns a [`DiscoveryTask`].
    -545    ///
    -546    /// If `delay` is set, the [`DiscoveryTask`] will first wait for `delay` and then check again
    -547    /// if we recently received messages from remote endpoint. If true, the task will abort.
    -548    /// Otherwise, or if no `delay` is set, the discovery will be started.
    -549    pub(super) fn maybe_start_after_delay(
    -550        ep: &Endpoint,
    -551        node_id: NodeId,
    -552        delay: Option<Duration>,
    -553    ) -> Result<Option<Self>, DiscoveryError> {
    -554        // If discovery is not needed, don't even spawn a task.
    -555        if !Self::needs_discovery(ep, node_id) {
    -556            return Ok(None);
    -557        }
    -558        ensure!(ep.discovery().is_some(), NoServiceConfiguredSnafu);
    -559        let (on_first_tx, on_first_rx) = oneshot::channel();
    -560        let ep = ep.clone();
    -561        let me = ep.node_id();
    -562        let task = task::spawn(
    -563            async move {
    -564                // If delay is set, wait and recheck if discovery is needed. If not, early-exit.
    -565                if let Some(delay) = delay {
    -566                    time::sleep(delay).await;
    -567                    if !Self::needs_discovery(&ep, node_id) {
    -568                        debug!("no discovery needed, abort");
    -569                        on_first_tx.send(Ok(())).ok();
    -570                        return;
    -571                    }
    -572                }
    -573                Self::run(ep, node_id, on_first_tx).await
    -574            }
    -575            .instrument(
    -576                error_span!("discovery", me = %me.fmt_short(), node = %node_id.fmt_short()),
    -577            ),
    -578        );
    -579        Ok(Some(Self {
    -580            _task: AbortOnDropHandle::new(task),
    -581            on_first_rx,
    -582        }))
    -583    }
    -584
    -585    /// Waits until the discovery task produced at least one result.
    -586    pub(super) async fn first_arrived(&mut self) -> Result<(), DiscoveryError> {
    -587        let fut = &mut self.on_first_rx;
    -588        fut.await.expect("sender dropped")?;
    -589        Ok(())
    +497impl Discovery for ConcurrentDiscovery {
    +498    fn publish(&self, data: &NodeData) {
    +499        let services = self.services.read().expect("poisoned");
    +500        for service in &*services {
    +501            service.publish(data);
    +502        }
    +503
    +504        self.last_data
    +505            .write()
    +506            .expect("poisoned")
    +507            .replace(data.clone());
    +508    }
    +509
    +510    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +511        let services = self.services.read().expect("poisoned");
    +512        let streams = services
    +513            .iter()
    +514            .filter_map(|service| service.resolve(node_id));
    +515
    +516        let streams = n0_future::MergeBounded::from_iter(streams);
    +517        Some(Box::pin(streams))
    +518    }
    +519}
    +520
    +521/// Maximum duration since the last control or data message received from an endpoint to make us
    +522/// start a discovery task.
    +523const MAX_AGE: Duration = Duration::from_secs(10);
    +524
    +525/// A wrapper around a tokio task which runs a node discovery.
    +526pub(super) struct DiscoveryTask {
    +527    on_first_rx: oneshot::Receiver<Result<(), DiscoveryError>>,
    +528    _task: AbortOnDropHandle<()>,
    +529}
    +530
    +531impl DiscoveryTask {
    +532    /// Starts a discovery task.
    +533    pub(super) fn start(ep: Endpoint, node_id: NodeId) -> Result<Self, DiscoveryError> {
    +534        ensure!(!ep.discovery().is_empty(), NoServiceConfiguredSnafu);
    +535        let (on_first_tx, on_first_rx) = oneshot::channel();
    +536        let me = ep.node_id();
    +537        let task = task::spawn(
    +538            async move { Self::run(ep, node_id, on_first_tx).await }.instrument(
    +539                error_span!("discovery", me = %me.fmt_short(), node = %node_id.fmt_short()),
    +540            ),
    +541        );
    +542        Ok(Self {
    +543            _task: AbortOnDropHandle::new(task),
    +544            on_first_rx,
    +545        })
    +546    }
    +547
    +548    /// Starts a discovery task after a delay and only if no path to the node was recently active.
    +549    ///
    +550    /// This returns `None` if we received data or control messages from the remote endpoint
    +551    /// recently enough. If not it returns a [`DiscoveryTask`].
    +552    ///
    +553    /// If `delay` is set, the [`DiscoveryTask`] will first wait for `delay` and then check again
    +554    /// if we recently received messages from remote endpoint. If true, the task will abort.
    +555    /// Otherwise, or if no `delay` is set, the discovery will be started.
    +556    pub(super) fn maybe_start_after_delay(
    +557        ep: &Endpoint,
    +558        node_id: NodeId,
    +559        delay: Option<Duration>,
    +560    ) -> Result<Option<Self>, DiscoveryError> {
    +561        // If discovery is not needed, don't even spawn a task.
    +562        if !ep.needs_discovery(node_id, MAX_AGE) {
    +563            return Ok(None);
    +564        }
    +565        ensure!(!ep.discovery().is_empty(), NoServiceConfiguredSnafu);
    +566        let (on_first_tx, on_first_rx) = oneshot::channel();
    +567        let ep = ep.clone();
    +568        let me = ep.node_id();
    +569        let task = task::spawn(
    +570            async move {
    +571                // If delay is set, wait and recheck if discovery is needed. If not, early-exit.
    +572                if let Some(delay) = delay {
    +573                    time::sleep(delay).await;
    +574                    if !ep.needs_discovery(node_id, MAX_AGE) {
    +575                        debug!("no discovery needed, abort");
    +576                        on_first_tx.send(Ok(())).ok();
    +577                        return;
    +578                    }
    +579                }
    +580                Self::run(ep, node_id, on_first_tx).await
    +581            }
    +582            .instrument(
    +583                error_span!("discovery", me = %me.fmt_short(), node = %node_id.fmt_short()),
    +584            ),
    +585        );
    +586        Ok(Some(Self {
    +587            _task: AbortOnDropHandle::new(task),
    +588            on_first_rx,
    +589        }))
     590    }
     591
    -592    fn create_stream(
    -593        ep: &Endpoint,
    -594        node_id: NodeId,
    -595    ) -> Result<BoxStream<Result<DiscoveryItem, DiscoveryError>>, DiscoveryError> {
    -596        let discovery = ep.discovery().ok_or(NoServiceConfiguredSnafu.build())?;
    -597        let stream = discovery
    -598            .resolve(node_id)
    -599            .ok_or(NoResultsSnafu { node_id }.build())?;
    -600        Ok(stream)
    -601    }
    -602
    -603    /// We need discovery if we have no paths to the node, or if the paths we do have
    -604    /// have timed out.
    -605    fn needs_discovery(ep: &Endpoint, node_id: NodeId) -> bool {
    -606        match ep.remote_info(node_id) {
    -607            // No info means no path to node -> start discovery.
    -608            None => true,
    -609            Some(info) => {
    -610                match (
    -611                    info.last_received(),
    -612                    info.relay_url.as_ref().and_then(|r| r.last_alive),
    -613                ) {
    -614                    // No path to node -> start discovery.
    -615                    (None, None) => true,
    -616                    // If we haven't received on direct addresses or the relay for MAX_AGE,
    -617                    // start discovery.
    -618                    (Some(elapsed), Some(elapsed_relay)) => {
    -619                        elapsed > MAX_AGE && elapsed_relay > MAX_AGE
    -620                    }
    -621                    (Some(elapsed), _) | (_, Some(elapsed)) => elapsed > MAX_AGE,
    -622                }
    -623            }
    -624        }
    -625    }
    -626
    -627    async fn run(
    -628        ep: Endpoint,
    -629        node_id: NodeId,
    -630        on_first_tx: oneshot::Sender<Result<(), DiscoveryError>>,
    -631    ) {
    -632        let mut stream = match Self::create_stream(&ep, node_id) {
    -633            Ok(stream) => stream,
    -634            Err(err) => {
    -635                on_first_tx.send(Err(err)).ok();
    -636                return;
    -637            }
    -638        };
    -639        let mut on_first_tx = Some(on_first_tx);
    -640        debug!("starting");
    -641        loop {
    -642            match stream.next().await {
    -643                Some(Ok(r)) => {
    -644                    let provenance = r.provenance;
    -645                    let node_addr = r.to_node_addr();
    -646                    if node_addr.is_empty() {
    -647                        debug!(%provenance, "empty address found");
    -648                        continue;
    -649                    }
    -650                    debug!(%provenance, addr = ?node_addr, "new address found");
    -651                    ep.add_node_addr_with_source(node_addr, provenance).ok();
    -652                    if let Some(tx) = on_first_tx.take() {
    -653                        tx.send(Ok(())).ok();
    -654                    }
    -655                    // Send the discovery item to the subscribers of the discovery broadcast stream.
    -656                    ep.discovery_subscribers().send(r);
    -657                }
    -658                Some(Err(err)) => {
    -659                    warn!(?err, "discovery service produced error");
    -660                    break;
    -661                }
    -662                None => break,
    -663            }
    -664        }
    -665        if let Some(tx) = on_first_tx.take() {
    -666            tx.send(Err(NoResultsSnafu { node_id }.build())).ok();
    -667        }
    -668    }
    -669}
    -670
    -671/// Error returned when a discovery watch stream lagged too far behind.
    -672///
    -673/// The stream returned from [`Endpoint::discovery_stream`] yields this error
    -674/// if the loop in which the stream is processed cannot keep up with the emitted
    -675/// discovery events. Attempting to read the next item from the channel afterwards
    -676/// will return the oldest [`DiscoveryItem`] that is still retained.
    -677///
    -678/// Includes the number of skipped messages.
    -679#[derive(Debug, Snafu)]
    -680#[snafu(display("channel lagged by {val}"))]
    -681pub struct Lagged {
    -682    /// The number of skipped messages
    -683    pub val: u64,
    -684}
    -685
    -686#[derive(Clone, Debug)]
    -687pub(super) struct DiscoverySubscribers {
    -688    inner: tokio::sync::broadcast::Sender<DiscoveryItem>,
    -689}
    +592    /// Waits until the discovery task produced at least one result.
    +593    pub(super) async fn first_arrived(&mut self) -> Result<(), DiscoveryError> {
    +594        let fut = &mut self.on_first_rx;
    +595        fut.await.expect("sender dropped")?;
    +596        Ok(())
    +597    }
    +598
    +599    fn create_stream(
    +600        ep: &Endpoint,
    +601        node_id: NodeId,
    +602    ) -> Result<BoxStream<Result<DiscoveryItem, DiscoveryError>>, DiscoveryError> {
    +603        ensure!(!ep.discovery().is_empty(), NoServiceConfiguredSnafu);
    +604        let stream = ep
    +605            .discovery()
    +606            .resolve(node_id)
    +607            .ok_or(NoResultsSnafu { node_id }.build())?;
    +608        Ok(stream)
    +609    }
    +610
    +611    async fn run(
    +612        ep: Endpoint,
    +613        node_id: NodeId,
    +614        on_first_tx: oneshot::Sender<Result<(), DiscoveryError>>,
    +615    ) {
    +616        let mut stream = match Self::create_stream(&ep, node_id) {
    +617            Ok(stream) => stream,
    +618            Err(err) => {
    +619                on_first_tx.send(Err(err)).ok();
    +620                return;
    +621            }
    +622        };
    +623        let mut on_first_tx = Some(on_first_tx);
    +624        debug!("starting");
    +625        loop {
    +626            match stream.next().await {
    +627                Some(Ok(r)) => {
    +628                    let provenance = r.provenance;
    +629                    let node_addr = r.to_node_addr();
    +630                    if node_addr.is_empty() {
    +631                        debug!(%provenance, "empty address found");
    +632                        continue;
    +633                    }
    +634                    debug!(%provenance, addr = ?node_addr, "new address found");
    +635                    ep.add_node_addr_with_source(node_addr, provenance).ok();
    +636
    +637                    if let Some(tx) = on_first_tx.take() {
    +638                        tx.send(Ok(())).ok();
    +639                    }
    +640                }
    +641                Some(Err(err)) => {
    +642                    warn!(?err, "discovery service produced error");
    +643                    break;
    +644                }
    +645                None => break,
    +646            }
    +647        }
    +648        if let Some(tx) = on_first_tx.take() {
    +649            tx.send(Err(NoResultsSnafu { node_id }.build())).ok();
    +650        }
    +651    }
    +652}
    +653
    +654#[cfg(test)]
    +655mod tests {
    +656    use std::{
    +657        collections::{BTreeSet, HashMap},
    +658        net::SocketAddr,
    +659        sync::{Arc, Mutex},
    +660        time::SystemTime,
    +661    };
    +662
    +663    use iroh_base::{NodeAddr, SecretKey};
    +664    use n0_snafu::{Error, Result, ResultExt};
    +665    use quinn::{IdleTimeout, TransportConfig};
    +666    use rand::{Rng, SeedableRng};
    +667    use tokio_util::task::AbortOnDropHandle;
    +668    use tracing_test::traced_test;
    +669
    +670    use super::*;
    +671    use crate::{Endpoint, RelayMode, endpoint::ConnectOptions};
    +672
    +673    type InfoStore = HashMap<NodeId, (NodeData, u64)>;
    +674
    +675    #[derive(Debug, Clone, Default)]
    +676    struct TestDiscoveryShared {
    +677        nodes: Arc<Mutex<InfoStore>>,
    +678    }
    +679
    +680    impl TestDiscoveryShared {
    +681        pub fn create_discovery(&self, node_id: NodeId) -> TestDiscovery {
    +682            TestDiscovery {
    +683                node_id,
    +684                shared: self.clone(),
    +685                publish: true,
    +686                resolve_wrong: false,
    +687                delay: Duration::from_millis(200),
    +688            }
    +689        }
     690
    -691impl DiscoverySubscribers {
    -692    pub(crate) fn new() -> Self {
    -693        // TODO: Make capacity configurable from the endpoint builder?
    -694        // This is the maximum number of [`DiscoveryItem`]s held by the channel if
    -695        // subscribers are stalled.
    -696        const CAPACITY: usize = 128;
    -697        Self {
    -698            inner: tokio::sync::broadcast::Sender::new(CAPACITY),
    +691        pub fn create_lying_discovery(&self, node_id: NodeId) -> TestDiscovery {
    +692            TestDiscovery {
    +693                node_id,
    +694                shared: self.clone(),
    +695                publish: false,
    +696                resolve_wrong: true,
    +697                delay: Duration::from_millis(100),
    +698            }
     699        }
     700    }
     701
    -702    pub(crate) fn subscribe(&self) -> impl Stream<Item = Result<DiscoveryItem, Lagged>> {
    -703        use tokio_stream::wrappers::{errors::BroadcastStreamRecvError, BroadcastStream};
    -704        let recv = self.inner.subscribe();
    -705        BroadcastStream::new(recv).map_err(|BroadcastStreamRecvError::Lagged(n)| Lagged { val: n })
    -706    }
    -707
    -708    pub(crate) fn send(&self, item: DiscoveryItem) {
    -709        // `broadcast::Sender::send` returns an error if the channel has no subscribers,
    -710        // which we don't care about.
    -711        self.inner.send(item).ok();
    -712    }
    -713}
    -714
    -715#[cfg(test)]
    -716mod tests {
    -717    use std::{
    -718        collections::{BTreeSet, HashMap},
    -719        net::SocketAddr,
    -720        sync::{Arc, Mutex},
    -721        time::SystemTime,
    -722    };
    +702    #[derive(Debug)]
    +703    struct TestDiscovery {
    +704        node_id: NodeId,
    +705        shared: TestDiscoveryShared,
    +706        publish: bool,
    +707        resolve_wrong: bool,
    +708        delay: Duration,
    +709    }
    +710
    +711    impl Discovery for TestDiscovery {
    +712        fn publish(&self, data: &NodeData) {
    +713            if !self.publish {
    +714                return;
    +715            }
    +716            let now = system_time_now();
    +717            self.shared
    +718                .nodes
    +719                .lock()
    +720                .unwrap()
    +721                .insert(self.node_id, (data.clone(), now));
    +722        }
     723
    -724    use iroh_base::{NodeAddr, SecretKey};
    -725    use n0_snafu::{Error, Result, ResultExt};
    -726    use n0_watcher::Watcher as _;
    -727    use quinn::{IdleTimeout, TransportConfig};
    -728    use rand::Rng;
    -729    use tokio_util::task::AbortOnDropHandle;
    -730    use tracing_test::traced_test;
    -731
    -732    use super::*;
    -733    use crate::{endpoint::ConnectOptions, Endpoint, RelayMode};
    -734
    -735    type InfoStore = HashMap<NodeId, (NodeData, u64)>;
    -736
    -737    #[derive(Debug, Clone)]
    -738    struct TestDiscoveryShared {
    -739        nodes: Arc<Mutex<InfoStore>>,
    -740        watchers: tokio::sync::broadcast::Sender<DiscoveryItem>,
    -741    }
    -742
    -743    impl Default for TestDiscoveryShared {
    -744        fn default() -> Self {
    -745            Self {
    -746                nodes: Default::default(),
    -747                watchers: tokio::sync::broadcast::Sender::new(1024),
    -748            }
    -749        }
    -750    }
    -751
    -752    impl TestDiscoveryShared {
    -753        pub fn create_discovery(&self, node_id: NodeId) -> TestDiscovery {
    -754            TestDiscovery {
    -755                node_id,
    -756                shared: self.clone(),
    -757                publish: true,
    -758                resolve_wrong: false,
    -759                delay: Duration::from_millis(200),
    -760            }
    -761        }
    -762
    -763        pub fn create_lying_discovery(&self, node_id: NodeId) -> TestDiscovery {
    -764            TestDiscovery {
    -765                node_id,
    -766                shared: self.clone(),
    -767                publish: false,
    -768                resolve_wrong: true,
    -769                delay: Duration::from_millis(100),
    -770            }
    -771        }
    +724        fn resolve(
    +725            &self,
    +726            node_id: NodeId,
    +727        ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +728            let addr_info = if self.resolve_wrong {
    +729                let ts = system_time_now() - 100_000;
    +730                let port: u16 = rand::rng().random_range(10_000..20_000);
    +731                // "240.0.0.0/4" is reserved and unreachable
    +732                let addr: SocketAddr = format!("240.0.0.1:{port}").parse().unwrap();
    +733                let data = NodeData::new(None, BTreeSet::from([addr]));
    +734                Some((data, ts))
    +735            } else {
    +736                self.shared.nodes.lock().unwrap().get(&node_id).cloned()
    +737            };
    +738            let stream = match addr_info {
    +739                Some((data, ts)) => {
    +740                    let item = DiscoveryItem::new(
    +741                        NodeInfo::from_parts(node_id, data),
    +742                        "test-disco",
    +743                        Some(ts),
    +744                    );
    +745                    let delay = self.delay;
    +746                    let fut = async move {
    +747                        time::sleep(delay).await;
    +748                        tracing::debug!("resolve: {} = {item:?}", node_id.fmt_short());
    +749                        Ok(item)
    +750                    };
    +751                    n0_future::stream::once_future(fut).boxed()
    +752                }
    +753                None => n0_future::stream::empty().boxed(),
    +754            };
    +755            Some(stream)
    +756        }
    +757    }
    +758
    +759    #[derive(Debug, Clone)]
    +760    struct EmptyDiscovery;
    +761
    +762    impl Discovery for EmptyDiscovery {
    +763        fn publish(&self, _data: &NodeData) {}
    +764
    +765        fn resolve(
    +766            &self,
    +767            _node_id: NodeId,
    +768        ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +769            Some(n0_future::stream::empty().boxed())
    +770        }
    +771    }
     772
    -773        pub fn send_passive(&self, item: DiscoveryItem) {
    -774            self.watchers.send(item).ok();
    -775        }
    -776    }
    -777
    -778    #[derive(Debug)]
    -779    struct TestDiscovery {
    -780        node_id: NodeId,
    -781        shared: TestDiscoveryShared,
    -782        publish: bool,
    -783        resolve_wrong: bool,
    -784        delay: Duration,
    -785    }
    -786
    -787    impl Discovery for TestDiscovery {
    -788        fn publish(&self, data: &NodeData) {
    -789            if !self.publish {
    -790                return;
    -791            }
    -792            let now = system_time_now();
    -793            self.shared
    -794                .nodes
    -795                .lock()
    -796                .unwrap()
    -797                .insert(self.node_id, (data.clone(), now));
    -798        }
    -799
    -800        fn resolve(
    -801            &self,
    -802            node_id: NodeId,
    -803        ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -804            let addr_info = if self.resolve_wrong {
    -805                let ts = system_time_now() - 100_000;
    -806                let port: u16 = rand::thread_rng().gen_range(10_000..20_000);
    -807                // "240.0.0.0/4" is reserved and unreachable
    -808                let addr: SocketAddr = format!("240.0.0.1:{port}").parse().unwrap();
    -809                let data = NodeData::new(None, BTreeSet::from([addr]));
    -810                Some((data, ts))
    -811            } else {
    -812                self.shared.nodes.lock().unwrap().get(&node_id).cloned()
    -813            };
    -814            let stream = match addr_info {
    -815                Some((data, ts)) => {
    -816                    let item = DiscoveryItem::new(
    -817                        NodeInfo::from_parts(node_id, data),
    -818                        "test-disco",
    -819                        Some(ts),
    -820                    );
    -821                    let delay = self.delay;
    -822                    let fut = async move {
    -823                        time::sleep(delay).await;
    -824                        tracing::debug!("resolve: {} = {item:?}", node_id.fmt_short());
    -825                        Ok(item)
    -826                    };
    -827                    n0_future::stream::once_future(fut).boxed()
    -828                }
    -829                None => n0_future::stream::empty().boxed(),
    -830            };
    -831            Some(stream)
    -832        }
    -833
    -834        fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>> {
    -835            let recv = self.shared.watchers.subscribe();
    -836            let stream =
    -837                tokio_stream::wrappers::BroadcastStream::new(recv).filter_map(|item| item.ok());
    -838            Some(Box::pin(stream))
    -839        }
    -840    }
    -841
    -842    #[derive(Debug, Clone)]
    -843    struct EmptyDiscovery;
    -844
    -845    impl Discovery for EmptyDiscovery {
    -846        fn publish(&self, _data: &NodeData) {}
    -847
    -848        fn resolve(
    -849            &self,
    -850            _node_id: NodeId,
    -851        ) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -852            Some(n0_future::stream::empty().boxed())
    -853        }
    -854    }
    -855
    -856    const TEST_ALPN: &[u8] = b"n0/iroh/test";
    -857
    -858    /// This is a smoke test for our discovery mechanism.
    -859    #[tokio::test]
    -860    #[traced_test]
    -861    async fn endpoint_discovery_simple_shared() -> Result {
    -862        let disco_shared = TestDiscoveryShared::default();
    -863        let (ep1, _guard1) = {
    -864            let secret = SecretKey::generate(rand::thread_rng());
    -865            let disco = disco_shared.create_discovery(secret.public());
    -866            new_endpoint(secret, disco).await
    -867        };
    -868        let (ep2, _guard2) = {
    -869            let secret = SecretKey::generate(rand::thread_rng());
    -870            let disco = disco_shared.create_discovery(secret.public());
    -871            new_endpoint(secret, disco).await
    -872        };
    -873        let ep1_addr = NodeAddr::new(ep1.node_id());
    -874        // wait for our address to be updated and thus published at least once
    -875        ep1.node_addr().initialized().await?;
    -876        let _conn = ep2.connect(ep1_addr, TEST_ALPN).await?;
    -877        Ok(())
    -878    }
    -879
    -880    /// This test adds an empty discovery which provides no addresses.
    -881    #[tokio::test]
    -882    #[traced_test]
    -883    async fn endpoint_discovery_combined_with_empty() -> Result {
    -884        let disco_shared = TestDiscoveryShared::default();
    -885        let (ep1, _guard1) = {
    -886            let secret = SecretKey::generate(rand::thread_rng());
    -887            let disco = disco_shared.create_discovery(secret.public());
    -888            new_endpoint(secret, disco).await
    -889        };
    -890        let (ep2, _guard2) = {
    -891            let secret = SecretKey::generate(rand::thread_rng());
    -892            let disco1 = EmptyDiscovery;
    -893            let disco2 = disco_shared.create_discovery(secret.public());
    -894            let mut disco = ConcurrentDiscovery::empty();
    -895            disco.add(disco1);
    -896            disco.add(disco2);
    -897            new_endpoint(secret, disco).await
    -898        };
    -899        let ep1_addr = NodeAddr::new(ep1.node_id());
    -900        // wait for out address to be updated and thus published at least once
    -901        ep1.node_addr()
    -902            .initialized()
    -903            .await
    -904            .context("waiting for NodeAddr")?;
    -905        let _conn = ep2
    -906            .connect(ep1_addr, TEST_ALPN)
    -907            .await
    -908            .context("connecting")?;
    +773    const TEST_ALPN: &[u8] = b"n0/iroh/test";
    +774
    +775    /// This is a smoke test for our discovery mechanism.
    +776    #[tokio::test]
    +777    #[traced_test]
    +778    async fn endpoint_discovery_simple_shared() -> Result {
    +779        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +780
    +781        let disco_shared = TestDiscoveryShared::default();
    +782        let (ep1, _guard1) = {
    +783            let secret = SecretKey::generate(&mut rng);
    +784            let disco = disco_shared.create_discovery(secret.public());
    +785            new_endpoint(secret, disco).await
    +786        };
    +787        let (ep2, _guard2) = {
    +788            let secret = SecretKey::generate(&mut rng);
    +789            let disco = disco_shared.create_discovery(secret.public());
    +790            new_endpoint(secret, disco).await
    +791        };
    +792        let ep1_addr = NodeAddr::new(ep1.node_id());
    +793        let _conn = ep2.connect(ep1_addr, TEST_ALPN).await?;
    +794        Ok(())
    +795    }
    +796
    +797    /// This is a smoke test to ensure a discovery service can be
    +798    /// `Arc`-d, and discovery will still work
    +799    #[tokio::test]
    +800    #[traced_test]
    +801    async fn endpoint_discovery_simple_shared_with_arc() -> Result {
    +802        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +803        let disco_shared = TestDiscoveryShared::default();
    +804        let (ep1, _guard1) = {
    +805            let secret = SecretKey::generate(&mut rng);
    +806            let disco = disco_shared.create_discovery(secret.public());
    +807            let disco = Arc::new(disco);
    +808            new_endpoint(secret, disco).await
    +809        };
    +810        let (ep2, _guard2) = {
    +811            let secret = SecretKey::generate(&mut rng);
    +812            let disco = disco_shared.create_discovery(secret.public());
    +813            let disco = Arc::new(disco);
    +814            new_endpoint(secret, disco).await
    +815        };
    +816        let ep1_addr = NodeAddr::new(ep1.node_id());
    +817        let _conn = ep2.connect(ep1_addr, TEST_ALPN).await?;
    +818        Ok(())
    +819    }
    +820
    +821    /// This test adds an empty discovery which provides no addresses.
    +822    #[tokio::test]
    +823    #[traced_test]
    +824    async fn endpoint_discovery_combined_with_empty() -> Result {
    +825        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +826        let disco_shared = TestDiscoveryShared::default();
    +827        let (ep1, _guard1) = {
    +828            let secret = SecretKey::generate(&mut rng);
    +829            let disco = disco_shared.create_discovery(secret.public());
    +830            new_endpoint(secret, disco).await
    +831        };
    +832        let (ep2, _guard2) = {
    +833            let secret = SecretKey::generate(&mut rng);
    +834            let disco1 = EmptyDiscovery;
    +835            let disco2 = disco_shared.create_discovery(secret.public());
    +836            let disco = ConcurrentDiscovery::empty();
    +837            disco.add(disco1);
    +838            disco.add(disco2);
    +839            new_endpoint(secret, disco).await
    +840        };
    +841        let ep1_addr = NodeAddr::new(ep1.node_id());
    +842
    +843        let _conn = ep2
    +844            .connect(ep1_addr, TEST_ALPN)
    +845            .await
    +846            .context("connecting")?;
    +847        Ok(())
    +848    }
    +849
    +850    /// This test adds a "lying" discovery which provides a wrong address.
    +851    /// This is to make sure that as long as one of the discoveries returns a working address, we
    +852    /// will connect successfully.
    +853    #[tokio::test]
    +854    #[traced_test]
    +855    async fn endpoint_discovery_combined_with_empty_and_wrong() -> Result {
    +856        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +857        let disco_shared = TestDiscoveryShared::default();
    +858        let (ep1, _guard1) = {
    +859            let secret = SecretKey::generate(&mut rng);
    +860            let disco = disco_shared.create_discovery(secret.public());
    +861            new_endpoint(secret, disco).await
    +862        };
    +863        let (ep2, _guard2) = {
    +864            let secret = SecretKey::generate(&mut rng);
    +865            let disco1 = EmptyDiscovery;
    +866            let disco2 = disco_shared.create_lying_discovery(secret.public());
    +867            let disco3 = disco_shared.create_discovery(secret.public());
    +868            let disco = ConcurrentDiscovery::empty();
    +869            disco.add(disco1);
    +870            disco.add(disco2);
    +871            disco.add(disco3);
    +872            new_endpoint(secret, disco).await
    +873        };
    +874
    +875        let _conn = ep2.connect(ep1.node_id(), TEST_ALPN).await?;
    +876        Ok(())
    +877    }
    +878
    +879    /// This test only has the "lying" discovery. It is here to make sure that this actually fails.
    +880    #[tokio::test]
    +881    #[traced_test]
    +882    async fn endpoint_discovery_combined_wrong_only() -> Result {
    +883        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +884
    +885        let disco_shared = TestDiscoveryShared::default();
    +886        let (ep1, _guard1) = {
    +887            let secret = SecretKey::generate(&mut rng);
    +888            let disco = disco_shared.create_discovery(secret.public());
    +889            new_endpoint(secret, disco).await
    +890        };
    +891        let (ep2, _guard2) = {
    +892            let secret = SecretKey::generate(&mut rng);
    +893            let disco1 = disco_shared.create_lying_discovery(secret.public());
    +894            let disco = ConcurrentDiscovery::from_services(vec![Box::new(disco1)]);
    +895            new_endpoint(secret, disco).await
    +896        };
    +897
    +898        // 10x faster test via a 3s idle timeout instead of the 30s default
    +899        let mut config = TransportConfig::default();
    +900        config.keep_alive_interval(Some(Duration::from_secs(1)));
    +901        config.max_idle_timeout(Some(IdleTimeout::try_from(Duration::from_secs(3)).unwrap()));
    +902        let opts = ConnectOptions::new().with_transport_config(Arc::new(config));
    +903
    +904        let res = ep2
    +905            .connect_with_opts(ep1.node_id(), TEST_ALPN, opts)
    +906            .await? // -> Connecting works
    +907            .await; // -> Connection is expected to fail
    +908        assert!(res.is_err());
     909        Ok(())
     910    }
     911
    -912    /// This test adds a "lying" discovery which provides a wrong address.
    -913    /// This is to make sure that as long as one of the discoveries returns a working address, we
    -914    /// will connect successfully.
    -915    #[tokio::test]
    -916    #[traced_test]
    -917    async fn endpoint_discovery_combined_with_empty_and_wrong() -> Result {
    -918        let disco_shared = TestDiscoveryShared::default();
    -919        let (ep1, _guard1) = {
    -920            let secret = SecretKey::generate(rand::thread_rng());
    -921            let disco = disco_shared.create_discovery(secret.public());
    -922            new_endpoint(secret, disco).await
    -923        };
    -924        let (ep2, _guard2) = {
    -925            let secret = SecretKey::generate(rand::thread_rng());
    -926            let disco1 = EmptyDiscovery;
    -927            let disco2 = disco_shared.create_lying_discovery(secret.public());
    -928            let disco3 = disco_shared.create_discovery(secret.public());
    -929            let mut disco = ConcurrentDiscovery::empty();
    -930            disco.add(disco1);
    -931            disco.add(disco2);
    -932            disco.add(disco3);
    -933            new_endpoint(secret, disco).await
    -934        };
    -935        // wait for out address to be updated and thus published at least once
    -936        ep1.node_addr().initialized().await?;
    -937        let _conn = ep2.connect(ep1.node_id(), TEST_ALPN).await?;
    -938        Ok(())
    -939    }
    -940
    -941    /// This test only has the "lying" discovery. It is here to make sure that this actually fails.
    -942    #[tokio::test]
    -943    #[traced_test]
    -944    async fn endpoint_discovery_combined_wrong_only() -> Result {
    -945        let disco_shared = TestDiscoveryShared::default();
    -946        let (ep1, _guard1) = {
    -947            let secret = SecretKey::generate(rand::thread_rng());
    -948            let disco = disco_shared.create_discovery(secret.public());
    -949            new_endpoint(secret, disco).await
    -950        };
    -951        let (ep2, _guard2) = {
    -952            let secret = SecretKey::generate(rand::thread_rng());
    -953            let disco1 = disco_shared.create_lying_discovery(secret.public());
    -954            let disco = ConcurrentDiscovery::from_services(vec![Box::new(disco1)]);
    -955            new_endpoint(secret, disco).await
    -956        };
    -957        // wait for out address to be updated and thus published at least once
    -958        ep1.node_addr().initialized().await?;
    -959
    -960        // 10x faster test via a 3s idle timeout instead of the 30s default
    -961        let mut config = TransportConfig::default();
    -962        config.keep_alive_interval(Some(Duration::from_secs(1)));
    -963        config.max_idle_timeout(Some(IdleTimeout::try_from(Duration::from_secs(3)).unwrap()));
    -964        let opts = ConnectOptions::new().with_transport_config(Arc::new(config));
    -965
    -966        let res = ep2
    -967            .connect_with_opts(ep1.node_id(), TEST_ALPN, opts)
    -968            .await? // -> Connecting works
    -969            .await; // -> Connection is expected to fail
    -970        assert!(res.is_err());
    -971        Ok(())
    -972    }
    -973
    -974    /// This test first adds a wrong address manually (e.g. from an outdated&node_id ticket).
    -975    /// Connect should still succeed because the discovery service will be invoked (after a delay).
    -976    #[tokio::test]
    -977    #[traced_test]
    -978    async fn endpoint_discovery_with_wrong_existing_addr() -> Result {
    -979        let disco_shared = TestDiscoveryShared::default();
    -980        let (ep1, _guard1) = {
    -981            let secret = SecretKey::generate(rand::thread_rng());
    -982            let disco = disco_shared.create_discovery(secret.public());
    -983            new_endpoint(secret, disco).await
    -984        };
    -985        let (ep2, _guard2) = {
    -986            let secret = SecretKey::generate(rand::thread_rng());
    -987            let disco = disco_shared.create_discovery(secret.public());
    -988            new_endpoint(secret, disco).await
    -989        };
    -990        // wait for out address to be updated and thus published at least once
    -991        ep1.node_addr().initialized().await?;
    -992        let ep1_wrong_addr = NodeAddr {
    -993            node_id: ep1.node_id(),
    -994            relay_url: None,
    -995            direct_addresses: BTreeSet::from(["240.0.0.1:1000".parse().unwrap()]),
    -996        };
    -997        let _conn = ep2.connect(ep1_wrong_addr, TEST_ALPN).await?;
    -998        Ok(())
    -999    }
    -1000
    -1001    #[tokio::test]
    -1002    #[traced_test]
    -1003    async fn endpoint_discovery_watch() -> Result {
    -1004        let disco_shared = TestDiscoveryShared::default();
    -1005        let (ep1, _guard1) = {
    -1006            let secret = SecretKey::generate(rand::thread_rng());
    -1007            let disco = disco_shared.create_discovery(secret.public());
    -1008            new_endpoint(secret, disco).await
    -1009        };
    -1010        let (ep2, _guard2) = {
    -1011            let secret = SecretKey::generate(rand::thread_rng());
    -1012            let disco = disco_shared.create_discovery(secret.public());
    -1013            new_endpoint(secret, disco).await
    -1014        };
    +912    /// This test first adds a wrong address manually (e.g. from an outdated&node_id ticket).
    +913    /// Connect should still succeed because the discovery service will be invoked (after a delay).
    +914    #[tokio::test]
    +915    #[traced_test]
    +916    async fn endpoint_discovery_with_wrong_existing_addr() -> Result {
    +917        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +918
    +919        let disco_shared = TestDiscoveryShared::default();
    +920        let (ep1, _guard1) = {
    +921            let secret = SecretKey::generate(&mut rng);
    +922            let disco = disco_shared.create_discovery(secret.public());
    +923            new_endpoint(secret, disco).await
    +924        };
    +925        let (ep2, _guard2) = {
    +926            let secret = SecretKey::generate(&mut rng);
    +927            let disco = disco_shared.create_discovery(secret.public());
    +928            new_endpoint(secret, disco).await
    +929        };
    +930
    +931        let ep1_wrong_addr = NodeAddr {
    +932            node_id: ep1.node_id(),
    +933            relay_url: None,
    +934            direct_addresses: BTreeSet::from(["240.0.0.1:1000".parse().unwrap()]),
    +935        };
    +936        let _conn = ep2.connect(ep1_wrong_addr, TEST_ALPN).await?;
    +937        Ok(())
    +938    }
    +939
    +940    async fn new_endpoint(
    +941        secret: SecretKey,
    +942        disco: impl IntoDiscovery + 'static,
    +943    ) -> (Endpoint, AbortOnDropHandle<Result<()>>) {
    +944        let ep = Endpoint::builder()
    +945            .secret_key(secret)
    +946            .add_discovery(disco)
    +947            .relay_mode(RelayMode::Disabled)
    +948            .alpns(vec![TEST_ALPN.to_vec()])
    +949            .bind()
    +950            .await
    +951            .unwrap();
    +952
    +953        let handle = tokio::spawn({
    +954            let ep = ep.clone();
    +955            async move {
    +956                // Keep connections alive until the task is dropped.
    +957                let mut connections = Vec::new();
    +958                // we skip accept() errors, they can be caused by retransmits
    +959                while let Some(connecting) = ep.accept().await.and_then(|inc| inc.accept().ok()) {
    +960                    // Just accept incoming connections, but don't do anything with them.
    +961                    let conn = connecting.await.context("connecting")?;
    +962                    connections.push(conn);
    +963                }
    +964
    +965                Ok::<_, Error>(())
    +966            }
    +967        });
    +968
    +969        (ep, AbortOnDropHandle::new(handle))
    +970    }
    +971
    +972    fn system_time_now() -> u64 {
    +973        SystemTime::now()
    +974            .duration_since(SystemTime::UNIX_EPOCH)
    +975            .expect("time drift")
    +976            .as_micros() as u64
    +977    }
    +978}
    +979
    +980/// This module contains end-to-end tests for DNS node discovery.
    +981///
    +982/// The tests run a minimal test DNS server to resolve against, and a minimal pkarr relay to
    +983/// publish to. The DNS and pkarr servers share their state.
    +984#[cfg(test)]
    +985mod test_dns_pkarr {
    +986    use iroh_base::{NodeAddr, SecretKey};
    +987    use iroh_relay::{RelayMap, node_info::UserData};
    +988    use n0_future::time::Duration;
    +989    use n0_snafu::{Error, Result, ResultExt};
    +990    use rand::{CryptoRng, SeedableRng};
    +991    use tokio_util::task::AbortOnDropHandle;
    +992    use tracing_test::traced_test;
    +993
    +994    use crate::{
    +995        Endpoint, RelayMode,
    +996        discovery::{NodeData, pkarr::PkarrPublisher},
    +997        dns::DnsResolver,
    +998        node_info::NodeInfo,
    +999        test_utils::{
    +1000            DnsPkarrServer, dns_server::run_dns_server, pkarr_dns_state::State, run_relay_server,
    +1001        },
    +1002    };
    +1003
    +1004    const PUBLISH_TIMEOUT: Duration = Duration::from_secs(10);
    +1005
    +1006    #[tokio::test]
    +1007    #[traced_test]
    +1008    async fn dns_resolve() -> Result<()> {
    +1009        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1010        let origin = "testdns.example".to_string();
    +1011        let state = State::new(origin.clone());
    +1012        let (nameserver, _dns_drop_guard) = run_dns_server(state.clone())
    +1013            .await
    +1014            .context("Running DNS server")?;
     1015
    -1016        let mut stream = ep1.discovery_stream();
    -1017
    -1018        // wait for ep2 node addr to be updated and connect from ep1 -> discovery via resolve
    -1019        ep2.node_addr().initialized().await?;
    -1020        let _ = ep1.connect(ep2.node_id(), TEST_ALPN).await?;
    -1021
    -1022        let item = tokio::time::timeout(Duration::from_secs(1), stream.next())
    -1023            .await
    -1024            .expect("timeout")
    -1025            .expect("stream closed")
    -1026            .expect("stream lagged");
    -1027        assert_eq!(item.node_id(), ep2.node_id());
    -1028        assert_eq!(item.provenance(), "test-disco");
    -1029
    -1030        // inject item into discovery passively
    -1031        let passive_node_id = SecretKey::generate(rand::thread_rng()).public();
    -1032        let node_info = NodeInfo::new(passive_node_id);
    -1033        let passive_item = DiscoveryItem::new(node_info, "test-disco-passive", None);
    -1034        disco_shared.send_passive(passive_item.clone());
    -1035
    -1036        let item = tokio::time::timeout(Duration::from_secs(1), stream.next())
    -1037            .await
    -1038            .expect("timeout")
    -1039            .expect("stream closed")
    -1040            .expect("stream lagged");
    -1041        assert_eq!(item.node_id(), passive_node_id);
    -1042        assert_eq!(item.provenance(), "test-disco-passive");
    +1016        let secret_key = SecretKey::generate(&mut rng);
    +1017        let node_info = NodeInfo::new(secret_key.public())
    +1018            .with_relay_url(Some("https://relay.example".parse().unwrap()));
    +1019        let signed_packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    +1020        state
    +1021            .upsert(signed_packet)
    +1022            .context("update and insert signed packet")?;
    +1023
    +1024        let resolver = DnsResolver::with_nameserver(nameserver);
    +1025        let resolved = resolver
    +1026            .lookup_node_by_id(&node_info.node_id, &origin)
    +1027            .await?;
    +1028
    +1029        assert_eq!(resolved, node_info);
    +1030
    +1031        Ok(())
    +1032    }
    +1033
    +1034    #[tokio::test]
    +1035    #[traced_test]
    +1036    async fn pkarr_publish_dns_resolve() -> Result<()> {
    +1037        let origin = "testdns.example".to_string();
    +1038        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1039
    +1040        let dns_pkarr_server = DnsPkarrServer::run_with_origin(origin.clone())
    +1041            .await
    +1042            .context("DnsPkarrServer")?;
     1043
    -1044        Ok(())
    -1045    }
    +1044        let secret_key = SecretKey::generate(&mut rng);
    +1045        let node_id = secret_key.public();
     1046
    -1047    async fn new_endpoint(
    -1048        secret: SecretKey,
    -1049        disco: impl IntoDiscovery + 'static,
    -1050    ) -> (Endpoint, AbortOnDropHandle<Result<()>>) {
    -1051        let ep = Endpoint::builder()
    -1052            .secret_key(secret)
    -1053            .discovery(disco)
    -1054            .relay_mode(RelayMode::Disabled)
    -1055            .alpns(vec![TEST_ALPN.to_vec()])
    -1056            .bind()
    -1057            .await
    -1058            .unwrap();
    -1059
    -1060        let handle = tokio::spawn({
    -1061            let ep = ep.clone();
    -1062            async move {
    -1063                // Keep connections alive until the task is dropped.
    -1064                let mut connections = Vec::new();
    -1065                // we skip accept() errors, they can be caused by retransmits
    -1066                while let Some(connecting) = ep.accept().await.and_then(|inc| inc.accept().ok()) {
    -1067                    // Just accept incoming connections, but don't do anything with them.
    -1068                    let conn = connecting.await.context("connecting")?;
    -1069                    connections.push(conn);
    -1070                }
    -1071
    -1072                Ok::<_, Error>(())
    -1073            }
    -1074        });
    +1047        let relay_url = Some("https://relay.example".parse().unwrap());
    +1048
    +1049        let resolver = DnsResolver::with_nameserver(dns_pkarr_server.nameserver);
    +1050        let publisher =
    +1051            PkarrPublisher::builder(dns_pkarr_server.pkarr_url.clone()).build(secret_key);
    +1052        let user_data: UserData = "foobar".parse().unwrap();
    +1053        let data = NodeData::new(relay_url.clone(), Default::default())
    +1054            .with_user_data(Some(user_data.clone()));
    +1055        // does not block, update happens in background task
    +1056        publisher.update_node_data(&data);
    +1057        // wait until our shared state received the update from pkarr publishing
    +1058        dns_pkarr_server
    +1059            .on_node(&node_id, PUBLISH_TIMEOUT)
    +1060            .await
    +1061            .context("wait for on node update")?;
    +1062        let resolved = resolver.lookup_node_by_id(&node_id, &origin).await?;
    +1063        println!("resolved {resolved:?}");
    +1064
    +1065        let expected_addr = NodeAddr {
    +1066            node_id,
    +1067            relay_url,
    +1068            direct_addresses: Default::default(),
    +1069        };
    +1070
    +1071        assert_eq!(resolved.to_node_addr(), expected_addr);
    +1072        assert_eq!(resolved.user_data(), Some(&user_data));
    +1073        Ok(())
    +1074    }
     1075
    -1076        (ep, AbortOnDropHandle::new(handle))
    -1077    }
    -1078
    -1079    fn system_time_now() -> u64 {
    -1080        SystemTime::now()
    -1081            .duration_since(SystemTime::UNIX_EPOCH)
    -1082            .expect("time drift")
    -1083            .as_micros() as u64
    -1084    }
    -1085}
    -1086
    -1087/// This module contains end-to-end tests for DNS node discovery.
    -1088///
    -1089/// The tests run a minimal test DNS server to resolve against, and a minimal pkarr relay to
    -1090/// publish to. The DNS and pkarr servers share their state.
    -1091#[cfg(test)]
    -1092mod test_dns_pkarr {
    -1093    use iroh_base::{NodeAddr, SecretKey};
    -1094    use iroh_relay::{node_info::UserData, RelayMap};
    -1095    use n0_future::time::Duration;
    -1096    use n0_snafu::{Error, Result, ResultExt};
    -1097    use tokio_util::task::AbortOnDropHandle;
    -1098    use tracing_test::traced_test;
    +1076    const TEST_ALPN: &[u8] = b"TEST";
    +1077
    +1078    #[tokio::test]
    +1079    #[traced_test]
    +1080    async fn pkarr_publish_dns_discover() -> Result<()> {
    +1081        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1082
    +1083        let dns_pkarr_server = DnsPkarrServer::run().await.context("DnsPkarrServer run")?;
    +1084        let (relay_map, _relay_url, _relay_guard) = run_relay_server().await?;
    +1085
    +1086        let (ep1, _guard1) = ep_with_discovery(&mut rng, &relay_map, &dns_pkarr_server).await?;
    +1087        let (ep2, _guard2) = ep_with_discovery(&mut rng, &relay_map, &dns_pkarr_server).await?;
    +1088
    +1089        // wait until our shared state received the update from pkarr publishing
    +1090        dns_pkarr_server
    +1091            .on_node(&ep1.node_id(), PUBLISH_TIMEOUT)
    +1092            .await
    +1093            .context("wait for on node update")?;
    +1094
    +1095        // we connect only by node id!
    +1096        let _conn = ep2.connect(ep1.node_id(), TEST_ALPN).await?;
    +1097        Ok(())
    +1098    }
     1099
    -1100    use crate::{
    -1101        discovery::{pkarr::PkarrPublisher, NodeData},
    -1102        dns::DnsResolver,
    -1103        node_info::NodeInfo,
    -1104        test_utils::{
    -1105            dns_server::run_dns_server, pkarr_dns_state::State, run_relay_server, DnsPkarrServer,
    -1106        },
    -1107        Endpoint, RelayMode,
    -1108    };
    -1109
    -1110    const PUBLISH_TIMEOUT: Duration = Duration::from_secs(10);
    -1111
    -1112    #[tokio::test]
    -1113    #[traced_test]
    -1114    async fn dns_resolve() -> Result<()> {
    -1115        let origin = "testdns.example".to_string();
    -1116        let state = State::new(origin.clone());
    -1117        let (nameserver, _dns_drop_guard) = run_dns_server(state.clone())
    -1118            .await
    -1119            .context("Running DNS server")?;
    -1120
    -1121        let secret_key = SecretKey::generate(rand::thread_rng());
    -1122        let node_info = NodeInfo::new(secret_key.public())
    -1123            .with_relay_url(Some("https://relay.example".parse().unwrap()));
    -1124        let signed_packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    -1125        state
    -1126            .upsert(signed_packet)
    -1127            .context("update and insert signed packet")?;
    +1100    async fn ep_with_discovery<R: CryptoRng + ?Sized>(
    +1101        rng: &mut R,
    +1102        relay_map: &RelayMap,
    +1103        dns_pkarr_server: &DnsPkarrServer,
    +1104    ) -> Result<(Endpoint, AbortOnDropHandle<Result<()>>)> {
    +1105        let secret_key = SecretKey::generate(rng);
    +1106        let ep = Endpoint::builder()
    +1107            .relay_mode(RelayMode::Custom(relay_map.clone()))
    +1108            .insecure_skip_relay_cert_verify(true)
    +1109            .secret_key(secret_key.clone())
    +1110            .alpns(vec![TEST_ALPN.to_vec()])
    +1111            .dns_resolver(dns_pkarr_server.dns_resolver())
    +1112            .discovery(dns_pkarr_server.discovery(secret_key))
    +1113            .bind()
    +1114            .await?;
    +1115
    +1116        let handle = tokio::spawn({
    +1117            let ep = ep.clone();
    +1118            async move {
    +1119                // we skip accept() errors, they can be caused by retransmits
    +1120                while let Some(connecting) = ep.accept().await.and_then(|inc| inc.accept().ok()) {
    +1121                    let _conn = connecting.await.context("connecting")?;
    +1122                    // Just accept incoming connections, but don't do anything with them.
    +1123                }
    +1124
    +1125                Ok::<_, Error>(())
    +1126            }
    +1127        });
     1128
    -1129        let resolver = DnsResolver::with_nameserver(nameserver);
    -1130        let resolved = resolver
    -1131            .lookup_node_by_id(&node_info.node_id, &origin)
    -1132            .await?;
    -1133
    -1134        assert_eq!(resolved, node_info);
    -1135
    -1136        Ok(())
    -1137    }
    -1138
    -1139    #[tokio::test]
    -1140    #[traced_test]
    -1141    async fn pkarr_publish_dns_resolve() -> Result<()> {
    -1142        let origin = "testdns.example".to_string();
    -1143
    -1144        let dns_pkarr_server = DnsPkarrServer::run_with_origin(origin.clone())
    -1145            .await
    -1146            .context("DnsPkarrServer")?;
    -1147
    -1148        let secret_key = SecretKey::generate(rand::thread_rng());
    -1149        let node_id = secret_key.public();
    -1150
    -1151        let relay_url = Some("https://relay.example".parse().unwrap());
    -1152
    -1153        let resolver = DnsResolver::with_nameserver(dns_pkarr_server.nameserver);
    -1154        let publisher =
    -1155            PkarrPublisher::builder(dns_pkarr_server.pkarr_url.clone()).build(secret_key);
    -1156        let user_data: UserData = "foobar".parse().unwrap();
    -1157        let data = NodeData::new(relay_url.clone(), Default::default())
    -1158            .with_user_data(Some(user_data.clone()));
    -1159        // does not block, update happens in background task
    -1160        publisher.update_node_data(&data);
    -1161        // wait until our shared state received the update from pkarr publishing
    -1162        dns_pkarr_server
    -1163            .on_node(&node_id, PUBLISH_TIMEOUT)
    -1164            .await
    -1165            .context("wait for on node update")?;
    -1166        let resolved = resolver.lookup_node_by_id(&node_id, &origin).await?;
    -1167        println!("resolved {resolved:?}");
    -1168
    -1169        let expected_addr = NodeAddr {
    -1170            node_id,
    -1171            relay_url,
    -1172            direct_addresses: Default::default(),
    -1173        };
    -1174
    -1175        assert_eq!(resolved.to_node_addr(), expected_addr);
    -1176        assert_eq!(resolved.user_data(), Some(&user_data));
    -1177        Ok(())
    -1178    }
    -1179
    -1180    const TEST_ALPN: &[u8] = b"TEST";
    -1181
    -1182    #[tokio::test]
    -1183    #[traced_test]
    -1184    async fn pkarr_publish_dns_discover() -> Result<()> {
    -1185        let dns_pkarr_server = DnsPkarrServer::run().await.context("DnsPkarrServer run")?;
    -1186        let (relay_map, _relay_url, _relay_guard) = run_relay_server().await?;
    -1187
    -1188        let (ep1, _guard1) = ep_with_discovery(&relay_map, &dns_pkarr_server).await?;
    -1189        let (ep2, _guard2) = ep_with_discovery(&relay_map, &dns_pkarr_server).await?;
    -1190
    -1191        // wait until our shared state received the update from pkarr publishing
    -1192        dns_pkarr_server
    -1193            .on_node(&ep1.node_id(), PUBLISH_TIMEOUT)
    -1194            .await
    -1195            .context("wait for on node update")?;
    -1196
    -1197        // we connect only by node id!
    -1198        let _conn = ep2.connect(ep1.node_id(), TEST_ALPN).await?;
    -1199        Ok(())
    -1200    }
    -1201
    -1202    async fn ep_with_discovery(
    -1203        relay_map: &RelayMap,
    -1204        dns_pkarr_server: &DnsPkarrServer,
    -1205    ) -> Result<(Endpoint, AbortOnDropHandle<Result<()>>)> {
    -1206        let secret_key = SecretKey::generate(rand::thread_rng());
    -1207        let ep = Endpoint::builder()
    -1208            .relay_mode(RelayMode::Custom(relay_map.clone()))
    -1209            .insecure_skip_relay_cert_verify(true)
    -1210            .secret_key(secret_key.clone())
    -1211            .alpns(vec![TEST_ALPN.to_vec()])
    -1212            .dns_resolver(dns_pkarr_server.dns_resolver())
    -1213            .discovery(dns_pkarr_server.discovery(secret_key))
    -1214            .bind()
    -1215            .await?;
    -1216
    -1217        let handle = tokio::spawn({
    -1218            let ep = ep.clone();
    -1219            async move {
    -1220                // we skip accept() errors, they can be caused by retransmits
    -1221                while let Some(connecting) = ep.accept().await.and_then(|inc| inc.accept().ok()) {
    -1222                    let _conn = connecting.await.context("connecting")?;
    -1223                    // Just accept incoming connections, but don't do anything with them.
    -1224                }
    -1225
    -1226                Ok::<_, Error>(())
    -1227            }
    -1228        });
    -1229
    -1230        Ok((ep, AbortOnDropHandle::new(handle)))
    -1231    }
    -1232}
    \ No newline at end of file +1129 Ok((ep, AbortOnDropHandle::new(handle))) +1130 } +1131}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/discovery/dns.rs.html b/pr/3367/docs/src/iroh/discovery/dns.rs.html index 4d041ec089..e457090479 100644 --- a/pr/3367/docs/src/iroh/discovery/dns.rs.html +++ b/pr/3367/docs/src/iroh/discovery/dns.rs.html @@ -1,4 +1,4 @@ -dns.rs - source

    iroh/discovery/
    dns.rs

    1//! DNS node discovery for iroh
    +dns.rs - source

    iroh/discovery/
    dns.rs

    1//! DNS node discovery for iroh
     2
     3use iroh_base::NodeId;
     4use iroh_relay::dns::DnsResolver;
    @@ -32,7 +32,7 @@
     32/// The DNS resolver defaults to using the nameservers configured on the host system, but can be changed
     33/// with [`crate::endpoint::Builder::dns_resolver`].
     34///
    -35/// [z-base-32]: https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
    +35/// [`z-base-32`]: https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
     36/// [`Endpoint`]: crate::Endpoint
     37#[derive(Debug)]
     38pub struct DnsDiscovery {
    diff --git a/pr/3367/docs/src/iroh/discovery/mdns.rs.html b/pr/3367/docs/src/iroh/discovery/mdns.rs.html
    index 8a3098d061..3b45b0e834 100644
    --- a/pr/3367/docs/src/iroh/discovery/mdns.rs.html
    +++ b/pr/3367/docs/src/iroh/discovery/mdns.rs.html
    @@ -1,521 +1,803 @@
    -mdns.rs - source

    iroh/discovery/
    mdns.rs

    1//! A discovery service that uses an mdns-like service to discover local nodes.
    +mdns.rs - source

    iroh/discovery/
    mdns.rs

    1//! A discovery service that uses an mdns-like service to discover local nodes.
     2//!
     3//! This allows you to use an mdns-like swarm discovery service to find address information about nodes that are on your local network, no relay or outside internet needed.
     4//! See the [`swarm-discovery`](https://crates.io/crates/swarm-discovery) crate for more details.
     5//!
     6//! When [`MdnsDiscovery`] is enabled, it's possible to get a list of the locally discovered nodes by filtering a list of `RemoteInfo`s.
     7//!
    -8//! ```
    +8//! ```no_run
     9//! use std::time::Duration;
     10//!
    -11//! use iroh::endpoint::{Endpoint, Source};
    -12//!
    -13//! #[tokio::main]
    -14//! async fn main() {
    -15//!     let recent = Duration::from_secs(600); // 10 minutes in seconds
    -16//!
    -17//!     let endpoint = Endpoint::builder().bind().await.unwrap();
    -18//!     let remotes = endpoint.remote_info_iter();
    -19//!     let locally_discovered: Vec<_> = remotes
    -20//!         .filter(|remote| {
    -21//!             remote.sources().iter().any(|(source, duration)| {
    -22//!                 if let Source::Discovery { name } = source {
    -23//!                     name == iroh::discovery::mdns::NAME && *duration <= recent
    -24//!                 } else {
    -25//!                     false
    -26//!                 }
    -27//!             })
    -28//!         })
    -29//!         .collect();
    -30//!     println!("locally discovered nodes: {locally_discovered:?}");
    -31//! }
    -32//! ```
    -33use std::{
    -34    collections::{BTreeSet, HashMap},
    -35    net::{IpAddr, SocketAddr},
    -36};
    -37
    -38use derive_more::FromStr;
    -39use iroh_base::{NodeId, PublicKey};
    -40use n0_future::{
    -41    boxed::BoxStream,
    -42    task::{self, AbortOnDropHandle, JoinSet},
    -43    time::{self, Duration},
    -44};
    -45use n0_watcher::{Watchable, Watcher as _};
    -46use swarm_discovery::{Discoverer, DropGuard, IpClass, Peer};
    -47use tokio::sync::mpsc::{self, error::TrySendError};
    -48use tracing::{debug, error, info_span, trace, warn, Instrument};
    -49
    -50use super::{DiscoveryContext, DiscoveryError, IntoDiscovery, IntoDiscoveryError};
    -51use crate::discovery::{Discovery, DiscoveryItem, NodeData, NodeInfo};
    -52
    -53/// The n0 local swarm node discovery name
    -54const N0_LOCAL_SWARM: &str = "iroh.local.swarm";
    -55
    -56/// Name of this discovery service.
    -57///
    -58/// Used as the `provenance` field in [`DiscoveryItem`]s.
    -59///
    -60/// Used in the [`crate::endpoint::Source::Discovery`] enum variant as the `name`.
    -61pub const NAME: &str = "local.swarm.discovery";
    +11//! use iroh::{
    +12//!     SecretKey,
    +13//!     discovery::mdns::{DiscoveryEvent, MdnsDiscovery},
    +14//!     endpoint::{Endpoint, Source},
    +15//! };
    +16//! use n0_future::StreamExt;
    +17//!
    +18//! #[tokio::main]
    +19//! async fn main() {
    +20//!     let recent = Duration::from_secs(600); // 10 minutes in seconds
    +21//!     let endpoint = Endpoint::builder().bind().await.unwrap();
    +22//!
    +23//!     // Register the discovery services with the endpoint
    +24//!     let mdns = MdnsDiscovery::builder().build(endpoint.node_id()).unwrap();
    +25//!     endpoint.discovery().add(mdns.clone());
    +26//!
    +27//!     // Subscribe to the discovery events
    +28//!     let mut events = mdns.subscribe().await;
    +29//!     while let Some(event) = events.next().await {
    +30//!         match event {
    +31//!             DiscoveryEvent::Discovered { node_info, .. } => {
    +32//!                 println!("MDNS discovered: {:?}", node_info);
    +33//!             }
    +34//!             DiscoveryEvent::Expired { node_id } => {
    +35//!                 println!("MDNS expired: {node_id}");
    +36//!             }
    +37//!         }
    +38//!     }
    +39//! }
    +40//! ```
    +41use std::{
    +42    collections::{BTreeSet, HashMap},
    +43    net::{IpAddr, SocketAddr},
    +44    str::FromStr,
    +45    sync::Arc,
    +46};
    +47
    +48use iroh_base::{NodeId, PublicKey};
    +49use n0_future::{
    +50    Stream,
    +51    boxed::BoxStream,
    +52    task::{self, AbortOnDropHandle, JoinSet},
    +53    time::{self, Duration},
    +54};
    +55use n0_watcher::{Watchable, Watcher as _};
    +56use swarm_discovery::{Discoverer, DropGuard, IpClass, Peer};
    +57use tokio::sync::mpsc::{self, error::TrySendError};
    +58use tracing::{Instrument, debug, error, info_span, trace, warn};
    +59
    +60use super::{DiscoveryContext, DiscoveryError, IntoDiscovery, IntoDiscoveryError};
    +61use crate::discovery::{Discovery, DiscoveryItem, NodeData, NodeInfo};
     62
    -63/// The key of the attribute under which the `UserData` is stored in
    -64/// the TXT record supported by swarm-discovery.
    -65const USER_DATA_ATTRIBUTE: &str = "user-data";
    -66
    -67/// How long we will wait before we stop sending discovery items
    -68const DISCOVERY_DURATION: Duration = Duration::from_secs(10);
    -69
    -70/// Discovery using `swarm-discovery`, a variation on mdns
    -71#[derive(Debug)]
    -72pub struct MdnsDiscovery {
    -73    #[allow(dead_code)]
    -74    handle: AbortOnDropHandle<()>,
    -75    sender: mpsc::Sender<Message>,
    -76    /// When `local_addrs` changes, we re-publish our info.
    -77    local_addrs: Watchable<Option<NodeData>>,
    -78}
    +63/// The n0 local service name
    +64const N0_SERVICE_NAME: &str = "irohv1";
    +65
    +66/// Name of this discovery service.
    +67///
    +68/// Used as the `provenance` field in [`DiscoveryItem`]s.
    +69///
    +70/// Used in the [`crate::endpoint::Source::Discovery`] enum variant as the `name`.
    +71pub const NAME: &str = "mdns";
    +72
    +73/// The key of the attribute under which the `UserData` is stored in
    +74/// the TXT record supported by swarm-discovery.
    +75const USER_DATA_ATTRIBUTE: &str = "user-data";
    +76
    +77/// How long we will wait before we stop sending discovery items
    +78const DISCOVERY_DURATION: Duration = Duration::from_secs(10);
     79
    -80#[derive(Debug)]
    -81enum Message {
    -82    Discovery(String, Peer),
    -83    Resolve(NodeId, mpsc::Sender<Result<DiscoveryItem, DiscoveryError>>),
    -84    Timeout(NodeId, usize),
    -85    Subscribe(mpsc::Sender<DiscoveryItem>),
    -86}
    -87
    -88/// Manages the list of subscribers that are subscribed to this discovery service.
    -89#[derive(Debug)]
    -90struct Subscribers(Vec<mpsc::Sender<DiscoveryItem>>);
    -91
    -92impl Subscribers {
    -93    fn new() -> Self {
    -94        Self(vec![])
    -95    }
    -96
    -97    /// Add the subscriber to the list of subscribers
    -98    fn push(&mut self, subscriber: mpsc::Sender<DiscoveryItem>) {
    -99        self.0.push(subscriber);
    -100    }
    -101
    -102    /// Sends the `node_id` and `item` to each subscriber.
    -103    ///
    -104    /// Cleans up any subscribers that have been dropped.
    -105    fn send(&mut self, item: DiscoveryItem) {
    -106        let mut clean_up = vec![];
    -107        for (i, subscriber) in self.0.iter().enumerate() {
    -108            // assume subscriber was dropped
    -109            if let Err(err) = subscriber.try_send(item.clone()) {
    -110                match err {
    -111                    TrySendError::Full(_) => {
    -112                        warn!(
    -113                            ?item,
    -114                            idx = i,
    -115                            "local swarm discovery subscriber is blocked, dropping item"
    -116                        )
    -117                    }
    -118                    TrySendError::Closed(_) => clean_up.push(i),
    -119                }
    -120            }
    -121        }
    -122        for i in clean_up.into_iter().rev() {
    -123            self.0.swap_remove(i);
    -124        }
    -125    }
    -126}
    -127
    -128/// Builder for [`MdnsDiscovery`].
    -129#[derive(Debug)]
    -130pub struct MdnsDiscoveryBuilder;
    -131
    -132impl IntoDiscovery for MdnsDiscoveryBuilder {
    -133    fn into_discovery(
    -134        self,
    -135        context: &DiscoveryContext,
    -136    ) -> Result<impl Discovery, IntoDiscoveryError> {
    -137        MdnsDiscovery::new(context.node_id())
    -138    }
    -139}
    -140
    -141impl MdnsDiscovery {
    -142    /// Returns a [`MdnsDiscoveryBuilder`] that implements [`IntoDiscovery`].
    -143    pub fn builder() -> MdnsDiscoveryBuilder {
    -144        MdnsDiscoveryBuilder
    -145    }
    -146
    -147    /// Create a new [`MdnsDiscovery`] Service.
    -148    ///
    -149    /// This starts a [`Discoverer`] that broadcasts your addresses and receives addresses from other nodes in your local network.
    -150    ///
    -151    /// # Errors
    -152    /// Returns an error if the network does not allow ipv4 OR ipv6.
    -153    ///
    -154    /// # Panics
    -155    /// This relies on [`tokio::runtime::Handle::current`] and will panic if called outside of the context of a tokio runtime.
    -156    pub fn new(node_id: NodeId) -> Result<Self, IntoDiscoveryError> {
    -157        debug!("Creating new MdnsDiscovery service");
    -158        let (send, mut recv) = mpsc::channel(64);
    -159        let task_sender = send.clone();
    -160        let rt = tokio::runtime::Handle::current();
    -161        let discovery =
    -162            MdnsDiscovery::spawn_discoverer(node_id, task_sender.clone(), BTreeSet::new(), &rt)?;
    -163
    -164        let local_addrs: Watchable<Option<NodeData>> = Watchable::default();
    -165        let mut addrs_change = local_addrs.watch();
    -166        let discovery_fut = async move {
    -167            let mut node_addrs: HashMap<PublicKey, Peer> = HashMap::default();
    -168            let mut subscribers = Subscribers::new();
    -169            let mut last_id = 0;
    -170            let mut senders: HashMap<
    -171                PublicKey,
    -172                HashMap<usize, mpsc::Sender<Result<DiscoveryItem, DiscoveryError>>>,
    -173            > = HashMap::default();
    -174            let mut timeouts = JoinSet::new();
    -175            loop {
    -176                trace!(?node_addrs, "MdnsDiscovery Service loop tick");
    -177                let msg = tokio::select! {
    -178                    msg = recv.recv() => {
    -179                        msg
    -180                    }
    -181                    Ok(Some(data)) = addrs_change.updated() => {
    -182                        tracing::trace!(?data, "MdnsDiscovery address changed");
    -183                        discovery.remove_all();
    -184                        let addrs =
    -185                            MdnsDiscovery::socketaddrs_to_addrs(data.direct_addresses());
    -186                        for addr in addrs {
    -187                            discovery.add(addr.0, addr.1)
    -188                        }
    -189                        if let Some(user_data) = data.user_data() {
    -190                            if let Err(err) = discovery.set_txt_attribute(USER_DATA_ATTRIBUTE.to_string(), Some(user_data.to_string())) {
    -191                                warn!("Failed to set the user-defined data in local swarm discovery: {err:?}");
    -192                            }
    -193                        }
    -194                        continue;
    -195                    }
    -196                };
    -197                let msg = match msg {
    -198                    None => {
    -199                        error!("MdnsDiscovery channel closed");
    -200                        error!("closing MdnsDiscovery");
    -201                        timeouts.abort_all();
    -202                        return;
    -203                    }
    -204                    Some(msg) => msg,
    -205                };
    -206                match msg {
    -207                    Message::Discovery(discovered_node_id, peer_info) => {
    -208                        trace!(
    -209                            ?discovered_node_id,
    -210                            ?peer_info,
    -211                            "MdnsDiscovery Message::Discovery"
    -212                        );
    -213                        let discovered_node_id = match PublicKey::from_str(&discovered_node_id) {
    -214                            Ok(node_id) => node_id,
    -215                            Err(e) => {
    -216                                warn!(
    -217                                    discovered_node_id,
    -218                                    "couldn't parse node_id from mdns discovery service: {e:?}"
    -219                                );
    -220                                continue;
    -221                            }
    -222                        };
    -223
    -224                        if discovered_node_id == node_id {
    -225                            continue;
    -226                        }
    -227
    -228                        if peer_info.is_expiry() {
    -229                            trace!(
    -230                                ?discovered_node_id,
    -231                                "removing node from MdnsDiscovery address book"
    -232                            );
    -233                            node_addrs.remove(&discovered_node_id);
    -234                            continue;
    -235                        }
    -236
    -237                        let entry = node_addrs.entry(discovered_node_id);
    -238                        if let std::collections::hash_map::Entry::Occupied(ref entry) = entry {
    -239                            if entry.get() == &peer_info {
    -240                                // this is a republish we already know about
    -241                                continue;
    -242                            }
    -243                        }
    -244
    -245                        debug!(
    -246                            ?discovered_node_id,
    -247                            ?peer_info,
    -248                            "adding node to MdnsDiscovery address book"
    -249                        );
    -250
    -251                        let mut resolved = false;
    -252                        let item = peer_to_discovery_item(&peer_info, &discovered_node_id);
    -253                        if let Some(senders) = senders.get(&discovered_node_id) {
    -254                            trace!(?item, senders = senders.len(), "sending DiscoveryItem");
    -255                            resolved = true;
    -256                            for sender in senders.values() {
    -257                                sender.send(Ok(item.clone())).await.ok();
    -258                            }
    -259                        }
    -260                        entry.or_insert(peer_info);
    -261
    -262                        // only send nodes to the `subscriber` if they weren't explicitly resolved
    -263                        // in other words, nodes sent to the `subscribers` should only be the ones that
    -264                        // have been "passively" discovered
    -265                        if !resolved {
    -266                            subscribers.send(item);
    -267                        }
    -268                    }
    -269                    Message::Resolve(node_id, sender) => {
    -270                        let id = last_id + 1;
    -271                        last_id = id;
    -272                        trace!(?node_id, "MdnsDiscovery Message::SendAddrs");
    -273                        if let Some(peer_info) = node_addrs.get(&node_id) {
    -274                            let item = peer_to_discovery_item(peer_info, &node_id);
    -275                            debug!(?item, "sending DiscoveryItem");
    -276                            sender.send(Ok(item)).await.ok();
    -277                        }
    -278                        if let Some(senders_for_node_id) = senders.get_mut(&node_id) {
    -279                            senders_for_node_id.insert(id, sender);
    -280                        } else {
    -281                            let mut senders_for_node_id = HashMap::new();
    -282                            senders_for_node_id.insert(id, sender);
    -283                            senders.insert(node_id, senders_for_node_id);
    +80/// Discovery using `swarm-discovery`, a variation on mdns
    +81#[derive(Debug, Clone)]
    +82pub struct MdnsDiscovery {
    +83    #[allow(dead_code)]
    +84    handle: Arc<AbortOnDropHandle<()>>,
    +85    sender: mpsc::Sender<Message>,
    +86    advertise: bool,
    +87    /// When `local_addrs` changes, we re-publish our info.
    +88    local_addrs: Watchable<Option<NodeData>>,
    +89}
    +90
    +91#[derive(Debug)]
    +92enum Message {
    +93    Discovery(String, Peer),
    +94    Resolve(NodeId, mpsc::Sender<Result<DiscoveryItem, DiscoveryError>>),
    +95    Timeout(NodeId, usize),
    +96    Subscribe(mpsc::Sender<DiscoveryEvent>),
    +97}
    +98
    +99/// Manages the list of subscribers that are subscribed to this discovery service.
    +100#[derive(Debug)]
    +101struct Subscribers(Vec<mpsc::Sender<DiscoveryEvent>>);
    +102
    +103impl Subscribers {
    +104    fn new() -> Self {
    +105        Self(vec![])
    +106    }
    +107
    +108    /// Add the subscriber to the list of subscribers
    +109    fn push(&mut self, subscriber: mpsc::Sender<DiscoveryEvent>) {
    +110        self.0.push(subscriber);
    +111    }
    +112
    +113    /// Sends the `node_id` and `item` to each subscriber.
    +114    ///
    +115    /// Cleans up any subscribers that have been dropped.
    +116    fn send(&mut self, item: DiscoveryEvent) {
    +117        let mut clean_up = vec![];
    +118        for (i, subscriber) in self.0.iter().enumerate() {
    +119            // assume subscriber was dropped
    +120            if let Err(err) = subscriber.try_send(item.clone()) {
    +121                match err {
    +122                    TrySendError::Full(_) => {
    +123                        warn!(
    +124                            ?item,
    +125                            idx = i,
    +126                            "local swarm discovery subscriber is blocked, dropping item"
    +127                        )
    +128                    }
    +129                    TrySendError::Closed(_) => clean_up.push(i),
    +130                }
    +131            }
    +132        }
    +133        for i in clean_up.into_iter().rev() {
    +134            self.0.swap_remove(i);
    +135        }
    +136    }
    +137}
    +138
    +139/// Builder for [`MdnsDiscovery`].
    +140#[derive(Debug)]
    +141pub struct MdnsDiscoveryBuilder {
    +142    advertise: bool,
    +143    service_name: String,
    +144}
    +145
    +146impl MdnsDiscoveryBuilder {
    +147    /// Creates a new [`MdnsDiscoveryBuilder`] with default settings.
    +148    fn new() -> Self {
    +149        Self {
    +150            advertise: true,
    +151            service_name: N0_SERVICE_NAME.to_string(),
    +152        }
    +153    }
    +154
    +155    /// Sets whether this node should advertise its presence.
    +156    ///
    +157    /// Default is true.
    +158    pub fn advertise(mut self, advertise: bool) -> Self {
    +159        self.advertise = advertise;
    +160        self
    +161    }
    +162
    +163    /// Sets a custom service name.
    +164    ///
    +165    /// The default is `irohv1`, which will show up on a record in the
    +166    /// following form, for example:
    +167    /// `7rutqynuzu65fcdgoerbt4uoh3p62wuto2mp56x3uvhitqzssxga._irohv1._udp.local`
    +168    ///
    +169    /// Any custom service name will take the form, for example:
    +170    /// `7rutqynuzu65fcdgoerbt4uoh3p62wuto2mp56x3uvhitqzssxga._{service_name}.upd.local`
    +171    pub fn service_name(mut self, service_name: impl Into<String>) -> Self {
    +172        self.service_name = service_name.into();
    +173        self
    +174    }
    +175
    +176    /// Builds an [`MdnsDiscovery`] instance with the configured settings.
    +177    ///
    +178    /// # Errors
    +179    /// Returns an error if the network does not allow ipv4 OR ipv6.
    +180    ///
    +181    /// # Panics
    +182    /// This relies on [`tokio::runtime::Handle::current`] and will panic if called outside of the context of a tokio runtime.
    +183    pub fn build(self, node_id: NodeId) -> Result<MdnsDiscovery, IntoDiscoveryError> {
    +184        MdnsDiscovery::new(node_id, self.advertise, self.service_name)
    +185    }
    +186}
    +187
    +188impl Default for MdnsDiscoveryBuilder {
    +189    fn default() -> Self {
    +190        Self::new()
    +191    }
    +192}
    +193
    +194impl IntoDiscovery for MdnsDiscoveryBuilder {
    +195    fn into_discovery(
    +196        self,
    +197        context: &DiscoveryContext,
    +198    ) -> Result<impl Discovery, IntoDiscoveryError> {
    +199        self.build(context.node_id())
    +200    }
    +201}
    +202
    +203/// An event emitted from the [`MdnsDiscovery`] service.
    +204#[derive(Debug, Clone, Eq, PartialEq)]
    +205pub enum DiscoveryEvent {
    +206    /// A peer was discovered or it's information was updated.
    +207    Discovered {
    +208        /// The node info for the node, as discovered.
    +209        node_info: NodeInfo,
    +210        /// Optional timestamp when this node address info was last updated.
    +211        last_updated: Option<u64>,
    +212    },
    +213    /// A peer was expired due to being inactive, unreachable, or otherwise
    +214    /// unavailable.
    +215    Expired {
    +216        /// The id of the node that expired.
    +217        node_id: NodeId,
    +218    },
    +219}
    +220
    +221impl MdnsDiscovery {
    +222    /// Returns a [`MdnsDiscoveryBuilder`] that implements [`IntoDiscovery`].
    +223    pub fn builder() -> MdnsDiscoveryBuilder {
    +224        MdnsDiscoveryBuilder::default()
    +225    }
    +226
    +227    /// Create a new [`MdnsDiscovery`] Service.
    +228    ///
    +229    /// This starts a [`Discoverer`] that broadcasts your addresses (if advertise is set to true)
    +230    /// and receives addresses from other nodes in your local network.
    +231    ///
    +232    /// # Errors
    +233    /// Returns an error if the network does not allow ipv4 OR ipv6.
    +234    ///
    +235    /// # Panics
    +236    /// This relies on [`tokio::runtime::Handle::current`] and will panic if called outside of the context of a tokio runtime.
    +237    fn new(
    +238        node_id: NodeId,
    +239        advertise: bool,
    +240        service_name: String,
    +241    ) -> Result<Self, IntoDiscoveryError> {
    +242        debug!("Creating new MdnsDiscovery service");
    +243        let (send, mut recv) = mpsc::channel(64);
    +244        let task_sender = send.clone();
    +245        let rt = tokio::runtime::Handle::current();
    +246        let discovery = MdnsDiscovery::spawn_discoverer(
    +247            node_id,
    +248            advertise,
    +249            task_sender.clone(),
    +250            BTreeSet::new(),
    +251            service_name,
    +252            &rt,
    +253        )?;
    +254
    +255        let local_addrs: Watchable<Option<NodeData>> = Watchable::default();
    +256        let mut addrs_change = local_addrs.watch();
    +257        let discovery_fut = async move {
    +258            let mut node_addrs: HashMap<PublicKey, Peer> = HashMap::default();
    +259            let mut subscribers = Subscribers::new();
    +260            let mut last_id = 0;
    +261            let mut senders: HashMap<
    +262                PublicKey,
    +263                HashMap<usize, mpsc::Sender<Result<DiscoveryItem, DiscoveryError>>>,
    +264            > = HashMap::default();
    +265            let mut timeouts = JoinSet::new();
    +266            loop {
    +267                trace!(?node_addrs, "MdnsDiscovery Service loop tick");
    +268                let msg = tokio::select! {
    +269                    msg = recv.recv() => {
    +270                        msg
    +271                    }
    +272                    Ok(Some(data)) = addrs_change.updated() => {
    +273                        tracing::trace!(?data, "MdnsDiscovery address changed");
    +274                        discovery.remove_all();
    +275                        let addrs =
    +276                            MdnsDiscovery::socketaddrs_to_addrs(data.direct_addresses());
    +277                        for addr in addrs {
    +278                            discovery.add(addr.0, addr.1)
    +279                        }
    +280                        if let Some(user_data) = data.user_data() {
    +281                            if let Err(err) = discovery.set_txt_attribute(USER_DATA_ATTRIBUTE.to_string(), Some(user_data.to_string())) {
    +282                                warn!("Failed to set the user-defined data in local swarm discovery: {err:?}");
    +283                            }
     284                        }
    -285                        let timeout_sender = task_sender.clone();
    -286                        timeouts.spawn(async move {
    -287                            time::sleep(DISCOVERY_DURATION).await;
    -288                            trace!(?node_id, "discovery timeout");
    -289                            timeout_sender
    -290                                .send(Message::Timeout(node_id, id))
    -291                                .await
    -292                                .ok();
    -293                        });
    -294                    }
    -295                    Message::Timeout(node_id, id) => {
    -296                        trace!(?node_id, "MdnsDiscovery Message::Timeout");
    -297                        if let Some(senders_for_node_id) = senders.get_mut(&node_id) {
    -298                            senders_for_node_id.remove(&id);
    -299                            if senders_for_node_id.is_empty() {
    -300                                senders.remove(&node_id);
    -301                            }
    -302                        }
    -303                    }
    -304                    Message::Subscribe(subscriber) => {
    -305                        trace!("MdnsDiscovery Message::Subscribe");
    -306                        subscribers.push(subscriber);
    -307                    }
    -308                }
    -309            }
    -310        };
    -311        let handle = task::spawn(discovery_fut.instrument(info_span!("swarm-discovery.actor")));
    -312        Ok(Self {
    -313            handle: AbortOnDropHandle::new(handle),
    -314            sender: send,
    -315            local_addrs,
    -316        })
    -317    }
    -318
    -319    fn spawn_discoverer(
    -320        node_id: PublicKey,
    -321        sender: mpsc::Sender<Message>,
    -322        socketaddrs: BTreeSet<SocketAddr>,
    -323        rt: &tokio::runtime::Handle,
    -324    ) -> Result<DropGuard, IntoDiscoveryError> {
    -325        let spawn_rt = rt.clone();
    -326        let callback = move |node_id: &str, peer: &Peer| {
    -327            trace!(
    -328                node_id,
    -329                ?peer,
    -330                "Received peer information from MdnsDiscovery"
    -331            );
    -332
    -333            let sender = sender.clone();
    -334            let node_id = node_id.to_string();
    -335            let peer = peer.clone();
    -336            spawn_rt.spawn(async move {
    -337                sender.send(Message::Discovery(node_id, peer)).await.ok();
    -338            });
    -339        };
    -340        let addrs = MdnsDiscovery::socketaddrs_to_addrs(&socketaddrs);
    -341        let node_id_str = data_encoding::BASE32_NOPAD
    -342            .encode(node_id.as_bytes())
    -343            .to_ascii_lowercase();
    -344        let mut discoverer = Discoverer::new_interactive(N0_LOCAL_SWARM.to_string(), node_id_str)
    -345            .with_callback(callback)
    -346            .with_ip_class(IpClass::Auto);
    -347        for addr in addrs {
    -348            discoverer = discoverer.with_addrs(addr.0, addr.1);
    -349        }
    -350        discoverer
    -351            .spawn(rt)
    -352            .map_err(|e| IntoDiscoveryError::from_err_box("mdns", e.into_boxed_dyn_error()))
    -353    }
    -354
    -355    fn socketaddrs_to_addrs(socketaddrs: &BTreeSet<SocketAddr>) -> HashMap<u16, Vec<IpAddr>> {
    -356        let mut addrs: HashMap<u16, Vec<IpAddr>> = HashMap::default();
    -357        for socketaddr in socketaddrs {
    -358            addrs
    -359                .entry(socketaddr.port())
    -360                .and_modify(|a| a.push(socketaddr.ip()))
    -361                .or_insert(vec![socketaddr.ip()]);
    -362        }
    -363        addrs
    -364    }
    -365}
    -366
    -367fn peer_to_discovery_item(peer: &Peer, node_id: &NodeId) -> DiscoveryItem {
    -368    let direct_addresses: BTreeSet<SocketAddr> = peer
    -369        .addrs()
    -370        .iter()
    -371        .map(|(ip, port)| SocketAddr::new(*ip, *port))
    -372        .collect();
    -373    // Get the user-defined data from the resolved peer info. We expect an attribute with a value
    -374    // that parses as `UserData`. Otherwise, omit.
    -375    let user_data = if let Some(Some(user_data)) = peer.txt_attribute(USER_DATA_ATTRIBUTE) {
    -376        match user_data.parse() {
    -377            Err(err) => {
    -378                debug!("failed to parse user data from TXT attribute: {err}");
    -379                None
    -380            }
    -381            Ok(data) => Some(data),
    -382        }
    -383    } else {
    -384        None
    -385    };
    -386    let node_info = NodeInfo::new(*node_id)
    -387        .with_direct_addresses(direct_addresses)
    -388        .with_user_data(user_data);
    -389    DiscoveryItem::new(node_info, NAME, None)
    -390}
    -391
    -392impl Discovery for MdnsDiscovery {
    -393    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -394        use futures_util::FutureExt;
    -395
    -396        let (send, recv) = mpsc::channel(20);
    -397        let discovery_sender = self.sender.clone();
    -398        let stream = async move {
    -399            discovery_sender
    -400                .send(Message::Resolve(node_id, send))
    -401                .await
    -402                .ok();
    -403            tokio_stream::wrappers::ReceiverStream::new(recv)
    -404        };
    -405        Some(Box::pin(stream.flatten_stream()))
    -406    }
    -407
    -408    fn publish(&self, data: &NodeData) {
    -409        self.local_addrs.set(Some(data.clone())).ok();
    -410    }
    -411
    -412    fn subscribe(&self) -> Option<BoxStream<DiscoveryItem>> {
    -413        use futures_util::FutureExt;
    -414
    -415        let (sender, recv) = mpsc::channel(20);
    -416        let discovery_sender = self.sender.clone();
    -417        let stream = async move {
    -418            discovery_sender.send(Message::Subscribe(sender)).await.ok();
    -419            tokio_stream::wrappers::ReceiverStream::new(recv)
    -420        };
    -421        Some(Box::pin(stream.flatten_stream()))
    -422    }
    -423}
    -424
    -425#[cfg(test)]
    -426mod tests {
    -427
    -428    /// This module's name signals nextest to run test in a single thread (no other concurrent
    -429    /// tests)
    -430    mod run_in_isolation {
    -431        use iroh_base::SecretKey;
    -432        use n0_future::StreamExt;
    -433        use n0_snafu::{Error, Result, ResultExt};
    -434        use snafu::whatever;
    -435        use tracing_test::traced_test;
    -436
    -437        use super::super::*;
    -438        use crate::discovery::UserData;
    -439
    -440        #[tokio::test]
    -441        #[traced_test]
    -442        async fn mdns_publish_resolve() -> Result {
    -443            let (_, discovery_a) = make_discoverer()?;
    -444            let (node_id_b, discovery_b) = make_discoverer()?;
    -445
    -446            // make addr info for discoverer b
    -447            let user_data: UserData = "foobar".parse()?;
    -448            let node_data = NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()]))
    -449                .with_user_data(Some(user_data.clone()));
    -450            println!("info {node_data:?}");
    -451
    -452            // resolve twice to ensure we can create separate streams for the same node_id
    -453            let mut s1 = discovery_a.resolve(node_id_b).unwrap();
    -454            let mut s2 = discovery_a.resolve(node_id_b).unwrap();
    -455
    -456            tracing::debug!(?node_id_b, "Discovering node id b");
    -457            // publish discovery_b's address
    -458            discovery_b.publish(&node_data);
    -459            let s1_res = tokio::time::timeout(Duration::from_secs(5), s1.next())
    -460                .await
    -461                .context("timeout")?
    -462                .unwrap()?;
    -463            let s2_res = tokio::time::timeout(Duration::from_secs(5), s2.next())
    -464                .await
    -465                .context("timeout")?
    -466                .unwrap()?;
    -467            assert_eq!(s1_res.node_info().data, node_data);
    -468            assert_eq!(s2_res.node_info().data, node_data);
    -469
    -470            Ok(())
    -471        }
    -472
    -473        #[tokio::test]
    -474        #[traced_test]
    -475        async fn mdns_subscribe() -> Result {
    -476            let num_nodes = 5;
    -477            let mut node_ids = BTreeSet::new();
    -478            let mut discoverers = vec![];
    -479
    -480            let (_, discovery) = make_discoverer()?;
    -481            let node_data = NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()]));
    -482
    -483            for i in 0..num_nodes {
    -484                let (node_id, discovery) = make_discoverer()?;
    -485                let user_data: UserData = format!("node{i}").parse()?;
    -486                let node_data = node_data.clone().with_user_data(Some(user_data.clone()));
    -487                node_ids.insert((node_id, Some(user_data)));
    -488                discovery.publish(&node_data);
    -489                discoverers.push(discovery);
    -490            }
    -491
    -492            let mut events = discovery.subscribe().unwrap();
    -493
    -494            let test = async move {
    -495                let mut got_ids = BTreeSet::new();
    -496                while got_ids.len() != num_nodes {
    -497                    if let Some(item) = events.next().await {
    -498                        if node_ids.contains(&(item.node_id(), item.user_data())) {
    -499                            got_ids.insert((item.node_id(), item.user_data()));
    -500                        }
    -501                    } else {
    -502                        whatever!(
    -503                            "no more events, only got {} ids, expected {num_nodes}\n",
    -504                            got_ids.len()
    -505                        );
    -506                    }
    -507                }
    -508                assert_eq!(got_ids, node_ids);
    -509                Ok::<_, Error>(())
    -510            };
    -511            tokio::time::timeout(Duration::from_secs(5), test)
    +285                        continue;
    +286                    }
    +287                };
    +288                let msg = match msg {
    +289                    None => {
    +290                        error!("MdnsDiscovery channel closed");
    +291                        error!("closing MdnsDiscovery");
    +292                        timeouts.abort_all();
    +293                        discovery.remove_all();
    +294                        return;
    +295                    }
    +296                    Some(msg) => msg,
    +297                };
    +298                match msg {
    +299                    Message::Discovery(discovered_node_id, peer_info) => {
    +300                        trace!(
    +301                            ?discovered_node_id,
    +302                            ?peer_info,
    +303                            "MdnsDiscovery Message::Discovery"
    +304                        );
    +305                        let discovered_node_id = match PublicKey::from_str(&discovered_node_id) {
    +306                            Ok(node_id) => node_id,
    +307                            Err(e) => {
    +308                                warn!(
    +309                                    discovered_node_id,
    +310                                    "couldn't parse node_id from mdns discovery service: {e:?}"
    +311                                );
    +312                                continue;
    +313                            }
    +314                        };
    +315
    +316                        if discovered_node_id == node_id {
    +317                            continue;
    +318                        }
    +319
    +320                        if peer_info.is_expiry() {
    +321                            trace!(
    +322                                ?discovered_node_id,
    +323                                "removing node from MdnsDiscovery address book"
    +324                            );
    +325                            node_addrs.remove(&discovered_node_id);
    +326                            subscribers.send(DiscoveryEvent::Expired {
    +327                                node_id: discovered_node_id,
    +328                            });
    +329                            continue;
    +330                        }
    +331
    +332                        let entry = node_addrs.entry(discovered_node_id);
    +333                        if let std::collections::hash_map::Entry::Occupied(ref entry) = entry {
    +334                            if entry.get() == &peer_info {
    +335                                // this is a republish we already know about
    +336                                continue;
    +337                            }
    +338                        }
    +339
    +340                        debug!(
    +341                            ?discovered_node_id,
    +342                            ?peer_info,
    +343                            "adding node to MdnsDiscovery address book"
    +344                        );
    +345
    +346                        let mut resolved = false;
    +347                        let item = peer_to_discovery_item(&peer_info, &discovered_node_id);
    +348                        if let Some(senders) = senders.get(&discovered_node_id) {
    +349                            trace!(?item, senders = senders.len(), "sending DiscoveryItem");
    +350                            resolved = true;
    +351                            for sender in senders.values() {
    +352                                sender.send(Ok(item.clone())).await.ok();
    +353                            }
    +354                        }
    +355                        entry.or_insert(peer_info);
    +356
    +357                        // only send nodes to the `subscriber` if they weren't explicitly resolved
    +358                        // in other words, nodes sent to the `subscribers` should only be the ones that
    +359                        // have been "passively" discovered
    +360                        if !resolved {
    +361                            subscribers.send(DiscoveryEvent::Discovered {
    +362                                node_info: item.node_info,
    +363                                last_updated: item.last_updated,
    +364                            });
    +365                        }
    +366                    }
    +367                    Message::Resolve(node_id, sender) => {
    +368                        let id = last_id + 1;
    +369                        last_id = id;
    +370                        trace!(?node_id, "MdnsDiscovery Message::SendAddrs");
    +371                        if let Some(peer_info) = node_addrs.get(&node_id) {
    +372                            let item = peer_to_discovery_item(peer_info, &node_id);
    +373                            debug!(?item, "sending DiscoveryItem");
    +374                            sender.send(Ok(item)).await.ok();
    +375                        }
    +376                        if let Some(senders_for_node_id) = senders.get_mut(&node_id) {
    +377                            senders_for_node_id.insert(id, sender);
    +378                        } else {
    +379                            let mut senders_for_node_id = HashMap::new();
    +380                            senders_for_node_id.insert(id, sender);
    +381                            senders.insert(node_id, senders_for_node_id);
    +382                        }
    +383                        let timeout_sender = task_sender.clone();
    +384                        timeouts.spawn(async move {
    +385                            time::sleep(DISCOVERY_DURATION).await;
    +386                            trace!(?node_id, "discovery timeout");
    +387                            timeout_sender
    +388                                .send(Message::Timeout(node_id, id))
    +389                                .await
    +390                                .ok();
    +391                        });
    +392                    }
    +393                    Message::Timeout(node_id, id) => {
    +394                        trace!(?node_id, "MdnsDiscovery Message::Timeout");
    +395                        if let Some(senders_for_node_id) = senders.get_mut(&node_id) {
    +396                            senders_for_node_id.remove(&id);
    +397                            if senders_for_node_id.is_empty() {
    +398                                senders.remove(&node_id);
    +399                            }
    +400                        }
    +401                    }
    +402                    Message::Subscribe(subscriber) => {
    +403                        trace!("MdnsDiscovery Message::Subscribe");
    +404                        subscribers.push(subscriber);
    +405                    }
    +406                }
    +407            }
    +408        };
    +409        let handle = task::spawn(discovery_fut.instrument(info_span!("swarm-discovery.actor")));
    +410        Ok(Self {
    +411            handle: Arc::new(AbortOnDropHandle::new(handle)),
    +412            sender: send,
    +413            advertise,
    +414            local_addrs,
    +415        })
    +416    }
    +417
    +418    /// Subscribe to discovered nodes
    +419    pub async fn subscribe(&self) -> impl Stream<Item = DiscoveryEvent> + Unpin + use<> {
    +420        let (sender, recv) = mpsc::channel(20);
    +421        let discovery_sender = self.sender.clone();
    +422        discovery_sender.send(Message::Subscribe(sender)).await.ok();
    +423        tokio_stream::wrappers::ReceiverStream::new(recv)
    +424    }
    +425
    +426    fn spawn_discoverer(
    +427        node_id: PublicKey,
    +428        advertise: bool,
    +429        sender: mpsc::Sender<Message>,
    +430        socketaddrs: BTreeSet<SocketAddr>,
    +431        service_name: String,
    +432        rt: &tokio::runtime::Handle,
    +433    ) -> Result<DropGuard, IntoDiscoveryError> {
    +434        let spawn_rt = rt.clone();
    +435        let callback = move |node_id: &str, peer: &Peer| {
    +436            trace!(
    +437                node_id,
    +438                ?peer,
    +439                "Received peer information from MdnsDiscovery"
    +440            );
    +441
    +442            let sender = sender.clone();
    +443            let node_id = node_id.to_string();
    +444            let peer = peer.clone();
    +445            spawn_rt.spawn(async move {
    +446                sender.send(Message::Discovery(node_id, peer)).await.ok();
    +447            });
    +448        };
    +449        let node_id_str = data_encoding::BASE32_NOPAD
    +450            .encode(node_id.as_bytes())
    +451            .to_ascii_lowercase();
    +452        let mut discoverer = Discoverer::new_interactive(service_name, node_id_str)
    +453            .with_callback(callback)
    +454            .with_ip_class(IpClass::Auto);
    +455        if advertise {
    +456            let addrs = MdnsDiscovery::socketaddrs_to_addrs(&socketaddrs);
    +457            for addr in addrs {
    +458                discoverer = discoverer.with_addrs(addr.0, addr.1);
    +459            }
    +460        }
    +461        discoverer
    +462            .spawn(rt)
    +463            .map_err(|e| IntoDiscoveryError::from_err("mdns", e))
    +464    }
    +465
    +466    fn socketaddrs_to_addrs(socketaddrs: &BTreeSet<SocketAddr>) -> HashMap<u16, Vec<IpAddr>> {
    +467        let mut addrs: HashMap<u16, Vec<IpAddr>> = HashMap::default();
    +468        for socketaddr in socketaddrs {
    +469            addrs
    +470                .entry(socketaddr.port())
    +471                .and_modify(|a| a.push(socketaddr.ip()))
    +472                .or_insert(vec![socketaddr.ip()]);
    +473        }
    +474        addrs
    +475    }
    +476}
    +477
    +478fn peer_to_discovery_item(peer: &Peer, node_id: &NodeId) -> DiscoveryItem {
    +479    let direct_addresses: BTreeSet<SocketAddr> = peer
    +480        .addrs()
    +481        .iter()
    +482        .map(|(ip, port)| SocketAddr::new(*ip, *port))
    +483        .collect();
    +484    // Get the user-defined data from the resolved peer info. We expect an attribute with a value
    +485    // that parses as `UserData`. Otherwise, omit.
    +486    let user_data = if let Some(Some(user_data)) = peer.txt_attribute(USER_DATA_ATTRIBUTE) {
    +487        match user_data.parse() {
    +488            Err(err) => {
    +489                debug!("failed to parse user data from TXT attribute: {err}");
    +490                None
    +491            }
    +492            Ok(data) => Some(data),
    +493        }
    +494    } else {
    +495        None
    +496    };
    +497    let node_info = NodeInfo::new(*node_id)
    +498        .with_direct_addresses(direct_addresses)
    +499        .with_user_data(user_data);
    +500    DiscoveryItem::new(node_info, NAME, None)
    +501}
    +502
    +503impl Discovery for MdnsDiscovery {
    +504    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +505        use futures_util::FutureExt;
    +506
    +507        let (send, recv) = mpsc::channel(20);
    +508        let discovery_sender = self.sender.clone();
    +509        let stream = async move {
    +510            discovery_sender
    +511                .send(Message::Resolve(node_id, send))
     512                .await
    -513                .context("timeout")?
    -514        }
    -515
    -516        fn make_discoverer() -> Result<(PublicKey, MdnsDiscovery)> {
    -517            let node_id = SecretKey::generate(rand::thread_rng()).public();
    -518            Ok((node_id, MdnsDiscovery::new(node_id)?))
    -519        }
    -520    }
    -521}
    \ No newline at end of file +513
    .ok(); +514 tokio_stream::wrappers::ReceiverStream::new(recv) +515 }; +516 Some(Box::pin(stream.flatten_stream())) +517 } +518 +519 fn publish(&self, data: &NodeData) { +520 if self.advertise { +521 self.local_addrs.set(Some(data.clone())).ok(); +522 } +523 } +524} +525 +526#[cfg(test)] +527mod tests { +528 +529 /// This module's name signals nextest to run test in a single thread (no other concurrent +530 /// tests) +531 mod run_in_isolation { +532 use iroh_base::SecretKey; +533 use n0_future::StreamExt; +534 use n0_snafu::{Error, Result, ResultExt}; +535 use rand::{CryptoRng, SeedableRng}; +536 use snafu::whatever; +537 use tracing_test::traced_test; +538 +539 use super::super::*; +540 use crate::discovery::UserData; +541 +542 #[tokio::test] +543 #[traced_test] +544 async fn mdns_publish_resolve() -> Result { +545 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +546 +547 // Create discoverer A with advertise=false (only listens) +548 let (_, discovery_a) = make_discoverer(&mut rng, false)?; +549 // Create discoverer B with advertise=true (will broadcast) +550 let (node_id_b, discovery_b) = make_discoverer(&mut rng, true)?; +551 +552 // make addr info for discoverer b +553 let user_data: UserData = "foobar".parse()?; +554 let node_data = NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()])) +555 .with_user_data(Some(user_data.clone())); +556 +557 // resolve twice to ensure we can create separate streams for the same node_id +558 let mut s1 = discovery_a.subscribe().await.filter(|event| match event { +559 DiscoveryEvent::Discovered { node_info, .. } => node_info.node_id == node_id_b, +560 _ => false, +561 }); +562 let mut s2 = discovery_a.subscribe().await.filter(|event| match event { +563 DiscoveryEvent::Discovered { node_info, .. } => node_info.node_id == node_id_b, +564 _ => false, +565 }); +566 +567 tracing::debug!(?node_id_b, "Discovering node id b"); +568 // publish discovery_b's address +569 discovery_b.publish(&node_data); +570 let DiscoveryEvent::Discovered { +571 node_info: s1_node_info, +572 .. +573 } = tokio::time::timeout(Duration::from_secs(5), s1.next()) +574 .await +575 .context("timeout")? +576 .unwrap() +577 else { +578 panic!("Received unexpected discovery event"); +579 }; +580 let DiscoveryEvent::Discovered { +581 node_info: s2_node_info, +582 .. +583 } = tokio::time::timeout(Duration::from_secs(5), s2.next()) +584 .await +585 .context("timeout")? +586 .unwrap() +587 else { +588 panic!("Received unexpected discovery event"); +589 }; +590 assert_eq!(s1_node_info.data, node_data); +591 assert_eq!(s2_node_info.data, node_data); +592 +593 Ok(()) +594 } +595 +596 #[tokio::test] +597 #[traced_test] +598 async fn mdns_publish_expire() -> Result { +599 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +600 let (_, discovery_a) = make_discoverer(&mut rng, false)?; +601 let (node_id_b, discovery_b) = make_discoverer(&mut rng, true)?; +602 +603 // publish discovery_b's address +604 let node_data = NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()])) +605 .with_user_data(Some("".parse()?)); +606 discovery_b.publish(&node_data); +607 +608 let mut s1 = discovery_a.subscribe().await; +609 tracing::debug!(?node_id_b, "Discovering node id b"); +610 +611 // Wait for the specific node to be discovered +612 loop { +613 let event = tokio::time::timeout(Duration::from_secs(5), s1.next()) +614 .await +615 .context("timeout")? +616 .expect("Stream should not be closed"); +617 +618 match event { +619 DiscoveryEvent::Discovered { node_info, .. } +620 if node_info.node_id == node_id_b => +621 { +622 break; +623 } +624 _ => continue, // Ignore other discovery events +625 } +626 } +627 +628 // Shutdown node B +629 drop(discovery_b); +630 tokio::time::sleep(Duration::from_secs(5)).await; +631 +632 // Wait for the expiration event for the specific node +633 loop { +634 let event = tokio::time::timeout(Duration::from_secs(10), s1.next()) +635 .await +636 .context("timeout waiting for expiration event")? +637 .expect("Stream should not be closed"); +638 +639 match event { +640 DiscoveryEvent::Expired { +641 node_id: expired_node_id, +642 } if expired_node_id == node_id_b => { +643 break; +644 } +645 _ => continue, // Ignore other events +646 } +647 } +648 +649 Ok(()) +650 } +651 +652 #[tokio::test] +653 #[traced_test] +654 async fn mdns_subscribe() -> Result { +655 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +656 +657 let num_nodes = 5; +658 let mut node_ids = BTreeSet::new(); +659 let mut discoverers = vec![]; +660 +661 let (_, discovery) = make_discoverer(&mut rng, false)?; +662 let node_data = NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()])); +663 +664 for i in 0..num_nodes { +665 let (node_id, discovery) = make_discoverer(&mut rng, true)?; +666 let user_data: UserData = format!("node{i}").parse()?; +667 let node_data = node_data.clone().with_user_data(Some(user_data.clone())); +668 node_ids.insert((node_id, Some(user_data))); +669 discovery.publish(&node_data); +670 discoverers.push(discovery); +671 } +672 +673 let mut events = discovery.subscribe().await; +674 +675 let test = async move { +676 let mut got_ids = BTreeSet::new(); +677 while got_ids.len() != num_nodes { +678 if let Some(DiscoveryEvent::Discovered { node_info, .. }) = events.next().await +679 { +680 let data = node_info.data.user_data().cloned(); +681 if node_ids.contains(&(node_info.node_id, data.clone())) { +682 got_ids.insert((node_info.node_id, data)); +683 } +684 } else { +685 whatever!( +686 "no more events, only got {} ids, expected {num_nodes}\n", +687 got_ids.len() +688 ); +689 } +690 } +691 assert_eq!(got_ids, node_ids); +692 Ok::<_, Error>(()) +693 }; +694 tokio::time::timeout(Duration::from_secs(5), test) +695 .await +696 .context("timeout")? +697 } +698 +699 #[tokio::test] +700 #[traced_test] +701 async fn non_advertising_node_not_discovered() -> Result { +702 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +703 +704 let (_, discovery_a) = make_discoverer(&mut rng, false)?; +705 let (node_id_b, discovery_b) = make_discoverer(&mut rng, false)?; +706 +707 let (node_id_c, discovery_c) = make_discoverer(&mut rng, true)?; +708 let node_data_c = +709 NodeData::new(None, BTreeSet::from(["0.0.0.0:22222".parse().unwrap()])); +710 discovery_c.publish(&node_data_c); +711 +712 let node_data_b = +713 NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()])); +714 discovery_b.publish(&node_data_b); +715 +716 let mut stream_c = discovery_a.resolve(node_id_c).unwrap(); +717 let result_c = tokio::time::timeout(Duration::from_secs(2), stream_c.next()).await; +718 assert!(result_c.is_ok(), "Advertising node should be discoverable"); +719 +720 let mut stream_b = discovery_a.resolve(node_id_b).unwrap(); +721 let result_b = tokio::time::timeout(Duration::from_secs(2), stream_b.next()).await; +722 assert!( +723 result_b.is_err(), +724 "Expected timeout since node b isn't advertising" +725 ); +726 +727 Ok(()) +728 } +729 +730 #[tokio::test] +731 #[traced_test] +732 async fn test_service_names() -> Result { +733 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +734 +735 // Create a discovery service using the default +736 // service name +737 let id_a = SecretKey::generate(&mut rng).public(); +738 let discovery_a = MdnsDiscovery::builder().build(id_a)?; +739 +740 // Create a discovery service using a custom +741 // service name +742 let id_b = SecretKey::generate(&mut rng).public(); +743 let discovery_b = MdnsDiscovery::builder() +744 .service_name("different.name") +745 .build(id_b)?; +746 +747 // Create a discovery service using the same +748 // custom service name +749 let id_c = SecretKey::generate(&mut rng).public(); +750 let discovery_c = MdnsDiscovery::builder() +751 .service_name("different.name") +752 .build(id_c)?; +753 +754 let node_data_a = +755 NodeData::new(None, BTreeSet::from(["0.0.0.0:11111".parse().unwrap()])); +756 discovery_a.publish(&node_data_a); +757 +758 let node_data_b = +759 NodeData::new(None, BTreeSet::from(["0.0.0.0:22222".parse().unwrap()])); +760 discovery_b.publish(&node_data_b); +761 +762 let node_data_c = +763 NodeData::new(None, BTreeSet::from(["0.0.0.0:33333".parse().unwrap()])); +764 discovery_c.publish(&node_data_c); +765 +766 let mut stream_a = discovery_a.resolve(id_b).unwrap(); +767 let result_a = tokio::time::timeout(Duration::from_secs(2), stream_a.next()).await; +768 assert!( +769 result_a.is_err(), +770 "Node on a different service should NOT be discoverable" +771 ); +772 +773 let mut stream_b = discovery_b.resolve(id_c).unwrap(); +774 let result_b = tokio::time::timeout(Duration::from_secs(2), stream_b.next()).await; +775 assert!( +776 result_b.is_ok(), +777 "Node on the same service should be discoverable" +778 ); +779 +780 let mut stream_b = discovery_b.resolve(id_a).unwrap(); +781 let result_b = tokio::time::timeout(Duration::from_secs(2), stream_b.next()).await; +782 assert!( +783 result_b.is_err(), +784 "Node on a different service should NOT be discoverable" +785 ); +786 +787 Ok(()) +788 } +789 +790 fn make_discoverer<R: CryptoRng + ?Sized>( +791 rng: &mut R, +792 advertise: bool, +793 ) -> Result<(PublicKey, MdnsDiscovery)> { +794 let node_id = SecretKey::generate(rng).public(); +795 Ok(( +796 node_id, +797 MdnsDiscovery::builder() +798 .advertise(advertise) +799 .build(node_id)?, +800 )) +801 } +802 } +803}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/discovery/pkarr.rs.html b/pr/3367/docs/src/iroh/discovery/pkarr.rs.html index 0376004b77..348c3d2568 100644 --- a/pr/3367/docs/src/iroh/discovery/pkarr.rs.html +++ b/pr/3367/docs/src/iroh/discovery/pkarr.rs.html @@ -1,4 +1,4 @@ -pkarr.rs - source

    iroh/discovery/
    pkarr.rs

    1//! A discovery service which publishes and resolves node information using a [pkarr] relay.
    +pkarr.rs - source

    iroh/discovery/
    pkarr.rs

    1//! A discovery service which publishes and resolves node information using a [pkarr] relay.
     2//!
     3//! Public-Key Addressable Resource Records, [pkarr], is a system which allows publishing
     4//! [DNS Resource Records] owned by a particular [`SecretKey`] under a name derived from its
    @@ -55,11 +55,11 @@
     55};
     56use n0_watcher::{Disconnected, Watchable, Watcher as _};
     57use pkarr::{
    -58    errors::{PublicKeyError, SignedPacketVerifyError},
    -59    SignedPacket,
    +58    SignedPacket,
    +59    errors::{PublicKeyError, SignedPacketVerifyError},
     60};
     61use snafu::{ResultExt, Snafu};
    -62use tracing::{debug, error_span, warn, Instrument};
    +62use tracing::{Instrument, debug, error_span, warn};
     63use url::Url;
     64
     65use super::{DiscoveryContext, DiscoveryError, IntoDiscovery, IntoDiscoveryError};
    @@ -68,544 +68,550 @@
     68use crate::{
     69    discovery::{Discovery, DiscoveryItem, NodeData},
     70    endpoint::force_staging_infra,
    -71};
    -72
    -73#[cfg(feature = "discovery-pkarr-dht")]
    -74pub mod dht;
    -75
    -76#[allow(missing_docs)]
    -77#[derive(Debug, Snafu)]
    -78#[non_exhaustive]
    -79pub enum PkarrError {
    -80    #[snafu(display("Invalid public key"))]
    -81    PublicKey { source: PublicKeyError },
    -82    #[snafu(display("Packet failed to verify"))]
    -83    Verify { source: SignedPacketVerifyError },
    -84    #[snafu(display("Invalid relay URL"))]
    -85    InvalidRelayUrl { url: RelayUrl },
    -86    #[snafu(display("Error sending http request"))]
    -87    HttpSend { source: reqwest::Error },
    -88    #[snafu(display("Error resolving http request"))]
    -89    HttpRequest { status: reqwest::StatusCode },
    -90    #[snafu(display("Http payload error"))]
    -91    HttpPayload { source: reqwest::Error },
    -92    #[snafu(display("EncodingError"))]
    -93    Encoding { source: EncodingError },
    -94}
    -95
    -96impl From<PkarrError> for DiscoveryError {
    -97    fn from(err: PkarrError) -> Self {
    -98        DiscoveryError::from_err("pkarr", err)
    -99    }
    -100}
    -101
    -102/// The production pkarr relay run by [number 0].
    -103///
    -104/// This server is both a pkarr relay server as well as a DNS resolver, see the [module
    -105/// documentation].  However it does not interact with the Mainline DHT, so is a more
    -106/// central service.  It is a reliable service to use for node discovery.
    -107///
    -108/// [number 0]: https://n0.computer
    -109/// [module documentation]: crate::discovery::pkarr
    -110pub const N0_DNS_PKARR_RELAY_PROD: &str = "https://dns.iroh.link/pkarr";
    -111/// The testing pkarr relay run by [number 0].
    -112///
    -113/// This server operates similarly to [`N0_DNS_PKARR_RELAY_PROD`] but is not as reliable.
    -114/// It is meant for more experimental use and testing purposes.
    -115///
    -116/// [number 0]: https://n0.computer
    -117pub const N0_DNS_PKARR_RELAY_STAGING: &str = "https://staging-dns.iroh.link/pkarr";
    -118
    -119/// Default TTL for the records in the pkarr signed packet.
    -120///
    -121/// The Time To Live (TTL) tells DNS caches how long to store a record. It is ignored by the
    -122/// `iroh-dns-server`, e.g. as running on [`N0_DNS_PKARR_RELAY_PROD`], as the home server
    -123/// keeps the records for the domain. When using the pkarr relay no DNS is involved and the
    -124/// setting is ignored.
    -125// TODO(flub): huh?
    -126pub const DEFAULT_PKARR_TTL: u32 = 30;
    -127
    -128/// Interval in which to republish the node info even if unchanged: 5 minutes.
    -129pub const DEFAULT_REPUBLISH_INTERVAL: Duration = Duration::from_secs(60 * 5);
    -130
    -131/// Builder for [`PkarrPublisher`].
    -132///
    -133/// See [`PkarrPublisher::builder`].
    -134#[derive(Debug)]
    -135pub struct PkarrPublisherBuilder {
    -136    pkarr_relay: Url,
    -137    ttl: u32,
    -138    republish_interval: Duration,
    -139    #[cfg(not(wasm_browser))]
    -140    dns_resolver: Option<DnsResolver>,
    -141}
    -142
    -143impl PkarrPublisherBuilder {
    -144    /// See [`PkarrPublisher::builder`].
    -145    fn new(pkarr_relay: Url) -> Self {
    -146        Self {
    -147            pkarr_relay,
    -148            ttl: DEFAULT_PKARR_TTL,
    -149            republish_interval: DEFAULT_REPUBLISH_INTERVAL,
    -150            #[cfg(not(wasm_browser))]
    -151            dns_resolver: None,
    -152        }
    -153    }
    -154
    -155    /// See [`PkarrPublisher::n0_dns`].
    -156    fn n0_dns() -> Self {
    -157        let pkarr_relay = match force_staging_infra() {
    -158            true => N0_DNS_PKARR_RELAY_STAGING,
    -159            false => N0_DNS_PKARR_RELAY_PROD,
    -160        };
    -161
    -162        let pkarr_relay: Url = pkarr_relay.parse().expect("url is valid");
    -163        Self::new(pkarr_relay)
    -164    }
    -165
    -166    /// Sets the TTL (time-to-live) for published packets.
    -167    ///
    -168    /// Default is [`DEFAULT_PKARR_TTL`].
    -169    pub fn ttl(mut self, ttl: u32) -> Self {
    -170        self.ttl = ttl;
    -171        self
    -172    }
    -173
    -174    /// Sets the interval after which packets are republished even if our node info did not change.
    -175    ///
    -176    /// Default is [`DEFAULT_REPUBLISH_INTERVAL`].
    -177    pub fn republish_interval(mut self, republish_interval: Duration) -> Self {
    -178        self.republish_interval = republish_interval;
    -179        self
    -180    }
    -181
    -182    /// Sets the DNS resolver to use for resolving the pkarr relay URL.
    -183    #[cfg(not(wasm_browser))]
    -184    pub fn dns_resolver(mut self, dns_resolver: DnsResolver) -> Self {
    -185        self.dns_resolver = Some(dns_resolver);
    -186        self
    -187    }
    -188
    -189    /// Builds the [`PkarrPublisher`] with the passed secret key for signing packets.
    -190    ///
    -191    /// This publisher will be able to publish [pkarr] records for [`SecretKey`].
    -192    pub fn build(self, secret_key: SecretKey) -> PkarrPublisher {
    -193        PkarrPublisher::new(
    -194            secret_key,
    -195            self.pkarr_relay,
    -196            self.ttl,
    -197            self.republish_interval,
    -198            #[cfg(not(wasm_browser))]
    -199            self.dns_resolver,
    -200        )
    -201    }
    -202}
    -203
    -204impl IntoDiscovery for PkarrPublisherBuilder {
    -205    fn into_discovery(
    -206        mut self,
    -207        context: &DiscoveryContext,
    -208    ) -> Result<impl Discovery, IntoDiscoveryError> {
    -209        #[cfg(not(wasm_browser))]
    -210        if self.dns_resolver.is_none() {
    -211            self.dns_resolver = Some(context.dns_resolver().clone());
    -212        }
    -213
    -214        Ok(self.build(context.secret_key().clone()))
    -215    }
    -216}
    -217
    -218/// Publisher of node discovery information to a [pkarr] relay.
    -219///
    -220/// This publisher uses HTTP to publish node discovery information to a pkarr relay
    -221/// server, see the [module docs] for details.
    -222///
    -223/// This implements the [`Discovery`] trait to be used as a node discovery service.  Note
    -224/// that it only publishes node discovery information, for the corresponding resolver use
    -225/// the [`PkarrResolver`] together with [`ConcurrentDiscovery`].
    -226///
    -227/// This publisher will **only** publish the [`RelayUrl`] if it is set, otherwise the *direct addresses* are published instead.
    -228///
    -229/// [pkarr]: https://pkarr.org
    -230/// [module docs]: crate::discovery::pkarr
    -231/// [`RelayUrl`]: crate::RelayUrl
    -232/// [`ConcurrentDiscovery`]: super::ConcurrentDiscovery
    -233#[derive(derive_more::Debug, Clone)]
    -234pub struct PkarrPublisher {
    -235    node_id: NodeId,
    -236    watchable: Watchable<Option<NodeInfo>>,
    -237    _drop_guard: Arc<AbortOnDropHandle<()>>,
    -238}
    -239
    -240impl PkarrPublisher {
    -241    /// Returns a [`PkarrPublisherBuilder`] that publishes node info to a [pkarr] relay at `pkarr_relay`.
    -242    ///
    -243    /// If no further options are set, the pkarr publisher  will use [`DEFAULT_PKARR_TTL`] as the
    -244    /// time-to-live value for the published packets, and it will republish discovery information
    -245    /// every [`DEFAULT_REPUBLISH_INTERVAL`], even if the information is unchanged.
    -246    ///
    -247    /// [`PkarrPublisherBuilder`] implements [`IntoDiscovery`], so it can be passed to [`add_discovery`].
    -248    /// It will then use the endpoint's secret key to sign published packets.
    -249    ///
    -250    /// [`add_discovery`]:  crate::endpoint::Builder::add_discovery
    -251    /// [pkarr]: https://pkarr.org
    -252    pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder {
    -253        PkarrPublisherBuilder::new(pkarr_relay)
    -254    }
    -255
    -256    /// Creates a new [`PkarrPublisher`] with a custom TTL and republish intervals.
    -257    ///
    -258    /// This allows creating the publisher with custom time-to-live values of the
    -259    /// [`pkarr::SignedPacket`]s and well as a custom republish interval.
    -260    fn new(
    -261        secret_key: SecretKey,
    -262        pkarr_relay: Url,
    -263        ttl: u32,
    -264        republish_interval: Duration,
    -265        #[cfg(not(wasm_browser))] dns_resolver: Option<DnsResolver>,
    -266    ) -> Self {
    -267        debug!("creating pkarr publisher that publishes to {pkarr_relay}");
    -268        let node_id = secret_key.public();
    -269
    -270        #[cfg(wasm_browser)]
    -271        let pkarr_client = PkarrRelayClient::new(pkarr_relay);
    -272
    -273        #[cfg(not(wasm_browser))]
    -274        let pkarr_client = if let Some(dns_resolver) = dns_resolver {
    -275            PkarrRelayClient::with_dns_resolver(pkarr_relay, dns_resolver)
    -276        } else {
    -277            PkarrRelayClient::new(pkarr_relay)
    -278        };
    -279
    -280        let watchable = Watchable::default();
    -281        let service = PublisherService {
    -282            ttl,
    -283            watcher: watchable.watch(),
    -284            secret_key,
    -285            pkarr_client,
    -286            republish_interval,
    -287        };
    -288        let join_handle = task::spawn(
    -289            service
    -290                .run()
    -291                .instrument(error_span!("pkarr_publish", me=%node_id.fmt_short())),
    -292        );
    -293        Self {
    -294            watchable,
    -295            node_id,
    -296            _drop_guard: Arc::new(AbortOnDropHandle::new(join_handle)),
    -297        }
    -298    }
    -299
    -300    /// Creates a pkarr publisher which uses the [number 0] pkarr relay server.
    -301    ///
    -302    /// This uses the pkarr relay server operated by [number 0], at
    -303    /// [`N0_DNS_PKARR_RELAY_PROD`].
    -304    ///
    -305    /// When running with the environment variable
    -306    /// `IROH_FORCE_STAGING_RELAYS` set to any non empty value [`N0_DNS_PKARR_RELAY_STAGING`]
    -307    /// server is used instead.
    -308    ///
    -309    /// [number 0]: https://n0.computer
    -310    pub fn n0_dns() -> PkarrPublisherBuilder {
    -311        PkarrPublisherBuilder::n0_dns()
    -312    }
    -313
    -314    /// Publishes the addressing information about this node to a pkarr relay.
    -315    ///
    -316    /// This is a nonblocking function, the actual update is performed in the background.
    -317    pub fn update_node_data(&self, data: &NodeData) {
    -318        let mut data = data.clone();
    -319        if data.relay_url().is_some() {
    -320            // If relay url is set: only publish relay url, and no direct addrs.
    -321            data.clear_direct_addresses();
    -322        }
    -323        let info = NodeInfo::from_parts(self.node_id, data);
    -324        self.watchable.set(Some(info)).ok();
    -325    }
    -326}
    -327
    -328impl Discovery for PkarrPublisher {
    -329    fn publish(&self, data: &NodeData) {
    -330        self.update_node_data(data);
    -331    }
    -332}
    -333
    -334/// Publish node info to a pkarr relay.
    -335#[derive(derive_more::Debug, Clone)]
    -336struct PublisherService {
    -337    #[debug("SecretKey")]
    -338    secret_key: SecretKey,
    -339    #[debug("PkarrClient")]
    -340    pkarr_client: PkarrRelayClient,
    -341    watcher: n0_watcher::Direct<Option<NodeInfo>>,
    -342    ttl: u32,
    -343    republish_interval: Duration,
    -344}
    -345
    -346impl PublisherService {
    -347    async fn run(mut self) {
    -348        let mut failed_attempts = 0;
    -349        let republish = time::sleep(Duration::MAX);
    -350        tokio::pin!(republish);
    -351        loop {
    -352            let Ok(info) = self.watcher.get() else {
    -353                break; // disconnected
    -354            };
    -355            if let Some(info) = info {
    -356                if let Err(err) = self.publish_current(info).await {
    -357                    failed_attempts += 1;
    -358                    // Retry after increasing timeout
    -359                    let retry_after = Duration::from_secs(failed_attempts);
    -360                    republish.as_mut().reset(Instant::now() + retry_after);
    -361                    warn!(
    -362                        err = %format!("{err:#}"),
    -363                        url = %self.pkarr_client.pkarr_relay_url ,
    -364                        ?retry_after,
    -365                        %failed_attempts,
    -366                        "Failed to publish to pkarr",
    -367                    );
    -368                } else {
    -369                    failed_attempts = 0;
    -370                    // Republish after fixed interval
    -371                    republish
    -372                        .as_mut()
    -373                        .reset(Instant::now() + self.republish_interval);
    -374                }
    -375            }
    -376            // Wait until either the retry/republish timeout is reached, or the node info changed.
    -377            tokio::select! {
    -378                res = self.watcher.updated() => match res {
    -379                    Ok(_) => debug!("Publish node info to pkarr (info changed)"),
    -380                    Err(Disconnected { .. }) => break,
    -381                },
    -382                _ = &mut republish => debug!("Publish node info to pkarr (interval elapsed)"),
    -383            }
    -384        }
    -385    }
    -386
    -387    async fn publish_current(&self, info: NodeInfo) -> Result<(), PkarrError> {
    -388        debug!(
    -389            data = ?info.data,
    -390            pkarr_relay = %self.pkarr_client.pkarr_relay_url,
    -391            "Publish node info to pkarr"
    -392        );
    -393        let signed_packet = info
    -394            .to_pkarr_signed_packet(&self.secret_key, self.ttl)
    -395            .context(EncodingSnafu)?;
    -396        self.pkarr_client.publish(&signed_packet).await?;
    -397        Ok(())
    -398    }
    -399}
    -400
    -401/// Builder for [`PkarrResolver`].
    -402///
    -403/// See [`PkarrResolver::builder`].
    -404#[derive(Debug)]
    -405pub struct PkarrResolverBuilder {
    -406    pkarr_relay: Url,
    -407    #[cfg(not(wasm_browser))]
    -408    dns_resolver: Option<DnsResolver>,
    -409}
    -410
    -411impl PkarrResolverBuilder {
    -412    /// Sets the DNS resolver to use for resolving the pkarr relay URL.
    -413    #[cfg(not(wasm_browser))]
    -414    pub fn dns_resolver(mut self, dns_resolver: DnsResolver) -> Self {
    -415        self.dns_resolver = Some(dns_resolver);
    -416        self
    -417    }
    -418
    -419    /// Creates a [`PkarrResolver`] from this builder.
    -420    pub fn build(self) -> PkarrResolver {
    -421        #[cfg(wasm_browser)]
    -422        let pkarr_client = PkarrRelayClient::new(self.pkarr_relay);
    -423
    -424        #[cfg(not(wasm_browser))]
    -425        let pkarr_client = if let Some(dns_resolver) = self.dns_resolver {
    -426            PkarrRelayClient::with_dns_resolver(self.pkarr_relay, dns_resolver)
    -427        } else {
    -428            PkarrRelayClient::new(self.pkarr_relay)
    -429        };
    -430
    -431        PkarrResolver { pkarr_client }
    -432    }
    -433}
    +71    util::reqwest_client_builder,
    +72};
    +73
    +74#[cfg(feature = "discovery-pkarr-dht")]
    +75pub mod dht;
    +76
    +77#[allow(missing_docs)]
    +78#[derive(Debug, Snafu)]
    +79#[non_exhaustive]
    +80pub enum PkarrError {
    +81    #[snafu(display("Invalid public key"))]
    +82    PublicKey { source: PublicKeyError },
    +83    #[snafu(display("Packet failed to verify"))]
    +84    Verify { source: SignedPacketVerifyError },
    +85    #[snafu(display("Invalid relay URL"))]
    +86    InvalidRelayUrl { url: RelayUrl },
    +87    #[snafu(display("Error sending http request"))]
    +88    HttpSend { source: reqwest::Error },
    +89    #[snafu(display("Error resolving http request"))]
    +90    HttpRequest { status: reqwest::StatusCode },
    +91    #[snafu(display("Http payload error"))]
    +92    HttpPayload { source: reqwest::Error },
    +93    #[snafu(display("EncodingError"))]
    +94    Encoding { source: EncodingError },
    +95}
    +96
    +97impl From<PkarrError> for DiscoveryError {
    +98    fn from(err: PkarrError) -> Self {
    +99        DiscoveryError::from_err("pkarr", err)
    +100    }
    +101}
    +102
    +103/// The production pkarr relay run by [number 0].
    +104///
    +105/// This server is both a pkarr relay server as well as a DNS resolver, see the [module
    +106/// documentation].  However it does not interact with the Mainline DHT, so is a more
    +107/// central service.  It is a reliable service to use for node discovery.
    +108///
    +109/// [number 0]: https://n0.computer
    +110/// [module documentation]: crate::discovery::pkarr
    +111pub const N0_DNS_PKARR_RELAY_PROD: &str = "https://dns.iroh.link/pkarr";
    +112/// The testing pkarr relay run by [number 0].
    +113///
    +114/// This server operates similarly to [`N0_DNS_PKARR_RELAY_PROD`] but is not as reliable.
    +115/// It is meant for more experimental use and testing purposes.
    +116///
    +117/// [number 0]: https://n0.computer
    +118pub const N0_DNS_PKARR_RELAY_STAGING: &str = "https://staging-dns.iroh.link/pkarr";
    +119
    +120/// Default TTL for the records in the pkarr signed packet.
    +121///
    +122/// The Time To Live (TTL) tells DNS caches how long to store a record. It is ignored by the
    +123/// `iroh-dns-server`, e.g. as running on [`N0_DNS_PKARR_RELAY_PROD`], as the home server
    +124/// keeps the records for the domain. When using the pkarr relay no DNS is involved and the
    +125/// setting is ignored.
    +126// TODO(flub): huh?
    +127pub const DEFAULT_PKARR_TTL: u32 = 30;
    +128
    +129/// Interval in which to republish the node info even if unchanged: 5 minutes.
    +130pub const DEFAULT_REPUBLISH_INTERVAL: Duration = Duration::from_secs(60 * 5);
    +131
    +132/// Builder for [`PkarrPublisher`].
    +133///
    +134/// See [`PkarrPublisher::builder`].
    +135#[derive(Debug)]
    +136pub struct PkarrPublisherBuilder {
    +137    pkarr_relay: Url,
    +138    ttl: u32,
    +139    republish_interval: Duration,
    +140    #[cfg(not(wasm_browser))]
    +141    dns_resolver: Option<DnsResolver>,
    +142}
    +143
    +144impl PkarrPublisherBuilder {
    +145    /// See [`PkarrPublisher::builder`].
    +146    fn new(pkarr_relay: Url) -> Self {
    +147        Self {
    +148            pkarr_relay,
    +149            ttl: DEFAULT_PKARR_TTL,
    +150            republish_interval: DEFAULT_REPUBLISH_INTERVAL,
    +151            #[cfg(not(wasm_browser))]
    +152            dns_resolver: None,
    +153        }
    +154    }
    +155
    +156    /// See [`PkarrPublisher::n0_dns`].
    +157    fn n0_dns() -> Self {
    +158        let pkarr_relay = match force_staging_infra() {
    +159            true => N0_DNS_PKARR_RELAY_STAGING,
    +160            false => N0_DNS_PKARR_RELAY_PROD,
    +161        };
    +162
    +163        let pkarr_relay: Url = pkarr_relay.parse().expect("url is valid");
    +164        Self::new(pkarr_relay)
    +165    }
    +166
    +167    /// Sets the TTL (time-to-live) for published packets.
    +168    ///
    +169    /// Default is [`DEFAULT_PKARR_TTL`].
    +170    pub fn ttl(mut self, ttl: u32) -> Self {
    +171        self.ttl = ttl;
    +172        self
    +173    }
    +174
    +175    /// Sets the interval after which packets are republished even if our node info did not change.
    +176    ///
    +177    /// Default is [`DEFAULT_REPUBLISH_INTERVAL`].
    +178    pub fn republish_interval(mut self, republish_interval: Duration) -> Self {
    +179        self.republish_interval = republish_interval;
    +180        self
    +181    }
    +182
    +183    /// Sets the DNS resolver to use for resolving the pkarr relay URL.
    +184    #[cfg(not(wasm_browser))]
    +185    pub fn dns_resolver(mut self, dns_resolver: DnsResolver) -> Self {
    +186        self.dns_resolver = Some(dns_resolver);
    +187        self
    +188    }
    +189
    +190    /// Builds the [`PkarrPublisher`] with the passed secret key for signing packets.
    +191    ///
    +192    /// This publisher will be able to publish [pkarr] records for [`SecretKey`].
    +193    pub fn build(self, secret_key: SecretKey) -> PkarrPublisher {
    +194        PkarrPublisher::new(
    +195            secret_key,
    +196            self.pkarr_relay,
    +197            self.ttl,
    +198            self.republish_interval,
    +199            #[cfg(not(wasm_browser))]
    +200            self.dns_resolver,
    +201        )
    +202    }
    +203}
    +204
    +205impl IntoDiscovery for PkarrPublisherBuilder {
    +206    fn into_discovery(
    +207        mut self,
    +208        context: &DiscoveryContext,
    +209    ) -> Result<impl Discovery, IntoDiscoveryError> {
    +210        #[cfg(not(wasm_browser))]
    +211        if self.dns_resolver.is_none() {
    +212            self.dns_resolver = Some(context.dns_resolver().clone());
    +213        }
    +214
    +215        Ok(self.build(context.secret_key().clone()))
    +216    }
    +217}
    +218
    +219/// Publisher of node discovery information to a [pkarr] relay.
    +220///
    +221/// This publisher uses HTTP to publish node discovery information to a pkarr relay
    +222/// server, see the [module docs] for details.
    +223///
    +224/// This implements the [`Discovery`] trait to be used as a node discovery service.  Note
    +225/// that it only publishes node discovery information, for the corresponding resolver use
    +226/// the [`PkarrResolver`] together with [`ConcurrentDiscovery`].
    +227///
    +228/// This publisher will **only** publish the [`RelayUrl`] if it is set, otherwise the *direct addresses* are published instead.
    +229///
    +230/// [pkarr]: https://pkarr.org
    +231/// [module docs]: crate::discovery::pkarr
    +232/// [`RelayUrl`]: crate::RelayUrl
    +233/// [`ConcurrentDiscovery`]: super::ConcurrentDiscovery
    +234#[derive(derive_more::Debug, Clone)]
    +235pub struct PkarrPublisher {
    +236    node_id: NodeId,
    +237    watchable: Watchable<Option<NodeInfo>>,
    +238    _drop_guard: Arc<AbortOnDropHandle<()>>,
    +239}
    +240
    +241impl PkarrPublisher {
    +242    /// Returns a [`PkarrPublisherBuilder`] that publishes node info to a [pkarr] relay at `pkarr_relay`.
    +243    ///
    +244    /// If no further options are set, the pkarr publisher  will use [`DEFAULT_PKARR_TTL`] as the
    +245    /// time-to-live value for the published packets, and it will republish discovery information
    +246    /// every [`DEFAULT_REPUBLISH_INTERVAL`], even if the information is unchanged.
    +247    ///
    +248    /// [`PkarrPublisherBuilder`] implements [`IntoDiscovery`], so it can be passed to [`add_discovery`].
    +249    /// It will then use the endpoint's secret key to sign published packets.
    +250    ///
    +251    /// [`add_discovery`]:  crate::endpoint::Builder::add_discovery
    +252    /// [pkarr]: https://pkarr.org
    +253    pub fn builder(pkarr_relay: Url) -> PkarrPublisherBuilder {
    +254        PkarrPublisherBuilder::new(pkarr_relay)
    +255    }
    +256
    +257    /// Creates a new [`PkarrPublisher`] with a custom TTL and republish intervals.
    +258    ///
    +259    /// This allows creating the publisher with custom time-to-live values of the
    +260    /// [`pkarr::SignedPacket`]s and well as a custom republish interval.
    +261    fn new(
    +262        secret_key: SecretKey,
    +263        pkarr_relay: Url,
    +264        ttl: u32,
    +265        republish_interval: Duration,
    +266        #[cfg(not(wasm_browser))] dns_resolver: Option<DnsResolver>,
    +267    ) -> Self {
    +268        debug!("creating pkarr publisher that publishes to {pkarr_relay}");
    +269        let node_id = secret_key.public();
    +270
    +271        #[cfg(wasm_browser)]
    +272        let pkarr_client = PkarrRelayClient::new(pkarr_relay);
    +273
    +274        #[cfg(not(wasm_browser))]
    +275        let pkarr_client = if let Some(dns_resolver) = dns_resolver {
    +276            PkarrRelayClient::with_dns_resolver(pkarr_relay, dns_resolver)
    +277        } else {
    +278            PkarrRelayClient::new(pkarr_relay)
    +279        };
    +280
    +281        let watchable = Watchable::default();
    +282        let service = PublisherService {
    +283            ttl,
    +284            watcher: watchable.watch(),
    +285            secret_key,
    +286            pkarr_client,
    +287            republish_interval,
    +288        };
    +289        let join_handle = task::spawn(
    +290            service
    +291                .run()
    +292                .instrument(error_span!("pkarr_publish", me=%node_id.fmt_short())),
    +293        );
    +294        Self {
    +295            watchable,
    +296            node_id,
    +297            _drop_guard: Arc::new(AbortOnDropHandle::new(join_handle)),
    +298        }
    +299    }
    +300
    +301    /// Creates a pkarr publisher which uses the [number 0] pkarr relay server.
    +302    ///
    +303    /// This uses the pkarr relay server operated by [number 0], at
    +304    /// [`N0_DNS_PKARR_RELAY_PROD`].
    +305    ///
    +306    /// When running with the environment variable
    +307    /// `IROH_FORCE_STAGING_RELAYS` set to any non empty value [`N0_DNS_PKARR_RELAY_STAGING`]
    +308    /// server is used instead.
    +309    ///
    +310    /// [number 0]: https://n0.computer
    +311    pub fn n0_dns() -> PkarrPublisherBuilder {
    +312        PkarrPublisherBuilder::n0_dns()
    +313    }
    +314
    +315    /// Publishes the addressing information about this node to a pkarr relay.
    +316    ///
    +317    /// This is a nonblocking function, the actual update is performed in the background.
    +318    pub fn update_node_data(&self, data: &NodeData) {
    +319        let mut data = data.clone();
    +320        if data.relay_url().is_some() {
    +321            // If relay url is set: only publish relay url, and no direct addrs.
    +322            data.clear_direct_addresses();
    +323        }
    +324        let info = NodeInfo::from_parts(self.node_id, data);
    +325        self.watchable.set(Some(info)).ok();
    +326    }
    +327}
    +328
    +329impl Discovery for PkarrPublisher {
    +330    fn publish(&self, data: &NodeData) {
    +331        self.update_node_data(data);
    +332    }
    +333}
    +334
    +335/// Publish node info to a pkarr relay.
    +336#[derive(derive_more::Debug, Clone)]
    +337struct PublisherService {
    +338    #[debug("SecretKey")]
    +339    secret_key: SecretKey,
    +340    #[debug("PkarrClient")]
    +341    pkarr_client: PkarrRelayClient,
    +342    watcher: n0_watcher::Direct<Option<NodeInfo>>,
    +343    ttl: u32,
    +344    republish_interval: Duration,
    +345}
    +346
    +347impl PublisherService {
    +348    async fn run(mut self) {
    +349        let mut failed_attempts = 0;
    +350        let republish = time::sleep(Duration::MAX);
    +351        tokio::pin!(republish);
    +352        loop {
    +353            if !self.watcher.is_connected() {
    +354                break;
    +355            }
    +356            if let Some(info) = self.watcher.get() {
    +357                match self.publish_current(info).await {
    +358                    Err(err) => {
    +359                        failed_attempts += 1;
    +360                        // Retry after increasing timeout
    +361                        let retry_after = Duration::from_secs(failed_attempts);
    +362                        republish.as_mut().reset(Instant::now() + retry_after);
    +363                        warn!(
    +364                            err = %format!("{err:#}"),
    +365                            url = %self.pkarr_client.pkarr_relay_url ,
    +366                            ?retry_after,
    +367                            %failed_attempts,
    +368                            "Failed to publish to pkarr",
    +369                        );
    +370                    }
    +371                    _ => {
    +372                        failed_attempts = 0;
    +373                        // Republish after fixed interval
    +374                        republish
    +375                            .as_mut()
    +376                            .reset(Instant::now() + self.republish_interval);
    +377                    }
    +378                }
    +379            }
    +380            // Wait until either the retry/republish timeout is reached, or the node info changed.
    +381            tokio::select! {
    +382                res = self.watcher.updated() => match res {
    +383                    Ok(_) => debug!("Publish node info to pkarr (info changed)"),
    +384                    Err(Disconnected { .. }) => break,
    +385                },
    +386                _ = &mut republish => debug!("Publish node info to pkarr (interval elapsed)"),
    +387            }
    +388        }
    +389    }
    +390
    +391    async fn publish_current(&self, info: NodeInfo) -> Result<(), PkarrError> {
    +392        debug!(
    +393            data = ?info.data,
    +394            pkarr_relay = %self.pkarr_client.pkarr_relay_url,
    +395            "Publish node info to pkarr"
    +396        );
    +397        let signed_packet = info
    +398            .to_pkarr_signed_packet(&self.secret_key, self.ttl)
    +399            .context(EncodingSnafu)?;
    +400        self.pkarr_client.publish(&signed_packet).await?;
    +401        Ok(())
    +402    }
    +403}
    +404
    +405/// Builder for [`PkarrResolver`].
    +406///
    +407/// See [`PkarrResolver::builder`].
    +408#[derive(Debug)]
    +409pub struct PkarrResolverBuilder {
    +410    pkarr_relay: Url,
    +411    #[cfg(not(wasm_browser))]
    +412    dns_resolver: Option<DnsResolver>,
    +413}
    +414
    +415impl PkarrResolverBuilder {
    +416    /// Sets the DNS resolver to use for resolving the pkarr relay URL.
    +417    #[cfg(not(wasm_browser))]
    +418    pub fn dns_resolver(mut self, dns_resolver: DnsResolver) -> Self {
    +419        self.dns_resolver = Some(dns_resolver);
    +420        self
    +421    }
    +422
    +423    /// Creates a [`PkarrResolver`] from this builder.
    +424    pub fn build(self) -> PkarrResolver {
    +425        #[cfg(wasm_browser)]
    +426        let pkarr_client = PkarrRelayClient::new(self.pkarr_relay);
    +427
    +428        #[cfg(not(wasm_browser))]
    +429        let pkarr_client = if let Some(dns_resolver) = self.dns_resolver {
    +430            PkarrRelayClient::with_dns_resolver(self.pkarr_relay, dns_resolver)
    +431        } else {
    +432            PkarrRelayClient::new(self.pkarr_relay)
    +433        };
     434
    -435impl IntoDiscovery for PkarrResolverBuilder {
    -436    fn into_discovery(
    -437        mut self,
    -438        context: &DiscoveryContext,
    -439    ) -> Result<impl Discovery, IntoDiscoveryError> {
    -440        #[cfg(not(wasm_browser))]
    -441        if self.dns_resolver.is_none() {
    -442            self.dns_resolver = Some(context.dns_resolver().clone());
    -443        }
    -444
    -445        Ok(self.build())
    -446    }
    -447}
    +435        PkarrResolver { pkarr_client }
    +436    }
    +437}
    +438
    +439impl IntoDiscovery for PkarrResolverBuilder {
    +440    fn into_discovery(
    +441        mut self,
    +442        context: &DiscoveryContext,
    +443    ) -> Result<impl Discovery, IntoDiscoveryError> {
    +444        #[cfg(not(wasm_browser))]
    +445        if self.dns_resolver.is_none() {
    +446            self.dns_resolver = Some(context.dns_resolver().clone());
    +447        }
     448
    -449/// Resolver of node discovery information from a [pkarr] relay.
    -450///
    -451/// The resolver uses HTTP to query node discovery information from a pkarr relay server,
    -452/// see the [module docs] for details.
    -453///
    -454/// This implements the [`Discovery`] trait to be used as a node discovery service.  Note
    -455/// that it only resolves node discovery information, for the corresponding publisher use
    -456/// the [`PkarrPublisher`] together with [`ConcurrentDiscovery`].
    +449        Ok(self.build())
    +450    }
    +451}
    +452
    +453/// Resolver of node discovery information from a [pkarr] relay.
    +454///
    +455/// The resolver uses HTTP to query node discovery information from a pkarr relay server,
    +456/// see the [module docs] for details.
     457///
    -458/// [pkarr]: https://pkarr.org
    -459/// [module docs]: crate::discovery::pkarr
    -460/// [`ConcurrentDiscovery`]: super::ConcurrentDiscovery
    -461#[derive(derive_more::Debug, Clone)]
    -462pub struct PkarrResolver {
    -463    pkarr_client: PkarrRelayClient,
    -464}
    -465
    -466impl PkarrResolver {
    -467    /// Creates a new resolver builder using the pkarr relay server at the URL.
    -468    ///
    -469    /// The builder implements [`IntoDiscovery`].
    -470    pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder {
    -471        PkarrResolverBuilder {
    -472            pkarr_relay,
    -473            #[cfg(not(wasm_browser))]
    -474            dns_resolver: None,
    -475        }
    -476    }
    -477
    -478    /// Creates a pkarr resolver builder which uses the [number 0] pkarr relay server.
    -479    ///
    -480    /// This uses the pkarr relay server operated by [number 0] at
    -481    /// [`N0_DNS_PKARR_RELAY_PROD`].
    -482    ///
    -483    /// When running with the environment variable `IROH_FORCE_STAGING_RELAYS`
    -484    /// set to any non empty value [`N0_DNS_PKARR_RELAY_STAGING`]
    -485    /// server is used instead.
    +458/// This implements the [`Discovery`] trait to be used as a node discovery service.  Note
    +459/// that it only resolves node discovery information, for the corresponding publisher use
    +460/// the [`PkarrPublisher`] together with [`ConcurrentDiscovery`].
    +461///
    +462/// [pkarr]: https://pkarr.org
    +463/// [module docs]: crate::discovery::pkarr
    +464/// [`ConcurrentDiscovery`]: super::ConcurrentDiscovery
    +465#[derive(derive_more::Debug, Clone)]
    +466pub struct PkarrResolver {
    +467    pkarr_client: PkarrRelayClient,
    +468}
    +469
    +470impl PkarrResolver {
    +471    /// Creates a new resolver builder using the pkarr relay server at the URL.
    +472    ///
    +473    /// The builder implements [`IntoDiscovery`].
    +474    pub fn builder(pkarr_relay: Url) -> PkarrResolverBuilder {
    +475        PkarrResolverBuilder {
    +476            pkarr_relay,
    +477            #[cfg(not(wasm_browser))]
    +478            dns_resolver: None,
    +479        }
    +480    }
    +481
    +482    /// Creates a pkarr resolver builder which uses the [number 0] pkarr relay server.
    +483    ///
    +484    /// This uses the pkarr relay server operated by [number 0] at
    +485    /// [`N0_DNS_PKARR_RELAY_PROD`].
     486    ///
    -487    /// [number 0]: https://n0.computer
    -488    pub fn n0_dns() -> PkarrResolverBuilder {
    -489        let pkarr_relay = match force_staging_infra() {
    -490            true => N0_DNS_PKARR_RELAY_STAGING,
    -491            false => N0_DNS_PKARR_RELAY_PROD,
    -492        };
    -493
    -494        let pkarr_relay: Url = pkarr_relay.parse().expect("url is valid");
    -495        Self::builder(pkarr_relay)
    -496    }
    -497}
    -498
    -499impl Discovery for PkarrResolver {
    -500    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -501        let pkarr_client = self.pkarr_client.clone();
    -502        let fut = async move {
    -503            let signed_packet = pkarr_client.resolve(node_id).await?;
    -504            let info = NodeInfo::from_pkarr_signed_packet(&signed_packet)
    -505                .map_err(|err| DiscoveryError::from_err("pkarr", err))?;
    -506            let item = DiscoveryItem::new(info, "pkarr", None);
    -507            Ok(item)
    -508        };
    -509        let stream = n0_future::stream::once_future(fut);
    -510        Some(Box::pin(stream))
    -511    }
    -512}
    -513
    -514/// A [pkarr] client to publish [`pkarr::SignedPacket`]s to a pkarr relay.
    -515///
    -516/// [pkarr]: https://pkarr.org
    -517#[derive(Debug, Clone)]
    -518pub struct PkarrRelayClient {
    -519    http_client: reqwest::Client,
    -520    pkarr_relay_url: Url,
    -521}
    -522
    -523impl PkarrRelayClient {
    -524    /// Creates a new client.
    -525    pub fn new(pkarr_relay_url: Url) -> Self {
    -526        Self {
    -527            http_client: reqwest::Client::new(),
    -528            pkarr_relay_url,
    -529        }
    -530    }
    -531
    -532    /// Creates a new client while passing a DNS resolver to use.
    -533    #[cfg(not(wasm_browser))]
    -534    pub fn with_dns_resolver(pkarr_relay_url: Url, dns_resolver: crate::dns::DnsResolver) -> Self {
    -535        let http_client = reqwest::Client::builder()
    -536            .dns_resolver(Arc::new(dns_resolver))
    -537            .build()
    -538            .expect("failed to create request client");
    -539        Self {
    -540            http_client,
    -541            pkarr_relay_url,
    -542        }
    -543    }
    -544
    -545    /// Resolves a [`SignedPacket`] for the given [`NodeId`].
    -546    pub async fn resolve(&self, node_id: NodeId) -> Result<SignedPacket, DiscoveryError> {
    -547        // We map the error to string, as in browsers the error is !Send
    -548        let public_key = pkarr::PublicKey::try_from(node_id.as_bytes()).context(PublicKeySnafu)?;
    -549
    -550        let mut url = self.pkarr_relay_url.clone();
    -551        url.path_segments_mut()
    -552            .map_err(|_| {
    -553                InvalidRelayUrlSnafu {
    -554                    url: self.pkarr_relay_url.clone(),
    -555                }
    -556                .build()
    -557            })?
    -558            .push(&public_key.to_z32());
    -559
    -560        let response = self
    -561            .http_client
    -562            .get(url)
    -563            .send()
    -564            .await
    -565            .context(HttpSendSnafu)?;
    -566
    -567        if !response.status().is_success() {
    -568            return Err(HttpRequestSnafu {
    -569                status: response.status(),
    -570            }
    -571            .build()
    -572            .into());
    -573        }
    -574
    -575        let payload = response.bytes().await.context(HttpPayloadSnafu)?;
    -576        // We map the error to string, as in browsers the error is !Send
    -577        let packet =
    -578            SignedPacket::from_relay_payload(&public_key, &payload).context(VerifySnafu)?;
    -579        Ok(packet)
    -580    }
    -581
    -582    /// Publishes a [`SignedPacket`].
    -583    pub async fn publish(&self, signed_packet: &SignedPacket) -> Result<(), PkarrError> {
    -584        let mut url = self.pkarr_relay_url.clone();
    -585        url.path_segments_mut()
    -586            .map_err(|_| {
    -587                InvalidRelayUrlSnafu {
    -588                    url: self.pkarr_relay_url.clone(),
    -589                }
    -590                .build()
    -591            })?
    -592            .push(&signed_packet.public_key().to_z32());
    -593
    -594        let response = self
    -595            .http_client
    -596            .put(url)
    -597            .body(signed_packet.to_relay_payload())
    -598            .send()
    -599            .await
    -600            .context(HttpSendSnafu)?;
    -601
    -602        if !response.status().is_success() {
    -603            return Err(HttpRequestSnafu {
    -604                status: response.status(),
    -605            }
    -606            .build());
    -607        }
    -608
    -609        Ok(())
    -610    }
    -611}
    \ No newline at end of file +487 /// When running with the environment variable `IROH_FORCE_STAGING_RELAYS` +488 /// set to any non empty value [`N0_DNS_PKARR_RELAY_STAGING`] +489 /// server is used instead. +490 /// +491 /// [number 0]: https://n0.computer +492
    pub fn n0_dns() -> PkarrResolverBuilder { +493 let pkarr_relay = match force_staging_infra() { +494 true => N0_DNS_PKARR_RELAY_STAGING, +495 false => N0_DNS_PKARR_RELAY_PROD, +496 }; +497 +498 let pkarr_relay: Url = pkarr_relay.parse().expect("url is valid"); +499 Self::builder(pkarr_relay) +500 } +501} +502 +503impl Discovery for PkarrResolver { +504 fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> { +505 let pkarr_client = self.pkarr_client.clone(); +506 let fut = async move { +507 let signed_packet = pkarr_client.resolve(node_id).await?; +508 let info = NodeInfo::from_pkarr_signed_packet(&signed_packet) +509 .map_err(|err| DiscoveryError::from_err("pkarr", err))?; +510 let item = DiscoveryItem::new(info, "pkarr", None); +511 Ok(item) +512 }; +513 let stream = n0_future::stream::once_future(fut); +514 Some(Box::pin(stream)) +515 } +516} +517 +518/// A [pkarr] client to publish [`pkarr::SignedPacket`]s to a pkarr relay. +519/// +520/// [pkarr]: https://pkarr.org +521#[derive(Debug, Clone)] +522pub struct PkarrRelayClient { +523 http_client: reqwest::Client, +524 pkarr_relay_url: Url, +525} +526 +527impl PkarrRelayClient { +528 /// Creates a new client. +529 pub fn new(pkarr_relay_url: Url) -> Self { +530 Self { +531 http_client: reqwest_client_builder() +532 .build() +533 .expect("failed to create reqwest client"), +534 pkarr_relay_url, +535 } +536 } +537 +538 /// Creates a new client while passing a DNS resolver to use. +539 #[cfg(not(wasm_browser))] +540 pub fn with_dns_resolver(pkarr_relay_url: Url, dns_resolver: crate::dns::DnsResolver) -> Self { +541 let http_client = reqwest_client_builder() +542 .dns_resolver(Arc::new(dns_resolver)) +543 .build() +544 .expect("failed to create request client"); +545 Self { +546 http_client, +547 pkarr_relay_url, +548 } +549 } +550 +551 /// Resolves a [`SignedPacket`] for the given [`NodeId`]. +552 pub async fn resolve(&self, node_id: NodeId) -> Result<SignedPacket, DiscoveryError> { +553 // We map the error to string, as in browsers the error is !Send +554 let public_key = pkarr::PublicKey::try_from(node_id.as_bytes()).context(PublicKeySnafu)?; +555 +556 let mut url = self.pkarr_relay_url.clone(); +557 url.path_segments_mut() +558 .map_err(|_| { +559 InvalidRelayUrlSnafu { +560 url: self.pkarr_relay_url.clone(), +561 } +562 .build() +563 })? +564 .push(&public_key.to_z32()); +565 +566 let response = self +567 .http_client +568 .get(url) +569 .send() +570 .await +571 .context(HttpSendSnafu)?; +572 +573 if !response.status().is_success() { +574 return Err(HttpRequestSnafu { +575 status: response.status(), +576 } +577 .build() +578 .into()); +579 } +580 +581 let payload = response.bytes().await.context(HttpPayloadSnafu)?; +582 // We map the error to string, as in browsers the error is !Send +583 let packet = +584 SignedPacket::from_relay_payload(&public_key, &payload).context(VerifySnafu)?; +585 Ok(packet) +586 } +587 +588 /// Publishes a [`SignedPacket`]. +589 pub async fn publish(&self, signed_packet: &SignedPacket) -> Result<(), PkarrError> { +590 let mut url = self.pkarr_relay_url.clone(); +591 url.path_segments_mut() +592 .map_err(|_| { +593 InvalidRelayUrlSnafu { +594 url: self.pkarr_relay_url.clone(), +595 } +596 .build() +597 })? +598 .push(&signed_packet.public_key().to_z32()); +599 +600 let response = self +601 .http_client +602 .put(url) +603 .body(signed_packet.to_relay_payload()) +604 .send() +605 .await +606 .context(HttpSendSnafu)?; +607 +608 if !response.status().is_success() { +609 return Err(HttpRequestSnafu { +610 status: response.status(), +611 } +612 .build()); +613 } +614 +615 Ok(()) +616 } +617}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/discovery/pkarr/dht.rs.html b/pr/3367/docs/src/iroh/discovery/pkarr/dht.rs.html index f24490a071..6aa0f8508d 100644 --- a/pr/3367/docs/src/iroh/discovery/pkarr/dht.rs.html +++ b/pr/3367/docs/src/iroh/discovery/pkarr/dht.rs.html @@ -1,4 +1,4 @@ -dht.rs - source

    iroh/discovery/pkarr/
    dht.rs

    1//! Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
    +dht.rs - source

    iroh/discovery/pkarr/
    dht.rs

    1//! Pkarr based node discovery for iroh, supporting both relay servers and the DHT.
     2//!
     3//! This module contains pkarr-based node discovery for iroh which can use both pkarr
     4//! relay servers as well as the Mainline DHT directly.  See the [pkarr module] for an
    @@ -19,9 +19,9 @@
     19
     20use crate::{
     21    discovery::{
    -22        pkarr::{DEFAULT_PKARR_TTL, N0_DNS_PKARR_RELAY_PROD, N0_DNS_PKARR_RELAY_STAGING},
    -23        Discovery, DiscoveryContext, DiscoveryError, DiscoveryItem, IntoDiscovery,
    -24        IntoDiscoveryError, NodeData,
    +22        Discovery, DiscoveryContext, DiscoveryError, DiscoveryItem, IntoDiscovery,
    +23        IntoDiscoveryError, NodeData,
    +24        pkarr::{DEFAULT_PKARR_TTL, N0_DNS_PKARR_RELAY_PROD, N0_DNS_PKARR_RELAY_STAGING},
     25    },
     26    node_info::NodeInfo,
     27};
    @@ -31,366 +31,357 @@
     31/// This is only for when the info does not change.  If the info changes, it will be
     32/// published immediately.
     33const REPUBLISH_DELAY: Duration = Duration::from_secs(60 * 60);
    -34/// Initial publish delay.
    -35///
    -36/// This is to avoid spamming the DHT when there are frequent network changes at startup.
    -37const INITIAL_PUBLISH_DELAY: Duration = Duration::from_millis(500);
    -38
    -39/// Pkarr Mainline DHT and relay server node discovery.
    -40///
    -41/// It stores node addresses in DNS records, signed by the node's private key, and publishes
    -42/// them to the BitTorrent Mainline DHT.  See the [pkarr module] for more details.
    +34
    +35/// Pkarr Mainline DHT and relay server node discovery.
    +36///
    +37/// It stores node addresses in DNS records, signed by the node's private key, and publishes
    +38/// them to the BitTorrent Mainline DHT.  See the [pkarr module] for more details.
    +39///
    +40/// This implements the [`Discovery`] trait to be used as a node discovery service which can
    +41/// be used as both a publisher and resolver.  Calling [`DhtDiscovery::publish`] will start
    +42/// a background task that periodically publishes the node address.
     43///
    -44/// This implements the [`Discovery`] trait to be used as a node discovery service which can
    -45/// be used as both a publisher and resolver.  Calling [`DhtDiscovery::publish`] will start
    -46/// a background task that periodically publishes the node address.
    -47///
    -48/// [pkarr module]: super
    -49#[derive(Debug, Clone)]
    -50pub struct DhtDiscovery(Arc<Inner>);
    -51
    -52impl Default for DhtDiscovery {
    -53    fn default() -> Self {
    -54        Self::builder().build().expect("valid builder")
    -55    }
    -56}
    -57
    -58#[derive(derive_more::Debug)]
    -59struct Inner {
    -60    /// Pkarr client for interacting with the DHT.
    -61    pkarr: PkarrClient,
    -62    /// The background task that periodically publishes the node address.
    +44/// [pkarr module]: super
    +45#[derive(Debug, Clone)]
    +46pub struct DhtDiscovery(Arc<Inner>);
    +47
    +48impl Default for DhtDiscovery {
    +49    fn default() -> Self {
    +50        Self::builder().build().expect("valid builder")
    +51    }
    +52}
    +53
    +54#[derive(derive_more::Debug)]
    +55struct Inner {
    +56    /// Pkarr client for interacting with the DHT.
    +57    pkarr: PkarrClient,
    +58    /// The background task that periodically publishes the node address.
    +59    ///
    +60    /// Due to [`AbortOnDropHandle`], this will be aborted when the discovery is dropped.
    +61    task: Mutex<Option<AbortOnDropHandle<()>>>,
    +62    /// Optional keypair for signing the DNS packets.
     63    ///
    -64    /// Due to [`AbortOnDropHandle`], this will be aborted when the discovery is dropped.
    -65    task: Mutex<Option<AbortOnDropHandle<()>>>,
    -66    /// Optional keypair for signing the DNS packets.
    -67    ///
    -68    /// If this is None, the node will not publish its address to the DHT.
    -69    secret_key: Option<SecretKey>,
    -70    /// Optional pkarr relay URL to use.
    -71    relay_url: Option<Url>,
    -72    /// Time-to-live value for the DNS packets.
    -73    ttl: u32,
    -74    /// True to include the direct addresses in the DNS packet.
    -75    include_direct_addresses: bool,
    -76    /// Initial delay before the first publish.
    -77    initial_publish_delay: Duration,
    -78    /// Republish delay for the DHT.
    -79    republish_delay: Duration,
    -80}
    -81
    -82impl Inner {
    -83    async fn resolve_pkarr(
    -84        &self,
    -85        key: pkarr::PublicKey,
    -86    ) -> Option<Result<DiscoveryItem, DiscoveryError>> {
    -87        tracing::info!(
    -88            "resolving {} from relay and DHT {:?}",
    -89            key.to_z32(),
    -90            self.relay_url
    -91        );
    -92
    -93        let maybe_packet = self.pkarr.resolve(&key).await;
    -94        match maybe_packet {
    -95            Some(signed_packet) => match NodeInfo::from_pkarr_signed_packet(&signed_packet) {
    -96                Ok(node_info) => {
    -97                    tracing::info!("discovered node info {:?}", node_info);
    -98                    Some(Ok(DiscoveryItem::new(node_info, "pkarr", None)))
    -99                }
    -100                Err(_err) => {
    -101                    tracing::debug!("failed to parse signed packet as node info");
    -102                    None
    -103                }
    -104            },
    -105            None => {
    -106                tracing::debug!("no signed packet found");
    -107                None
    -108            }
    -109        }
    -110    }
    -111}
    -112
    -113/// Builder for [`DhtDiscovery`].
    -114///
    -115/// By default, publishing to the DHT is enabled, and relay publishing is disabled.
    -116#[derive(Debug)]
    -117pub struct Builder {
    -118    client: Option<PkarrClient>,
    -119    secret_key: Option<SecretKey>,
    -120    ttl: Option<u32>,
    -121    pkarr_relay: Option<Url>,
    -122    dht: bool,
    -123    include_direct_addresses: bool,
    -124    initial_publish_delay: Duration,
    -125    republish_delay: Duration,
    -126    enable_publish: bool,
    -127}
    -128
    -129impl Default for Builder {
    -130    fn default() -> Self {
    -131        Self {
    -132            client: None,
    -133            secret_key: None,
    -134            ttl: None,
    -135            pkarr_relay: None,
    -136            dht: true,
    -137            include_direct_addresses: false,
    -138            initial_publish_delay: INITIAL_PUBLISH_DELAY,
    -139            republish_delay: REPUBLISH_DELAY,
    -140            enable_publish: true,
    -141        }
    -142    }
    -143}
    -144
    -145impl Builder {
    -146    /// Explicitly sets the pkarr client to use.
    -147    pub fn client(mut self, client: PkarrClient) -> Self {
    -148        self.client = Some(client);
    +64    /// If this is None, the node will not publish its address to the DHT.
    +65    secret_key: Option<SecretKey>,
    +66    /// Optional pkarr relay URL to use.
    +67    relay_url: Option<Url>,
    +68    /// Time-to-live value for the DNS packets.
    +69    ttl: u32,
    +70    /// True to include the direct addresses in the DNS packet.
    +71    include_direct_addresses: bool,
    +72    /// Republish delay for the DHT.
    +73    republish_delay: Duration,
    +74}
    +75
    +76impl Inner {
    +77    async fn resolve_pkarr(
    +78        &self,
    +79        key: pkarr::PublicKey,
    +80    ) -> Option<Result<DiscoveryItem, DiscoveryError>> {
    +81        tracing::info!(
    +82            "resolving {} from relay and DHT {:?}",
    +83            key.to_z32(),
    +84            self.relay_url
    +85        );
    +86
    +87        let maybe_packet = self.pkarr.resolve(&key).await;
    +88        match maybe_packet {
    +89            Some(signed_packet) => match NodeInfo::from_pkarr_signed_packet(&signed_packet) {
    +90                Ok(node_info) => {
    +91                    tracing::info!("discovered node info {:?}", node_info);
    +92                    Some(Ok(DiscoveryItem::new(node_info, "pkarr", None)))
    +93                }
    +94                Err(_err) => {
    +95                    tracing::debug!("failed to parse signed packet as node info");
    +96                    None
    +97                }
    +98            },
    +99            None => {
    +100                tracing::debug!("no signed packet found");
    +101                None
    +102            }
    +103        }
    +104    }
    +105}
    +106
    +107/// Builder for [`DhtDiscovery`].
    +108///
    +109/// By default, publishing to the DHT is enabled, and relay publishing is disabled.
    +110#[derive(Debug)]
    +111pub struct Builder {
    +112    client: Option<PkarrClient>,
    +113    secret_key: Option<SecretKey>,
    +114    ttl: Option<u32>,
    +115    pkarr_relay: Option<Url>,
    +116    dht: bool,
    +117    include_direct_addresses: bool,
    +118    republish_delay: Duration,
    +119    enable_publish: bool,
    +120}
    +121
    +122impl Default for Builder {
    +123    fn default() -> Self {
    +124        Self {
    +125            client: None,
    +126            secret_key: None,
    +127            ttl: None,
    +128            pkarr_relay: None,
    +129            dht: true,
    +130            include_direct_addresses: false,
    +131            republish_delay: REPUBLISH_DELAY,
    +132            enable_publish: true,
    +133        }
    +134    }
    +135}
    +136
    +137impl Builder {
    +138    /// Explicitly sets the pkarr client to use.
    +139    pub fn client(mut self, client: PkarrClient) -> Self {
    +140        self.client = Some(client);
    +141        self
    +142    }
    +143
    +144    /// Sets the secret key to use for signing the DNS packets.
    +145    ///
    +146    /// Without a secret key, the node will not publish its address to the DHT.
    +147    pub fn secret_key(mut self, secret_key: SecretKey) -> Self {
    +148        self.secret_key = Some(secret_key);
     149        self
     150    }
     151
    -152    /// Sets the secret key to use for signing the DNS packets.
    -153    ///
    -154    /// Without a secret key, the node will not publish its address to the DHT.
    -155    pub fn secret_key(mut self, secret_key: SecretKey) -> Self {
    -156        self.secret_key = Some(secret_key);
    -157        self
    -158    }
    -159
    -160    /// Sets the time-to-live value for the DNS packets.
    -161    pub fn ttl(mut self, ttl: u32) -> Self {
    -162        self.ttl = Some(ttl);
    -163        self
    -164    }
    -165
    -166    /// Sets the pkarr relay URL to use.
    -167    pub fn pkarr_relay(mut self, pkarr_relay: Url) -> Self {
    -168        self.pkarr_relay = Some(pkarr_relay);
    -169        self
    -170    }
    -171
    -172    /// Uses the default [number 0] pkarr relay URL.
    -173    ///
    -174    /// [number 0]: https://n0.computer
    -175    pub fn n0_dns_pkarr_relay(mut self) -> Self {
    -176        let url = if crate::endpoint::force_staging_infra() {
    -177            N0_DNS_PKARR_RELAY_STAGING
    -178        } else {
    -179            N0_DNS_PKARR_RELAY_PROD
    -180        };
    -181        self.pkarr_relay = Some(url.parse().expect("valid URL"));
    -182        self
    -183    }
    -184
    -185    /// Sets whether to publish to the Mainline DHT.
    -186    pub fn dht(mut self, dht: bool) -> Self {
    -187        self.dht = dht;
    -188        self
    -189    }
    -190
    -191    /// Sets whether to include the direct addresses in the DNS packet.
    -192    pub fn include_direct_addresses(mut self, include_direct_addresses: bool) -> Self {
    -193        self.include_direct_addresses = include_direct_addresses;
    -194        self
    -195    }
    -196
    -197    /// Sets the initial delay before the first publish.
    -198    pub fn initial_publish_delay(mut self, initial_publish_delay: Duration) -> Self {
    -199        self.initial_publish_delay = initial_publish_delay;
    -200        self
    -201    }
    -202
    -203    /// Sets the republish delay for the DHT.
    -204    pub fn republish_delay(mut self, republish_delay: Duration) -> Self {
    -205        self.republish_delay = republish_delay;
    -206        self
    -207    }
    -208
    -209    /// Disables publishing even if a secret key is set.
    -210    pub fn no_publish(mut self) -> Self {
    -211        self.enable_publish = false;
    -212        self
    -213    }
    -214
    -215    /// Builds the discovery mechanism.
    -216    pub fn build(self) -> Result<DhtDiscovery, IntoDiscoveryError> {
    -217        if !(self.dht || self.pkarr_relay.is_some()) {
    -218            return Err(IntoDiscoveryError::from_err(
    -219                "pkarr",
    -220                std::io::Error::other("at least one of DHT or relay must be enabled"),
    -221            ));
    -222        }
    -223        let pkarr = match self.client {
    -224            Some(client) => client,
    -225            None => {
    -226                let mut builder = PkarrClient::builder();
    -227                builder.no_default_network();
    -228                if self.dht {
    -229                    builder.dht(|x| x);
    -230                }
    -231                if let Some(url) = &self.pkarr_relay {
    -232                    builder
    -233                        .relays(&[url.clone()])
    -234                        .map_err(|e| IntoDiscoveryError::from_err("pkarr", e))?;
    -235                }
    -236                builder
    -237                    .build()
    -238                    .map_err(|e| IntoDiscoveryError::from_err("pkarr", e))?
    -239            }
    -240        };
    -241        let ttl = self.ttl.unwrap_or(DEFAULT_PKARR_TTL);
    -242        let include_direct_addresses = self.include_direct_addresses;
    -243        let secret_key = self.secret_key.filter(|_| self.enable_publish);
    -244
    -245        Ok(DhtDiscovery(Arc::new(Inner {
    -246            pkarr,
    -247            ttl,
    -248            relay_url: self.pkarr_relay,
    -249            include_direct_addresses,
    -250            secret_key,
    -251            initial_publish_delay: self.initial_publish_delay,
    -252            republish_delay: self.republish_delay,
    -253            task: Default::default(),
    -254        })))
    -255    }
    -256}
    +152    /// Sets the time-to-live value for the DNS packets.
    +153    pub fn ttl(mut self, ttl: u32) -> Self {
    +154        self.ttl = Some(ttl);
    +155        self
    +156    }
    +157
    +158    /// Sets the pkarr relay URL to use.
    +159    pub fn pkarr_relay(mut self, pkarr_relay: Url) -> Self {
    +160        self.pkarr_relay = Some(pkarr_relay);
    +161        self
    +162    }
    +163
    +164    /// Uses the default [number 0] pkarr relay URL.
    +165    ///
    +166    /// [number 0]: https://n0.computer
    +167    pub fn n0_dns_pkarr_relay(mut self) -> Self {
    +168        let url = if crate::endpoint::force_staging_infra() {
    +169            N0_DNS_PKARR_RELAY_STAGING
    +170        } else {
    +171            N0_DNS_PKARR_RELAY_PROD
    +172        };
    +173        self.pkarr_relay = Some(url.parse().expect("valid URL"));
    +174        self
    +175    }
    +176
    +177    /// Sets whether to publish to the Mainline DHT.
    +178    pub fn dht(mut self, dht: bool) -> Self {
    +179        self.dht = dht;
    +180        self
    +181    }
    +182
    +183    /// Sets whether to include the direct addresses in the DNS packet.
    +184    pub fn include_direct_addresses(mut self, include_direct_addresses: bool) -> Self {
    +185        self.include_direct_addresses = include_direct_addresses;
    +186        self
    +187    }
    +188
    +189    /// Sets the republish delay for the DHT.
    +190    pub fn republish_delay(mut self, republish_delay: Duration) -> Self {
    +191        self.republish_delay = republish_delay;
    +192        self
    +193    }
    +194
    +195    /// Disables publishing even if a secret key is set.
    +196    pub fn no_publish(mut self) -> Self {
    +197        self.enable_publish = false;
    +198        self
    +199    }
    +200
    +201    /// Builds the discovery mechanism.
    +202    pub fn build(self) -> Result<DhtDiscovery, IntoDiscoveryError> {
    +203        if !(self.dht || self.pkarr_relay.is_some()) {
    +204            return Err(IntoDiscoveryError::from_err(
    +205                "pkarr",
    +206                std::io::Error::other("at least one of DHT or relay must be enabled"),
    +207            ));
    +208        }
    +209        let pkarr = match self.client {
    +210            Some(client) => client,
    +211            None => {
    +212                let mut builder = PkarrClient::builder();
    +213                builder.no_default_network();
    +214                if self.dht {
    +215                    builder.dht(|x| x);
    +216                }
    +217                if let Some(url) = &self.pkarr_relay {
    +218                    builder
    +219                        .relays(std::slice::from_ref(url))
    +220                        .map_err(|e| IntoDiscoveryError::from_err("pkarr", e))?;
    +221                }
    +222                builder
    +223                    .build()
    +224                    .map_err(|e| IntoDiscoveryError::from_err("pkarr", e))?
    +225            }
    +226        };
    +227        let ttl = self.ttl.unwrap_or(DEFAULT_PKARR_TTL);
    +228        let include_direct_addresses = self.include_direct_addresses;
    +229        let secret_key = self.secret_key.filter(|_| self.enable_publish);
    +230
    +231        Ok(DhtDiscovery(Arc::new(Inner {
    +232            pkarr,
    +233            ttl,
    +234            relay_url: self.pkarr_relay,
    +235            include_direct_addresses,
    +236            secret_key,
    +237            republish_delay: self.republish_delay,
    +238            task: Default::default(),
    +239        })))
    +240    }
    +241}
    +242
    +243impl IntoDiscovery for Builder {
    +244    fn into_discovery(
    +245        self,
    +246        context: &DiscoveryContext,
    +247    ) -> Result<impl Discovery, IntoDiscoveryError> {
    +248        self.secret_key(context.secret_key().clone()).build()
    +249    }
    +250}
    +251
    +252impl DhtDiscovery {
    +253    /// Creates a new builder for [`DhtDiscovery`].
    +254    pub fn builder() -> Builder {
    +255        Builder::default()
    +256    }
     257
    -258impl IntoDiscovery for Builder {
    -259    fn into_discovery(
    -260        self,
    -261        context: &DiscoveryContext,
    -262    ) -> Result<impl Discovery, IntoDiscoveryError> {
    -263        self.secret_key(context.secret_key().clone()).build()
    -264    }
    -265}
    -266
    -267impl DhtDiscovery {
    -268    /// Creates a new builder for [`DhtDiscovery`].
    -269    pub fn builder() -> Builder {
    -270        Builder::default()
    -271    }
    -272
    -273    /// Periodically publishes the node address to the DHT and/or relay.
    -274    async fn publish_loop(self, keypair: SecretKey, signed_packet: SignedPacket) {
    -275        let this = self;
    -276        let z32 = pkarr::PublicKey::try_from(keypair.public().as_bytes())
    -277            .expect("valid public key")
    -278            .to_z32();
    -279        // initial delay. If the task gets aborted before this delay is over,
    -280        // we have not published anything to the DHT yet.
    -281        time::sleep(this.0.initial_publish_delay).await;
    -282        loop {
    -283            // TODO: publish takes a compare-and-swap timestamp, make use of that.
    -284            let res = this.0.pkarr.publish(&signed_packet, None).await;
    -285            match res {
    -286                Ok(()) => {
    -287                    tracing::debug!("pkarr publish success. published under {z32}",);
    -288                }
    -289                Err(e) => {
    -290                    // we could do a smaller delay here, but in general DHT publish
    -291                    // not working is due to a network issue, and if the network changes
    -292                    // the task will be restarted anyway.
    -293                    //
    -294                    // Being unable to publish to the DHT is something that is expected
    -295                    // to happen from time to time, so this does not warrant a error log.
    -296                    tracing::warn!("pkarr publish error: {}", e);
    -297                }
    -298            }
    -299            time::sleep(this.0.republish_delay).await;
    -300        }
    -301    }
    -302}
    -303
    -304impl Discovery for DhtDiscovery {
    -305    fn publish(&self, data: &NodeData) {
    -306        let Some(keypair) = &self.0.secret_key else {
    -307            tracing::debug!("no keypair set, not publishing");
    -308            return;
    -309        };
    -310        tracing::debug!("publishing {data:?}");
    -311        let mut info = NodeInfo::from_parts(keypair.public(), data.clone());
    -312        if !self.0.include_direct_addresses {
    -313            info.clear_direct_addresses();
    -314        }
    -315        let Ok(signed_packet) = info.to_pkarr_signed_packet(keypair, self.0.ttl) else {
    -316            tracing::warn!("failed to create signed packet");
    -317            return;
    -318        };
    -319        let this = self.clone();
    -320        let curr = task::spawn(this.publish_loop(keypair.clone(), signed_packet));
    -321        let mut task = self.0.task.lock().expect("poisoned");
    -322        *task = Some(AbortOnDropHandle::new(curr));
    -323    }
    -324
    -325    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    -326        let pkarr_public_key =
    -327            pkarr::PublicKey::try_from(node_id.as_bytes()).expect("valid public key");
    -328        tracing::info!("resolving {} as {}", node_id, pkarr_public_key.to_z32());
    -329        let discovery = self.0.clone();
    -330        let stream = n0_future::stream::once_future(async move {
    -331            discovery.resolve_pkarr(pkarr_public_key).await
    -332        })
    -333        .filter_map(|x| x)
    -334        .boxed();
    -335        Some(stream)
    -336    }
    -337}
    +258    /// Periodically publishes the node address to the DHT and/or relay.
    +259    async fn publish_loop(self, keypair: SecretKey, signed_packet: SignedPacket) {
    +260        let this = self;
    +261        let public_key =
    +262            pkarr::PublicKey::try_from(keypair.public().as_bytes()).expect("valid public key");
    +263        let z32 = public_key.to_z32();
    +264        loop {
    +265            // If the task gets aborted while doing this lookup, we have not published yet.
    +266            let prev_timestamp = this
    +267                .0
    +268                .pkarr
    +269                .resolve_most_recent(&public_key)
    +270                .await
    +271                .map(|p| p.timestamp());
    +272            let res = this.0.pkarr.publish(&signed_packet, prev_timestamp).await;
    +273            match res {
    +274                Ok(()) => {
    +275                    tracing::debug!("pkarr publish success. published under {z32}",);
    +276                }
    +277                Err(e) => {
    +278                    // we could do a smaller delay here, but in general DHT publish
    +279                    // not working is due to a network issue, and if the network changes
    +280                    // the task will be restarted anyway.
    +281                    //
    +282                    // Being unable to publish to the DHT is something that is expected
    +283                    // to happen from time to time, so this does not warrant a error log.
    +284                    tracing::warn!("pkarr publish error: {}", e);
    +285                }
    +286            }
    +287            time::sleep(this.0.republish_delay).await;
    +288        }
    +289    }
    +290}
    +291
    +292impl Discovery for DhtDiscovery {
    +293    fn publish(&self, data: &NodeData) {
    +294        let Some(keypair) = &self.0.secret_key else {
    +295            tracing::debug!("no keypair set, not publishing");
    +296            return;
    +297        };
    +298        if data.relay_url().is_none() && data.direct_addresses().is_empty() {
    +299            tracing::debug!("no relay url or direct addresses in node data, not publishing");
    +300            return;
    +301        }
    +302        tracing::debug!("publishing {data:?}");
    +303        let mut info = NodeInfo::from_parts(keypair.public(), data.clone());
    +304        if !self.0.include_direct_addresses {
    +305            info.clear_direct_addresses();
    +306        }
    +307        let Ok(signed_packet) = info.to_pkarr_signed_packet(keypair, self.0.ttl) else {
    +308            tracing::warn!("failed to create signed packet");
    +309            return;
    +310        };
    +311        let this = self.clone();
    +312        let curr = task::spawn(this.publish_loop(keypair.clone(), signed_packet));
    +313        let mut task = self.0.task.lock().expect("poisoned");
    +314        *task = Some(AbortOnDropHandle::new(curr));
    +315    }
    +316
    +317    fn resolve(&self, node_id: NodeId) -> Option<BoxStream<Result<DiscoveryItem, DiscoveryError>>> {
    +318        let pkarr_public_key =
    +319            pkarr::PublicKey::try_from(node_id.as_bytes()).expect("valid public key");
    +320        tracing::info!("resolving {} as {}", node_id, pkarr_public_key.to_z32());
    +321        let discovery = self.0.clone();
    +322        let stream = n0_future::stream::once_future(async move {
    +323            discovery.resolve_pkarr(pkarr_public_key).await
    +324        })
    +325        .filter_map(|x| x)
    +326        .boxed();
    +327        Some(stream)
    +328    }
    +329}
    +330
    +331#[cfg(test)]
    +332mod tests {
    +333    use std::collections::BTreeSet;
    +334
    +335    use iroh_base::RelayUrl;
    +336    use n0_snafu::{Result, ResultExt};
    +337    use tracing_test::traced_test;
     338
    -339#[cfg(test)]
    -340mod tests {
    -341    use std::collections::BTreeSet;
    -342
    -343    use iroh_base::RelayUrl;
    -344    use n0_snafu::{Result, ResultExt};
    -345    use tracing_test::traced_test;
    -346
    -347    use super::*;
    -348    use crate::Endpoint;
    -349
    -350    #[tokio::test]
    -351    #[ignore = "flaky"]
    -352    #[traced_test]
    -353    async fn dht_discovery_smoke() -> Result {
    -354        let ep = Endpoint::builder().bind().await?;
    -355        let secret = ep.secret_key().clone();
    -356        let testnet = pkarr::mainline::Testnet::new_async(3).await.e()?;
    -357        let client = pkarr::Client::builder()
    -358            .dht(|builder| builder.bootstrap(&testnet.bootstrap))
    -359            .build()
    -360            .e()?;
    -361        let discovery = DhtDiscovery::builder()
    -362            .secret_key(secret.clone())
    -363            .initial_publish_delay(Duration::ZERO)
    -364            .client(client)
    -365            .build()?;
    -366
    -367        let relay_url: RelayUrl = Url::parse("https://example.com").e()?.into();
    -368
    -369        let data = NodeData::default().with_relay_url(Some(relay_url.clone()));
    -370        discovery.publish(&data);
    -371
    -372        // publish is fire and forget, so we have no way to wait until it is done.
    -373        tokio::time::timeout(Duration::from_secs(30), async move {
    -374            loop {
    -375                tokio::time::sleep(Duration::from_millis(200)).await;
    -376                let mut found_relay_urls = BTreeSet::new();
    -377                let items = discovery
    -378                    .resolve(secret.public())
    -379                    .unwrap()
    -380                    .collect::<Vec<_>>()
    -381                    .await;
    -382                for item in items.into_iter().flatten() {
    -383                    if let Some(url) = item.relay_url() {
    -384                        found_relay_urls.insert(url.clone());
    -385                    }
    -386                }
    -387                if found_relay_urls.contains(&relay_url) {
    -388                    break;
    -389                }
    -390            }
    -391        })
    -392        .await
    -393        .expect("timeout, relay_url not found on DHT");
    -394        Ok(())
    -395    }
    -396}
    \ No newline at end of file +339 use super::*; +340 use crate::Endpoint; +341 +342 #[tokio::test] +343 #[ignore = "flaky"] +344 #[traced_test] +345 async fn dht_discovery_smoke() -> Result { +346 let ep = Endpoint::builder().bind().await?; +347 let secret = ep.secret_key().clone(); +348 let testnet = pkarr::mainline::Testnet::new_async(3).await.e()?; +349 let client = pkarr::Client::builder() +350 .dht(|builder| builder.bootstrap(&testnet.bootstrap)) +351 .build() +352 .e()?; +353 let discovery = DhtDiscovery::builder() +354 .secret_key(secret.clone()) +355 .client(client) +356 .build()?; +357 +358 let relay_url: RelayUrl = Url::parse("https://example.com").e()?.into(); +359 +360 let data = NodeData::default().with_relay_url(Some(relay_url.clone())); +361 discovery.publish(&data); +362 +363 // publish is fire and forget, so we have no way to wait until it is done. +364 tokio::time::timeout(Duration::from_secs(30), async move { +365 loop { +366 tokio::time::sleep(Duration::from_millis(200)).await; +367 let mut found_relay_urls = BTreeSet::new(); +368 let items = discovery +369 .resolve(secret.public()) +370 .unwrap() +371 .collect::<Vec<_>>() +372 .await; +373 for item in items.into_iter().flatten() { +374 if let Some(url) = item.relay_url() { +375 found_relay_urls.insert(url.clone()); +376 } +377 } +378 if found_relay_urls.contains(&relay_url) { +379 break; +380 } +381 } +382 }) +383 .await +384 .expect("timeout, relay_url not found on DHT"); +385 Ok(()) +386 } +387}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/discovery/static_provider.rs.html b/pr/3367/docs/src/iroh/discovery/static_provider.rs.html index 6c7ed3a457..f337898b7e 100644 --- a/pr/3367/docs/src/iroh/discovery/static_provider.rs.html +++ b/pr/3367/docs/src/iroh/discovery/static_provider.rs.html @@ -1,4 +1,4 @@ -static_provider.rs - source

    iroh/discovery/
    static_provider.rs

    1//! A static node discovery to manually add node addressing information.
    +static_provider.rs - source

    iroh/discovery/
    static_provider.rs

    1//! A static node discovery to manually add node addressing information.
     2//!
     3//! Often an application might get node addressing information out-of-band in an
     4//! application-specific way.  [`NodeTicket`]'s are one common way used to achieve this.
    @@ -11,244 +11,241 @@
     11//! [`NodeTicket`]: https://docs.rs/iroh-base/latest/iroh_base/ticket/struct.NodeTicket
     12
     13use std::{
    -14    collections::{btree_map::Entry, BTreeMap},
    +14    collections::{BTreeMap, btree_map::Entry},
     15    sync::{Arc, RwLock},
     16};
     17
    -18use anyhow::Result;
    -19use iroh_base::NodeId;
    -20use n0_future::{
    -21    boxed::BoxStream,
    -22    stream::{self, StreamExt},
    -23    time::SystemTime,
    -24};
    -25
    -26use super::{Discovery, DiscoveryError, DiscoveryItem, NodeData, NodeInfo};
    -27
    -28/// A static node discovery to manually add node addressing information.
    -29///
    -30/// Often an application might get node addressing information out-of-band in an
    -31/// application-specific way.  [`NodeTicket`]'s are one common way used to achieve this.
    -32/// This "static" addressing information is often only usable for a limited time so needs to
    -33/// be able to be removed again once know it is no longer useful.
    -34///
    -35/// This is where the [`StaticProvider`] is useful: it allows applications to add and
    -36/// retract node addressing information that is otherwise out-of-band to iroh.
    -37///
    -38/// # Examples
    -39///
    -40/// ```rust
    -41/// use iroh::{discovery::static_provider::StaticProvider, Endpoint, NodeAddr};
    -42/// use iroh_base::SecretKey;
    -43///
    -44/// # #[tokio::main]
    -45/// # async fn main() -> n0_snafu::Result<()> {
    -46/// // Create the discovery service and endpoint.
    -47/// let discovery = StaticProvider::new();
    -48///
    -49/// let _ep = Endpoint::builder()
    -50///     .add_discovery(discovery.clone())
    -51///     .bind()
    -52///     .await?;
    -53///
    -54/// // Sometime later add a RelayUrl for a fake NodeId.
    -55/// let node_id = SecretKey::from_bytes(&[0u8; 32]).public(); // Do not use fake secret keys!
    -56/// // You can pass either `NodeInfo` or `NodeAddr` to `add_node_info`.
    -57/// discovery.add_node_info(
    -58///     NodeAddr {
    -59///         node_id,
    -60///         relay_url: Some("https://example.com".parse()?),
    -61///         direct_addresses: Default::default(),
    -62///     },
    -63/// );
    -64///
    -65/// # Ok(())
    -66/// # }
    -67/// ```
    -68///
    -69/// [`NodeTicket`]: https://docs.rs/iroh-base/latest/iroh_base/ticket/struct.NodeTicket
    -70#[derive(Debug, Default, Clone)]
    -71#[repr(transparent)]
    -72pub struct StaticProvider {
    -73    nodes: Arc<RwLock<BTreeMap<NodeId, StoredNodeInfo>>>,
    -74}
    -75
    -76#[derive(Debug)]
    -77struct StoredNodeInfo {
    -78    data: NodeData,
    -79    last_updated: SystemTime,
    -80}
    -81
    -82impl StaticProvider {
    -83    /// The provenance string for this discovery implementation.
    +18use iroh_base::NodeId;
    +19use n0_future::{
    +20    boxed::BoxStream,
    +21    stream::{self, StreamExt},
    +22    time::SystemTime,
    +23};
    +24
    +25use super::{Discovery, DiscoveryError, DiscoveryItem, NodeData, NodeInfo};
    +26
    +27/// A static node discovery to manually add node addressing information.
    +28///
    +29/// Often an application might get node addressing information out-of-band in an
    +30/// application-specific way.  [`NodeTicket`]'s are one common way used to achieve this.
    +31/// This "static" addressing information is often only usable for a limited time so needs to
    +32/// be able to be removed again once know it is no longer useful.
    +33///
    +34/// This is where the [`StaticProvider`] is useful: it allows applications to add and
    +35/// retract node addressing information that is otherwise out-of-band to iroh.
    +36///
    +37/// # Examples
    +38///
    +39/// ```rust
    +40/// use iroh::{Endpoint, NodeAddr, discovery::static_provider::StaticProvider};
    +41/// use iroh_base::SecretKey;
    +42///
    +43/// # #[tokio::main]
    +44/// # async fn main() -> n0_snafu::Result<()> {
    +45/// // Create the discovery service and endpoint.
    +46/// let discovery = StaticProvider::new();
    +47///
    +48/// let _ep = Endpoint::builder()
    +49///     .add_discovery(discovery.clone())
    +50///     .bind()
    +51///     .await?;
    +52///
    +53/// // Sometime later add a RelayUrl for a fake NodeId.
    +54/// let node_id = SecretKey::from_bytes(&[0u8; 32]).public(); // Do not use fake secret keys!
    +55/// // You can pass either `NodeInfo` or `NodeAddr` to `add_node_info`.
    +56/// discovery.add_node_info(NodeAddr {
    +57///     node_id,
    +58///     relay_url: Some("https://example.com".parse()?),
    +59///     direct_addresses: Default::default(),
    +60/// });
    +61///
    +62/// # Ok(())
    +63/// # }
    +64/// ```
    +65///
    +66/// [`NodeTicket`]: https://docs.rs/iroh-base/latest/iroh_base/ticket/struct.NodeTicket
    +67#[derive(Debug, Default, Clone)]
    +68#[repr(transparent)]
    +69pub struct StaticProvider {
    +70    nodes: Arc<RwLock<BTreeMap<NodeId, StoredNodeInfo>>>,
    +71}
    +72
    +73#[derive(Debug)]
    +74struct StoredNodeInfo {
    +75    data: NodeData,
    +76    last_updated: SystemTime,
    +77}
    +78
    +79impl StaticProvider {
    +80    /// The provenance string for this discovery implementation.
    +81    ///
    +82    /// This is mostly used for debugging information and allows understanding the origin of
    +83    /// addressing information used by an iroh [`Endpoint`].
     84    ///
    -85    /// This is mostly used for debugging information and allows understanding the origin of
    -86    /// addressing information used by an iroh [`Endpoint`].
    -87    ///
    -88    /// [`Endpoint`]: crate::Endpoint
    -89    pub const PROVENANCE: &'static str = "static_discovery";
    -90
    -91    /// Creates a new static discovery instance.
    -92    pub fn new() -> Self {
    -93        Self::default()
    -94    }
    -95
    -96    /// Creates a static discovery instance from node addresses.
    -97    ///
    -98    /// # Examples
    +85    /// [`Endpoint`]: crate::Endpoint
    +86    pub const PROVENANCE: &'static str = "static_discovery";
    +87
    +88    /// Creates a new static discovery instance.
    +89    pub fn new() -> Self {
    +90        Self::default()
    +91    }
    +92
    +93    /// Creates a static discovery instance from node addresses.
    +94    ///
    +95    /// # Examples
    +96    ///
    +97    /// ```rust
    +98    /// use std::{net::SocketAddr, str::FromStr};
     99    ///
    -100    /// ```rust
    -101    /// use std::{net::SocketAddr, str::FromStr};
    -102    ///
    -103    /// use iroh::{discovery::static_provider::StaticProvider, Endpoint, NodeAddr};
    -104    ///
    -105    /// # fn get_addrs() -> Vec<NodeAddr> {
    -106    /// #     Vec::new()
    -107    /// # }
    -108    /// # #[tokio::main]
    -109    /// # async fn main() -> n0_snafu::Result<()> {
    -110    /// // get addrs from somewhere
    -111    /// let addrs = get_addrs();
    -112    ///
    -113    /// // create a StaticProvider from the list of addrs.
    -114    /// let discovery = StaticProvider::from_node_info(addrs);
    -115    /// // create an endpoint with the discovery
    -116    /// let endpoint = Endpoint::builder().add_discovery(discovery).bind().await?;
    -117    /// # Ok(())
    -118    /// # }
    -119    /// ```
    -120    pub fn from_node_info(infos: impl IntoIterator<Item = impl Into<NodeInfo>>) -> Self {
    -121        let res = Self::default();
    -122        for info in infos {
    -123            res.add_node_info(info);
    -124        }
    -125        res
    -126    }
    -127
    -128    /// Sets node addressing information for the given node ID.
    -129    ///
    -130    /// This will completely overwrite any existing info for the node.
    -131    ///
    -132    /// Returns the [`NodeData`] of the previous entry, or `None` if there was no previous
    -133    /// entry for this node ID.
    -134    pub fn set_node_info(&self, node_info: impl Into<NodeInfo>) -> Option<NodeData> {
    -135        let last_updated = SystemTime::now();
    -136        let NodeInfo { node_id, data } = node_info.into();
    -137        let mut guard = self.nodes.write().expect("poisoned");
    -138        let previous = guard.insert(node_id, StoredNodeInfo { data, last_updated });
    -139        previous.map(|x| x.data)
    -140    }
    -141
    -142    /// Augments node addressing information for the given node ID.
    -143    ///
    -144    /// The provided addressing information is combined with the existing info in the static
    -145    /// provider.  Any new direct addresses are added to those already present while the
    -146    /// relay URL is overwritten.
    -147    pub fn add_node_info(&self, node_info: impl Into<NodeInfo>) {
    -148        let last_updated = SystemTime::now();
    -149        let NodeInfo { node_id, data } = node_info.into();
    -150        let mut guard = self.nodes.write().expect("poisoned");
    -151        match guard.entry(node_id) {
    -152            Entry::Occupied(mut entry) => {
    -153                let existing = entry.get_mut();
    -154                existing
    -155                    .data
    -156                    .add_direct_addresses(data.direct_addresses().iter().copied());
    -157                existing.data.set_relay_url(data.relay_url().cloned());
    -158                existing.data.set_user_data(data.user_data().cloned());
    -159                existing.last_updated = last_updated;
    +100    /// use iroh::{Endpoint, NodeAddr, discovery::static_provider::StaticProvider};
    +101    ///
    +102    /// # fn get_addrs() -> Vec<NodeAddr> {
    +103    /// #     Vec::new()
    +104    /// # }
    +105    /// # #[tokio::main]
    +106    /// # async fn main() -> n0_snafu::Result<()> {
    +107    /// // get addrs from somewhere
    +108    /// let addrs = get_addrs();
    +109    ///
    +110    /// // create a StaticProvider from the list of addrs.
    +111    /// let discovery = StaticProvider::from_node_info(addrs);
    +112    /// // create an endpoint with the discovery
    +113    /// let endpoint = Endpoint::builder().add_discovery(discovery).bind().await?;
    +114    /// # Ok(())
    +115    /// # }
    +116    /// ```
    +117    pub fn from_node_info(infos: impl IntoIterator<Item = impl Into<NodeInfo>>) -> Self {
    +118        let res = Self::default();
    +119        for info in infos {
    +120            res.add_node_info(info);
    +121        }
    +122        res
    +123    }
    +124
    +125    /// Sets node addressing information for the given node ID.
    +126    ///
    +127    /// This will completely overwrite any existing info for the node.
    +128    ///
    +129    /// Returns the [`NodeData`] of the previous entry, or `None` if there was no previous
    +130    /// entry for this node ID.
    +131    pub fn set_node_info(&self, node_info: impl Into<NodeInfo>) -> Option<NodeData> {
    +132        let last_updated = SystemTime::now();
    +133        let NodeInfo { node_id, data } = node_info.into();
    +134        let mut guard = self.nodes.write().expect("poisoned");
    +135        let previous = guard.insert(node_id, StoredNodeInfo { data, last_updated });
    +136        previous.map(|x| x.data)
    +137    }
    +138
    +139    /// Augments node addressing information for the given node ID.
    +140    ///
    +141    /// The provided addressing information is combined with the existing info in the static
    +142    /// provider.  Any new direct addresses are added to those already present while the
    +143    /// relay URL is overwritten.
    +144    pub fn add_node_info(&self, node_info: impl Into<NodeInfo>) {
    +145        let last_updated = SystemTime::now();
    +146        let NodeInfo { node_id, data } = node_info.into();
    +147        let mut guard = self.nodes.write().expect("poisoned");
    +148        match guard.entry(node_id) {
    +149            Entry::Occupied(mut entry) => {
    +150                let existing = entry.get_mut();
    +151                existing
    +152                    .data
    +153                    .add_direct_addresses(data.direct_addresses().iter().copied());
    +154                existing.data.set_relay_url(data.relay_url().cloned());
    +155                existing.data.set_user_data(data.user_data().cloned());
    +156                existing.last_updated = last_updated;
    +157            }
    +158            Entry::Vacant(entry) => {
    +159                entry.insert(StoredNodeInfo { data, last_updated });
     160            }
    -161            Entry::Vacant(entry) => {
    -162                entry.insert(StoredNodeInfo { data, last_updated });
    -163            }
    -164        }
    -165    }
    -166
    -167    /// Returns node addressing information for the given node ID.
    -168    pub fn get_node_info(&self, node_id: NodeId) -> Option<NodeInfo> {
    -169        let guard = self.nodes.read().expect("poisoned");
    -170        let info = guard.get(&node_id)?;
    -171        Some(NodeInfo::from_parts(node_id, info.data.clone()))
    -172    }
    -173
    -174    /// Removes all node addressing information for the given node ID.
    -175    ///
    -176    /// Any removed information is returned.
    -177    pub fn remove_node_info(&self, node_id: NodeId) -> Option<NodeInfo> {
    -178        let mut guard = self.nodes.write().expect("poisoned");
    -179        let info = guard.remove(&node_id)?;
    -180        Some(NodeInfo::from_parts(node_id, info.data))
    -181    }
    -182}
    +161        }
    +162    }
    +163
    +164    /// Returns node addressing information for the given node ID.
    +165    pub fn get_node_info(&self, node_id: NodeId) -> Option<NodeInfo> {
    +166        let guard = self.nodes.read().expect("poisoned");
    +167        let info = guard.get(&node_id)?;
    +168        Some(NodeInfo::from_parts(node_id, info.data.clone()))
    +169    }
    +170
    +171    /// Removes all node addressing information for the given node ID.
    +172    ///
    +173    /// Any removed information is returned.
    +174    pub fn remove_node_info(&self, node_id: NodeId) -> Option<NodeInfo> {
    +175        let mut guard = self.nodes.write().expect("poisoned");
    +176        let info = guard.remove(&node_id)?;
    +177        Some(NodeInfo::from_parts(node_id, info.data))
    +178    }
    +179}
    +180
    +181impl Discovery for StaticProvider {
    +182    fn publish(&self, _data: &NodeData) {}
     183
    -184impl Discovery for StaticProvider {
    -185    fn publish(&self, _data: &NodeData) {}
    -186
    -187    fn resolve(
    -188        &self,
    -189        node_id: NodeId,
    -190    ) -> Option<BoxStream<Result<super::DiscoveryItem, DiscoveryError>>> {
    -191        let guard = self.nodes.read().expect("poisoned");
    -192        let info = guard.get(&node_id);
    -193        match info {
    -194            Some(node_info) => {
    -195                let last_updated = node_info
    -196                    .last_updated
    -197                    .duration_since(SystemTime::UNIX_EPOCH)
    -198                    .expect("time drift")
    -199                    .as_micros() as u64;
    -200                let item = DiscoveryItem::new(
    -201                    NodeInfo::from_parts(node_id, node_info.data.clone()),
    -202                    Self::PROVENANCE,
    -203                    Some(last_updated),
    -204                );
    -205                Some(stream::iter(Some(Ok(item))).boxed())
    -206            }
    -207            None => None,
    -208        }
    -209    }
    -210}
    -211
    -212#[cfg(test)]
    -213mod tests {
    -214    use iroh_base::{NodeAddr, SecretKey};
    -215    use n0_snafu::{Result, ResultExt};
    +184    fn resolve(
    +185        &self,
    +186        node_id: NodeId,
    +187    ) -> Option<BoxStream<Result<super::DiscoveryItem, DiscoveryError>>> {
    +188        let guard = self.nodes.read().expect("poisoned");
    +189        let info = guard.get(&node_id);
    +190        match info {
    +191            Some(node_info) => {
    +192                let last_updated = node_info
    +193                    .last_updated
    +194                    .duration_since(SystemTime::UNIX_EPOCH)
    +195                    .expect("time drift")
    +196                    .as_micros() as u64;
    +197                let item = DiscoveryItem::new(
    +198                    NodeInfo::from_parts(node_id, node_info.data.clone()),
    +199                    Self::PROVENANCE,
    +200                    Some(last_updated),
    +201                );
    +202                Some(stream::iter(Some(Ok(item))).boxed())
    +203            }
    +204            None => None,
    +205        }
    +206    }
    +207}
    +208
    +209#[cfg(test)]
    +210mod tests {
    +211    use iroh_base::{NodeAddr, SecretKey};
    +212    use n0_snafu::{Result, ResultExt};
    +213
    +214    use super::*;
    +215    use crate::Endpoint;
     216
    -217    use super::*;
    -218    use crate::Endpoint;
    -219
    -220    #[tokio::test]
    -221    async fn test_basic() -> Result {
    -222        let discovery = StaticProvider::new();
    -223
    -224        let _ep = Endpoint::builder()
    -225            .add_discovery(discovery.clone())
    -226            .bind()
    -227            .await?;
    -228
    -229        let key = SecretKey::from_bytes(&[0u8; 32]);
    -230        let addr = NodeAddr {
    -231            node_id: key.public(),
    -232            relay_url: Some("https://example.com".parse()?),
    -233            direct_addresses: Default::default(),
    -234        };
    -235        let user_data = Some("foobar".parse().unwrap());
    -236        let node_info = NodeInfo::from(addr.clone()).with_user_data(user_data.clone());
    -237        discovery.add_node_info(node_info.clone());
    -238
    -239        let back = discovery.get_node_info(key.public()).context("no addr")?;
    -240
    -241        assert_eq!(back, node_info);
    -242        assert_eq!(back.user_data(), user_data.as_ref());
    -243        assert_eq!(back.into_node_addr(), addr);
    -244
    -245        let removed = discovery
    -246            .remove_node_info(key.public())
    -247            .context("nothing removed")?;
    -248        assert_eq!(removed, node_info);
    -249        let res = discovery.get_node_info(key.public());
    -250        assert!(res.is_none());
    -251
    -252        Ok(())
    -253    }
    -254}
    \ No newline at end of file +217 #[tokio::test] +218 async fn test_basic() -> Result { +219 let discovery = StaticProvider::new(); +220 +221 let _ep = Endpoint::builder() +222 .add_discovery(discovery.clone()) +223 .bind() +224 .await?; +225 +226 let key = SecretKey::from_bytes(&[0u8; 32]); +227 let addr = NodeAddr { +228 node_id: key.public(), +229 relay_url: Some("https://example.com".parse()?), +230 direct_addresses: Default::default(), +231 }; +232 let user_data = Some("foobar".parse().unwrap()); +233 let node_info = NodeInfo::from(addr.clone()).with_user_data(user_data.clone()); +234 discovery.add_node_info(node_info.clone()); +235 +236 let back = discovery.get_node_info(key.public()).context("no addr")?; +237 +238 assert_eq!(back, node_info); +239 assert_eq!(back.user_data(), user_data.as_ref()); +240 assert_eq!(back.into_node_addr(), addr); +241 +242 let removed = discovery +243 .remove_node_info(key.public()) +244 .context("nothing removed")?; +245 assert_eq!(removed, node_info); +246 let res = discovery.get_node_info(key.public()); +247 assert!(res.is_none()); +248 +249 Ok(()) +250 } +251}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/dns.rs.html b/pr/3367/docs/src/iroh/dns.rs.html index c12bf8438a..0d6793b56d 100644 --- a/pr/3367/docs/src/iroh/dns.rs.html +++ b/pr/3367/docs/src/iroh/dns.rs.html @@ -1,4 +1,4 @@ -dns.rs - source

    iroh/
    dns.rs

    1//! This module exports a DNS resolver, which is also the default resolver used in the
    +dns.rs - source

    iroh/
    dns.rs

    1//! This module exports a DNS resolver, which is also the default resolver used in the
     2//! [`crate::Endpoint`] if no custom resolver is configured.
     3//!
     4//! The resolver provides methods to resolve domain names to ipv4 and ipv6 addresses,
    diff --git a/pr/3367/docs/src/iroh/endpoint.rs.html b/pr/3367/docs/src/iroh/endpoint.rs.html
    index d13f8e4fc3..764250ea7b 100644
    --- a/pr/3367/docs/src/iroh/endpoint.rs.html
    +++ b/pr/3367/docs/src/iroh/endpoint.rs.html
    @@ -1,4 +1,4 @@
    -endpoint.rs - source

    iroh/
    endpoint.rs

    1//! The [`Endpoint`] allows establishing connections to other iroh nodes.
    +endpoint.rs - source

    iroh/
    endpoint.rs

    1//! The [`Endpoint`] allows establishing connections to other iroh nodes.
     2//!
     3//! The [`Endpoint`] is the main API interface to manage a local iroh node.  It allows
     4//! connecting to and accepting connections from other nodes.  See the [module docs] for
    @@ -13,3207 +13,3164 @@
     13
     14use std::{
     15    any::Any,
    -16    collections::BTreeSet,
    -17    future::{Future, IntoFuture},
    -18    net::{IpAddr, SocketAddr, SocketAddrV4, SocketAddrV6},
    -19    pin::Pin,
    -20    sync::Arc,
    -21    task::Poll,
    -22};
    -23
    -24use ed25519_dalek::{pkcs8::DecodePublicKey, VerifyingKey};
    -25use iroh_base::{NodeAddr, NodeId, RelayUrl, SecretKey};
    -26use iroh_relay::RelayMap;
    -27use n0_future::{time::Duration, Stream};
    -28use n0_watcher::Watcher;
    -29use nested_enum_utils::common_fields;
    -30use pin_project::pin_project;
    -31use snafu::{ensure, ResultExt, Snafu};
    -32use tracing::{debug, instrument, trace, warn};
    -33use url::Url;
    -34
    -35#[cfg(wasm_browser)]
    -36use crate::discovery::pkarr::PkarrResolver;
    -37#[cfg(not(wasm_browser))]
    -38use crate::{discovery::dns::DnsDiscovery, dns::DnsResolver};
    -39use crate::{
    -40    discovery::{
    -41        pkarr::PkarrPublisher, ConcurrentDiscovery, Discovery, DiscoveryContext, DiscoveryError,
    -42        DiscoveryItem, DiscoverySubscribers, DiscoveryTask, DynIntoDiscovery, IntoDiscovery,
    -43        IntoDiscoveryError, Lagged, UserData,
    -44    },
    -45    magicsock::{self, Handle, NodeIdMappedAddr, OwnAddressSnafu},
    -46    metrics::EndpointMetrics,
    -47    net_report::Report,
    -48    tls, RelayProtocol,
    -49};
    +16    future::{Future, IntoFuture},
    +17    net::{IpAddr, SocketAddr, SocketAddrV4, SocketAddrV6},
    +18    pin::Pin,
    +19    sync::Arc,
    +20    task::Poll,
    +21};
    +22
    +23use ed25519_dalek::{VerifyingKey, pkcs8::DecodePublicKey};
    +24use iroh_base::{NodeAddr, NodeId, SecretKey};
    +25use iroh_relay::RelayMap;
    +26use n0_future::time::Duration;
    +27use n0_watcher::Watcher;
    +28use nested_enum_utils::common_fields;
    +29use pin_project::pin_project;
    +30use snafu::{ResultExt, Snafu, ensure};
    +31use tracing::{debug, instrument, trace, warn};
    +32use url::Url;
    +33
    +34#[cfg(wasm_browser)]
    +35use crate::discovery::pkarr::PkarrResolver;
    +36#[cfg(not(wasm_browser))]
    +37use crate::{discovery::dns::DnsDiscovery, dns::DnsResolver};
    +38use crate::{
    +39    discovery::{
    +40        ConcurrentDiscovery, DiscoveryError, DiscoveryTask, DynIntoDiscovery, IntoDiscovery,
    +41        UserData, pkarr::PkarrPublisher,
    +42    },
    +43    magicsock::{self, Handle, NodeIdMappedAddr, OwnAddressSnafu},
    +44    metrics::EndpointMetrics,
    +45    net_report::Report,
    +46    tls::{self, DEFAULT_MAX_TLS_TICKETS},
    +47};
    +48
    +49mod rtt_actor;
     50
    -51mod rtt_actor;
    -52
    -53// Missing still: SendDatagram and ConnectionClose::frame_type's Type.
    -54pub use quinn::{
    -55    AcceptBi, AcceptUni, AckFrequencyConfig, ApplicationClose, Chunk, ClosedStream,
    -56    ConnectionClose, ConnectionError, ConnectionStats, MtuDiscoveryConfig, OpenBi, OpenUni,
    -57    ReadDatagram, ReadError, ReadExactError, ReadToEndError, RecvStream, ResetError, RetryError,
    -58    SendDatagramError, SendStream, ServerConfig, StoppedError, StreamId, TransportConfig, VarInt,
    -59    WeakConnectionHandle, WriteError,
    -60};
    -61pub use quinn_proto::{
    -62    congestion::{Controller, ControllerFactory},
    -63    crypto::{
    -64        AeadKey, CryptoError, ExportKeyingMaterialError, HandshakeTokenKey,
    -65        ServerConfig as CryptoServerConfig, UnsupportedVersion,
    -66    },
    -67    FrameStats, PathStats, TransportError, TransportErrorCode, UdpStats, Written,
    -68};
    -69
    -70use self::rtt_actor::RttMessage;
    -71pub use super::magicsock::{
    -72    AddNodeAddrError, ConnectionType, ControlMsg, DirectAddr, DirectAddrInfo, DirectAddrType,
    -73    RemoteInfo, Source,
    -74};
    -75
    -76/// The delay to fall back to discovery when direct addresses fail.
    -77///
    -78/// When a connection is attempted with a [`NodeAddr`] containing direct addresses the
    -79/// [`Endpoint`] assumes one of those addresses probably works.  If after this delay there
    -80/// is still no connection the configured [`Discovery`] will be used however.
    -81const DISCOVERY_WAIT_PERIOD: Duration = Duration::from_millis(500);
    -82
    -83/// Defines the mode of path selection for all traffic flowing through
    -84/// the endpoint.
    -85#[cfg(any(test, feature = "test-utils"))]
    -86#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
    -87pub enum PathSelection {
    -88    /// Uses all available paths
    -89    #[default]
    -90    All,
    -91    /// Forces all traffic to go exclusively through relays
    -92    RelayOnly,
    -93}
    -94
    -95/// Builder for [`Endpoint`].
    -96///
    -97/// By default the endpoint will generate a new random [`SecretKey`], which will result in a
    -98/// new [`NodeId`].
    -99///
    -100/// To create the [`Endpoint`] call [`Builder::bind`].
    -101#[derive(Debug)]
    -102pub struct Builder {
    -103    secret_key: Option<SecretKey>,
    -104    relay_mode: RelayMode,
    -105    relay_protocol: iroh_relay::http::Protocol,
    -106    alpn_protocols: Vec<Vec<u8>>,
    -107    transport_config: quinn::TransportConfig,
    -108    keylog: bool,
    -109    discovery: Vec<Box<dyn DynIntoDiscovery>>,
    -110    discovery_user_data: Option<UserData>,
    -111    proxy_url: Option<Url>,
    -112    /// List of known nodes. See [`Builder::known_nodes`].
    -113    node_map: Option<Vec<NodeAddr>>,
    -114    #[cfg(not(wasm_browser))]
    -115    dns_resolver: Option<DnsResolver>,
    -116    #[cfg(any(test, feature = "test-utils"))]
    -117    insecure_skip_relay_cert_verify: bool,
    -118    addr_v4: Option<SocketAddrV4>,
    -119    addr_v6: Option<SocketAddrV6>,
    -120    #[cfg(any(test, feature = "test-utils"))]
    -121    path_selection: PathSelection,
    -122}
    -123
    -124impl Default for Builder {
    -125    fn default() -> Self {
    -126        let mut transport_config = quinn::TransportConfig::default();
    -127        transport_config.keep_alive_interval(Some(Duration::from_secs(1)));
    -128        Self {
    -129            secret_key: Default::default(),
    -130            relay_mode: default_relay_mode(),
    -131            relay_protocol: iroh_relay::http::Protocol::default(),
    -132            alpn_protocols: Default::default(),
    -133            transport_config,
    -134            keylog: Default::default(),
    -135            discovery: Default::default(),
    -136            discovery_user_data: Default::default(),
    -137            proxy_url: None,
    -138            node_map: None,
    -139            #[cfg(not(wasm_browser))]
    -140            dns_resolver: None,
    -141            #[cfg(any(test, feature = "test-utils"))]
    -142            insecure_skip_relay_cert_verify: false,
    -143            addr_v4: None,
    -144            addr_v6: None,
    -145            #[cfg(any(test, feature = "test-utils"))]
    -146            path_selection: PathSelection::default(),
    -147        }
    -148    }
    -149}
    -150
    -151impl Builder {
    -152    // The ordering of public methods is reflected directly in the documentation.  This is
    -153    // roughly ordered by what is most commonly needed by users.
    -154
    -155    // # The final constructor that everyone needs.
    -156
    -157    /// Binds the magic endpoint.
    -158    pub async fn bind(self) -> Result<Endpoint, BindError> {
    -159        let relay_map = self.relay_mode.relay_map();
    -160        let secret_key = self
    -161            .secret_key
    -162            .unwrap_or_else(|| SecretKey::generate(rand::rngs::OsRng));
    -163        let static_config = StaticConfig {
    -164            transport_config: Arc::new(self.transport_config),
    -165            tls_config: tls::TlsConfig::new(secret_key.clone()),
    -166            keylog: self.keylog,
    -167        };
    -168        let server_config = static_config.create_server_config(self.alpn_protocols);
    -169
    -170        #[cfg(not(wasm_browser))]
    -171        let dns_resolver = self.dns_resolver.unwrap_or_default();
    -172
    -173        let discovery: Option<Box<dyn Discovery>> = {
    -174            let context = DiscoveryContext {
    -175                secret_key: &secret_key,
    -176                #[cfg(not(wasm_browser))]
    -177                dns_resolver: &dns_resolver,
    -178            };
    -179            let discovery = self
    -180                .discovery
    -181                .into_iter()
    -182                .map(|builder| builder.into_discovery(&context))
    -183                .collect::<Result<Vec<_>, IntoDiscoveryError>>()?;
    -184            match discovery.len() {
    -185                0 => None,
    -186                1 => Some(discovery.into_iter().next().expect("checked length")),
    -187                _ => Some(Box::new(ConcurrentDiscovery::from_services(discovery))),
    -188            }
    -189        };
    -190
    -191        let metrics = EndpointMetrics::default();
    -192
    -193        let msock_opts = magicsock::Options {
    -194            addr_v4: self.addr_v4,
    -195            addr_v6: self.addr_v6,
    -196            secret_key,
    -197            relay_map,
    -198            relay_protocol: self.relay_protocol,
    -199            node_map: self.node_map,
    -200            discovery,
    -201            discovery_user_data: self.discovery_user_data,
    -202            proxy_url: self.proxy_url,
    -203            #[cfg(not(wasm_browser))]
    -204            dns_resolver,
    -205            server_config,
    -206            #[cfg(any(test, feature = "test-utils"))]
    -207            insecure_skip_relay_cert_verify: self.insecure_skip_relay_cert_verify,
    -208            #[cfg(any(test, feature = "test-utils"))]
    -209            path_selection: self.path_selection,
    -210            metrics,
    -211        };
    -212
    -213        Endpoint::bind(static_config, msock_opts).await
    +51// Missing still: SendDatagram and ConnectionClose::frame_type's Type.
    +52pub use quinn::{
    +53    AcceptBi, AcceptUni, AckFrequencyConfig, ApplicationClose, Chunk, ClosedStream,
    +54    ConnectionClose, ConnectionError, ConnectionStats, MtuDiscoveryConfig, OpenBi, OpenUni,
    +55    ReadDatagram, ReadError, ReadExactError, ReadToEndError, RecvStream, ResetError, RetryError,
    +56    SendDatagramError, SendStream, ServerConfig, StoppedError, StreamId, TransportConfig, VarInt,
    +57    WeakConnectionHandle, WriteError,
    +58};
    +59pub use quinn_proto::{
    +60    FrameStats, PathStats, TransportError, TransportErrorCode, UdpStats, Written,
    +61    congestion::{Controller, ControllerFactory},
    +62    crypto::{
    +63        AeadKey, CryptoError, ExportKeyingMaterialError, HandshakeTokenKey,
    +64        ServerConfig as CryptoServerConfig, UnsupportedVersion,
    +65    },
    +66};
    +67
    +68use self::rtt_actor::RttMessage;
    +69pub use super::magicsock::{
    +70    AddNodeAddrError, ConnectionType, ControlMsg, DirectAddr, DirectAddrInfo, DirectAddrType,
    +71    Source,
    +72};
    +73
    +74/// The delay to fall back to discovery when direct addresses fail.
    +75///
    +76/// When a connection is attempted with a [`NodeAddr`] containing direct addresses the
    +77/// [`Endpoint`] assumes one of those addresses probably works.  If after this delay there
    +78/// is still no connection the configured [`crate::discovery::Discovery`] will be used however.
    +79const DISCOVERY_WAIT_PERIOD: Duration = Duration::from_millis(500);
    +80
    +81/// Defines the mode of path selection for all traffic flowing through
    +82/// the endpoint.
    +83#[cfg(any(test, feature = "test-utils"))]
    +84#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
    +85pub enum PathSelection {
    +86    /// Uses all available paths
    +87    #[default]
    +88    All,
    +89    /// Forces all traffic to go exclusively through relays
    +90    RelayOnly,
    +91}
    +92
    +93/// Builder for [`Endpoint`].
    +94///
    +95/// By default the endpoint will generate a new random [`SecretKey`], which will result in a
    +96/// new [`NodeId`].
    +97///
    +98/// To create the [`Endpoint`] call [`Builder::bind`].
    +99#[derive(Debug)]
    +100pub struct Builder {
    +101    secret_key: Option<SecretKey>,
    +102    relay_mode: RelayMode,
    +103    alpn_protocols: Vec<Vec<u8>>,
    +104    transport_config: quinn::TransportConfig,
    +105    keylog: bool,
    +106    discovery: Vec<Box<dyn DynIntoDiscovery>>,
    +107    discovery_user_data: Option<UserData>,
    +108    proxy_url: Option<Url>,
    +109    #[cfg(not(wasm_browser))]
    +110    dns_resolver: Option<DnsResolver>,
    +111    #[cfg(any(test, feature = "test-utils"))]
    +112    insecure_skip_relay_cert_verify: bool,
    +113    addr_v4: Option<SocketAddrV4>,
    +114    addr_v6: Option<SocketAddrV6>,
    +115    #[cfg(any(test, feature = "test-utils"))]
    +116    path_selection: PathSelection,
    +117    max_tls_tickets: usize,
    +118}
    +119
    +120impl Default for Builder {
    +121    fn default() -> Self {
    +122        let mut transport_config = quinn::TransportConfig::default();
    +123        transport_config.keep_alive_interval(Some(Duration::from_secs(1)));
    +124        Self {
    +125            secret_key: Default::default(),
    +126            relay_mode: default_relay_mode(),
    +127            alpn_protocols: Default::default(),
    +128            transport_config,
    +129            keylog: Default::default(),
    +130            discovery: Default::default(),
    +131            discovery_user_data: Default::default(),
    +132            proxy_url: None,
    +133            #[cfg(not(wasm_browser))]
    +134            dns_resolver: None,
    +135            #[cfg(any(test, feature = "test-utils"))]
    +136            insecure_skip_relay_cert_verify: false,
    +137            addr_v4: None,
    +138            addr_v6: None,
    +139            #[cfg(any(test, feature = "test-utils"))]
    +140            path_selection: PathSelection::default(),
    +141            max_tls_tickets: DEFAULT_MAX_TLS_TICKETS,
    +142        }
    +143    }
    +144}
    +145
    +146impl Builder {
    +147    // The ordering of public methods is reflected directly in the documentation.  This is
    +148    // roughly ordered by what is most commonly needed by users.
    +149
    +150    // # The final constructor that everyone needs.
    +151
    +152    /// Binds the magic endpoint.
    +153    pub async fn bind(self) -> Result<Endpoint, BindError> {
    +154        let mut rng = rand::rng();
    +155        let relay_map = self.relay_mode.relay_map();
    +156        let secret_key = self
    +157            .secret_key
    +158            .unwrap_or_else(move || SecretKey::generate(&mut rng));
    +159        let static_config = StaticConfig {
    +160            transport_config: Arc::new(self.transport_config),
    +161            tls_config: tls::TlsConfig::new(secret_key.clone(), self.max_tls_tickets),
    +162            keylog: self.keylog,
    +163        };
    +164        let server_config = static_config.create_server_config(self.alpn_protocols);
    +165
    +166        #[cfg(not(wasm_browser))]
    +167        let dns_resolver = self.dns_resolver.unwrap_or_default();
    +168
    +169        let metrics = EndpointMetrics::default();
    +170
    +171        let msock_opts = magicsock::Options {
    +172            addr_v4: self.addr_v4,
    +173            addr_v6: self.addr_v6,
    +174            secret_key,
    +175            relay_map,
    +176            discovery: self.discovery,
    +177            discovery_user_data: self.discovery_user_data,
    +178            proxy_url: self.proxy_url,
    +179            #[cfg(not(wasm_browser))]
    +180            dns_resolver,
    +181            server_config,
    +182            #[cfg(any(test, feature = "test-utils"))]
    +183            insecure_skip_relay_cert_verify: self.insecure_skip_relay_cert_verify,
    +184            #[cfg(any(test, feature = "test-utils"))]
    +185            path_selection: self.path_selection,
    +186            metrics,
    +187        };
    +188
    +189        Endpoint::bind(static_config, msock_opts).await
    +190    }
    +191
    +192    // # The very common methods everyone basically needs.
    +193
    +194    /// Sets the IPv4 bind address.
    +195    ///
    +196    /// Setting the port to `0` will use a random port.
    +197    /// If the port specified is already in use, it will fallback to choosing a random port.
    +198    ///
    +199    /// By default will use `0.0.0.0:0` to bind to.
    +200    pub fn bind_addr_v4(mut self, addr: SocketAddrV4) -> Self {
    +201        self.addr_v4.replace(addr);
    +202        self
    +203    }
    +204
    +205    /// Sets the IPv6 bind address.
    +206    ///
    +207    /// Setting the port to `0` will use a random port.
    +208    /// If the port specified is already in use, it will fallback to choosing a random port.
    +209    ///
    +210    /// By default will use `[::]:0` to bind to.
    +211    pub fn bind_addr_v6(mut self, addr: SocketAddrV6) -> Self {
    +212        self.addr_v6.replace(addr);
    +213        self
     214    }
     215
    -216    // # The very common methods everyone basically needs.
    -217
    -218    /// Sets the IPv4 bind address.
    -219    ///
    -220    /// Setting the port to `0` will use a random port.
    -221    /// If the port specified is already in use, it will fallback to choosing a random port.
    +216    /// Sets a secret key to authenticate with other peers.
    +217    ///
    +218    /// This secret key's public key will be the [`PublicKey`] of this endpoint and thus
    +219    /// also its [`NodeId`]
    +220    ///
    +221    /// If not set, a new secret key will be generated.
     222    ///
    -223    /// By default will use `0.0.0.0:0` to bind to.
    -224    pub fn bind_addr_v4(mut self, addr: SocketAddrV4) -> Self {
    -225        self.addr_v4.replace(addr);
    +223    /// [`PublicKey`]: iroh_base::PublicKey
    +224    pub fn secret_key(mut self, secret_key: SecretKey) -> Self {
    +225        self.secret_key = Some(secret_key);
     226        self
     227    }
     228
    -229    /// Sets the IPv6 bind address.
    +229    /// Sets the [ALPN] protocols that this endpoint will accept on incoming connections.
     230    ///
    -231    /// Setting the port to `0` will use a random port.
    -232    /// If the port specified is already in use, it will fallback to choosing a random port.
    +231    /// Not setting this will still allow creating connections, but to accept incoming
    +232    /// connections at least one [ALPN] must be set.
     233    ///
    -234    /// By default will use `[::]:0` to bind to.
    -235    pub fn bind_addr_v6(mut self, addr: SocketAddrV6) -> Self {
    -236        self.addr_v6.replace(addr);
    +234    /// [ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
    +235    pub fn alpns(mut self, alpn_protocols: Vec<Vec<u8>>) -> Self {
    +236        self.alpn_protocols = alpn_protocols;
     237        self
     238    }
     239
    -240    /// Sets a secret key to authenticate with other peers.
    -241    ///
    -242    /// This secret key's public key will be the [`PublicKey`] of this endpoint and thus
    -243    /// also its [`NodeId`]
    -244    ///
    -245    /// If not set, a new secret key will be generated.
    -246    ///
    -247    /// [`PublicKey`]: iroh_base::PublicKey
    -248    pub fn secret_key(mut self, secret_key: SecretKey) -> Self {
    -249        self.secret_key = Some(secret_key);
    -250        self
    -251    }
    -252
    -253    /// Sets the [ALPN] protocols that this endpoint will accept on incoming connections.
    -254    ///
    -255    /// Not setting this will still allow creating connections, but to accept incoming
    -256    /// connections at least one [ALPN] must be set.
    -257    ///
    -258    /// [ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
    -259    pub fn alpns(mut self, alpn_protocols: Vec<Vec<u8>>) -> Self {
    -260        self.alpn_protocols = alpn_protocols;
    -261        self
    -262    }
    -263
    -264    // # Methods for common customisation items.
    -265
    -266    /// Sets the relay servers to assist in establishing connectivity.
    -267    ///
    -268    /// Relay servers are used to establish initial connection with another iroh node.
    -269    /// They also perform various functions related to hole punching, see the [crate docs]
    -270    /// for more details.
    -271    ///
    -272    /// By default the [number 0] relay servers are used, see [`RelayMode::Default`].
    +240    // # Methods for common customisation items.
    +241
    +242    /// Sets the relay servers to assist in establishing connectivity.
    +243    ///
    +244    /// Relay servers are used to establish initial connection with another iroh node.
    +245    /// They also perform various functions related to hole punching, see the [crate docs]
    +246    /// for more details.
    +247    ///
    +248    /// By default the [number 0] relay servers are used, see [`RelayMode::Default`].
    +249    ///
    +250    /// When using [RelayMode::Custom], the provided `relay_map` must contain at least one
    +251    /// configured relay node.  If an invalid RelayMap is provided [`bind`]
    +252    /// will result in an error.
    +253    ///
    +254    /// [`bind`]: Builder::bind
    +255    /// [crate docs]: crate
    +256    /// [number 0]: https://n0.computer
    +257    pub fn relay_mode(mut self, relay_mode: RelayMode) -> Self {
    +258        self.relay_mode = relay_mode;
    +259        self
    +260    }
    +261
    +262    /// Removes all discovery services from the builder.
    +263    pub fn clear_discovery(mut self) -> Self {
    +264        self.discovery.clear();
    +265        self
    +266    }
    +267
    +268    /// Optionally sets a discovery mechanism for this endpoint.
    +269    ///
    +270    /// If you want to combine multiple discovery services, you can use
    +271    /// [`Builder::add_discovery`] instead. This will internally create a
    +272    /// [`crate::discovery::ConcurrentDiscovery`].
     273    ///
    -274    /// When using [RelayMode::Custom], the provided `relay_map` must contain at least one
    -275    /// configured relay node.  If an invalid RelayMap is provided [`bind`]
    -276    /// will result in an error.
    -277    ///
    -278    /// [`bind`]: Builder::bind
    -279    /// [crate docs]: crate
    -280    /// [number 0]: https://n0.computer
    -281    pub fn relay_mode(mut self, relay_mode: RelayMode) -> Self {
    -282        self.relay_mode = relay_mode;
    -283        self
    -284    }
    -285
    -286    /// Sets the protocol to use for relay connections.
    -287    ///
    -288    /// Options are either [`RelayProtocol::Websocket`] or [`RelayProtocol::Relay`].
    -289    ///
    -290    /// `Websocket` is considered unstable between iroh versions at the moment.
    -291    /// The protocol can change in compatibility-breaking ways before iroh 1.0.
    -292    ///
    -293    /// Default is set to `Relay` at the moment, until we've stabilized the websocket protocol.
    -294    pub fn relay_conn_protocol(mut self, protocol: RelayProtocol) -> Self {
    -295        self.relay_protocol = protocol;
    -296        self
    -297    }
    -298
    -299    /// Removes all discovery services from the builder.
    -300    pub fn clear_discovery(mut self) -> Self {
    -301        self.discovery.clear();
    +274    /// If no discovery service is set, connecting to a node without providing its
    +275    /// direct addresses or relay URLs will fail.
    +276    ///
    +277    /// See the documentation of the [`crate::discovery::Discovery`] trait for details.
    +278    pub fn discovery(mut self, discovery: impl IntoDiscovery) -> Self {
    +279        self.discovery.clear();
    +280        self.discovery.push(Box::new(discovery));
    +281        self
    +282    }
    +283
    +284    /// Adds a discovery mechanism for this endpoint.
    +285    ///
    +286    /// The function `discovery`
    +287    /// will be called on endpoint creation with the configured secret key of
    +288    /// the endpoint. Discovery services that need to publish information need
    +289    /// to use this secret key to sign the information.
    +290    ///
    +291    /// If you add multiple discovery services, they will be combined using a
    +292    /// [`crate::discovery::ConcurrentDiscovery`].
    +293    ///
    +294    /// If no discovery service is set, connecting to a node without providing its
    +295    /// direct addresses or relay URLs will fail.
    +296    ///
    +297    /// To clear all discovery services, use [`Builder::clear_discovery`].
    +298    ///
    +299    /// See the documentation of the [`crate::discovery::Discovery`] trait for details.
    +300    pub fn add_discovery(mut self, discovery: impl IntoDiscovery) -> Self {
    +301        self.discovery.push(Box::new(discovery));
     302        self
     303    }
     304
    -305    /// Optionally sets a discovery mechanism for this endpoint.
    +305    /// Configures the endpoint to use the default n0 DNS discovery service.
     306    ///
    -307    /// If you want to combine multiple discovery services, you can use
    -308    /// [`Builder::add_discovery`] instead. This will internally create a
    -309    /// [`crate::discovery::ConcurrentDiscovery`].
    -310    ///
    -311    /// If no discovery service is set, connecting to a node without providing its
    -312    /// direct addresses or relay URLs will fail.
    +307    /// The default discovery service publishes to and resolves from the
    +308    /// n0.computer dns server `iroh.link`.
    +309    ///
    +310    /// This is equivalent to adding both a [`crate::discovery::pkarr::PkarrPublisher`]
    +311    /// and a [`crate::discovery::dns::DnsDiscovery`], both configured to use the
    +312    /// n0.computer dns server.
     313    ///
    -314    /// See the documentation of the [`Discovery`] trait for details.
    -315    pub fn discovery(mut self, discovery: impl IntoDiscovery) -> Self {
    -316        self.discovery.clear();
    -317        self.discovery.push(Box::new(discovery));
    -318        self
    -319    }
    -320
    -321    /// Adds a discovery mechanism for this endpoint.
    -322    ///
    -323    /// The function `discovery`
    -324    /// will be called on endpoint creation with the configured secret key of
    -325    /// the endpoint. Discovery services that need to publish information need
    -326    /// to use this secret key to sign the information.
    -327    ///
    -328    /// If you add multiple discovery services, they will be combined using a
    -329    /// [`crate::discovery::ConcurrentDiscovery`].
    -330    ///
    -331    /// If no discovery service is set, connecting to a node without providing its
    -332    /// direct addresses or relay URLs will fail.
    -333    ///
    -334    /// To clear all discovery services, use [`Builder::clear_discovery`].
    -335    ///
    -336    /// See the documentation of the [`Discovery`] trait for details.
    -337    pub fn add_discovery(mut self, discovery: impl IntoDiscovery) -> Self {
    -338        self.discovery.push(Box::new(discovery));
    -339        self
    -340    }
    -341
    -342    /// Configures the endpoint to use the default n0 DNS discovery service.
    -343    ///
    -344    /// The default discovery service publishes to and resolves from the
    -345    /// n0.computer dns server `iroh.link`.
    -346    ///
    -347    /// This is equivalent to adding both a [`crate::discovery::pkarr::PkarrPublisher`]
    -348    /// and a [`crate::discovery::dns::DnsDiscovery`], both configured to use the
    -349    /// n0.computer dns server.
    -350    ///
    -351    /// This will by default use [`N0_DNS_PKARR_RELAY_PROD`].
    -352    /// When in tests, or when the `test-utils` feature is enabled, this will use the
    -353    /// [`N0_DNS_PKARR_RELAY_STAGING`].
    -354    ///
    -355    /// [`N0_DNS_PKARR_RELAY_PROD`]: crate::discovery::pkarr::N0_DNS_PKARR_RELAY_PROD
    -356    /// [`N0_DNS_PKARR_RELAY_STAGING`]: crate::discovery::pkarr::N0_DNS_PKARR_RELAY_STAGING
    -357    pub fn discovery_n0(mut self) -> Self {
    -358        self = self.add_discovery(PkarrPublisher::n0_dns());
    -359        // Resolve using HTTPS requests to our DNS server's /pkarr path in browsers
    -360        #[cfg(wasm_browser)]
    -361        {
    -362            self = self.add_discovery(PkarrResolver::n0_dns());
    -363        }
    -364        // Resolve using DNS queries outside browsers.
    -365        #[cfg(not(wasm_browser))]
    -366        {
    -367            self = self.add_discovery(DnsDiscovery::n0_dns());
    -368        }
    +314    /// This will by default use [`N0_DNS_PKARR_RELAY_PROD`].
    +315    /// When in tests, or when the `test-utils` feature is enabled, this will use the
    +316    /// [`N0_DNS_PKARR_RELAY_STAGING`].
    +317    ///
    +318    /// [`N0_DNS_PKARR_RELAY_PROD`]: crate::discovery::pkarr::N0_DNS_PKARR_RELAY_PROD
    +319    /// [`N0_DNS_PKARR_RELAY_STAGING`]: crate::discovery::pkarr::N0_DNS_PKARR_RELAY_STAGING
    +320    pub fn discovery_n0(mut self) -> Self {
    +321        self = self.add_discovery(PkarrPublisher::n0_dns());
    +322        // Resolve using HTTPS requests to our DNS server's /pkarr path in browsers
    +323        #[cfg(wasm_browser)]
    +324        {
    +325            self = self.add_discovery(PkarrResolver::n0_dns());
    +326        }
    +327        // Resolve using DNS queries outside browsers.
    +328        #[cfg(not(wasm_browser))]
    +329        {
    +330            self = self.add_discovery(DnsDiscovery::n0_dns());
    +331        }
    +332        self
    +333    }
    +334
    +335    #[cfg(feature = "discovery-pkarr-dht")]
    +336    /// Configures the endpoint to also use the mainline DHT with default settings.
    +337    ///
    +338    /// This is equivalent to adding a [`crate::discovery::pkarr::dht::DhtDiscovery`]
    +339    /// with default settings. Note that DhtDiscovery has various more advanced
    +340    /// configuration options. If you need any of those, you should manually
    +341    /// create a DhtDiscovery and add it with [`Builder::add_discovery`].
    +342    pub fn discovery_dht(mut self) -> Self {
    +343        self = self.add_discovery(crate::discovery::pkarr::dht::DhtDiscovery::builder());
    +344        self
    +345    }
    +346
    +347    #[cfg(feature = "discovery-local-network")]
    +348    /// Configures the endpoint to also use local network discovery.
    +349    ///
    +350    /// This is equivalent to adding a [`crate::discovery::mdns::MdnsDiscovery`]
    +351    /// with default settings. Note that MdnsDiscovery has various more advanced
    +352    /// configuration options. If you need any of those, you should manually
    +353    /// create a MdnsDiscovery and add it with [`Builder::add_discovery`].
    +354    pub fn discovery_local_network(mut self) -> Self {
    +355        self = self.add_discovery(crate::discovery::mdns::MdnsDiscovery::builder());
    +356        self
    +357    }
    +358
    +359    /// Sets the initial user-defined data to be published in discovery services for this node.
    +360    ///
    +361    /// When using discovery services, this string of [`UserData`] will be published together
    +362    /// with the node's addresses and relay URL. When other nodes discover this node,
    +363    /// they retrieve the [`UserData`] in addition to the addressing info.
    +364    ///
    +365    /// Iroh itself does not interpret the user-defined data in any way, it is purely left
    +366    /// for applications to parse and use.
    +367    pub fn user_data_for_discovery(mut self, user_data: UserData) -> Self {
    +368        self.discovery_user_data = Some(user_data);
     369        self
     370    }
     371
    -372    #[cfg(feature = "discovery-pkarr-dht")]
    -373    /// Configures the endpoint to also use the mainline DHT with default settings.
    -374    ///
    -375    /// This is equivalent to adding a [`crate::discovery::pkarr::dht::DhtDiscovery`]
    -376    /// with default settings. Note that DhtDiscovery has various more advanced
    -377    /// configuration options. If you need any of those, you should manually
    -378    /// create a DhtDiscovery and add it with [`Builder::add_discovery`].
    -379    pub fn discovery_dht(mut self) -> Self {
    -380        self = self.add_discovery(crate::discovery::pkarr::dht::DhtDiscovery::builder());
    -381        self
    -382    }
    -383
    -384    #[cfg(feature = "discovery-local-network")]
    -385    /// Configures the endpoint to also use local network discovery.
    -386    ///
    -387    /// This is equivalent to adding a [`crate::discovery::mdns::MdnsDiscovery`]
    -388    /// with default settings. Note that MdnsDiscovery has various more advanced
    -389    /// configuration options. If you need any of those, you should manually
    -390    /// create a MdnsDiscovery and add it with [`Builder::add_discovery`].
    -391    pub fn discovery_local_network(mut self) -> Self {
    -392        self = self.add_discovery(crate::discovery::mdns::MdnsDiscovery::builder());
    -393        self
    -394    }
    -395
    -396    /// Sets the initial user-defined data to be published in discovery services for this node.
    -397    ///
    -398    /// When using discovery services, this string of [`UserData`] will be published together
    -399    /// with the node's addresses and relay URL. When other nodes discover this node,
    -400    /// they retrieve the [`UserData`] in addition to the addressing info.
    -401    ///
    -402    /// Iroh itself does not interpret the user-defined data in any way, it is purely left
    -403    /// for applications to parse and use.
    -404    pub fn user_data_for_discovery(mut self, user_data: UserData) -> Self {
    -405        self.discovery_user_data = Some(user_data);
    -406        self
    -407    }
    -408
    -409    /// Optionally set a list of known nodes.
    -410    pub fn known_nodes(mut self, nodes: Vec<NodeAddr>) -> Self {
    -411        self.node_map = Some(nodes);
    -412        self
    -413    }
    -414
    -415    // # Methods for more specialist customisation.
    -416
    -417    /// Sets a custom [`quinn::TransportConfig`] for this endpoint.
    -418    ///
    -419    /// The transport config contains parameters governing the QUIC state machine.
    -420    ///
    -421    /// If unset, the default config is used. Default values should be suitable for most
    -422    /// internet applications. Applications protocols which forbid remotely-initiated
    -423    /// streams should set `max_concurrent_bidi_streams` and `max_concurrent_uni_streams` to
    -424    /// zero.
    -425    ///
    -426    /// Please be aware that changing some settings may have adverse effects on establishing
    -427    /// and maintaining direct connections.
    -428    pub fn transport_config(mut self, transport_config: quinn::TransportConfig) -> Self {
    -429        self.transport_config = transport_config;
    -430        self
    -431    }
    -432
    -433    /// Optionally sets a custom DNS resolver to use for this endpoint.
    -434    ///
    -435    /// The DNS resolver is used to resolve relay hostnames, and node addresses if
    -436    /// [`crate::discovery::dns::DnsDiscovery`] is configured.
    -437    ///
    -438    /// By default, a new DNS resolver is created which is configured to use the
    -439    /// host system's DNS configuration. You can pass a custom instance of [`DnsResolver`]
    -440    /// here to use a differently configured DNS resolver for this endpoint, or to share
    -441    /// a [`DnsResolver`] between multiple endpoints.
    -442    #[cfg(not(wasm_browser))]
    -443    pub fn dns_resolver(mut self, dns_resolver: DnsResolver) -> Self {
    -444        self.dns_resolver = Some(dns_resolver);
    -445        self
    -446    }
    -447
    -448    /// Sets an explicit proxy url to proxy all HTTP(S) traffic through.
    -449    pub fn proxy_url(mut self, url: Url) -> Self {
    -450        self.proxy_url.replace(url);
    -451        self
    -452    }
    -453
    -454    /// Sets the proxy url from the environment, in this order:
    +372    // # Methods for more specialist customisation.
    +373
    +374    /// Sets a custom [`quinn::TransportConfig`] for this endpoint.
    +375    ///
    +376    /// The transport config contains parameters governing the QUIC state machine.
    +377    ///
    +378    /// If unset, the default config is used. Default values should be suitable for most
    +379    /// internet applications. Applications protocols which forbid remotely-initiated
    +380    /// streams should set `max_concurrent_bidi_streams` and `max_concurrent_uni_streams` to
    +381    /// zero.
    +382    ///
    +383    /// Please be aware that changing some settings may have adverse effects on establishing
    +384    /// and maintaining direct connections.
    +385    pub fn transport_config(mut self, transport_config: quinn::TransportConfig) -> Self {
    +386        self.transport_config = transport_config;
    +387        self
    +388    }
    +389
    +390    /// Optionally sets a custom DNS resolver to use for this endpoint.
    +391    ///
    +392    /// The DNS resolver is used to resolve relay hostnames, and node addresses if
    +393    /// [`crate::discovery::dns::DnsDiscovery`] is configured.
    +394    ///
    +395    /// By default, a new DNS resolver is created which is configured to use the
    +396    /// host system's DNS configuration. You can pass a custom instance of [`DnsResolver`]
    +397    /// here to use a differently configured DNS resolver for this endpoint, or to share
    +398    /// a [`DnsResolver`] between multiple endpoints.
    +399    #[cfg(not(wasm_browser))]
    +400    pub fn dns_resolver(mut self, dns_resolver: DnsResolver) -> Self {
    +401        self.dns_resolver = Some(dns_resolver);
    +402        self
    +403    }
    +404
    +405    /// Sets an explicit proxy url to proxy all HTTP(S) traffic through.
    +406    pub fn proxy_url(mut self, url: Url) -> Self {
    +407        self.proxy_url.replace(url);
    +408        self
    +409    }
    +410
    +411    /// Sets the proxy url from the environment, in this order:
    +412    ///
    +413    /// - `HTTP_PROXY`
    +414    /// - `http_proxy`
    +415    /// - `HTTPS_PROXY`
    +416    /// - `https_proxy`
    +417    pub fn proxy_from_env(mut self) -> Self {
    +418        self.proxy_url = proxy_url_from_env();
    +419        self
    +420    }
    +421
    +422    /// Enables saving the TLS pre-master key for connections.
    +423    ///
    +424    /// This key should normally remain secret but can be useful to debug networking issues
    +425    /// by decrypting captured traffic.
    +426    ///
    +427    /// If *keylog* is `true` then setting the `SSLKEYLOGFILE` environment variable to a
    +428    /// filename will result in this file being used to log the TLS pre-master keys.
    +429    pub fn keylog(mut self, keylog: bool) -> Self {
    +430        self.keylog = keylog;
    +431        self
    +432    }
    +433
    +434    /// Skip verification of SSL certificates from relay servers
    +435    ///
    +436    /// May only be used in tests.
    +437    #[cfg(any(test, feature = "test-utils"))]
    +438    pub fn insecure_skip_relay_cert_verify(mut self, skip_verify: bool) -> Self {
    +439        self.insecure_skip_relay_cert_verify = skip_verify;
    +440        self
    +441    }
    +442
    +443    /// This implies we only use the relay to communicate
    +444    /// and do not attempt to do any hole punching.
    +445    #[cfg(any(test, feature = "test-utils"))]
    +446    pub fn path_selection(mut self, path_selection: PathSelection) -> Self {
    +447        self.path_selection = path_selection;
    +448        self
    +449    }
    +450
    +451    /// Set the maximum number of TLS tickets to cache.
    +452    ///
    +453    /// Set this to a larger value if you want to do 0rtt connections to a large
    +454    /// number of clients.
     455    ///
    -456    /// - `HTTP_PROXY`
    -457    /// - `http_proxy`
    -458    /// - `HTTPS_PROXY`
    -459    /// - `https_proxy`
    -460    pub fn proxy_from_env(mut self) -> Self {
    -461        self.proxy_url = proxy_url_from_env();
    -462        self
    -463    }
    -464
    -465    /// Enables saving the TLS pre-master key for connections.
    -466    ///
    -467    /// This key should normally remain secret but can be useful to debug networking issues
    -468    /// by decrypting captured traffic.
    -469    ///
    -470    /// If *keylog* is `true` then setting the `SSLKEYLOGFILE` environment variable to a
    -471    /// filename will result in this file being used to log the TLS pre-master keys.
    -472    pub fn keylog(mut self, keylog: bool) -> Self {
    -473        self.keylog = keylog;
    -474        self
    -475    }
    -476
    -477    /// Skip verification of SSL certificates from relay servers
    -478    ///
    -479    /// May only be used in tests.
    -480    #[cfg(any(test, feature = "test-utils"))]
    -481    pub fn insecure_skip_relay_cert_verify(mut self, skip_verify: bool) -> Self {
    -482        self.insecure_skip_relay_cert_verify = skip_verify;
    -483        self
    -484    }
    -485
    -486    /// This implies we only use the relay to communicate
    -487    /// and do not attempt to do any hole punching.
    -488    #[cfg(any(test, feature = "test-utils"))]
    -489    pub fn path_selection(mut self, path_selection: PathSelection) -> Self {
    -490        self.path_selection = path_selection;
    -491        self
    -492    }
    -493}
    -494
    -495/// Configuration for a [`quinn::Endpoint`] that cannot be changed at runtime.
    -496#[derive(Debug)]
    -497struct StaticConfig {
    -498    tls_config: tls::TlsConfig,
    -499    transport_config: Arc<quinn::TransportConfig>,
    -500    keylog: bool,
    -501}
    -502
    -503impl StaticConfig {
    -504    /// Create a [`quinn::ServerConfig`] with the specified ALPN protocols.
    -505    fn create_server_config(&self, alpn_protocols: Vec<Vec<u8>>) -> ServerConfig {
    -506        let quic_server_config = self
    -507            .tls_config
    -508            .make_server_config(alpn_protocols, self.keylog);
    -509        let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
    -510        server_config.transport_config(self.transport_config.clone());
    -511
    -512        server_config
    -513    }
    -514}
    -515
    -516/// Controls an iroh node, establishing connections with other nodes.
    -517///
    -518/// This is the main API interface to create connections to, and accept connections from
    -519/// other iroh nodes.  The connections are peer-to-peer and encrypted, a Relay server is
    -520/// used to make the connections reliable.  See the [crate docs] for a more detailed
    -521/// overview of iroh.
    -522///
    -523/// It is recommended to only create a single instance per application.  This ensures all
    -524/// the connections made share the same peer-to-peer connections to other iroh nodes,
    -525/// while still remaining independent connections.  This will result in more optimal network
    -526/// behaviour.
    -527///
    -528/// The endpoint is created using the [`Builder`], which can be created using
    -529/// [`Endpoint::builder`].
    -530///
    -531/// Once an endpoint exists, new connections are typically created using the
    -532/// [`Endpoint::connect`] and [`Endpoint::accept`] methods.  Once established, the
    -533/// [`Connection`] gives access to most [QUIC] features.  Individual streams to send data to
    -534/// the peer are created using the [`Connection::open_bi`], [`Connection::accept_bi`],
    -535/// [`Connection::open_uni`] and [`Connection::open_bi`] functions.
    -536///
    -537/// Note that due to the light-weight properties of streams a stream will only be accepted
    -538/// once the initiating peer has sent some data on it.
    -539///
    -540/// [QUIC]: https://quicwg.org
    -541#[derive(Clone, Debug)]
    -542pub struct Endpoint {
    -543    /// Handle to the magicsocket/actor
    -544    msock: Handle,
    -545    /// Handle to the actor that resets the quinn RTT estimator
    -546    rtt_actor: Arc<rtt_actor::RttHandle>,
    -547    /// Configuration structs for quinn, holds the transport config, certificate setup, secret key etc.
    -548    static_config: Arc<StaticConfig>,
    -549}
    -550
    -551#[allow(missing_docs)]
    -552#[common_fields({
    -553    backtrace: Option<snafu::Backtrace>,
    -554    #[snafu(implicit)]
    -555    span_trace: n0_snafu::SpanTrace,
    -556})]
    -557#[derive(Debug, Snafu)]
    -558#[non_exhaustive]
    -559pub enum ConnectWithOptsError {
    -560    #[snafu(transparent)]
    -561    AddNodeAddr { source: AddNodeAddrError },
    -562    #[snafu(display("Connecting to ourself is not supported"))]
    -563    SelfConnect {},
    -564    #[snafu(display("No addressing information available"))]
    -565    NoAddress { source: GetMappingAddressError },
    -566    #[snafu(display("Unable to connect to remote"))]
    -567    Quinn { source: quinn::ConnectError },
    -568}
    -569
    -570#[allow(missing_docs)]
    -571#[common_fields({
    -572    backtrace: Option<snafu::Backtrace>,
    -573    #[snafu(implicit)]
    -574    span_trace: n0_snafu::SpanTrace,
    -575})]
    -576#[derive(Debug, Snafu)]
    -577#[non_exhaustive]
    -578pub enum ConnectError {
    -579    #[snafu(transparent)]
    -580    Connect {
    -581        #[snafu(source(from(ConnectWithOptsError, Box::new)))]
    -582        source: Box<ConnectWithOptsError>,
    -583    },
    -584    #[snafu(transparent)]
    -585    Connection {
    -586        #[snafu(source(from(ConnectionError, Box::new)))]
    -587        source: Box<ConnectionError>,
    -588    },
    -589}
    -590
    -591#[allow(missing_docs)]
    -592#[common_fields({
    -593    backtrace: Option<snafu::Backtrace>,
    -594    #[snafu(implicit)]
    -595    span_trace: n0_snafu::SpanTrace,
    -596})]
    -597#[derive(Debug, Snafu)]
    -598#[non_exhaustive]
    -599pub enum BindError {
    -600    #[snafu(transparent)]
    -601    MagicSpawn {
    -602        source: magicsock::CreateHandleError,
    -603    },
    -604    #[snafu(transparent)]
    -605    Discovery {
    -606        source: crate::discovery::IntoDiscoveryError,
    -607    },
    -608}
    -609
    -610#[allow(missing_docs)]
    -611#[common_fields({
    -612    backtrace: Option<snafu::Backtrace>,
    -613    #[snafu(implicit)]
    -614    span_trace: n0_snafu::SpanTrace,
    -615})]
    -616#[derive(Debug, Snafu)]
    -617#[snafu(module)]
    -618#[non_exhaustive]
    -619pub enum GetMappingAddressError {
    -620    #[snafu(display("Discovery service required due to missing addressing information"))]
    -621    DiscoveryStart { source: DiscoveryError },
    -622    #[snafu(display("Discovery service failed"))]
    -623    Discover { source: DiscoveryError },
    -624    #[snafu(display("No addressing information found"))]
    -625    NoAddress {},
    -626}
    -627
    -628impl Endpoint {
    -629    // The ordering of public methods is reflected directly in the documentation.  This is
    -630    // roughly ordered by what is most commonly needed by users, but grouped in similar
    -631    // items.
    -632
    -633    // # Methods relating to construction.
    +456    /// The default is 256, taking about 150 KiB in memory.
    +457    pub fn max_tls_tickets(mut self, n: usize) -> Self {
    +458        self.max_tls_tickets = n;
    +459        self
    +460    }
    +461}
    +462
    +463/// Configuration for a [`quinn::Endpoint`] that cannot be changed at runtime.
    +464#[derive(Debug)]
    +465struct StaticConfig {
    +466    tls_config: tls::TlsConfig,
    +467    transport_config: Arc<quinn::TransportConfig>,
    +468    keylog: bool,
    +469}
    +470
    +471impl StaticConfig {
    +472    /// Create a [`quinn::ServerConfig`] with the specified ALPN protocols.
    +473    fn create_server_config(&self, alpn_protocols: Vec<Vec<u8>>) -> ServerConfig {
    +474        let quic_server_config = self
    +475            .tls_config
    +476            .make_server_config(alpn_protocols, self.keylog);
    +477        let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
    +478        server_config.transport_config(self.transport_config.clone());
    +479
    +480        server_config
    +481    }
    +482}
    +483
    +484/// Controls an iroh node, establishing connections with other nodes.
    +485///
    +486/// This is the main API interface to create connections to, and accept connections from
    +487/// other iroh nodes.  The connections are peer-to-peer and encrypted, a Relay server is
    +488/// used to make the connections reliable.  See the [crate docs] for a more detailed
    +489/// overview of iroh.
    +490///
    +491/// It is recommended to only create a single instance per application.  This ensures all
    +492/// the connections made share the same peer-to-peer connections to other iroh nodes,
    +493/// while still remaining independent connections.  This will result in more optimal network
    +494/// behaviour.
    +495///
    +496/// The endpoint is created using the [`Builder`], which can be created using
    +497/// [`Endpoint::builder`].
    +498///
    +499/// Once an endpoint exists, new connections are typically created using the
    +500/// [`Endpoint::connect`] and [`Endpoint::accept`] methods.  Once established, the
    +501/// [`Connection`] gives access to most [QUIC] features.  Individual streams to send data to
    +502/// the peer are created using the [`Connection::open_bi`], [`Connection::accept_bi`],
    +503/// [`Connection::open_uni`] and [`Connection::open_bi`] functions.
    +504///
    +505/// Note that due to the light-weight properties of streams a stream will only be accepted
    +506/// once the initiating peer has sent some data on it.
    +507///
    +508/// [QUIC]: https://quicwg.org
    +509#[derive(Clone, Debug)]
    +510pub struct Endpoint {
    +511    /// Handle to the magicsocket/actor
    +512    msock: Handle,
    +513    /// Handle to the actor that resets the quinn RTT estimator
    +514    rtt_actor: Arc<rtt_actor::RttHandle>,
    +515    /// Configuration structs for quinn, holds the transport config, certificate setup, secret key etc.
    +516    static_config: Arc<StaticConfig>,
    +517}
    +518
    +519#[allow(missing_docs)]
    +520#[common_fields({
    +521    backtrace: Option<snafu::Backtrace>,
    +522    #[snafu(implicit)]
    +523    span_trace: n0_snafu::SpanTrace,
    +524})]
    +525#[derive(Debug, Snafu)]
    +526#[non_exhaustive]
    +527pub enum ConnectWithOptsError {
    +528    #[snafu(transparent)]
    +529    AddNodeAddr { source: AddNodeAddrError },
    +530    #[snafu(display("Connecting to ourself is not supported"))]
    +531    SelfConnect {},
    +532    #[snafu(display("No addressing information available"))]
    +533    NoAddress { source: GetMappingAddressError },
    +534    #[snafu(display("Unable to connect to remote"))]
    +535    Quinn { source: quinn::ConnectError },
    +536}
    +537
    +538#[allow(missing_docs)]
    +539#[common_fields({
    +540    backtrace: Option<snafu::Backtrace>,
    +541    #[snafu(implicit)]
    +542    span_trace: n0_snafu::SpanTrace,
    +543})]
    +544#[derive(Debug, Snafu)]
    +545#[non_exhaustive]
    +546pub enum ConnectError {
    +547    #[snafu(transparent)]
    +548    Connect {
    +549        #[snafu(source(from(ConnectWithOptsError, Box::new)))]
    +550        source: Box<ConnectWithOptsError>,
    +551    },
    +552    #[snafu(transparent)]
    +553    Connection {
    +554        #[snafu(source(from(ConnectionError, Box::new)))]
    +555        source: Box<ConnectionError>,
    +556    },
    +557}
    +558
    +559#[allow(missing_docs)]
    +560#[common_fields({
    +561    backtrace: Option<snafu::Backtrace>,
    +562    #[snafu(implicit)]
    +563    span_trace: n0_snafu::SpanTrace,
    +564})]
    +565#[derive(Debug, Snafu)]
    +566#[non_exhaustive]
    +567pub enum BindError {
    +568    #[snafu(transparent)]
    +569    MagicSpawn {
    +570        source: magicsock::CreateHandleError,
    +571    },
    +572}
    +573
    +574#[allow(missing_docs)]
    +575#[common_fields({
    +576    backtrace: Option<snafu::Backtrace>,
    +577    #[snafu(implicit)]
    +578    span_trace: n0_snafu::SpanTrace,
    +579})]
    +580#[derive(Debug, Snafu)]
    +581#[snafu(module)]
    +582#[non_exhaustive]
    +583pub enum GetMappingAddressError {
    +584    #[snafu(display("Discovery service required due to missing addressing information"))]
    +585    DiscoveryStart { source: DiscoveryError },
    +586    #[snafu(display("Discovery service failed"))]
    +587    Discover { source: DiscoveryError },
    +588    #[snafu(display("No addressing information found"))]
    +589    NoAddress {},
    +590}
    +591
    +592impl Endpoint {
    +593    // The ordering of public methods is reflected directly in the documentation.  This is
    +594    // roughly ordered by what is most commonly needed by users, but grouped in similar
    +595    // items.
    +596
    +597    // # Methods relating to construction.
    +598
    +599    /// Returns the builder for an [`Endpoint`], with a production configuration.
    +600    pub fn builder() -> Builder {
    +601        Builder::default()
    +602    }
    +603
    +604    /// Creates a quinn endpoint backed by a magicsock.
    +605    ///
    +606    /// This is for internal use, the public interface is the [`Builder`] obtained from
    +607    /// [Self::builder]. See the methods on the builder for documentation of the parameters.
    +608    #[instrument("ep", skip_all, fields(me = %static_config.tls_config.secret_key.public().fmt_short()))]
    +609    async fn bind(
    +610        static_config: StaticConfig,
    +611        msock_opts: magicsock::Options,
    +612    ) -> Result<Self, BindError> {
    +613        let msock = magicsock::MagicSock::spawn(msock_opts).await?;
    +614        trace!("created magicsock");
    +615        debug!(version = env!("CARGO_PKG_VERSION"), "iroh Endpoint created");
    +616
    +617        let metrics = msock.metrics.magicsock.clone();
    +618        let ep = Self {
    +619            msock,
    +620            rtt_actor: Arc::new(rtt_actor::RttHandle::new(metrics)),
    +621            static_config: Arc::new(static_config),
    +622        };
    +623        Ok(ep)
    +624    }
    +625
    +626    /// Sets the list of accepted ALPN protocols.
    +627    ///
    +628    /// This will only affect new incoming connections.
    +629    /// Note that this *overrides* the current list of ALPNs.
    +630    pub fn set_alpns(&self, alpns: Vec<Vec<u8>>) {
    +631        let server_config = self.static_config.create_server_config(alpns);
    +632        self.msock.endpoint().set_server_config(Some(server_config));
    +633    }
     634
    -635    /// Returns the builder for an [`Endpoint`], with a production configuration.
    -636    pub fn builder() -> Builder {
    -637        Builder::default()
    -638    }
    -639
    -640    /// Creates a quinn endpoint backed by a magicsock.
    +635    // # Methods for establishing connectivity.
    +636
    +637    /// Connects to a remote [`Endpoint`].
    +638    ///
    +639    /// A value that can be converted into a [`NodeAddr`] is required. This can be either a
    +640    /// [`NodeAddr`], a [`NodeId`] or a [`iroh_base::ticket::NodeTicket`].
     641    ///
    -642    /// This is for internal use, the public interface is the [`Builder`] obtained from
    -643    /// [Self::builder]. See the methods on the builder for documentation of the parameters.
    -644    #[instrument("ep", skip_all, fields(me = %static_config.tls_config.secret_key.public().fmt_short()))]
    -645    async fn bind(
    -646        static_config: StaticConfig,
    -647        msock_opts: magicsock::Options,
    -648    ) -> Result<Self, BindError> {
    -649        let msock = magicsock::MagicSock::spawn(msock_opts).await?;
    -650        trace!("created magicsock");
    -651        debug!(version = env!("CARGO_PKG_VERSION"), "iroh Endpoint created");
    -652
    -653        let metrics = msock.metrics.magicsock.clone();
    -654        let ep = Self {
    -655            msock,
    -656            rtt_actor: Arc::new(rtt_actor::RttHandle::new(metrics)),
    -657            static_config: Arc::new(static_config),
    -658        };
    -659        Ok(ep)
    -660    }
    -661
    -662    /// Sets the list of accepted ALPN protocols.
    -663    ///
    -664    /// This will only affect new incoming connections.
    -665    /// Note that this *overrides* the current list of ALPNs.
    -666    pub fn set_alpns(&self, alpns: Vec<Vec<u8>>) {
    -667        let server_config = self.static_config.create_server_config(alpns);
    -668        self.msock.endpoint().set_server_config(Some(server_config));
    -669    }
    -670
    -671    // # Methods for establishing connectivity.
    -672
    -673    /// Connects to a remote [`Endpoint`].
    -674    ///
    -675    /// A value that can be converted into a [`NodeAddr`] is required. This can be either a
    -676    /// [`NodeAddr`], a [`NodeId`] or a [`iroh_base::ticket::NodeTicket`].
    -677    ///
    -678    /// The [`NodeAddr`] must contain the [`NodeId`] to dial and may also contain a [`RelayUrl`]
    -679    /// and direct addresses. If direct addresses are provided, they will be used to try and
    -680    /// establish a direct connection without involving a relay server.
    -681    ///
    -682    /// If neither a [`RelayUrl`] or direct addresses are configured in the [`NodeAddr`] it
    -683    /// may still be possible a connection can be established.  This depends on other calls
    -684    /// to [`Endpoint::add_node_addr`] which may provide contact information, or via the
    -685    /// [`Discovery`] service configured using [`Builder::discovery`].  The discovery
    -686    /// service will also be used if the remote node is not reachable on the provided direct
    -687    /// addresses and there is no [`RelayUrl`].
    -688    ///
    -689    /// If addresses or relay servers are neither provided nor can be discovered, the
    -690    /// connection attempt will fail with an error.
    -691    ///
    -692    /// The `alpn`, or application-level protocol identifier, is also required. The remote
    -693    /// endpoint must support this `alpn`, otherwise the connection attempt will fail with
    -694    /// an error.
    -695    pub async fn connect(
    -696        &self,
    -697        node_addr: impl Into<NodeAddr>,
    -698        alpn: &[u8],
    -699    ) -> Result<Connection, ConnectError> {
    -700        let node_addr = node_addr.into();
    -701        let remote = node_addr.node_id;
    -702        let connecting = self
    -703            .connect_with_opts(node_addr, alpn, Default::default())
    -704            .await?;
    -705        let conn = connecting.await?;
    -706
    -707        debug!(
    -708            me = %self.node_id().fmt_short(),
    -709            remote = %remote.fmt_short(),
    -710            alpn = %String::from_utf8_lossy(alpn),
    -711            "Connection established."
    -712        );
    -713        Ok(conn)
    -714    }
    -715
    -716    /// Starts a connection attempt with a remote [`Endpoint`].
    -717    ///
    -718    /// Like [`Endpoint::connect`] (see also its docs for general details), but allows for a more
    -719    /// advanced connection setup with more customization in two aspects:
    -720    /// 1. The returned future resolves to a [`Connecting`], which can be further processed into
    -721    ///    a [`Connection`] by awaiting, or alternatively allows connecting with 0RTT via
    -722    ///    [`Connecting::into_0rtt`].
    -723    ///    **Note:** Please read the documentation for `into_0rtt` carefully to assess
    -724    ///    security concerns.
    -725    /// 2. The [`TransportConfig`] for the connection can be modified via the provided
    -726    ///    [`ConnectOptions`].
    -727    ///    **Note:** Please be aware that changing transport config settings may have adverse effects on
    -728    ///    establishing and maintaining direct connections.  Carefully test settings you use and
    -729    ///    consider this currently as still rather experimental.
    -730    #[instrument(name = "connect", skip_all, fields(
    -731        me = self.node_id().fmt_short(),
    -732        remote = tracing::field::Empty,
    -733        alpn = String::from_utf8_lossy(alpn).to_string(),
    -734    ))]
    -735    pub async fn connect_with_opts(
    -736        &self,
    -737        node_addr: impl Into<NodeAddr>,
    -738        alpn: &[u8],
    -739        options: ConnectOptions,
    -740    ) -> Result<Connecting, ConnectWithOptsError> {
    -741        let node_addr: NodeAddr = node_addr.into();
    -742        tracing::Span::current().record("remote", node_addr.node_id.fmt_short());
    -743
    -744        // Connecting to ourselves is not supported.
    -745        ensure!(node_addr.node_id != self.node_id(), SelfConnectSnafu);
    -746
    -747        if !node_addr.is_empty() {
    -748            self.add_node_addr(node_addr.clone())?;
    -749        }
    -750        let node_id = node_addr.node_id;
    -751        let direct_addresses = node_addr.direct_addresses.clone();
    -752        let relay_url = node_addr.relay_url.clone();
    -753
    -754        // Get the mapped IPv6 address from the magic socket. Quinn will connect to this
    -755        // address.  Start discovery for this node if it's enabled and we have no valid or
    -756        // verified address information for this node.  Dropping the discovery cancels any
    -757        // still running task.
    -758        let (mapped_addr, _discovery_drop_guard) = self
    -759            .get_mapping_addr_and_maybe_start_discovery(node_addr)
    -760            .await
    -761            .context(NoAddressSnafu)?;
    -762
    -763        let transport_config = options
    -764            .transport_config
    -765            .unwrap_or(self.static_config.transport_config.clone());
    +642    /// The [`NodeAddr`] must contain the [`NodeId`] to dial and may also contain a [`RelayUrl`]
    +643    /// and direct addresses. If direct addresses are provided, they will be used to try and
    +644    /// establish a direct connection without involving a relay server.
    +645    ///
    +646    /// If neither a [`RelayUrl`] or direct addresses are configured in the [`NodeAddr`] it
    +647    /// may still be possible a connection can be established.  This depends on which, if any,
    +648    /// [`crate::discovery::Discovery`] services were configured using [`Builder::discovery`].  The discovery
    +649    /// service will also be used if the remote node is not reachable on the provided direct
    +650    /// addresses and there is no [`RelayUrl`].
    +651    ///
    +652    /// If addresses or relay servers are neither provided nor can be discovered, the
    +653    /// connection attempt will fail with an error.
    +654    ///
    +655    /// The `alpn`, or application-level protocol identifier, is also required. The remote
    +656    /// endpoint must support this `alpn`, otherwise the connection attempt will fail with
    +657    /// an error.
    +658    ///
    +659    /// [`RelayUrl`]: crate::RelayUrl
    +660    pub async fn connect(
    +661        &self,
    +662        node_addr: impl Into<NodeAddr>,
    +663        alpn: &[u8],
    +664    ) -> Result<Connection, ConnectError> {
    +665        let node_addr = node_addr.into();
    +666        let remote = node_addr.node_id;
    +667        let connecting = self
    +668            .connect_with_opts(node_addr, alpn, Default::default())
    +669            .await?;
    +670        let conn = connecting.await?;
    +671
    +672        debug!(
    +673            me = %self.node_id().fmt_short(),
    +674            remote = %remote.fmt_short(),
    +675            alpn = %String::from_utf8_lossy(alpn),
    +676            "Connection established."
    +677        );
    +678        Ok(conn)
    +679    }
    +680
    +681    /// Starts a connection attempt with a remote [`Endpoint`].
    +682    ///
    +683    /// Like [`Endpoint::connect`] (see also its docs for general details), but allows for a more
    +684    /// advanced connection setup with more customization in two aspects:
    +685    /// 1. The returned future resolves to a [`Connecting`], which can be further processed into
    +686    ///    a [`Connection`] by awaiting, or alternatively allows connecting with 0RTT via
    +687    ///    [`Connecting::into_0rtt`].
    +688    ///    **Note:** Please read the documentation for `into_0rtt` carefully to assess
    +689    ///    security concerns.
    +690    /// 2. The [`TransportConfig`] for the connection can be modified via the provided
    +691    ///    [`ConnectOptions`].
    +692    ///    **Note:** Please be aware that changing transport config settings may have adverse effects on
    +693    ///    establishing and maintaining direct connections.  Carefully test settings you use and
    +694    ///    consider this currently as still rather experimental.
    +695    #[instrument(name = "connect", skip_all, fields(
    +696        me = %self.node_id().fmt_short(),
    +697        remote = tracing::field::Empty,
    +698        alpn = String::from_utf8_lossy(alpn).to_string(),
    +699    ))]
    +700    pub async fn connect_with_opts(
    +701        &self,
    +702        node_addr: impl Into<NodeAddr>,
    +703        alpn: &[u8],
    +704        options: ConnectOptions,
    +705    ) -> Result<Connecting, ConnectWithOptsError> {
    +706        let node_addr: NodeAddr = node_addr.into();
    +707        tracing::Span::current().record(
    +708            "remote",
    +709            tracing::field::display(node_addr.node_id.fmt_short()),
    +710        );
    +711
    +712        // Connecting to ourselves is not supported.
    +713        ensure!(node_addr.node_id != self.node_id(), SelfConnectSnafu);
    +714
    +715        if !node_addr.is_empty() {
    +716            self.add_node_addr(node_addr.clone())?;
    +717        }
    +718        let node_id = node_addr.node_id;
    +719        let direct_addresses = node_addr.direct_addresses.clone();
    +720        let relay_url = node_addr.relay_url.clone();
    +721
    +722        // Get the mapped IPv6 address from the magic socket. Quinn will connect to this
    +723        // address.  Start discovery for this node if it's enabled and we have no valid or
    +724        // verified address information for this node.  Dropping the discovery cancels any
    +725        // still running task.
    +726        let (mapped_addr, _discovery_drop_guard) = self
    +727            .get_mapping_addr_and_maybe_start_discovery(node_addr)
    +728            .await
    +729            .context(NoAddressSnafu)?;
    +730
    +731        let transport_config = options
    +732            .transport_config
    +733            .unwrap_or(self.static_config.transport_config.clone());
    +734
    +735        // Start connecting via quinn. This will time out after 10 seconds if no reachable
    +736        // address is available.
    +737
    +738        debug!(
    +739            ?mapped_addr,
    +740            ?direct_addresses,
    +741            ?relay_url,
    +742            "Attempting connection..."
    +743        );
    +744        let client_config = {
    +745            let mut alpn_protocols = vec![alpn.to_vec()];
    +746            alpn_protocols.extend(options.additional_alpns);
    +747            let quic_client_config = self
    +748                .static_config
    +749                .tls_config
    +750                .make_client_config(alpn_protocols, self.static_config.keylog);
    +751            let mut client_config = quinn::ClientConfig::new(Arc::new(quic_client_config));
    +752            client_config.transport_config(transport_config);
    +753            client_config
    +754        };
    +755
    +756        let server_name = &tls::name::encode(node_id);
    +757        let connect = self
    +758            .msock
    +759            .endpoint()
    +760            .connect_with(
    +761                client_config,
    +762                mapped_addr.private_socket_addr(),
    +763                server_name,
    +764            )
    +765            .context(QuinnSnafu)?;
     766
    -767        // Start connecting via quinn. This will time out after 10 seconds if no reachable
    -768        // address is available.
    -769
    -770        debug!(
    -771            ?mapped_addr,
    -772            ?direct_addresses,
    -773            ?relay_url,
    -774            "Attempting connection..."
    -775        );
    -776        let client_config = {
    -777            let mut alpn_protocols = vec![alpn.to_vec()];
    -778            alpn_protocols.extend(options.additional_alpns);
    -779            let quic_client_config = self
    -780                .static_config
    -781                .tls_config
    -782                .make_client_config(alpn_protocols, self.static_config.keylog);
    -783            let mut client_config = quinn::ClientConfig::new(Arc::new(quic_client_config));
    -784            client_config.transport_config(transport_config);
    -785            client_config
    -786        };
    -787
    -788        let server_name = &tls::name::encode(node_id);
    -789        let connect = self
    -790            .msock
    -791            .endpoint()
    -792            .connect_with(
    -793                client_config,
    -794                mapped_addr.private_socket_addr(),
    -795                server_name,
    -796            )
    -797            .context(QuinnSnafu)?;
    -798
    -799        Ok(Connecting {
    -800            inner: connect,
    -801            ep: self.clone(),
    -802            remote_node_id: Some(node_id),
    -803            _discovery_drop_guard,
    -804        })
    -805    }
    -806
    -807    /// Accepts an incoming connection on the endpoint.
    +767        Ok(Connecting {
    +768            inner: connect,
    +769            ep: self.clone(),
    +770            remote_node_id: Some(node_id),
    +771            _discovery_drop_guard,
    +772        })
    +773    }
    +774
    +775    /// Accepts an incoming connection on the endpoint.
    +776    ///
    +777    /// Only connections with the ALPNs configured in [`Builder::alpns`] will be accepted.
    +778    /// If multiple ALPNs have been configured the ALPN can be inspected before accepting
    +779    /// the connection using [`Connecting::alpn`].
    +780    ///
    +781    /// The returned future will yield `None` if the endpoint is closed by calling
    +782    /// [`Endpoint::close`].
    +783    pub fn accept(&self) -> Accept<'_> {
    +784        Accept {
    +785            inner: self.msock.endpoint().accept(),
    +786            ep: self.clone(),
    +787        }
    +788    }
    +789
    +790    // # Methods for manipulating the internal state about other nodes.
    +791
    +792    /// Informs this [`Endpoint`] about addresses of the iroh node.
    +793    ///
    +794    /// This updates the local state for the remote node.  If the provided [`NodeAddr`]
    +795    /// contains a [`RelayUrl`] this will be used as the new relay server for this node.  If
    +796    /// it contains any new IP endpoints they will also be stored and tried when next
    +797    /// connecting to this node. Any address that matches this node's direct addresses will be
    +798    /// silently ignored.
    +799    ///
    +800    /// See also [`Endpoint::add_node_addr_with_source`].
    +801    ///
    +802    /// # Using node discovery instead
    +803    ///
    +804    /// It is strongly advised to use node discovery using the [`StaticProvider`] instead.
    +805    /// This provides more flexibility and future proofing.
    +806    ///
    +807    /// # Errors
     808    ///
    -809    /// Only connections with the ALPNs configured in [`Builder::alpns`] will be accepted.
    -810    /// If multiple ALPNs have been configured the ALPN can be inspected before accepting
    -811    /// the connection using [`Connecting::alpn`].
    -812    ///
    -813    /// The returned future will yield `None` if the endpoint is closed by calling
    -814    /// [`Endpoint::close`].
    -815    pub fn accept(&self) -> Accept<'_> {
    -816        Accept {
    -817            inner: self.msock.endpoint().accept(),
    -818            ep: self.clone(),
    -819        }
    -820    }
    -821
    -822    // # Methods for manipulating the internal state about other nodes.
    -823
    -824    /// Informs this [`Endpoint`] about addresses of the iroh node.
    +809    /// Will return an error if we attempt to add our own [`NodeId`] to the node map or
    +810    /// if the direct addresses are a subset of ours.
    +811    ///
    +812    /// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
    +813    /// [`RelayUrl`]: crate::RelayUrl
    +814    fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), AddNodeAddrError> {
    +815        self.add_node_addr_inner(node_addr, magicsock::Source::App)
    +816    }
    +817
    +818    /// Informs this [`Endpoint`] about addresses of the iroh node, noting the source.
    +819    ///
    +820    /// This updates the local state for the remote node.  If the provided [`NodeAddr`] contains a
    +821    /// [`RelayUrl`] this will be used as the new relay server for this node.  If it contains any
    +822    /// new IP endpoints they will also be stored and tried when next connecting to this node. Any
    +823    /// address that matches this node's direct addresses will be silently ignored. The *source* is
    +824    /// used for logging exclusively and will not be stored.
     825    ///
    -826    /// This updates the local state for the remote node.  If the provided [`NodeAddr`]
    -827    /// contains a [`RelayUrl`] this will be used as the new relay server for this node.  If
    -828    /// it contains any new IP endpoints they will also be stored and tried when next
    -829    /// connecting to this node. Any address that matches this node's direct addresses will be
    -830    /// silently ignored.
    -831    ///
    -832    /// See also [`Endpoint::add_node_addr_with_source`].
    -833    ///
    -834    /// # Using node discovery instead
    +826    /// # Using node discovery instead
    +827    ///
    +828    /// It is strongly advised to use node discovery using the [`StaticProvider`] instead.
    +829    /// This provides more flexibility and future proofing.
    +830    ///
    +831    /// # Errors
    +832    ///
    +833    /// Will return an error if we attempt to add our own [`NodeId`] to the node map or
    +834    /// if the direct addresses are a subset of ours.
     835    ///
    -836    /// It is strongly advised to use node discovery using the [`StaticProvider`] instead.
    -837    /// This provides more flexibility and future proofing.
    -838    ///
    -839    /// # Errors
    -840    ///
    -841    /// Will return an error if we attempt to add our own [`NodeId`] to the node map or
    -842    /// if the direct addresses are a subset of ours.
    -843    ///
    -844    /// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
    -845    pub fn add_node_addr(&self, node_addr: NodeAddr) -> Result<(), AddNodeAddrError> {
    -846        self.add_node_addr_inner(node_addr, magicsock::Source::App)
    -847    }
    -848
    -849    /// Informs this [`Endpoint`] about addresses of the iroh node, noting the source.
    -850    ///
    -851    /// This updates the local state for the remote node.  If the provided [`NodeAddr`] contains a
    -852    /// [`RelayUrl`] this will be used as the new relay server for this node.  If it contains any
    -853    /// new IP endpoints they will also be stored and tried when next connecting to this node. Any
    -854    /// address that matches this node's direct addresses will be silently ignored. The *source* is
    -855    /// used for logging exclusively and will not be stored.
    -856    ///
    -857    /// # Using node discovery instead
    -858    ///
    -859    /// It is strongly advised to use node discovery using the [`StaticProvider`] instead.
    -860    /// This provides more flexibility and future proofing.
    -861    ///
    -862    /// # Errors
    -863    ///
    -864    /// Will return an error if we attempt to add our own [`NodeId`] to the node map or
    -865    /// if the direct addresses are a subset of ours.
    -866    ///
    -867    /// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
    -868    pub fn add_node_addr_with_source(
    -869        &self,
    -870        node_addr: NodeAddr,
    -871        source: &'static str,
    -872    ) -> Result<(), AddNodeAddrError> {
    -873        self.add_node_addr_inner(
    -874            node_addr,
    -875            magicsock::Source::NamedApp {
    -876                name: source.into(),
    -877            },
    -878        )
    -879    }
    -880
    -881    fn add_node_addr_inner(
    -882        &self,
    -883        node_addr: NodeAddr,
    -884        source: magicsock::Source,
    -885    ) -> Result<(), AddNodeAddrError> {
    -886        // Connecting to ourselves is not supported.
    -887        snafu::ensure!(node_addr.node_id != self.node_id(), OwnAddressSnafu);
    -888        self.msock.add_node_addr(node_addr, source)
    -889    }
    -890
    -891    // # Getter methods for properties of this Endpoint itself.
    +836    /// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
    +837    ///
    +838    /// [`RelayUrl`]: crate::RelayUrl
    +839    pub fn add_node_addr_with_source(
    +840        &self,
    +841        node_addr: NodeAddr,
    +842        source: &'static str,
    +843    ) -> Result<(), AddNodeAddrError> {
    +844        self.add_node_addr_inner(
    +845            node_addr,
    +846            magicsock::Source::NamedApp {
    +847                name: source.into(),
    +848            },
    +849        )
    +850    }
    +851
    +852    fn add_node_addr_inner(
    +853        &self,
    +854        node_addr: NodeAddr,
    +855        source: magicsock::Source,
    +856    ) -> Result<(), AddNodeAddrError> {
    +857        // Connecting to ourselves is not supported.
    +858        snafu::ensure!(node_addr.node_id != self.node_id(), OwnAddressSnafu);
    +859        self.msock.add_node_addr(node_addr, source)
    +860    }
    +861
    +862    // # Getter methods for properties of this Endpoint itself.
    +863
    +864    /// Returns the secret_key of this endpoint.
    +865    pub fn secret_key(&self) -> &SecretKey {
    +866        &self.static_config.tls_config.secret_key
    +867    }
    +868
    +869    /// Returns the node id of this endpoint.
    +870    ///
    +871    /// This ID is the unique addressing information of this node and other peers must know
    +872    /// it to be able to connect to this node.
    +873    pub fn node_id(&self) -> NodeId {
    +874        self.static_config.tls_config.secret_key.public()
    +875    }
    +876
    +877    /// Returns the current [`NodeAddr`].
    +878    /// As long as the endpoint was able to binde to a network interfaces, some
    +879    /// local addresses will be available.
    +880    ///
    +881    /// The state of other fields depends on the state of networking and connectivity.
    +882    /// Use the [`Endpoint::online`] method to ensure that the endpoint is considered
    +883    /// "online" (has contacted a relay server) before calling this method, if you want
    +884    /// to ensure that the `NodeAddr` will contain enough information to allow this endpoint
    +885    /// to be dialable by a remote endpoint over the internet.
    +886    ///
    +887    /// You can use the [`Endpoint::watch_node_addr`] method to get updates when the `NodeAddr`
    +888    /// changes.
    +889    pub fn node_addr(&self) -> NodeAddr {
    +890        self.watch_node_addr().get()
    +891    }
     892
    -893    /// Returns the secret_key of this endpoint.
    -894    pub fn secret_key(&self) -> &SecretKey {
    -895        &self.static_config.tls_config.secret_key
    -896    }
    -897
    -898    /// Returns the node id of this endpoint.
    -899    ///
    -900    /// This ID is the unique addressing information of this node and other peers must know
    -901    /// it to be able to connect to this node.
    -902    pub fn node_id(&self) -> NodeId {
    -903        self.static_config.tls_config.secret_key.public()
    -904    }
    -905
    -906    /// Returns a [`Watcher`] for the current [`NodeAddr`] for this endpoint.
    -907    ///
    -908    /// The observed [`NodeAddr`] will have the current [`RelayUrl`] and direct addresses
    -909    /// as they would be returned by [`Endpoint::home_relay`] and [`Endpoint::direct_addresses`].
    +893    /// Returns a [`Watcher`] for the current [`NodeAddr`] for this endpoint.
    +894    ///
    +895    /// The observed [`NodeAddr`] will have the current [`RelayUrl`] and direct addresses.
    +896    ///
    +897    /// ```no_run
    +898    /// # async fn wrapper() -> n0_snafu::Result {
    +899    /// use iroh::{Endpoint, Watcher};
    +900    ///
    +901    /// let endpoint = Endpoint::builder()
    +902    ///     .alpns(vec![b"my-alpn".to_vec()])
    +903    ///     .bind()
    +904    ///     .await?;
    +905    /// let node_addr = endpoint.watch_node_addr().get();
    +906    /// # let _ = node_addr;
    +907    /// # Ok(())
    +908    /// # }
    +909    /// ```
     910    ///
    -911    /// Use [`Watcher::initialized`] to wait for a [`NodeAddr`] that is ready to be connected to:
    -912    ///
    -913    /// ```no_run
    -914    /// # async fn wrapper() -> n0_snafu::Result {
    -915    /// use iroh::Endpoint;
    -916    /// use n0_watcher::Watcher;
    -917    ///
    -918    /// let endpoint = Endpoint::builder()
    -919    ///     .alpns(vec![b"my-alpn".to_vec()])
    -920    ///     .bind()
    -921    ///     .await?;
    -922    /// let node_addr = endpoint.node_addr().initialized().await?;
    -923    /// # let _ = node_addr;
    -924    /// # Ok(())
    -925    /// # }
    -926    /// ```
    +911    /// The [`Endpoint::online`] method can be used as a convenience method to
    +912    /// understand if the endpoint has ever been considered "online". But after
    +913    /// that initial call to [`Endpoint::online`], to understand if your
    +914    /// endpoint is no longer able to be connected to by endpoints outside
    +915    /// of the private or local network, watch for changes in it's [`NodeAddr`].
    +916    /// If the `relay_url` is `None` or if there are no `direct_addresses` in
    +917    /// the [`NodeAddr`], you may not be dialable by other endpoints on the internet.
    +918    ///
    +919    ///
    +920    /// The `NodeAddr` will change as:
    +921    /// - network conditions change
    +922    /// - the endpoint connects to a relay server
    +923    /// - the endpoint changes its preferred relay server
    +924    /// - more addresses are discovered for this endpoint
    +925    ///
    +926    /// [`RelayUrl`]: crate::RelayUrl
     927    #[cfg(not(wasm_browser))]
    -928    pub fn node_addr(&self) -> impl n0_watcher::Watcher<Value = Option<NodeAddr>> {
    -929        let watch_addrs = self.direct_addresses();
    -930        let watch_relay = self.home_relay();
    +928    pub fn watch_node_addr(&self) -> impl n0_watcher::Watcher<Value = NodeAddr> + use<> {
    +929        let watch_addrs = self.msock.direct_addresses();
    +930        let watch_relay = self.msock.home_relay();
     931        let node_id = self.node_id();
     932
     933        watch_addrs
     934            .or(watch_relay)
    -935            .map(move |(addrs, mut relays)| match addrs {
    -936                Some(addrs) => Some(NodeAddr::from_parts(
    -937                    node_id,
    -938                    relays.pop(),
    -939                    addrs.into_iter().map(|x| x.addr),
    -940                )),
    -941                None => relays.pop().map(|relay_url| {
    -942                    NodeAddr::from_parts(node_id, Some(relay_url), std::iter::empty())
    -943                }),
    -944            })
    -945            .expect("watchable is alive - cannot be disconnected yet")
    -946    }
    -947
    -948    /// Returns a [`Watcher`] for the current [`NodeAddr`] for this endpoint.
    -949    ///
    -950    /// When compiled to Wasm, this function returns a watcher that initializes
    -951    /// with a [`NodeAddr`] that only contains a relay URL, but no direct addresses,
    -952    /// as there are no APIs for directly using sockets in browsers.
    -953    #[cfg(wasm_browser)]
    -954    pub fn node_addr(&self) -> impl n0_watcher::Watcher<Value = Option<NodeAddr>> {
    -955        // In browsers, there will never be any direct addresses, so we wait
    -956        // for the home relay instead. This makes the `NodeAddr` have *some* way
    -957        // of connecting to us.
    -958        let watch_relay = self.home_relay();
    -959        let node_id = self.node_id();
    -960        watch_relay
    -961            .map(move |mut relays| {
    -962                relays.pop().map(|relay_url| {
    -963                    NodeAddr::from_parts(node_id, Some(relay_url), std::iter::empty())
    -964                })
    -965            })
    -966            .expect("watchable is alive - cannot be disconnected yet")
    -967    }
    -968
    -969    /// Returns a [`Watcher`] for the [`RelayUrl`] of the Relay server used as home relay.
    -970    ///
    -971    /// Every endpoint has a home Relay server which it chooses as the server with the
    -972    /// lowest latency out of the configured servers provided by [`Builder::relay_mode`].
    -973    /// This is the server other iroh nodes can use to reliably establish a connection
    -974    /// to this node.
    -975    ///
    -976    /// The watcher stores `None` if we are not connected to any Relay server.
    -977    ///
    -978    /// Note that this will store `None` right after the [`Endpoint`] is created since it takes
    -979    /// some time to connect to find and connect to the home relay server.
    -980    ///
    -981    /// # Examples
    -982    ///
    -983    /// To wait for a home relay connection to be established, use [`Watcher::initialized`]:
    -984    /// ```no_run
    -985    /// use iroh::Endpoint;
    -986    /// use n0_future::StreamExt;
    -987    /// use n0_watcher::Watcher as _;
    -988    ///
    -989    /// # let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();
    -990    /// # rt.block_on(async move {
    -991    /// let mep = Endpoint::builder().bind().await.unwrap();
    -992    /// let _relay_url = mep.home_relay().initialized().await.unwrap();
    -993    /// # });
    -994    /// ```
    -995    pub fn home_relay(&self) -> impl n0_watcher::Watcher<Value = Vec<RelayUrl>> {
    -996        self.msock.home_relay()
    -997    }
    -998
    -999    /// Returns a [`Watcher`] for the direct addresses of this [`Endpoint`].
    -1000    ///
    -1001    /// The direct addresses of the [`Endpoint`] are those that could be used by other
    -1002    /// iroh nodes to establish direct connectivity, depending on the network
    -1003    /// situation. The yielded lists of direct addresses contain both the locally-bound
    -1004    /// addresses and the [`Endpoint`]'s publicly reachable addresses discovered through
    -1005    /// mechanisms such as [QAD] and port mapping.  Hence usually only a subset of these
    -1006    /// will be applicable to a certain remote iroh node.
    -1007    ///
    -1008    /// The [`Endpoint`] continuously monitors the direct addresses for changes as its own
    -1009    /// location in the network might change.  Whenever changes are detected this stream
    -1010    /// will yield a new list of direct addresses.
    -1011    ///
    -1012    /// When issuing the first call to this method the first direct address discovery might
    -1013    /// still be underway, in this case the [`Watcher`] might not be initialized with [`Some`]
    -1014    /// value yet.  Once the first set of local direct addresses are discovered the [`Watcher`]
    -1015    /// will always return [`Some`] set of direct addresses immediately, which are the most
    -1016    /// recently discovered direct addresses.
    -1017    ///
    -1018    /// # Examples
    -1019    ///
    -1020    /// To get the first set of direct addresses use [`Watcher::initialized`]:
    -1021    /// ```no_run
    -1022    /// use iroh::Endpoint;
    -1023    /// use n0_future::StreamExt;
    -1024    /// use n0_watcher::Watcher as _;
    -1025    ///
    -1026    /// # let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();
    -1027    /// # rt.block_on(async move {
    -1028    /// let mep = Endpoint::builder().bind().await.unwrap();
    -1029    /// let _addrs = mep.direct_addresses().initialized().await.unwrap();
    -1030    /// # });
    -1031    /// ```
    -1032    ///
    -1033    /// [QAD]: https://www.ietf.org/archive/id/draft-ietf-quic-address-discovery-00.html
    -1034    pub fn direct_addresses(&self) -> n0_watcher::Direct<Option<BTreeSet<DirectAddr>>> {
    -1035        self.msock.direct_addresses()
    -1036    }
    -1037
    -1038    /// Returns a [`Watcher`] for any net-reports run from this [`Endpoint`].
    -1039    ///
    -1040    /// A `net-report` checks the network conditions of the [`Endpoint`], such as
    -1041    /// whether it is connected to the internet via Ipv4 and/or Ipv6, its NAT
    -1042    /// status, its latency to the relay servers, and its public addresses.
    -1043    ///
    -1044    /// The [`Endpoint`] continuously runs `net-reports` to monitor if network
    -1045    /// conditions have changed. This [`Watcher`] will return the latest result
    -1046    /// of the `net-report`.
    -1047    ///
    -1048    /// When issuing the first call to this method the first report might
    -1049    /// still be underway, in this case the [`Watcher`] might not be initialized
    -1050    /// with [`Some`] value yet.  Once the net-report has been successfully
    -1051    /// run, the [`Watcher`] will always return [`Some`] report immediately, which
    -1052    /// is the most recently run `net-report`.
    -1053    ///
    -1054    /// # Examples
    -1055    ///
    -1056    /// To get the first report use [`Watcher::initialized`]:
    -1057    /// ```no_run
    -1058    /// use iroh::Endpoint;
    -1059    /// use n0_future::StreamExt;
    -1060    /// use n0_watcher::Watcher as _;
    -1061    ///
    -1062    /// # let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();
    -1063    /// # rt.block_on(async move {
    -1064    /// let ep = Endpoint::builder().bind().await.unwrap();
    -1065    /// let _report = ep.net_report().initialized().await.unwrap();
    -1066    /// # });
    -1067    /// ```
    -1068    #[doc(hidden)]
    -1069    pub fn net_report(&self) -> impl Watcher<Value = Option<Report>> {
    -1070        self.msock.net_report()
    -1071    }
    -1072
    -1073    /// Returns the local socket addresses on which the underlying sockets are bound.
    -1074    ///
    -1075    /// The [`Endpoint`] always binds on an IPv4 address and also tries to bind on an IPv6
    -1076    /// address if available.
    -1077    pub fn bound_sockets(&self) -> Vec<SocketAddr> {
    -1078        self.msock
    -1079            .local_addr()
    -1080            .into_iter()
    -1081            .filter_map(|addr| addr.into_socket_addr())
    -1082            .collect()
    -1083    }
    -1084
    -1085    // # Getter methods for information about other nodes.
    -1086
    -1087    /// Returns information about the remote node identified by a [`NodeId`].
    -1088    ///
    -1089    /// The [`Endpoint`] keeps some information about remote iroh nodes, which it uses to find
    -1090    /// the best path to a node. Having information on a remote node, however, does not mean we have
    -1091    /// ever connected to it to or even whether a connection is even possible. The information about a
    -1092    /// remote node will change over time, as the [`Endpoint`] learns more about the node. Future
    -1093    /// calls may return different information. Furthermore, node information may even be
    -1094    /// completely evicted as it becomes stale.
    -1095    ///
    -1096    /// See also [`Endpoint::remote_info_iter`] which returns information on all nodes known
    -1097    /// by this [`Endpoint`].
    -1098    pub fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    -1099        self.msock.remote_info(node_id)
    -1100    }
    -1101
    -1102    /// Returns information about all the remote nodes this [`Endpoint`] knows about.
    -1103    ///
    -1104    /// This returns the same information as [`Endpoint::remote_info`] for each node known to this
    -1105    /// [`Endpoint`].
    -1106    ///
    -1107    /// The [`Endpoint`] keeps some information about remote iroh nodes, which it uses to find
    -1108    /// the best path to a node. This returns all the nodes it knows about, regardless of whether a
    -1109    /// connection was ever made or is even possible.
    -1110    ///
    -1111    /// See also [`Endpoint::remote_info`] to only retrieve information about a single node.
    -1112    pub fn remote_info_iter(&self) -> impl Iterator<Item = RemoteInfo> {
    -1113        self.msock.list_remote_infos().into_iter()
    -1114    }
    -1115
    -1116    /// Returns a stream of all remote nodes discovered through the endpoint's discovery services.
    -1117    ///
    -1118    /// Whenever a node is discovered via the endpoint's discovery service, the corresponding
    -1119    /// [`DiscoveryItem`] is yielded from this stream. This includes nodes discovered actively
    -1120    /// through [`Discovery::resolve`], which is invoked automatically when calling
    -1121    /// [`Endpoint::connect`] for a [`NodeId`] unknown to the endpoint. It also includes
    -1122    /// nodes that the endpoint discovers passively from discovery services that implement
    -1123    /// [`Discovery::subscribe`], which e.g. [`MdnsDiscovery`] does.
    -1124    ///
    -1125    /// The stream does not yield information about nodes that are added manually to the endpoint's
    -1126    /// addressbook by calling [`Endpoint::add_node_addr`] or by supplying a full [`NodeAddr`] to
    -1127    /// [`Endpoint::connect`]. It also does not yield information about nodes that we only
    -1128    /// know about because they connected to us. When using the [`StaticProvider`] discovery,
    -1129    /// discovery info is only emitted once connecting to a node added to the static provider, not
    -1130    /// at the time of adding it to the static provider.
    -1131    ///
    -1132    /// The stream should be processed in a loop. If the stream is not processed fast enough,
    -1133    /// [`Lagged`] may be yielded, indicating that items were missed.
    -1134    ///
    -1135    /// See also [`Endpoint::remote_info_iter`], which returns an iterator over all remotes
    -1136    /// the endpoint knows about at a specific point in time.
    -1137    ///
    -1138    /// [`MdnsDiscovery`]: crate::discovery::mdns::MdnsDiscovery
    -1139    /// [`StaticProvider`]: crate::discovery::static_provider::StaticProvider
    -1140    pub fn discovery_stream(&self) -> impl Stream<Item = Result<DiscoveryItem, Lagged>> {
    -1141        self.msock.discovery_subscribers().subscribe()
    -1142    }
    -1143
    -1144    // # Methods for less common getters.
    -1145    //
    -1146    // Partially they return things passed into the builder.
    -1147
    -1148    /// Returns a [`Watcher`] that reports the current connection type and any changes for
    -1149    /// given remote node.
    -1150    ///
    -1151    /// This watcher allows observing a stream of [`ConnectionType`] items by calling
    -1152    /// [`Watcher::stream()`]. If the underlying connection to a remote node changes, it will
    -1153    /// yield a new item.  These connection changes are when the connection switches between
    -1154    /// using the Relay server and a direct connection.
    -1155    ///
    -1156    /// Note that this does not guarantee each connection change is yielded in the stream.
    -1157    /// If the connection type changes several times before this stream is polled, only the
    -1158    /// last recorded state is returned.  This can be observed e.g. right at the start of a
    -1159    /// connection when the switch from a relayed to a direct connection can be so fast that
    -1160    /// the relayed state is never exposed.
    -1161    ///
    -1162    /// If there is currently a connection with the remote node, then using [`Watcher::get`]
    -1163    /// will immediately return either [`ConnectionType::Relay`], [`ConnectionType::Direct`]
    -1164    /// or [`ConnectionType::Mixed`].
    -1165    ///
    -1166    /// It is possible for the connection type to be [`ConnectionType::None`] if you've
    -1167    /// recently connected to this node id but previous methods of reaching the node have
    -1168    /// become inaccessible.
    -1169    ///
    -1170    /// Will return `None` if we do not have any address information for the given `node_id`.
    -1171    pub fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    -1172        self.msock.conn_type(node_id)
    -1173    }
    -1174
    -1175    /// Returns the DNS resolver used in this [`Endpoint`].
    -1176    ///
    -1177    /// See [`Builder::dns_resolver`].
    -1178    #[cfg(not(wasm_browser))]
    -1179    pub fn dns_resolver(&self) -> &DnsResolver {
    -1180        self.msock.dns_resolver()
    -1181    }
    -1182
    -1183    /// Returns the discovery mechanism, if configured.
    +935            .map(move |(addrs, mut relays)| {
    +936                debug_assert!(!addrs.is_empty(), "direct addresses must never be empty");
    +937
    +938                NodeAddr::from_parts(node_id, relays.pop(), addrs.into_iter().map(|x| x.addr))
    +939            })
    +940            .expect("watchable is alive - cannot be disconnected yet")
    +941    }
    +942
    +943    /// Returns a [`Watcher`] for the current [`NodeAddr`] for this endpoint.
    +944    ///
    +945    /// When compiled to Wasm, this function returns a watcher that initializes
    +946    /// with a [`NodeAddr`] that only contains a relay URL, but no direct addresses,
    +947    /// as there are no APIs for directly using sockets in browsers.
    +948    #[cfg(wasm_browser)]
    +949    pub fn watch_node_addr(&self) -> impl n0_watcher::Watcher<Value = NodeAddr> + use<> {
    +950        // In browsers, there will never be any direct addresses, so we wait
    +951        // for the home relay instead. This makes the `NodeAddr` have *some* way
    +952        // of connecting to us.
    +953        let watch_relay = self.msock.home_relay();
    +954        let node_id = self.node_id();
    +955        watch_relay
    +956            .map(move |mut relays| NodeAddr::from_parts(node_id, relays.pop(), std::iter::empty()))
    +957            .expect("watchable is alive - cannot be disconnected yet")
    +958    }
    +959
    +960    /// A convenience method that waits for the endpoint to be considered "online".
    +961    ///
    +962    /// This currently means at least one relay server was connected,
    +963    /// and at least one local IP address is available.
    +964    /// Event if no relays are configured, this will still wait for a relay connection.
    +965    ///
    +966    /// Once this has been resolved once, this will always immediately resolve.
    +967    ///
    +968    /// This has no timeout, so if that is needed, you need to wrap it in a
    +969    /// timeout. We recommend using a timeout close to
    +970    /// [`crate::net_report::TIMEOUT`], so you can be sure that at least one
    +971    /// [`crate::net_report::Report`] has been attempted.
    +972    ///
    +973    /// To understand if the endpoint has gone back "offline",
    +974    /// you must use the [`Endpoint::watch_node_addr`] method, to
    +975    /// get information on the current relay and direct address information.
    +976    pub async fn online(&self) {
    +977        self.msock.home_relay().initialized().await;
    +978    }
    +979
    +980    /// Returns a [`Watcher`] for any net-reports run from this [`Endpoint`].
    +981    ///
    +982    /// A `net-report` checks the network conditions of the [`Endpoint`], such as
    +983    /// whether it is connected to the internet via Ipv4 and/or Ipv6, its NAT
    +984    /// status, its latency to the relay servers, and its public addresses.
    +985    ///
    +986    /// The [`Endpoint`] continuously runs `net-reports` to monitor if network
    +987    /// conditions have changed. This [`Watcher`] will return the latest result
    +988    /// of the `net-report`.
    +989    ///
    +990    /// When issuing the first call to this method the first report might
    +991    /// still be underway, in this case the [`Watcher`] might not be initialized
    +992    /// with [`Some`] value yet.  Once the net-report has been successfully
    +993    /// run, the [`Watcher`] will always return [`Some`] report immediately, which
    +994    /// is the most recently run `net-report`.
    +995    ///
    +996    /// # Examples
    +997    ///
    +998    /// To get the first report use [`Watcher::initialized`]:
    +999    /// ```no_run
    +1000    /// use iroh::{Endpoint, Watcher as _};
    +1001    ///
    +1002    /// # let rt = tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap();
    +1003    /// # rt.block_on(async move {
    +1004    /// let ep = Endpoint::builder().bind().await.unwrap();
    +1005    /// let _report = ep.net_report().initialized().await;
    +1006    /// # });
    +1007    /// ```
    +1008    #[doc(hidden)]
    +1009    pub fn net_report(&self) -> impl Watcher<Value = Option<Report>> + use<> {
    +1010        self.msock.net_report()
    +1011    }
    +1012
    +1013    /// Returns the local socket addresses on which the underlying sockets are bound.
    +1014    ///
    +1015    /// The [`Endpoint`] always binds on an IPv4 address and also tries to bind on an IPv6
    +1016    /// address if available.
    +1017    pub fn bound_sockets(&self) -> Vec<SocketAddr> {
    +1018        self.msock
    +1019            .local_addr()
    +1020            .into_iter()
    +1021            .filter_map(|addr| addr.into_socket_addr())
    +1022            .collect()
    +1023    }
    +1024
    +1025    // # Methods for less common getters.
    +1026    //
    +1027    // Partially they return things passed into the builder.
    +1028
    +1029    /// Returns a [`Watcher`] that reports the current connection type and any changes for
    +1030    /// given remote node.
    +1031    ///
    +1032    /// This watcher allows observing a stream of [`ConnectionType`] items by calling
    +1033    /// [`Watcher::stream()`]. If the underlying connection to a remote node changes, it will
    +1034    /// yield a new item.  These connection changes are when the connection switches between
    +1035    /// using the Relay server and a direct connection.
    +1036    ///
    +1037    /// Note that this does not guarantee each connection change is yielded in the stream.
    +1038    /// If the connection type changes several times before this stream is polled, only the
    +1039    /// last recorded state is returned.  This can be observed e.g. right at the start of a
    +1040    /// connection when the switch from a relayed to a direct connection can be so fast that
    +1041    /// the relayed state is never exposed.
    +1042    ///
    +1043    /// If there is currently a connection with the remote node, then using [`Watcher::get`]
    +1044    /// will immediately return either [`ConnectionType::Relay`], [`ConnectionType::Direct`]
    +1045    /// or [`ConnectionType::Mixed`].
    +1046    ///
    +1047    /// It is possible for the connection type to be [`ConnectionType::None`] if you've
    +1048    /// recently connected to this node id but previous methods of reaching the node have
    +1049    /// become inaccessible.
    +1050    ///
    +1051    /// Will return `None` if we do not have any address information for the given `node_id`.
    +1052    pub fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    +1053        self.msock.conn_type(node_id)
    +1054    }
    +1055
    +1056    /// Returns the currently lowest latency for this node.
    +1057    ///
    +1058    /// Will return `None` if we do not have any address information for the given `node_id`.
    +1059    pub fn latency(&self, node_id: NodeId) -> Option<Duration> {
    +1060        self.msock.latency(node_id)
    +1061    }
    +1062
    +1063    /// Returns the DNS resolver used in this [`Endpoint`].
    +1064    ///
    +1065    /// See [`Builder::dns_resolver`].
    +1066    #[cfg(not(wasm_browser))]
    +1067    pub fn dns_resolver(&self) -> &DnsResolver {
    +1068        self.msock.dns_resolver()
    +1069    }
    +1070
    +1071    /// Returns the discovery mechanism, if configured.
    +1072    ///
    +1073    /// See [`Builder::discovery`].
    +1074    pub fn discovery(&self) -> &ConcurrentDiscovery {
    +1075        self.msock.discovery()
    +1076    }
    +1077
    +1078    /// Returns metrics collected for this endpoint.
    +1079    ///
    +1080    /// The endpoint internally collects various metrics about its operation.
    +1081    /// The returned [`EndpointMetrics`] struct contains all of these metrics.
    +1082    ///
    +1083    /// You can access individual metrics directly by using the public fields:
    +1084    /// ```rust
    +1085    /// # use std::collections::BTreeMap;
    +1086    /// # use iroh::endpoint::Endpoint;
    +1087    /// # async fn wrapper() -> n0_snafu::Result {
    +1088    /// let endpoint = Endpoint::builder().bind().await?;
    +1089    /// assert_eq!(endpoint.metrics().magicsock.recv_datagrams.get(), 0);
    +1090    /// # Ok(())
    +1091    /// # }
    +1092    /// ```
    +1093    ///
    +1094    /// [`EndpointMetrics`] implements [`MetricsGroupSet`], and each field
    +1095    /// implements [`MetricsGroup`]. These traits provide methods to iterate over
    +1096    /// the groups in the set, and over the individual metrics in each group, without having
    +1097    /// to access each field manually. With these methods, it is straightforward to collect
    +1098    /// all metrics into a map or push their values to a metrics collector.
    +1099    ///
    +1100    /// For example, the following snippet collects all metrics into a map:
    +1101    /// ```rust
    +1102    /// # use std::collections::BTreeMap;
    +1103    /// # use iroh_metrics::{Metric, MetricsGroup, MetricValue, MetricsGroupSet};
    +1104    /// # use iroh::endpoint::Endpoint;
    +1105    /// # async fn wrapper() -> n0_snafu::Result {
    +1106    /// let endpoint = Endpoint::builder().bind().await?;
    +1107    /// let metrics: BTreeMap<String, MetricValue> = endpoint
    +1108    ///     .metrics()
    +1109    ///     .iter()
    +1110    ///     .map(|(group, metric)| {
    +1111    ///         let name = [group, metric.name()].join(":");
    +1112    ///         (name, metric.value())
    +1113    ///     })
    +1114    ///     .collect();
    +1115    ///
    +1116    /// assert_eq!(metrics["magicsock:recv_datagrams"], MetricValue::Counter(0));
    +1117    /// # Ok(())
    +1118    /// # }
    +1119    /// ```
    +1120    ///
    +1121    /// The metrics can also be encoded into the OpenMetrics text format, as used by Prometheus.
    +1122    /// To do so, use the [`iroh_metrics::Registry`], add the endpoint metrics to the
    +1123    /// registry with [`Registry::register_all`], and encode the metrics to a string with
    +1124    /// [`encode_openmetrics_to_string`]:
    +1125    /// ```rust
    +1126    /// # use iroh_metrics::{Registry, MetricsSource};
    +1127    /// # use iroh::endpoint::Endpoint;
    +1128    /// # async fn wrapper() -> n0_snafu::Result {
    +1129    /// let endpoint = Endpoint::builder().bind().await?;
    +1130    /// let mut registry = Registry::default();
    +1131    /// registry.register_all(endpoint.metrics());
    +1132    /// let s = registry.encode_openmetrics_to_string()?;
    +1133    /// assert!(s.contains(r#"TYPE magicsock_recv_datagrams counter"#));
    +1134    /// assert!(s.contains(r#"magicsock_recv_datagrams_total 0"#));
    +1135    /// # Ok(())
    +1136    /// # }
    +1137    /// ```
    +1138    ///
    +1139    /// Through a registry, you can also add labels or prefixes to metrics with
    +1140    /// [`Registry::sub_registry_with_label`] or [`Registry::sub_registry_with_prefix`].
    +1141    /// Furthermore, [`iroh_metrics::service`] provides functions to easily start services
    +1142    /// to serve the metrics with a HTTP server, dump them to a file, or push them
    +1143    /// to a Prometheus gateway.
    +1144    ///
    +1145    /// For example, the following snippet launches an HTTP server that serves the metrics in the
    +1146    /// OpenMetrics text format:
    +1147    /// ```no_run
    +1148    /// # use std::{sync::{Arc, RwLock}, time::Duration};
    +1149    /// # use iroh_metrics::{Registry, MetricsSource};
    +1150    /// # use iroh::endpoint::Endpoint;
    +1151    /// # use n0_snafu::ResultExt;
    +1152    /// # async fn wrapper() -> n0_snafu::Result {
    +1153    /// // Create a registry, wrapped in a read-write lock so that we can register and serve
    +1154    /// // the metrics independently.
    +1155    /// let registry = Arc::new(RwLock::new(Registry::default()));
    +1156    /// // Spawn a task to serve the metrics on an OpenMetrics HTTP endpoint.
    +1157    /// let metrics_task = tokio::task::spawn({
    +1158    ///     let registry = registry.clone();
    +1159    ///     async move {
    +1160    ///         let addr = "0.0.0.0:9100".parse().unwrap();
    +1161    ///         iroh_metrics::service::start_metrics_server(addr, registry).await
    +1162    ///     }
    +1163    /// });
    +1164    ///
    +1165    /// // Spawn an endpoint and add the metrics to the registry.
    +1166    /// let endpoint = Endpoint::builder().bind().await?;
    +1167    /// registry.write().unwrap().register_all(endpoint.metrics());
    +1168    ///
    +1169    /// // Wait for the metrics server to bind, then fetch the metrics via HTTP.
    +1170    /// tokio::time::sleep(Duration::from_millis(500));
    +1171    /// let res = reqwest::get("http://localhost:9100/metrics")
    +1172    ///     .await
    +1173    ///     .context("get")?
    +1174    ///     .text()
    +1175    ///     .await
    +1176    ///     .context("text")?;
    +1177    ///
    +1178    /// assert!(res.contains(r#"TYPE magicsock_recv_datagrams counter"#));
    +1179    /// assert!(res.contains(r#"magicsock_recv_datagrams_total 0"#));
    +1180    /// # metrics_task.abort();
    +1181    /// # Ok(())
    +1182    /// # }
    +1183    /// ```
     1184    ///
    -1185    /// See [`Builder::discovery`].
    -1186    pub fn discovery(&self) -> Option<&dyn Discovery> {
    -1187        self.msock.discovery()
    -1188    }
    -1189
    -1190    /// Returns metrics collected for this endpoint.
    -1191    ///
    -1192    /// The endpoint internally collects various metrics about its operation.
    -1193    /// The returned [`EndpointMetrics`] struct contains all of these metrics.
    -1194    ///
    -1195    /// You can access individual metrics directly by using the public fields:
    -1196    /// ```rust
    -1197    /// # use std::collections::BTreeMap;
    -1198    /// # use iroh::endpoint::Endpoint;
    -1199    /// # async fn wrapper() -> n0_snafu::Result {
    -1200    /// let endpoint = Endpoint::builder().bind().await?;
    -1201    /// assert_eq!(endpoint.metrics().magicsock.recv_datagrams.get(), 0);
    -1202    /// # Ok(())
    -1203    /// # }
    -1204    /// ```
    -1205    ///
    -1206    /// [`EndpointMetrics`] implements [`MetricsGroupSet`], and each field
    -1207    /// implements [`MetricsGroup`]. These traits provide methods to iterate over
    -1208    /// the groups in the set, and over the individual metrics in each group, without having
    -1209    /// to access each field manually. With these methods, it is straightforward to collect
    -1210    /// all metrics into a map or push their values to a metrics collector.
    -1211    ///
    -1212    /// For example, the following snippet collects all metrics into a map:
    -1213    /// ```rust
    -1214    /// # use std::collections::BTreeMap;
    -1215    /// # use iroh_metrics::{Metric, MetricsGroup, MetricValue, MetricsGroupSet};
    -1216    /// # use iroh::endpoint::Endpoint;
    -1217    /// # async fn wrapper() -> n0_snafu::Result {
    -1218    /// let endpoint = Endpoint::builder().bind().await?;
    -1219    /// let metrics: BTreeMap<String, MetricValue> = endpoint
    -1220    ///     .metrics()
    -1221    ///     .iter()
    -1222    ///     .map(|(group, metric)| {
    -1223    ///         let name = [group, metric.name()].join(":");
    -1224    ///         (name, metric.value())
    -1225    ///     })
    -1226    ///     .collect();
    -1227    ///
    -1228    /// assert_eq!(metrics["magicsock:recv_datagrams"], MetricValue::Counter(0));
    -1229    /// # Ok(())
    -1230    /// # }
    -1231    /// ```
    -1232    ///
    -1233    /// The metrics can also be encoded into the OpenMetrics text format, as used by Prometheus.
    -1234    /// To do so, use the [`iroh_metrics::Registry`], add the endpoint metrics to the
    -1235    /// registry with [`Registry::register_all`], and encode the metrics to a string with
    -1236    /// [`encode_openmetrics_to_string`]:
    -1237    /// ```rust
    -1238    /// # use iroh_metrics::{Registry, MetricsSource};
    -1239    /// # use iroh::endpoint::Endpoint;
    -1240    /// # async fn wrapper() -> n0_snafu::Result {
    -1241    /// let endpoint = Endpoint::builder().bind().await?;
    -1242    /// let mut registry = Registry::default();
    -1243    /// registry.register_all(endpoint.metrics());
    -1244    /// let s = registry.encode_openmetrics_to_string()?;
    -1245    /// assert!(s.contains(r#"TYPE magicsock_recv_datagrams counter"#));
    -1246    /// assert!(s.contains(r#"magicsock_recv_datagrams_total 0"#));
    -1247    /// # Ok(())
    -1248    /// # }
    -1249    /// ```
    -1250    ///
    -1251    /// Through a registry, you can also add labels or prefixes to metrics with
    -1252    /// [`Registry::sub_registry_with_label`] or [`Registry::sub_registry_with_prefix`].
    -1253    /// Furthermore, [`iroh_metrics::service`] provides functions to easily start services
    -1254    /// to serve the metrics with a HTTP server, dump them to a file, or push them
    -1255    /// to a Prometheus gateway.
    -1256    ///
    -1257    /// For example, the following snippet launches an HTTP server that serves the metrics in the
    -1258    /// OpenMetrics text format:
    -1259    /// ```no_run
    -1260    /// # use std::{sync::{Arc, RwLock}, time::Duration};
    -1261    /// # use iroh_metrics::{Registry, MetricsSource};
    -1262    /// # use iroh::endpoint::Endpoint;
    -1263    /// # use n0_snafu::ResultExt;
    -1264    /// # async fn wrapper() -> n0_snafu::Result {
    -1265    /// // Create a registry, wrapped in a read-write lock so that we can register and serve
    -1266    /// // the metrics independently.
    -1267    /// let registry = Arc::new(RwLock::new(Registry::default()));
    -1268    /// // Spawn a task to serve the metrics on an OpenMetrics HTTP endpoint.
    -1269    /// let metrics_task = tokio::task::spawn({
    -1270    ///     let registry = registry.clone();
    -1271    ///     async move {
    -1272    ///         let addr = "0.0.0.0:9100".parse().unwrap();
    -1273    ///         iroh_metrics::service::start_metrics_server(addr, registry).await
    -1274    ///     }
    -1275    /// });
    -1276    ///
    -1277    /// // Spawn an endpoint and add the metrics to the registry.
    -1278    /// let endpoint = Endpoint::builder().bind().await?;
    -1279    /// registry.write().unwrap().register_all(endpoint.metrics());
    -1280    ///
    -1281    /// // Wait for the metrics server to bind, then fetch the metrics via HTTP.
    -1282    /// tokio::time::sleep(Duration::from_millis(500));
    -1283    /// let res = reqwest::get("http://localhost:9100/metrics")
    -1284    ///     .await
    -1285    ///     .context("get")?
    -1286    ///     .text()
    -1287    ///     .await
    -1288    ///     .context("text")?;
    -1289    ///
    -1290    /// assert!(res.contains(r#"TYPE magicsock_recv_datagrams counter"#));
    -1291    /// assert!(res.contains(r#"magicsock_recv_datagrams_total 0"#));
    -1292    /// # metrics_task.abort();
    -1293    /// # Ok(())
    -1294    /// # }
    -1295    /// ```
    -1296    ///
    -1297    /// [`Registry`]: iroh_metrics::Registry
    -1298    /// [`Registry::register_all`]: iroh_metrics::Registry::register_all
    -1299    /// [`Registry::sub_registry_with_label`]: iroh_metrics::Registry::sub_registry_with_label
    -1300    /// [`Registry::sub_registry_with_prefix`]: iroh_metrics::Registry::sub_registry_with_prefix
    -1301    /// [`encode_openmetrics_to_string`]: iroh_metrics::MetricsSource::encode_openmetrics_to_string
    -1302    /// [`MetricsGroup`]: iroh_metrics::MetricsGroup
    -1303    /// [`MetricsGroupSet`]: iroh_metrics::MetricsGroupSet
    -1304    #[cfg(feature = "metrics")]
    -1305    pub fn metrics(&self) -> &EndpointMetrics {
    -1306        &self.msock.metrics
    -1307    }
    -1308
    -1309    // # Methods for less common state updates.
    -1310
    -1311    /// Notifies the system of potential network changes.
    -1312    ///
    -1313    /// On many systems iroh is able to detect network changes by itself, however
    -1314    /// some systems like android do not expose this functionality to native code.
    -1315    /// Android does however provide this functionality to Java code.  This
    -1316    /// function allows for notifying iroh of any potential network changes like
    -1317    /// this.
    -1318    ///
    -1319    /// Even when the network did not change, or iroh was already able to detect
    -1320    /// the network change itself, there is no harm in calling this function.
    -1321    pub async fn network_change(&self) {
    -1322        self.msock.network_change().await;
    -1323    }
    -1324
    -1325    // # Methods to update internal state.
    -1326
    -1327    /// Sets the initial user-defined data to be published in discovery services for this node.
    -1328    ///
    -1329    /// If the user-defined data passed to this function is different to the previous one,
    -1330    /// the endpoint will republish its node info to the configured discovery services.
    -1331    ///
    -1332    /// See also [`Builder::user_data_for_discovery`] for setting an initial value when
    -1333    /// building the endpoint.
    -1334    pub fn set_user_data_for_discovery(&self, user_data: Option<UserData>) {
    -1335        self.msock.set_user_data_for_discovery(user_data);
    -1336    }
    -1337
    -1338    // # Methods for terminating the endpoint.
    -1339
    -1340    /// Closes the QUIC endpoint and the magic socket.
    -1341    ///
    -1342    /// This will close any remaining open [`Connection`]s with an error code
    -1343    /// of `0` and an empty reason.  Though it is best practice to close those
    -1344    /// explicitly before with a custom error code and reason.
    -1345    ///
    -1346    /// It will then make a best effort to wait for all close notifications to be
    -1347    /// acknowledged by the peers, re-transmitting them if needed. This ensures the
    -1348    /// peers are aware of the closed connections instead of having to wait for a timeout
    -1349    /// on the connection. Once all connections are closed or timed out, the future
    -1350    /// finishes.
    -1351    ///
    -1352    /// The maximum time-out that this future will wait for depends on QUIC transport
    -1353    /// configurations of non-drained connections at the time of calling, and their current
    -1354    /// estimates of round trip time. With default parameters and a conservative estimate
    -1355    /// of round trip time, this call's future should take 3 seconds to resolve in cases of
    -1356    /// bad connectivity or failed connections. In the usual case, this call's future should
    -1357    /// return much more quickly.
    -1358    ///
    -1359    /// It is highly recommended you *do* wait for this close call to finish, if possible.
    -1360    /// Not doing so will make connections that were still open while closing the endpoint
    -1361    /// time out on the remote end. Thus remote ends will assume connections to have failed
    -1362    /// even if all application data was transmitted successfully.
    -1363    ///
    -1364    /// Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
    -1365    /// for timeouts when closing QUIC endpoints, while they don't have to do this for TCP
    -1366    /// sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
    -1367    /// while TCP sockets usually get closed and drained by the operating system in the
    -1368    /// kernel during the "Time-Wait" period of the TCP socket.
    -1369    ///
    -1370    /// Be aware however that the underlying UDP sockets are only closed once all clones of
    -1371    /// the the respective [`Endpoint`] are dropped.
    -1372    pub async fn close(&self) {
    -1373        if self.is_closed() {
    -1374            return;
    -1375        }
    -1376
    -1377        tracing::debug!("Connections closed");
    -1378        self.msock.close().await;
    -1379    }
    -1380
    -1381    /// Check if this endpoint is still alive, or already closed.
    -1382    pub fn is_closed(&self) -> bool {
    -1383        self.msock.is_closed()
    -1384    }
    -1385
    -1386    // # Remaining private methods
    -1387
    -1388    /// Return the quic mapped address for this `node_id` and possibly start discovery
    -1389    /// services if discovery is enabled on this magic endpoint.
    -1390    ///
    -1391    /// This will launch discovery in all cases except if:
    -1392    /// 1) we do not have discovery enabled
    -1393    /// 2) we have discovery enabled, but already have at least one verified, unexpired
    -1394    ///    addresses for this `node_id`
    +1185    /// [`Registry`]: iroh_metrics::Registry
    +1186    /// [`Registry::register_all`]: iroh_metrics::Registry::register_all
    +1187    /// [`Registry::sub_registry_with_label`]: iroh_metrics::Registry::sub_registry_with_label
    +1188    /// [`Registry::sub_registry_with_prefix`]: iroh_metrics::Registry::sub_registry_with_prefix
    +1189    /// [`encode_openmetrics_to_string`]: iroh_metrics::MetricsSource::encode_openmetrics_to_string
    +1190    /// [`MetricsGroup`]: iroh_metrics::MetricsGroup
    +1191    /// [`MetricsGroupSet`]: iroh_metrics::MetricsGroupSet
    +1192    #[cfg(feature = "metrics")]
    +1193    pub fn metrics(&self) -> &EndpointMetrics {
    +1194        &self.msock.metrics
    +1195    }
    +1196
    +1197    // # Methods for less common state updates.
    +1198
    +1199    /// Notifies the system of potential network changes.
    +1200    ///
    +1201    /// On many systems iroh is able to detect network changes by itself, however
    +1202    /// some systems like android do not expose this functionality to native code.
    +1203    /// Android does however provide this functionality to Java code.  This
    +1204    /// function allows for notifying iroh of any potential network changes like
    +1205    /// this.
    +1206    ///
    +1207    /// Even when the network did not change, or iroh was already able to detect
    +1208    /// the network change itself, there is no harm in calling this function.
    +1209    pub async fn network_change(&self) {
    +1210        self.msock.network_change().await;
    +1211    }
    +1212
    +1213    // # Methods to update internal state.
    +1214
    +1215    /// Sets the initial user-defined data to be published in discovery services for this node.
    +1216    ///
    +1217    /// If the user-defined data passed to this function is different to the previous one,
    +1218    /// the endpoint will republish its node info to the configured discovery services.
    +1219    ///
    +1220    /// See also [`Builder::user_data_for_discovery`] for setting an initial value when
    +1221    /// building the endpoint.
    +1222    pub fn set_user_data_for_discovery(&self, user_data: Option<UserData>) {
    +1223        self.msock.set_user_data_for_discovery(user_data);
    +1224    }
    +1225
    +1226    // # Methods for terminating the endpoint.
    +1227
    +1228    /// Closes the QUIC endpoint and the magic socket.
    +1229    ///
    +1230    /// This will close any remaining open [`Connection`]s with an error code
    +1231    /// of `0` and an empty reason.  Though it is best practice to close those
    +1232    /// explicitly before with a custom error code and reason.
    +1233    ///
    +1234    /// It will then make a best effort to wait for all close notifications to be
    +1235    /// acknowledged by the peers, re-transmitting them if needed. This ensures the
    +1236    /// peers are aware of the closed connections instead of having to wait for a timeout
    +1237    /// on the connection. Once all connections are closed or timed out, the future
    +1238    /// finishes.
    +1239    ///
    +1240    /// The maximum time-out that this future will wait for depends on QUIC transport
    +1241    /// configurations of non-drained connections at the time of calling, and their current
    +1242    /// estimates of round trip time. With default parameters and a conservative estimate
    +1243    /// of round trip time, this call's future should take 3 seconds to resolve in cases of
    +1244    /// bad connectivity or failed connections. In the usual case, this call's future should
    +1245    /// return much more quickly.
    +1246    ///
    +1247    /// It is highly recommended you *do* wait for this close call to finish, if possible.
    +1248    /// Not doing so will make connections that were still open while closing the endpoint
    +1249    /// time out on the remote end. Thus remote ends will assume connections to have failed
    +1250    /// even if all application data was transmitted successfully.
    +1251    ///
    +1252    /// Note: Someone used to closing TCP sockets might wonder why it is necessary to wait
    +1253    /// for timeouts when closing QUIC endpoints, while they don't have to do this for TCP
    +1254    /// sockets. This is due to QUIC and its acknowledgments being implemented in user-land,
    +1255    /// while TCP sockets usually get closed and drained by the operating system in the
    +1256    /// kernel during the "Time-Wait" period of the TCP socket.
    +1257    ///
    +1258    /// Be aware however that the underlying UDP sockets are only closed once all clones of
    +1259    /// the the respective [`Endpoint`] are dropped.
    +1260    pub async fn close(&self) {
    +1261        if self.is_closed() {
    +1262            return;
    +1263        }
    +1264
    +1265        tracing::debug!("Connections closed");
    +1266        self.msock.close().await;
    +1267    }
    +1268
    +1269    /// Check if this endpoint is still alive, or already closed.
    +1270    pub fn is_closed(&self) -> bool {
    +1271        self.msock.is_closed()
    +1272    }
    +1273
    +1274    // # Remaining private methods
    +1275
    +1276    /// Checks if the given `NodeId` needs discovery.
    +1277    pub(crate) fn needs_discovery(&self, node_id: NodeId, max_age: Duration) -> bool {
    +1278        match self.msock.remote_info(node_id) {
    +1279            // No info means no path to node -> start discovery.
    +1280            None => true,
    +1281            Some(info) => {
    +1282                match (
    +1283                    info.last_received(),
    +1284                    info.relay_url.as_ref().and_then(|r| r.last_alive),
    +1285                ) {
    +1286                    // No path to node -> start discovery.
    +1287                    (None, None) => true,
    +1288                    // If we haven't received on direct addresses or the relay for MAX_AGE,
    +1289                    // start discovery.
    +1290                    (Some(elapsed), Some(elapsed_relay)) => {
    +1291                        elapsed > max_age && elapsed_relay > max_age
    +1292                    }
    +1293                    (Some(elapsed), _) | (_, Some(elapsed)) => elapsed > max_age,
    +1294                }
    +1295            }
    +1296        }
    +1297    }
    +1298
    +1299    /// Return the quic mapped address for this `node_id` and possibly start discovery
    +1300    /// services if discovery is enabled on this magic endpoint.
    +1301    ///
    +1302    /// This will launch discovery in all cases except if:
    +1303    /// 1) we do not have discovery enabled
    +1304    /// 2) we have discovery enabled, but already have at least one verified, unexpired
    +1305    ///    addresses for this `node_id`
    +1306    ///
    +1307    /// # Errors
    +1308    ///
    +1309    /// This method may fail if we have no way of dialing the node. This can occur if
    +1310    /// we were given no dialing information in the [`NodeAddr`] and no discovery
    +1311    /// services were configured or if discovery failed to fetch any dialing information.
    +1312    async fn get_mapping_addr_and_maybe_start_discovery(
    +1313        &self,
    +1314        node_addr: NodeAddr,
    +1315    ) -> Result<(NodeIdMappedAddr, Option<DiscoveryTask>), GetMappingAddressError> {
    +1316        let node_id = node_addr.node_id;
    +1317
    +1318        // Only return a mapped addr if we have some way of dialing this node, in other
    +1319        // words, we have either a relay URL or at least one direct address.
    +1320        let addr = if self.msock.has_send_address(node_id) {
    +1321            self.msock.get_mapping_addr(node_id)
    +1322        } else {
    +1323            None
    +1324        };
    +1325        match addr {
    +1326            Some(addr) => {
    +1327                // We have some way of dialing this node, but that doesn't actually mean
    +1328                // we can actually connect to any of these addresses.
    +1329                // Therefore, we will invoke the discovery service if we haven't received from the
    +1330                // endpoint on any of the existing paths recently.
    +1331                // If the user provided addresses in this connect call, we will add a delay
    +1332                // followed by a recheck before starting the discovery, to give the magicsocket a
    +1333                // chance to test the newly provided addresses.
    +1334                let delay = (!node_addr.is_empty()).then_some(DISCOVERY_WAIT_PERIOD);
    +1335                let discovery = DiscoveryTask::maybe_start_after_delay(self, node_id, delay)
    +1336                    .ok()
    +1337                    .flatten();
    +1338                Ok((addr, discovery))
    +1339            }
    +1340
    +1341            None => {
    +1342                // We have no known addresses or relay URLs for this node.
    +1343                // So, we start a discovery task and wait for the first result to arrive, and
    +1344                // only then continue, because otherwise we wouldn't have any
    +1345                // path to the remote endpoint.
    +1346                let res = DiscoveryTask::start(self.clone(), node_id);
    +1347                let mut discovery = res.context(get_mapping_address_error::DiscoveryStartSnafu)?;
    +1348                discovery
    +1349                    .first_arrived()
    +1350                    .await
    +1351                    .context(get_mapping_address_error::DiscoverSnafu)?;
    +1352                if let Some(addr) = self.msock.get_mapping_addr(node_id) {
    +1353                    Ok((addr, Some(discovery)))
    +1354                } else {
    +1355                    Err(get_mapping_address_error::NoAddressSnafu.build())
    +1356                }
    +1357            }
    +1358        }
    +1359    }
    +1360
    +1361    #[cfg(test)]
    +1362    pub(crate) fn magic_sock(&self) -> Handle {
    +1363        self.msock.clone()
    +1364    }
    +1365    #[cfg(test)]
    +1366    pub(crate) fn endpoint(&self) -> &quinn::Endpoint {
    +1367        self.msock.endpoint()
    +1368    }
    +1369}
    +1370
    +1371/// Options for the [`Endpoint::connect_with_opts`] function.
    +1372#[derive(Default, Debug, Clone)]
    +1373pub struct ConnectOptions {
    +1374    transport_config: Option<Arc<TransportConfig>>,
    +1375    additional_alpns: Vec<Vec<u8>>,
    +1376}
    +1377
    +1378impl ConnectOptions {
    +1379    /// Initializes new connection options.
    +1380    ///
    +1381    /// By default, the connection will use the same options
    +1382    /// as [`Endpoint::connect`], e.g. a default [`TransportConfig`].
    +1383    pub fn new() -> Self {
    +1384        Self::default()
    +1385    }
    +1386
    +1387    /// Sets the QUIC transport config options for this connection.
    +1388    pub fn with_transport_config(mut self, transport_config: Arc<TransportConfig>) -> Self {
    +1389        self.transport_config = Some(transport_config);
    +1390        self
    +1391    }
    +1392
    +1393    /// Sets [ALPN] identifiers that should be signaled as supported on connection, *in
    +1394    /// addition* to the main [ALPN] identifier used in [`Endpoint::connect_with_opts`].
     1395    ///
    -1396    /// # Errors
    -1397    ///
    -1398    /// This method may fail if we have no way of dialing the node. This can occur if
    -1399    /// we were given no dialing information in the [`NodeAddr`] and no discovery
    -1400    /// services were configured or if discovery failed to fetch any dialing information.
    -1401    async fn get_mapping_addr_and_maybe_start_discovery(
    -1402        &self,
    -1403        node_addr: NodeAddr,
    -1404    ) -> Result<(NodeIdMappedAddr, Option<DiscoveryTask>), GetMappingAddressError> {
    -1405        let node_id = node_addr.node_id;
    -1406
    -1407        // Only return a mapped addr if we have some way of dialing this node, in other
    -1408        // words, we have either a relay URL or at least one direct address.
    -1409        let addr = if self.msock.has_send_address(node_id) {
    -1410            self.msock.get_mapping_addr(node_id)
    -1411        } else {
    -1412            None
    -1413        };
    -1414        match addr {
    -1415            Some(addr) => {
    -1416                // We have some way of dialing this node, but that doesn't actually mean
    -1417                // we can actually connect to any of these addresses.
    -1418                // Therefore, we will invoke the discovery service if we haven't received from the
    -1419                // endpoint on any of the existing paths recently.
    -1420                // If the user provided addresses in this connect call, we will add a delay
    -1421                // followed by a recheck before starting the discovery, to give the magicsocket a
    -1422                // chance to test the newly provided addresses.
    -1423                let delay = (!node_addr.is_empty()).then_some(DISCOVERY_WAIT_PERIOD);
    -1424                let discovery = DiscoveryTask::maybe_start_after_delay(self, node_id, delay)
    -1425                    .ok()
    -1426                    .flatten();
    -1427                Ok((addr, discovery))
    -1428            }
    -1429
    -1430            None => {
    -1431                // We have no known addresses or relay URLs for this node.
    -1432                // So, we start a discovery task and wait for the first result to arrive, and
    -1433                // only then continue, because otherwise we wouldn't have any
    -1434                // path to the remote endpoint.
    -1435                let res = DiscoveryTask::start(self.clone(), node_id);
    -1436                let mut discovery = res.context(get_mapping_address_error::DiscoveryStartSnafu)?;
    -1437                discovery
    -1438                    .first_arrived()
    -1439                    .await
    -1440                    .context(get_mapping_address_error::DiscoverSnafu)?;
    -1441                if let Some(addr) = self.msock.get_mapping_addr(node_id) {
    -1442                    Ok((addr, Some(discovery)))
    -1443                } else {
    -1444                    Err(get_mapping_address_error::NoAddressSnafu.build())
    -1445                }
    -1446            }
    -1447        }
    -1448    }
    -1449
    -1450    /// Returns a reference to the subscribers channel for discovery events.
    -1451    pub(crate) fn discovery_subscribers(&self) -> &DiscoverySubscribers {
    -1452        self.msock.discovery_subscribers()
    -1453    }
    -1454
    -1455    #[cfg(test)]
    -1456    pub(crate) fn magic_sock(&self) -> Handle {
    -1457        self.msock.clone()
    -1458    }
    -1459    #[cfg(test)]
    -1460    pub(crate) fn endpoint(&self) -> &quinn::Endpoint {
    -1461        self.msock.endpoint()
    -1462    }
    -1463}
    -1464
    -1465/// Options for the [`Endpoint::connect_with_opts`] function.
    -1466#[derive(Default, Debug, Clone)]
    -1467pub struct ConnectOptions {
    -1468    transport_config: Option<Arc<TransportConfig>>,
    -1469    additional_alpns: Vec<Vec<u8>>,
    -1470}
    +1396    /// This allows connecting to servers that may only support older versions of your
    +1397    /// protocol. In this case, you would add the older [ALPN] identifiers with this
    +1398    /// function.
    +1399    ///
    +1400    /// You'll know the final negotiated [ALPN] identifier once your connection was
    +1401    /// established using [`Connection::alpn`], or even slightly earlier in the
    +1402    /// handshake by using [`Connecting::alpn`].
    +1403    /// The negotiated [ALPN] identifier may be any of the [ALPN] identifiers in this
    +1404    /// list or the main [ALPN] used in [`Endpoint::connect_with_opts`].
    +1405    ///
    +1406    /// The [ALPN] identifier order on the connect side doesn't matter, since it's the
    +1407    /// accept side that determines the protocol.
    +1408    ///
    +1409    /// For setting the supported [ALPN] identifiers on the accept side, see the endpoint
    +1410    /// builder's [`Builder::alpns`] function.
    +1411    ///
    +1412    /// [ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
    +1413    pub fn with_additional_alpns(mut self, alpns: Vec<Vec<u8>>) -> Self {
    +1414        self.additional_alpns = alpns;
    +1415        self
    +1416    }
    +1417}
    +1418
    +1419/// Future produced by [`Endpoint::accept`].
    +1420#[derive(derive_more::Debug)]
    +1421#[pin_project]
    +1422pub struct Accept<'a> {
    +1423    #[pin]
    +1424    #[debug("quinn::Accept")]
    +1425    inner: quinn::Accept<'a>,
    +1426    ep: Endpoint,
    +1427}
    +1428
    +1429impl Future for Accept<'_> {
    +1430    type Output = Option<Incoming>;
    +1431
    +1432    fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    +1433        let this = self.project();
    +1434        match this.inner.poll(cx) {
    +1435            Poll::Pending => Poll::Pending,
    +1436            Poll::Ready(None) => Poll::Ready(None),
    +1437            Poll::Ready(Some(inner)) => Poll::Ready(Some(Incoming {
    +1438                inner,
    +1439                ep: this.ep.clone(),
    +1440            })),
    +1441        }
    +1442    }
    +1443}
    +1444
    +1445/// An incoming connection for which the server has not yet begun its parts of the
    +1446/// handshake.
    +1447#[derive(Debug)]
    +1448pub struct Incoming {
    +1449    inner: quinn::Incoming,
    +1450    ep: Endpoint,
    +1451}
    +1452
    +1453impl Incoming {
    +1454    /// Attempts to accept this incoming connection (an error may still occur).
    +1455    ///
    +1456    /// Errors occurring here are likely not caused by the application or remote.  The QUIC
    +1457    /// connection listens on a normal UDP socket and any reachable network endpoint can
    +1458    /// send datagrams to it, solicited or not.  Even if the first few bytes look like a
    +1459    /// QUIC packet, it might not even be a QUIC packet that is being received.
    +1460    ///
    +1461    /// Thus it is common to simply log the errors here and accept them as something which
    +1462    /// can happen.
    +1463    pub fn accept(self) -> Result<Connecting, ConnectionError> {
    +1464        self.inner.accept().map(|conn| Connecting {
    +1465            inner: conn,
    +1466            ep: self.ep,
    +1467            remote_node_id: None,
    +1468            _discovery_drop_guard: None,
    +1469        })
    +1470    }
     1471
    -1472impl ConnectOptions {
    -1473    /// Initializes new connection options.
    -1474    ///
    -1475    /// By default, the connection will use the same options
    -1476    /// as [`Endpoint::connect`], e.g. a default [`TransportConfig`].
    -1477    pub fn new() -> Self {
    -1478        Self::default()
    -1479    }
    -1480
    -1481    /// Sets the QUIC transport config options for this connection.
    -1482    pub fn with_transport_config(mut self, transport_config: Arc<TransportConfig>) -> Self {
    -1483        self.transport_config = Some(transport_config);
    -1484        self
    -1485    }
    -1486
    -1487    /// Sets [ALPN] identifiers that should be signaled as supported on connection, *in
    -1488    /// addition* to the main [ALPN] identifier used in [`Endpoint::connect_with_opts`].
    -1489    ///
    -1490    /// This allows connecting to servers that may only support older versions of your
    -1491    /// protocol. In this case, you would add the older [ALPN] identifiers with this
    -1492    /// function.
    -1493    ///
    -1494    /// You'll know the final negotiated [ALPN] identifier once your connection was
    -1495    /// established using [`Connection::alpn`], or even slightly earlier in the
    -1496    /// handshake by using [`Connecting::alpn`].
    -1497    /// The negotiated [ALPN] identifier may be any of the [ALPN] identifiers in this
    -1498    /// list or the main [ALPN] used in [`Endpoint::connect_with_opts`].
    +1472    /// Accepts this incoming connection using a custom configuration.
    +1473    ///
    +1474    /// See [`accept()`] for more details.
    +1475    ///
    +1476    /// [`accept()`]: Incoming::accept
    +1477    pub fn accept_with(
    +1478        self,
    +1479        server_config: Arc<ServerConfig>,
    +1480    ) -> Result<Connecting, ConnectionError> {
    +1481        self.inner
    +1482            .accept_with(server_config)
    +1483            .map(|conn| Connecting {
    +1484                inner: conn,
    +1485                ep: self.ep,
    +1486                remote_node_id: None,
    +1487                _discovery_drop_guard: None,
    +1488            })
    +1489    }
    +1490
    +1491    /// Rejects this incoming connection attempt.
    +1492    pub fn refuse(self) {
    +1493        self.inner.refuse()
    +1494    }
    +1495
    +1496    /// Responds with a retry packet.
    +1497    ///
    +1498    /// This requires the client to retry with address validation.
     1499    ///
    -1500    /// The [ALPN] identifier order on the connect side doesn't matter, since it's the
    -1501    /// accept side that determines the protocol.
    -1502    ///
    -1503    /// For setting the supported [ALPN] identifiers on the accept side, see the endpoint
    -1504    /// builder's [`Builder::alpns`] function.
    -1505    ///
    -1506    /// [ALPN]: https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation
    -1507    pub fn with_additional_alpns(mut self, alpns: Vec<Vec<u8>>) -> Self {
    -1508        self.additional_alpns = alpns;
    -1509        self
    -1510    }
    -1511}
    -1512
    -1513/// Future produced by [`Endpoint::accept`].
    -1514#[derive(derive_more::Debug)]
    -1515#[pin_project]
    -1516pub struct Accept<'a> {
    -1517    #[pin]
    -1518    #[debug("quinn::Accept")]
    -1519    inner: quinn::Accept<'a>,
    -1520    ep: Endpoint,
    -1521}
    -1522
    -1523impl Future for Accept<'_> {
    -1524    type Output = Option<Incoming>;
    -1525
    -1526    fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    -1527        let this = self.project();
    -1528        match this.inner.poll(cx) {
    -1529            Poll::Pending => Poll::Pending,
    -1530            Poll::Ready(None) => Poll::Ready(None),
    -1531            Poll::Ready(Some(inner)) => Poll::Ready(Some(Incoming {
    -1532                inner,
    -1533                ep: this.ep.clone(),
    -1534            })),
    -1535        }
    -1536    }
    -1537}
    -1538
    -1539/// An incoming connection for which the server has not yet begun its parts of the
    -1540/// handshake.
    -1541#[derive(Debug)]
    -1542pub struct Incoming {
    -1543    inner: quinn::Incoming,
    -1544    ep: Endpoint,
    -1545}
    -1546
    -1547impl Incoming {
    -1548    /// Attempts to accept this incoming connection (an error may still occur).
    -1549    ///
    -1550    /// Errors occurring here are likely not caused by the application or remote.  The QUIC
    -1551    /// connection listens on a normal UDP socket and any reachable network endpoint can
    -1552    /// send datagrams to it, solicited or not.  Even if the first few bytes look like a
    -1553    /// QUIC packet, it might not even be a QUIC packet that is being received.
    -1554    ///
    -1555    /// Thus it is common to simply log the errors here and accept them as something which
    -1556    /// can happen.
    -1557    pub fn accept(self) -> Result<Connecting, ConnectionError> {
    -1558        self.inner.accept().map(|conn| Connecting {
    -1559            inner: conn,
    -1560            ep: self.ep,
    -1561            remote_node_id: None,
    -1562            _discovery_drop_guard: None,
    -1563        })
    -1564    }
    -1565
    -1566    /// Accepts this incoming connection using a custom configuration.
    -1567    ///
    -1568    /// See [`accept()`] for more details.
    -1569    ///
    -1570    /// [`accept()`]: Incoming::accept
    -1571    pub fn accept_with(
    -1572        self,
    -1573        server_config: Arc<ServerConfig>,
    -1574    ) -> Result<Connecting, ConnectionError> {
    -1575        self.inner
    -1576            .accept_with(server_config)
    -1577            .map(|conn| Connecting {
    -1578                inner: conn,
    -1579                ep: self.ep,
    -1580                remote_node_id: None,
    -1581                _discovery_drop_guard: None,
    -1582            })
    -1583    }
    -1584
    -1585    /// Rejects this incoming connection attempt.
    -1586    pub fn refuse(self) {
    -1587        self.inner.refuse()
    -1588    }
    -1589
    -1590    /// Responds with a retry packet.
    -1591    ///
    -1592    /// This requires the client to retry with address validation.
    -1593    ///
    -1594    /// Errors if `remote_address_validated()` is true.
    -1595    #[allow(clippy::result_large_err)]
    -1596    pub fn retry(self) -> Result<(), RetryError> {
    -1597        self.inner.retry()
    -1598    }
    -1599
    -1600    /// Ignores this incoming connection attempt, not sending any packet in response.
    -1601    pub fn ignore(self) {
    -1602        self.inner.ignore()
    -1603    }
    -1604
    -1605    /// Returns the local IP address which was used when the peer established the
    -1606    /// connection.
    -1607    pub fn local_ip(&self) -> Option<IpAddr> {
    -1608        self.inner.local_ip()
    -1609    }
    -1610
    -1611    /// Returns the peer's UDP address.
    -1612    pub fn remote_address(&self) -> SocketAddr {
    -1613        self.inner.remote_address()
    -1614    }
    -1615
    -1616    /// Whether the socket address that is initiating this connection has been validated.
    -1617    ///
    -1618    /// This means that the sender of the initial packet has proved that they can receive
    -1619    /// traffic sent to `self.remote_address()`.
    -1620    pub fn remote_address_validated(&self) -> bool {
    -1621        self.inner.remote_address_validated()
    -1622    }
    -1623}
    -1624
    -1625impl IntoFuture for Incoming {
    -1626    type Output = Result<Connection, ConnectionError>;
    -1627    type IntoFuture = IncomingFuture;
    -1628
    -1629    fn into_future(self) -> Self::IntoFuture {
    -1630        IncomingFuture {
    -1631            inner: self.inner.into_future(),
    -1632            ep: self.ep,
    -1633        }
    -1634    }
    -1635}
    -1636
    -1637/// Adaptor to let [`Incoming`] be `await`ed like a [`Connecting`].
    -1638#[derive(Debug)]
    -1639#[pin_project]
    -1640pub struct IncomingFuture {
    -1641    #[pin]
    -1642    inner: quinn::IncomingFuture,
    -1643    ep: Endpoint,
    -1644}
    -1645
    -1646impl Future for IncomingFuture {
    -1647    type Output = Result<Connection, ConnectionError>;
    -1648
    -1649    fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    -1650        let this = self.project();
    -1651        match this.inner.poll(cx) {
    -1652            Poll::Pending => Poll::Pending,
    -1653            Poll::Ready(Err(err)) => Poll::Ready(Err(err)),
    -1654            Poll::Ready(Ok(inner)) => {
    -1655                let conn = Connection { inner };
    -1656                try_send_rtt_msg(&conn, this.ep, None);
    -1657                Poll::Ready(Ok(conn))
    -1658            }
    -1659        }
    -1660    }
    -1661}
    -1662
    -1663/// In-progress connection attempt future
    -1664#[derive(derive_more::Debug)]
    -1665#[pin_project]
    -1666pub struct Connecting {
    -1667    #[pin]
    -1668    inner: quinn::Connecting,
    -1669    ep: Endpoint,
    -1670    remote_node_id: Option<NodeId>,
    -1671    /// We run discovery as long as we haven't established a connection yet.
    -1672    #[debug("Option<DiscoveryTask>")]
    -1673    _discovery_drop_guard: Option<DiscoveryTask>,
    -1674}
    -1675
    -1676#[allow(missing_docs)]
    -1677#[common_fields({
    -1678    backtrace: Option<snafu::Backtrace>,
    -1679    #[snafu(implicit)]
    -1680    span_trace: n0_snafu::SpanTrace,
    -1681})]
    -1682#[derive(Debug, Snafu)]
    -1683#[non_exhaustive]
    -1684pub enum AlpnError {
    -1685    #[snafu(transparent)]
    -1686    ConnectionError { source: ConnectionError },
    -1687    #[snafu(display("No ALPN available"))]
    -1688    Unavailable {},
    -1689    #[snafu(display("Unknown handshake type"))]
    -1690    UnknownHandshake {},
    -1691}
    +1500    /// Errors if `remote_address_validated()` is true.
    +1501    #[allow(clippy::result_large_err)]
    +1502    pub fn retry(self) -> Result<(), RetryError> {
    +1503        self.inner.retry()
    +1504    }
    +1505
    +1506    /// Ignores this incoming connection attempt, not sending any packet in response.
    +1507    pub fn ignore(self) {
    +1508        self.inner.ignore()
    +1509    }
    +1510
    +1511    /// Returns the local IP address which was used when the peer established the
    +1512    /// connection.
    +1513    pub fn local_ip(&self) -> Option<IpAddr> {
    +1514        self.inner.local_ip()
    +1515    }
    +1516
    +1517    /// Returns the peer's UDP address.
    +1518    pub fn remote_address(&self) -> SocketAddr {
    +1519        self.inner.remote_address()
    +1520    }
    +1521
    +1522    /// Whether the socket address that is initiating this connection has been validated.
    +1523    ///
    +1524    /// This means that the sender of the initial packet has proved that they can receive
    +1525    /// traffic sent to `self.remote_address()`.
    +1526    pub fn remote_address_validated(&self) -> bool {
    +1527        self.inner.remote_address_validated()
    +1528    }
    +1529}
    +1530
    +1531impl IntoFuture for Incoming {
    +1532    type Output = Result<Connection, ConnectionError>;
    +1533    type IntoFuture = IncomingFuture;
    +1534
    +1535    fn into_future(self) -> Self::IntoFuture {
    +1536        IncomingFuture {
    +1537            inner: self.inner.into_future(),
    +1538            ep: self.ep,
    +1539        }
    +1540    }
    +1541}
    +1542
    +1543/// Adaptor to let [`Incoming`] be `await`ed like a [`Connecting`].
    +1544#[derive(Debug)]
    +1545#[pin_project]
    +1546pub struct IncomingFuture {
    +1547    #[pin]
    +1548    inner: quinn::IncomingFuture,
    +1549    ep: Endpoint,
    +1550}
    +1551
    +1552impl Future for IncomingFuture {
    +1553    type Output = Result<Connection, ConnectionError>;
    +1554
    +1555    fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    +1556        let this = self.project();
    +1557        match this.inner.poll(cx) {
    +1558            Poll::Pending => Poll::Pending,
    +1559            Poll::Ready(Err(err)) => Poll::Ready(Err(err)),
    +1560            Poll::Ready(Ok(inner)) => {
    +1561                let conn = Connection { inner };
    +1562                try_send_rtt_msg(&conn, this.ep, None);
    +1563                Poll::Ready(Ok(conn))
    +1564            }
    +1565        }
    +1566    }
    +1567}
    +1568
    +1569/// In-progress connection attempt future
    +1570#[derive(derive_more::Debug)]
    +1571#[pin_project]
    +1572pub struct Connecting {
    +1573    #[pin]
    +1574    inner: quinn::Connecting,
    +1575    ep: Endpoint,
    +1576    remote_node_id: Option<NodeId>,
    +1577    /// We run discovery as long as we haven't established a connection yet.
    +1578    #[debug("Option<DiscoveryTask>")]
    +1579    _discovery_drop_guard: Option<DiscoveryTask>,
    +1580}
    +1581
    +1582#[allow(missing_docs)]
    +1583#[common_fields({
    +1584    backtrace: Option<snafu::Backtrace>,
    +1585    #[snafu(implicit)]
    +1586    span_trace: n0_snafu::SpanTrace,
    +1587})]
    +1588#[derive(Debug, Snafu)]
    +1589#[non_exhaustive]
    +1590pub enum AlpnError {
    +1591    #[snafu(transparent)]
    +1592    ConnectionError { source: ConnectionError },
    +1593    #[snafu(display("No ALPN available"))]
    +1594    Unavailable {},
    +1595    #[snafu(display("Unknown handshake type"))]
    +1596    UnknownHandshake {},
    +1597}
    +1598
    +1599impl Connecting {
    +1600    /// Converts this [`Connecting`] into a 0-RTT or 0.5-RTT connection at the cost of weakened
    +1601    /// security.
    +1602    ///
    +1603    /// Returns `Ok` immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
    +1604    /// If so, the returned [`Connection`] can be used to send application data without waiting for
    +1605    /// the rest of the handshake to complete, at the cost of weakened cryptographic security
    +1606    /// guarantees. The returned [`ZeroRttAccepted`] future resolves when the handshake does
    +1607    /// complete, at which point subsequently opened streams and written data will have full
    +1608    /// cryptographic protection.
    +1609    ///
    +1610    /// Once the [`ZeroRttAccepted`] future completed, a full handshake has been carried through
    +1611    /// and any data sent and any streams opened on the [`Connection`] will operate with the same
    +1612    /// security as on normal 1-RTT connections.
    +1613    ///
    +1614    /// ## Outgoing
    +1615    ///
    +1616    /// For outgoing connections, the initial attempt to convert to a [`Connection`] which sends
    +1617    /// 0-RTT data will attempt to resume a previous TLS session. However, **the remote endpoint
    +1618    /// may not actually _accept_ the 0-RTT data**--yet still accept the connection attempt in
    +1619    /// general. This possibility is conveyed through the [`ZeroRttAccepted`] future--when the
    +1620    /// handshake completes, it resolves to true if the 0-RTT data was accepted and false if it was
    +1621    /// rejected. If it was rejected, the existence of streams opened and other application data
    +1622    /// sent prior to the handshake completing will not be conveyed to the remote application, and
    +1623    /// local operations on them will return `ZeroRttRejected` errors.
    +1624    ///
    +1625    /// A server may reject 0-RTT data at its discretion, but accepting 0-RTT data requires the
    +1626    /// relevant resumption state to be stored in the server, which servers may limit or lose for
    +1627    /// various reasons including not persisting resumption state across server restarts.
    +1628    ///
    +1629    /// ## Incoming
    +1630    ///
    +1631    /// For incoming connections, conversion to 0.5-RTT will always fully succeed. `into_0rtt` will
    +1632    /// always return `Ok` and the [`ZeroRttAccepted`] will always resolve to true.
    +1633    ///
    +1634    /// ## Security
    +1635    ///
    +1636    /// On outgoing connections, this enables transmission of 0-RTT data, which is vulnerable to
    +1637    /// replay attacks, and should therefore never invoke non-idempotent operations.
    +1638    ///
    +1639    /// On incoming connections, this enables transmission of 0.5-RTT data, which may be sent
    +1640    /// before TLS client authentication has occurred, and should therefore not be used to send
    +1641    /// data for which client authentication is being used.
    +1642    ///
    +1643    /// You can use [`RecvStream::is_0rtt`] to check whether a stream has been opened in 0-RTT
    +1644    /// and thus whether parts of the stream are operating under this reduced security level.
    +1645    #[allow(clippy::result_large_err)]
    +1646    pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self> {
    +1647        match self.inner.into_0rtt() {
    +1648            Ok((inner, zrtt_accepted)) => {
    +1649                let conn = Connection { inner };
    +1650                let zrtt_accepted = ZeroRttAccepted {
    +1651                    inner: zrtt_accepted,
    +1652                    _discovery_drop_guard: self._discovery_drop_guard,
    +1653                };
    +1654                // This call is why `self.remote_node_id` was introduced.
    +1655                // When we `Connecting::into_0rtt`, then we don't yet have `handshake_data`
    +1656                // in our `Connection`, thus `try_send_rtt_msg` won't be able to pick up
    +1657                // `Connection::remote_node_id`.
    +1658                // Instead, we provide `self.remote_node_id` here - we know it in advance,
    +1659                // after all.
    +1660                try_send_rtt_msg(&conn, &self.ep, self.remote_node_id);
    +1661                Ok((conn, zrtt_accepted))
    +1662            }
    +1663            Err(inner) => Err(Self {
    +1664                inner,
    +1665                ep: self.ep,
    +1666                remote_node_id: self.remote_node_id,
    +1667                _discovery_drop_guard: self._discovery_drop_guard,
    +1668            }),
    +1669        }
    +1670    }
    +1671
    +1672    /// Parameters negotiated during the handshake
    +1673    pub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError> {
    +1674        self.inner.handshake_data().await
    +1675    }
    +1676
    +1677    /// Extracts the ALPN protocol from the peer's handshake data.
    +1678    pub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError> {
    +1679        let data = self.handshake_data().await?;
    +1680        match data.downcast::<quinn::crypto::rustls::HandshakeData>() {
    +1681            Ok(data) => match data.protocol {
    +1682                Some(protocol) => Ok(protocol),
    +1683                None => Err(UnavailableSnafu.build()),
    +1684            },
    +1685            Err(_) => Err(UnknownHandshakeSnafu.build()),
    +1686        }
    +1687    }
    +1688}
    +1689
    +1690impl Future for Connecting {
    +1691    type Output = Result<Connection, ConnectionError>;
     1692
    -1693impl Connecting {
    -1694    /// Converts this [`Connecting`] into a 0-RTT or 0.5-RTT connection at the cost of weakened
    -1695    /// security.
    -1696    ///
    -1697    /// Returns `Ok` immediately if the local endpoint is able to attempt sending 0/0.5-RTT data.
    -1698    /// If so, the returned [`Connection`] can be used to send application data without waiting for
    -1699    /// the rest of the handshake to complete, at the cost of weakened cryptographic security
    -1700    /// guarantees. The returned [`ZeroRttAccepted`] future resolves when the handshake does
    -1701    /// complete, at which point subsequently opened streams and written data will have full
    -1702    /// cryptographic protection.
    -1703    ///
    -1704    /// Once the [`ZeroRttAccepted`] future completed, a full handshake has been carried through
    -1705    /// and any data sent and any streams opened on the [`Connection`] will operate with the same
    -1706    /// security as on normal 1-RTT connections.
    -1707    ///
    -1708    /// ## Outgoing
    -1709    ///
    -1710    /// For outgoing connections, the initial attempt to convert to a [`Connection`] which sends
    -1711    /// 0-RTT data will attempt to resume a previous TLS session. However, **the remote endpoint
    -1712    /// may not actually _accept_ the 0-RTT data**--yet still accept the connection attempt in
    -1713    /// general. This possibility is conveyed through the [`ZeroRttAccepted`] future--when the
    -1714    /// handshake completes, it resolves to true if the 0-RTT data was accepted and false if it was
    -1715    /// rejected. If it was rejected, the existence of streams opened and other application data
    -1716    /// sent prior to the handshake completing will not be conveyed to the remote application, and
    -1717    /// local operations on them will return `ZeroRttRejected` errors.
    -1718    ///
    -1719    /// A server may reject 0-RTT data at its discretion, but accepting 0-RTT data requires the
    -1720    /// relevant resumption state to be stored in the server, which servers may limit or lose for
    -1721    /// various reasons including not persisting resumption state across server restarts.
    -1722    ///
    -1723    /// ## Incoming
    -1724    ///
    -1725    /// For incoming connections, conversion to 0.5-RTT will always fully succeed. `into_0rtt` will
    -1726    /// always return `Ok` and the [`ZeroRttAccepted`] will always resolve to true.
    -1727    ///
    -1728    /// ## Security
    -1729    ///
    -1730    /// On outgoing connections, this enables transmission of 0-RTT data, which is vulnerable to
    -1731    /// replay attacks, and should therefore never invoke non-idempotent operations.
    -1732    ///
    -1733    /// On incoming connections, this enables transmission of 0.5-RTT data, which may be sent
    -1734    /// before TLS client authentication has occurred, and should therefore not be used to send
    -1735    /// data for which client authentication is being used.
    -1736    ///
    -1737    /// You can use [`RecvStream::is_0rtt`] to check whether a stream has been opened in 0-RTT
    -1738    /// and thus whether parts of the stream are operating under this reduced security level.
    -1739    #[allow(clippy::result_large_err)]
    -1740    pub fn into_0rtt(self) -> Result<(Connection, ZeroRttAccepted), Self> {
    -1741        match self.inner.into_0rtt() {
    -1742            Ok((inner, zrtt_accepted)) => {
    -1743                let conn = Connection { inner };
    -1744                let zrtt_accepted = ZeroRttAccepted {
    -1745                    inner: zrtt_accepted,
    -1746                    _discovery_drop_guard: self._discovery_drop_guard,
    -1747                };
    -1748                // This call is why `self.remote_node_id` was introduced.
    -1749                // When we `Connecting::into_0rtt`, then we don't yet have `handshake_data`
    -1750                // in our `Connection`, thus `try_send_rtt_msg` won't be able to pick up
    -1751                // `Connection::remote_node_id`.
    -1752                // Instead, we provide `self.remote_node_id` here - we know it in advance,
    -1753                // after all.
    -1754                try_send_rtt_msg(&conn, &self.ep, self.remote_node_id);
    -1755                Ok((conn, zrtt_accepted))
    -1756            }
    -1757            Err(inner) => Err(Self {
    -1758                inner,
    -1759                ep: self.ep,
    -1760                remote_node_id: self.remote_node_id,
    -1761                _discovery_drop_guard: self._discovery_drop_guard,
    -1762            }),
    -1763        }
    -1764    }
    -1765
    -1766    /// Parameters negotiated during the handshake
    -1767    pub async fn handshake_data(&mut self) -> Result<Box<dyn Any>, ConnectionError> {
    -1768        self.inner.handshake_data().await
    -1769    }
    -1770
    -1771    /// Extracts the ALPN protocol from the peer's handshake data.
    -1772    pub async fn alpn(&mut self) -> Result<Vec<u8>, AlpnError> {
    -1773        let data = self.handshake_data().await?;
    -1774        match data.downcast::<quinn::crypto::rustls::HandshakeData>() {
    -1775            Ok(data) => match data.protocol {
    -1776                Some(protocol) => Ok(protocol),
    -1777                None => Err(UnavailableSnafu.build()),
    -1778            },
    -1779            Err(_) => Err(UnknownHandshakeSnafu.build()),
    -1780        }
    -1781    }
    -1782}
    -1783
    -1784impl Future for Connecting {
    -1785    type Output = Result<Connection, ConnectionError>;
    +1693    fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    +1694        let this = self.project();
    +1695        match this.inner.poll(cx) {
    +1696            Poll::Pending => Poll::Pending,
    +1697            Poll::Ready(Err(err)) => Poll::Ready(Err(err)),
    +1698            Poll::Ready(Ok(inner)) => {
    +1699                let conn = Connection { inner };
    +1700                try_send_rtt_msg(&conn, this.ep, *this.remote_node_id);
    +1701                Poll::Ready(Ok(conn))
    +1702            }
    +1703        }
    +1704    }
    +1705}
    +1706
    +1707/// Future that completes when a connection is fully established.
    +1708///
    +1709/// For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
    +1710/// value is meaningless.
    +1711#[derive(derive_more::Debug)]
    +1712#[debug("ZeroRttAccepted")]
    +1713pub struct ZeroRttAccepted {
    +1714    inner: quinn::ZeroRttAccepted,
    +1715    /// When we call `Connecting::into_0rtt`, we don't want to stop discovery, so we transfer the task
    +1716    /// to this future.
    +1717    /// When `quinn::ZeroRttAccepted` resolves, we've successfully received data from the remote.
    +1718    /// Thus, that's the right time to drop discovery to preserve the behaviour similar to
    +1719    /// `Connecting` -> `Connection` without 0-RTT.
    +1720    /// Should we eventually decide to keep the discovery task alive for the duration of the whole
    +1721    /// `Connection`, then this task should be transferred to the `Connection` instead of here.
    +1722    _discovery_drop_guard: Option<DiscoveryTask>,
    +1723}
    +1724
    +1725impl Future for ZeroRttAccepted {
    +1726    type Output = bool;
    +1727    fn poll(mut self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    +1728        Pin::new(&mut self.inner).poll(cx)
    +1729    }
    +1730}
    +1731
    +1732/// A QUIC connection.
    +1733///
    +1734/// If all references to a connection (including every clone of the Connection handle,
    +1735/// streams of incoming streams, and the various stream types) have been dropped, then the
    +1736/// connection will be automatically closed with an error_code of 0 and an empty reason. You
    +1737/// can also close the connection explicitly by calling [`Connection::close`].
    +1738///
    +1739/// Closing the connection immediately abandons efforts to deliver data to the peer. Upon
    +1740/// receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered to the
    +1741/// application. [`Connection::close`] describes in more detail how to gracefully close a
    +1742/// connection without losing application data.
    +1743///
    +1744/// May be cloned to obtain another handle to the same connection.
    +1745#[derive(Debug, Clone)]
    +1746pub struct Connection {
    +1747    inner: quinn::Connection,
    +1748}
    +1749
    +1750#[allow(missing_docs)]
    +1751#[derive(Debug, Snafu)]
    +1752#[snafu(display("Protocol error: no remote id available"))]
    +1753pub struct RemoteNodeIdError {
    +1754    backtrace: Option<snafu::Backtrace>,
    +1755}
    +1756
    +1757impl Connection {
    +1758    /// Initiates a new outgoing unidirectional stream.
    +1759    ///
    +1760    /// Streams are cheap and instantaneous to open unless blocked by flow control. As a
    +1761    /// consequence, the peer won’t be notified that a stream has been opened until the
    +1762    /// stream is actually used.
    +1763    #[inline]
    +1764    pub fn open_uni(&self) -> OpenUni<'_> {
    +1765        self.inner.open_uni()
    +1766    }
    +1767
    +1768    /// Initiates a new outgoing bidirectional stream.
    +1769    ///
    +1770    /// Streams are cheap and instantaneous to open unless blocked by flow control. As a
    +1771    /// consequence, the peer won't be notified that a stream has been opened until the
    +1772    /// stream is actually used. Calling [`open_bi`] then waiting on the [`RecvStream`]
    +1773    /// without writing anything to [`SendStream`] will never succeed.
    +1774    ///
    +1775    /// [`open_bi`]: Connection::open_bi
    +1776    #[inline]
    +1777    pub fn open_bi(&self) -> OpenBi<'_> {
    +1778        self.inner.open_bi()
    +1779    }
    +1780
    +1781    /// Accepts the next incoming uni-directional stream.
    +1782    #[inline]
    +1783    pub fn accept_uni(&self) -> AcceptUni<'_> {
    +1784        self.inner.accept_uni()
    +1785    }
     1786
    -1787    fn poll(self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    -1788        let this = self.project();
    -1789        match this.inner.poll(cx) {
    -1790            Poll::Pending => Poll::Pending,
    -1791            Poll::Ready(Err(err)) => Poll::Ready(Err(err)),
    -1792            Poll::Ready(Ok(inner)) => {
    -1793                let conn = Connection { inner };
    -1794                try_send_rtt_msg(&conn, this.ep, *this.remote_node_id);
    -1795                Poll::Ready(Ok(conn))
    -1796            }
    -1797        }
    +1787    /// Accept the next incoming bidirectional stream.
    +1788    ///
    +1789    /// **Important Note**: The peer that calls [`open_bi`] must write to its [`SendStream`]
    +1790    /// before the peer `Connection` is able to accept the stream using
    +1791    /// `accept_bi()`. Calling [`open_bi`] then waiting on the [`RecvStream`] without
    +1792    /// writing anything to the connected [`SendStream`] will never succeed.
    +1793    ///
    +1794    /// [`open_bi`]: Connection::open_bi
    +1795    #[inline]
    +1796    pub fn accept_bi(&self) -> AcceptBi<'_> {
    +1797        self.inner.accept_bi()
     1798    }
    -1799}
    -1800
    -1801/// Future that completes when a connection is fully established.
    -1802///
    -1803/// For clients, the resulting value indicates if 0-RTT was accepted. For servers, the resulting
    -1804/// value is meaningless.
    -1805#[derive(derive_more::Debug)]
    -1806#[debug("ZeroRttAccepted")]
    -1807pub struct ZeroRttAccepted {
    -1808    inner: quinn::ZeroRttAccepted,
    -1809    /// When we call `Connecting::into_0rtt`, we don't want to stop discovery, so we transfer the task
    -1810    /// to this future.
    -1811    /// When `quinn::ZeroRttAccepted` resolves, we've successfully received data from the remote.
    -1812    /// Thus, that's the right time to drop discovery to preserve the behaviour similar to
    -1813    /// `Connecting` -> `Connection` without 0-RTT.
    -1814    /// Should we eventually decide to keep the discovery task alive for the duration of the whole
    -1815    /// `Connection`, then this task should be transferred to the `Connection` instead of here.
    -1816    _discovery_drop_guard: Option<DiscoveryTask>,
    -1817}
    -1818
    -1819impl Future for ZeroRttAccepted {
    -1820    type Output = bool;
    -1821    fn poll(mut self: Pin<&mut Self>, cx: &mut std::task::Context<'_>) -> Poll<Self::Output> {
    -1822        Pin::new(&mut self.inner).poll(cx)
    -1823    }
    -1824}
    -1825
    -1826/// A QUIC connection.
    -1827///
    -1828/// If all references to a connection (including every clone of the Connection handle,
    -1829/// streams of incoming streams, and the various stream types) have been dropped, then the
    -1830/// connection will be automatically closed with an error_code of 0 and an empty reason. You
    -1831/// can also close the connection explicitly by calling [`Connection::close`].
    -1832///
    -1833/// Closing the connection immediately abandons efforts to deliver data to the peer. Upon
    -1834/// receiving CONNECTION_CLOSE the peer may drop any stream data not yet delivered to the
    -1835/// application. [`Connection::close`] describes in more detail how to gracefully close a
    -1836/// connection without losing application data.
    -1837///
    -1838/// May be cloned to obtain another handle to the same connection.
    -1839#[derive(Debug, Clone)]
    -1840pub struct Connection {
    -1841    inner: quinn::Connection,
    -1842}
    -1843
    -1844#[allow(missing_docs)]
    -1845#[derive(Debug, Snafu)]
    -1846#[snafu(display("Protocol error: no remote id available"))]
    -1847pub struct RemoteNodeIdError {
    -1848    backtrace: Option<snafu::Backtrace>,
    -1849}
    -1850
    -1851impl Connection {
    -1852    /// Initiates a new outgoing unidirectional stream.
    -1853    ///
    -1854    /// Streams are cheap and instantaneous to open unless blocked by flow control. As a
    -1855    /// consequence, the peer won’t be notified that a stream has been opened until the
    -1856    /// stream is actually used.
    -1857    #[inline]
    -1858    pub fn open_uni(&self) -> OpenUni<'_> {
    -1859        self.inner.open_uni()
    -1860    }
    -1861
    -1862    /// Initiates a new outgoing bidirectional stream.
    -1863    ///
    -1864    /// Streams are cheap and instantaneous to open unless blocked by flow control. As a
    -1865    /// consequence, the peer won't be notified that a stream has been opened until the
    -1866    /// stream is actually used. Calling [`open_bi`] then waiting on the [`RecvStream`]
    -1867    /// without writing anything to [`SendStream`] will never succeed.
    -1868    ///
    -1869    /// [`open_bi`]: Connection::open_bi
    -1870    #[inline]
    -1871    pub fn open_bi(&self) -> OpenBi<'_> {
    -1872        self.inner.open_bi()
    -1873    }
    -1874
    -1875    /// Accepts the next incoming uni-directional stream.
    -1876    #[inline]
    -1877    pub fn accept_uni(&self) -> AcceptUni<'_> {
    -1878        self.inner.accept_uni()
    -1879    }
    -1880
    -1881    /// Accept the next incoming bidirectional stream.
    -1882    ///
    -1883    /// **Important Note**: The peer that calls [`open_bi`] must write to its [`SendStream`]
    -1884    /// before the peer `Connection` is able to accept the stream using
    -1885    /// `accept_bi()`. Calling [`open_bi`] then waiting on the [`RecvStream`] without
    -1886    /// writing anything to the connected [`SendStream`] will never succeed.
    -1887    ///
    -1888    /// [`open_bi`]: Connection::open_bi
    -1889    #[inline]
    -1890    pub fn accept_bi(&self) -> AcceptBi<'_> {
    -1891        self.inner.accept_bi()
    -1892    }
    -1893
    -1894    /// Receives an application datagram.
    -1895    #[inline]
    -1896    pub fn read_datagram(&self) -> ReadDatagram<'_> {
    -1897        self.inner.read_datagram()
    -1898    }
    -1899
    -1900    /// Wait for the connection to be closed for any reason.
    -1901    ///
    -1902    /// Despite the return type's name, closed connections are often not an error condition
    -1903    /// at the application layer. Cases that might be routine include
    -1904    /// [`ConnectionError::LocallyClosed`] and [`ConnectionError::ApplicationClosed`].
    -1905    #[inline]
    -1906    pub async fn closed(&self) -> ConnectionError {
    -1907        self.inner.closed().await
    -1908    }
    -1909
    -1910    /// If the connection is closed, the reason why.
    -1911    ///
    -1912    /// Returns `None` if the connection is still open.
    -1913    #[inline]
    -1914    pub fn close_reason(&self) -> Option<ConnectionError> {
    -1915        self.inner.close_reason()
    -1916    }
    -1917
    -1918    /// Closes the connection immediately.
    -1919    ///
    -1920    /// Pending operations will fail immediately with [`ConnectionError::LocallyClosed`]. No
    -1921    /// more data is sent to the peer and the peer may drop buffered data upon receiving the
    -1922    /// CONNECTION_CLOSE frame.
    -1923    ///
    -1924    /// `error_code` and `reason` are not interpreted, and are provided directly to the
    -1925    /// peer.
    -1926    ///
    -1927    /// `reason` will be truncated to fit in a single packet with overhead; to improve odds
    -1928    /// that it is preserved in full, it should be kept under 1KiB.
    -1929    ///
    -1930    /// # Gracefully closing a connection
    -1931    ///
    -1932    /// Only the peer last receiving application data can be certain that all data is
    -1933    /// delivered. The only reliable action it can then take is to close the connection,
    -1934    /// potentially with a custom error code. The delivery of the final CONNECTION_CLOSE
    -1935    /// frame is very likely if both endpoints stay online long enough, calling
    -1936    /// [`Endpoint::close`] will wait to provide sufficient time. Otherwise, the remote peer
    -1937    /// will time out the connection, provided that the idle timeout is not disabled.
    -1938    ///
    -1939    /// The sending side can not guarantee all stream data is delivered to the remote
    -1940    /// application. It only knows the data is delivered to the QUIC stack of the remote
    -1941    /// endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to calling
    -1942    /// [`close`] the remote endpoint may drop any data it received but is as yet
    -1943    /// undelivered to the application, including data that was acknowledged as received to
    -1944    /// the local endpoint.
    -1945    ///
    -1946    /// [`close`]: Connection::close
    -1947    #[inline]
    -1948    pub fn close(&self, error_code: VarInt, reason: &[u8]) {
    -1949        self.inner.close(error_code, reason)
    -1950    }
    -1951
    -1952    /// Transmits `data` as an unreliable, unordered application datagram.
    -1953    ///
    -1954    /// Application datagrams are a low-level primitive. They may be lost or delivered out
    -1955    /// of order, and `data` must both fit inside a single QUIC packet and be smaller than
    -1956    /// the maximum dictated by the peer.
    -1957    #[inline]
    -1958    pub fn send_datagram(&self, data: bytes::Bytes) -> Result<(), SendDatagramError> {
    -1959        self.inner.send_datagram(data)
    -1960    }
    -1961
    -1962    // TODO: It seems `SendDatagram` is not yet exposed by quinn.  This has been fixed
    -1963    //       upstream and will be in the next release.
    -1964    // /// Transmits `data` as an unreliable, unordered application datagram
    -1965    // ///
    -1966    // /// Unlike [`send_datagram()`], this method will wait for buffer space during congestion
    -1967    // /// conditions, which effectively prioritizes old datagrams over new datagrams.
    -1968    // ///
    -1969    // /// See [`send_datagram()`] for details.
    -1970    // ///
    -1971    // /// [`send_datagram()`]: Connection::send_datagram
    -1972    // #[inline]
    -1973    // pub fn send_datagram_wait(&self, data: bytes::Bytes) -> SendDatagram<'_> {
    -1974    //     self.inner.send_datagram_wait(data)
    -1975    // }
    -1976
    -1977    /// Computes the maximum size of datagrams that may be passed to [`send_datagram`].
    -1978    ///
    -1979    /// Returns `None` if datagrams are unsupported by the peer or disabled locally.
    -1980    ///
    -1981    /// This may change over the lifetime of a connection according to variation in the path
    -1982    /// MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
    -1983    /// peer's limit is large this is guaranteed to be a little over a kilobyte at minimum.
    -1984    ///
    -1985    /// Not necessarily the maximum size of received datagrams.
    -1986    ///
    -1987    /// [`send_datagram`]: Self::send_datagram
    -1988    #[inline]
    -1989    pub fn max_datagram_size(&self) -> Option<usize> {
    -1990        self.inner.max_datagram_size()
    -1991    }
    -1992
    -1993    /// Bytes available in the outgoing datagram buffer.
    -1994    ///
    -1995    /// When greater than zero, calling [`send_datagram`] with a
    -1996    /// datagram of at most this size is guaranteed not to cause older datagrams to be
    -1997    /// dropped.
    -1998    ///
    -1999    /// [`send_datagram`]: Self::send_datagram
    -2000    #[inline]
    -2001    pub fn datagram_send_buffer_space(&self) -> usize {
    -2002        self.inner.datagram_send_buffer_space()
    -2003    }
    -2004
    -2005    /// Current best estimate of this connection's latency (round-trip-time).
    +1799
    +1800    /// Receives an application datagram.
    +1801    #[inline]
    +1802    pub fn read_datagram(&self) -> ReadDatagram<'_> {
    +1803        self.inner.read_datagram()
    +1804    }
    +1805
    +1806    /// Wait for the connection to be closed for any reason.
    +1807    ///
    +1808    /// Despite the return type's name, closed connections are often not an error condition
    +1809    /// at the application layer. Cases that might be routine include
    +1810    /// [`ConnectionError::LocallyClosed`] and [`ConnectionError::ApplicationClosed`].
    +1811    #[inline]
    +1812    pub async fn closed(&self) -> ConnectionError {
    +1813        self.inner.closed().await
    +1814    }
    +1815
    +1816    /// If the connection is closed, the reason why.
    +1817    ///
    +1818    /// Returns `None` if the connection is still open.
    +1819    #[inline]
    +1820    pub fn close_reason(&self) -> Option<ConnectionError> {
    +1821        self.inner.close_reason()
    +1822    }
    +1823
    +1824    /// Closes the connection immediately.
    +1825    ///
    +1826    /// Pending operations will fail immediately with [`ConnectionError::LocallyClosed`]. No
    +1827    /// more data is sent to the peer and the peer may drop buffered data upon receiving the
    +1828    /// CONNECTION_CLOSE frame.
    +1829    ///
    +1830    /// `error_code` and `reason` are not interpreted, and are provided directly to the
    +1831    /// peer.
    +1832    ///
    +1833    /// `reason` will be truncated to fit in a single packet with overhead; to improve odds
    +1834    /// that it is preserved in full, it should be kept under 1KiB.
    +1835    ///
    +1836    /// # Gracefully closing a connection
    +1837    ///
    +1838    /// Only the peer last receiving application data can be certain that all data is
    +1839    /// delivered. The only reliable action it can then take is to close the connection,
    +1840    /// potentially with a custom error code. The delivery of the final CONNECTION_CLOSE
    +1841    /// frame is very likely if both endpoints stay online long enough, calling
    +1842    /// [`Endpoint::close`] will wait to provide sufficient time. Otherwise, the remote peer
    +1843    /// will time out the connection, provided that the idle timeout is not disabled.
    +1844    ///
    +1845    /// The sending side can not guarantee all stream data is delivered to the remote
    +1846    /// application. It only knows the data is delivered to the QUIC stack of the remote
    +1847    /// endpoint. Once the local side sends a CONNECTION_CLOSE frame in response to calling
    +1848    /// [`close`] the remote endpoint may drop any data it received but is as yet
    +1849    /// undelivered to the application, including data that was acknowledged as received to
    +1850    /// the local endpoint.
    +1851    ///
    +1852    /// [`close`]: Connection::close
    +1853    #[inline]
    +1854    pub fn close(&self, error_code: VarInt, reason: &[u8]) {
    +1855        self.inner.close(error_code, reason)
    +1856    }
    +1857
    +1858    /// Transmits `data` as an unreliable, unordered application datagram.
    +1859    ///
    +1860    /// Application datagrams are a low-level primitive. They may be lost or delivered out
    +1861    /// of order, and `data` must both fit inside a single QUIC packet and be smaller than
    +1862    /// the maximum dictated by the peer.
    +1863    #[inline]
    +1864    pub fn send_datagram(&self, data: bytes::Bytes) -> Result<(), SendDatagramError> {
    +1865        self.inner.send_datagram(data)
    +1866    }
    +1867
    +1868    // TODO: It seems `SendDatagram` is not yet exposed by quinn.  This has been fixed
    +1869    //       upstream and will be in the next release.
    +1870    // /// Transmits `data` as an unreliable, unordered application datagram
    +1871    // ///
    +1872    // /// Unlike [`send_datagram()`], this method will wait for buffer space during congestion
    +1873    // /// conditions, which effectively prioritizes old datagrams over new datagrams.
    +1874    // ///
    +1875    // /// See [`send_datagram()`] for details.
    +1876    // ///
    +1877    // /// [`send_datagram()`]: Connection::send_datagram
    +1878    // #[inline]
    +1879    // pub fn send_datagram_wait(&self, data: bytes::Bytes) -> SendDatagram<'_> {
    +1880    //     self.inner.send_datagram_wait(data)
    +1881    // }
    +1882
    +1883    /// Computes the maximum size of datagrams that may be passed to [`send_datagram`].
    +1884    ///
    +1885    /// Returns `None` if datagrams are unsupported by the peer or disabled locally.
    +1886    ///
    +1887    /// This may change over the lifetime of a connection according to variation in the path
    +1888    /// MTU estimate. The peer can also enforce an arbitrarily small fixed limit, but if the
    +1889    /// peer's limit is large this is guaranteed to be a little over a kilobyte at minimum.
    +1890    ///
    +1891    /// Not necessarily the maximum size of received datagrams.
    +1892    ///
    +1893    /// [`send_datagram`]: Self::send_datagram
    +1894    #[inline]
    +1895    pub fn max_datagram_size(&self) -> Option<usize> {
    +1896        self.inner.max_datagram_size()
    +1897    }
    +1898
    +1899    /// Bytes available in the outgoing datagram buffer.
    +1900    ///
    +1901    /// When greater than zero, calling [`send_datagram`] with a
    +1902    /// datagram of at most this size is guaranteed not to cause older datagrams to be
    +1903    /// dropped.
    +1904    ///
    +1905    /// [`send_datagram`]: Self::send_datagram
    +1906    #[inline]
    +1907    pub fn datagram_send_buffer_space(&self) -> usize {
    +1908        self.inner.datagram_send_buffer_space()
    +1909    }
    +1910
    +1911    /// Current best estimate of this connection's latency (round-trip-time).
    +1912    #[inline]
    +1913    pub fn rtt(&self) -> Duration {
    +1914        self.inner.rtt()
    +1915    }
    +1916
    +1917    /// Returns connection statistics.
    +1918    #[inline]
    +1919    pub fn stats(&self) -> ConnectionStats {
    +1920        self.inner.stats()
    +1921    }
    +1922
    +1923    /// Current state of the congestion control algorithm, for debugging purposes.
    +1924    #[inline]
    +1925    pub fn congestion_state(&self) -> Box<dyn quinn_proto::congestion::Controller> {
    +1926        self.inner.congestion_state()
    +1927    }
    +1928
    +1929    /// Parameters negotiated during the handshake.
    +1930    ///
    +1931    /// Guaranteed to return `Some` on fully established connections or after
    +1932    /// [`Connecting::handshake_data()`] succeeds. See that method's documentations for
    +1933    /// details on the returned value.
    +1934    ///
    +1935    /// [`Connection::handshake_data()`]: crate::endpoint::Connecting::handshake_data
    +1936    #[inline]
    +1937    pub fn handshake_data(&self) -> Option<Box<dyn Any>> {
    +1938        self.inner.handshake_data()
    +1939    }
    +1940
    +1941    /// Extracts the ALPN protocol from the peer's handshake data.
    +1942    pub fn alpn(&self) -> Option<Vec<u8>> {
    +1943        let data = self.handshake_data()?;
    +1944        match data.downcast::<quinn::crypto::rustls::HandshakeData>() {
    +1945            Ok(data) => data.protocol,
    +1946            Err(_) => None,
    +1947        }
    +1948    }
    +1949
    +1950    /// Cryptographic identity of the peer.
    +1951    ///
    +1952    /// The dynamic type returned is determined by the configured [`Session`]. For the
    +1953    /// default `rustls` session, the return value can be [`downcast`] to a
    +1954    /// <code>Vec<[rustls::pki_types::CertificateDer]></code>
    +1955    ///
    +1956    /// [`Session`]: quinn_proto::crypto::Session
    +1957    /// [`downcast`]: Box::downcast
    +1958    #[inline]
    +1959    pub fn peer_identity(&self) -> Option<Box<dyn Any>> {
    +1960        self.inner.peer_identity()
    +1961    }
    +1962
    +1963    /// Returns the [`NodeId`] from the peer's TLS certificate.
    +1964    ///
    +1965    /// The [`PublicKey`] of a node is also known as a [`NodeId`].  This [`PublicKey`] is
    +1966    /// included in the TLS certificate presented during the handshake when connecting.
    +1967    /// This function allows you to get the [`NodeId`] of the remote node of this
    +1968    /// connection.
    +1969    ///
    +1970    /// [`PublicKey`]: iroh_base::PublicKey
    +1971    // TODO: Would be nice if this could be infallible.
    +1972    pub fn remote_node_id(&self) -> Result<NodeId, RemoteNodeIdError> {
    +1973        let data = self.peer_identity();
    +1974        match data {
    +1975            None => {
    +1976                warn!("no peer certificate found");
    +1977                Err(RemoteNodeIdSnafu.build())
    +1978            }
    +1979            Some(data) => match data.downcast::<Vec<rustls::pki_types::CertificateDer>>() {
    +1980                Ok(certs) => {
    +1981                    if certs.len() != 1 {
    +1982                        warn!(
    +1983                            "expected a single peer certificate, but {} found",
    +1984                            certs.len()
    +1985                        );
    +1986                        return Err(RemoteNodeIdSnafu.build());
    +1987                    }
    +1988
    +1989                    let peer_id = VerifyingKey::from_public_key_der(&certs[0])
    +1990                        .map_err(|_| RemoteNodeIdSnafu.build())?
    +1991                        .into();
    +1992                    Ok(peer_id)
    +1993                }
    +1994                Err(err) => {
    +1995                    warn!("invalid peer certificate: {:?}", err);
    +1996                    Err(RemoteNodeIdSnafu.build())
    +1997                }
    +1998            },
    +1999        }
    +2000    }
    +2001
    +2002    /// A stable identifier for this connection.
    +2003    ///
    +2004    /// Peer addresses and connection IDs can change, but this value will remain fixed for
    +2005    /// the lifetime of the connection.
     2006    #[inline]
    -2007    pub fn rtt(&self) -> Duration {
    -2008        self.inner.rtt()
    +2007    pub fn stable_id(&self) -> usize {
    +2008        self.inner.stable_id()
     2009    }
     2010
    -2011    /// Returns connection statistics.
    -2012    #[inline]
    -2013    pub fn stats(&self) -> ConnectionStats {
    -2014        self.inner.stats()
    -2015    }
    -2016
    -2017    /// Current state of the congestion control algorithm, for debugging purposes.
    -2018    #[inline]
    -2019    pub fn congestion_state(&self) -> Box<dyn quinn_proto::congestion::Controller> {
    -2020        self.inner.congestion_state()
    -2021    }
    -2022
    -2023    /// Parameters negotiated during the handshake.
    -2024    ///
    -2025    /// Guaranteed to return `Some` on fully established connections or after
    -2026    /// [`Connecting::handshake_data()`] succeeds. See that method's documentations for
    -2027    /// details on the returned value.
    -2028    ///
    -2029    /// [`Connection::handshake_data()`]: crate::endpoint::Connecting::handshake_data
    -2030    #[inline]
    -2031    pub fn handshake_data(&self) -> Option<Box<dyn Any>> {
    -2032        self.inner.handshake_data()
    -2033    }
    -2034
    -2035    /// Extracts the ALPN protocol from the peer's handshake data.
    -2036    pub fn alpn(&self) -> Option<Vec<u8>> {
    -2037        let data = self.handshake_data()?;
    -2038        match data.downcast::<quinn::crypto::rustls::HandshakeData>() {
    -2039            Ok(data) => data.protocol,
    -2040            Err(_) => None,
    -2041        }
    +2011    /// Derives keying material from this connection's TLS session secrets.
    +2012    ///
    +2013    /// When both peers call this method with the same `label` and `context`
    +2014    /// arguments and `output` buffers of equal length, they will get the
    +2015    /// same sequence of bytes in `output`. These bytes are cryptographically
    +2016    /// strong and pseudorandom, and are suitable for use as keying material.
    +2017    ///
    +2018    /// See [RFC5705](https://tools.ietf.org/html/rfc5705) for more information.
    +2019    #[inline]
    +2020    pub fn export_keying_material(
    +2021        &self,
    +2022        output: &mut [u8],
    +2023        label: &[u8],
    +2024        context: &[u8],
    +2025    ) -> Result<(), quinn_proto::crypto::ExportKeyingMaterialError> {
    +2026        self.inner.export_keying_material(output, label, context)
    +2027    }
    +2028
    +2029    /// Modifies the number of unidirectional streams that may be concurrently opened.
    +2030    ///
    +2031    /// No streams may be opened by the peer unless fewer than `count` are already
    +2032    /// open. Large `count`s increase both minimum and worst-case memory consumption.
    +2033    #[inline]
    +2034    pub fn set_max_concurrent_uni_streams(&self, count: VarInt) {
    +2035        self.inner.set_max_concurrent_uni_streams(count)
    +2036    }
    +2037
    +2038    /// See [`quinn_proto::TransportConfig::receive_window`].
    +2039    #[inline]
    +2040    pub fn set_receive_window(&self, receive_window: VarInt) {
    +2041        self.inner.set_receive_window(receive_window)
     2042    }
     2043
    -2044    /// Cryptographic identity of the peer.
    +2044    /// Modifies the number of bidirectional streams that may be concurrently opened.
     2045    ///
    -2046    /// The dynamic type returned is determined by the configured [`Session`]. For the
    -2047    /// default `rustls` session, the return value can be [`downcast`] to a
    -2048    /// <code>Vec<[rustls::pki_types::CertificateDer]></code>
    -2049    ///
    -2050    /// [`Session`]: quinn_proto::crypto::Session
    -2051    /// [`downcast`]: Box::downcast
    -2052    #[inline]
    -2053    pub fn peer_identity(&self) -> Option<Box<dyn Any>> {
    -2054        self.inner.peer_identity()
    -2055    }
    -2056
    -2057    /// Returns the [`NodeId`] from the peer's TLS certificate.
    -2058    ///
    -2059    /// The [`PublicKey`] of a node is also known as a [`NodeId`].  This [`PublicKey`] is
    -2060    /// included in the TLS certificate presented during the handshake when connecting.
    -2061    /// This function allows you to get the [`NodeId`] of the remote node of this
    -2062    /// connection.
    -2063    ///
    -2064    /// [`PublicKey`]: iroh_base::PublicKey
    -2065    // TODO: Would be nice if this could be infallible.
    -2066    pub fn remote_node_id(&self) -> Result<NodeId, RemoteNodeIdError> {
    -2067        let data = self.peer_identity();
    -2068        match data {
    -2069            None => {
    -2070                warn!("no peer certificate found");
    -2071                Err(RemoteNodeIdSnafu.build())
    -2072            }
    -2073            Some(data) => match data.downcast::<Vec<rustls::pki_types::CertificateDer>>() {
    -2074                Ok(certs) => {
    -2075                    if certs.len() != 1 {
    -2076                        warn!(
    -2077                            "expected a single peer certificate, but {} found",
    -2078                            certs.len()
    -2079                        );
    -2080                        return Err(RemoteNodeIdSnafu.build());
    -2081                    }
    -2082
    -2083                    let peer_id = VerifyingKey::from_public_key_der(&certs[0])
    -2084                        .map_err(|_| RemoteNodeIdSnafu.build())?
    -2085                        .into();
    -2086                    Ok(peer_id)
    -2087                }
    -2088                Err(err) => {
    -2089                    warn!("invalid peer certificate: {:?}", err);
    -2090                    Err(RemoteNodeIdSnafu.build())
    -2091                }
    -2092            },
    +2046    /// No streams may be opened by the peer unless fewer than `count` are already
    +2047    /// open. Large `count`s increase both minimum and worst-case memory consumption.
    +2048    #[inline]
    +2049    pub fn set_max_concurrent_bi_streams(&self, count: VarInt) {
    +2050        self.inner.set_max_concurrent_bi_streams(count)
    +2051    }
    +2052}
    +2053
    +2054/// Try send a message to the rtt-actor.
    +2055///
    +2056/// If we can't notify the actor that will impact performance a little, but we can still
    +2057/// function.
    +2058fn try_send_rtt_msg(conn: &Connection, magic_ep: &Endpoint, remote_node_id: Option<NodeId>) {
    +2059    // If we can't notify the rtt-actor that's not great but not critical.
    +2060    let Some(node_id) = remote_node_id.or_else(|| conn.remote_node_id().ok()) else {
    +2061        warn!(?conn, "failed to get remote node id");
    +2062        return;
    +2063    };
    +2064    let Some(conn_type_changes) = magic_ep.conn_type(node_id) else {
    +2065        warn!(?conn, "failed to create conn_type stream");
    +2066        return;
    +2067    };
    +2068    let rtt_msg = RttMessage::NewConnection {
    +2069        connection: conn.inner.weak_handle(),
    +2070        conn_type_changes: conn_type_changes.stream(),
    +2071        node_id,
    +2072    };
    +2073    if let Err(err) = magic_ep.rtt_actor.msg_tx.try_send(rtt_msg) {
    +2074        warn!(?conn, "rtt-actor not reachable: {err:#}");
    +2075    }
    +2076}
    +2077
    +2078/// Read a proxy url from the environment, in this order
    +2079///
    +2080/// - `HTTP_PROXY`
    +2081/// - `http_proxy`
    +2082/// - `HTTPS_PROXY`
    +2083/// - `https_proxy`
    +2084fn proxy_url_from_env() -> Option<Url> {
    +2085    if let Some(url) = std::env::var("HTTP_PROXY")
    +2086        .ok()
    +2087        .and_then(|s| s.parse::<Url>().ok())
    +2088    {
    +2089        if is_cgi() {
    +2090            warn!("HTTP_PROXY environment variable ignored in CGI");
    +2091        } else {
    +2092            return Some(url);
     2093        }
     2094    }
    -2095
    -2096    /// A stable identifier for this connection.
    -2097    ///
    -2098    /// Peer addresses and connection IDs can change, but this value will remain fixed for
    -2099    /// the lifetime of the connection.
    -2100    #[inline]
    -2101    pub fn stable_id(&self) -> usize {
    -2102        self.inner.stable_id()
    -2103    }
    -2104
    -2105    /// Derives keying material from this connection's TLS session secrets.
    -2106    ///
    -2107    /// When both peers call this method with the same `label` and `context`
    -2108    /// arguments and `output` buffers of equal length, they will get the
    -2109    /// same sequence of bytes in `output`. These bytes are cryptographically
    -2110    /// strong and pseudorandom, and are suitable for use as keying material.
    -2111    ///
    -2112    /// See [RFC5705](https://tools.ietf.org/html/rfc5705) for more information.
    -2113    #[inline]
    -2114    pub fn export_keying_material(
    -2115        &self,
    -2116        output: &mut [u8],
    -2117        label: &[u8],
    -2118        context: &[u8],
    -2119    ) -> Result<(), quinn_proto::crypto::ExportKeyingMaterialError> {
    -2120        self.inner.export_keying_material(output, label, context)
    -2121    }
    -2122
    -2123    /// Modifies the number of unidirectional streams that may be concurrently opened.
    -2124    ///
    -2125    /// No streams may be opened by the peer unless fewer than `count` are already
    -2126    /// open. Large `count`s increase both minimum and worst-case memory consumption.
    -2127    #[inline]
    -2128    pub fn set_max_concurrent_uni_streams(&self, count: VarInt) {
    -2129        self.inner.set_max_concurrent_uni_streams(count)
    -2130    }
    +2095    if let Some(url) = std::env::var("http_proxy")
    +2096        .ok()
    +2097        .and_then(|s| s.parse::<Url>().ok())
    +2098    {
    +2099        return Some(url);
    +2100    }
    +2101    if let Some(url) = std::env::var("HTTPS_PROXY")
    +2102        .ok()
    +2103        .and_then(|s| s.parse::<Url>().ok())
    +2104    {
    +2105        return Some(url);
    +2106    }
    +2107    if let Some(url) = std::env::var("https_proxy")
    +2108        .ok()
    +2109        .and_then(|s| s.parse::<Url>().ok())
    +2110    {
    +2111        return Some(url);
    +2112    }
    +2113
    +2114    None
    +2115}
    +2116
    +2117/// Configuration of the relay servers for an [`Endpoint`].
    +2118#[derive(Debug, Clone, PartialEq, Eq)]
    +2119pub enum RelayMode {
    +2120    /// Disable relay servers completely.
    +2121    Disabled,
    +2122    /// Use the default relay map, with production relay servers from n0.
    +2123    ///
    +2124    /// See [`crate::defaults::prod`] for the severs used.
    +2125    Default,
    +2126    /// Use the staging relay servers from n0.
    +2127    Staging,
    +2128    /// Use a custom relay map.
    +2129    Custom(RelayMap),
    +2130}
     2131
    -2132    /// See [`quinn_proto::TransportConfig::receive_window`].
    -2133    #[inline]
    -2134    pub fn set_receive_window(&self, receive_window: VarInt) {
    -2135        self.inner.set_receive_window(receive_window)
    -2136    }
    -2137
    -2138    /// Modifies the number of bidirectional streams that may be concurrently opened.
    -2139    ///
    -2140    /// No streams may be opened by the peer unless fewer than `count` are already
    -2141    /// open. Large `count`s increase both minimum and worst-case memory consumption.
    -2142    #[inline]
    -2143    pub fn set_max_concurrent_bi_streams(&self, count: VarInt) {
    -2144        self.inner.set_max_concurrent_bi_streams(count)
    -2145    }
    -2146}
    -2147
    -2148/// Try send a message to the rtt-actor.
    -2149///
    -2150/// If we can't notify the actor that will impact performance a little, but we can still
    -2151/// function.
    -2152fn try_send_rtt_msg(conn: &Connection, magic_ep: &Endpoint, remote_node_id: Option<NodeId>) {
    -2153    // If we can't notify the rtt-actor that's not great but not critical.
    -2154    let Some(node_id) = remote_node_id.or_else(|| conn.remote_node_id().ok()) else {
    -2155        warn!(?conn, "failed to get remote node id");
    -2156        return;
    -2157    };
    -2158    let Some(conn_type_changes) = magic_ep.conn_type(node_id) else {
    -2159        warn!(?conn, "failed to create conn_type stream");
    -2160        return;
    -2161    };
    -2162    let rtt_msg = RttMessage::NewConnection {
    -2163        connection: conn.inner.weak_handle(),
    -2164        conn_type_changes: conn_type_changes.stream(),
    -2165        node_id,
    -2166    };
    -2167    if let Err(err) = magic_ep.rtt_actor.msg_tx.try_send(rtt_msg) {
    -2168        warn!(?conn, "rtt-actor not reachable: {err:#}");
    -2169    }
    +2132impl RelayMode {
    +2133    /// Returns the relay map for this mode.
    +2134    pub fn relay_map(&self) -> RelayMap {
    +2135        match self {
    +2136            RelayMode::Disabled => RelayMap::empty(),
    +2137            RelayMode::Default => crate::defaults::prod::default_relay_map(),
    +2138            RelayMode::Staging => crate::defaults::staging::default_relay_map(),
    +2139            RelayMode::Custom(relay_map) => relay_map.clone(),
    +2140        }
    +2141    }
    +2142}
    +2143
    +2144/// Environment variable to force the use of staging relays.
    +2145pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
    +2146
    +2147/// Returns `true` if the use of staging relays is forced.
    +2148pub fn force_staging_infra() -> bool {
    +2149    matches!(std::env::var(ENV_FORCE_STAGING_RELAYS), Ok(value) if !value.is_empty())
    +2150}
    +2151
    +2152/// Returns the default relay mode.
    +2153///
    +2154/// If the `IROH_FORCE_STAGING_RELAYS` environment variable is non empty, it will return `RelayMode::Staging`.
    +2155/// Otherwise, it will return `RelayMode::Default`.
    +2156pub fn default_relay_mode() -> RelayMode {
    +2157    // Use staging in testing
    +2158    match force_staging_infra() {
    +2159        true => RelayMode::Staging,
    +2160        false => RelayMode::Default,
    +2161    }
    +2162}
    +2163
    +2164/// Check if we are being executed in a CGI context.
    +2165///
    +2166/// If so, a malicious client can send the `Proxy:` header, and it will
    +2167/// be in the `HTTP_PROXY` env var. So we don't use it :)
    +2168fn is_cgi() -> bool {
    +2169    std::env::var_os("REQUEST_METHOD").is_some()
     2170}
     2171
    -2172/// Read a proxy url from the environment, in this order
    -2173///
    -2174/// - `HTTP_PROXY`
    -2175/// - `http_proxy`
    -2176/// - `HTTPS_PROXY`
    -2177/// - `https_proxy`
    -2178fn proxy_url_from_env() -> Option<Url> {
    -2179    if let Some(url) = std::env::var("HTTP_PROXY")
    -2180        .ok()
    -2181        .and_then(|s| s.parse::<Url>().ok())
    -2182    {
    -2183        if is_cgi() {
    -2184            warn!("HTTP_PROXY environment variable ignored in CGI");
    -2185        } else {
    -2186            return Some(url);
    -2187        }
    -2188    }
    -2189    if let Some(url) = std::env::var("http_proxy")
    -2190        .ok()
    -2191        .and_then(|s| s.parse::<Url>().ok())
    -2192    {
    -2193        return Some(url);
    -2194    }
    -2195    if let Some(url) = std::env::var("HTTPS_PROXY")
    -2196        .ok()
    -2197        .and_then(|s| s.parse::<Url>().ok())
    -2198    {
    -2199        return Some(url);
    -2200    }
    -2201    if let Some(url) = std::env::var("https_proxy")
    -2202        .ok()
    -2203        .and_then(|s| s.parse::<Url>().ok())
    -2204    {
    -2205        return Some(url);
    -2206    }
    -2207
    -2208    None
    -2209}
    -2210
    -2211/// Configuration of the relay servers for an [`Endpoint`].
    -2212#[derive(Debug, Clone, PartialEq, Eq)]
    -2213pub enum RelayMode {
    -2214    /// Disable relay servers completely.
    -2215    Disabled,
    -2216    /// Use the default relay map, with production relay servers from n0.
    -2217    ///
    -2218    /// See [`crate::defaults::prod`] for the severs used.
    -2219    Default,
    -2220    /// Use the staging relay servers from n0.
    -2221    Staging,
    -2222    /// Use a custom relay map.
    -2223    Custom(RelayMap),
    -2224}
    -2225
    -2226impl RelayMode {
    -2227    /// Returns the relay map for this mode.
    -2228    pub fn relay_map(&self) -> RelayMap {
    -2229        match self {
    -2230            RelayMode::Disabled => RelayMap::empty(),
    -2231            RelayMode::Default => crate::defaults::prod::default_relay_map(),
    -2232            RelayMode::Staging => crate::defaults::staging::default_relay_map(),
    -2233            RelayMode::Custom(relay_map) => relay_map.clone(),
    -2234        }
    -2235    }
    -2236}
    +2172// TODO: These tests could still be flaky, lets fix that:
    +2173// https://github.com/n0-computer/iroh/issues/1183
    +2174#[cfg(test)]
    +2175mod tests {
    +2176    use std::time::{Duration, Instant};
    +2177
    +2178    use iroh_base::{NodeAddr, NodeId, SecretKey};
    +2179    use n0_future::{BufferedStreamExt, StreamExt, stream, task::AbortOnDropHandle};
    +2180    use n0_snafu::{Error, Result, ResultExt};
    +2181    use n0_watcher::Watcher;
    +2182    use quinn::ConnectionError;
    +2183    use rand::SeedableRng;
    +2184    use tracing::{Instrument, error_span, info, info_span};
    +2185    use tracing_test::traced_test;
    +2186
    +2187    use super::Endpoint;
    +2188    use crate::{
    +2189        RelayMode,
    +2190        discovery::static_provider::StaticProvider,
    +2191        endpoint::{ConnectOptions, Connection, ConnectionType},
    +2192        protocol::{AcceptError, ProtocolHandler, Router},
    +2193        test_utils::{run_relay_server, run_relay_server_with},
    +2194    };
    +2195
    +2196    const TEST_ALPN: &[u8] = b"n0/iroh/test";
    +2197
    +2198    #[tokio::test]
    +2199    #[traced_test]
    +2200    async fn test_connect_self() -> Result {
    +2201        let ep = Endpoint::builder()
    +2202            .alpns(vec![TEST_ALPN.to_vec()])
    +2203            .bind()
    +2204            .await
    +2205            .unwrap();
    +2206        let my_addr = ep.node_addr();
    +2207        let res = ep.connect(my_addr.clone(), TEST_ALPN).await;
    +2208        assert!(res.is_err());
    +2209        let err = res.err().unwrap();
    +2210        assert!(err.to_string().starts_with("Connecting to ourself"));
    +2211
    +2212        let res = ep.add_node_addr(my_addr);
    +2213        assert!(res.is_err());
    +2214        let err = res.err().unwrap();
    +2215        assert!(err.to_string().starts_with("Adding our own address"));
    +2216        Ok(())
    +2217    }
    +2218
    +2219    #[tokio::test]
    +2220    #[traced_test]
    +2221    async fn endpoint_connect_close() -> Result {
    +2222        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +2223        let (relay_map, relay_url, _guard) = run_relay_server().await?;
    +2224        let server_secret_key = SecretKey::generate(&mut rng);
    +2225        let server_peer_id = server_secret_key.public();
    +2226
    +2227        // Wait for the endpoint to be started to make sure it's up before clients try to connect
    +2228        let ep = Endpoint::builder()
    +2229            .secret_key(server_secret_key)
    +2230            .alpns(vec![TEST_ALPN.to_vec()])
    +2231            .relay_mode(RelayMode::Custom(relay_map.clone()))
    +2232            .insecure_skip_relay_cert_verify(true)
    +2233            .bind()
    +2234            .await?;
    +2235        // Wait for the endpoint to be reachable via relay
    +2236        ep.online().await;
     2237
    -2238/// Environment variable to force the use of staging relays.
    -2239pub const ENV_FORCE_STAGING_RELAYS: &str = "IROH_FORCE_STAGING_RELAYS";
    -2240
    -2241/// Returns `true` if the use of staging relays is forced.
    -2242pub fn force_staging_infra() -> bool {
    -2243    matches!(std::env::var(ENV_FORCE_STAGING_RELAYS), Ok(value) if !value.is_empty())
    -2244}
    -2245
    -2246/// Returns the default relay mode.
    -2247///
    -2248/// If the `IROH_FORCE_STAGING_RELAYS` environment variable is non empty, it will return `RelayMode::Staging`.
    -2249/// Otherwise, it will return `RelayMode::Default`.
    -2250pub fn default_relay_mode() -> RelayMode {
    -2251    // Use staging in testing
    -2252    match force_staging_infra() {
    -2253        true => RelayMode::Staging,
    -2254        false => RelayMode::Default,
    -2255    }
    -2256}
    -2257
    -2258/// Check if we are being executed in a CGI context.
    -2259///
    -2260/// If so, a malicious client can send the `Proxy:` header, and it will
    -2261/// be in the `HTTP_PROXY` env var. So we don't use it :)
    -2262fn is_cgi() -> bool {
    -2263    std::env::var_os("REQUEST_METHOD").is_some()
    -2264}
    +2238        let server = tokio::spawn(
    +2239            async move {
    +2240                info!("accepting connection");
    +2241                let incoming = ep.accept().await.e()?;
    +2242                let conn = incoming.await.e()?;
    +2243                let mut stream = conn.accept_uni().await.e()?;
    +2244                let mut buf = [0u8; 5];
    +2245                stream.read_exact(&mut buf).await.e()?;
    +2246                info!("Accepted 1 stream, received {buf:?}.  Closing now.");
    +2247                // close the connection
    +2248                conn.close(7u8.into(), b"bye");
    +2249
    +2250                let res = conn.accept_uni().await;
    +2251                assert_eq!(res.unwrap_err(), quinn::ConnectionError::LocallyClosed);
    +2252
    +2253                let res = stream.read_to_end(10).await;
    +2254                assert_eq!(
    +2255                    res.unwrap_err(),
    +2256                    quinn::ReadToEndError::Read(quinn::ReadError::ConnectionLost(
    +2257                        quinn::ConnectionError::LocallyClosed
    +2258                    ))
    +2259                );
    +2260                info!("server test completed");
    +2261                Ok::<_, Error>(())
    +2262            }
    +2263            .instrument(info_span!("test-server")),
    +2264        );
     2265
    -2266// TODO: These tests could still be flaky, lets fix that:
    -2267// https://github.com/n0-computer/iroh/issues/1183
    -2268#[cfg(test)]
    -2269mod tests {
    -2270    use std::{
    -2271        net::SocketAddr,
    -2272        time::{Duration, Instant},
    -2273    };
    -2274
    -2275    use iroh_base::{NodeAddr, NodeId, SecretKey};
    -2276    use iroh_relay::http::Protocol;
    -2277    use n0_future::{task::AbortOnDropHandle, StreamExt};
    -2278    use n0_snafu::{Error, Result, ResultExt};
    -2279    use n0_watcher::Watcher;
    -2280    use quinn::ConnectionError;
    -2281    use rand::SeedableRng;
    -2282    use tracing::{error_span, info, info_span, Instrument};
    -2283    use tracing_test::traced_test;
    +2266        let client = tokio::spawn(
    +2267            async move {
    +2268                let ep = Endpoint::builder()
    +2269                    .alpns(vec![TEST_ALPN.to_vec()])
    +2270                    .relay_mode(RelayMode::Custom(relay_map))
    +2271                    .insecure_skip_relay_cert_verify(true)
    +2272                    .bind()
    +2273                    .await?;
    +2274                info!("client connecting");
    +2275                let node_addr = NodeAddr::new(server_peer_id).with_relay_url(relay_url);
    +2276                let conn = ep.connect(node_addr, TEST_ALPN).await?;
    +2277                let mut stream = conn.open_uni().await.e()?;
    +2278
    +2279                // First write is accepted by server.  We need this bit of synchronisation
    +2280                // because if the server closes after simply accepting the connection we can
    +2281                // not be sure our .open_uni() call would succeed as it may already receive
    +2282                // the error.
    +2283                stream.write_all(b"hello").await.e()?;
     2284
    -2285    use super::Endpoint;
    -2286    use crate::{
    -2287        endpoint::{ConnectOptions, Connection, ConnectionType, RemoteInfo},
    -2288        test_utils::{run_relay_server, run_relay_server_with},
    -2289        RelayMode,
    -2290    };
    -2291
    -2292    const TEST_ALPN: &[u8] = b"n0/iroh/test";
    -2293
    -2294    #[tokio::test]
    -2295    #[traced_test]
    -2296    async fn test_connect_self() -> Result {
    -2297        let ep = Endpoint::builder()
    -2298            .alpns(vec![TEST_ALPN.to_vec()])
    -2299            .bind()
    -2300            .await
    -2301            .unwrap();
    -2302        let my_addr = ep.node_addr().initialized().await.unwrap();
    -2303        let res = ep.connect(my_addr.clone(), TEST_ALPN).await;
    -2304        assert!(res.is_err());
    -2305        let err = res.err().unwrap();
    -2306        assert!(err.to_string().starts_with("Connecting to ourself"));
    -2307
    -2308        let res = ep.add_node_addr(my_addr);
    -2309        assert!(res.is_err());
    -2310        let err = res.err().unwrap();
    -2311        assert!(err.to_string().starts_with("Adding our own address"));
    +2285                info!("waiting for closed");
    +2286                // Remote now closes the connection, we should see an error sometime soon.
    +2287                let err = conn.closed().await;
    +2288                let expected_err =
    +2289                    quinn::ConnectionError::ApplicationClosed(quinn::ApplicationClose {
    +2290                        error_code: 7u8.into(),
    +2291                        reason: b"bye".to_vec().into(),
    +2292                    });
    +2293                assert_eq!(err, expected_err);
    +2294
    +2295                info!("opening new - expect it to fail");
    +2296                let res = conn.open_uni().await;
    +2297                assert_eq!(res.unwrap_err(), expected_err);
    +2298                info!("client test completed");
    +2299                Ok::<_, Error>(())
    +2300            }
    +2301            .instrument(info_span!("test-client")),
    +2302        );
    +2303
    +2304        let (server, client) = tokio::time::timeout(
    +2305            Duration::from_secs(30),
    +2306            n0_future::future::zip(server, client),
    +2307        )
    +2308        .await
    +2309        .e()?;
    +2310        server.e()??;
    +2311        client.e()??;
     2312        Ok(())
     2313    }
     2314
     2315    #[tokio::test]
     2316    #[traced_test]
    -2317    async fn endpoint_connect_close() -> Result {
    -2318        let (relay_map, relay_url, _guard) = run_relay_server().await?;
    -2319        let server_secret_key = SecretKey::generate(rand::thread_rng());
    -2320        let server_peer_id = server_secret_key.public();
    -2321
    -2322        let server = {
    -2323            let relay_map = relay_map.clone();
    -2324            tokio::spawn(
    -2325                async move {
    -2326                    let ep = Endpoint::builder()
    -2327                        .secret_key(server_secret_key)
    -2328                        .alpns(vec![TEST_ALPN.to_vec()])
    -2329                        .relay_mode(RelayMode::Custom(relay_map))
    -2330                        .insecure_skip_relay_cert_verify(true)
    -2331                        .bind()
    -2332                        .await?;
    -2333                    info!("accepting connection");
    -2334                    let incoming = ep.accept().await.e()?;
    -2335                    let conn = incoming.await.e()?;
    -2336                    let mut stream = conn.accept_uni().await.e()?;
    -2337                    let mut buf = [0u8; 5];
    -2338                    stream.read_exact(&mut buf).await.e()?;
    -2339                    info!("Accepted 1 stream, received {buf:?}.  Closing now.");
    -2340                    // close the connection
    -2341                    conn.close(7u8.into(), b"bye");
    -2342
    -2343                    let res = conn.accept_uni().await;
    -2344                    assert_eq!(res.unwrap_err(), quinn::ConnectionError::LocallyClosed);
    -2345
    -2346                    let res = stream.read_to_end(10).await;
    -2347                    assert_eq!(
    -2348                        res.unwrap_err(),
    -2349                        quinn::ReadToEndError::Read(quinn::ReadError::ConnectionLost(
    -2350                            quinn::ConnectionError::LocallyClosed
    -2351                        ))
    -2352                    );
    -2353                    info!("server test completed");
    -2354                    Ok::<_, Error>(())
    -2355                }
    -2356                .instrument(info_span!("test-server")),
    -2357            )
    -2358        };
    -2359
    -2360        let client = tokio::spawn(
    -2361            async move {
    -2362                let ep = Endpoint::builder()
    -2363                    .alpns(vec![TEST_ALPN.to_vec()])
    -2364                    .relay_mode(RelayMode::Custom(relay_map))
    -2365                    .insecure_skip_relay_cert_verify(true)
    -2366                    .bind()
    -2367                    .await?;
    -2368                info!("client connecting");
    -2369                let node_addr = NodeAddr::new(server_peer_id).with_relay_url(relay_url);
    -2370                let conn = ep.connect(node_addr, TEST_ALPN).await?;
    -2371                let mut stream = conn.open_uni().await.e()?;
    -2372
    -2373                // First write is accepted by server.  We need this bit of synchronisation
    -2374                // because if the server closes after simply accepting the connection we can
    -2375                // not be sure our .open_uni() call would succeed as it may already receive
    -2376                // the error.
    -2377                stream.write_all(b"hello").await.e()?;
    -2378
    -2379                info!("waiting for closed");
    -2380                // Remote now closes the connection, we should see an error sometime soon.
    -2381                let err = conn.closed().await;
    -2382                let expected_err =
    -2383                    quinn::ConnectionError::ApplicationClosed(quinn::ApplicationClose {
    -2384                        error_code: 7u8.into(),
    -2385                        reason: b"bye".to_vec().into(),
    -2386                    });
    -2387                assert_eq!(err, expected_err);
    -2388
    -2389                info!("opening new - expect it to fail");
    -2390                let res = conn.open_uni().await;
    -2391                assert_eq!(res.unwrap_err(), expected_err);
    -2392                info!("client test completed");
    -2393                Ok::<_, Error>(())
    -2394            }
    -2395            .instrument(info_span!("test-client")),
    -2396        );
    -2397
    -2398        let (server, client) = tokio::time::timeout(
    -2399            Duration::from_secs(30),
    -2400            n0_future::future::zip(server, client),
    -2401        )
    -2402        .await
    -2403        .e()?;
    -2404        server.e()??;
    -2405        client.e()??;
    -2406        Ok(())
    -2407    }
    -2408
    -2409    /// Test that peers are properly restored
    -2410    #[tokio::test]
    -2411    #[traced_test]
    -2412    async fn restore_peers() -> Result {
    -2413        let secret_key = SecretKey::generate(rand::thread_rng());
    -2414
    -2415        /// Create an endpoint for the test.
    -2416        async fn new_endpoint(
    -2417            secret_key: SecretKey,
    -2418            nodes: Option<Vec<NodeAddr>>,
    -2419        ) -> Result<Endpoint> {
    -2420            let mut transport_config = quinn::TransportConfig::default();
    -2421            transport_config.max_idle_timeout(Some(Duration::from_secs(10).try_into().unwrap()));
    +2317    async fn endpoint_relay_connect_loop() -> Result {
    +2318        let test_start = Instant::now();
    +2319        let n_clients = 5;
    +2320        let n_chunks_per_client = 2;
    +2321        let chunk_size = 10;
    +2322        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    +2323        let (relay_map, relay_url, _relay_guard) = run_relay_server().await.unwrap();
    +2324        let server_secret_key = SecretKey::generate(&mut rng);
    +2325        let server_node_id = server_secret_key.public();
    +2326
    +2327        // Make sure the server is bound before having clients connect to it:
    +2328        let ep = Endpoint::builder()
    +2329            .insecure_skip_relay_cert_verify(true)
    +2330            .secret_key(server_secret_key)
    +2331            .alpns(vec![TEST_ALPN.to_vec()])
    +2332            .relay_mode(RelayMode::Custom(relay_map.clone()))
    +2333            .bind()
    +2334            .await?;
    +2335        // Also make sure the server has a working relay connection
    +2336        ep.online().await;
    +2337
    +2338        info!(time = ?test_start.elapsed(), "test setup done");
    +2339
    +2340        // The server accepts the connections of the clients sequentially.
    +2341        let server = tokio::spawn(
    +2342            async move {
    +2343                let eps = ep.bound_sockets();
    +2344
    +2345                info!(me = %ep.node_id().fmt_short(), eps = ?eps, "server listening on");
    +2346                for i in 0..n_clients {
    +2347                    let round_start = Instant::now();
    +2348                    info!("[server] round {i}");
    +2349                    let incoming = ep.accept().await.e()?;
    +2350                    let conn = incoming.await.e()?;
    +2351                    let node_id = conn.remote_node_id()?;
    +2352                    info!(%i, peer = %node_id.fmt_short(), "accepted connection");
    +2353                    let (mut send, mut recv) = conn.accept_bi().await.e()?;
    +2354                    let mut buf = vec![0u8; chunk_size];
    +2355                    for _i in 0..n_chunks_per_client {
    +2356                        recv.read_exact(&mut buf).await.e()?;
    +2357                        send.write_all(&buf).await.e()?;
    +2358                    }
    +2359                    send.finish().e()?;
    +2360                    conn.closed().await; // we're the last to send data, so we wait for the other side to close
    +2361                    info!(%i, peer = %node_id.fmt_short(), "finished");
    +2362                    info!("[server] round {i} done in {:?}", round_start.elapsed());
    +2363                }
    +2364                Ok::<_, Error>(())
    +2365            }
    +2366            .instrument(error_span!("server")),
    +2367        );
    +2368
    +2369        let start = Instant::now();
    +2370
    +2371        for i in 0..n_clients {
    +2372            let round_start = Instant::now();
    +2373            info!("[client] round {i}");
    +2374            let client_secret_key = SecretKey::generate(&mut rng);
    +2375            async {
    +2376                info!("client binding");
    +2377                let ep = Endpoint::builder()
    +2378                    .alpns(vec![TEST_ALPN.to_vec()])
    +2379                    .insecure_skip_relay_cert_verify(true)
    +2380                    .relay_mode(RelayMode::Custom(relay_map.clone()))
    +2381                    .secret_key(client_secret_key)
    +2382                    .bind()
    +2383                    .await?;
    +2384                let eps = ep.bound_sockets();
    +2385
    +2386                info!(me = %ep.node_id().fmt_short(), eps=?eps, "client bound");
    +2387                let node_addr = NodeAddr::new(server_node_id).with_relay_url(relay_url.clone());
    +2388                info!(to = ?node_addr, "client connecting");
    +2389                let conn = ep.connect(node_addr, TEST_ALPN).await.e()?;
    +2390                info!("client connected");
    +2391                let (mut send, mut recv) = conn.open_bi().await.e()?;
    +2392
    +2393                for i in 0..n_chunks_per_client {
    +2394                    let mut buf = vec![i; chunk_size];
    +2395                    send.write_all(&buf).await.e()?;
    +2396                    recv.read_exact(&mut buf).await.e()?;
    +2397                    assert_eq!(buf, vec![i; chunk_size]);
    +2398                }
    +2399                // we're the last to receive data, so we close
    +2400                conn.close(0u32.into(), b"bye!");
    +2401                info!("client finished");
    +2402                ep.close().await;
    +2403                info!("client closed");
    +2404                Ok::<_, Error>(())
    +2405            }
    +2406            .instrument(error_span!("client", %i))
    +2407            .await?;
    +2408            info!("[client] round {i} done in {:?}", round_start.elapsed());
    +2409        }
    +2410
    +2411        server.await.e()??;
    +2412
    +2413        // We appear to have seen this being very slow at times.  So ensure we fail if this
    +2414        // test is too slow.  We're only making two connections transferring very little
    +2415        // data, this really shouldn't take long.
    +2416        if start.elapsed() > Duration::from_secs(15) {
    +2417            panic!("Test too slow, something went wrong");
    +2418        }
    +2419
    +2420        Ok(())
    +2421    }
     2422
    -2423            let mut builder = Endpoint::builder()
    -2424                .secret_key(secret_key.clone())
    -2425                .transport_config(transport_config);
    -2426            if let Some(nodes) = nodes {
    -2427                builder = builder.known_nodes(nodes);
    -2428            }
    -2429            Ok(builder.alpns(vec![TEST_ALPN.to_vec()]).bind().await?)
    -2430        }
    -2431
    -2432        // create the peer that will be added to the peer map
    -2433        let peer_id = SecretKey::generate(rand::thread_rng()).public();
    -2434        let direct_addr: SocketAddr =
    -2435            (std::net::IpAddr::V4(std::net::Ipv4Addr::LOCALHOST), 8758u16).into();
    -2436        let node_addr = NodeAddr::new(peer_id).with_direct_addresses([direct_addr]);
    -2437
    -2438        info!("setting up first endpoint");
    -2439        // first time, create a magic endpoint without peers but a peers file and add addressing
    -2440        // information for a peer
    -2441        let endpoint = new_endpoint(secret_key.clone(), None).await?;
    -2442        assert_eq!(endpoint.remote_info_iter().count(), 0);
    -2443        endpoint.add_node_addr(node_addr.clone())?;
    -2444
    -2445        // Grab the current addrs
    -2446        let node_addrs: Vec<NodeAddr> = endpoint.remote_info_iter().map(Into::into).collect();
    -2447        assert_eq!(node_addrs.len(), 1);
    -2448        assert_eq!(node_addrs[0], node_addr);
    -2449
    -2450        info!("closing endpoint");
    -2451        // close the endpoint and restart it
    -2452        endpoint.close().await;
    -2453
    -2454        info!("restarting endpoint");
    -2455        // now restart it and check the addressing info of the peer
    -2456        let endpoint = new_endpoint(secret_key, Some(node_addrs)).await?;
    -2457        let RemoteInfo { mut addrs, .. } = endpoint.remote_info(peer_id).e()?;
    -2458        let conn_addr = addrs.pop().unwrap().addr;
    -2459        assert_eq!(conn_addr, direct_addr);
    -2460        Ok(())
    -2461    }
    -2462
    -2463    #[cfg_attr(windows, ignore = "flaky")]
    -2464    #[tokio::test]
    -2465    #[traced_test]
    -2466    async fn endpoint_relay_connect_loop() -> Result {
    -2467        let start = Instant::now();
    -2468        let n_clients = 5;
    -2469        let n_chunks_per_client = 2;
    -2470        let chunk_size = 10;
    -2471        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    -2472        let (relay_map, relay_url, _relay_guard) = run_relay_server().await.unwrap();
    -2473        let server_secret_key = SecretKey::generate(&mut rng);
    -2474        let server_node_id = server_secret_key.public();
    -2475
    -2476        // The server accepts the connections of the clients sequentially.
    -2477        let server = {
    -2478            let relay_map = relay_map.clone();
    -2479            tokio::spawn(
    -2480                async move {
    -2481                    let ep = Endpoint::builder()
    -2482                        .insecure_skip_relay_cert_verify(true)
    -2483                        .secret_key(server_secret_key)
    -2484                        .alpns(vec![TEST_ALPN.to_vec()])
    -2485                        .relay_mode(RelayMode::Custom(relay_map))
    -2486                        .bind()
    -2487                        .await?;
    -2488                    let eps = ep.bound_sockets();
    -2489
    -2490                    info!(me = %ep.node_id().fmt_short(), eps = ?eps, "server listening on");
    -2491                    for i in 0..n_clients {
    -2492                        let round_start = Instant::now();
    -2493                        info!("[server] round {i}");
    -2494                        let incoming = ep.accept().await.e()?;
    -2495                        let conn = incoming.await.e()?;
    -2496                        let node_id = conn.remote_node_id()?;
    -2497                        info!(%i, peer = %node_id.fmt_short(), "accepted connection");
    -2498                        let (mut send, mut recv) = conn.accept_bi().await.e()?;
    -2499                        let mut buf = vec![0u8; chunk_size];
    -2500                        for _i in 0..n_chunks_per_client {
    -2501                            recv.read_exact(&mut buf).await.e()?;
    -2502                            send.write_all(&buf).await.e()?;
    -2503                        }
    -2504                        send.finish().e()?;
    -2505                        send.stopped().await.e()?;
    -2506                        recv.read_to_end(0).await.e()?;
    -2507                        info!(%i, peer = %node_id.fmt_short(), "finished");
    -2508                        info!("[server] round {i} done in {:?}", round_start.elapsed());
    -2509                    }
    -2510                    Ok::<_, Error>(())
    -2511                }
    -2512                .instrument(error_span!("server")),
    -2513            )
    -2514        };
    -2515
    -2516        for i in 0..n_clients {
    -2517            let round_start = Instant::now();
    -2518            info!("[client] round {}", i);
    -2519            let relay_map = relay_map.clone();
    -2520            let client_secret_key = SecretKey::generate(&mut rng);
    -2521            let relay_url = relay_url.clone();
    -2522            async {
    -2523                info!("client binding");
    -2524                let ep = Endpoint::builder()
    -2525                    .alpns(vec![TEST_ALPN.to_vec()])
    -2526                    .insecure_skip_relay_cert_verify(true)
    -2527                    .relay_mode(RelayMode::Custom(relay_map))
    -2528                    .secret_key(client_secret_key)
    -2529                    .bind()
    -2530                    .await?;
    -2531                let eps = ep.bound_sockets();
    -2532
    -2533                info!(me = %ep.node_id().fmt_short(), eps=?eps, "client bound");
    -2534                let node_addr = NodeAddr::new(server_node_id).with_relay_url(relay_url);
    -2535                info!(to = ?node_addr, "client connecting");
    -2536                let conn = ep.connect(node_addr, TEST_ALPN).await.e()?;
    -2537                info!("client connected");
    -2538                let (mut send, mut recv) = conn.open_bi().await.e()?;
    -2539
    -2540                for i in 0..n_chunks_per_client {
    -2541                    let mut buf = vec![i; chunk_size];
    -2542                    send.write_all(&buf).await.e()?;
    -2543                    recv.read_exact(&mut buf).await.e()?;
    -2544                    assert_eq!(buf, vec![i; chunk_size]);
    -2545                }
    -2546                send.finish().e()?;
    -2547                send.stopped().await.e()?;
    -2548                recv.read_to_end(0).await.e()?;
    -2549                info!("client finished");
    -2550                ep.close().await;
    -2551                info!("client closed");
    -2552                Ok::<_, Error>(())
    -2553            }
    -2554            .instrument(error_span!("client", %i))
    -2555            .await?;
    -2556            info!("[client] round {i} done in {:?}", round_start.elapsed());
    -2557        }
    +2423    #[tokio::test]
    +2424    #[traced_test]
    +2425    async fn endpoint_send_relay() -> Result {
    +2426        let (relay_map, _relay_url, _guard) = run_relay_server().await?;
    +2427        let client = Endpoint::builder()
    +2428            .insecure_skip_relay_cert_verify(true)
    +2429            .relay_mode(RelayMode::Custom(relay_map.clone()))
    +2430            .bind()
    +2431            .await?;
    +2432        let server = Endpoint::builder()
    +2433            .insecure_skip_relay_cert_verify(true)
    +2434            .relay_mode(RelayMode::Custom(relay_map))
    +2435            .alpns(vec![TEST_ALPN.to_vec()])
    +2436            .bind()
    +2437            .await?;
    +2438
    +2439        let task = tokio::spawn({
    +2440            let server = server.clone();
    +2441            async move {
    +2442                let Some(conn) = server.accept().await else {
    +2443                    snafu::whatever!("Expected an incoming connection");
    +2444                };
    +2445                let conn = conn.await.e()?;
    +2446                let (mut send, mut recv) = conn.accept_bi().await.e()?;
    +2447                let data = recv.read_to_end(1000).await.e()?;
    +2448                send.write_all(&data).await.e()?;
    +2449                send.finish().e()?;
    +2450                conn.closed().await;
    +2451
    +2452                Ok::<_, Error>(())
    +2453            }
    +2454        });
    +2455
    +2456        let addr = server.node_addr();
    +2457        let conn = client.connect(addr, TEST_ALPN).await?;
    +2458        let (mut send, mut recv) = conn.open_bi().await.e()?;
    +2459        send.write_all(b"Hello, world!").await.e()?;
    +2460        send.finish().e()?;
    +2461        let data = recv.read_to_end(1000).await.e()?;
    +2462        conn.close(0u32.into(), b"bye!");
    +2463
    +2464        task.await.e()??;
    +2465
    +2466        client.close().await;
    +2467        server.close().await;
    +2468
    +2469        assert_eq!(&data, b"Hello, world!");
    +2470
    +2471        Ok(())
    +2472    }
    +2473
    +2474    #[tokio::test]
    +2475    #[traced_test]
    +2476    async fn endpoint_bidi_send_recv() -> Result {
    +2477        let ep1 = Endpoint::builder()
    +2478            .alpns(vec![TEST_ALPN.to_vec()])
    +2479            .relay_mode(RelayMode::Disabled);
    +2480
    +2481        let ep1 = ep1.bind().await?;
    +2482        let ep2 = Endpoint::builder()
    +2483            .alpns(vec![TEST_ALPN.to_vec()])
    +2484            .relay_mode(RelayMode::Disabled);
    +2485
    +2486        let ep2 = ep2.bind().await?;
    +2487
    +2488        let ep1_nodeaddr = ep1.node_addr();
    +2489        let ep2_nodeaddr = ep2.node_addr();
    +2490        ep1.add_node_addr(ep2_nodeaddr.clone())?;
    +2491        ep2.add_node_addr(ep1_nodeaddr.clone())?;
    +2492        let ep1_nodeid = ep1.node_id();
    +2493        let ep2_nodeid = ep2.node_id();
    +2494        eprintln!("node id 1 {ep1_nodeid}");
    +2495        eprintln!("node id 2 {ep2_nodeid}");
    +2496
    +2497        async fn connect_hello(ep: Endpoint, dst: NodeAddr) -> Result {
    +2498            let conn = ep.connect(dst, TEST_ALPN).await?;
    +2499            let (mut send, mut recv) = conn.open_bi().await.e()?;
    +2500            info!("sending hello");
    +2501            send.write_all(b"hello").await.e()?;
    +2502            send.finish().e()?;
    +2503            info!("receiving world");
    +2504            let m = recv.read_to_end(100).await.e()?;
    +2505            assert_eq!(m, b"world");
    +2506            conn.close(1u8.into(), b"done");
    +2507            Ok(())
    +2508        }
    +2509
    +2510        async fn accept_world(ep: Endpoint, src: NodeId) -> Result {
    +2511            let incoming = ep.accept().await.e()?;
    +2512            let mut iconn = incoming.accept().e()?;
    +2513            let alpn = iconn.alpn().await?;
    +2514            let conn = iconn.await.e()?;
    +2515            let node_id = conn.remote_node_id()?;
    +2516            assert_eq!(node_id, src);
    +2517            assert_eq!(alpn, TEST_ALPN);
    +2518            let (mut send, mut recv) = conn.accept_bi().await.e()?;
    +2519            info!("receiving hello");
    +2520            let m = recv.read_to_end(100).await.e()?;
    +2521            assert_eq!(m, b"hello");
    +2522            info!("sending hello");
    +2523            send.write_all(b"world").await.e()?;
    +2524            send.finish().e()?;
    +2525            match conn.closed().await {
    +2526                ConnectionError::ApplicationClosed(closed) => {
    +2527                    assert_eq!(closed.error_code, 1u8.into());
    +2528                    Ok(())
    +2529                }
    +2530                _ => panic!("wrong close error"),
    +2531            }
    +2532        }
    +2533
    +2534        let p1_accept = tokio::spawn(accept_world(ep1.clone(), ep2_nodeid).instrument(info_span!(
    +2535            "p1_accept",
    +2536            ep1 = %ep1.node_id().fmt_short(),
    +2537            dst = %ep2_nodeid.fmt_short(),
    +2538        )));
    +2539        let p2_accept = tokio::spawn(accept_world(ep2.clone(), ep1_nodeid).instrument(info_span!(
    +2540            "p2_accept",
    +2541            ep2 = %ep2.node_id().fmt_short(),
    +2542            dst = %ep1_nodeid.fmt_short(),
    +2543        )));
    +2544        let p1_connect = tokio::spawn(connect_hello(ep1.clone(), ep2_nodeaddr).instrument(
    +2545            info_span!(
    +2546                "p1_connect",
    +2547                ep1 = %ep1.node_id().fmt_short(),
    +2548                dst = %ep2_nodeid.fmt_short(),
    +2549            ),
    +2550        ));
    +2551        let p2_connect = tokio::spawn(connect_hello(ep2.clone(), ep1_nodeaddr).instrument(
    +2552            info_span!(
    +2553                "p2_connect",
    +2554                ep2 = %ep2.node_id().fmt_short(),
    +2555                dst = %ep1_nodeid.fmt_short(),
    +2556            ),
    +2557        ));
     2558
    -2559        server.await.e()??;
    -2560
    -2561        // We appear to have seen this being very slow at times.  So ensure we fail if this
    -2562        // test is too slow.  We're only making two connections transferring very little
    -2563        // data, this really shouldn't take long.
    -2564        if start.elapsed() > Duration::from_secs(15) {
    -2565            panic!("Test too slow, something went wrong");
    -2566        }
    -2567
    -2568        Ok(())
    -2569    }
    -2570
    -2571    #[tokio::test]
    -2572    #[traced_test]
    -2573    async fn endpoint_send_relay_websockets() -> Result {
    -2574        let (relay_map, _relay_url, _guard) = run_relay_server().await?;
    -2575        let client = Endpoint::builder()
    -2576            .relay_conn_protocol(Protocol::Websocket)
    +2559        p1_accept.await.e()??;
    +2560        p2_accept.await.e()??;
    +2561        p1_connect.await.e()??;
    +2562        p2_connect.await.e()??;
    +2563
    +2564        Ok(())
    +2565    }
    +2566
    +2567    #[tokio::test]
    +2568    #[traced_test]
    +2569    async fn endpoint_conn_type_becomes_direct() -> Result {
    +2570        const TIMEOUT: Duration = std::time::Duration::from_secs(15);
    +2571        let (relay_map, _relay_url, _relay_guard) = run_relay_server().await?;
    +2572        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    +2573        let ep1_secret_key = SecretKey::generate(&mut rng);
    +2574        let ep2_secret_key = SecretKey::generate(&mut rng);
    +2575        let ep1 = Endpoint::builder()
    +2576            .secret_key(ep1_secret_key)
     2577            .insecure_skip_relay_cert_verify(true)
    -2578            .relay_mode(RelayMode::Custom(relay_map.clone()))
    -2579            .bind()
    -2580            .await?;
    -2581        let server = Endpoint::builder()
    -2582            .relay_conn_protocol(Protocol::Websocket)
    -2583            .insecure_skip_relay_cert_verify(true)
    -2584            .relay_mode(RelayMode::Custom(relay_map))
    +2578            .alpns(vec![TEST_ALPN.to_vec()])
    +2579            .relay_mode(RelayMode::Custom(relay_map.clone()))
    +2580            .bind()
    +2581            .await?;
    +2582        let ep2 = Endpoint::builder()
    +2583            .secret_key(ep2_secret_key)
    +2584            .insecure_skip_relay_cert_verify(true)
     2585            .alpns(vec![TEST_ALPN.to_vec()])
    -2586            .bind()
    -2587            .await?;
    -2588
    -2589        let task = tokio::spawn({
    -2590            let server = server.clone();
    -2591            async move {
    -2592                let Some(conn) = server.accept().await else {
    -2593                    snafu::whatever!("Expected an incoming connection");
    -2594                };
    -2595                let conn = conn.await.e()?;
    -2596                let (mut send, mut recv) = conn.accept_bi().await.e()?;
    -2597                let data = recv.read_to_end(1000).await.e()?;
    -2598                send.write_all(&data).await.e()?;
    -2599                send.finish().e()?;
    -2600                conn.closed().await;
    -2601
    -2602                Ok::<_, Error>(())
    -2603            }
    -2604        });
    -2605
    -2606        let addr = server.node_addr().initialized().await?;
    -2607        let conn = client.connect(addr, TEST_ALPN).await?;
    -2608        let (mut send, mut recv) = conn.open_bi().await.e()?;
    -2609        send.write_all(b"Hello, world!").await.e()?;
    -2610        send.finish().e()?;
    -2611        let data = recv.read_to_end(1000).await.e()?;
    -2612        conn.close(0u32.into(), b"bye!");
    +2586            .relay_mode(RelayMode::Custom(relay_map))
    +2587            .bind()
    +2588            .await?;
    +2589
    +2590        async fn wait_for_conn_type_direct(ep: &Endpoint, node_id: NodeId) -> Result {
    +2591            let mut stream = ep.conn_type(node_id).expect("connection exists").stream();
    +2592            let src = ep.node_id().fmt_short();
    +2593            let dst = node_id.fmt_short();
    +2594            while let Some(conn_type) = stream.next().await {
    +2595                tracing::info!(me = %src, dst = %dst, conn_type = ?conn_type);
    +2596                if matches!(conn_type, ConnectionType::Direct(_)) {
    +2597                    return Ok(());
    +2598                }
    +2599            }
    +2600            snafu::whatever!("conn_type stream ended before `ConnectionType::Direct`");
    +2601        }
    +2602
    +2603        async fn accept(ep: &Endpoint) -> Result<Connection> {
    +2604            let incoming = ep.accept().await.expect("ep closed");
    +2605            let conn = incoming.await.e()?;
    +2606            let node_id = conn.remote_node_id()?;
    +2607            tracing::info!(node_id=%node_id.fmt_short(), "accepted connection");
    +2608            Ok(conn)
    +2609        }
    +2610
    +2611        let ep1_nodeid = ep1.node_id();
    +2612        let ep2_nodeid = ep2.node_id();
     2613
    -2614        task.await.e()??;
    -2615
    -2616        client.close().await;
    -2617        server.close().await;
    -2618
    -2619        assert_eq!(&data, b"Hello, world!");
    +2614        let ep1_nodeaddr = ep1.node_addr();
    +2615        tracing::info!(
    +2616            "node id 1 {ep1_nodeid}, relay URL {:?}",
    +2617            ep1_nodeaddr.relay_url()
    +2618        );
    +2619        tracing::info!("node id 2 {ep2_nodeid}");
     2620
    -2621        Ok(())
    -2622    }
    -2623
    -2624    #[tokio::test]
    -2625    #[traced_test]
    -2626    async fn endpoint_bidi_send_recv() -> Result {
    -2627        let ep1 = Endpoint::builder()
    -2628            .alpns(vec![TEST_ALPN.to_vec()])
    -2629            .relay_mode(RelayMode::Disabled);
    +2621        let ep1_side = tokio::time::timeout(TIMEOUT, async move {
    +2622            let conn = accept(&ep1).await?;
    +2623            let mut send = conn.open_uni().await.e()?;
    +2624            wait_for_conn_type_direct(&ep1, ep2_nodeid).await?;
    +2625            send.write_all(b"Conn is direct").await.e()?;
    +2626            send.finish().e()?;
    +2627            conn.closed().await;
    +2628            Ok::<(), Error>(())
    +2629        });
     2630
    -2631        let ep1 = ep1.bind().await?;
    -2632        let ep2 = Endpoint::builder()
    -2633            .alpns(vec![TEST_ALPN.to_vec()])
    -2634            .relay_mode(RelayMode::Disabled);
    -2635
    -2636        let ep2 = ep2.bind().await?;
    -2637
    -2638        let ep1_nodeaddr = ep1.node_addr().initialized().await?;
    -2639        let ep2_nodeaddr = ep2.node_addr().initialized().await?;
    -2640        ep1.add_node_addr(ep2_nodeaddr.clone())?;
    -2641        ep2.add_node_addr(ep1_nodeaddr.clone())?;
    -2642        let ep1_nodeid = ep1.node_id();
    -2643        let ep2_nodeid = ep2.node_id();
    -2644        eprintln!("node id 1 {ep1_nodeid}");
    -2645        eprintln!("node id 2 {ep2_nodeid}");
    -2646
    -2647        async fn connect_hello(ep: Endpoint, dst: NodeAddr) -> Result {
    -2648            let conn = ep.connect(dst, TEST_ALPN).await?;
    -2649            let (mut send, mut recv) = conn.open_bi().await.e()?;
    -2650            info!("sending hello");
    -2651            send.write_all(b"hello").await.e()?;
    -2652            send.finish().e()?;
    -2653            info!("receiving world");
    -2654            let m = recv.read_to_end(100).await.e()?;
    -2655            assert_eq!(m, b"world");
    -2656            conn.close(1u8.into(), b"done");
    -2657            Ok(())
    -2658        }
    -2659
    -2660        async fn accept_world(ep: Endpoint, src: NodeId) -> Result {
    -2661            let incoming = ep.accept().await.e()?;
    -2662            let mut iconn = incoming.accept().e()?;
    -2663            let alpn = iconn.alpn().await?;
    -2664            let conn = iconn.await.e()?;
    -2665            let node_id = conn.remote_node_id()?;
    -2666            assert_eq!(node_id, src);
    -2667            assert_eq!(alpn, TEST_ALPN);
    -2668            let (mut send, mut recv) = conn.accept_bi().await.e()?;
    -2669            info!("receiving hello");
    -2670            let m = recv.read_to_end(100).await.e()?;
    -2671            assert_eq!(m, b"hello");
    -2672            info!("sending hello");
    -2673            send.write_all(b"world").await.e()?;
    -2674            send.finish().e()?;
    -2675            match conn.closed().await {
    -2676                ConnectionError::ApplicationClosed(closed) => {
    -2677                    assert_eq!(closed.error_code, 1u8.into());
    -2678                    Ok(())
    -2679                }
    -2680                _ => panic!("wrong close error"),
    -2681            }
    -2682        }
    -2683
    -2684        let p1_accept = tokio::spawn(accept_world(ep1.clone(), ep2_nodeid).instrument(info_span!(
    -2685            "p1_accept",
    -2686            ep1 = %ep1.node_id().fmt_short(),
    -2687            dst = %ep2_nodeid.fmt_short(),
    -2688        )));
    -2689        let p2_accept = tokio::spawn(accept_world(ep2.clone(), ep1_nodeid).instrument(info_span!(
    -2690            "p2_accept",
    -2691            ep2 = %ep2.node_id().fmt_short(),
    -2692            dst = %ep1_nodeid.fmt_short(),
    -2693        )));
    -2694        let p1_connect = tokio::spawn(connect_hello(ep1.clone(), ep2_nodeaddr).instrument(
    -2695            info_span!(
    -2696                "p1_connect",
    -2697                ep1 = %ep1.node_id().fmt_short(),
    -2698                dst = %ep2_nodeid.fmt_short(),
    -2699            ),
    -2700        ));
    -2701        let p2_connect = tokio::spawn(connect_hello(ep2.clone(), ep1_nodeaddr).instrument(
    -2702            info_span!(
    -2703                "p2_connect",
    -2704                ep2 = %ep2.node_id().fmt_short(),
    -2705                dst = %ep1_nodeid.fmt_short(),
    -2706            ),
    -2707        ));
    -2708
    -2709        p1_accept.await.e()??;
    -2710        p2_accept.await.e()??;
    -2711        p1_connect.await.e()??;
    -2712        p2_connect.await.e()??;
    -2713
    -2714        Ok(())
    -2715    }
    -2716
    -2717    #[tokio::test]
    -2718    #[traced_test]
    -2719    async fn endpoint_conn_type_becomes_direct() -> Result {
    -2720        const TIMEOUT: Duration = std::time::Duration::from_secs(15);
    -2721        let (relay_map, _relay_url, _relay_guard) = run_relay_server().await?;
    -2722        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    -2723        let ep1_secret_key = SecretKey::generate(&mut rng);
    -2724        let ep2_secret_key = SecretKey::generate(&mut rng);
    -2725        let ep1 = Endpoint::builder()
    -2726            .secret_key(ep1_secret_key)
    -2727            .insecure_skip_relay_cert_verify(true)
    -2728            .alpns(vec![TEST_ALPN.to_vec()])
    -2729            .relay_mode(RelayMode::Custom(relay_map.clone()))
    -2730            .bind()
    -2731            .await?;
    -2732        let ep2 = Endpoint::builder()
    -2733            .secret_key(ep2_secret_key)
    -2734            .insecure_skip_relay_cert_verify(true)
    -2735            .alpns(vec![TEST_ALPN.to_vec()])
    -2736            .relay_mode(RelayMode::Custom(relay_map))
    -2737            .bind()
    -2738            .await?;
    -2739
    -2740        async fn wait_for_conn_type_direct(ep: &Endpoint, node_id: NodeId) -> Result {
    -2741            let mut stream = ep.conn_type(node_id).expect("connection exists").stream();
    -2742            let src = ep.node_id().fmt_short();
    -2743            let dst = node_id.fmt_short();
    -2744            while let Some(conn_type) = stream.next().await {
    -2745                tracing::info!(me = %src, dst = %dst, conn_type = ?conn_type);
    -2746                if matches!(conn_type, ConnectionType::Direct(_)) {
    -2747                    return Ok(());
    -2748                }
    -2749            }
    -2750            snafu::whatever!("conn_type stream ended before `ConnectionType::Direct`");
    -2751        }
    -2752
    -2753        async fn accept(ep: &Endpoint) -> Result<Connection> {
    -2754            let incoming = ep.accept().await.expect("ep closed");
    -2755            let conn = incoming.await.e()?;
    -2756            let node_id = conn.remote_node_id()?;
    -2757            tracing::info!(node_id=%node_id.fmt_short(), "accepted connection");
    -2758            Ok(conn)
    -2759        }
    -2760
    -2761        let ep1_nodeid = ep1.node_id();
    -2762        let ep2_nodeid = ep2.node_id();
    -2763
    -2764        let ep1_nodeaddr = ep1.node_addr().initialized().await?;
    -2765        tracing::info!(
    -2766            "node id 1 {ep1_nodeid}, relay URL {:?}",
    -2767            ep1_nodeaddr.relay_url()
    -2768        );
    -2769        tracing::info!("node id 2 {ep2_nodeid}");
    -2770
    -2771        let ep1_side = tokio::time::timeout(TIMEOUT, async move {
    -2772            let conn = accept(&ep1).await?;
    -2773            let mut send = conn.open_uni().await.e()?;
    -2774            wait_for_conn_type_direct(&ep1, ep2_nodeid).await?;
    -2775            send.write_all(b"Conn is direct").await.e()?;
    -2776            send.finish().e()?;
    -2777            conn.closed().await;
    -2778            Ok::<(), Error>(())
    -2779        });
    -2780
    -2781        let ep2_side = tokio::time::timeout(TIMEOUT, async move {
    -2782            let conn = ep2.connect(ep1_nodeaddr, TEST_ALPN).await?;
    -2783            let mut recv = conn.accept_uni().await.e()?;
    -2784            wait_for_conn_type_direct(&ep2, ep1_nodeid).await?;
    -2785            let read = recv.read_to_end(100).await.e()?;
    -2786            assert_eq!(read, b"Conn is direct".to_vec());
    -2787            conn.close(0u32.into(), b"done");
    -2788            conn.closed().await;
    -2789            Ok::<(), Error>(())
    -2790        });
    -2791
    -2792        let res_ep1 = AbortOnDropHandle::new(tokio::spawn(ep1_side));
    -2793        let res_ep2 = AbortOnDropHandle::new(tokio::spawn(ep2_side));
    -2794
    -2795        let (r1, r2) = tokio::try_join!(res_ep1, res_ep2).e()?;
    -2796        r1.e()??;
    -2797        r2.e()??;
    -2798
    -2799        Ok(())
    -2800    }
    -2801
    -2802    #[tokio::test]
    -2803    #[traced_test]
    -2804    async fn test_direct_addresses_no_qad_relay() -> Result {
    -2805        let (relay_map, _, _guard) = run_relay_server_with(false).await.unwrap();
    +2631        let ep2_side = tokio::time::timeout(TIMEOUT, async move {
    +2632            let conn = ep2.connect(ep1_nodeaddr, TEST_ALPN).await?;
    +2633            let mut recv = conn.accept_uni().await.e()?;
    +2634            wait_for_conn_type_direct(&ep2, ep1_nodeid).await?;
    +2635            let read = recv.read_to_end(100).await.e()?;
    +2636            assert_eq!(read, b"Conn is direct".to_vec());
    +2637            conn.close(0u32.into(), b"done");
    +2638            conn.closed().await;
    +2639            Ok::<(), Error>(())
    +2640        });
    +2641
    +2642        let res_ep1 = AbortOnDropHandle::new(tokio::spawn(ep1_side));
    +2643        let res_ep2 = AbortOnDropHandle::new(tokio::spawn(ep2_side));
    +2644
    +2645        let (r1, r2) = tokio::try_join!(res_ep1, res_ep2).e()?;
    +2646        r1.e()??;
    +2647        r2.e()??;
    +2648
    +2649        Ok(())
    +2650    }
    +2651
    +2652    #[tokio::test]
    +2653    #[traced_test]
    +2654    async fn test_direct_addresses_no_qad_relay() -> Result {
    +2655        let (relay_map, _, _guard) = run_relay_server_with(false).await.unwrap();
    +2656
    +2657        let ep = Endpoint::builder()
    +2658            .alpns(vec![TEST_ALPN.to_vec()])
    +2659            .relay_mode(RelayMode::Custom(relay_map))
    +2660            .insecure_skip_relay_cert_verify(true)
    +2661            .bind()
    +2662            .await?;
    +2663
    +2664        assert!(!ep.node_addr().direct_addresses.is_empty());
    +2665
    +2666        Ok(())
    +2667    }
    +2668
    +2669    async fn spawn_0rtt_server(secret_key: SecretKey, log_span: tracing::Span) -> Result<Endpoint> {
    +2670        let server = Endpoint::builder()
    +2671            .secret_key(secret_key)
    +2672            .alpns(vec![TEST_ALPN.to_vec()])
    +2673            .relay_mode(RelayMode::Disabled)
    +2674            .bind()
    +2675            .await?;
    +2676
    +2677        // Gets aborted via the endpoint closing causing an `Err`
    +2678        // a simple echo server
    +2679        tokio::spawn({
    +2680            let server = server.clone();
    +2681            async move {
    +2682                tracing::trace!("Server accept loop started");
    +2683                while let Some(incoming) = server.accept().await {
    +2684                    tracing::trace!("Server received incoming connection");
    +2685                    // Handle connection errors gracefully instead of exiting the task
    +2686                    let connecting = match incoming.accept() {
    +2687                        Ok(c) => c,
    +2688                        Err(e) => {
    +2689                            tracing::warn!("Failed to accept incoming connection: {e:?}");
    +2690                            continue;
    +2691                        }
    +2692                    };
    +2693
    +2694                    let conn = match connecting.into_0rtt() {
    +2695                        Ok((conn, _)) => {
    +2696                            info!("0rtt accepted");
    +2697                            conn
    +2698                        }
    +2699                        Err(connecting) => {
    +2700                            info!("0rtt denied");
    +2701                            match connecting.await {
    +2702                                Ok(c) => c,
    +2703                                Err(e) => {
    +2704                                    tracing::warn!("Connection failed: {e:?}");
    +2705                                    continue;
    +2706                                }
    +2707                            }
    +2708                        }
    +2709                    };
    +2710
    +2711                    // Handle stream errors gracefully
    +2712                    let (mut send, mut recv) = match conn.accept_bi().await {
    +2713                        Ok(s) => s,
    +2714                        Err(e) => {
    +2715                            tracing::warn!("Failed to accept bi stream: {e:?}");
    +2716                            continue;
    +2717                        }
    +2718                    };
    +2719
    +2720                    let data = match recv.read_to_end(10_000_000).await {
    +2721                        Ok(d) => d,
    +2722                        Err(e) => {
    +2723                            tracing::warn!("Failed to read data: {e:?}");
    +2724                            continue;
    +2725                        }
    +2726                    };
    +2727
    +2728                    if let Err(e) = send.write_all(&data).await {
    +2729                        tracing::warn!("Failed to write data: {e:?}");
    +2730                        continue;
    +2731                    }
    +2732
    +2733                    if let Err(e) = send.finish() {
    +2734                        tracing::warn!("Failed to finish send: {e:?}");
    +2735                        continue;
    +2736                    }
    +2737
    +2738                    // Stay alive until the other side closes the connection.
    +2739                    conn.closed().await;
    +2740                    tracing::trace!("Connection closed, ready for next");
    +2741                }
    +2742                tracing::trace!("Server accept loop exiting");
    +2743                Ok::<_, Error>(())
    +2744            }
    +2745            .instrument(log_span)
    +2746        });
    +2747
    +2748        Ok(server)
    +2749    }
    +2750
    +2751    async fn connect_client_0rtt_expect_err(client: &Endpoint, server_addr: NodeAddr) -> Result {
    +2752        let conn = client
    +2753            .connect_with_opts(server_addr, TEST_ALPN, ConnectOptions::new())
    +2754            .await?
    +2755            .into_0rtt()
    +2756            .expect_err("expected 0rtt to fail")
    +2757            .await
    +2758            .e()?;
    +2759
    +2760        let (mut send, mut recv) = conn.open_bi().await.e()?;
    +2761        send.write_all(b"hello").await.e()?;
    +2762        send.finish().e()?;
    +2763        let received = recv.read_to_end(1_000).await.e()?;
    +2764        assert_eq!(&received, b"hello");
    +2765        conn.close(0u32.into(), b"thx");
    +2766        Ok(())
    +2767    }
    +2768
    +2769    async fn connect_client_0rtt_expect_ok(
    +2770        client: &Endpoint,
    +2771        server_addr: NodeAddr,
    +2772        expect_server_accepts: bool,
    +2773    ) -> Result {
    +2774        tracing::trace!(?server_addr, "Client connecting with 0-RTT");
    +2775        let (conn, accepted_0rtt) = client
    +2776            .connect_with_opts(server_addr, TEST_ALPN, ConnectOptions::new())
    +2777            .await?
    +2778            .into_0rtt()
    +2779            .ok()
    +2780            .e()?;
    +2781
    +2782        tracing::trace!("Client established 0-RTT connection");
    +2783        // This is how we send data in 0-RTT:
    +2784        let (mut send, recv) = conn.open_bi().await.e()?;
    +2785        send.write_all(b"hello").await.e()?;
    +2786        send.finish().e()?;
    +2787        tracing::trace!("Client sent 0-RTT data, waiting for server response");
    +2788        // When this resolves, we've gotten a response from the server about whether the 0-RTT data above was accepted:
    +2789        let accepted = accepted_0rtt.await;
    +2790        tracing::trace!(?accepted, "Server responded to 0-RTT");
    +2791        assert_eq!(accepted, expect_server_accepts);
    +2792        let mut recv = if accepted {
    +2793            recv
    +2794        } else {
    +2795            // in this case we need to re-send data by re-creating the connection.
    +2796            let (mut send, recv) = conn.open_bi().await.e()?;
    +2797            send.write_all(b"hello").await.e()?;
    +2798            send.finish().e()?;
    +2799            recv
    +2800        };
    +2801        let received = recv.read_to_end(1_000).await.e()?;
    +2802        assert_eq!(&received, b"hello");
    +2803        conn.close(0u32.into(), b"thx");
    +2804        Ok(())
    +2805    }
     2806
    -2807        let ep = Endpoint::builder()
    -2808            .alpns(vec![TEST_ALPN.to_vec()])
    -2809            .relay_mode(RelayMode::Custom(relay_map))
    -2810            .insecure_skip_relay_cert_verify(true)
    -2811            .bind()
    -2812            .await?;
    -2813
    -2814        tokio::time::timeout(Duration::from_secs(10), ep.direct_addresses().initialized())
    -2815            .await
    -2816            .e()??;
    -2817        Ok(())
    -2818    }
    -2819
    -2820    async fn spawn_0rtt_server(secret_key: SecretKey, log_span: tracing::Span) -> Result<Endpoint> {
    -2821        let server = Endpoint::builder()
    -2822            .secret_key(secret_key)
    -2823            .alpns(vec![TEST_ALPN.to_vec()])
    -2824            .relay_mode(RelayMode::Disabled)
    -2825            .bind()
    -2826            .await?;
    -2827
    -2828        // Gets aborted via the endpoint closing causing an `Err`
    -2829        // a simple echo server
    -2830        tokio::spawn({
    -2831            let server = server.clone();
    -2832            async move {
    -2833                while let Some(incoming) = server.accept().await {
    -2834                    let connecting = incoming.accept().e()?;
    -2835                    let conn = match connecting.into_0rtt() {
    -2836                        Ok((conn, _)) => {
    -2837                            info!("0rtt accepted");
    -2838                            conn
    -2839                        }
    -2840                        Err(connecting) => {
    -2841                            info!("0rtt denied");
    -2842                            connecting.await.e()?
    -2843                        }
    -2844                    };
    -2845                    let (mut send, mut recv) = conn.accept_bi().await.e()?;
    -2846                    let data = recv.read_to_end(10_000_000).await.e()?;
    -2847                    send.write_all(&data).await.e()?;
    -2848                    send.finish().e()?;
    -2849
    -2850                    // Stay alive until the other side closes the connection.
    -2851                    conn.closed().await;
    -2852                }
    -2853                Ok::<_, Error>(())
    -2854            }
    -2855            .instrument(log_span)
    -2856        });
    -2857
    -2858        Ok(server)
    -2859    }
    -2860
    -2861    async fn connect_client_0rtt_expect_err(client: &Endpoint, server_addr: NodeAddr) -> Result {
    -2862        let conn = client
    -2863            .connect_with_opts(server_addr, TEST_ALPN, ConnectOptions::new())
    -2864            .await?
    -2865            .into_0rtt()
    -2866            .expect_err("expected 0rtt to fail")
    -2867            .await
    -2868            .e()?;
    -2869
    -2870        let (mut send, mut recv) = conn.open_bi().await.e()?;
    -2871        send.write_all(b"hello").await.e()?;
    -2872        send.finish().e()?;
    -2873        let received = recv.read_to_end(1_000).await.e()?;
    -2874        assert_eq!(&received, b"hello");
    -2875        conn.close(0u32.into(), b"thx");
    -2876        Ok(())
    -2877    }
    -2878
    -2879    async fn connect_client_0rtt_expect_ok(
    -2880        client: &Endpoint,
    -2881        server_addr: NodeAddr,
    -2882        expect_server_accepts: bool,
    -2883    ) -> Result {
    -2884        let (conn, accepted_0rtt) = client
    -2885            .connect_with_opts(server_addr, TEST_ALPN, ConnectOptions::new())
    -2886            .await?
    -2887            .into_0rtt()
    -2888            .ok()
    -2889            .e()?;
    -2890
    -2891        // This is how we send data in 0-RTT:
    -2892        let (mut send, recv) = conn.open_bi().await.e()?;
    -2893        send.write_all(b"hello").await.e()?;
    -2894        send.finish().e()?;
    -2895        // When this resolves, we've gotten a response from the server about whether the 0-RTT data above was accepted:
    -2896        let accepted = accepted_0rtt.await;
    -2897        assert_eq!(accepted, expect_server_accepts);
    -2898        let mut recv = if accepted {
    -2899            recv
    -2900        } else {
    -2901            // in this case we need to re-send data by re-creating the connection.
    -2902            let (mut send, recv) = conn.open_bi().await.e()?;
    -2903            send.write_all(b"hello").await.e()?;
    -2904            send.finish().e()?;
    -2905            recv
    -2906        };
    -2907        let received = recv.read_to_end(1_000).await.e()?;
    -2908        assert_eq!(&received, b"hello");
    -2909        conn.close(0u32.into(), b"thx");
    -2910        Ok(())
    -2911    }
    -2912
    -2913    #[tokio::test]
    -2914    #[traced_test]
    -2915    async fn test_0rtt() -> Result {
    -2916        let client = Endpoint::builder()
    -2917            .relay_mode(RelayMode::Disabled)
    -2918            .bind()
    -2919            .await?;
    -2920        let server = spawn_0rtt_server(
    -2921            SecretKey::generate(rand::thread_rng()),
    -2922            info_span!("server"),
    -2923        )
    -2924        .await?;
    +2807    #[tokio::test]
    +2808    #[traced_test]
    +2809    async fn test_0rtt() -> Result {
    +2810        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    +2811        let client = Endpoint::builder()
    +2812            .relay_mode(RelayMode::Disabled)
    +2813            .bind()
    +2814            .await?;
    +2815        let server = spawn_0rtt_server(SecretKey::generate(&mut rng), info_span!("server")).await?;
    +2816
    +2817        connect_client_0rtt_expect_err(&client, server.node_addr()).await?;
    +2818        // The second 0rtt attempt should work
    +2819        connect_client_0rtt_expect_ok(&client, server.node_addr(), true).await?;
    +2820
    +2821        client.close().await;
    +2822        server.close().await;
    +2823
    +2824        Ok(())
    +2825    }
    +2826
    +2827    // We have this test, as this would've failed at some point.
    +2828    // This effectively tests that we correctly categorize the TLS session tickets we
    +2829    // receive into the respective "bucket" for the recipient.
    +2830    #[tokio::test]
    +2831    #[traced_test]
    +2832    async fn test_0rtt_non_consecutive() -> Result {
    +2833        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    +2834        let client = Endpoint::builder()
    +2835            .relay_mode(RelayMode::Disabled)
    +2836            .bind()
    +2837            .await?;
    +2838        let server = spawn_0rtt_server(SecretKey::generate(&mut rng), info_span!("server")).await?;
    +2839
    +2840        connect_client_0rtt_expect_err(&client, server.node_addr()).await?;
    +2841
    +2842        // connecting with another endpoint should not interfere with our
    +2843        // TLS session ticket cache for the first endpoint:
    +2844        let another =
    +2845            spawn_0rtt_server(SecretKey::generate(&mut rng), info_span!("another")).await?;
    +2846        connect_client_0rtt_expect_err(&client, another.node_addr()).await?;
    +2847        another.close().await;
    +2848
    +2849        connect_client_0rtt_expect_ok(&client, server.node_addr(), true).await?;
    +2850
    +2851        client.close().await;
    +2852        server.close().await;
    +2853
    +2854        Ok(())
    +2855    }
    +2856
    +2857    // Test whether 0-RTT is possible after a restart:
    +2858    #[tokio::test]
    +2859    #[traced_test]
    +2860    async fn test_0rtt_after_server_restart() -> Result {
    +2861        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(42);
    +2862        let client = Endpoint::builder()
    +2863            .relay_mode(RelayMode::Disabled)
    +2864            .bind()
    +2865            .await?;
    +2866        let server_key = SecretKey::generate(&mut rng);
    +2867        let server = spawn_0rtt_server(server_key.clone(), info_span!("server-initial")).await?;
    +2868
    +2869        connect_client_0rtt_expect_err(&client, server.node_addr()).await?;
    +2870        connect_client_0rtt_expect_ok(&client, server.node_addr(), true).await?;
    +2871
    +2872        server.close().await;
    +2873
    +2874        let server = spawn_0rtt_server(server_key, info_span!("server-restart")).await?;
    +2875
    +2876        // we expect the client to *believe* it can 0-RTT connect to the server (hence expect_ok),
    +2877        // but the server will reject the early data because it discarded necessary state
    +2878        // to decrypt it when restarting.
    +2879        connect_client_0rtt_expect_ok(&client, server.node_addr(), false).await?;
    +2880
    +2881        client.close().await;
    +2882
    +2883        Ok(())
    +2884    }
    +2885
    +2886    #[cfg_attr(target_os = "windows", ignore = "flaky")]
    +2887    #[tokio::test]
    +2888    #[traced_test]
    +2889    async fn graceful_close() -> Result {
    +2890        let client = Endpoint::builder().bind().await?;
    +2891        let server = Endpoint::builder()
    +2892            .alpns(vec![TEST_ALPN.to_vec()])
    +2893            .bind()
    +2894            .await?;
    +2895        let server_addr = server.node_addr();
    +2896        let server_task = tokio::spawn(async move {
    +2897            let incoming = server.accept().await.e()?;
    +2898            let conn = incoming.await.e()?;
    +2899            let (mut send, mut recv) = conn.accept_bi().await.e()?;
    +2900            let msg = recv.read_to_end(1_000).await.e()?;
    +2901            send.write_all(&msg).await.e()?;
    +2902            send.finish().e()?;
    +2903            let close_reason = conn.closed().await;
    +2904            Ok::<_, Error>(close_reason)
    +2905        });
    +2906
    +2907        let conn = client.connect(server_addr, TEST_ALPN).await?;
    +2908        let (mut send, mut recv) = conn.open_bi().await.e()?;
    +2909        send.write_all(b"Hello, world!").await.e()?;
    +2910        send.finish().e()?;
    +2911        recv.read_to_end(1_000).await.e()?;
    +2912        conn.close(42u32.into(), b"thanks, bye!");
    +2913        client.close().await;
    +2914
    +2915        let close_err = server_task.await.e()??;
    +2916        let ConnectionError::ApplicationClosed(app_close) = close_err else {
    +2917            panic!("Unexpected close reason: {close_err:?}");
    +2918        };
    +2919
    +2920        assert_eq!(app_close.error_code, 42u32.into());
    +2921        assert_eq!(app_close.reason.as_ref(), b"thanks, bye!");
    +2922
    +2923        Ok(())
    +2924    }
     2925
    -2926        connect_client_0rtt_expect_err(&client, server.node_addr().initialized().await?).await?;
    -2927        // The second 0rtt attempt should work
    -2928        connect_client_0rtt_expect_ok(&client, server.node_addr().initialized().await?, true)
    -2929            .await?;
    -2930
    -2931        client.close().await;
    -2932        server.close().await;
    -2933
    -2934        Ok(())
    -2935    }
    -2936
    -2937    // We have this test, as this would've failed at some point.
    -2938    // This effectively tests that we correctly categorize the TLS session tickets we
    -2939    // receive into the respective "bucket" for the recipient.
    -2940    #[tokio::test]
    -2941    #[traced_test]
    -2942    async fn test_0rtt_non_consecutive() -> Result {
    -2943        let client = Endpoint::builder()
    -2944            .relay_mode(RelayMode::Disabled)
    -2945            .bind()
    -2946            .await?;
    -2947        let server = spawn_0rtt_server(
    -2948            SecretKey::generate(rand::thread_rng()),
    -2949            info_span!("server"),
    -2950        )
    -2951        .await?;
    -2952
    -2953        connect_client_0rtt_expect_err(&client, server.node_addr().initialized().await?).await?;
    -2954
    -2955        // connecting with another endpoint should not interfere with our
    -2956        // TLS session ticket cache for the first endpoint:
    -2957        let another = spawn_0rtt_server(
    -2958            SecretKey::generate(rand::thread_rng()),
    -2959            info_span!("another"),
    -2960        )
    -2961        .await?;
    -2962        connect_client_0rtt_expect_err(&client, another.node_addr().initialized().await?).await?;
    -2963        another.close().await;
    -2964
    -2965        connect_client_0rtt_expect_ok(&client, server.node_addr().initialized().await?, true)
    -2966            .await?;
    +2926    #[cfg(feature = "metrics")]
    +2927    #[tokio::test]
    +2928    #[traced_test]
    +2929    async fn metrics_smoke() -> Result {
    +2930        use iroh_metrics::{MetricsSource, Registry};
    +2931
    +2932        let secret_key = SecretKey::from_bytes(&[0u8; 32]);
    +2933        let client = Endpoint::builder()
    +2934            .secret_key(secret_key)
    +2935            .relay_mode(RelayMode::Disabled)
    +2936            .bind()
    +2937            .await?;
    +2938        let secret_key = SecretKey::from_bytes(&[1u8; 32]);
    +2939        let server = Endpoint::builder()
    +2940            .secret_key(secret_key)
    +2941            .relay_mode(RelayMode::Disabled)
    +2942            .alpns(vec![TEST_ALPN.to_vec()])
    +2943            .bind()
    +2944            .await?;
    +2945        let server_addr = server.node_addr();
    +2946        let server_task = tokio::task::spawn(async move {
    +2947            let conn = server.accept().await.e()?.accept().e()?.await.e()?;
    +2948            let mut uni = conn.accept_uni().await.e()?;
    +2949            uni.read_to_end(10).await.e()?;
    +2950            drop(conn);
    +2951            Ok::<_, Error>(server)
    +2952        });
    +2953        let conn = client.connect(server_addr, TEST_ALPN).await?;
    +2954        let mut uni = conn.open_uni().await.e()?;
    +2955        uni.write_all(b"helloworld").await.e()?;
    +2956        uni.finish().e()?;
    +2957        conn.closed().await;
    +2958        drop(conn);
    +2959        let server = server_task.await.e()??;
    +2960
    +2961        let m = client.metrics();
    +2962        assert_eq!(m.magicsock.num_direct_conns_added.get(), 1);
    +2963        assert_eq!(m.magicsock.connection_became_direct.get(), 1);
    +2964        assert_eq!(m.magicsock.connection_handshake_success.get(), 1);
    +2965        assert_eq!(m.magicsock.nodes_contacted_directly.get(), 1);
    +2966        assert!(m.magicsock.recv_datagrams.get() > 0);
     2967
    -2968        client.close().await;
    -2969        server.close().await;
    -2970
    -2971        Ok(())
    -2972    }
    -2973
    -2974    // Test whether 0-RTT is possible after a restart:
    -2975    #[tokio::test]
    -2976    #[traced_test]
    -2977    async fn test_0rtt_after_server_restart() -> Result {
    -2978        let client = Endpoint::builder()
    -2979            .relay_mode(RelayMode::Disabled)
    -2980            .bind()
    -2981            .await?;
    -2982        let server_key = SecretKey::generate(rand::thread_rng());
    -2983        let server = spawn_0rtt_server(server_key.clone(), info_span!("server-initial")).await?;
    -2984
    -2985        connect_client_0rtt_expect_err(&client, server.node_addr().initialized().await?).await?;
    -2986        connect_client_0rtt_expect_ok(&client, server.node_addr().initialized().await?, true)
    -2987            .await?;
    -2988
    -2989        server.close().await;
    -2990
    -2991        let server = spawn_0rtt_server(server_key, info_span!("server-restart")).await?;
    -2992
    -2993        // we expect the client to *believe* it can 0-RTT connect to the server (hence expect_ok),
    -2994        // but the server will reject the early data because it discarded necessary state
    -2995        // to decrypt it when restarting.
    -2996        connect_client_0rtt_expect_ok(&client, server.node_addr().initialized().await?, false)
    -2997            .await?;
    -2998
    -2999        client.close().await;
    -3000
    -3001        Ok(())
    -3002    }
    -3003
    -3004    #[cfg_attr(target_os = "windows", ignore = "flaky")]
    -3005    #[tokio::test]
    -3006    #[traced_test]
    -3007    async fn graceful_close() -> Result {
    -3008        let client = Endpoint::builder().bind().await?;
    -3009        let server = Endpoint::builder()
    -3010            .alpns(vec![TEST_ALPN.to_vec()])
    -3011            .bind()
    -3012            .await?;
    -3013        let server_addr = server.node_addr().initialized().await?;
    -3014        let server_task = tokio::spawn(async move {
    -3015            let incoming = server.accept().await.e()?;
    -3016            let conn = incoming.await.e()?;
    -3017            let (mut send, mut recv) = conn.accept_bi().await.e()?;
    -3018            let msg = recv.read_to_end(1_000).await.e()?;
    -3019            send.write_all(&msg).await.e()?;
    -3020            send.finish().e()?;
    -3021            let close_reason = conn.closed().await;
    -3022            Ok::<_, Error>(close_reason)
    -3023        });
    -3024
    -3025        let conn = client.connect(server_addr, TEST_ALPN).await?;
    -3026        let (mut send, mut recv) = conn.open_bi().await.e()?;
    -3027        send.write_all(b"Hello, world!").await.e()?;
    -3028        send.finish().e()?;
    -3029        recv.read_to_end(1_000).await.e()?;
    -3030        conn.close(42u32.into(), b"thanks, bye!");
    -3031        client.close().await;
    -3032
    -3033        let close_err = server_task.await.e()??;
    -3034        let ConnectionError::ApplicationClosed(app_close) = close_err else {
    -3035            panic!("Unexpected close reason: {close_err:?}");
    -3036        };
    -3037
    -3038        assert_eq!(app_close.error_code, 42u32.into());
    -3039        assert_eq!(app_close.reason.as_ref(), b"thanks, bye!");
    -3040
    -3041        Ok(())
    -3042    }
    -3043
    -3044    #[cfg(feature = "metrics")]
    -3045    #[tokio::test]
    -3046    #[traced_test]
    -3047    async fn metrics_smoke() -> Result {
    -3048        use iroh_metrics::{MetricsSource, Registry};
    -3049
    -3050        let secret_key = SecretKey::from_bytes(&[0u8; 32]);
    -3051        let client = Endpoint::builder()
    -3052            .secret_key(secret_key)
    -3053            .relay_mode(RelayMode::Disabled)
    -3054            .bind()
    -3055            .await?;
    -3056        let secret_key = SecretKey::from_bytes(&[1u8; 32]);
    -3057        let server = Endpoint::builder()
    -3058            .secret_key(secret_key)
    -3059            .relay_mode(RelayMode::Disabled)
    -3060            .alpns(vec![TEST_ALPN.to_vec()])
    -3061            .bind()
    -3062            .await?;
    -3063        let server_addr = server.node_addr().initialized().await?;
    -3064        let server_task = tokio::task::spawn(async move {
    -3065            let conn = server.accept().await.e()?.accept().e()?.await.e()?;
    -3066            let mut uni = conn.accept_uni().await.e()?;
    -3067            uni.read_to_end(10).await.e()?;
    -3068            drop(conn);
    -3069            Ok::<_, Error>(server)
    -3070        });
    -3071        let conn = client.connect(server_addr, TEST_ALPN).await?;
    -3072        let mut uni = conn.open_uni().await.e()?;
    -3073        uni.write_all(b"helloworld").await.e()?;
    -3074        uni.finish().e()?;
    -3075        conn.closed().await;
    -3076        drop(conn);
    -3077        let server = server_task.await.e()??;
    -3078
    -3079        let m = client.metrics();
    -3080        assert_eq!(m.magicsock.num_direct_conns_added.get(), 1);
    -3081        assert_eq!(m.magicsock.connection_became_direct.get(), 1);
    -3082        assert_eq!(m.magicsock.connection_handshake_success.get(), 1);
    -3083        assert_eq!(m.magicsock.nodes_contacted_directly.get(), 1);
    -3084        assert!(m.magicsock.recv_datagrams.get() > 0);
    -3085
    -3086        let m = server.metrics();
    -3087        assert_eq!(m.magicsock.num_direct_conns_added.get(), 1);
    -3088        assert_eq!(m.magicsock.connection_became_direct.get(), 1);
    -3089        assert_eq!(m.magicsock.nodes_contacted_directly.get(), 1);
    -3090        assert_eq!(m.magicsock.connection_handshake_success.get(), 1);
    -3091        assert!(m.magicsock.recv_datagrams.get() > 0);
    -3092
    -3093        // test openmetrics encoding with labeled subregistries per endpoint
    -3094        fn register_endpoint(registry: &mut Registry, endpoint: &Endpoint) {
    -3095            let id = endpoint.node_id().fmt_short();
    -3096            let sub_registry = registry.sub_registry_with_label("id", id);
    -3097            sub_registry.register_all(endpoint.metrics());
    -3098        }
    -3099        let mut registry = Registry::default();
    -3100        register_endpoint(&mut registry, &client);
    -3101        register_endpoint(&mut registry, &server);
    -3102        let s = registry.encode_openmetrics_to_string()?;
    -3103        assert!(s.contains(r#"magicsock_nodes_contacted_directly_total{id="3b6a27bcce"} 1"#));
    -3104        assert!(s.contains(r#"magicsock_nodes_contacted_directly_total{id="8a88e3dd74"} 1"#));
    -3105        Ok(())
    -3106    }
    -3107
    -3108    /// Configures the accept side to take `accept_alpns` ALPNs, then connects to it with `primary_connect_alpn`
    -3109    /// with `secondary_connect_alpns` set, and finally returns the negotiated ALPN.
    -3110    async fn alpn_connection_test(
    -3111        accept_alpns: Vec<Vec<u8>>,
    -3112        primary_connect_alpn: &[u8],
    -3113        secondary_connect_alpns: Vec<Vec<u8>>,
    -3114    ) -> Result<Option<Vec<u8>>> {
    -3115        let client = Endpoint::builder()
    -3116            .relay_mode(RelayMode::Disabled)
    -3117            .bind()
    -3118            .await?;
    -3119        let server = Endpoint::builder()
    -3120            .relay_mode(RelayMode::Disabled)
    -3121            .alpns(accept_alpns)
    -3122            .bind()
    -3123            .await?;
    -3124        let server_addr = server.node_addr().initialized().await?;
    -3125        let server_task = tokio::spawn({
    -3126            let server = server.clone();
    -3127            async move {
    -3128                let incoming = server.accept().await.e()?;
    -3129                let conn = incoming.await.e()?;
    -3130                conn.close(0u32.into(), b"bye!");
    -3131                Ok::<_, n0_snafu::Error>(conn.alpn())
    -3132            }
    -3133        });
    +2968        let m = server.metrics();
    +2969        assert_eq!(m.magicsock.num_direct_conns_added.get(), 1);
    +2970        assert_eq!(m.magicsock.connection_became_direct.get(), 1);
    +2971        assert_eq!(m.magicsock.nodes_contacted_directly.get(), 1);
    +2972        assert_eq!(m.magicsock.connection_handshake_success.get(), 1);
    +2973        assert!(m.magicsock.recv_datagrams.get() > 0);
    +2974
    +2975        // test openmetrics encoding with labeled subregistries per endpoint
    +2976        fn register_endpoint(registry: &mut Registry, endpoint: &Endpoint) {
    +2977            let id = endpoint.node_id().fmt_short();
    +2978            let sub_registry = registry.sub_registry_with_label("id", id.to_string());
    +2979            sub_registry.register_all(endpoint.metrics());
    +2980        }
    +2981        let mut registry = Registry::default();
    +2982        register_endpoint(&mut registry, &client);
    +2983        register_endpoint(&mut registry, &server);
    +2984        let s = registry.encode_openmetrics_to_string()?;
    +2985        assert!(s.contains(r#"magicsock_nodes_contacted_directly_total{id="3b6a27bcce"} 1"#));
    +2986        assert!(s.contains(r#"magicsock_nodes_contacted_directly_total{id="8a88e3dd74"} 1"#));
    +2987        Ok(())
    +2988    }
    +2989
    +2990    /// Configures the accept side to take `accept_alpns` ALPNs, then connects to it with `primary_connect_alpn`
    +2991    /// with `secondary_connect_alpns` set, and finally returns the negotiated ALPN.
    +2992    async fn alpn_connection_test(
    +2993        accept_alpns: Vec<Vec<u8>>,
    +2994        primary_connect_alpn: &[u8],
    +2995        secondary_connect_alpns: Vec<Vec<u8>>,
    +2996    ) -> Result<Option<Vec<u8>>> {
    +2997        let client = Endpoint::builder()
    +2998            .relay_mode(RelayMode::Disabled)
    +2999            .bind()
    +3000            .await?;
    +3001        let server = Endpoint::builder()
    +3002            .relay_mode(RelayMode::Disabled)
    +3003            .alpns(accept_alpns)
    +3004            .bind()
    +3005            .await?;
    +3006        let server_addr = server.node_addr();
    +3007        let server_task = tokio::spawn({
    +3008            let server = server.clone();
    +3009            async move {
    +3010                let incoming = server.accept().await.e()?;
    +3011                let conn = incoming.await.e()?;
    +3012                conn.close(0u32.into(), b"bye!");
    +3013                Ok::<_, n0_snafu::Error>(conn.alpn())
    +3014            }
    +3015        });
    +3016
    +3017        let conn = client
    +3018            .connect_with_opts(
    +3019                server_addr,
    +3020                primary_connect_alpn,
    +3021                ConnectOptions::new().with_additional_alpns(secondary_connect_alpns),
    +3022            )
    +3023            .await?;
    +3024        let conn = conn.await.e()?;
    +3025        let client_alpn = conn.alpn();
    +3026        conn.closed().await;
    +3027        client.close().await;
    +3028        server.close().await;
    +3029
    +3030        let server_alpn = server_task.await.e()??;
    +3031
    +3032        assert_eq!(client_alpn, server_alpn);
    +3033
    +3034        Ok(server_alpn)
    +3035    }
    +3036
    +3037    #[tokio::test]
    +3038    #[traced_test]
    +3039    async fn connect_multiple_alpn_negotiated() -> Result {
    +3040        const ALPN_ONE: &[u8] = b"alpn/1";
    +3041        const ALPN_TWO: &[u8] = b"alpn/2";
    +3042
    +3043        assert_eq!(
    +3044            alpn_connection_test(
    +3045                // Prefer version 2 over version 1 on the accept side
    +3046                vec![ALPN_TWO.to_vec(), ALPN_ONE.to_vec()],
    +3047                ALPN_TWO,
    +3048                vec![ALPN_ONE.to_vec()],
    +3049            )
    +3050            .await?,
    +3051            Some(ALPN_TWO.to_vec()),
    +3052            "accept side prefers version 2 over 1"
    +3053        );
    +3054
    +3055        assert_eq!(
    +3056            alpn_connection_test(
    +3057                // Only support the old version
    +3058                vec![ALPN_ONE.to_vec()],
    +3059                ALPN_TWO,
    +3060                vec![ALPN_ONE.to_vec()],
    +3061            )
    +3062            .await?,
    +3063            Some(ALPN_ONE.to_vec()),
    +3064            "accept side only supports the old version"
    +3065        );
    +3066
    +3067        assert_eq!(
    +3068            alpn_connection_test(
    +3069                vec![ALPN_TWO.to_vec(), ALPN_ONE.to_vec()],
    +3070                ALPN_ONE,
    +3071                vec![ALPN_TWO.to_vec()],
    +3072            )
    +3073            .await?,
    +3074            Some(ALPN_TWO.to_vec()),
    +3075            "connect side ALPN order doesn't matter"
    +3076        );
    +3077
    +3078        assert_eq!(
    +3079            alpn_connection_test(vec![ALPN_TWO.to_vec(), ALPN_ONE.to_vec()], ALPN_ONE, vec![],)
    +3080                .await?,
    +3081            Some(ALPN_ONE.to_vec()),
    +3082            "connect side only supports the old version"
    +3083        );
    +3084
    +3085        Ok(())
    +3086    }
    +3087
    +3088    #[tokio::test]
    +3089    #[traced_test]
    +3090    async fn watch_net_report() -> Result {
    +3091        let endpoint = Endpoint::builder()
    +3092            .relay_mode(RelayMode::Staging)
    +3093            .bind()
    +3094            .await?;
    +3095
    +3096        // can get a first report
    +3097        endpoint.net_report().updated().await?;
    +3098
    +3099        Ok(())
    +3100    }
    +3101
    +3102    /// Tests that initial connection establishment isn't extremely slow compared
    +3103    /// to subsequent connections.
    +3104    ///
    +3105    /// This is a time based test, but uses a very large ratio to reduce flakiness.
    +3106    /// It also does a number of connections to average out any anomalies.
    +3107    #[tokio::test]
    +3108    #[traced_test]
    +3109    async fn connect_multi_time() -> Result {
    +3110        let n = 32;
    +3111
    +3112        const NOOP_ALPN: &[u8] = b"noop";
    +3113
    +3114        #[derive(Debug, Clone)]
    +3115        struct Noop;
    +3116
    +3117        impl ProtocolHandler for Noop {
    +3118            async fn accept(&self, connection: Connection) -> Result<(), AcceptError> {
    +3119                connection.closed().await;
    +3120                Ok(())
    +3121            }
    +3122        }
    +3123
    +3124        async fn noop_server() -> Result<(Router, NodeAddr)> {
    +3125            let endpoint = Endpoint::builder()
    +3126                .relay_mode(RelayMode::Disabled)
    +3127                .bind()
    +3128                .await
    +3129                .e()?;
    +3130            let addr = endpoint.node_addr();
    +3131            let router = Router::builder(endpoint).accept(NOOP_ALPN, Noop).spawn();
    +3132            Ok((router, addr))
    +3133        }
     3134
    -3135        let conn = client
    -3136            .connect_with_opts(
    -3137                server_addr,
    -3138                primary_connect_alpn,
    -3139                ConnectOptions::new().with_additional_alpns(secondary_connect_alpns),
    -3140            )
    -3141            .await?;
    -3142        let conn = conn.await.e()?;
    -3143        let client_alpn = conn.alpn();
    -3144        conn.closed().await;
    -3145        client.close().await;
    -3146        server.close().await;
    -3147
    -3148        let server_alpn = server_task.await.e()??;
    -3149
    -3150        assert_eq!(client_alpn, server_alpn);
    -3151
    -3152        Ok(server_alpn)
    -3153    }
    -3154
    -3155    #[tokio::test]
    -3156    #[traced_test]
    -3157    async fn connect_multiple_alpn_negotiated() -> Result {
    -3158        const ALPN_ONE: &[u8] = b"alpn/1";
    -3159        const ALPN_TWO: &[u8] = b"alpn/2";
    -3160
    -3161        assert_eq!(
    -3162            alpn_connection_test(
    -3163                // Prefer version 2 over version 1 on the accept side
    -3164                vec![ALPN_TWO.to_vec(), ALPN_ONE.to_vec()],
    -3165                ALPN_TWO,
    -3166                vec![ALPN_ONE.to_vec()],
    -3167            )
    -3168            .await?,
    -3169            Some(ALPN_TWO.to_vec()),
    -3170            "accept side prefers version 2 over 1"
    -3171        );
    +3135        let routers = stream::iter(0..n)
    +3136            .map(|_| noop_server())
    +3137            .buffered_unordered(32)
    +3138            .collect::<Vec<_>>()
    +3139            .await
    +3140            .into_iter()
    +3141            .collect::<Result<Vec<_>, _>>()
    +3142            .e()?;
    +3143
    +3144        let addrs = routers
    +3145            .iter()
    +3146            .map(|(_, addr)| addr.clone())
    +3147            .collect::<Vec<_>>();
    +3148        let ids = addrs.iter().map(|addr| addr.node_id).collect::<Vec<_>>();
    +3149        let discovery = StaticProvider::from_node_info(addrs);
    +3150        let endpoint = Endpoint::builder()
    +3151            .relay_mode(RelayMode::Disabled)
    +3152            .discovery(discovery)
    +3153            .bind()
    +3154            .await
    +3155            .e()?;
    +3156        // wait for the endpoint to be initialized. This should not be needed,
    +3157        // but we don't want to measure endpoint init time but connection time
    +3158        // from a fully initialized endpoint.
    +3159        endpoint.node_addr();
    +3160        let t0 = Instant::now();
    +3161        for id in &ids {
    +3162            let conn = endpoint.connect(*id, NOOP_ALPN).await?;
    +3163            conn.close(0u32.into(), b"done");
    +3164        }
    +3165        let dt0 = t0.elapsed().as_secs_f64();
    +3166        let t1 = Instant::now();
    +3167        for id in &ids {
    +3168            let conn = endpoint.connect(*id, NOOP_ALPN).await?;
    +3169            conn.close(0u32.into(), b"done");
    +3170        }
    +3171        let dt1 = t1.elapsed().as_secs_f64();
     3172
    -3173        assert_eq!(
    -3174            alpn_connection_test(
    -3175                // Only support the old version
    -3176                vec![ALPN_ONE.to_vec()],
    -3177                ALPN_TWO,
    -3178                vec![ALPN_ONE.to_vec()],
    -3179            )
    -3180            .await?,
    -3181            Some(ALPN_ONE.to_vec()),
    -3182            "accept side only supports the old version"
    -3183        );
    -3184
    -3185        assert_eq!(
    -3186            alpn_connection_test(
    -3187                vec![ALPN_TWO.to_vec(), ALPN_ONE.to_vec()],
    -3188                ALPN_ONE,
    -3189                vec![ALPN_TWO.to_vec()],
    -3190            )
    -3191            .await?,
    -3192            Some(ALPN_TWO.to_vec()),
    -3193            "connect side ALPN order doesn't matter"
    -3194        );
    -3195
    -3196        assert_eq!(
    -3197            alpn_connection_test(vec![ALPN_TWO.to_vec(), ALPN_ONE.to_vec()], ALPN_ONE, vec![],)
    -3198                .await?,
    -3199            Some(ALPN_ONE.to_vec()),
    -3200            "connect side only supports the old version"
    -3201        );
    -3202
    -3203        Ok(())
    -3204    }
    -3205
    -3206    #[tokio::test]
    -3207    #[traced_test]
    -3208    async fn watch_net_report() -> Result {
    -3209        let endpoint = Endpoint::builder()
    -3210            .relay_mode(RelayMode::Staging)
    -3211            .bind()
    -3212            .await?;
    -3213
    -3214        // can get a first report
    -3215        endpoint.net_report().updated().await?;
    -3216
    -3217        Ok(())
    -3218    }
    -3219}
    \ No newline at end of file +3173 assert!(dt0 / dt1 < 20.0, "First round: {dt0}s, second round {dt1}s"); +3174 Ok(()) +3175 } +3176}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/endpoint/rtt_actor.rs.html b/pr/3367/docs/src/iroh/endpoint/rtt_actor.rs.html index fef63a1424..f5ca822dd1 100644 --- a/pr/3367/docs/src/iroh/endpoint/rtt_actor.rs.html +++ b/pr/3367/docs/src/iroh/endpoint/rtt_actor.rs.html @@ -1,14 +1,14 @@ -rtt_actor.rs - source

    iroh/endpoint/
    rtt_actor.rs

    1//! Actor which coordinates the congestion controller for the magic socket
    +rtt_actor.rs - source

    iroh/endpoint/
    rtt_actor.rs

    1//! Actor which coordinates the congestion controller for the magic socket
     2
     3use std::{pin::Pin, sync::Arc, task::Poll};
     4
     5use iroh_base::NodeId;
     6use n0_future::{
    -7    task::{self, AbortOnDropHandle},
    -8    MergeUnbounded, Stream, StreamExt,
    +7    MergeUnbounded, Stream, StreamExt,
    +8    task::{self, AbortOnDropHandle},
     9};
     10use tokio::sync::mpsc;
    -11use tracing::{debug, info_span, Instrument};
    +11use tracing::{Instrument, debug, info_span};
     12
     13use crate::{magicsock::ConnectionType, metrics::MagicsockMetrics};
     14
    diff --git a/pr/3367/docs/src/iroh/key.rs.html b/pr/3367/docs/src/iroh/key.rs.html
    index 394403dde3..1703ac8960 100644
    --- a/pr/3367/docs/src/iroh/key.rs.html
    +++ b/pr/3367/docs/src/iroh/key.rs.html
    @@ -1,148 +1,160 @@
    -key.rs - source

    iroh/
    key.rs

    1//! The private and public keys of a node.
    +key.rs - source

    iroh/
    key.rs

    1//! The private and public keys of a node.
     2
     3use std::fmt::Debug;
     4
    -5use aead::Buffer;
    +5use aead::{AeadCore, AeadInOut, Buffer};
     6use nested_enum_utils::common_fields;
    -7use snafu::{ensure, ResultExt, Snafu};
    +7use snafu::{ResultExt, Snafu, ensure};
     8
     9pub(crate) const NONCE_LEN: usize = 24;
     10
    -11pub(super) fn public_ed_box(key: &ed25519_dalek::VerifyingKey) -> crypto_box::PublicKey {
    -12    crypto_box::PublicKey::from(key.to_montgomery())
    -13}
    -14
    -15pub(super) fn secret_ed_box(key: &ed25519_dalek::SigningKey) -> crypto_box::SecretKey {
    -16    crypto_box::SecretKey::from(key.to_scalar())
    -17}
    -18
    -19/// Shared Secret.
    -20pub struct SharedSecret(crypto_box::ChaChaBox);
    -21
    -22/// Errors that can occur during [`SharedSecret::open`].
    -23#[common_fields({
    -24    backtrace: Option<snafu::Backtrace>,
    -25    #[snafu(implicit)]
    -26    span_trace: n0_snafu::SpanTrace,
    -27})]
    -28#[derive(Debug, Snafu)]
    -29#[non_exhaustive]
    -30pub enum DecryptionError {
    -31    /// The nonce had the wrong size.
    -32    #[snafu(display("Invalid nonce"))]
    -33    InvalidNonce {},
    -34    /// AEAD decryption failed.
    -35    #[snafu(display("Aead error"))]
    -36    Aead { source: aead::Error },
    -37}
    -38
    -39impl Debug for SharedSecret {
    -40    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    -41        write!(f, "SharedSecret(crypto_box::ChaChaBox)")
    -42    }
    -43}
    -44
    -45impl SharedSecret {
    -46    pub fn new(this: &crypto_box::SecretKey, other: &crypto_box::PublicKey) -> Self {
    -47        SharedSecret(crypto_box::ChaChaBox::new(other, this))
    -48    }
    -49
    -50    /// Seals the provided cleartext.
    -51    pub fn seal(&self, buffer: &mut dyn Buffer) {
    -52        use aead::{AeadCore, AeadInPlace, OsRng};
    -53
    -54        let nonce = crypto_box::ChaChaBox::generate_nonce(&mut OsRng);
    -55        self.0
    -56            .encrypt_in_place(&nonce, &[], buffer)
    -57            .expect("encryption failed");
    -58
    -59        buffer.extend_from_slice(&nonce).expect("buffer too small");
    -60    }
    -61
    -62    /// Opens the ciphertext, which must have been created using `Self::seal`, and places the clear text into the provided buffer.
    -63    pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), DecryptionError> {
    -64        use aead::AeadInPlace;
    -65        ensure!(buffer.len() >= NONCE_LEN, InvalidNonceSnafu);
    -66
    -67        let offset = buffer.len() - NONCE_LEN;
    -68        let nonce: [u8; NONCE_LEN] = buffer.as_ref()[offset..]
    -69            .try_into()
    -70            .map_err(|_| InvalidNonceSnafu.build())?;
    -71
    -72        buffer.truncate(offset);
    -73        self.0
    -74            .decrypt_in_place(&nonce.into(), &[], buffer)
    -75            .context(AeadSnafu)?;
    -76
    -77        Ok(())
    -78    }
    -79}
    -80
    -81#[cfg(test)]
    -82mod tests {
    -83    use super::*;
    -84
    -85    fn shared(this: &iroh_base::SecretKey, other: &iroh_base::PublicKey) -> SharedSecret {
    -86        let secret_key = secret_ed_box(this.secret());
    -87        let public_key = public_ed_box(&other.public());
    -88
    -89        SharedSecret::new(&secret_key, &public_key)
    -90    }
    +11const AEAD_DATA: &[u8] = &[];
    +12
    +13pub(super) fn public_ed_box(key: &ed25519_dalek::VerifyingKey) -> crypto_box::PublicKey {
    +14    crypto_box::PublicKey::from(key.to_montgomery())
    +15}
    +16
    +17pub(super) fn secret_ed_box(key: &ed25519_dalek::SigningKey) -> crypto_box::SecretKey {
    +18    crypto_box::SecretKey::from(key.to_scalar())
    +19}
    +20
    +21/// Shared Secret.
    +22pub struct SharedSecret(crypto_box::ChaChaBox);
    +23
    +24/// Errors that can occur during [`SharedSecret::open`].
    +25#[common_fields({
    +26    backtrace: Option<snafu::Backtrace>,
    +27    #[snafu(implicit)]
    +28    span_trace: n0_snafu::SpanTrace,
    +29})]
    +30#[derive(Debug, Snafu)]
    +31#[non_exhaustive]
    +32pub enum DecryptionError {
    +33    /// The nonce had the wrong size.
    +34    #[snafu(display("Invalid nonce"))]
    +35    InvalidNonce {},
    +36    /// AEAD decryption failed.
    +37    #[snafu(display("Aead error"))]
    +38    Aead { source: aead::Error },
    +39}
    +40
    +41impl Debug for SharedSecret {
    +42    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +43        write!(f, "SharedSecret(crypto_box::ChaChaBox)")
    +44    }
    +45}
    +46
    +47impl SharedSecret {
    +48    pub fn new(this: &crypto_box::SecretKey, other: &crypto_box::PublicKey) -> Self {
    +49        SharedSecret(crypto_box::ChaChaBox::new_from_clamped(other, this))
    +50    }
    +51
    +52    /// Seals the provided cleartext.
    +53    pub fn seal(&self, buffer: &mut dyn Buffer) {
    +54        let nonce = crypto_box::ChaChaBox::try_generate_nonce_with_rng(&mut rand::rng())
    +55            .expect("not enough randomness");
    +56
    +57        self.0
    +58            .encrypt_in_place(&nonce, AEAD_DATA, buffer)
    +59            .expect("encryption failed");
    +60
    +61        buffer.extend_from_slice(&nonce).expect("buffer too small");
    +62    }
    +63
    +64    /// Opens the ciphertext, which must have been created using `Self::seal`, and places the clear text into the provided buffer.
    +65    pub fn open(&self, buffer: &mut dyn Buffer) -> Result<(), DecryptionError> {
    +66        ensure!(buffer.len() >= NONCE_LEN, InvalidNonceSnafu);
    +67
    +68        let offset = buffer.len() - NONCE_LEN;
    +69        let nonce: [u8; NONCE_LEN] = buffer.as_ref()[offset..]
    +70            .try_into()
    +71            .map_err(|_| InvalidNonceSnafu.build())?;
    +72
    +73        buffer.truncate(offset);
    +74        self.0
    +75            .decrypt_in_place(&nonce.into(), AEAD_DATA, buffer)
    +76            .context(AeadSnafu)?;
    +77
    +78        Ok(())
    +79    }
    +80}
    +81
    +82#[cfg(test)]
    +83mod tests {
    +84    use rand::SeedableRng;
    +85
    +86    use super::*;
    +87
    +88    fn shared(this: &iroh_base::SecretKey, other: &iroh_base::PublicKey) -> SharedSecret {
    +89        let secret_key = secret_ed_box(this.secret());
    +90        let public_key = public_ed_box(&other.public());
     91
    -92    #[test]
    -93    fn test_seal_open_roundtrip() {
    -94        let mut rng = rand::thread_rng();
    -95        let key_a = iroh_base::SecretKey::generate(&mut rng);
    -96        let key_b = iroh_base::SecretKey::generate(&mut rng);
    -97
    -98        seal_open_roundtrip(&key_a, &key_b);
    -99        seal_open_roundtrip(&key_b, &key_a);
    -100        seal_open_roundtrip(&key_a, &key_a);
    -101    }
    -102
    -103    fn seal_open_roundtrip(key_a: &iroh_base::SecretKey, key_b: &iroh_base::SecretKey) {
    -104        let msg = b"super secret message!!!!".to_vec();
    -105        let shared_a = shared(key_a, &key_b.public());
    -106        let mut sealed_message = msg.clone();
    -107        shared_a.seal(&mut sealed_message);
    -108        let shared_b = shared(key_b, &key_a.public());
    -109        let mut decrypted_message = sealed_message.clone();
    -110        shared_b.open(&mut decrypted_message).unwrap();
    -111        assert_eq!(&msg[..], &decrypted_message);
    -112    }
    -113
    -114    #[test]
    -115    fn test_roundtrip_public_key() {
    -116        let key = crypto_box::SecretKey::generate(&mut rand::thread_rng());
    -117        let public_bytes = *key.public_key().as_bytes();
    -118        let public_key_back = crypto_box::PublicKey::from(public_bytes);
    -119        assert_eq!(key.public_key(), public_key_back);
    -120    }
    -121
    -122    #[test]
    -123    fn test_same_public_key_api() {
    -124        let key = iroh_base::SecretKey::generate(rand::thread_rng());
    -125        let public_key1: crypto_box::PublicKey = public_ed_box(&key.public().public());
    -126        let public_key2: crypto_box::PublicKey = secret_ed_box(key.secret()).public_key();
    -127
    -128        assert_eq!(public_key1, public_key2);
    -129    }
    -130
    -131    #[test]
    -132    fn test_same_public_key_low_level() {
    -133        let mut rng = rand::thread_rng();
    -134        let key = ed25519_dalek::SigningKey::generate(&mut rng);
    -135        let public_key1 = {
    -136            let m = key.verifying_key().to_montgomery();
    -137            crypto_box::PublicKey::from(m)
    -138        };
    +92        SharedSecret::new(&secret_key, &public_key)
    +93    }
    +94
    +95    #[test]
    +96    fn test_seal_open_roundtrip() {
    +97        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +98        let key_a = iroh_base::SecretKey::generate(&mut rng);
    +99        let key_b = iroh_base::SecretKey::generate(&mut rng);
    +100
    +101        println!("a -> a");
    +102        seal_open_roundtrip(&key_a, &key_a);
    +103        println!("b -> b");
    +104        seal_open_roundtrip(&key_b, &key_b);
    +105
    +106        println!("a -> b");
    +107        seal_open_roundtrip(&key_a, &key_b);
    +108        println!("b -> a");
    +109        seal_open_roundtrip(&key_b, &key_a);
    +110    }
    +111
    +112    fn seal_open_roundtrip(key_a: &iroh_base::SecretKey, key_b: &iroh_base::SecretKey) {
    +113        let msg = b"super secret message!!!!".to_vec();
    +114        let shared_a = shared(key_a, &key_b.public());
    +115        let mut sealed_message = msg.clone();
    +116        shared_a.seal(&mut sealed_message);
    +117
    +118        let shared_b = shared(key_b, &key_a.public());
    +119        let mut decrypted_message = sealed_message.clone();
    +120        shared_b.open(&mut decrypted_message).unwrap();
    +121        assert_eq!(&msg[..], &decrypted_message);
    +122    }
    +123
    +124    #[test]
    +125    fn test_roundtrip_public_key() {
    +126        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +127        let key = crypto_box::SecretKey::generate(&mut rng);
    +128        let public_bytes = *key.public_key().as_bytes();
    +129        let public_key_back = crypto_box::PublicKey::from(public_bytes);
    +130        assert_eq!(key.public_key(), public_key_back);
    +131    }
    +132
    +133    #[test]
    +134    fn test_same_public_key_api() {
    +135        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +136        let key = iroh_base::SecretKey::generate(&mut rng);
    +137        let public_key1: crypto_box::PublicKey = public_ed_box(&key.public().public());
    +138        let public_key2: crypto_box::PublicKey = secret_ed_box(key.secret()).public_key();
     139
    -140        let public_key2 = {
    -141            let s = key.to_scalar();
    -142            let cs = crypto_box::SecretKey::from(s);
    -143            cs.public_key()
    -144        };
    -145
    -146        assert_eq!(public_key1, public_key2);
    -147    }
    -148}
    \ No newline at end of file +140 assert_eq!(public_key1, public_key2); +141 } +142 +143 #[test] +144 fn test_same_public_key_low_level() { +145 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +146 let key = ed25519_dalek::SigningKey::generate(&mut rng); +147 let public_key1 = { +148 let m = key.verifying_key().to_montgomery(); +149 crypto_box::PublicKey::from(m) +150 }; +151 +152 let public_key2 = { +153 let s = key.to_scalar(); +154 let cs = crypto_box::SecretKey::from(s); +155 cs.public_key() +156 }; +157 +158 assert_eq!(public_key1, public_key2); +159 } +160}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/lib.rs.html b/pr/3367/docs/src/iroh/lib.rs.html index 7725017b77..d1e5144dc6 100644 --- a/pr/3367/docs/src/iroh/lib.rs.html +++ b/pr/3367/docs/src/iroh/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source

    iroh/
    lib.rs

    1//! Peer-to-peer QUIC connections.
    +lib.rs - source

    iroh/
    lib.rs

    1//! Peer-to-peer QUIC connections.
     2//!
     3//! iroh is a library to establish direct connectivity between peers.  It exposes an
     4//! interface to [QUIC] connections and streams to the user, while implementing direct
    @@ -154,8 +154,8 @@
     154//! ## Node Discovery
     155//!
     156//! The need to know the [`RelayUrl`] *or* some direct addresses in addition to the
    -157//! [`NodeId`] to connect to an iroh node can be an obstacle.  To address this the
    -158//! [`endpoint::Builder`] allows to configure a [`discovery`] service.
    +157//! [`NodeId`] to connect to an iroh node can be an obstacle.  To address this, the
    +158//! [`endpoint::Builder`] allows you to configure a [`discovery`] service.
     159//!
     160//! The [`DnsDiscovery`] service is a discovery service which will publish the [`RelayUrl`]
     161//! and direct addresses to a service publishing those as DNS records.  To connect it looks
    @@ -250,7 +250,7 @@
     250#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
     251#![cfg_attr(wasm_browser, allow(unused))]
     252#![cfg_attr(not(test), deny(clippy::unwrap_used))]
    -253#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))]
    +253#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
     254
     255mod disco;
     256mod key;
    @@ -274,7 +274,7 @@
     274pub use iroh_base::{
     275    KeyParsingError, NodeAddr, NodeId, PublicKey, RelayUrl, RelayUrlParseError, SecretKey,
     276};
    -277pub use iroh_relay::{http::Protocol as RelayProtocol, node_info, RelayMap, RelayNode};
    +277pub use iroh_relay::{RelayMap, RelayNode, node_info};
     278pub use n0_watcher::Watcher;
     279
     280#[cfg(any(test, feature = "test-utils"))]
    diff --git a/pr/3367/docs/src/iroh/magicsock.rs.html b/pr/3367/docs/src/iroh/magicsock.rs.html
    index efa945ae31..867d71bce3 100644
    --- a/pr/3367/docs/src/iroh/magicsock.rs.html
    +++ b/pr/3367/docs/src/iroh/magicsock.rs.html
    @@ -1,4 +1,4 @@
    -magicsock.rs - source

    iroh/
    magicsock.rs

    1//! Implements a socket that can change its communication path while in use, actively searching for the best way to communicate.
    +magicsock.rs - source

    iroh/
    magicsock.rs

    1//! Implements a socket that can change its communication path while in use, actively searching for the best way to communicate.
     2//!
     3//! Based on tailscale/wgengine/magicsock
     4//!
    @@ -22,8 +22,8 @@
     22    net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6},
     23    pin::Pin,
     24    sync::{
    -25        atomic::{AtomicBool, AtomicU64, Ordering},
    -26        Arc, RwLock,
    +25        Arc, Mutex, RwLock,
    +26        atomic::{AtomicBool, AtomicU64, Ordering},
     27    },
     28    task::{Context, Poll},
     29};
    @@ -33,3291 +33,3397 @@
     33use iroh_base::{NodeAddr, NodeId, PublicKey, RelayUrl, SecretKey};
     34use iroh_relay::RelayMap;
     35use n0_future::{
    -36    boxed::BoxStream,
    -37    task::{self, AbortOnDropHandle},
    -38    time::{self, Duration, Instant},
    -39    StreamExt,
    -40};
    -41use n0_watcher::{self, Watchable, Watcher};
    -42use nested_enum_utils::common_fields;
    -43use netwatch::netmon;
    -44#[cfg(not(wasm_browser))]
    -45use netwatch::{ip::LocalAddresses, UdpSocket};
    -46use quinn::{AsyncUdpSocket, ServerConfig};
    -47use rand::Rng;
    -48use smallvec::SmallVec;
    -49use snafu::{ResultExt, Snafu};
    -50use tokio::sync::{mpsc, Mutex};
    -51use tokio_util::sync::CancellationToken;
    -52use tracing::{
    -53    debug, error, event, info, info_span, instrument, trace, trace_span, warn, Instrument, Level,
    -54};
    -55use transports::LocalAddrsWatch;
    -56use url::Url;
    -57
    -58#[cfg(not(wasm_browser))]
    -59use self::transports::IpTransport;
    -60use self::{
    -61    metrics::Metrics as MagicsockMetrics,
    -62    node_map::{NodeMap, PingAction, PingRole, SendPing},
    -63    transports::{RelayActorConfig, RelayTransport, Transports, UdpSender},
    -64};
    -65#[cfg(not(wasm_browser))]
    -66use crate::dns::DnsResolver;
    -67#[cfg(any(test, feature = "test-utils"))]
    -68use crate::endpoint::PathSelection;
    -69#[cfg(not(wasm_browser))]
    -70use crate::net_report::{IpMappedAddr, QuicConfig};
    -71use crate::{
    -72    defaults::timeouts::NET_REPORT_TIMEOUT,
    -73    disco::{self, SendAddr},
    -74    discovery::{Discovery, DiscoveryItem, DiscoverySubscribers, NodeData, UserData},
    -75    key::{public_ed_box, secret_ed_box, DecryptionError, SharedSecret},
    -76    metrics::EndpointMetrics,
    -77    net_report::{self, IfStateDetails, IpMappedAddresses, Report},
    -78};
    -79
    -80mod metrics;
    -81mod node_map;
    -82
    -83pub(crate) mod transports;
    +36    task::{self, AbortOnDropHandle},
    +37    time::{self, Duration, Instant},
    +38};
    +39use n0_watcher::{self, Watchable, Watcher};
    +40use nested_enum_utils::common_fields;
    +41use netwatch::netmon;
    +42#[cfg(not(wasm_browser))]
    +43use netwatch::{UdpSocket, ip::LocalAddresses};
    +44use quinn::{AsyncUdpSocket, ServerConfig};
    +45use rand::Rng;
    +46use smallvec::SmallVec;
    +47use snafu::{ResultExt, Snafu};
    +48use tokio::sync::{Mutex as AsyncMutex, mpsc};
    +49use tokio_util::sync::CancellationToken;
    +50use tracing::{
    +51    Instrument, Level, debug, error, event, info, info_span, instrument, trace, trace_span, warn,
    +52};
    +53use transports::LocalAddrsWatch;
    +54use url::Url;
    +55
    +56#[cfg(not(wasm_browser))]
    +57use self::transports::IpTransport;
    +58use self::{
    +59    metrics::Metrics as MagicsockMetrics,
    +60    node_map::{NodeMap, PingAction, PingRole, SendPing},
    +61    transports::{RelayActorConfig, RelayTransport, Transports, UdpSender},
    +62};
    +63#[cfg(not(wasm_browser))]
    +64use crate::dns::DnsResolver;
    +65#[cfg(any(test, feature = "test-utils"))]
    +66use crate::endpoint::PathSelection;
    +67#[cfg(not(wasm_browser))]
    +68use crate::net_report::{IpMappedAddr, QuicConfig};
    +69use crate::{
    +70    defaults::timeouts::NET_REPORT_TIMEOUT,
    +71    disco::{self, SendAddr},
    +72    discovery::{
    +73        ConcurrentDiscovery, Discovery, DiscoveryContext, DynIntoDiscovery, IntoDiscoveryError,
    +74        NodeData, UserData,
    +75    },
    +76    key::{DecryptionError, SharedSecret, public_ed_box, secret_ed_box},
    +77    magicsock::node_map::RemoteInfo,
    +78    metrics::EndpointMetrics,
    +79    net_report::{self, IfStateDetails, IpMappedAddresses, Report},
    +80};
    +81
    +82mod metrics;
    +83mod node_map;
     84
    -85pub use node_map::Source;
    +85pub(crate) mod transports;
     86
    -87pub use self::{
    -88    metrics::Metrics,
    -89    node_map::{ConnectionType, ControlMsg, DirectAddrInfo, RemoteInfo},
    -90};
    -91
    -92/// How long we consider a QAD-derived endpoint valid for. UDP NAT mappings typically
    -93/// expire at 30 seconds, so this is a few seconds shy of that.
    -94const ENDPOINTS_FRESH_ENOUGH_DURATION: Duration = Duration::from_secs(27);
    -95
    -96const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
    +87pub use node_map::Source;
    +88
    +89pub use self::{
    +90    metrics::Metrics,
    +91    node_map::{ConnectionType, ControlMsg, DirectAddrInfo},
    +92};
    +93
    +94/// How long we consider a QAD-derived endpoint valid for. UDP NAT mappings typically
    +95/// expire at 30 seconds, so this is a few seconds shy of that.
    +96const ENDPOINTS_FRESH_ENOUGH_DURATION: Duration = Duration::from_secs(27);
     97
    -98/// Contains options for `MagicSock::listen`.
    -99#[derive(derive_more::Debug)]
    -100pub(crate) struct Options {
    -101    /// The IPv4 address to listen on.
    -102    ///
    -103    /// If set to `None` it will choose a random port and listen on `0.0.0.0:0`.
    -104    pub(crate) addr_v4: Option<SocketAddrV4>,
    -105    /// The IPv6 address to listen on.
    -106    ///
    -107    /// If set to `None` it will choose a random port and listen on `[::]:0`.
    -108    pub(crate) addr_v6: Option<SocketAddrV6>,
    -109
    -110    /// Secret key for this node.
    -111    pub(crate) secret_key: SecretKey,
    -112
    -113    /// The [`RelayMap`] to use, leave empty to not use a relay server.
    -114    pub(crate) relay_map: RelayMap,
    -115
    -116    /// Whether to use websockets or the nonstandard legacy protocol to connect to relays
    -117    pub(crate) relay_protocol: iroh_relay::http::Protocol,
    -118
    -119    /// An optional [`NodeMap`], to restore information about nodes.
    -120    pub(crate) node_map: Option<Vec<NodeAddr>>,
    -121
    -122    /// Optional node discovery mechanism.
    -123    pub(crate) discovery: Option<Box<dyn Discovery>>,
    -124
    -125    /// Optional user-defined discovery data.
    -126    pub(crate) discovery_user_data: Option<UserData>,
    -127
    -128    /// A DNS resolver to use for resolving relay URLs.
    -129    ///
    -130    /// You can use [`crate::dns::DnsResolver::new`] for a resolver
    -131    /// that uses the system's DNS configuration.
    -132    #[cfg(not(wasm_browser))]
    -133    pub(crate) dns_resolver: DnsResolver,
    -134
    -135    /// Proxy configuration.
    -136    pub(crate) proxy_url: Option<Url>,
    -137
    -138    /// ServerConfig for the internal QUIC endpoint
    -139    pub(crate) server_config: ServerConfig,
    -140
    -141    /// Skip verification of SSL certificates from relay servers
    -142    ///
    -143    /// May only be used in tests.
    +98const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5);
    +99
    +100/// Contains options for `MagicSock::listen`.
    +101#[derive(derive_more::Debug)]
    +102pub(crate) struct Options {
    +103    /// The IPv4 address to listen on.
    +104    ///
    +105    /// If set to `None` it will choose a random port and listen on `0.0.0.0:0`.
    +106    pub(crate) addr_v4: Option<SocketAddrV4>,
    +107    /// The IPv6 address to listen on.
    +108    ///
    +109    /// If set to `None` it will choose a random port and listen on `[::]:0`.
    +110    pub(crate) addr_v6: Option<SocketAddrV6>,
    +111
    +112    /// Secret key for this node.
    +113    pub(crate) secret_key: SecretKey,
    +114
    +115    /// The [`RelayMap`] to use, leave empty to not use a relay server.
    +116    pub(crate) relay_map: RelayMap,
    +117
    +118    /// Optional node discovery mechanisms.
    +119    pub(crate) discovery: Vec<Box<dyn DynIntoDiscovery>>,
    +120
    +121    /// Optional user-defined discovery data.
    +122    pub(crate) discovery_user_data: Option<UserData>,
    +123
    +124    /// A DNS resolver to use for resolving relay URLs.
    +125    ///
    +126    /// You can use [`crate::dns::DnsResolver::new`] for a resolver
    +127    /// that uses the system's DNS configuration.
    +128    #[cfg(not(wasm_browser))]
    +129    pub(crate) dns_resolver: DnsResolver,
    +130
    +131    /// Proxy configuration.
    +132    pub(crate) proxy_url: Option<Url>,
    +133
    +134    /// ServerConfig for the internal QUIC endpoint
    +135    pub(crate) server_config: ServerConfig,
    +136
    +137    /// Skip verification of SSL certificates from relay servers
    +138    ///
    +139    /// May only be used in tests.
    +140    #[cfg(any(test, feature = "test-utils"))]
    +141    pub(crate) insecure_skip_relay_cert_verify: bool,
    +142
    +143    /// Configuration for what path selection to use
     144    #[cfg(any(test, feature = "test-utils"))]
    -145    pub(crate) insecure_skip_relay_cert_verify: bool,
    +145    pub(crate) path_selection: PathSelection,
     146
    -147    /// Configuration for what path selection to use
    -148    #[cfg(any(test, feature = "test-utils"))]
    -149    pub(crate) path_selection: PathSelection,
    -150
    -151    pub(crate) metrics: EndpointMetrics,
    -152}
    -153
    -154/// Contents of a relay message. Use a SmallVec to avoid allocations for the very
    -155/// common case of a single packet.
    -156type RelayContents = SmallVec<[Bytes; 1]>;
    -157
    -158/// Handle for [`MagicSock`].
    -159///
    -160/// Dereferences to [`MagicSock`], and handles closing.
    -161#[derive(Clone, Debug, derive_more::Deref)]
    -162pub(crate) struct Handle {
    -163    #[deref(forward)]
    -164    msock: Arc<MagicSock>,
    -165    // empty when shutdown
    -166    actor_task: Arc<Mutex<Option<AbortOnDropHandle<()>>>>,
    -167    /// Token to cancel the actor task.
    -168    actor_token: CancellationToken,
    -169    // quinn endpoint
    -170    endpoint: quinn::Endpoint,
    -171}
    -172
    -173/// Iroh connectivity layer.
    -174///
    -175/// This is responsible for routing packets to nodes based on node IDs, it will initially
    -176/// route packets via a relay and transparently try and establish a node-to-node
    -177/// connection and upgrade to it.  It will also keep looking for better connections as the
    -178/// network details of both nodes change.
    -179///
    -180/// It is usually only necessary to use a single [`MagicSock`] instance in an application, it
    -181/// means any QUIC endpoints on top will be sharing as much information about nodes as
    -182/// possible.
    -183#[derive(Debug)]
    -184pub(crate) struct MagicSock {
    -185    /// Channel to send to the internal actor.
    -186    actor_sender: mpsc::Sender<ActorMessage>,
    -187    /// NodeId of this node.
    -188    public_key: PublicKey,
    -189
    -190    // - State Management
    -191    /// Close is in progress (or done)
    -192    closing: AtomicBool,
    -193    /// Close was called.
    -194    closed: AtomicBool,
    -195
    -196    // - Networking Info
    -197    /// Our discovered direct addresses.
    -198    direct_addrs: DiscoveredDirectAddrs,
    -199    /// Our latest net-report
    -200    net_report: Watchable<(Option<Report>, UpdateReason)>,
    -201    /// If the last net_report report, reports IPv6 to be available.
    -202    ipv6_reported: Arc<AtomicBool>,
    -203    /// Tracks the networkmap node entity for each node discovery key.
    -204    node_map: NodeMap,
    -205    /// Tracks the mapped IP addresses
    -206    ip_mapped_addrs: IpMappedAddresses,
    -207    /// Local addresses
    -208    local_addrs_watch: LocalAddrsWatch,
    -209    /// Currently bound IP addresses of all sockets
    -210    #[cfg(not(wasm_browser))]
    -211    ip_bind_addrs: Vec<SocketAddr>,
    -212    /// The DNS resolver to be used in this magicsock.
    -213    #[cfg(not(wasm_browser))]
    -214    dns_resolver: DnsResolver,
    -215
    -216    /// Disco
    -217    disco: DiscoState,
    -218
    -219    // - Discovery
    -220    /// Optional discovery service
    -221    discovery: Option<Box<dyn Discovery>>,
    -222    /// Optional user-defined discover data.
    -223    discovery_user_data: RwLock<Option<UserData>>,
    -224    /// Broadcast channel for listening to discovery updates.
    -225    discovery_subscribers: DiscoverySubscribers,
    -226
    -227    /// Metrics
    -228    pub(crate) metrics: EndpointMetrics,
    -229}
    -230
    -231#[allow(missing_docs)]
    -232#[common_fields({
    -233    backtrace: Option<snafu::Backtrace>,
    -234    #[snafu(implicit)]
    -235    span_trace: n0_snafu::SpanTrace,
    -236})]
    -237#[derive(Debug, Snafu)]
    -238#[snafu(visibility(pub(crate)))]
    -239#[non_exhaustive]
    -240pub enum AddNodeAddrError {
    -241    #[snafu(display("Empty addressing info"))]
    -242    Empty {},
    -243    #[snafu(display("Empty addressing info, {pruned} direct address have been pruned"))]
    -244    EmptyPruned { pruned: usize },
    -245    #[snafu(display("Adding our own address is not supported"))]
    -246    OwnAddress {},
    -247}
    -248
    -249impl MagicSock {
    -250    /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`].
    -251    pub(crate) async fn spawn(opts: Options) -> Result<Handle, CreateHandleError> {
    -252        Handle::new(opts).await
    -253    }
    -254
    -255    /// Returns the relay node we are connected to, that has the best latency.
    -256    ///
    -257    /// If `None`, then we are not connected to any relay nodes.
    -258    pub(crate) fn my_relay(&self) -> Option<RelayUrl> {
    -259        self.local_addr().into_iter().find_map(|a| {
    -260            if let transports::Addr::Relay(url, _) = a {
    -261                Some(url)
    -262            } else {
    -263                None
    -264            }
    -265        })
    -266    }
    -267
    -268    fn is_closing(&self) -> bool {
    -269        self.closing.load(Ordering::Relaxed)
    -270    }
    -271
    -272    pub(crate) fn is_closed(&self) -> bool {
    -273        self.closed.load(Ordering::SeqCst)
    +147    pub(crate) metrics: EndpointMetrics,
    +148}
    +149
    +150/// Handle for [`MagicSock`].
    +151///
    +152/// Dereferences to [`MagicSock`], and handles closing.
    +153#[derive(Clone, Debug, derive_more::Deref)]
    +154pub(crate) struct Handle {
    +155    #[deref(forward)]
    +156    msock: Arc<MagicSock>,
    +157    // empty when shutdown
    +158    actor_task: Arc<Mutex<Option<AbortOnDropHandle<()>>>>,
    +159    /// Token to cancel the actor task.
    +160    actor_token: CancellationToken,
    +161    // quinn endpoint
    +162    endpoint: quinn::Endpoint,
    +163}
    +164
    +165/// Iroh connectivity layer.
    +166///
    +167/// This is responsible for routing packets to nodes based on node IDs, it will initially
    +168/// route packets via a relay and transparently try and establish a node-to-node
    +169/// connection and upgrade to it.  It will also keep looking for better connections as the
    +170/// network details of both nodes change.
    +171///
    +172/// It is usually only necessary to use a single [`MagicSock`] instance in an application, it
    +173/// means any QUIC endpoints on top will be sharing as much information about nodes as
    +174/// possible.
    +175#[derive(Debug)]
    +176pub(crate) struct MagicSock {
    +177    /// Channel to send to the internal actor.
    +178    actor_sender: mpsc::Sender<ActorMessage>,
    +179    /// NodeId of this node.
    +180    public_key: PublicKey,
    +181
    +182    // - State Management
    +183    /// Close is in progress (or done)
    +184    closing: AtomicBool,
    +185    /// Close was called.
    +186    closed: AtomicBool,
    +187
    +188    // - Networking Info
    +189    /// Our discovered direct addresses.
    +190    direct_addrs: DiscoveredDirectAddrs,
    +191    /// Our latest net-report
    +192    net_report: Watchable<(Option<Report>, UpdateReason)>,
    +193    /// If the last net_report report, reports IPv6 to be available.
    +194    ipv6_reported: Arc<AtomicBool>,
    +195    /// Tracks the networkmap node entity for each node discovery key.
    +196    node_map: NodeMap,
    +197    /// Tracks the mapped IP addresses
    +198    ip_mapped_addrs: IpMappedAddresses,
    +199    /// Local addresses
    +200    local_addrs_watch: LocalAddrsWatch,
    +201    /// Currently bound IP addresses of all sockets
    +202    #[cfg(not(wasm_browser))]
    +203    ip_bind_addrs: Vec<SocketAddr>,
    +204    /// The DNS resolver to be used in this magicsock.
    +205    #[cfg(not(wasm_browser))]
    +206    dns_resolver: DnsResolver,
    +207
    +208    /// Disco
    +209    disco: DiscoState,
    +210
    +211    // - Discovery
    +212    /// Optional discovery service
    +213    discovery: ConcurrentDiscovery,
    +214    /// Optional user-defined discover data.
    +215    discovery_user_data: RwLock<Option<UserData>>,
    +216
    +217    /// Metrics
    +218    pub(crate) metrics: EndpointMetrics,
    +219}
    +220
    +221#[allow(missing_docs)]
    +222#[common_fields({
    +223    backtrace: Option<snafu::Backtrace>,
    +224    #[snafu(implicit)]
    +225    span_trace: n0_snafu::SpanTrace,
    +226})]
    +227#[derive(Debug, Snafu)]
    +228#[snafu(visibility(pub(crate)))]
    +229#[non_exhaustive]
    +230pub enum AddNodeAddrError {
    +231    #[snafu(display("Empty addressing info"))]
    +232    Empty {},
    +233    #[snafu(display("Empty addressing info, {pruned} direct address have been pruned"))]
    +234    EmptyPruned { pruned: usize },
    +235    #[snafu(display("Adding our own address is not supported"))]
    +236    OwnAddress {},
    +237}
    +238
    +239impl MagicSock {
    +240    /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`].
    +241    pub(crate) async fn spawn(opts: Options) -> Result<Handle, CreateHandleError> {
    +242        Handle::new(opts).await
    +243    }
    +244
    +245    /// Returns the relay node we are connected to, that has the best latency.
    +246    ///
    +247    /// If `None`, then we are not connected to any relay nodes.
    +248    pub(crate) fn my_relay(&self) -> Option<RelayUrl> {
    +249        self.local_addr().into_iter().find_map(|a| {
    +250            if let transports::Addr::Relay(url, _) = a {
    +251                Some(url)
    +252            } else {
    +253                None
    +254            }
    +255        })
    +256    }
    +257
    +258    fn is_closing(&self) -> bool {
    +259        self.closing.load(Ordering::Relaxed)
    +260    }
    +261
    +262    pub(crate) fn is_closed(&self) -> bool {
    +263        self.closed.load(Ordering::SeqCst)
    +264    }
    +265
    +266    /// Get the cached version of addresses.
    +267    pub(crate) fn local_addr(&self) -> Vec<transports::Addr> {
    +268        self.local_addrs_watch.clone().get()
    +269    }
    +270
    +271    #[cfg(not(wasm_browser))]
    +272    fn ip_bind_addrs(&self) -> &[SocketAddr] {
    +273        &self.ip_bind_addrs
     274    }
     275
    -276    /// Get the cached version of addresses.
    -277    pub(crate) fn local_addr(&self) -> Vec<transports::Addr> {
    -278        self.local_addrs_watch.get().expect("disconnected")
    -279    }
    -280
    -281    #[cfg(not(wasm_browser))]
    -282    fn ip_bind_addrs(&self) -> &[SocketAddr] {
    -283        &self.ip_bind_addrs
    -284    }
    -285
    -286    fn ip_local_addrs(&self) -> impl Iterator<Item = SocketAddr> {
    -287        self.local_addr()
    -288            .into_iter()
    -289            .filter_map(|addr| addr.into_socket_addr())
    -290    }
    -291
    -292    /// Returns `true` if we have at least one candidate address where we can send packets to.
    -293    pub(crate) fn has_send_address(&self, node_key: PublicKey) -> bool {
    -294        self.remote_info(node_key)
    -295            .map(|info| info.has_send_address())
    -296            .unwrap_or(false)
    -297    }
    -298
    -299    /// Return the [`RemoteInfo`]s of all nodes in the node map.
    -300    pub(crate) fn list_remote_infos(&self) -> Vec<RemoteInfo> {
    -301        self.node_map.list_remote_infos(Instant::now())
    -302    }
    -303
    -304    /// Return the [`RemoteInfo`] for a single node in the node map.
    -305    pub(crate) fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    -306        self.node_map.remote_info(node_id)
    -307    }
    -308
    -309    /// Returns a [`Watcher`] for this socket's direct addresses.
    +276    fn ip_local_addrs(&self) -> impl Iterator<Item = SocketAddr> + use<> {
    +277        self.local_addr()
    +278            .into_iter()
    +279            .filter_map(|addr| addr.into_socket_addr())
    +280    }
    +281
    +282    /// Returns `true` if we have at least one candidate address where we can send packets to.
    +283    pub(crate) fn has_send_address(&self, node_key: PublicKey) -> bool {
    +284        self.remote_info(node_key)
    +285            .map(|info| info.has_send_address())
    +286            .unwrap_or(false)
    +287    }
    +288
    +289    /// Return the [`RemoteInfo`]s of all nodes in the node map.
    +290    #[cfg(test)]
    +291    pub(crate) fn list_remote_infos(&self) -> Vec<RemoteInfo> {
    +292        self.node_map.list_remote_infos(Instant::now())
    +293    }
    +294
    +295    /// Return the [`RemoteInfo`] for a single node in the node map.
    +296    pub(crate) fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    +297        self.node_map.remote_info(node_id)
    +298    }
    +299
    +300    /// Returns a [`Watcher`] for this socket's direct addresses.
    +301    ///
    +302    /// The [`MagicSock`] continuously monitors the direct addresses, the network addresses
    +303    /// it might be able to be contacted on, for changes.  Whenever changes are detected
    +304    /// this [`Watcher`] will yield a new list of addresses.
    +305    ///
    +306    /// Upon the first creation on the [`MagicSock`] it may not yet have completed a first
    +307    /// direct addresses discovery, in this case the current item in this [`Watcher`] will be
    +308    /// [`None`].  Once the first set of direct addresses are discovered the [`Watcher`] will
    +309    /// store [`Some`] set of addresses.
     310    ///
    -311    /// The [`MagicSock`] continuously monitors the direct addresses, the network addresses
    -312    /// it might be able to be contacted on, for changes.  Whenever changes are detected
    -313    /// this [`Watcher`] will yield a new list of addresses.
    -314    ///
    -315    /// Upon the first creation on the [`MagicSock`] it may not yet have completed a first
    -316    /// direct addresses discovery, in this case the current item in this [`Watcher`] will be
    -317    /// [`None`].  Once the first set of direct addresses are discovered the [`Watcher`] will
    -318    /// store [`Some`] set of addresses.
    -319    ///
    -320    /// To get the current direct addresses, use [`Watcher::initialized`].
    -321    ///
    -322    /// [`Watcher`]: n0_watcher::Watcher
    -323    /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized
    -324    pub(crate) fn direct_addresses(&self) -> n0_watcher::Direct<Option<BTreeSet<DirectAddr>>> {
    -325        self.direct_addrs.addrs.watch()
    -326    }
    -327
    -328    /// Returns a [`Watcher`] for this socket's net-report.
    -329    ///
    -330    /// The [`MagicSock`] continuously monitors the network conditions for changes.
    -331    /// Whenever changes are detected this [`Watcher`] will yield a new report.
    -332    ///
    -333    /// Upon the first creation on the [`MagicSock`] it may not yet have completed
    -334    /// a first net-report. In this case, the current item in this [`Watcher`] will
    -335    /// be [`None`].  Once the first report has been run, the [`Watcher`] will
    -336    /// store [`Some`] report.
    -337    ///
    -338    /// To get the current `net-report`, use [`Watcher::initialized`].
    -339    ///
    -340    /// [`Watcher`]: n0_watcher::Watcher
    -341    /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized
    -342    pub(crate) fn net_report(&self) -> impl Watcher<Value = Option<Report>> {
    -343        self.net_report
    -344            .watch()
    -345            .map(|(r, _)| r)
    -346            .expect("disconnected")
    -347    }
    -348
    -349    /// Watch for changes to the home relay.
    -350    ///
    -351    /// Note that this can be used to wait for the initial home relay to be known using
    -352    /// [`Watcher::initialized`].
    -353    pub(crate) fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> {
    -354        let res = self.local_addrs_watch.clone().map(|addrs| {
    -355            addrs
    -356                .into_iter()
    -357                .filter_map(|addr| {
    -358                    if let transports::Addr::Relay(url, _) = addr {
    -359                        Some(url)
    -360                    } else {
    -361                        None
    -362                    }
    -363                })
    -364                .collect()
    -365        });
    -366        res.expect("disconnected")
    -367    }
    -368
    -369    /// Returns a [`n0_watcher::Direct`] that reports the [`ConnectionType`] we have to the
    -370    /// given `node_id`.
    -371    ///
    -372    /// This gets us a copy of the [`n0_watcher::Direct`] for the [`Watchable`] with a [`ConnectionType`]
    -373    /// that the `NodeMap` stores for each `node_id`'s endpoint.
    -374    ///
    -375    /// # Errors
    -376    ///
    -377    /// Will return `None` if there is no address information known about the
    -378    /// given `node_id`.
    -379    pub(crate) fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    -380        self.node_map.conn_type(node_id)
    +311    /// To get the current direct addresses, use [`Watcher::initialized`].
    +312    ///
    +313    /// [`Watcher`]: n0_watcher::Watcher
    +314    /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized
    +315    pub(crate) fn direct_addresses(&self) -> n0_watcher::Direct<BTreeSet<DirectAddr>> {
    +316        self.direct_addrs.addrs.watch()
    +317    }
    +318
    +319    /// Returns a [`Watcher`] for this socket's net-report.
    +320    ///
    +321    /// The [`MagicSock`] continuously monitors the network conditions for changes.
    +322    /// Whenever changes are detected this [`Watcher`] will yield a new report.
    +323    ///
    +324    /// Upon the first creation on the [`MagicSock`] it may not yet have completed
    +325    /// a first net-report. In this case, the current item in this [`Watcher`] will
    +326    /// be [`None`].  Once the first report has been run, the [`Watcher`] will
    +327    /// store [`Some`] report.
    +328    ///
    +329    /// To get the current `net-report`, use [`Watcher::initialized`].
    +330    ///
    +331    /// [`Watcher`]: n0_watcher::Watcher
    +332    /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized
    +333    pub(crate) fn net_report(&self) -> impl Watcher<Value = Option<Report>> + use<> {
    +334        self.net_report
    +335            .watch()
    +336            .map(|(r, _)| r)
    +337            .expect("disconnected")
    +338    }
    +339
    +340    /// Watch for changes to the home relay.
    +341    ///
    +342    /// Note that this can be used to wait for the initial home relay to be known using
    +343    /// [`Watcher::initialized`].
    +344    pub(crate) fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> + use<> {
    +345        let res = self.local_addrs_watch.clone().map(|addrs| {
    +346            addrs
    +347                .into_iter()
    +348                .filter_map(|addr| {
    +349                    if let transports::Addr::Relay(url, _) = addr {
    +350                        Some(url)
    +351                    } else {
    +352                        None
    +353                    }
    +354                })
    +355                .collect()
    +356        });
    +357        res.expect("disconnected")
    +358    }
    +359
    +360    /// Returns a [`n0_watcher::Direct`] that reports the [`ConnectionType`] we have to the
    +361    /// given `node_id`.
    +362    ///
    +363    /// This gets us a copy of the [`n0_watcher::Direct`] for the [`Watchable`] with a [`ConnectionType`]
    +364    /// that the `NodeMap` stores for each `node_id`'s endpoint.
    +365    ///
    +366    /// # Errors
    +367    ///
    +368    /// Will return `None` if there is no address information known about the
    +369    /// given `node_id`.
    +370    pub(crate) fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    +371        self.node_map.conn_type(node_id)
    +372    }
    +373
    +374    pub(crate) fn latency(&self, node_id: NodeId) -> Option<Duration> {
    +375        self.node_map.latency(node_id)
    +376    }
    +377
    +378    /// Returns the socket address which can be used by the QUIC layer to dial this node.
    +379    pub(crate) fn get_mapping_addr(&self, node_id: NodeId) -> Option<NodeIdMappedAddr> {
    +380        self.node_map.get_quic_mapped_addr_for_node_key(node_id)
     381    }
     382
    -383    /// Returns the socket address which can be used by the QUIC layer to dial this node.
    -384    pub(crate) fn get_mapping_addr(&self, node_id: NodeId) -> Option<NodeIdMappedAddr> {
    -385        self.node_map.get_quic_mapped_addr_for_node_key(node_id)
    -386    }
    -387
    -388    /// Add addresses for a node to the magic socket's addresbook.
    -389    #[instrument(skip_all)]
    -390    pub fn add_node_addr(
    -391        &self,
    -392        mut addr: NodeAddr,
    -393        source: node_map::Source,
    -394    ) -> Result<(), AddNodeAddrError> {
    -395        let mut pruned: usize = 0;
    -396        for my_addr in self.direct_addrs.sockaddrs() {
    -397            if addr.direct_addresses.remove(&my_addr) {
    -398                warn!( node_id=addr.node_id.fmt_short(), %my_addr, %source, "not adding our addr for node");
    -399                pruned += 1;
    -400            }
    -401        }
    -402        if !addr.is_empty() {
    -403            self.node_map
    -404                .add_node_addr(addr, source, &self.metrics.magicsock);
    -405            Ok(())
    -406        } else if pruned != 0 {
    -407            Err(EmptyPrunedSnafu { pruned }.build())
    -408        } else {
    -409            Err(EmptySnafu.build())
    -410        }
    -411    }
    -412
    -413    /// Stores a new set of direct addresses.
    -414    ///
    -415    /// If the direct addresses have changed from the previous set, they are published to
    -416    /// discovery.
    -417    pub(super) fn store_direct_addresses(&self, addrs: BTreeSet<DirectAddr>) {
    -418        let updated = self.direct_addrs.update(addrs);
    -419        if updated {
    -420            self.node_map
    -421                .on_direct_addr_discovered(self.direct_addrs.sockaddrs());
    -422            self.publish_my_addr();
    -423        }
    -424    }
    -425
    -426    /// Get a reference to the DNS resolver used in this [`MagicSock`].
    -427    #[cfg(not(wasm_browser))]
    -428    pub(crate) fn dns_resolver(&self) -> &DnsResolver {
    -429        &self.dns_resolver
    -430    }
    -431
    -432    /// Reference to optional discovery service
    -433    pub(crate) fn discovery(&self) -> Option<&dyn Discovery> {
    -434        self.discovery.as_ref().map(Box::as_ref)
    -435    }
    -436
    -437    /// Updates the user-defined discovery data for this node.
    -438    pub(crate) fn set_user_data_for_discovery(&self, user_data: Option<UserData>) {
    -439        let mut guard = self.discovery_user_data.write().expect("lock poisened");
    -440        if *guard != user_data {
    -441            *guard = user_data;
    -442            drop(guard);
    -443            self.publish_my_addr();
    -444        }
    -445    }
    -446
    -447    /// Call to notify the system of potential network changes.
    -448    pub(crate) async fn network_change(&self) {
    -449        self.actor_sender
    -450            .send(ActorMessage::NetworkChange)
    -451            .await
    -452            .ok();
    -453    }
    -454
    -455    /// Returns a reference to the subscribers channel for discovery events.
    -456    pub(crate) fn discovery_subscribers(&self) -> &DiscoverySubscribers {
    -457        &self.discovery_subscribers
    -458    }
    -459
    -460    #[cfg(test)]
    -461    async fn force_network_change(&self, is_major: bool) {
    -462        self.actor_sender
    -463            .send(ActorMessage::ForceNetworkChange(is_major))
    -464            .await
    -465            .ok();
    -466    }
    -467
    -468    #[cfg_attr(windows, allow(dead_code))]
    -469    fn normalized_local_addr(&self) -> io::Result<SocketAddr> {
    -470        let addrs = self.local_addrs_watch.get().expect("disconnected");
    -471
    -472        let mut ipv4_addr = None;
    -473        for addr in addrs {
    -474            let Some(addr) = addr.into_socket_addr() else {
    -475                continue;
    -476            };
    -477            if addr.is_ipv6() {
    -478                return Ok(addr);
    -479            }
    -480            if addr.is_ipv4() && ipv4_addr.is_none() {
    -481                ipv4_addr.replace(addr);
    -482            }
    -483        }
    -484        match ipv4_addr {
    -485            Some(addr) => Ok(addr),
    -486            None => Err(io::Error::other("no valid socket available")),
    -487        }
    -488    }
    -489
    -490    /// Searches the `node_map` to determine the current transports to be used.
    -491    #[instrument(skip_all)]
    -492    fn prepare_send(
    -493        &self,
    -494        transmit: &quinn_udp::Transmit,
    -495    ) -> io::Result<SmallVec<[transports::Addr; 3]>> {
    -496        self.metrics
    -497            .magicsock
    -498            .send_data
    -499            .inc_by(transmit.contents.len() as _);
    -500
    -501        if self.is_closed() {
    -502            self.metrics
    -503                .magicsock
    -504                .send_data_network_down
    -505                .inc_by(transmit.contents.len() as _);
    -506            return Err(io::Error::new(
    -507                io::ErrorKind::NotConnected,
    -508                "connection closed",
    -509            ));
    -510        }
    -511
    -512        let mut active_paths = SmallVec::<[_; 3]>::new();
    -513
    -514        match MappedAddr::from(transmit.destination) {
    -515            MappedAddr::None(dest) => {
    -516                error!(%dest, "Cannot convert to a mapped address.");
    -517            }
    -518            MappedAddr::NodeId(dest) => {
    -519                trace!(
    -520                    dst = %dest,
    -521                    src = ?transmit.src_ip,
    -522                    len = %transmit.contents.len(),
    -523                    "sending",
    -524                );
    -525
    -526                // Get the node's relay address and best direct address, as well
    -527                // as any pings that need to be sent for hole-punching purposes.
    -528                match self.node_map.get_send_addrs(
    -529                    dest,
    -530                    self.ipv6_reported.load(Ordering::Relaxed),
    -531                    &self.metrics.magicsock,
    -532                ) {
    -533                    Some((node_id, udp_addr, relay_url, ping_actions)) => {
    -534                        if !ping_actions.is_empty() {
    -535                            self.actor_sender
    -536                                .try_send(ActorMessage::PingActions(ping_actions))
    -537                                .ok();
    -538                        }
    -539                        if let Some(addr) = udp_addr {
    -540                            active_paths.push(transports::Addr::from(addr));
    -541                        }
    -542                        if let Some(url) = relay_url {
    -543                            active_paths.push(transports::Addr::Relay(url, node_id));
    -544                        }
    -545                    }
    -546                    None => {
    -547                        error!(%dest, "no NodeState for mapped address");
    -548                    }
    -549                }
    -550            }
    -551            #[cfg(not(wasm_browser))]
    -552            MappedAddr::Ip(dest) => {
    -553                trace!(
    -554                    dst = %dest,
    -555                    src = ?transmit.src_ip,
    -556                    len = %transmit.contents.len(),
    -557                    "sending",
    -558                );
    -559
    -560                // Check if this is a known IpMappedAddr, and if so, send over UDP
    -561                // Get the socket addr
    -562                match self.ip_mapped_addrs.get_ip_addr(&dest) {
    -563                    Some(addr) => {
    -564                        active_paths.push(transports::Addr::from(addr));
    -565                    }
    -566                    None => {
    -567                        error!(%dest, "unknown mapped address");
    -568                    }
    -569                }
    -570            }
    -571        }
    -572
    -573        Ok(active_paths)
    -574    }
    -575
    -576    /// Process datagrams received from UDP sockets.
    -577    ///
    -578    /// All the `bufs` and `metas` should have initialized packets in them.
    -579    ///
    -580    /// This fixes up the datagrams to use the correct [`NodeIdMappedAddr`] and extracts DISCO
    -581    /// packets, processing them inside the magic socket.
    -582    fn process_datagrams(
    -583        &self,
    -584        bufs: &mut [io::IoSliceMut<'_>],
    -585        metas: &mut [quinn_udp::RecvMeta],
    -586        source_addrs: &[transports::Addr],
    -587    ) {
    -588        debug_assert_eq!(bufs.len(), metas.len(), "non matching bufs & metas");
    -589        debug_assert_eq!(
    -590            bufs.len(),
    -591            source_addrs.len(),
    -592            "non matching bufs & source_addrs"
    -593        );
    -594
    -595        // Adding the IP address we received something on results in Quinn using this
    -596        // address on the send path to send from.  However we let Quinn use a
    -597        // NodeIdMappedAddress, not a real address.  So we used to substitute our bind address
    -598        // here so that Quinn would send on the right address.  But that would sometimes
    -599        // result in the wrong address family and Windows trips up on that.
    -600        //
    -601        // What should be done is that this dst_ip from the RecvMeta is stored in the
    -602        // NodeState/PathState.  Then on the send path it should be retrieved from the
    -603        // NodeState/PathSate together with the send address and substituted at send time.
    -604        // This is relevant for IPv6 link-local addresses where the OS otherwise does not
    -605        // know which interface to send from.
    -606        #[cfg(not(windows))]
    -607        let dst_ip = self.normalized_local_addr().ok().map(|addr| addr.ip());
    -608        // Reasoning for this here:
    -609        // https://github.com/n0-computer/iroh/pull/2595#issuecomment-2290947319
    -610        #[cfg(windows)]
    -611        let dst_ip = None;
    -612
    -613        let mut quic_packets_total = 0;
    -614
    -615        for ((quinn_meta, buf), source_addr) in metas
    -616            .iter_mut()
    -617            .zip(bufs.iter_mut())
    -618            .zip(source_addrs.iter())
    -619        {
    -620            let mut buf_contains_quic_datagrams = false;
    -621            let mut quic_datagram_count = 0;
    -622            if quinn_meta.len > quinn_meta.stride {
    -623                trace!(%quinn_meta.len, %quinn_meta.stride, "GRO datagram received");
    -624                self.metrics.magicsock.recv_gro_datagrams.inc();
    -625            }
    -626
    -627            // Chunk through the datagrams in this GRO payload to find disco
    -628            // packets and forward them to the actor
    -629            for datagram in buf[..quinn_meta.len].chunks_mut(quinn_meta.stride) {
    -630                if datagram.len() < quinn_meta.stride {
    -631                    trace!(
    -632                        len = %datagram.len(),
    -633                        %quinn_meta.stride,
    -634                        "Last GRO datagram smaller than stride",
    -635                    );
    -636                }
    -637
    -638                // Detect DISCO datagrams and process them.  Overwrite the first
    -639                // byte of those packets with zero to make Quinn ignore the packet.  This
    -640                // relies on quinn::EndpointConfig::grease_quic_bit being set to `false`,
    -641                // which we do in Endpoint::bind.
    -642                if let Some((sender, sealed_box)) = disco::source_and_box(datagram) {
    -643                    trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: disco packet");
    -644                    self.handle_disco_message(sender, sealed_box, source_addr);
    -645                    datagram[0] = 0u8;
    -646                } else {
    -647                    trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: quic packet");
    -648                    match source_addr {
    -649                        transports::Addr::Ip(SocketAddr::V4(..)) => {
    -650                            self.metrics
    -651                                .magicsock
    -652                                .recv_data_ipv4
    -653                                .inc_by(datagram.len() as _);
    -654                        }
    -655                        transports::Addr::Ip(SocketAddr::V6(..)) => {
    -656                            self.metrics
    -657                                .magicsock
    -658                                .recv_data_ipv6
    -659                                .inc_by(datagram.len() as _);
    -660                        }
    -661                        transports::Addr::Relay(..) => {
    -662                            self.metrics
    -663                                .magicsock
    -664                                .recv_data_relay
    -665                                .inc_by(datagram.len() as _);
    -666                        }
    -667                    }
    -668
    -669                    quic_datagram_count += 1;
    -670                    buf_contains_quic_datagrams = true;
    -671                }
    -672            }
    +383    /// Add addresses for a node to the magic socket's addresbook.
    +384    #[instrument(skip_all)]
    +385    pub(crate) fn add_node_addr(
    +386        &self,
    +387        mut addr: NodeAddr,
    +388        source: node_map::Source,
    +389    ) -> Result<(), AddNodeAddrError> {
    +390        let mut pruned: usize = 0;
    +391        for my_addr in self.direct_addrs.sockaddrs() {
    +392            if addr.direct_addresses.remove(&my_addr) {
    +393                warn!( node_id=%addr.node_id.fmt_short(), %my_addr, %source, "not adding our addr for node");
    +394                pruned += 1;
    +395            }
    +396        }
    +397        if !addr.is_empty() {
    +398            let have_ipv6 = self.ipv6_reported.load(Ordering::Relaxed);
    +399            self.node_map
    +400                .add_node_addr(addr, source, have_ipv6, &self.metrics.magicsock);
    +401            Ok(())
    +402        } else if pruned != 0 {
    +403            Err(EmptyPrunedSnafu { pruned }.build())
    +404        } else {
    +405            Err(EmptySnafu.build())
    +406        }
    +407    }
    +408
    +409    /// Stores a new set of direct addresses.
    +410    ///
    +411    /// If the direct addresses have changed from the previous set, they are published to
    +412    /// discovery.
    +413    pub(super) fn store_direct_addresses(&self, addrs: BTreeSet<DirectAddr>) {
    +414        let updated = self.direct_addrs.update(addrs);
    +415        if updated {
    +416            self.node_map
    +417                .on_direct_addr_discovered(self.direct_addrs.sockaddrs());
    +418            self.publish_my_addr();
    +419        }
    +420    }
    +421
    +422    /// Get a reference to the DNS resolver used in this [`MagicSock`].
    +423    #[cfg(not(wasm_browser))]
    +424    pub(crate) fn dns_resolver(&self) -> &DnsResolver {
    +425        &self.dns_resolver
    +426    }
    +427
    +428    /// Reference to the internal discovery service
    +429    pub(crate) fn discovery(&self) -> &ConcurrentDiscovery {
    +430        &self.discovery
    +431    }
    +432
    +433    /// Updates the user-defined discovery data for this node.
    +434    pub(crate) fn set_user_data_for_discovery(&self, user_data: Option<UserData>) {
    +435        let mut guard = self.discovery_user_data.write().expect("lock poisened");
    +436        if *guard != user_data {
    +437            *guard = user_data;
    +438            drop(guard);
    +439            self.publish_my_addr();
    +440        }
    +441    }
    +442
    +443    /// Call to notify the system of potential network changes.
    +444    pub(crate) async fn network_change(&self) {
    +445        self.actor_sender
    +446            .send(ActorMessage::NetworkChange)
    +447            .await
    +448            .ok();
    +449    }
    +450
    +451    #[cfg(test)]
    +452    async fn force_network_change(&self, is_major: bool) {
    +453        self.actor_sender
    +454            .send(ActorMessage::ForceNetworkChange(is_major))
    +455            .await
    +456            .ok();
    +457    }
    +458
    +459    #[cfg_attr(windows, allow(dead_code))]
    +460    fn normalized_local_addr(&self) -> io::Result<SocketAddr> {
    +461        let addrs = self.local_addrs_watch.clone().get();
    +462
    +463        let mut ipv4_addr = None;
    +464        for addr in addrs {
    +465            let Some(addr) = addr.into_socket_addr() else {
    +466                continue;
    +467            };
    +468            if addr.is_ipv6() {
    +469                return Ok(addr);
    +470            }
    +471            if addr.is_ipv4() && ipv4_addr.is_none() {
    +472                ipv4_addr.replace(addr);
    +473            }
    +474        }
    +475        match ipv4_addr {
    +476            Some(addr) => Ok(addr),
    +477            None => Err(io::Error::other("no valid socket available")),
    +478        }
    +479    }
    +480
    +481    /// Searches the `node_map` to determine the current transports to be used.
    +482    #[instrument(skip_all)]
    +483    fn prepare_send(
    +484        &self,
    +485        udp_sender: &UdpSender,
    +486        transmit: &quinn_udp::Transmit,
    +487    ) -> io::Result<SmallVec<[transports::Addr; 3]>> {
    +488        self.metrics
    +489            .magicsock
    +490            .send_data
    +491            .inc_by(transmit.contents.len() as _);
    +492
    +493        if self.is_closed() {
    +494            self.metrics
    +495                .magicsock
    +496                .send_data_network_down
    +497                .inc_by(transmit.contents.len() as _);
    +498            return Err(io::Error::new(
    +499                io::ErrorKind::NotConnected,
    +500                "connection closed",
    +501            ));
    +502        }
    +503
    +504        let mut active_paths = SmallVec::<[_; 3]>::new();
    +505
    +506        match MappedAddr::from(transmit.destination) {
    +507            MappedAddr::None(dest) => {
    +508                error!(%dest, "Cannot convert to a mapped address.");
    +509            }
    +510            MappedAddr::NodeId(dest) => {
    +511                trace!(
    +512                    dst = %dest,
    +513                    src = ?transmit.src_ip,
    +514                    len = %transmit.contents.len(),
    +515                    "sending",
    +516                );
    +517
    +518                // Get the node's relay address and best direct address, as well
    +519                // as any pings that need to be sent for hole-punching purposes.
    +520                match self.node_map.get_send_addrs(
    +521                    dest,
    +522                    self.ipv6_reported.load(Ordering::Relaxed),
    +523                    &self.metrics.magicsock,
    +524                ) {
    +525                    Some((node_id, udp_addr, relay_url, ping_actions)) => {
    +526                        if !ping_actions.is_empty() {
    +527                            self.try_send_ping_actions(udp_sender, ping_actions).ok();
    +528                        }
    +529                        if let Some(addr) = udp_addr {
    +530                            active_paths.push(transports::Addr::from(addr));
    +531                        }
    +532                        if let Some(url) = relay_url {
    +533                            active_paths.push(transports::Addr::Relay(url, node_id));
    +534                        }
    +535                    }
    +536                    None => {
    +537                        error!(%dest, "no NodeState for mapped address");
    +538                    }
    +539                }
    +540            }
    +541            #[cfg(not(wasm_browser))]
    +542            MappedAddr::Ip(dest) => {
    +543                trace!(
    +544                    dst = %dest,
    +545                    src = ?transmit.src_ip,
    +546                    len = %transmit.contents.len(),
    +547                    "sending",
    +548                );
    +549
    +550                // Check if this is a known IpMappedAddr, and if so, send over UDP
    +551                // Get the socket addr
    +552                match self.ip_mapped_addrs.get_ip_addr(&dest) {
    +553                    Some(addr) => {
    +554                        active_paths.push(transports::Addr::from(addr));
    +555                    }
    +556                    None => {
    +557                        error!(%dest, "unknown mapped address");
    +558                    }
    +559                }
    +560            }
    +561        }
    +562
    +563        Ok(active_paths)
    +564    }
    +565
    +566    /// Process datagrams received from UDP sockets.
    +567    ///
    +568    /// All the `bufs` and `metas` should have initialized packets in them.
    +569    ///
    +570    /// This fixes up the datagrams to use the correct [`NodeIdMappedAddr`] and extracts DISCO
    +571    /// packets, processing them inside the magic socket.
    +572    fn process_datagrams(
    +573        &self,
    +574        bufs: &mut [io::IoSliceMut<'_>],
    +575        metas: &mut [quinn_udp::RecvMeta],
    +576        source_addrs: &[transports::Addr],
    +577    ) {
    +578        debug_assert_eq!(bufs.len(), metas.len(), "non matching bufs & metas");
    +579        debug_assert_eq!(
    +580            bufs.len(),
    +581            source_addrs.len(),
    +582            "non matching bufs & source_addrs"
    +583        );
    +584
    +585        // Adding the IP address we received something on results in Quinn using this
    +586        // address on the send path to send from.  However we let Quinn use a
    +587        // NodeIdMappedAddress, not a real address.  So we used to substitute our bind address
    +588        // here so that Quinn would send on the right address.  But that would sometimes
    +589        // result in the wrong address family and Windows trips up on that.
    +590        //
    +591        // What should be done is that this dst_ip from the RecvMeta is stored in the
    +592        // NodeState/PathState.  Then on the send path it should be retrieved from the
    +593        // NodeState/PathSate together with the send address and substituted at send time.
    +594        // This is relevant for IPv6 link-local addresses where the OS otherwise does not
    +595        // know which interface to send from.
    +596        #[cfg(not(windows))]
    +597        let dst_ip = self.normalized_local_addr().ok().map(|addr| addr.ip());
    +598        // Reasoning for this here:
    +599        // https://github.com/n0-computer/iroh/pull/2595#issuecomment-2290947319
    +600        #[cfg(windows)]
    +601        let dst_ip = None;
    +602
    +603        let mut quic_packets_total = 0;
    +604
    +605        for ((quinn_meta, buf), source_addr) in metas
    +606            .iter_mut()
    +607            .zip(bufs.iter_mut())
    +608            .zip(source_addrs.iter())
    +609        {
    +610            let mut buf_contains_quic_datagrams = false;
    +611            let mut quic_datagram_count = 0;
    +612            if quinn_meta.len > quinn_meta.stride {
    +613                trace!(%quinn_meta.len, %quinn_meta.stride, "GRO datagram received");
    +614                self.metrics.magicsock.recv_gro_datagrams.inc();
    +615            }
    +616
    +617            // Chunk through the datagrams in this GRO payload to find disco
    +618            // packets and forward them to the actor
    +619            for datagram in buf[..quinn_meta.len].chunks_mut(quinn_meta.stride) {
    +620                if datagram.len() < quinn_meta.stride {
    +621                    trace!(
    +622                        len = %datagram.len(),
    +623                        %quinn_meta.stride,
    +624                        "Last GRO datagram smaller than stride",
    +625                    );
    +626                }
    +627
    +628                // Detect DISCO datagrams and process them.  Overwrite the first
    +629                // byte of those packets with zero to make Quinn ignore the packet.  This
    +630                // relies on quinn::EndpointConfig::grease_quic_bit being set to `false`,
    +631                // which we do in Endpoint::bind.
    +632                if let Some((sender, sealed_box)) = disco::source_and_box(datagram) {
    +633                    trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: disco packet");
    +634                    self.handle_disco_message(sender, sealed_box, source_addr);
    +635                    datagram[0] = 0u8;
    +636                } else {
    +637                    trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: quic packet");
    +638                    match source_addr {
    +639                        transports::Addr::Ip(SocketAddr::V4(..)) => {
    +640                            self.metrics
    +641                                .magicsock
    +642                                .recv_data_ipv4
    +643                                .inc_by(datagram.len() as _);
    +644                        }
    +645                        transports::Addr::Ip(SocketAddr::V6(..)) => {
    +646                            self.metrics
    +647                                .magicsock
    +648                                .recv_data_ipv6
    +649                                .inc_by(datagram.len() as _);
    +650                        }
    +651                        transports::Addr::Relay(..) => {
    +652                            self.metrics
    +653                                .magicsock
    +654                                .recv_data_relay
    +655                                .inc_by(datagram.len() as _);
    +656                        }
    +657                    }
    +658
    +659                    quic_datagram_count += 1;
    +660                    buf_contains_quic_datagrams = true;
    +661                }
    +662            }
    +663
    +664            if buf_contains_quic_datagrams {
    +665                match source_addr {
    +666                    #[cfg(wasm_browser)]
    +667                    transports::Addr::Ip(_addr) => {
    +668                        panic!("cannot use IP based addressing in the browser");
    +669                    }
    +670                    #[cfg(not(wasm_browser))]
    +671                    transports::Addr::Ip(addr) => {
    +672                        // UDP
     673
    -674            if buf_contains_quic_datagrams {
    -675                match source_addr {
    -676                    #[cfg(wasm_browser)]
    -677                    transports::Addr::Ip(_addr) => {
    -678                        panic!("cannot use IP based addressing in the browser");
    -679                    }
    -680                    #[cfg(not(wasm_browser))]
    -681                    transports::Addr::Ip(addr) => {
    -682                        // UDP
    -683
    -684                        // Update the NodeMap and remap RecvMeta to the NodeIdMappedAddr.
    -685                        match self.node_map.receive_udp(*addr) {
    -686                            None => {
    -687                                // Check if this address is mapped to an IpMappedAddr
    -688                                if let Some(ip_mapped_addr) =
    -689                                    self.ip_mapped_addrs.get_mapped_addr(addr)
    -690                                {
    -691                                    trace!(
    -692                                        src = %addr,
    -693                                        count = %quic_datagram_count,
    -694                                        len = quinn_meta.len,
    -695                                        "UDP recv QUIC address discovery packets",
    -696                                    );
    -697                                    quic_packets_total += quic_datagram_count;
    -698                                    quinn_meta.addr = ip_mapped_addr.private_socket_addr();
    -699                                } else {
    -700                                    warn!(
    -701                                        src = %addr,
    -702                                        count = %quic_datagram_count,
    -703                                        len = quinn_meta.len,
    -704                                        "UDP recv quic packets: no node state found, skipping",
    -705                                    );
    -706                                    // If we have no node state for the from addr, set len to 0 to make
    -707                                    // quinn skip the buf completely.
    -708                                    quinn_meta.len = 0;
    -709                                }
    -710                            }
    -711                            Some((node_id, quic_mapped_addr)) => {
    -712                                trace!(
    -713                                    src = %addr,
    -714                                    node = %node_id.fmt_short(),
    -715                                    count = %quic_datagram_count,
    -716                                    len = quinn_meta.len,
    -717                                    "UDP recv quic packets",
    -718                                );
    -719                                quic_packets_total += quic_datagram_count;
    -720                                quinn_meta.addr = quic_mapped_addr.private_socket_addr();
    -721                            }
    -722                        }
    -723                    }
    -724                    transports::Addr::Relay(src_url, src_node) => {
    -725                        // Relay
    -726                        let quic_mapped_addr = self.node_map.receive_relay(src_url, *src_node);
    -727                        quinn_meta.addr = quic_mapped_addr.private_socket_addr();
    -728                    }
    -729                }
    -730            } else {
    -731                // If all datagrams in this buf are DISCO, set len to zero to make
    -732                // Quinn skip the buf completely.
    -733                quinn_meta.len = 0;
    -734            }
    -735            // Normalize local_ip
    -736            quinn_meta.dst_ip = dst_ip;
    -737        }
    -738
    -739        if quic_packets_total > 0 {
    -740            self.metrics
    -741                .magicsock
    -742                .recv_datagrams
    -743                .inc_by(quic_packets_total as _);
    -744            trace!("UDP recv: {} packets", quic_packets_total);
    -745        }
    -746    }
    -747
    -748    /// Handles a discovery message.
    -749    #[instrument("disco_in", skip_all, fields(node = %sender.fmt_short(), ?src))]
    -750    fn handle_disco_message(&self, sender: PublicKey, sealed_box: &[u8], src: &transports::Addr) {
    -751        trace!("handle_disco_message start");
    -752        if self.is_closed() {
    -753            return;
    -754        }
    -755
    -756        if let transports::Addr::Relay(_, node_id) = src {
    -757            if node_id != &sender {
    -758                // TODO: return here?
    -759                warn!(
    -760                    "Received relay disco message from connection for {}, but with message from {}",
    -761                    node_id.fmt_short(),
    -762                    sender.fmt_short()
    -763                );
    -764            }
    -765        }
    -766
    -767        // We're now reasonably sure we're expecting communication from
    -768        // this node, do the heavy crypto lifting to see what they want.
    -769        let dm = match self.disco.unseal_and_decode(sender, sealed_box) {
    -770            Ok(dm) => dm,
    -771            Err(DiscoBoxError::Open { source, .. }) => {
    -772                warn!(?source, "failed to open disco box");
    -773                self.metrics.magicsock.recv_disco_bad_key.inc();
    -774                return;
    -775            }
    -776            Err(DiscoBoxError::Parse { source, .. }) => {
    -777                // Couldn't parse it, but it was inside a correctly
    -778                // signed box, so just ignore it, assuming it's from a
    -779                // newer version of Tailscale that we don't
    -780                // understand. Not even worth logging about, lest it
    -781                // be too spammy for old clients.
    -782
    -783                self.metrics.magicsock.recv_disco_bad_parse.inc();
    -784                debug!(?source, "failed to parse disco message");
    -785                return;
    -786            }
    -787        };
    -788
    -789        if src.is_relay() {
    -790            self.metrics.magicsock.recv_disco_relay.inc();
    -791        } else {
    -792            self.metrics.magicsock.recv_disco_udp.inc();
    -793        }
    -794
    -795        let span = trace_span!("handle_disco", ?dm);
    -796        let _guard = span.enter();
    -797        trace!("receive disco message");
    -798        match dm {
    -799            disco::Message::Ping(ping) => {
    -800                self.metrics.magicsock.recv_disco_ping.inc();
    -801                self.handle_ping(ping, sender, src);
    -802            }
    -803            disco::Message::Pong(pong) => {
    -804                self.metrics.magicsock.recv_disco_pong.inc();
    -805                self.node_map.handle_pong(sender, src, pong);
    -806            }
    -807            disco::Message::CallMeMaybe(cm) => {
    -808                self.metrics.magicsock.recv_disco_call_me_maybe.inc();
    -809                match src {
    -810                    transports::Addr::Relay(url, _) => {
    -811                        event!(
    -812                            target: "iroh::_events::call-me-maybe::recv",
    -813                            Level::DEBUG,
    -814                            remote_node = sender.fmt_short(),
    -815                            via = ?url,
    -816                            their_addrs = ?cm.my_numbers,
    -817                        );
    -818                    }
    -819                    _ => {
    -820                        warn!("call-me-maybe packets should only come via relay");
    -821                        return;
    -822                    }
    -823                }
    -824                let ping_actions =
    -825                    self.node_map
    -826                        .handle_call_me_maybe(sender, cm, &self.metrics.magicsock);
    -827                for action in ping_actions {
    -828                    match action {
    -829                        PingAction::SendCallMeMaybe { .. } => {
    -830                            warn!("Unexpected CallMeMaybe as response of handling a CallMeMaybe");
    -831                        }
    -832                        PingAction::SendPing(ping) => {
    -833                            self.send_ping_queued(ping);
    -834                        }
    -835                    }
    -836                }
    -837            }
    -838        }
    -839        trace!("disco message handled");
    -840    }
    -841
    -842    /// Handle a ping message.
    -843    fn handle_ping(&self, dm: disco::Ping, sender: NodeId, src: &transports::Addr) {
    -844        // Insert the ping into the node map, and return whether a ping with this tx_id was already
    -845        // received.
    -846        let addr: SendAddr = src.clone().into();
    -847        let handled = self.node_map.handle_ping(sender, addr.clone(), dm.tx_id);
    -848        match handled.role {
    -849            PingRole::Duplicate => {
    -850                debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path already confirmed, skip");
    -851                return;
    -852            }
    -853            PingRole::LikelyHeartbeat => {}
    -854            PingRole::NewPath => {
    -855                debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: new path");
    -856            }
    -857            PingRole::Activate => {
    -858                debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path active");
    -859            }
    -860        }
    -861
    -862        // Send a pong.
    -863        debug!(tx = %HEXLOWER.encode(&dm.tx_id), %addr, dstkey = %sender.fmt_short(),
    -864               "sending pong");
    -865        let pong = disco::Message::Pong(disco::Pong {
    -866            tx_id: dm.tx_id,
    -867            ping_observed_addr: addr.clone(),
    -868        });
    -869        event!(
    -870            target: "iroh::_events::pong::sent",
    -871            Level::DEBUG,
    -872            remote_node = %sender.fmt_short(),
    -873            dst = ?addr,
    -874            txn = ?dm.tx_id,
    -875        );
    -876
    -877        if !self.disco.try_send(addr.clone(), sender, pong) {
    -878            warn!(%addr, "failed to queue pong");
    +674                        // Update the NodeMap and remap RecvMeta to the NodeIdMappedAddr.
    +675                        match self.node_map.receive_udp(*addr) {
    +676                            None => {
    +677                                // Check if this address is mapped to an IpMappedAddr
    +678                                if let Some(ip_mapped_addr) =
    +679                                    self.ip_mapped_addrs.get_mapped_addr(addr)
    +680                                {
    +681                                    trace!(
    +682                                        src = %addr,
    +683                                        count = %quic_datagram_count,
    +684                                        len = quinn_meta.len,
    +685                                        "UDP recv QUIC address discovery packets",
    +686                                    );
    +687                                    quic_packets_total += quic_datagram_count;
    +688                                    quinn_meta.addr = ip_mapped_addr.private_socket_addr();
    +689                                } else {
    +690                                    warn!(
    +691                                        src = %addr,
    +692                                        count = %quic_datagram_count,
    +693                                        len = quinn_meta.len,
    +694                                        "UDP recv quic packets: no node state found, skipping",
    +695                                    );
    +696                                    // If we have no node state for the from addr, set len to 0 to make
    +697                                    // quinn skip the buf completely.
    +698                                    quinn_meta.len = 0;
    +699                                }
    +700                            }
    +701                            Some((node_id, quic_mapped_addr)) => {
    +702                                trace!(
    +703                                    src = %addr,
    +704                                    node = %node_id.fmt_short(),
    +705                                    count = %quic_datagram_count,
    +706                                    len = quinn_meta.len,
    +707                                    "UDP recv quic packets",
    +708                                );
    +709                                quic_packets_total += quic_datagram_count;
    +710                                quinn_meta.addr = quic_mapped_addr.private_socket_addr();
    +711                            }
    +712                        }
    +713                    }
    +714                    transports::Addr::Relay(src_url, src_node) => {
    +715                        // Relay
    +716                        let quic_mapped_addr = self.node_map.receive_relay(src_url, *src_node);
    +717                        quinn_meta.addr = quic_mapped_addr.private_socket_addr();
    +718                    }
    +719                }
    +720            } else {
    +721                // If all datagrams in this buf are DISCO, set len to zero to make
    +722                // Quinn skip the buf completely.
    +723                quinn_meta.len = 0;
    +724            }
    +725            // Normalize local_ip
    +726            quinn_meta.dst_ip = dst_ip;
    +727        }
    +728
    +729        if quic_packets_total > 0 {
    +730            self.metrics
    +731                .magicsock
    +732                .recv_datagrams
    +733                .inc_by(quic_packets_total as _);
    +734            trace!("UDP recv: {} packets", quic_packets_total);
    +735        }
    +736    }
    +737
    +738    /// Handles a discovery message.
    +739    #[instrument("disco_in", skip_all, fields(node = %sender.fmt_short(), ?src))]
    +740    fn handle_disco_message(&self, sender: PublicKey, sealed_box: &[u8], src: &transports::Addr) {
    +741        trace!("handle_disco_message start");
    +742        if self.is_closed() {
    +743            return;
    +744        }
    +745
    +746        if let transports::Addr::Relay(_, node_id) = src {
    +747            if node_id != &sender {
    +748                // TODO: return here?
    +749                warn!(
    +750                    "Received relay disco message from connection for {}, but with message from {}",
    +751                    node_id.fmt_short(),
    +752                    sender.fmt_short()
    +753                );
    +754            }
    +755        }
    +756
    +757        // We're now reasonably sure we're expecting communication from
    +758        // this node, do the heavy crypto lifting to see what they want.
    +759        let dm = match self.disco.unseal_and_decode(sender, sealed_box) {
    +760            Ok(dm) => dm,
    +761            Err(DiscoBoxError::Open { source, .. }) => {
    +762                warn!(?source, "failed to open disco box");
    +763                self.metrics.magicsock.recv_disco_bad_key.inc();
    +764                return;
    +765            }
    +766            Err(DiscoBoxError::Parse { source, .. }) => {
    +767                // Couldn't parse it, but it was inside a correctly
    +768                // signed box, so just ignore it, assuming it's from a
    +769                // newer version of Tailscale that we don't
    +770                // understand. Not even worth logging about, lest it
    +771                // be too spammy for old clients.
    +772
    +773                self.metrics.magicsock.recv_disco_bad_parse.inc();
    +774                debug!(?source, "failed to parse disco message");
    +775                return;
    +776            }
    +777        };
    +778
    +779        if src.is_relay() {
    +780            self.metrics.magicsock.recv_disco_relay.inc();
    +781        } else {
    +782            self.metrics.magicsock.recv_disco_udp.inc();
    +783        }
    +784
    +785        let span = trace_span!("handle_disco", ?dm);
    +786        let _guard = span.enter();
    +787        trace!("receive disco message");
    +788        match dm {
    +789            disco::Message::Ping(ping) => {
    +790                self.metrics.magicsock.recv_disco_ping.inc();
    +791                self.handle_ping(ping, sender, src);
    +792            }
    +793            disco::Message::Pong(pong) => {
    +794                self.metrics.magicsock.recv_disco_pong.inc();
    +795                self.node_map
    +796                    .handle_pong(sender, src, pong, &self.metrics.magicsock);
    +797            }
    +798            disco::Message::CallMeMaybe(cm) => {
    +799                self.metrics.magicsock.recv_disco_call_me_maybe.inc();
    +800                match src {
    +801                    transports::Addr::Relay(url, _) => {
    +802                        event!(
    +803                            target: "iroh::_events::call-me-maybe::recv",
    +804                            Level::DEBUG,
    +805                            remote_node = %sender.fmt_short(),
    +806                            via = ?url,
    +807                            their_addrs = ?cm.my_numbers,
    +808                        );
    +809                    }
    +810                    _ => {
    +811                        warn!("call-me-maybe packets should only come via relay");
    +812                        return;
    +813                    }
    +814                }
    +815                let ping_actions =
    +816                    self.node_map
    +817                        .handle_call_me_maybe(sender, cm, &self.metrics.magicsock);
    +818                for action in ping_actions {
    +819                    match action {
    +820                        PingAction::SendCallMeMaybe { .. } => {
    +821                            warn!("Unexpected CallMeMaybe as response of handling a CallMeMaybe");
    +822                        }
    +823                        PingAction::SendPing(ping) => {
    +824                            self.send_ping_queued(ping);
    +825                        }
    +826                    }
    +827                }
    +828            }
    +829        }
    +830        trace!("disco message handled");
    +831    }
    +832
    +833    /// Handle a ping message.
    +834    fn handle_ping(&self, dm: disco::Ping, sender: NodeId, src: &transports::Addr) {
    +835        // Insert the ping into the node map, and return whether a ping with this tx_id was already
    +836        // received.
    +837        let addr: SendAddr = src.clone().into();
    +838        let handled = self.node_map.handle_ping(sender, addr.clone(), dm.tx_id);
    +839        match handled.role {
    +840            PingRole::Duplicate => {
    +841                debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path already confirmed, skip");
    +842                return;
    +843            }
    +844            PingRole::LikelyHeartbeat => {}
    +845            PingRole::NewPath => {
    +846                debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: new path");
    +847            }
    +848            PingRole::Activate => {
    +849                debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path active");
    +850            }
    +851        }
    +852
    +853        // Send a pong.
    +854        debug!(tx = %HEXLOWER.encode(&dm.tx_id), %addr, dstkey = %sender.fmt_short(),
    +855               "sending pong");
    +856        let pong = disco::Message::Pong(disco::Pong {
    +857            tx_id: dm.tx_id,
    +858            ping_observed_addr: addr.clone(),
    +859        });
    +860        event!(
    +861            target: "iroh::_events::pong::sent",
    +862            Level::DEBUG,
    +863            remote_node = %sender.fmt_short(),
    +864            dst = ?addr,
    +865            txn = ?dm.tx_id,
    +866        );
    +867
    +868        if !self.disco.try_send(addr.clone(), sender, pong) {
    +869            warn!(%addr, "failed to queue pong");
    +870        }
    +871
    +872        if let Some(ping) = handled.needs_ping_back {
    +873            debug!(
    +874                %addr,
    +875                dstkey = %sender.fmt_short(),
    +876                "sending direct ping back",
    +877            );
    +878            self.send_ping_queued(ping);
     879        }
    -880
    -881        if let Some(ping) = handled.needs_ping_back {
    -882            debug!(
    -883                %addr,
    -884                dstkey = %sender.fmt_short(),
    -885                "sending direct ping back",
    -886            );
    -887            self.send_ping_queued(ping);
    -888        }
    -889    }
    -890
    -891    fn send_ping_queued(&self, ping: SendPing) {
    -892        let SendPing {
    -893            id,
    -894            dst,
    -895            dst_node,
    -896            tx_id,
    -897            purpose,
    -898        } = ping;
    -899        let msg = disco::Message::Ping(disco::Ping {
    -900            tx_id,
    -901            node_key: self.public_key,
    -902        });
    -903        let sent = self.disco.try_send(dst.clone(), dst_node, msg);
    -904        if sent {
    -905            let msg_sender = self.actor_sender.clone();
    -906            trace!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent (queued)");
    -907            self.node_map
    -908                .notify_ping_sent(id, dst, tx_id, purpose, msg_sender);
    -909        } else {
    -910            warn!(dst = ?dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "failed to send ping: queues full");
    -911        }
    -912    }
    -913
    -914    /// Send the given ping actions out.
    -915    async fn send_ping_actions(&self, sender: &UdpSender, msgs: Vec<PingAction>) -> io::Result<()> {
    -916        for msg in msgs {
    -917            // Abort sending as soon as we know we are shutting down.
    -918            if self.is_closing() || self.is_closed() {
    -919                return Ok(());
    -920            }
    -921            match msg {
    -922                PingAction::SendCallMeMaybe {
    -923                    relay_url,
    -924                    dst_node,
    -925                } => {
    -926                    // Sends the call-me-maybe DISCO message, queuing if addresses are too stale.
    -927                    //
    -928                    // To send the call-me-maybe message, we need to know our current direct addresses.  If
    -929                    // this information is too stale, the call-me-maybe is queued while a net_report run is
    -930                    // scheduled.  Once this run finishes, the call-me-maybe will be sent.
    -931                    match self.direct_addrs.fresh_enough() {
    -932                        Ok(()) => {
    -933                            let msg = disco::Message::CallMeMaybe(
    -934                                self.direct_addrs.to_call_me_maybe_message(),
    -935                            );
    -936                            if !self.disco.try_send(
    -937                                SendAddr::Relay(relay_url.clone()),
    -938                                dst_node,
    -939                                msg.clone(),
    -940                            ) {
    -941                                warn!(dstkey = %dst_node.fmt_short(), %relay_url, "relay channel full, dropping call-me-maybe");
    -942                            } else {
    -943                                debug!(dstkey = %dst_node.fmt_short(), %relay_url, "call-me-maybe sent");
    -944                            }
    -945                        }
    -946                        Err(last_refresh_ago) => {
    -947                            debug!(
    -948                                ?last_refresh_ago,
    -949                                "want call-me-maybe but direct addrs stale; queuing after restun",
    -950                            );
    -951                            self.actor_sender
    -952                                .try_send(ActorMessage::ScheduleDirectAddrUpdate(
    -953                                    UpdateReason::RefreshForPeering,
    -954                                    Some((dst_node, relay_url)),
    -955                                ))
    -956                                .ok();
    -957                        }
    -958                    }
    -959                }
    -960                PingAction::SendPing(SendPing {
    -961                    id,
    -962                    dst,
    -963                    dst_node,
    -964                    tx_id,
    -965                    purpose,
    -966                }) => {
    -967                    let msg = disco::Message::Ping(disco::Ping {
    -968                        tx_id,
    -969                        node_key: self.public_key,
    -970                    });
    -971
    -972                    self.send_disco_message(sender, dst.clone(), dst_node, msg)
    -973                        .await?;
    -974                    debug!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent");
    -975                    let msg_sender = self.actor_sender.clone();
    -976                    self.node_map
    -977                        .notify_ping_sent(id, dst, tx_id, purpose, msg_sender);
    -978                }
    -979            }
    -980        }
    -981        Ok(())
    -982    }
    -983
    -984    /// Sends out a disco message.
    -985    async fn send_disco_message(
    -986        &self,
    -987        sender: &UdpSender,
    -988        dst: SendAddr,
    -989        dst_key: PublicKey,
    -990        msg: disco::Message,
    -991    ) -> io::Result<()> {
    -992        let dst = match dst {
    -993            SendAddr::Udp(addr) => transports::Addr::Ip(addr),
    -994            SendAddr::Relay(url) => transports::Addr::Relay(url, dst_key),
    -995        };
    -996
    -997        trace!(?dst, %msg, "send disco message (UDP)");
    -998        if self.is_closed() {
    -999            return Err(io::Error::new(
    -1000                io::ErrorKind::NotConnected,
    -1001                "connection closed",
    -1002            ));
    -1003        }
    -1004
    -1005        let pkt = self.disco.encode_and_seal(self.public_key, dst_key, &msg);
    -1006
    -1007        let transmit = transports::Transmit {
    -1008            contents: &pkt,
    -1009            ecn: None,
    -1010            segment_size: None,
    -1011        };
    -1012
    -1013        let dst2 = dst.clone();
    -1014        match sender.send(&dst2, None, &transmit).await {
    -1015            Ok(()) => {
    -1016                trace!(?dst, %msg, "sent disco message");
    -1017                self.metrics.magicsock.sent_disco_udp.inc();
    -1018                disco_message_sent(&msg, &self.metrics.magicsock);
    -1019                Ok(())
    -1020            }
    -1021            Err(err) => {
    -1022                warn!(?dst, ?msg, ?err, "failed to send disco message");
    -1023                Err(err)
    +880    }
    +881
    +882    fn send_ping_queued(&self, ping: SendPing) {
    +883        let SendPing {
    +884            id,
    +885            dst,
    +886            dst_node,
    +887            tx_id,
    +888            purpose,
    +889        } = ping;
    +890        let msg = disco::Message::Ping(disco::Ping {
    +891            tx_id,
    +892            node_key: self.public_key,
    +893        });
    +894        let sent = self.disco.try_send(dst.clone(), dst_node, msg);
    +895        if sent {
    +896            let msg_sender = self.actor_sender.clone();
    +897            trace!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent (queued)");
    +898            self.node_map
    +899                .notify_ping_sent(id, dst, tx_id, purpose, msg_sender);
    +900        } else {
    +901            warn!(dst = ?dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "failed to send ping: queues full");
    +902        }
    +903    }
    +904
    +905    /// Send the given ping actions out.
    +906    async fn send_ping_actions(&self, sender: &UdpSender, msgs: Vec<PingAction>) -> io::Result<()> {
    +907        for msg in msgs {
    +908            // Abort sending as soon as we know we are shutting down.
    +909            if self.is_closing() || self.is_closed() {
    +910                return Ok(());
    +911            }
    +912            match msg {
    +913                PingAction::SendCallMeMaybe {
    +914                    relay_url,
    +915                    dst_node,
    +916                } => {
    +917                    // Sends the call-me-maybe DISCO message, queuing if addresses are too stale.
    +918                    //
    +919                    // To send the call-me-maybe message, we need to know our current direct addresses.  If
    +920                    // this information is too stale, the call-me-maybe is queued while a net_report run is
    +921                    // scheduled.  Once this run finishes, the call-me-maybe will be sent.
    +922                    match self.direct_addrs.fresh_enough() {
    +923                        Ok(()) => {
    +924                            let msg = disco::Message::CallMeMaybe(
    +925                                self.direct_addrs.to_call_me_maybe_message(),
    +926                            );
    +927                            if !self.disco.try_send(
    +928                                SendAddr::Relay(relay_url.clone()),
    +929                                dst_node,
    +930                                msg.clone(),
    +931                            ) {
    +932                                warn!(dstkey = %dst_node.fmt_short(), %relay_url, "relay channel full, dropping call-me-maybe");
    +933                            } else {
    +934                                debug!(dstkey = %dst_node.fmt_short(), %relay_url, "call-me-maybe sent");
    +935                            }
    +936                        }
    +937                        Err(last_refresh_ago) => {
    +938                            debug!(
    +939                                ?last_refresh_ago,
    +940                                "want call-me-maybe but direct addrs stale; queuing after restun",
    +941                            );
    +942                            self.actor_sender
    +943                                .try_send(ActorMessage::ScheduleDirectAddrUpdate(
    +944                                    UpdateReason::RefreshForPeering,
    +945                                    Some((dst_node, relay_url)),
    +946                                ))
    +947                                .ok();
    +948                        }
    +949                    }
    +950                }
    +951                PingAction::SendPing(SendPing {
    +952                    id,
    +953                    dst,
    +954                    dst_node,
    +955                    tx_id,
    +956                    purpose,
    +957                }) => {
    +958                    let msg = disco::Message::Ping(disco::Ping {
    +959                        tx_id,
    +960                        node_key: self.public_key,
    +961                    });
    +962
    +963                    self.send_disco_message(sender, dst.clone(), dst_node, msg)
    +964                        .await?;
    +965                    debug!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent");
    +966                    let msg_sender = self.actor_sender.clone();
    +967                    self.node_map
    +968                        .notify_ping_sent(id, dst, tx_id, purpose, msg_sender);
    +969                }
    +970            }
    +971        }
    +972        Ok(())
    +973    }
    +974
    +975    /// Sends out a disco message.
    +976    async fn send_disco_message(
    +977        &self,
    +978        sender: &UdpSender,
    +979        dst: SendAddr,
    +980        dst_key: PublicKey,
    +981        msg: disco::Message,
    +982    ) -> io::Result<()> {
    +983        let dst = match dst {
    +984            SendAddr::Udp(addr) => transports::Addr::Ip(addr),
    +985            SendAddr::Relay(url) => transports::Addr::Relay(url, dst_key),
    +986        };
    +987
    +988        trace!(?dst, %msg, "send disco message (UDP)");
    +989        if self.is_closed() {
    +990            return Err(io::Error::new(
    +991                io::ErrorKind::NotConnected,
    +992                "connection closed",
    +993            ));
    +994        }
    +995
    +996        let pkt = self.disco.encode_and_seal(self.public_key, dst_key, &msg);
    +997
    +998        let transmit = transports::Transmit {
    +999            contents: &pkt,
    +1000            ecn: None,
    +1001            segment_size: None,
    +1002        };
    +1003
    +1004        let dst2 = dst.clone();
    +1005        match sender.send(&dst2, None, &transmit).await {
    +1006            Ok(()) => {
    +1007                trace!(?dst, %msg, "sent disco message");
    +1008                self.metrics.magicsock.sent_disco_udp.inc();
    +1009                disco_message_sent(&msg, &self.metrics.magicsock);
    +1010                Ok(())
    +1011            }
    +1012            Err(err) => {
    +1013                warn!(?dst, ?msg, ?err, "failed to send disco message");
    +1014                Err(err)
    +1015            }
    +1016        }
    +1017    }
    +1018    /// Tries to send out the given ping actions out.
    +1019    fn try_send_ping_actions(&self, sender: &UdpSender, msgs: Vec<PingAction>) -> io::Result<()> {
    +1020        for msg in msgs {
    +1021            // Abort sending as soon as we know we are shutting down.
    +1022            if self.is_closing() || self.is_closed() {
    +1023                return Ok(());
     1024            }
    -1025        }
    -1026    }
    -1027
    -1028    /// Publishes our address to a discovery service, if configured.
    -1029    ///
    -1030    /// Called whenever our addresses or home relay node changes.
    -1031    fn publish_my_addr(&self) {
    -1032        if let Some(ref discovery) = self.discovery {
    -1033            let relay_url = self.my_relay();
    -1034            let direct_addrs = self.direct_addrs.sockaddrs();
    -1035
    -1036            let user_data = self
    -1037                .discovery_user_data
    -1038                .read()
    -1039                .expect("lock poisened")
    -1040                .clone();
    -1041            if relay_url.is_none() && direct_addrs.is_empty() && user_data.is_none() {
    -1042                // do not bother publishing if we don't have any information
    -1043                return;
    -1044            }
    -1045
    -1046            let data = NodeData::new(relay_url, direct_addrs).with_user_data(user_data);
    -1047            discovery.publish(&data);
    -1048        }
    -1049    }
    -1050}
    -1051
    -1052#[derive(Clone, Debug)]
    -1053enum MappedAddr {
    -1054    NodeId(NodeIdMappedAddr),
    -1055    #[cfg(not(wasm_browser))]
    -1056    Ip(IpMappedAddr),
    -1057    None(SocketAddr),
    -1058}
    -1059
    -1060impl From<SocketAddr> for MappedAddr {
    -1061    fn from(value: SocketAddr) -> Self {
    -1062        match value.ip() {
    -1063            IpAddr::V4(_) => MappedAddr::None(value),
    -1064            IpAddr::V6(addr) => {
    -1065                if let Ok(node_id_mapped_addr) = NodeIdMappedAddr::try_from(addr) {
    -1066                    return MappedAddr::NodeId(node_id_mapped_addr);
    -1067                }
    -1068                #[cfg(not(wasm_browser))]
    -1069                if let Ok(ip_mapped_addr) = IpMappedAddr::try_from(addr) {
    -1070                    return MappedAddr::Ip(ip_mapped_addr);
    -1071                }
    -1072                MappedAddr::None(value)
    -1073            }
    -1074        }
    -1075    }
    -1076}
    -1077
    -1078/// Manages currently running direct addr discovery, aka net_report runs.
    -1079///
    -1080/// Invariants:
    -1081/// - only one direct addr update must be running at a time
    -1082/// - if an update is scheduled while another one is running, remember that
    -1083///   and start a new one when the current one has finished
    -1084#[derive(Debug)]
    -1085struct DirectAddrUpdateState {
    -1086    /// If set, start a new update as soon as the current one is finished.
    -1087    want_update: Option<UpdateReason>,
    -1088    msock: Arc<MagicSock>,
    -1089    #[cfg(not(wasm_browser))]
    -1090    port_mapper: portmapper::Client,
    -1091    /// The prober that discovers local network conditions, including the closest relay relay and NAT mappings.
    -1092    net_reporter: Arc<Mutex<net_report::Client>>,
    -1093    relay_map: RelayMap,
    -1094    run_done: mpsc::Sender<()>,
    -1095}
    -1096
    -1097#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
    -1098enum UpdateReason {
    -1099    /// Initial state
    -1100    #[default]
    -1101    None,
    -1102    RefreshForPeering,
    -1103    Periodic,
    -1104    PortmapUpdated,
    -1105    LinkChangeMajor,
    -1106    LinkChangeMinor,
    -1107}
    -1108
    -1109impl UpdateReason {
    -1110    fn is_major(self) -> bool {
    -1111        matches!(self, Self::LinkChangeMajor)
    -1112    }
    -1113}
    -1114
    -1115impl DirectAddrUpdateState {
    -1116    fn new(
    -1117        msock: Arc<MagicSock>,
    -1118        #[cfg(not(wasm_browser))] port_mapper: portmapper::Client,
    -1119        net_reporter: Arc<Mutex<net_report::Client>>,
    -1120        relay_map: RelayMap,
    -1121        run_done: mpsc::Sender<()>,
    -1122    ) -> Self {
    -1123        DirectAddrUpdateState {
    -1124            want_update: Default::default(),
    -1125            #[cfg(not(wasm_browser))]
    -1126            port_mapper,
    -1127            net_reporter,
    -1128            msock,
    -1129            relay_map,
    -1130            run_done,
    -1131        }
    -1132    }
    -1133
    -1134    /// Schedules a new run, either starting it immediately if none is running or
    -1135    /// scheduling it for later.
    -1136    fn schedule_run(&mut self, why: UpdateReason, if_state: IfStateDetails) {
    -1137        match self.net_reporter.clone().try_lock_owned() {
    -1138            Ok(net_reporter) => {
    -1139                self.run(why, if_state, net_reporter);
    -1140            }
    -1141            Err(_) => {
    -1142                let _ = self.want_update.insert(why);
    -1143            }
    -1144        }
    -1145    }
    -1146
    -1147    /// If another run is needed, triggers this run, otherwise does nothing.
    -1148    fn try_run(&mut self, if_state: IfStateDetails) {
    -1149        match self.net_reporter.clone().try_lock_owned() {
    -1150            Ok(net_reporter) => {
    -1151                if let Some(why) = self.want_update.take() {
    -1152                    self.run(why, if_state, net_reporter);
    -1153                }
    -1154            }
    -1155            Err(_) => {
    -1156                // do nothing
    -1157            }
    -1158        }
    -1159    }
    +1025            match msg {
    +1026                PingAction::SendCallMeMaybe {
    +1027                    relay_url,
    +1028                    dst_node,
    +1029                } => {
    +1030                    // Sends the call-me-maybe DISCO message, queuing if addresses are too stale.
    +1031                    //
    +1032                    // To send the call-me-maybe message, we need to know our current direct addresses.  If
    +1033                    // this information is too stale, the call-me-maybe is queued while a net_report run is
    +1034                    // scheduled.  Once this run finishes, the call-me-maybe will be sent.
    +1035                    match self.direct_addrs.fresh_enough() {
    +1036                        Ok(()) => {
    +1037                            let msg = disco::Message::CallMeMaybe(
    +1038                                self.direct_addrs.to_call_me_maybe_message(),
    +1039                            );
    +1040                            if !self.disco.try_send(
    +1041                                SendAddr::Relay(relay_url.clone()),
    +1042                                dst_node,
    +1043                                msg.clone(),
    +1044                            ) {
    +1045                                warn!(dstkey = %dst_node.fmt_short(), %relay_url, "relay channel full, dropping call-me-maybe");
    +1046                            } else {
    +1047                                debug!(dstkey = %dst_node.fmt_short(), %relay_url, "call-me-maybe sent");
    +1048                            }
    +1049                        }
    +1050                        Err(last_refresh_ago) => {
    +1051                            debug!(
    +1052                                ?last_refresh_ago,
    +1053                                "want call-me-maybe but direct addrs stale; queuing after restun",
    +1054                            );
    +1055                            self.actor_sender
    +1056                                .try_send(ActorMessage::ScheduleDirectAddrUpdate(
    +1057                                    UpdateReason::RefreshForPeering,
    +1058                                    Some((dst_node, relay_url)),
    +1059                                ))
    +1060                                .ok();
    +1061                        }
    +1062                    }
    +1063                }
    +1064                PingAction::SendPing(SendPing {
    +1065                    id,
    +1066                    dst,
    +1067                    dst_node,
    +1068                    tx_id,
    +1069                    purpose,
    +1070                }) => {
    +1071                    let msg = disco::Message::Ping(disco::Ping {
    +1072                        tx_id,
    +1073                        node_key: self.public_key,
    +1074                    });
    +1075
    +1076                    self.try_send_disco_message(sender, dst.clone(), dst_node, msg)?;
    +1077                    debug!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent");
    +1078                    let msg_sender = self.actor_sender.clone();
    +1079                    self.node_map
    +1080                        .notify_ping_sent(id, dst, tx_id, purpose, msg_sender);
    +1081                }
    +1082            }
    +1083        }
    +1084        Ok(())
    +1085    }
    +1086
    +1087    /// Tries to send out a disco message.
    +1088    fn try_send_disco_message(
    +1089        &self,
    +1090        sender: &UdpSender,
    +1091        dst: SendAddr,
    +1092        dst_key: PublicKey,
    +1093        msg: disco::Message,
    +1094    ) -> io::Result<()> {
    +1095        let dst = match dst {
    +1096            SendAddr::Udp(addr) => transports::Addr::Ip(addr),
    +1097            SendAddr::Relay(url) => transports::Addr::Relay(url, dst_key),
    +1098        };
    +1099
    +1100        trace!(?dst, %msg, "send disco message (UDP)");
    +1101        if self.is_closed() {
    +1102            return Err(io::Error::new(
    +1103                io::ErrorKind::NotConnected,
    +1104                "connection closed",
    +1105            ));
    +1106        }
    +1107
    +1108        let pkt = self.disco.encode_and_seal(self.public_key, dst_key, &msg);
    +1109
    +1110        let transmit = transports::Transmit {
    +1111            contents: &pkt,
    +1112            ecn: None,
    +1113            segment_size: None,
    +1114        };
    +1115
    +1116        let dst2 = dst.clone();
    +1117        match sender.inner_try_send(&dst2, None, &transmit) {
    +1118            Ok(()) => {
    +1119                trace!(?dst, %msg, "sent disco message");
    +1120                self.metrics.magicsock.sent_disco_udp.inc();
    +1121                disco_message_sent(&msg, &self.metrics.magicsock);
    +1122                Ok(())
    +1123            }
    +1124            Err(err) => {
    +1125                warn!(?dst, ?msg, ?err, "failed to send disco message");
    +1126                Err(err)
    +1127            }
    +1128        }
    +1129    }
    +1130
    +1131    /// Publishes our address to a discovery service, if configured.
    +1132    ///
    +1133    /// Called whenever our addresses or home relay node changes.
    +1134    fn publish_my_addr(&self) {
    +1135        let relay_url = self.my_relay();
    +1136        let direct_addrs = self.direct_addrs.sockaddrs();
    +1137
    +1138        let user_data = self
    +1139            .discovery_user_data
    +1140            .read()
    +1141            .expect("lock poisened")
    +1142            .clone();
    +1143        if relay_url.is_none() && direct_addrs.is_empty() && user_data.is_none() {
    +1144            // do not bother publishing if we don't have any information
    +1145            return;
    +1146        }
    +1147
    +1148        let data = NodeData::new(relay_url, direct_addrs).with_user_data(user_data);
    +1149        self.discovery.publish(&data);
    +1150    }
    +1151}
    +1152
    +1153#[derive(Clone, Debug)]
    +1154enum MappedAddr {
    +1155    NodeId(NodeIdMappedAddr),
    +1156    #[cfg(not(wasm_browser))]
    +1157    Ip(IpMappedAddr),
    +1158    None(SocketAddr),
    +1159}
     1160
    -1161    /// Trigger a new run.
    -1162    fn run(
    -1163        &mut self,
    -1164        why: UpdateReason,
    -1165        if_state: IfStateDetails,
    -1166        mut net_reporter: tokio::sync::OwnedMutexGuard<net_report::Client>,
    -1167    ) {
    -1168        debug!("starting direct addr update ({:?})", why);
    -1169        #[cfg(not(wasm_browser))]
    -1170        self.port_mapper.procure_mapping();
    -1171        // Don't start a net report probe if we know
    -1172        // we are shutting down
    -1173        if self.msock.is_closing() || self.msock.is_closed() {
    -1174            debug!("skipping net_report, socket is shutting down");
    -1175            return;
    -1176        }
    -1177        if self.relay_map.is_empty() {
    -1178            debug!("skipping net_report, empty RelayMap");
    -1179            self.msock.net_report.set((None, why)).ok();
    -1180            return;
    -1181        }
    -1182
    -1183        debug!("requesting net_report report");
    -1184        let msock = self.msock.clone();
    -1185
    -1186        let run_done = self.run_done.clone();
    -1187        task::spawn(async move {
    -1188            let fut = time::timeout(
    -1189                NET_REPORT_TIMEOUT,
    -1190                net_reporter.get_report(if_state, why.is_major()),
    -1191            );
    -1192            match fut.await {
    -1193                Ok(report) => {
    -1194                    msock.net_report.set((Some(report), why)).ok();
    -1195                }
    -1196                Err(time::Elapsed { .. }) => {
    -1197                    warn!("net_report report timed out");
    -1198                }
    -1199            }
    -1200
    -1201            // mark run as finished
    -1202            debug!("direct addr update done ({:?})", why);
    -1203            run_done.send(()).await.ok();
    -1204        });
    -1205    }
    -1206}
    -1207
    -1208#[allow(missing_docs)]
    -1209#[common_fields({
    -1210    backtrace: Option<snafu::Backtrace>,
    -1211    #[snafu(implicit)]
    -1212    span_trace: n0_snafu::SpanTrace,
    -1213})]
    -1214#[derive(Debug, Snafu)]
    -1215#[non_exhaustive]
    -1216pub enum CreateHandleError {
    -1217    #[snafu(display("Failed to create bind sockets"))]
    -1218    BindSockets { source: io::Error },
    -1219    #[snafu(display("Failed to create internal quinn endpoint"))]
    -1220    CreateQuinnEndpoint { source: io::Error },
    -1221    #[snafu(display("Failed to create socket state"))]
    -1222    CreateSocketState { source: io::Error },
    -1223    #[snafu(display("Failed to create netmon monitor"))]
    -1224    CreateNetmonMonitor { source: netmon::Error },
    -1225    #[snafu(display("Failed to subscribe netmon monitor"))]
    -1226    SubscribeNetmonMonitor { source: netmon::Error },
    -1227}
    -1228
    -1229impl Handle {
    -1230    /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`].
    -1231    async fn new(opts: Options) -> Result<Self, CreateHandleError> {
    -1232        let Options {
    -1233            addr_v4,
    -1234            addr_v6,
    -1235            secret_key,
    -1236            relay_map,
    -1237            relay_protocol,
    -1238            node_map,
    -1239            discovery,
    -1240            discovery_user_data,
    -1241            #[cfg(not(wasm_browser))]
    -1242            dns_resolver,
    -1243            proxy_url,
    -1244            server_config,
    -1245            #[cfg(any(test, feature = "test-utils"))]
    -1246            insecure_skip_relay_cert_verify,
    -1247            #[cfg(any(test, feature = "test-utils"))]
    -1248            path_selection,
    -1249            metrics,
    -1250        } = opts;
    -1251
    -1252        let addr_v4 = addr_v4.unwrap_or_else(|| SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0));
    -1253
    -1254        #[cfg(not(wasm_browser))]
    -1255        let (ip_transports, port_mapper) =
    -1256            bind_ip(addr_v4, addr_v6, &metrics).context(BindSocketsSnafu)?;
    -1257
    -1258        let ip_mapped_addrs = IpMappedAddresses::default();
    -1259
    -1260        let (actor_sender, actor_receiver) = mpsc::channel(256);
    +1161impl From<SocketAddr> for MappedAddr {
    +1162    fn from(value: SocketAddr) -> Self {
    +1163        match value.ip() {
    +1164            IpAddr::V4(_) => MappedAddr::None(value),
    +1165            IpAddr::V6(addr) => {
    +1166                if let Ok(node_id_mapped_addr) = NodeIdMappedAddr::try_from(addr) {
    +1167                    return MappedAddr::NodeId(node_id_mapped_addr);
    +1168                }
    +1169                #[cfg(not(wasm_browser))]
    +1170                if let Ok(ip_mapped_addr) = IpMappedAddr::try_from(addr) {
    +1171                    return MappedAddr::Ip(ip_mapped_addr);
    +1172                }
    +1173                MappedAddr::None(value)
    +1174            }
    +1175        }
    +1176    }
    +1177}
    +1178
    +1179/// Manages currently running direct addr discovery, aka net_report runs.
    +1180///
    +1181/// Invariants:
    +1182/// - only one direct addr update must be running at a time
    +1183/// - if an update is scheduled while another one is running, remember that
    +1184///   and start a new one when the current one has finished
    +1185#[derive(Debug)]
    +1186struct DirectAddrUpdateState {
    +1187    /// If set, start a new update as soon as the current one is finished.
    +1188    want_update: Option<UpdateReason>,
    +1189    msock: Arc<MagicSock>,
    +1190    #[cfg(not(wasm_browser))]
    +1191    port_mapper: portmapper::Client,
    +1192    /// The prober that discovers local network conditions, including the closest relay relay and NAT mappings.
    +1193    net_reporter: Arc<AsyncMutex<net_report::Client>>,
    +1194    relay_map: RelayMap,
    +1195    run_done: mpsc::Sender<()>,
    +1196}
    +1197
    +1198#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)]
    +1199enum UpdateReason {
    +1200    /// Initial state
    +1201    #[default]
    +1202    None,
    +1203    RefreshForPeering,
    +1204    Periodic,
    +1205    PortmapUpdated,
    +1206    LinkChangeMajor,
    +1207    LinkChangeMinor,
    +1208}
    +1209
    +1210impl UpdateReason {
    +1211    fn is_major(self) -> bool {
    +1212        matches!(self, Self::LinkChangeMajor)
    +1213    }
    +1214}
    +1215
    +1216impl DirectAddrUpdateState {
    +1217    fn new(
    +1218        msock: Arc<MagicSock>,
    +1219        #[cfg(not(wasm_browser))] port_mapper: portmapper::Client,
    +1220        net_reporter: Arc<AsyncMutex<net_report::Client>>,
    +1221        relay_map: RelayMap,
    +1222        run_done: mpsc::Sender<()>,
    +1223    ) -> Self {
    +1224        DirectAddrUpdateState {
    +1225            want_update: Default::default(),
    +1226            #[cfg(not(wasm_browser))]
    +1227            port_mapper,
    +1228            net_reporter,
    +1229            msock,
    +1230            relay_map,
    +1231            run_done,
    +1232        }
    +1233    }
    +1234
    +1235    /// Schedules a new run, either starting it immediately if none is running or
    +1236    /// scheduling it for later.
    +1237    fn schedule_run(&mut self, why: UpdateReason, if_state: IfStateDetails) {
    +1238        match self.net_reporter.clone().try_lock_owned() {
    +1239            Ok(net_reporter) => {
    +1240                self.run(why, if_state, net_reporter);
    +1241            }
    +1242            Err(_) => {
    +1243                let _ = self.want_update.insert(why);
    +1244            }
    +1245        }
    +1246    }
    +1247
    +1248    /// If another run is needed, triggers this run, otherwise does nothing.
    +1249    fn try_run(&mut self, if_state: IfStateDetails) {
    +1250        match self.net_reporter.clone().try_lock_owned() {
    +1251            Ok(net_reporter) => {
    +1252                if let Some(why) = self.want_update.take() {
    +1253                    self.run(why, if_state, net_reporter);
    +1254                }
    +1255            }
    +1256            Err(_) => {
    +1257                // do nothing
    +1258            }
    +1259        }
    +1260    }
     1261
    -1262        // load the node data
    -1263        let node_map = node_map.unwrap_or_default();
    -1264        #[cfg(any(test, feature = "test-utils"))]
    -1265        let node_map = NodeMap::load_from_vec(node_map, path_selection, &metrics.magicsock);
    -1266        #[cfg(not(any(test, feature = "test-utils")))]
    -1267        let node_map = NodeMap::load_from_vec(node_map, &metrics.magicsock);
    -1268
    -1269        let my_relay = Watchable::new(None);
    -1270        let ipv6_reported = Arc::new(AtomicBool::new(false));
    -1271
    -1272        let relay_transport = RelayTransport::new(RelayActorConfig {
    -1273            my_relay: my_relay.clone(),
    -1274            secret_key: secret_key.clone(),
    -1275            #[cfg(not(wasm_browser))]
    -1276            dns_resolver: dns_resolver.clone(),
    -1277            proxy_url: proxy_url.clone(),
    -1278            ipv6_reported: ipv6_reported.clone(),
    -1279            #[cfg(any(test, feature = "test-utils"))]
    -1280            insecure_skip_relay_cert_verify,
    -1281            metrics: metrics.magicsock.clone(),
    -1282            protocol: relay_protocol,
    -1283        });
    -1284        let relay_transports = vec![relay_transport];
    -1285
    -1286        let secret_encryption_key = secret_ed_box(secret_key.secret());
    -1287        #[cfg(not(wasm_browser))]
    -1288        let ipv6 = ip_transports.iter().any(|t| t.bind_addr().is_ipv6());
    -1289
    -1290        #[cfg(not(wasm_browser))]
    -1291        let transports = Transports::new(ip_transports, relay_transports);
    -1292        #[cfg(wasm_browser)]
    -1293        let transports = Transports::new(relay_transports);
    -1294
    -1295        let (disco, disco_receiver) = DiscoState::new(secret_encryption_key);
    -1296
    -1297        let msock = Arc::new(MagicSock {
    -1298            public_key: secret_key.public(),
    -1299            closing: AtomicBool::new(false),
    -1300            closed: AtomicBool::new(false),
    -1301            disco,
    -1302            actor_sender: actor_sender.clone(),
    -1303            ipv6_reported,
    -1304            node_map,
    -1305            ip_mapped_addrs: ip_mapped_addrs.clone(),
    -1306            discovery,
    -1307            discovery_user_data: RwLock::new(discovery_user_data),
    -1308            direct_addrs: Default::default(),
    -1309            net_report: Watchable::new((None, UpdateReason::None)),
    -1310            #[cfg(not(wasm_browser))]
    -1311            dns_resolver: dns_resolver.clone(),
    -1312            discovery_subscribers: DiscoverySubscribers::new(),
    -1313            metrics: metrics.clone(),
    -1314            local_addrs_watch: transports.local_addrs_watch(),
    -1315            #[cfg(not(wasm_browser))]
    -1316            ip_bind_addrs: transports.ip_bind_addrs(),
    -1317        });
    -1318
    -1319        let mut endpoint_config = quinn::EndpointConfig::default();
    -1320        // Setting this to false means that quinn will ignore packets that have the QUIC fixed bit
    -1321        // set to 0. The fixed bit is the 3rd bit of the first byte of a packet.
    -1322        // For performance reasons and to not rewrite buffers we pass non-QUIC UDP packets straight
    -1323        // through to quinn. We set the first byte of the packet to zero, which makes quinn ignore
    -1324        // the packet if grease_quic_bit is set to false.
    -1325        endpoint_config.grease_quic_bit(false);
    -1326
    -1327        let sender = transports.create_sender(msock.clone());
    -1328        let local_addrs_watch = transports.local_addrs_watch();
    -1329        let network_change_sender = transports.create_network_change_sender();
    -1330
    -1331        let endpoint = quinn::Endpoint::new_with_abstract_socket(
    -1332            endpoint_config,
    -1333            Some(server_config),
    -1334            Box::new(MagicUdpSocket {
    -1335                socket: msock.clone(),
    -1336                transports,
    -1337            }),
    -1338            #[cfg(not(wasm_browser))]
    -1339            Arc::new(quinn::TokioRuntime),
    -1340            #[cfg(wasm_browser)]
    -1341            Arc::new(crate::web_runtime::WebRuntime),
    -1342        )
    -1343        .context(CreateQuinnEndpointSnafu)?;
    -1344
    -1345        let network_monitor = netmon::Monitor::new()
    -1346            .await
    -1347            .context(CreateNetmonMonitorSnafu)?;
    -1348
    -1349        let qad_endpoint = endpoint.clone();
    -1350
    -1351        #[cfg(any(test, feature = "test-utils"))]
    -1352        let client_config = if insecure_skip_relay_cert_verify {
    -1353            iroh_relay::client::make_dangerous_client_config()
    -1354        } else {
    -1355            default_quic_client_config()
    -1356        };
    -1357        #[cfg(not(any(test, feature = "test-utils")))]
    -1358        let client_config = default_quic_client_config();
    -1359
    -1360        let net_report_config = net_report::Options::default();
    -1361        #[cfg(not(wasm_browser))]
    -1362        let net_report_config = net_report_config.quic_config(Some(QuicConfig {
    -1363            ep: qad_endpoint,
    -1364            client_config,
    -1365            ipv4: true,
    -1366            ipv6,
    -1367        }));
    -1368
    -1369        #[cfg(any(test, feature = "test-utils"))]
    -1370        let net_report_config =
    -1371            net_report_config.insecure_skip_relay_cert_verify(insecure_skip_relay_cert_verify);
    -1372
    -1373        let net_reporter = net_report::Client::new(
    -1374            #[cfg(not(wasm_browser))]
    -1375            dns_resolver,
    -1376            #[cfg(not(wasm_browser))]
    -1377            Some(ip_mapped_addrs),
    -1378            relay_map.clone(),
    -1379            net_report_config,
    -1380            metrics.net_report.clone(),
    -1381        );
    -1382
    -1383        let (direct_addr_done_tx, direct_addr_done_rx) = mpsc::channel(8);
    -1384        let direct_addr_update_state = DirectAddrUpdateState::new(
    -1385            msock.clone(),
    -1386            #[cfg(not(wasm_browser))]
    -1387            port_mapper,
    -1388            Arc::new(Mutex::new(net_reporter)),
    -1389            relay_map,
    -1390            direct_addr_done_tx,
    -1391        );
    -1392
    -1393        let netmon_watcher = network_monitor.interface_state();
    -1394        let actor = Actor {
    -1395            msg_receiver: actor_receiver,
    -1396            msock: msock.clone(),
    -1397            periodic_re_stun_timer: new_re_stun_timer(false),
    -1398            network_monitor,
    -1399            netmon_watcher,
    -1400            direct_addr_update_state,
    -1401            network_change_sender,
    -1402            direct_addr_done_rx,
    -1403            pending_call_me_maybes: Default::default(),
    -1404            disco_receiver,
    -1405        };
    -1406
    -1407        let actor_token = CancellationToken::new();
    -1408        let token = actor_token.clone();
    -1409        let actor_task = task::spawn(
    -1410            actor
    -1411                .run(token, local_addrs_watch, sender)
    -1412                .instrument(info_span!("actor")),
    -1413        );
    +1262    /// Trigger a new run.
    +1263    fn run(
    +1264        &mut self,
    +1265        why: UpdateReason,
    +1266        if_state: IfStateDetails,
    +1267        mut net_reporter: tokio::sync::OwnedMutexGuard<net_report::Client>,
    +1268    ) {
    +1269        debug!("starting direct addr update ({:?})", why);
    +1270        #[cfg(not(wasm_browser))]
    +1271        self.port_mapper.procure_mapping();
    +1272        // Don't start a net report probe if we know
    +1273        // we are shutting down
    +1274        if self.msock.is_closing() || self.msock.is_closed() {
    +1275            debug!("skipping net_report, socket is shutting down");
    +1276            return;
    +1277        }
    +1278        if self.relay_map.is_empty() {
    +1279            debug!("skipping net_report, empty RelayMap");
    +1280            self.msock.net_report.set((None, why)).ok();
    +1281            return;
    +1282        }
    +1283
    +1284        debug!("requesting net_report report");
    +1285        let msock = self.msock.clone();
    +1286
    +1287        let run_done = self.run_done.clone();
    +1288        task::spawn(
    +1289            async move {
    +1290                let fut = time::timeout(
    +1291                    NET_REPORT_TIMEOUT,
    +1292                    net_reporter.get_report(if_state, why.is_major()),
    +1293                );
    +1294                match fut.await {
    +1295                    Ok(report) => {
    +1296                        msock.net_report.set((Some(report), why)).ok();
    +1297                    }
    +1298                    Err(time::Elapsed { .. }) => {
    +1299                        warn!("net_report report timed out");
    +1300                    }
    +1301                }
    +1302
    +1303                // mark run as finished
    +1304                debug!("direct addr update done ({:?})", why);
    +1305                run_done.send(()).await.ok();
    +1306            }
    +1307            .instrument(tracing::Span::current()),
    +1308        );
    +1309    }
    +1310}
    +1311
    +1312#[allow(missing_docs)]
    +1313#[common_fields({
    +1314    backtrace: Option<snafu::Backtrace>,
    +1315    #[snafu(implicit)]
    +1316    span_trace: n0_snafu::SpanTrace,
    +1317})]
    +1318#[derive(Debug, Snafu)]
    +1319#[non_exhaustive]
    +1320pub enum CreateHandleError {
    +1321    #[snafu(display("Failed to create bind sockets"))]
    +1322    BindSockets { source: io::Error },
    +1323    #[snafu(display("Failed to create internal quinn endpoint"))]
    +1324    CreateQuinnEndpoint { source: io::Error },
    +1325    #[snafu(display("Failed to create socket state"))]
    +1326    CreateSocketState { source: io::Error },
    +1327    #[snafu(display("Failed to create netmon monitor"))]
    +1328    CreateNetmonMonitor { source: netmon::Error },
    +1329    #[snafu(display("Failed to subscribe netmon monitor"))]
    +1330    SubscribeNetmonMonitor { source: netmon::Error },
    +1331    #[snafu(transparent)]
    +1332    Discovery {
    +1333        source: crate::discovery::IntoDiscoveryError,
    +1334    },
    +1335}
    +1336
    +1337impl Handle {
    +1338    /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`].
    +1339    async fn new(opts: Options) -> Result<Self, CreateHandleError> {
    +1340        let Options {
    +1341            addr_v4,
    +1342            addr_v6,
    +1343            secret_key,
    +1344            relay_map,
    +1345            discovery,
    +1346            discovery_user_data,
    +1347            #[cfg(not(wasm_browser))]
    +1348            dns_resolver,
    +1349            proxy_url,
    +1350            server_config,
    +1351            #[cfg(any(test, feature = "test-utils"))]
    +1352            insecure_skip_relay_cert_verify,
    +1353            #[cfg(any(test, feature = "test-utils"))]
    +1354            path_selection,
    +1355            metrics,
    +1356        } = opts;
    +1357
    +1358        let discovery = {
    +1359            let context = DiscoveryContext {
    +1360                secret_key: &secret_key,
    +1361                #[cfg(not(wasm_browser))]
    +1362                dns_resolver: &dns_resolver,
    +1363            };
    +1364            let discovery = discovery
    +1365                .into_iter()
    +1366                .map(|builder| builder.into_discovery(&context))
    +1367                .collect::<Result<Vec<_>, IntoDiscoveryError>>()?;
    +1368            match discovery.len() {
    +1369                0 => ConcurrentDiscovery::default(),
    +1370                _ => ConcurrentDiscovery::from_services(discovery),
    +1371            }
    +1372        };
    +1373
    +1374        let addr_v4 = addr_v4.unwrap_or_else(|| SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0));
    +1375
    +1376        #[cfg(not(wasm_browser))]
    +1377        let (ip_transports, port_mapper) =
    +1378            bind_ip(addr_v4, addr_v6, &metrics).context(BindSocketsSnafu)?;
    +1379
    +1380        let ip_mapped_addrs = IpMappedAddresses::default();
    +1381
    +1382        let (actor_sender, actor_receiver) = mpsc::channel(256);
    +1383
    +1384        let ipv6_reported = false;
    +1385
    +1386        // load the node data
    +1387        let node_map = NodeMap::load_from_vec(
    +1388            Vec::new(),
    +1389            #[cfg(any(test, feature = "test-utils"))]
    +1390            path_selection,
    +1391            ipv6_reported,
    +1392            &metrics.magicsock,
    +1393        );
    +1394
    +1395        let my_relay = Watchable::new(None);
    +1396        let ipv6_reported = Arc::new(AtomicBool::new(ipv6_reported));
    +1397
    +1398        let relay_transport = RelayTransport::new(RelayActorConfig {
    +1399            my_relay: my_relay.clone(),
    +1400            secret_key: secret_key.clone(),
    +1401            #[cfg(not(wasm_browser))]
    +1402            dns_resolver: dns_resolver.clone(),
    +1403            proxy_url: proxy_url.clone(),
    +1404            ipv6_reported: ipv6_reported.clone(),
    +1405            #[cfg(any(test, feature = "test-utils"))]
    +1406            insecure_skip_relay_cert_verify,
    +1407            metrics: metrics.magicsock.clone(),
    +1408        });
    +1409        let relay_transports = vec![relay_transport];
    +1410
    +1411        let secret_encryption_key = secret_ed_box(secret_key.secret());
    +1412        #[cfg(not(wasm_browser))]
    +1413        let ipv6 = ip_transports.iter().any(|t| t.bind_addr().is_ipv6());
     1414
    -1415        let actor_task = Arc::new(Mutex::new(Some(AbortOnDropHandle::new(actor_task))));
    -1416
    -1417        Ok(Handle {
    -1418            msock,
    -1419            actor_task,
    -1420            endpoint,
    -1421            actor_token,
    -1422        })
    -1423    }
    -1424
    -1425    /// The underlying [`quinn::Endpoint`]
    -1426    pub fn endpoint(&self) -> &quinn::Endpoint {
    -1427        &self.endpoint
    -1428    }
    -1429
    -1430    /// Closes the connection.
    -1431    ///
    -1432    /// Only the first close does anything. Any later closes return nil.
    -1433    /// Polling the socket ([`AsyncUdpSocket::poll_recv`]) will return [`Poll::Pending`]
    -1434    /// indefinitely after this call.
    -1435    #[instrument(skip_all)]
    -1436    pub(crate) async fn close(&self) {
    -1437        trace!(me = ?self.public_key, "magicsock closing...");
    -1438        // Initiate closing all connections, and refuse future connections.
    -1439        self.endpoint.close(0u16.into(), b"");
    -1440
    -1441        // In the history of this code, this call had been
    -1442        // - removed: https://github.com/n0-computer/iroh/pull/1753
    -1443        // - then added back in: https://github.com/n0-computer/iroh/pull/2227/files#diff-ba27e40e2986a3919b20f6b412ad4fe63154af648610ea5d9ed0b5d5b0e2d780R573
    -1444        // - then removed again: https://github.com/n0-computer/iroh/pull/3165
    -1445        // and finally added back in together with this comment.
    -1446        // So before removing this call, please consider carefully.
    -1447        // Among other things, this call tries its best to make sure that any queued close frames
    -1448        // (e.g. via the call to `endpoint.close(...)` above), are flushed out to the sockets
    -1449        // *and acknowledged* (or time out with the "probe timeout" of usually 3 seconds).
    -1450        // This allows the other endpoints for these connections to be notified to release
    -1451        // their resources, or - depending on the protocol - that all data was received.
    -1452        // With the current quinn API, this is the only way to ensure protocol code can use
    -1453        // connection close codes, and close the endpoint properly.
    -1454        // If this call is skipped, then connections that protocols close just shortly before the
    -1455        // call to `Endpoint::close` will in most cases cause connection time-outs on remote ends.
    -1456        self.endpoint.wait_idle().await;
    -1457
    -1458        if self.msock.is_closed() {
    -1459            return;
    -1460        }
    -1461        self.msock.closing.store(true, Ordering::Relaxed);
    -1462        self.actor_token.cancel();
    -1463
    -1464        if let Some(task) = self.actor_task.lock().await.take() {
    -1465            // give the tasks a moment to shutdown cleanly
    -1466            let shutdown_done = time::timeout(Duration::from_millis(100), async move {
    -1467                if let Err(err) = task.await {
    -1468                    warn!("unexpected error in task shutdown: {:?}", err);
    -1469                }
    -1470            })
    -1471            .await;
    -1472            match shutdown_done {
    -1473                Ok(_) => trace!("tasks finished in time, shutdown complete"),
    -1474                Err(time::Elapsed { .. }) => {
    -1475                    // Dropping the task will abort itt
    -1476                    warn!("tasks didn't finish in time, aborting");
    -1477                }
    -1478            }
    -1479        }
    -1480
    -1481        self.msock.closed.store(true, Ordering::SeqCst);
    -1482
    -1483        trace!("magicsock closed");
    -1484    }
    -1485}
    -1486
    -1487fn default_quic_client_config() -> rustls::ClientConfig {
    -1488    // create a client config for the endpoint to use for QUIC address discovery
    -1489    let root_store =
    -1490        rustls::RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
    -1491    rustls::client::ClientConfig::builder_with_provider(Arc::new(
    -1492        rustls::crypto::ring::default_provider(),
    -1493    ))
    -1494    .with_safe_default_protocol_versions()
    -1495    .expect("ring supports these")
    -1496    .with_root_certificates(root_store)
    -1497    .with_no_client_auth()
    -1498}
    -1499
    -1500#[derive(Debug)]
    -1501struct DiscoState {
    -1502    /// Encryption key for this node.
    -1503    secret_encryption_key: crypto_box::SecretKey,
    -1504    /// The state for an active DiscoKey.
    -1505    secrets: std::sync::Mutex<HashMap<PublicKey, SharedSecret>>,
    -1506    /// Disco (ping) queue
    -1507    sender: mpsc::Sender<(SendAddr, PublicKey, disco::Message)>,
    -1508}
    -1509
    -1510impl DiscoState {
    -1511    fn new(
    -1512        secret_encryption_key: crypto_box::SecretKey,
    -1513    ) -> (Self, mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>) {
    -1514        let (disco_sender, disco_receiver) = mpsc::channel(256);
    -1515
    -1516        (
    -1517            Self {
    -1518                secret_encryption_key,
    -1519                secrets: Default::default(),
    -1520                sender: disco_sender,
    -1521            },
    -1522            disco_receiver,
    -1523        )
    -1524    }
    -1525
    -1526    fn try_send(&self, dst: SendAddr, node_id: PublicKey, msg: disco::Message) -> bool {
    -1527        self.sender.try_send((dst, node_id, msg)).is_ok()
    -1528    }
    -1529
    -1530    fn encode_and_seal(
    -1531        &self,
    -1532        this_node_id: NodeId,
    -1533        other_node_id: NodeId,
    -1534        msg: &disco::Message,
    -1535    ) -> Bytes {
    -1536        let mut seal = msg.as_bytes();
    -1537        self.get_secret(other_node_id, |secret| secret.seal(&mut seal));
    -1538        disco::encode_message(&this_node_id, seal).into()
    -1539    }
    -1540
    -1541    fn unseal_and_decode(
    -1542        &self,
    -1543        node_id: PublicKey,
    -1544        sealed_box: &[u8],
    -1545    ) -> Result<disco::Message, DiscoBoxError> {
    -1546        let mut sealed_box = sealed_box.to_vec();
    -1547        self.get_secret(node_id, |secret| secret.open(&mut sealed_box))
    -1548            .context(OpenSnafu)?;
    -1549        disco::Message::from_bytes(&sealed_box).context(ParseSnafu)
    -1550    }
    -1551
    -1552    fn get_secret<F, T>(&self, node_id: PublicKey, cb: F) -> T
    -1553    where
    -1554        F: FnOnce(&mut SharedSecret) -> T,
    -1555    {
    -1556        let mut inner = self.secrets.lock().expect("poisoned");
    -1557        let x = inner.entry(node_id).or_insert_with(|| {
    -1558            let public_key = public_ed_box(&node_id.public());
    -1559            SharedSecret::new(&self.secret_encryption_key, &public_key)
    -1560        });
    -1561        cb(x)
    -1562    }
    -1563}
    -1564
    -1565#[allow(missing_docs)]
    -1566#[common_fields({
    -1567    backtrace: Option<snafu::Backtrace>,
    -1568    #[snafu(implicit)]
    -1569    span_trace: n0_snafu::SpanTrace,
    -1570})]
    -1571#[derive(Debug, Snafu)]
    -1572#[non_exhaustive]
    -1573enum DiscoBoxError {
    -1574    #[snafu(display("Failed to open crypto box"))]
    -1575    Open {
    -1576        #[snafu(source(from(DecryptionError, Box::new)))]
    -1577        source: Box<DecryptionError>,
    -1578    },
    -1579    #[snafu(display("Failed to parse disco message"))]
    -1580    Parse {
    -1581        #[snafu(source(from(disco::ParseError, Box::new)))]
    -1582        source: Box<disco::ParseError>,
    -1583    },
    -1584}
    -1585
    -1586#[derive(Debug)]
    -1587struct MagicUdpSocket {
    -1588    socket: Arc<MagicSock>,
    -1589    transports: Transports,
    -1590}
    -1591
    -1592impl AsyncUdpSocket for MagicUdpSocket {
    -1593    fn create_sender(&self) -> Pin<Box<dyn quinn::UdpSender>> {
    -1594        Box::pin(self.transports.create_sender(self.socket.clone()))
    -1595    }
    -1596
    -1597    /// NOTE: Receiving on a closed socket will return [`Poll::Pending`] indefinitely.
    -1598    fn poll_recv(
    -1599        &mut self,
    -1600        cx: &mut Context,
    -1601        bufs: &mut [io::IoSliceMut<'_>],
    -1602        metas: &mut [quinn_udp::RecvMeta],
    -1603    ) -> Poll<io::Result<usize>> {
    -1604        self.transports.poll_recv(cx, bufs, metas, &self.socket)
    -1605    }
    -1606
    -1607    #[cfg(not(wasm_browser))]
    -1608    fn local_addr(&self) -> io::Result<SocketAddr> {
    -1609        let addrs: Vec<_> = self
    -1610            .transports
    -1611            .local_addrs()
    -1612            .into_iter()
    -1613            .filter_map(|addr| {
    -1614                let addr: SocketAddr = addr.into_socket_addr()?;
    -1615                Some(addr)
    -1616            })
    -1617            .collect();
    +1415        #[cfg(not(wasm_browser))]
    +1416        let transports = Transports::new(ip_transports, relay_transports);
    +1417        #[cfg(wasm_browser)]
    +1418        let transports = Transports::new(relay_transports);
    +1419
    +1420        let (disco, disco_receiver) = DiscoState::new(secret_encryption_key);
    +1421
    +1422        let msock = Arc::new(MagicSock {
    +1423            public_key: secret_key.public(),
    +1424            closing: AtomicBool::new(false),
    +1425            closed: AtomicBool::new(false),
    +1426            disco,
    +1427            actor_sender: actor_sender.clone(),
    +1428            ipv6_reported,
    +1429            node_map,
    +1430            ip_mapped_addrs: ip_mapped_addrs.clone(),
    +1431            discovery,
    +1432            discovery_user_data: RwLock::new(discovery_user_data),
    +1433            direct_addrs: DiscoveredDirectAddrs::default(),
    +1434            net_report: Watchable::new((None, UpdateReason::None)),
    +1435            #[cfg(not(wasm_browser))]
    +1436            dns_resolver: dns_resolver.clone(),
    +1437            metrics: metrics.clone(),
    +1438            local_addrs_watch: transports.local_addrs_watch(),
    +1439            #[cfg(not(wasm_browser))]
    +1440            ip_bind_addrs: transports.ip_bind_addrs(),
    +1441        });
    +1442
    +1443        let mut endpoint_config = quinn::EndpointConfig::default();
    +1444        // Setting this to false means that quinn will ignore packets that have the QUIC fixed bit
    +1445        // set to 0. The fixed bit is the 3rd bit of the first byte of a packet.
    +1446        // For performance reasons and to not rewrite buffers we pass non-QUIC UDP packets straight
    +1447        // through to quinn. We set the first byte of the packet to zero, which makes quinn ignore
    +1448        // the packet if grease_quic_bit is set to false.
    +1449        endpoint_config.grease_quic_bit(false);
    +1450
    +1451        let sender = transports.create_sender(msock.clone());
    +1452        let local_addrs_watch = transports.local_addrs_watch();
    +1453        let network_change_sender = transports.create_network_change_sender();
    +1454
    +1455        let endpoint = quinn::Endpoint::new_with_abstract_socket(
    +1456            endpoint_config,
    +1457            Some(server_config),
    +1458            Box::new(MagicUdpSocket {
    +1459                socket: msock.clone(),
    +1460                transports,
    +1461            }),
    +1462            #[cfg(not(wasm_browser))]
    +1463            Arc::new(quinn::TokioRuntime),
    +1464            #[cfg(wasm_browser)]
    +1465            Arc::new(crate::web_runtime::WebRuntime),
    +1466        )
    +1467        .context(CreateQuinnEndpointSnafu)?;
    +1468
    +1469        let network_monitor = netmon::Monitor::new()
    +1470            .await
    +1471            .context(CreateNetmonMonitorSnafu)?;
    +1472
    +1473        let qad_endpoint = endpoint.clone();
    +1474
    +1475        #[cfg(any(test, feature = "test-utils"))]
    +1476        let client_config = if insecure_skip_relay_cert_verify {
    +1477            iroh_relay::client::make_dangerous_client_config()
    +1478        } else {
    +1479            default_quic_client_config()
    +1480        };
    +1481        #[cfg(not(any(test, feature = "test-utils")))]
    +1482        let client_config = default_quic_client_config();
    +1483
    +1484        let net_report_config = net_report::Options::default();
    +1485        #[cfg(not(wasm_browser))]
    +1486        let net_report_config = net_report_config.quic_config(Some(QuicConfig {
    +1487            ep: qad_endpoint,
    +1488            client_config,
    +1489            ipv4: true,
    +1490            ipv6,
    +1491        }));
    +1492
    +1493        #[cfg(any(test, feature = "test-utils"))]
    +1494        let net_report_config =
    +1495            net_report_config.insecure_skip_relay_cert_verify(insecure_skip_relay_cert_verify);
    +1496
    +1497        let net_reporter = net_report::Client::new(
    +1498            #[cfg(not(wasm_browser))]
    +1499            dns_resolver,
    +1500            #[cfg(not(wasm_browser))]
    +1501            Some(ip_mapped_addrs),
    +1502            relay_map.clone(),
    +1503            net_report_config,
    +1504            metrics.net_report.clone(),
    +1505        );
    +1506
    +1507        let (direct_addr_done_tx, direct_addr_done_rx) = mpsc::channel(8);
    +1508        let direct_addr_update_state = DirectAddrUpdateState::new(
    +1509            msock.clone(),
    +1510            #[cfg(not(wasm_browser))]
    +1511            port_mapper,
    +1512            Arc::new(AsyncMutex::new(net_reporter)),
    +1513            relay_map,
    +1514            direct_addr_done_tx,
    +1515        );
    +1516
    +1517        let netmon_watcher = network_monitor.interface_state();
    +1518
    +1519        #[cfg_attr(not(wasm_browser), allow(unused_mut))]
    +1520        let mut actor = Actor {
    +1521            msg_receiver: actor_receiver,
    +1522            msock: msock.clone(),
    +1523            periodic_re_stun_timer: new_re_stun_timer(false),
    +1524            network_monitor,
    +1525            netmon_watcher,
    +1526            direct_addr_update_state,
    +1527            network_change_sender,
    +1528            direct_addr_done_rx,
    +1529            pending_call_me_maybes: Default::default(),
    +1530            disco_receiver,
    +1531        };
    +1532        // Initialize addresses
    +1533        #[cfg(not(wasm_browser))]
    +1534        actor.update_direct_addresses(None);
    +1535
    +1536        let actor_token = CancellationToken::new();
    +1537        let token = actor_token.clone();
    +1538
    +1539        let actor_task = task::spawn(
    +1540            actor
    +1541                .run(token, local_addrs_watch, sender)
    +1542                .instrument(info_span!("actor")),
    +1543        );
    +1544
    +1545        let actor_task = Arc::new(Mutex::new(Some(AbortOnDropHandle::new(actor_task))));
    +1546
    +1547        Ok(Handle {
    +1548            msock,
    +1549            actor_task,
    +1550            endpoint,
    +1551            actor_token,
    +1552        })
    +1553    }
    +1554
    +1555    /// The underlying [`quinn::Endpoint`]
    +1556    pub fn endpoint(&self) -> &quinn::Endpoint {
    +1557        &self.endpoint
    +1558    }
    +1559
    +1560    /// Closes the connection.
    +1561    ///
    +1562    /// Only the first close does anything. Any later closes return nil.
    +1563    /// Polling the socket ([`AsyncUdpSocket::poll_recv`]) will return [`Poll::Pending`]
    +1564    /// indefinitely after this call.
    +1565    #[instrument(skip_all)]
    +1566    pub(crate) async fn close(&self) {
    +1567        trace!(me = ?self.public_key, "magicsock closing...");
    +1568        // Initiate closing all connections, and refuse future connections.
    +1569        self.endpoint.close(0u16.into(), b"");
    +1570
    +1571        // In the history of this code, this call had been
    +1572        // - removed: https://github.com/n0-computer/iroh/pull/1753
    +1573        // - then added back in: https://github.com/n0-computer/iroh/pull/2227/files#diff-ba27e40e2986a3919b20f6b412ad4fe63154af648610ea5d9ed0b5d5b0e2d780R573
    +1574        // - then removed again: https://github.com/n0-computer/iroh/pull/3165
    +1575        // and finally added back in together with this comment.
    +1576        // So before removing this call, please consider carefully.
    +1577        // Among other things, this call tries its best to make sure that any queued close frames
    +1578        // (e.g. via the call to `endpoint.close(...)` above), are flushed out to the sockets
    +1579        // *and acknowledged* (or time out with the "probe timeout" of usually 3 seconds).
    +1580        // This allows the other endpoints for these connections to be notified to release
    +1581        // their resources, or - depending on the protocol - that all data was received.
    +1582        // With the current quinn API, this is the only way to ensure protocol code can use
    +1583        // connection close codes, and close the endpoint properly.
    +1584        // If this call is skipped, then connections that protocols close just shortly before the
    +1585        // call to `Endpoint::close` will in most cases cause connection time-outs on remote ends.
    +1586        self.endpoint.wait_idle().await;
    +1587
    +1588        if self.msock.is_closed() {
    +1589            return;
    +1590        }
    +1591        self.msock.closing.store(true, Ordering::Relaxed);
    +1592        self.actor_token.cancel();
    +1593
    +1594        // MutexGuard is not held across await points
    +1595        let task = self.actor_task.lock().expect("poisoned").take();
    +1596        if let Some(task) = task {
    +1597            // give the tasks a moment to shutdown cleanly
    +1598            let shutdown_done = time::timeout(Duration::from_millis(100), async move {
    +1599                if let Err(err) = task.await {
    +1600                    warn!("unexpected error in task shutdown: {:?}", err);
    +1601                }
    +1602            })
    +1603            .await;
    +1604            match shutdown_done {
    +1605                Ok(_) => trace!("tasks finished in time, shutdown complete"),
    +1606                Err(time::Elapsed { .. }) => {
    +1607                    // Dropping the task will abort itt
    +1608                    warn!("tasks didn't finish in time, aborting");
    +1609                }
    +1610            }
    +1611        }
    +1612
    +1613        self.msock.closed.store(true, Ordering::SeqCst);
    +1614
    +1615        trace!("magicsock closed");
    +1616    }
    +1617}
     1618
    -1619        if let Some(addr) = addrs.iter().find(|addr| addr.is_ipv6()) {
    -1620            return Ok(*addr);
    -1621        }
    -1622        if let Some(SocketAddr::V4(addr)) = addrs.first() {
    -1623            // Pretend to be IPv6, because our `MappedAddr`s need to be IPv6.
    -1624            let ip = addr.ip().to_ipv6_mapped().into();
    -1625            return Ok(SocketAddr::new(ip, addr.port()));
    -1626        }
    -1627
    -1628        Err(io::Error::other("no valid address available"))
    -1629    }
    -1630
    -1631    #[cfg(wasm_browser)]
    -1632    fn local_addr(&self) -> io::Result<SocketAddr> {
    -1633        // Again, we need to pretend we're IPv6, because of our `MappedAddr`s.
    -1634        Ok(SocketAddr::new(std::net::Ipv6Addr::LOCALHOST.into(), 0))
    -1635    }
    -1636
    -1637    fn max_receive_segments(&self) -> usize {
    -1638        self.transports.max_receive_segments()
    -1639    }
    -1640
    -1641    fn may_fragment(&self) -> bool {
    -1642        self.transports.may_fragment()
    -1643    }
    -1644}
    -1645
    -1646#[derive(Debug)]
    -1647enum ActorMessage {
    -1648    PingActions(Vec<PingAction>),
    -1649    EndpointPingExpired(usize, stun_rs::TransactionId),
    -1650    NetworkChange,
    -1651    ScheduleDirectAddrUpdate(UpdateReason, Option<(NodeId, RelayUrl)>),
    -1652    #[cfg(test)]
    -1653    ForceNetworkChange(bool),
    -1654}
    -1655
    -1656struct Actor {
    -1657    msock: Arc<MagicSock>,
    -1658    msg_receiver: mpsc::Receiver<ActorMessage>,
    -1659    /// When set, is an AfterFunc timer that will call MagicSock::do_periodic_stun.
    -1660    periodic_re_stun_timer: time::Interval,
    +1619fn default_quic_client_config() -> rustls::ClientConfig {
    +1620    // create a client config for the endpoint to use for QUIC address discovery
    +1621    let root_store =
    +1622        rustls::RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
    +1623    rustls::client::ClientConfig::builder_with_provider(Arc::new(
    +1624        rustls::crypto::ring::default_provider(),
    +1625    ))
    +1626    .with_safe_default_protocol_versions()
    +1627    .expect("ring supports these")
    +1628    .with_root_certificates(root_store)
    +1629    .with_no_client_auth()
    +1630}
    +1631
    +1632#[derive(Debug)]
    +1633struct DiscoState {
    +1634    /// Encryption key for this node.
    +1635    secret_encryption_key: crypto_box::SecretKey,
    +1636    /// The state for an active DiscoKey.
    +1637    secrets: Mutex<HashMap<PublicKey, SharedSecret>>,
    +1638    /// Disco (ping) queue
    +1639    sender: mpsc::Sender<(SendAddr, PublicKey, disco::Message)>,
    +1640}
    +1641
    +1642impl DiscoState {
    +1643    fn new(
    +1644        secret_encryption_key: crypto_box::SecretKey,
    +1645    ) -> (Self, mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>) {
    +1646        let (disco_sender, disco_receiver) = mpsc::channel(256);
    +1647
    +1648        (
    +1649            Self {
    +1650                secret_encryption_key,
    +1651                secrets: Default::default(),
    +1652                sender: disco_sender,
    +1653            },
    +1654            disco_receiver,
    +1655        )
    +1656    }
    +1657
    +1658    fn try_send(&self, dst: SendAddr, node_id: PublicKey, msg: disco::Message) -> bool {
    +1659        self.sender.try_send((dst, node_id, msg)).is_ok()
    +1660    }
     1661
    -1662    network_monitor: netmon::Monitor,
    -1663    netmon_watcher: n0_watcher::Direct<netmon::State>,
    -1664    network_change_sender: transports::NetworkChangeSender,
    -1665    /// Indicates the direct addr update state.
    -1666    direct_addr_update_state: DirectAddrUpdateState,
    -1667    direct_addr_done_rx: mpsc::Receiver<()>,
    -1668
    -1669    /// List of CallMeMaybe disco messages that should be sent out after
    -1670    /// the next endpoint update completes
    -1671    pending_call_me_maybes: HashMap<PublicKey, RelayUrl>,
    -1672    disco_receiver: mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>,
    -1673}
    -1674
    -1675#[cfg(not(wasm_browser))]
    -1676fn bind_ip(
    -1677    addr_v4: SocketAddrV4,
    -1678    addr_v6: Option<SocketAddrV6>,
    -1679    metrics: &EndpointMetrics,
    -1680) -> io::Result<(Vec<IpTransport>, portmapper::Client)> {
    -1681    let port_mapper =
    -1682        portmapper::Client::with_metrics(Default::default(), metrics.portmapper.clone());
    +1662    fn encode_and_seal(
    +1663        &self,
    +1664        this_node_id: NodeId,
    +1665        other_node_id: NodeId,
    +1666        msg: &disco::Message,
    +1667    ) -> Bytes {
    +1668        let mut seal = msg.as_bytes();
    +1669        self.get_secret(other_node_id, |secret| secret.seal(&mut seal));
    +1670        disco::encode_message(&this_node_id, seal).into()
    +1671    }
    +1672
    +1673    fn unseal_and_decode(
    +1674        &self,
    +1675        node_id: PublicKey,
    +1676        sealed_box: &[u8],
    +1677    ) -> Result<disco::Message, DiscoBoxError> {
    +1678        let mut sealed_box = sealed_box.to_vec();
    +1679        self.get_secret(node_id, |secret| secret.open(&mut sealed_box))
    +1680            .context(OpenSnafu)?;
    +1681        disco::Message::from_bytes(&sealed_box).context(ParseSnafu)
    +1682    }
     1683
    -1684    let v4 = Arc::new(bind_with_fallback(SocketAddr::V4(addr_v4))?);
    -1685    let ip4_port = v4.local_addr()?.port();
    -1686    let ip6_port = ip4_port.checked_add(1).unwrap_or(ip4_port - 1);
    -1687
    -1688    let addr_v6 =
    -1689        addr_v6.unwrap_or_else(|| SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, ip6_port, 0, 0));
    -1690
    -1691    let v6 = match bind_with_fallback(SocketAddr::V6(addr_v6)) {
    -1692        Ok(sock) => Some(Arc::new(sock)),
    -1693        Err(err) => {
    -1694            info!("bind ignoring IPv6 bind failure: {:?}", err);
    -1695            None
    -1696        }
    -1697    };
    -1698
    -1699    let port = v4.local_addr().map_or(0, |p| p.port());
    -1700
    -1701    let mut ip = vec![IpTransport::new(
    -1702        addr_v4.into(),
    -1703        v4,
    -1704        metrics.magicsock.clone(),
    -1705    )];
    -1706    if let Some(v6) = v6 {
    -1707        ip.push(IpTransport::new(
    -1708            addr_v6.into(),
    -1709            v6,
    -1710            metrics.magicsock.clone(),
    -1711        ))
    -1712    }
    -1713
    -1714    // NOTE: we can end up with a zero port if `netwatch::UdpSocket::socket_addr` fails
    -1715    match port.try_into() {
    -1716        Ok(non_zero_port) => {
    -1717            port_mapper.update_local_port(non_zero_port);
    -1718        }
    -1719        Err(_zero_port) => debug!("Skipping port mapping with zero local port"),
    -1720    }
    -1721
    -1722    Ok((ip, port_mapper))
    -1723}
    -1724
    -1725impl Actor {
    -1726    async fn run(
    -1727        mut self,
    -1728        shutdown_token: CancellationToken,
    -1729        mut watcher: impl Watcher<Value = Vec<transports::Addr>> + Send + Sync,
    -1730        sender: UdpSender,
    -1731    ) {
    -1732        // Initialize addresses
    -1733        #[cfg(not(wasm_browser))]
    -1734        self.update_direct_addresses(None);
    -1735
    -1736        // Setup network monitoring
    -1737        let mut current_netmon_state = self.netmon_watcher.get().expect("missing network state");
    +1684    fn get_secret<F, T>(&self, node_id: PublicKey, cb: F) -> T
    +1685    where
    +1686        F: FnOnce(&mut SharedSecret) -> T,
    +1687    {
    +1688        let mut inner = self.secrets.lock().expect("poisoned");
    +1689        let x = inner.entry(node_id).or_insert_with(|| {
    +1690            let public_key = public_ed_box(&node_id.public());
    +1691            SharedSecret::new(&self.secret_encryption_key, &public_key)
    +1692        });
    +1693        cb(x)
    +1694    }
    +1695}
    +1696
    +1697#[allow(missing_docs)]
    +1698#[common_fields({
    +1699    backtrace: Option<snafu::Backtrace>,
    +1700    #[snafu(implicit)]
    +1701    span_trace: n0_snafu::SpanTrace,
    +1702})]
    +1703#[derive(Debug, Snafu)]
    +1704#[non_exhaustive]
    +1705enum DiscoBoxError {
    +1706    #[snafu(display("Failed to open crypto box"))]
    +1707    Open {
    +1708        #[snafu(source(from(DecryptionError, Box::new)))]
    +1709        source: Box<DecryptionError>,
    +1710    },
    +1711    #[snafu(display("Failed to parse disco message"))]
    +1712    Parse {
    +1713        #[snafu(source(from(disco::ParseError, Box::new)))]
    +1714        source: Box<disco::ParseError>,
    +1715    },
    +1716}
    +1717
    +1718#[derive(Debug)]
    +1719struct MagicUdpSocket {
    +1720    socket: Arc<MagicSock>,
    +1721    transports: Transports,
    +1722}
    +1723
    +1724impl AsyncUdpSocket for MagicUdpSocket {
    +1725    fn create_sender(&self) -> Pin<Box<dyn quinn::UdpSender>> {
    +1726        Box::pin(self.transports.create_sender(self.socket.clone()))
    +1727    }
    +1728
    +1729    /// NOTE: Receiving on a closed socket will return [`Poll::Pending`] indefinitely.
    +1730    fn poll_recv(
    +1731        &mut self,
    +1732        cx: &mut Context,
    +1733        bufs: &mut [io::IoSliceMut<'_>],
    +1734        metas: &mut [quinn_udp::RecvMeta],
    +1735    ) -> Poll<io::Result<usize>> {
    +1736        self.transports.poll_recv(cx, bufs, metas, &self.socket)
    +1737    }
     1738
    -1739        #[cfg(not(wasm_browser))]
    -1740        let mut direct_addr_heartbeat_timer = time::interval(HEARTBEAT_INTERVAL);
    -1741
    -1742        #[cfg(not(wasm_browser))]
    -1743        let mut portmap_watcher = self
    -1744            .direct_addr_update_state
    -1745            .port_mapper
    -1746            .watch_external_address();
    -1747
    -1748        let mut discovery_events: BoxStream<DiscoveryItem> = Box::pin(n0_future::stream::empty());
    -1749        if let Some(d) = self.msock.discovery() {
    -1750            if let Some(events) = d.subscribe() {
    -1751                discovery_events = events;
    -1752            }
    +1739    #[cfg(not(wasm_browser))]
    +1740    fn local_addr(&self) -> io::Result<SocketAddr> {
    +1741        let addrs: Vec<_> = self
    +1742            .transports
    +1743            .local_addrs()
    +1744            .into_iter()
    +1745            .filter_map(|addr| {
    +1746                let addr: SocketAddr = addr.into_socket_addr()?;
    +1747                Some(addr)
    +1748            })
    +1749            .collect();
    +1750
    +1751        if let Some(addr) = addrs.iter().find(|addr| addr.is_ipv6()) {
    +1752            return Ok(*addr);
     1753        }
    -1754
    -1755        let mut receiver_closed = false;
    -1756        #[cfg_attr(wasm_browser, allow(unused_mut))]
    -1757        let mut portmap_watcher_closed = false;
    -1758
    -1759        let mut net_report_watcher = self.msock.net_report.watch();
    -1760
    -1761        loop {
    -1762            self.msock.metrics.magicsock.actor_tick_main.inc();
    -1763            #[cfg(not(wasm_browser))]
    -1764            let portmap_watcher_changed = portmap_watcher.changed();
    -1765            #[cfg(wasm_browser)]
    -1766            let portmap_watcher_changed = n0_future::future::pending();
    -1767
    -1768            #[cfg(not(wasm_browser))]
    -1769            let direct_addr_heartbeat_timer_tick = direct_addr_heartbeat_timer.tick();
    -1770            #[cfg(wasm_browser)]
    -1771            let direct_addr_heartbeat_timer_tick = n0_future::future::pending();
    +1754        if let Some(SocketAddr::V4(addr)) = addrs.first() {
    +1755            // Pretend to be IPv6, because our `MappedAddr`s need to be IPv6.
    +1756            let ip = addr.ip().to_ipv6_mapped().into();
    +1757            return Ok(SocketAddr::new(ip, addr.port()));
    +1758        }
    +1759
    +1760        Err(io::Error::other("no valid address available"))
    +1761    }
    +1762
    +1763    #[cfg(wasm_browser)]
    +1764    fn local_addr(&self) -> io::Result<SocketAddr> {
    +1765        // Again, we need to pretend we're IPv6, because of our `MappedAddr`s.
    +1766        Ok(SocketAddr::new(std::net::Ipv6Addr::LOCALHOST.into(), 0))
    +1767    }
    +1768
    +1769    fn max_receive_segments(&self) -> usize {
    +1770        self.transports.max_receive_segments()
    +1771    }
     1772
    -1773            tokio::select! {
    -1774                _ = shutdown_token.cancelled() => {
    -1775                    debug!("shutting down");
    -1776                    return;
    -1777                }
    -1778                msg = self.msg_receiver.recv(), if !receiver_closed => {
    -1779                    let Some(msg) = msg else {
    -1780                        trace!("tick: magicsock receiver closed");
    -1781                        self.msock.metrics.magicsock.actor_tick_other.inc();
    -1782
    -1783                        receiver_closed = true;
    -1784                        continue;
    -1785                    };
    +1773    fn may_fragment(&self) -> bool {
    +1774        self.transports.may_fragment()
    +1775    }
    +1776}
    +1777
    +1778#[derive(Debug)]
    +1779enum ActorMessage {
    +1780    EndpointPingExpired(usize, stun_rs::TransactionId),
    +1781    NetworkChange,
    +1782    ScheduleDirectAddrUpdate(UpdateReason, Option<(NodeId, RelayUrl)>),
    +1783    #[cfg(test)]
    +1784    ForceNetworkChange(bool),
    +1785}
     1786
    -1787                    trace!(?msg, "tick: msg");
    -1788                    self.msock.metrics.magicsock.actor_tick_msg.inc();
    -1789                    self.handle_actor_message(msg, &sender).await;
    -1790                }
    -1791                tick = self.periodic_re_stun_timer.tick() => {
    -1792                    trace!("tick: re_stun {:?}", tick);
    -1793                    self.msock.metrics.magicsock.actor_tick_re_stun.inc();
    -1794                    self.re_stun(UpdateReason::Periodic);
    -1795                }
    -1796                new_addr = watcher.updated() => {
    -1797                    match new_addr {
    -1798                        Ok(addrs) => {
    -1799                            if !addrs.is_empty() {
    -1800                                trace!(?addrs, "local addrs");
    -1801                                self.msock.publish_my_addr();
    -1802                            }
    -1803                        }
    -1804                        Err(_) => {
    -1805                            warn!("local addr watcher stopped");
    -1806                        }
    -1807                    }
    -1808                }
    -1809                report = net_report_watcher.updated() => {
    -1810                    match report {
    -1811                        Ok((report, _)) => {
    -1812                            self.handle_net_report_report(report);
    -1813                            #[cfg(not(wasm_browser))]
    -1814                            {
    -1815                                self.periodic_re_stun_timer = new_re_stun_timer(true);
    -1816                            }
    -1817                        }
    -1818                        Err(_) => {
    -1819                            warn!("net report watcher stopped");
    -1820                        }
    -1821                    }
    -1822                }
    -1823                reason = self.direct_addr_done_rx.recv() => {
    -1824                    match reason {
    -1825                        Some(()) => {
    -1826                            // check if a new run needs to be scheduled
    -1827                            let state = self.netmon_watcher.get().expect("disconnected");
    -1828                            self.direct_addr_update_state.try_run(state.into());
    -1829                        }
    -1830                        None => {
    -1831                            warn!("direct addr watcher died");
    -1832                        }
    -1833                    }
    -1834                }
    -1835                change = portmap_watcher_changed, if !portmap_watcher_closed => {
    -1836                    #[cfg(not(wasm_browser))]
    -1837                    {
    -1838                        if change.is_err() {
    -1839                            trace!("tick: portmap watcher closed");
    -1840                            self.msock.metrics.magicsock.actor_tick_other.inc();
    -1841
    -1842                            portmap_watcher_closed = true;
    -1843                            continue;
    -1844                        }
    -1845
    -1846                        trace!("tick: portmap changed");
    -1847                        self.msock.metrics.magicsock.actor_tick_portmap_changed.inc();
    -1848                        let new_external_address = *portmap_watcher.borrow();
    -1849                        debug!("external address updated: {new_external_address:?}");
    -1850                        self.re_stun(UpdateReason::PortmapUpdated);
    -1851                    }
    -1852                    #[cfg(wasm_browser)]
    -1853                    let _unused_in_browsers = change;
    -1854                },
    -1855                _ = direct_addr_heartbeat_timer_tick => {
    -1856                    #[cfg(not(wasm_browser))]
    -1857                    {
    -1858                        trace!(
    -1859                            "tick: direct addr heartbeat {} direct addrs",
    -1860                            self.msock.node_map.node_count(),
    -1861                        );
    -1862                        self.msock.metrics.magicsock.actor_tick_direct_addr_heartbeat.inc();
    -1863                        // TODO: this might trigger too many packets at once, pace this
    -1864
    -1865                        self.msock.node_map.prune_inactive();
    -1866                        let msgs = self.msock.node_map.nodes_stayin_alive();
    -1867                        self.handle_ping_actions(&sender, msgs).await;
    -1868                    }
    -1869                }
    -1870                state = self.netmon_watcher.updated() => {
    -1871                    let Ok(state) = state else {
    -1872                        trace!("tick: link change receiver closed");
    -1873                        self.msock.metrics.magicsock.actor_tick_other.inc();
    -1874                        continue;
    -1875                    };
    -1876                    let is_major = state.is_major_change(&current_netmon_state);
    -1877                    current_netmon_state = state;
    -1878                    trace!("tick: link change {}", is_major);
    -1879                    self.msock.metrics.magicsock.actor_link_change.inc();
    -1880                    self.handle_network_change(is_major).await;
    -1881                }
    -1882                // Even if `discovery_events` yields `None`, it could begin to yield
    -1883                // `Some` again in the future, so we don't want to disable this branch
    -1884                // forever like we do with the other branches that yield `Option`s
    -1885                Some(discovery_item) = discovery_events.next() => {
    -1886                    trace!("tick: discovery event, address discovered: {discovery_item:?}");
    -1887                    let provenance = discovery_item.provenance();
    -1888                    let node_addr = discovery_item.to_node_addr();
    -1889                    if let Err(e) = self.msock.add_node_addr(
    -1890                        node_addr,
    -1891                        Source::Discovery {
    -1892                            name: provenance.to_string()
    -1893                        }) {
    -1894                        let node_addr = discovery_item.to_node_addr();
    -1895                        warn!(?node_addr, "unable to add discovered node address to the node map: {e:?}");
    -1896                    }
    -1897                    // Send the discovery item to the subscribers of the discovery broadcast stream.
    -1898                    self.msock.discovery_subscribers.send(discovery_item);
    -1899                }
    -1900                Some((dst, dst_key, msg)) = self.disco_receiver.recv() => {
    -1901                    if let Err(err) = self.msock.send_disco_message(&sender, dst.clone(), dst_key, msg).await {
    -1902                        warn!(%dst, node = %dst_key.fmt_short(), ?err, "failed to send disco message (UDP)");
    -1903                    }
    -1904                }
    -1905            }
    -1906        }
    -1907    }
    -1908
    -1909    async fn handle_network_change(&mut self, is_major: bool) {
    -1910        debug!("link change detected: major? {}", is_major);
    -1911
    -1912        if is_major {
    -1913            if let Err(err) = self.network_change_sender.rebind() {
    -1914                warn!("failed to rebind transports: {:?}", err);
    -1915            }
    -1916
    -1917            #[cfg(not(wasm_browser))]
    -1918            self.msock.dns_resolver.reset().await;
    -1919            self.re_stun(UpdateReason::LinkChangeMajor);
    -1920            self.reset_endpoint_states();
    -1921        } else {
    -1922            self.re_stun(UpdateReason::LinkChangeMinor);
    -1923        }
    -1924    }
    -1925
    -1926    fn re_stun(&mut self, why: UpdateReason) {
    -1927        let state = self.netmon_watcher.get().expect("disconnected");
    -1928        self.direct_addr_update_state
    -1929            .schedule_run(why, state.into());
    -1930    }
    -1931
    -1932    #[instrument(skip_all)]
    -1933    async fn handle_ping_actions(&mut self, sender: &UdpSender, msgs: Vec<PingAction>) {
    -1934        if let Err(err) = self.msock.send_ping_actions(sender, msgs).await {
    -1935            warn!("Failed to send ping actions: {err:#}");
    -1936        }
    -1937    }
    -1938
    -1939    /// Processes an incoming actor message.
    -1940    ///
    -1941    /// Returns `true` if it was a shutdown.
    -1942    async fn handle_actor_message(&mut self, msg: ActorMessage, sender: &UdpSender) {
    -1943        match msg {
    -1944            ActorMessage::EndpointPingExpired(id, txid) => {
    -1945                self.msock.node_map.notify_ping_timeout(id, txid);
    -1946            }
    -1947            ActorMessage::NetworkChange => {
    -1948                self.network_monitor.network_change().await.ok();
    -1949            }
    -1950            ActorMessage::ScheduleDirectAddrUpdate(why, data) => {
    -1951                if let Some((node, url)) = data {
    -1952                    self.pending_call_me_maybes.insert(node, url);
    -1953                }
    -1954                let state = self.netmon_watcher.get().expect("disconnected");
    -1955                self.direct_addr_update_state
    -1956                    .schedule_run(why, state.into());
    -1957            }
    -1958            #[cfg(test)]
    -1959            ActorMessage::ForceNetworkChange(is_major) => {
    -1960                self.handle_network_change(is_major).await;
    -1961            }
    -1962            ActorMessage::PingActions(ping_actions) => {
    -1963                self.handle_ping_actions(sender, ping_actions).await;
    -1964            }
    -1965        }
    -1966    }
    -1967
    -1968    /// Updates the direct addresses of this magic socket.
    -1969    ///
    -1970    /// Updates the [`DiscoveredDirectAddrs`] of this [`MagicSock`] with the current set of
    -1971    /// direct addresses from:
    -1972    ///
    -1973    /// - The portmapper.
    -1974    /// - A net_report report.
    -1975    /// - The local interfaces IP addresses.
    -1976    #[cfg(not(wasm_browser))]
    -1977    fn update_direct_addresses(&mut self, net_report_report: Option<&net_report::Report>) {
    -1978        let portmap_watcher = self
    -1979            .direct_addr_update_state
    -1980            .port_mapper
    -1981            .watch_external_address();
    -1982
    -1983        // We only want to have one DirectAddr for each SocketAddr we have.  So we store
    -1984        // this as a map of SocketAddr -> DirectAddrType.  At the end we will construct a
    -1985        // DirectAddr from each entry.
    -1986        let mut addrs: BTreeMap<SocketAddr, DirectAddrType> = BTreeMap::new();
    +1787struct Actor {
    +1788    msock: Arc<MagicSock>,
    +1789    msg_receiver: mpsc::Receiver<ActorMessage>,
    +1790    /// When set, is an AfterFunc timer that will call MagicSock::do_periodic_stun.
    +1791    periodic_re_stun_timer: time::Interval,
    +1792
    +1793    network_monitor: netmon::Monitor,
    +1794    netmon_watcher: n0_watcher::Direct<netmon::State>,
    +1795    network_change_sender: transports::NetworkChangeSender,
    +1796    /// Indicates the direct addr update state.
    +1797    direct_addr_update_state: DirectAddrUpdateState,
    +1798    direct_addr_done_rx: mpsc::Receiver<()>,
    +1799
    +1800    /// List of CallMeMaybe disco messages that should be sent out after
    +1801    /// the next endpoint update completes
    +1802    pending_call_me_maybes: HashMap<PublicKey, RelayUrl>,
    +1803    disco_receiver: mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>,
    +1804}
    +1805
    +1806#[cfg(not(wasm_browser))]
    +1807fn bind_ip(
    +1808    addr_v4: SocketAddrV4,
    +1809    addr_v6: Option<SocketAddrV6>,
    +1810    metrics: &EndpointMetrics,
    +1811) -> io::Result<(Vec<IpTransport>, portmapper::Client)> {
    +1812    let port_mapper =
    +1813        portmapper::Client::with_metrics(Default::default(), metrics.portmapper.clone());
    +1814
    +1815    let v4 = Arc::new(bind_with_fallback(SocketAddr::V4(addr_v4))?);
    +1816    let ip4_port = v4.local_addr()?.port();
    +1817    let ip6_port = ip4_port.checked_add(1).unwrap_or(ip4_port - 1);
    +1818
    +1819    let addr_v6 =
    +1820        addr_v6.unwrap_or_else(|| SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, ip6_port, 0, 0));
    +1821
    +1822    let v6 = match bind_with_fallback(SocketAddr::V6(addr_v6)) {
    +1823        Ok(sock) => Some(Arc::new(sock)),
    +1824        Err(err) => {
    +1825            info!("bind ignoring IPv6 bind failure: {:?}", err);
    +1826            None
    +1827        }
    +1828    };
    +1829
    +1830    let port = v4.local_addr().map_or(0, |p| p.port());
    +1831
    +1832    let mut ip = vec![IpTransport::new(
    +1833        addr_v4.into(),
    +1834        v4,
    +1835        metrics.magicsock.clone(),
    +1836    )];
    +1837    if let Some(v6) = v6 {
    +1838        ip.push(IpTransport::new(
    +1839            addr_v6.into(),
    +1840            v6,
    +1841            metrics.magicsock.clone(),
    +1842        ))
    +1843    }
    +1844
    +1845    // NOTE: we can end up with a zero port if `netwatch::UdpSocket::socket_addr` fails
    +1846    match port.try_into() {
    +1847        Ok(non_zero_port) => {
    +1848            port_mapper.update_local_port(non_zero_port);
    +1849        }
    +1850        Err(_zero_port) => debug!("Skipping port mapping with zero local port"),
    +1851    }
    +1852
    +1853    Ok((ip, port_mapper))
    +1854}
    +1855
    +1856impl Actor {
    +1857    async fn run(
    +1858        mut self,
    +1859        shutdown_token: CancellationToken,
    +1860        mut watcher: impl Watcher<Value = Vec<transports::Addr>> + Send + Sync,
    +1861        sender: UdpSender,
    +1862    ) {
    +1863        // Setup network monitoring
    +1864        let mut current_netmon_state = self.netmon_watcher.get();
    +1865
    +1866        #[cfg(not(wasm_browser))]
    +1867        let mut direct_addr_heartbeat_timer = time::interval(HEARTBEAT_INTERVAL);
    +1868
    +1869        #[cfg(not(wasm_browser))]
    +1870        let mut portmap_watcher = self
    +1871            .direct_addr_update_state
    +1872            .port_mapper
    +1873            .watch_external_address();
    +1874
    +1875        let mut receiver_closed = false;
    +1876        #[cfg_attr(wasm_browser, allow(unused_mut))]
    +1877        let mut portmap_watcher_closed = false;
    +1878
    +1879        let mut net_report_watcher = self.msock.net_report.watch();
    +1880
    +1881        // ensure we are doing an initial publish of our addresses
    +1882        self.msock.publish_my_addr();
    +1883
    +1884        loop {
    +1885            self.msock.metrics.magicsock.actor_tick_main.inc();
    +1886            #[cfg(not(wasm_browser))]
    +1887            let portmap_watcher_changed = portmap_watcher.changed();
    +1888            #[cfg(wasm_browser)]
    +1889            let portmap_watcher_changed = n0_future::future::pending();
    +1890
    +1891            #[cfg(not(wasm_browser))]
    +1892            let direct_addr_heartbeat_timer_tick = direct_addr_heartbeat_timer.tick();
    +1893            #[cfg(wasm_browser)]
    +1894            let direct_addr_heartbeat_timer_tick = n0_future::future::pending();
    +1895
    +1896            tokio::select! {
    +1897                _ = shutdown_token.cancelled() => {
    +1898                    debug!("shutting down");
    +1899                    return;
    +1900                }
    +1901                msg = self.msg_receiver.recv(), if !receiver_closed => {
    +1902                    let Some(msg) = msg else {
    +1903                        trace!("tick: magicsock receiver closed");
    +1904                        self.msock.metrics.magicsock.actor_tick_other.inc();
    +1905
    +1906                        receiver_closed = true;
    +1907                        continue;
    +1908                    };
    +1909
    +1910                    trace!(?msg, "tick: msg");
    +1911                    self.msock.metrics.magicsock.actor_tick_msg.inc();
    +1912                    self.handle_actor_message(msg).await;
    +1913                }
    +1914                tick = self.periodic_re_stun_timer.tick() => {
    +1915                    trace!("tick: re_stun {:?}", tick);
    +1916                    self.msock.metrics.magicsock.actor_tick_re_stun.inc();
    +1917                    self.re_stun(UpdateReason::Periodic);
    +1918                }
    +1919                new_addr = watcher.updated() => {
    +1920                    match new_addr {
    +1921                        Ok(addrs) => {
    +1922                            if !addrs.is_empty() {
    +1923                                trace!(?addrs, "local addrs");
    +1924                                self.msock.publish_my_addr();
    +1925                            }
    +1926                        }
    +1927                        Err(_) => {
    +1928                            warn!("local addr watcher stopped");
    +1929                        }
    +1930                    }
    +1931                }
    +1932                report = net_report_watcher.updated() => {
    +1933                    match report {
    +1934                        Ok((report, _)) => {
    +1935                            self.handle_net_report_report(report);
    +1936                            #[cfg(not(wasm_browser))]
    +1937                            {
    +1938                                self.periodic_re_stun_timer = new_re_stun_timer(true);
    +1939                            }
    +1940                        }
    +1941                        Err(_) => {
    +1942                            warn!("net report watcher stopped");
    +1943                        }
    +1944                    }
    +1945                }
    +1946                reason = self.direct_addr_done_rx.recv() => {
    +1947                    match reason {
    +1948                        Some(()) => {
    +1949                            // check if a new run needs to be scheduled
    +1950                            let state = self.netmon_watcher.get();
    +1951                            self.direct_addr_update_state.try_run(state.into());
    +1952                        }
    +1953                        None => {
    +1954                            warn!("direct addr watcher died");
    +1955                        }
    +1956                    }
    +1957                }
    +1958                change = portmap_watcher_changed, if !portmap_watcher_closed => {
    +1959                    #[cfg(not(wasm_browser))]
    +1960                    {
    +1961                        if change.is_err() {
    +1962                            trace!("tick: portmap watcher closed");
    +1963                            self.msock.metrics.magicsock.actor_tick_other.inc();
    +1964
    +1965                            portmap_watcher_closed = true;
    +1966                            continue;
    +1967                        }
    +1968
    +1969                        trace!("tick: portmap changed");
    +1970                        self.msock.metrics.magicsock.actor_tick_portmap_changed.inc();
    +1971                        let new_external_address = *portmap_watcher.borrow();
    +1972                        debug!("external address updated: {new_external_address:?}");
    +1973                        self.re_stun(UpdateReason::PortmapUpdated);
    +1974                    }
    +1975                    #[cfg(wasm_browser)]
    +1976                    let _unused_in_browsers = change;
    +1977                },
    +1978                _ = direct_addr_heartbeat_timer_tick => {
    +1979                    #[cfg(not(wasm_browser))]
    +1980                    {
    +1981                        trace!(
    +1982                            "tick: direct addr heartbeat {} direct addrs",
    +1983                            self.msock.node_map.node_count(),
    +1984                        );
    +1985                        self.msock.metrics.magicsock.actor_tick_direct_addr_heartbeat.inc();
    +1986                        // TODO: this might trigger too many packets at once, pace this
     1987
    -1988        // First add PortMapper provided addresses.
    -1989        let maybe_port_mapped = *portmap_watcher.borrow();
    -1990        if let Some(portmap_ext) = maybe_port_mapped.map(SocketAddr::V4) {
    -1991            addrs
    -1992                .entry(portmap_ext)
    -1993                .or_insert(DirectAddrType::Portmapped);
    -1994        }
    -1995
    -1996        // Next add STUN addresses from the net_report report.
    -1997        if let Some(net_report_report) = net_report_report {
    -1998            if let Some(global_v4) = net_report_report.global_v4 {
    -1999                addrs.entry(global_v4.into()).or_insert(DirectAddrType::Qad);
    -2000
    -2001                // If they're behind a hard NAT and are using a fixed
    -2002                // port locally, assume they might've added a static
    -2003                // port mapping on their router to the same explicit
    -2004                // port that we are running with. Worst case it's an invalid candidate mapping.
    -2005                let port = self.msock.ip_bind_addrs().iter().find_map(|addr| {
    -2006                    if addr.port() != 0 {
    -2007                        Some(addr.port())
    -2008                    } else {
    -2009                        None
    -2010                    }
    -2011                });
    -2012
    -2013                if let Some(port) = port {
    -2014                    if net_report_report
    -2015                        .mapping_varies_by_dest()
    -2016                        .unwrap_or_default()
    -2017                    {
    -2018                        let mut addr = global_v4;
    -2019                        addr.set_port(port);
    -2020                        addrs
    -2021                            .entry(addr.into())
    -2022                            .or_insert(DirectAddrType::Qad4LocalPort);
    -2023                    }
    -2024                }
    -2025            }
    -2026            if let Some(global_v6) = net_report_report.global_v6 {
    -2027                addrs.entry(global_v6.into()).or_insert(DirectAddrType::Qad);
    -2028            }
    -2029        }
    -2030
    -2031        let local_addrs: Vec<(SocketAddr, SocketAddr)> = self
    -2032            .msock
    -2033            .ip_bind_addrs()
    -2034            .iter()
    -2035            .copied()
    -2036            .zip(self.msock.ip_local_addrs())
    -2037            .collect();
    -2038
    -2039        let has_ipv4_unspecified = local_addrs.iter().find_map(|(_, a)| {
    -2040            if a.is_ipv4() && a.ip().is_unspecified() {
    -2041                Some(a.port())
    -2042            } else {
    -2043                None
    -2044            }
    -2045        });
    -2046        let has_ipv6_unspecified = local_addrs.iter().find_map(|(_, a)| {
    -2047            if a.is_ipv6() && a.ip().is_unspecified() {
    -2048                Some(a.port())
    -2049            } else {
    -2050                None
    -2051            }
    -2052        });
    -2053
    -2054        // If a socket is bound to the unspecified address, create SocketAddrs for
    -2055        // each local IP address by pairing it with the port the socket is bound on.
    -2056        if local_addrs
    -2057            .iter()
    -2058            .any(|(_, local)| local.ip().is_unspecified())
    -2059        {
    -2060            let LocalAddresses {
    -2061                regular: mut ips,
    -2062                loopback,
    -2063            } = self
    -2064                .netmon_watcher
    -2065                .get()
    -2066                .expect("netmon disconnected")
    -2067                .local_addresses;
    -2068            if ips.is_empty() && addrs.is_empty() {
    -2069                // Include loopback addresses only if there are no other interfaces
    -2070                // or public addresses, this allows testing offline.
    -2071                ips = loopback;
    -2072            }
    -2073
    -2074            for ip in ips {
    -2075                let port_if_unspecified = match ip {
    -2076                    IpAddr::V4(_) => has_ipv4_unspecified,
    -2077                    IpAddr::V6(_) => has_ipv6_unspecified,
    -2078                };
    -2079                if let Some(port) = port_if_unspecified {
    -2080                    let addr = SocketAddr::new(ip, port);
    -2081                    addrs.entry(addr).or_insert(DirectAddrType::Local);
    -2082                }
    -2083            }
    -2084        }
    -2085
    -2086        // If a socket is bound to a specific address, add it.
    -2087        for (bound, local) in local_addrs {
    -2088            if !bound.ip().is_unspecified() {
    -2089                addrs.entry(local).or_insert(DirectAddrType::Local);
    -2090            }
    -2091        }
    +1988                        self.msock.node_map.prune_inactive();
    +1989                        let have_v6 = self.netmon_watcher.clone().get().have_v6;
    +1990                        let msgs = self.msock.node_map.nodes_stayin_alive(have_v6);
    +1991                        self.handle_ping_actions(&sender, msgs).await;
    +1992                    }
    +1993                }
    +1994                state = self.netmon_watcher.updated() => {
    +1995                    let Ok(state) = state else {
    +1996                        trace!("tick: link change receiver closed");
    +1997                        self.msock.metrics.magicsock.actor_tick_other.inc();
    +1998                        continue;
    +1999                    };
    +2000                    let is_major = state.is_major_change(&current_netmon_state);
    +2001                    event!(
    +2002                        target: "iroh::_events::link_change",
    +2003                        Level::DEBUG,
    +2004                        ?state,
    +2005                        is_major
    +2006                    );
    +2007                    current_netmon_state = state;
    +2008                    self.msock.metrics.magicsock.actor_link_change.inc();
    +2009                    self.handle_network_change(is_major).await;
    +2010                }
    +2011                Some((dst, dst_key, msg)) = self.disco_receiver.recv() => {
    +2012                    if let Err(err) = self.msock.send_disco_message(&sender, dst.clone(), dst_key, msg).await {
    +2013                        warn!(%dst, node = %dst_key.fmt_short(), ?err, "failed to send disco message (UDP)");
    +2014                    }
    +2015                }
    +2016            }
    +2017        }
    +2018    }
    +2019
    +2020    async fn handle_network_change(&mut self, is_major: bool) {
    +2021        debug!(is_major, "link change detected");
    +2022
    +2023        if is_major {
    +2024            if let Err(err) = self.network_change_sender.rebind() {
    +2025                warn!("failed to rebind transports: {err:?}");
    +2026            }
    +2027
    +2028            #[cfg(not(wasm_browser))]
    +2029            self.msock.dns_resolver.reset().await;
    +2030            self.re_stun(UpdateReason::LinkChangeMajor);
    +2031            self.reset_endpoint_states();
    +2032        } else {
    +2033            self.re_stun(UpdateReason::LinkChangeMinor);
    +2034        }
    +2035    }
    +2036
    +2037    fn re_stun(&mut self, why: UpdateReason) {
    +2038        let state = self.netmon_watcher.get();
    +2039        self.direct_addr_update_state
    +2040            .schedule_run(why, state.into());
    +2041    }
    +2042
    +2043    #[instrument(skip_all)]
    +2044    async fn handle_ping_actions(&mut self, sender: &UdpSender, msgs: Vec<PingAction>) {
    +2045        if let Err(err) = self.msock.send_ping_actions(sender, msgs).await {
    +2046            warn!("Failed to send ping actions: {err:#}");
    +2047        }
    +2048    }
    +2049
    +2050    /// Processes an incoming actor message.
    +2051    ///
    +2052    /// Returns `true` if it was a shutdown.
    +2053    async fn handle_actor_message(&mut self, msg: ActorMessage) {
    +2054        match msg {
    +2055            ActorMessage::EndpointPingExpired(id, txid) => {
    +2056                self.msock
    +2057                    .node_map
    +2058                    .notify_ping_timeout(id, txid, &self.msock.metrics.magicsock);
    +2059            }
    +2060            ActorMessage::NetworkChange => {
    +2061                self.network_monitor.network_change().await.ok();
    +2062            }
    +2063            ActorMessage::ScheduleDirectAddrUpdate(why, data) => {
    +2064                if let Some((node, url)) = data {
    +2065                    self.pending_call_me_maybes.insert(node, url);
    +2066                }
    +2067                let state = self.netmon_watcher.get();
    +2068                self.direct_addr_update_state
    +2069                    .schedule_run(why, state.into());
    +2070            }
    +2071            #[cfg(test)]
    +2072            ActorMessage::ForceNetworkChange(is_major) => {
    +2073                self.handle_network_change(is_major).await;
    +2074            }
    +2075        }
    +2076    }
    +2077
    +2078    /// Updates the direct addresses of this magic socket.
    +2079    ///
    +2080    /// Updates the [`DiscoveredDirectAddrs`] of this [`MagicSock`] with the current set of
    +2081    /// direct addresses from:
    +2082    ///
    +2083    /// - The portmapper.
    +2084    /// - A net_report report.
    +2085    /// - The local interfaces IP addresses.
    +2086    #[cfg(not(wasm_browser))]
    +2087    fn update_direct_addresses(&mut self, net_report_report: Option<&net_report::Report>) {
    +2088        let portmap_watcher = self
    +2089            .direct_addr_update_state
    +2090            .port_mapper
    +2091            .watch_external_address();
     2092
    -2093        // Finally create and store store all these direct addresses and send any
    -2094        // queued call-me-maybe messages.
    -2095        self.msock.store_direct_addresses(
    -2096            addrs
    -2097                .iter()
    -2098                .map(|(addr, typ)| DirectAddr {
    -2099                    addr: *addr,
    -2100                    typ: *typ,
    -2101                })
    -2102                .collect(),
    -2103        );
    -2104        self.send_queued_call_me_maybes();
    -2105    }
    -2106
    -2107    fn send_queued_call_me_maybes(&mut self) {
    -2108        let msg = self.msock.direct_addrs.to_call_me_maybe_message();
    -2109        let msg = disco::Message::CallMeMaybe(msg);
    -2110        // allocate, to minimize locking duration
    -2111
    -2112        for (public_key, url) in self.pending_call_me_maybes.drain() {
    -2113            if !self
    -2114                .msock
    -2115                .disco
    -2116                .try_send(SendAddr::Relay(url), public_key, msg.clone())
    -2117            {
    -2118                warn!(node = %public_key.fmt_short(), "relay channel full, dropping call-me-maybe");
    -2119            }
    -2120        }
    -2121    }
    +2093        // We only want to have one DirectAddr for each SocketAddr we have.  So we store
    +2094        // this as a map of SocketAddr -> DirectAddrType.  At the end we will construct a
    +2095        // DirectAddr from each entry.
    +2096        let mut addrs: BTreeMap<SocketAddr, DirectAddrType> = BTreeMap::new();
    +2097
    +2098        // First add PortMapper provided addresses.
    +2099        let maybe_port_mapped = *portmap_watcher.borrow();
    +2100        if let Some(portmap_ext) = maybe_port_mapped.map(SocketAddr::V4) {
    +2101            addrs
    +2102                .entry(portmap_ext)
    +2103                .or_insert(DirectAddrType::Portmapped);
    +2104        }
    +2105
    +2106        // Next add STUN addresses from the net_report report.
    +2107        if let Some(net_report_report) = net_report_report {
    +2108            if let Some(global_v4) = net_report_report.global_v4 {
    +2109                addrs.entry(global_v4.into()).or_insert(DirectAddrType::Qad);
    +2110
    +2111                // If they're behind a hard NAT and are using a fixed
    +2112                // port locally, assume they might've added a static
    +2113                // port mapping on their router to the same explicit
    +2114                // port that we are running with. Worst case it's an invalid candidate mapping.
    +2115                let port = self.msock.ip_bind_addrs().iter().find_map(|addr| {
    +2116                    if addr.port() != 0 {
    +2117                        Some(addr.port())
    +2118                    } else {
    +2119                        None
    +2120                    }
    +2121                });
     2122
    -2123    fn handle_net_report_report(&mut self, mut report: Option<net_report::Report>) {
    -2124        if let Some(ref mut r) = report {
    -2125            self.msock.ipv6_reported.store(r.udp_v6, Ordering::Relaxed);
    -2126            if r.preferred_relay.is_none() {
    -2127                if let Some(my_relay) = self.msock.my_relay() {
    -2128                    r.preferred_relay.replace(my_relay);
    -2129                }
    -2130            }
    -2131
    -2132            // Notify all transports
    -2133            self.network_change_sender.on_network_change(r);
    -2134        }
    -2135
    -2136        #[cfg(not(wasm_browser))]
    -2137        self.update_direct_addresses(report.as_ref());
    -2138    }
    -2139
    -2140    /// Resets the preferred address for all nodes.
    -2141    /// This is called when connectivity changes enough that we no longer trust the old routes.
    -2142    #[instrument(skip_all)]
    -2143    fn reset_endpoint_states(&mut self) {
    -2144        self.msock.node_map.reset_node_states()
    -2145    }
    -2146}
    -2147
    -2148fn new_re_stun_timer(initial_delay: bool) -> time::Interval {
    -2149    // Pick a random duration between 20 and 26 seconds (just under 30s,
    -2150    // a common UDP NAT timeout on Linux,etc)
    -2151    let mut rng = rand::thread_rng();
    -2152    let d: Duration = rng.gen_range(Duration::from_secs(20)..=Duration::from_secs(26));
    -2153    if initial_delay {
    -2154        debug!("scheduling periodic_stun to run in {}s", d.as_secs());
    -2155        time::interval_at(time::Instant::now() + d, d)
    -2156    } else {
    -2157        debug!(
    -2158            "scheduling periodic_stun to run immediately and in {}s",
    -2159            d.as_secs()
    -2160        );
    -2161        time::interval(d)
    -2162    }
    -2163}
    -2164
    -2165#[cfg(not(wasm_browser))]
    -2166fn bind_with_fallback(mut addr: SocketAddr) -> io::Result<UdpSocket> {
    -2167    debug!(%addr, "binding");
    -2168
    -2169    // First try binding a preferred port, if specified
    -2170    match UdpSocket::bind_full(addr) {
    -2171        Ok(socket) => {
    -2172            let local_addr = socket.local_addr()?;
    -2173            debug!(%addr, %local_addr, "successfully bound");
    -2174            return Ok(socket);
    -2175        }
    -2176        Err(err) => {
    -2177            debug!(%addr, "failed to bind: {err:#}");
    -2178            // If that was already the fallback port, then error out
    -2179            if addr.port() == 0 {
    -2180                return Err(err);
    -2181            }
    -2182        }
    -2183    }
    +2123                if let Some(port) = port {
    +2124                    if net_report_report
    +2125                        .mapping_varies_by_dest()
    +2126                        .unwrap_or_default()
    +2127                    {
    +2128                        let mut addr = global_v4;
    +2129                        addr.set_port(port);
    +2130                        addrs
    +2131                            .entry(addr.into())
    +2132                            .or_insert(DirectAddrType::Qad4LocalPort);
    +2133                    }
    +2134                }
    +2135            }
    +2136            if let Some(global_v6) = net_report_report.global_v6 {
    +2137                addrs.entry(global_v6.into()).or_insert(DirectAddrType::Qad);
    +2138            }
    +2139        }
    +2140
    +2141        self.collect_local_addresses(&mut addrs);
    +2142
    +2143        // Finally create and store store all these direct addresses and send any
    +2144        // queued call-me-maybe messages.
    +2145        self.msock.store_direct_addresses(
    +2146            addrs
    +2147                .iter()
    +2148                .map(|(addr, typ)| DirectAddr {
    +2149                    addr: *addr,
    +2150                    typ: *typ,
    +2151                })
    +2152                .collect(),
    +2153        );
    +2154        self.send_queued_call_me_maybes();
    +2155    }
    +2156
    +2157    #[cfg(not(wasm_browser))]
    +2158    fn collect_local_addresses(&mut self, addrs: &mut BTreeMap<SocketAddr, DirectAddrType>) {
    +2159        // Matches the addresses that have been bound vs the requested ones.
    +2160        let local_addrs: Vec<(SocketAddr, SocketAddr)> = self
    +2161            .msock
    +2162            .ip_bind_addrs()
    +2163            .iter()
    +2164            .copied()
    +2165            .zip(self.msock.ip_local_addrs())
    +2166            .collect();
    +2167
    +2168        // Do we listen on any IPv4 unspecified address?
    +2169        let has_ipv4_unspecified = local_addrs.iter().find_map(|(_, a)| {
    +2170            if a.is_ipv4() && a.ip().is_unspecified() {
    +2171                Some(a.port())
    +2172            } else {
    +2173                None
    +2174            }
    +2175        });
    +2176        // Do we listen on any IPv6 unspecified address?
    +2177        let has_ipv6_unspecified = local_addrs.iter().find_map(|(_, a)| {
    +2178            if a.is_ipv6() && a.ip().is_unspecified() {
    +2179                Some(a.port())
    +2180            } else {
    +2181                None
    +2182            }
    +2183        });
     2184
    -2185    // Otherwise, try binding with port 0
    -2186    addr.set_port(0);
    -2187    UdpSocket::bind_full(addr)
    -2188}
    -2189
    -2190/// The discovered direct addresses of this [`MagicSock`].
    -2191///
    -2192/// These are all the [`DirectAddr`]s that this [`MagicSock`] is aware of for itself.
    -2193/// They include all locally bound ones as well as those discovered by other mechanisms like
    -2194/// QAD.
    -2195#[derive(derive_more::Debug, Default, Clone)]
    -2196struct DiscoveredDirectAddrs {
    -2197    /// The last set of discovered direct addresses.
    -2198    addrs: Watchable<Option<BTreeSet<DirectAddr>>>,
    -2199
    -2200    /// The last time the direct addresses were updated, even if there was no change.
    -2201    ///
    -2202    /// This is only ever None at startup.
    -2203    updated_at: Arc<RwLock<Option<Instant>>>,
    -2204}
    -2205
    -2206impl DiscoveredDirectAddrs {
    -2207    /// Updates the direct addresses, returns `true` if they changed, `false` if not.
    -2208    fn update(&self, addrs: BTreeSet<DirectAddr>) -> bool {
    -2209        *self.updated_at.write().expect("poisoned") = Some(Instant::now());
    -2210        let updated = self.addrs.set(Some(addrs)).is_ok();
    -2211        if updated {
    -2212            event!(
    -2213                target: "iroh::_events::direct_addrs",
    -2214                Level::DEBUG,
    -2215                addrs = ?self.addrs.get(),
    -2216            );
    -2217        }
    -2218        updated
    +2185        // If a socket is bound to the unspecified address, create SocketAddrs for
    +2186        // each local IP address by pairing it with the port the socket is bound on.
    +2187        if local_addrs
    +2188            .iter()
    +2189            .any(|(_, local)| local.ip().is_unspecified())
    +2190        {
    +2191            let LocalAddresses {
    +2192                regular: mut ips,
    +2193                loopback,
    +2194            } = self.netmon_watcher.get().local_addresses;
    +2195            if ips.is_empty() && addrs.is_empty() {
    +2196                // Include loopback addresses only if there are no other interfaces
    +2197                // or public addresses, this allows testing offline.
    +2198                ips = loopback;
    +2199            }
    +2200
    +2201            for ip in ips {
    +2202                let port_if_unspecified = match ip {
    +2203                    IpAddr::V4(_) => has_ipv4_unspecified,
    +2204                    IpAddr::V6(_) => has_ipv6_unspecified,
    +2205                };
    +2206                if let Some(port) = port_if_unspecified {
    +2207                    let addr = SocketAddr::new(ip, port);
    +2208                    addrs.entry(addr).or_insert(DirectAddrType::Local);
    +2209                }
    +2210            }
    +2211        }
    +2212
    +2213        // If a socket is bound to a specific address, add it.
    +2214        for (bound, local) in local_addrs {
    +2215            if !bound.ip().is_unspecified() {
    +2216                addrs.entry(local).or_insert(DirectAddrType::Local);
    +2217            }
    +2218        }
     2219    }
     2220
    -2221    fn sockaddrs(&self) -> BTreeSet<SocketAddr> {
    -2222        self.addrs
    -2223            .get()
    -2224            .unwrap_or_default()
    -2225            .into_iter()
    -2226            .map(|da| da.addr)
    -2227            .collect()
    -2228    }
    -2229
    -2230    /// Whether the direct addr information is considered "fresh".
    -2231    ///
    -2232    /// If not fresh you should probably update the direct addresses before using this info.
    -2233    ///
    -2234    /// Returns `Ok(())` if fresh enough and `Err(elapsed)` if not fresh enough.
    -2235    /// `elapsed` is the time elapsed since the direct addresses were last updated.
    -2236    ///
    -2237    /// If there is no direct address information `Err(Duration::ZERO)` is returned.
    -2238    fn fresh_enough(&self) -> Result<(), Duration> {
    -2239        match *self.updated_at.read().expect("poisoned") {
    -2240            None => Err(Duration::ZERO),
    -2241            Some(time) => {
    -2242                let elapsed = time.elapsed();
    -2243                if elapsed <= ENDPOINTS_FRESH_ENOUGH_DURATION {
    -2244                    Ok(())
    -2245                } else {
    -2246                    Err(elapsed)
    -2247                }
    -2248            }
    -2249        }
    -2250    }
    -2251
    -2252    fn to_call_me_maybe_message(&self) -> disco::CallMeMaybe {
    -2253        let my_numbers = self
    -2254            .addrs
    -2255            .get()
    -2256            .unwrap_or_default()
    -2257            .into_iter()
    -2258            .map(|da| da.addr)
    -2259            .collect();
    -2260        disco::CallMeMaybe { my_numbers }
    +2221    fn send_queued_call_me_maybes(&mut self) {
    +2222        let msg = self.msock.direct_addrs.to_call_me_maybe_message();
    +2223        let msg = disco::Message::CallMeMaybe(msg);
    +2224        // allocate, to minimize locking duration
    +2225
    +2226        for (public_key, url) in self.pending_call_me_maybes.drain() {
    +2227            if !self
    +2228                .msock
    +2229                .disco
    +2230                .try_send(SendAddr::Relay(url), public_key, msg.clone())
    +2231            {
    +2232                warn!(node = %public_key.fmt_short(), "relay channel full, dropping call-me-maybe");
    +2233            }
    +2234        }
    +2235    }
    +2236
    +2237    fn handle_net_report_report(&mut self, mut report: Option<net_report::Report>) {
    +2238        if let Some(ref mut r) = report {
    +2239            self.msock.ipv6_reported.store(r.udp_v6, Ordering::Relaxed);
    +2240            if r.preferred_relay.is_none() {
    +2241                if let Some(my_relay) = self.msock.my_relay() {
    +2242                    r.preferred_relay.replace(my_relay);
    +2243                }
    +2244            }
    +2245
    +2246            // Notify all transports
    +2247            self.network_change_sender.on_network_change(r);
    +2248        }
    +2249
    +2250        #[cfg(not(wasm_browser))]
    +2251        self.update_direct_addresses(report.as_ref());
    +2252    }
    +2253
    +2254    /// Resets the preferred address for all nodes.
    +2255    /// This is called when connectivity changes enough that we no longer trust the old routes.
    +2256    #[instrument(skip_all)]
    +2257    fn reset_endpoint_states(&mut self) {
    +2258        self.msock
    +2259            .node_map
    +2260            .reset_node_states(&self.msock.metrics.magicsock)
     2261    }
     2262}
     2263
    -2264/// The fake address used by the QUIC layer to address a node.
    -2265///
    -2266/// You can consider this as nothing more than a lookup key for a node the [`MagicSock`] knows
    -2267/// about.
    -2268///
    -2269/// [`MagicSock`] can reach a node by several real socket addresses, or maybe even via the relay
    -2270/// node.  The QUIC layer however needs to address a node by a stable [`SocketAddr`] so
    -2271/// that normal socket APIs can function.  Thus when a new node is introduced to a [`MagicSock`]
    -2272/// it is given a new fake address.  This is the type of that address.
    -2273///
    -2274/// It is but a newtype.  And in our QUIC-facing socket APIs like [`AsyncUdpSocket`] it
    -2275/// comes in as the inner [`Ipv6Addr`], in those interfaces we have to be careful to do
    -2276/// the conversion to this type.
    -2277#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
    -2278pub(crate) struct NodeIdMappedAddr(Ipv6Addr);
    -2279
    -2280/// Can occur when converting a [`SocketAddr`] to an [`NodeIdMappedAddr`]
    -2281#[derive(Debug, Snafu)]
    -2282#[snafu(display("Failed to convert"))]
    -2283pub struct NodeIdMappedAddrError;
    +2264fn new_re_stun_timer(initial_delay: bool) -> time::Interval {
    +2265    // Pick a random duration between 20 and 26 seconds (just under 30s,
    +2266    // a common UDP NAT timeout on Linux,etc)
    +2267    let mut rng = rand::rng();
    +2268    let d: Duration = rng.random_range(Duration::from_secs(20)..=Duration::from_secs(26));
    +2269    if initial_delay {
    +2270        debug!("scheduling periodic_stun to run in {}s", d.as_secs());
    +2271        time::interval_at(time::Instant::now() + d, d)
    +2272    } else {
    +2273        debug!(
    +2274            "scheduling periodic_stun to run immediately and in {}s",
    +2275            d.as_secs()
    +2276        );
    +2277        time::interval(d)
    +2278    }
    +2279}
    +2280
    +2281#[cfg(not(wasm_browser))]
    +2282fn bind_with_fallback(mut addr: SocketAddr) -> io::Result<UdpSocket> {
    +2283    debug!(%addr, "binding");
     2284
    -2285/// Counter to always generate unique addresses for [`NodeIdMappedAddr`].
    -2286static NODE_ID_ADDR_COUNTER: AtomicU64 = AtomicU64::new(1);
    -2287
    -2288impl NodeIdMappedAddr {
    -2289    /// The Prefix/L of our Unique Local Addresses.
    -2290    const ADDR_PREFIXL: u8 = 0xfd;
    -2291    /// The Global ID used in our Unique Local Addresses.
    -2292    const ADDR_GLOBAL_ID: [u8; 5] = [21, 7, 10, 81, 11];
    -2293    /// The Subnet ID used in our Unique Local Addresses.
    -2294    const ADDR_SUBNET: [u8; 2] = [0; 2];
    -2295
    -2296    /// The dummy port used for all [`NodeIdMappedAddr`]s.
    -2297    const NODE_ID_MAPPED_PORT: u16 = 12345;
    -2298
    -2299    /// Generates a globally unique fake UDP address.
    -2300    ///
    -2301    /// This generates and IPv6 Unique Local Address according to RFC 4193.
    -2302    pub(crate) fn generate() -> Self {
    -2303        let mut addr = [0u8; 16];
    -2304        addr[0] = Self::ADDR_PREFIXL;
    -2305        addr[1..6].copy_from_slice(&Self::ADDR_GLOBAL_ID);
    -2306        addr[6..8].copy_from_slice(&Self::ADDR_SUBNET);
    -2307
    -2308        let counter = NODE_ID_ADDR_COUNTER.fetch_add(1, Ordering::Relaxed);
    -2309        addr[8..16].copy_from_slice(&counter.to_be_bytes());
    -2310
    -2311        Self(Ipv6Addr::from(addr))
    -2312    }
    -2313
    -2314    /// Returns a consistent [`SocketAddr`] for the [`NodeIdMappedAddr`].
    -2315    ///
    -2316    /// This socket address does not have a routable IP address.
    +2285    // First try binding a preferred port, if specified
    +2286    match UdpSocket::bind_full(addr) {
    +2287        Ok(socket) => {
    +2288            let local_addr = socket.local_addr()?;
    +2289            debug!(%addr, %local_addr, "successfully bound");
    +2290            return Ok(socket);
    +2291        }
    +2292        Err(err) => {
    +2293            debug!(%addr, "failed to bind: {err:#}");
    +2294            // If that was already the fallback port, then error out
    +2295            if addr.port() == 0 {
    +2296                return Err(err);
    +2297            }
    +2298        }
    +2299    }
    +2300
    +2301    // Otherwise, try binding with port 0
    +2302    addr.set_port(0);
    +2303    UdpSocket::bind_full(addr)
    +2304}
    +2305
    +2306/// The discovered direct addresses of this [`MagicSock`].
    +2307///
    +2308/// These are all the [`DirectAddr`]s that this [`MagicSock`] is aware of for itself.
    +2309/// They include all locally bound ones as well as those discovered by other mechanisms like
    +2310/// QAD.
    +2311#[derive(derive_more::Debug, Clone, Default)]
    +2312struct DiscoveredDirectAddrs {
    +2313    /// The last set of discovered direct addresses.
    +2314    addrs: Watchable<BTreeSet<DirectAddr>>,
    +2315
    +2316    /// The last time the direct addresses were updated, even if there was no change.
     2317    ///
    -2318    /// This uses a made-up port number, since the port does not play a role in looking up
    -2319    /// the node in the [`NodeMap`].  This socket address is only to be used to pass into
    -2320    /// Quinn.
    -2321    pub(crate) fn private_socket_addr(&self) -> SocketAddr {
    -2322        SocketAddr::new(IpAddr::from(self.0), Self::NODE_ID_MAPPED_PORT)
    -2323    }
    -2324}
    -2325
    -2326impl TryFrom<Ipv6Addr> for NodeIdMappedAddr {
    -2327    type Error = NodeIdMappedAddrError;
    -2328
    -2329    fn try_from(value: Ipv6Addr) -> Result<Self, Self::Error> {
    -2330        let octets = value.octets();
    -2331        if octets[0] == Self::ADDR_PREFIXL
    -2332            && octets[1..6] == Self::ADDR_GLOBAL_ID
    -2333            && octets[6..8] == Self::ADDR_SUBNET
    -2334        {
    -2335            return Ok(Self(value));
    -2336        }
    -2337        Err(NodeIdMappedAddrError)
    -2338    }
    -2339}
    +2318    /// This is only ever None at startup.
    +2319    updated_at: Arc<RwLock<Option<Instant>>>,
    +2320}
    +2321
    +2322impl DiscoveredDirectAddrs {
    +2323    /// Updates the direct addresses, returns `true` if they changed, `false` if not.
    +2324    fn update(&self, addrs: BTreeSet<DirectAddr>) -> bool {
    +2325        *self.updated_at.write().expect("poisoned") = Some(Instant::now());
    +2326        let updated = self.addrs.set(addrs).is_ok();
    +2327        if updated {
    +2328            event!(
    +2329                target: "iroh::_events::direct_addrs",
    +2330                Level::DEBUG,
    +2331                addrs = ?self.addrs.get(),
    +2332            );
    +2333        }
    +2334        updated
    +2335    }
    +2336
    +2337    fn sockaddrs(&self) -> BTreeSet<SocketAddr> {
    +2338        self.addrs.get().into_iter().map(|da| da.addr).collect()
    +2339    }
     2340
    -2341impl std::fmt::Display for NodeIdMappedAddr {
    -2342    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    -2343        write!(f, "NodeIdMappedAddr({})", self.0)
    -2344    }
    -2345}
    -2346
    -2347fn disco_message_sent(msg: &disco::Message, metrics: &MagicsockMetrics) {
    -2348    match msg {
    -2349        disco::Message::Ping(_) => {
    -2350            metrics.sent_disco_ping.inc();
    -2351        }
    -2352        disco::Message::Pong(_) => {
    -2353            metrics.sent_disco_pong.inc();
    -2354        }
    -2355        disco::Message::CallMeMaybe(_) => {
    -2356            metrics.sent_disco_call_me_maybe.inc();
    -2357        }
    -2358    }
    -2359}
    -2360
    -2361/// A *direct address* on which an iroh-node might be contactable.
    -2362///
    -2363/// Direct addresses are UDP socket addresses on which an iroh node could potentially be
    -2364/// contacted.  These can come from various sources depending on the network topology of the
    -2365/// iroh node, see [`DirectAddrType`] for the several kinds of sources.
    -2366#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
    -2367pub struct DirectAddr {
    -2368    /// The address.
    -2369    pub addr: SocketAddr,
    -2370    /// The origin of this direct address.
    -2371    pub typ: DirectAddrType,
    -2372}
    -2373
    -2374/// The type of direct address.
    -2375///
    -2376/// These are the various sources or origins from which an iroh node might have found a
    -2377/// possible [`DirectAddr`].
    -2378#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
    -2379pub enum DirectAddrType {
    -2380    /// Not yet determined..
    -2381    Unknown,
    -2382    /// A locally bound socket address.
    -2383    Local,
    -2384    /// Public internet address discovered via QAD.
    -2385    ///
    -2386    /// When possible an iroh node will perform QAD to discover which is the address
    -2387    /// from which it sends data on the public internet.  This can be different from locally
    -2388    /// bound addresses when the node is on a local network which performs NAT or similar.
    -2389    Qad,
    -2390    /// An address assigned by the router using port mapping.
    -2391    ///
    -2392    /// When possible an iroh node will request a port mapping from the local router to
    -2393    /// get a publicly routable direct address.
    -2394    Portmapped,
    -2395    /// Hard NAT: QAD'ed IPv4 address + local fixed port.
    -2396    ///
    -2397    /// It is possible to configure iroh to bound to a specific port and independently
    -2398    /// configure the router to forward this port to the iroh node.  This indicates a
    -2399    /// situation like this, which still uses QAD to discover the public address.
    -2400    Qad4LocalPort,
    -2401}
    -2402
    -2403impl Display for DirectAddrType {
    -2404    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    -2405        match self {
    -2406            DirectAddrType::Unknown => write!(f, "?"),
    -2407            DirectAddrType::Local => write!(f, "local"),
    -2408            DirectAddrType::Qad => write!(f, "qad"),
    -2409            DirectAddrType::Portmapped => write!(f, "portmap"),
    -2410            DirectAddrType::Qad4LocalPort => write!(f, "qad4localport"),
    -2411        }
    -2412    }
    -2413}
    -2414
    -2415#[cfg(test)]
    -2416mod tests {
    -2417    use std::{collections::BTreeSet, sync::Arc, time::Duration};
    +2341    /// Whether the direct addr information is considered "fresh".
    +2342    ///
    +2343    /// If not fresh you should probably update the direct addresses before using this info.
    +2344    ///
    +2345    /// Returns `Ok(())` if fresh enough and `Err(elapsed)` if not fresh enough.
    +2346    /// `elapsed` is the time elapsed since the direct addresses were last updated.
    +2347    ///
    +2348    /// If there is no direct address information `Err(Duration::ZERO)` is returned.
    +2349    fn fresh_enough(&self) -> Result<(), Duration> {
    +2350        match *self.updated_at.read().expect("poisoned") {
    +2351            None => Err(Duration::ZERO),
    +2352            Some(time) => {
    +2353                let elapsed = time.elapsed();
    +2354                if elapsed <= ENDPOINTS_FRESH_ENOUGH_DURATION {
    +2355                    Ok(())
    +2356                } else {
    +2357                    Err(elapsed)
    +2358                }
    +2359            }
    +2360        }
    +2361    }
    +2362
    +2363    fn to_call_me_maybe_message(&self) -> disco::CallMeMaybe {
    +2364        let my_numbers = self.addrs.get().into_iter().map(|da| da.addr).collect();
    +2365        disco::CallMeMaybe { my_numbers }
    +2366    }
    +2367}
    +2368
    +2369/// The fake address used by the QUIC layer to address a node.
    +2370///
    +2371/// You can consider this as nothing more than a lookup key for a node the [`MagicSock`] knows
    +2372/// about.
    +2373///
    +2374/// [`MagicSock`] can reach a node by several real socket addresses, or maybe even via the relay
    +2375/// node.  The QUIC layer however needs to address a node by a stable [`SocketAddr`] so
    +2376/// that normal socket APIs can function.  Thus when a new node is introduced to a [`MagicSock`]
    +2377/// it is given a new fake address.  This is the type of that address.
    +2378///
    +2379/// It is but a newtype.  And in our QUIC-facing socket APIs like [`AsyncUdpSocket`] it
    +2380/// comes in as the inner [`Ipv6Addr`], in those interfaces we have to be careful to do
    +2381/// the conversion to this type.
    +2382#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
    +2383pub(crate) struct NodeIdMappedAddr(Ipv6Addr);
    +2384
    +2385/// Can occur when converting a [`SocketAddr`] to an [`NodeIdMappedAddr`]
    +2386#[derive(Debug, Snafu)]
    +2387#[snafu(display("Failed to convert"))]
    +2388pub struct NodeIdMappedAddrError;
    +2389
    +2390/// Counter to always generate unique addresses for [`NodeIdMappedAddr`].
    +2391static NODE_ID_ADDR_COUNTER: AtomicU64 = AtomicU64::new(1);
    +2392
    +2393impl NodeIdMappedAddr {
    +2394    /// The Prefix/L of our Unique Local Addresses.
    +2395    const ADDR_PREFIXL: u8 = 0xfd;
    +2396    /// The Global ID used in our Unique Local Addresses.
    +2397    const ADDR_GLOBAL_ID: [u8; 5] = [21, 7, 10, 81, 11];
    +2398    /// The Subnet ID used in our Unique Local Addresses.
    +2399    const ADDR_SUBNET: [u8; 2] = [0; 2];
    +2400
    +2401    /// The dummy port used for all [`NodeIdMappedAddr`]s.
    +2402    const NODE_ID_MAPPED_PORT: u16 = 12345;
    +2403
    +2404    /// Generates a globally unique fake UDP address.
    +2405    ///
    +2406    /// This generates and IPv6 Unique Local Address according to RFC 4193.
    +2407    pub(crate) fn generate() -> Self {
    +2408        let mut addr = [0u8; 16];
    +2409        addr[0] = Self::ADDR_PREFIXL;
    +2410        addr[1..6].copy_from_slice(&Self::ADDR_GLOBAL_ID);
    +2411        addr[6..8].copy_from_slice(&Self::ADDR_SUBNET);
    +2412
    +2413        let counter = NODE_ID_ADDR_COUNTER.fetch_add(1, Ordering::Relaxed);
    +2414        addr[8..16].copy_from_slice(&counter.to_be_bytes());
    +2415
    +2416        Self(Ipv6Addr::from(addr))
    +2417    }
     2418
    -2419    use data_encoding::HEXLOWER;
    -2420    use iroh_base::{NodeAddr, NodeId, PublicKey};
    -2421    use n0_future::{time, StreamExt};
    -2422    use n0_snafu::{Result, ResultExt};
    -2423    use n0_watcher::Watcher;
    -2424    use quinn::ServerConfig;
    -2425    use rand::{Rng, RngCore};
    -2426    use tokio::task::JoinSet;
    -2427    use tokio_util::task::AbortOnDropHandle;
    -2428    use tracing::{error, info, info_span, instrument, Instrument};
    -2429    use tracing_test::traced_test;
    +2419    /// Returns a consistent [`SocketAddr`] for the [`NodeIdMappedAddr`].
    +2420    ///
    +2421    /// This socket address does not have a routable IP address.
    +2422    ///
    +2423    /// This uses a made-up port number, since the port does not play a role in looking up
    +2424    /// the node in the [`NodeMap`].  This socket address is only to be used to pass into
    +2425    /// Quinn.
    +2426    pub(crate) fn private_socket_addr(&self) -> SocketAddr {
    +2427        SocketAddr::new(IpAddr::from(self.0), Self::NODE_ID_MAPPED_PORT)
    +2428    }
    +2429}
     2430
    -2431    use super::{NodeIdMappedAddr, Options};
    -2432    use crate::{
    -2433        dns::DnsResolver,
    -2434        endpoint::{DirectAddr, PathSelection, Source},
    -2435        magicsock::{node_map, Handle, MagicSock},
    -2436        tls, Endpoint, RelayMap, RelayMode, SecretKey,
    -2437    };
    -2438
    -2439    const ALPN: &[u8] = b"n0/test/1";
    -2440
    -2441    impl Default for Options {
    -2442        fn default() -> Self {
    -2443            let secret_key = SecretKey::generate(rand::rngs::OsRng);
    -2444            let server_config = make_default_server_config(&secret_key);
    -2445            Options {
    -2446                addr_v4: None,
    -2447                addr_v6: None,
    -2448                secret_key,
    -2449                relay_map: RelayMap::empty(),
    -2450                relay_protocol: iroh_relay::http::Protocol::default(),
    -2451                node_map: None,
    -2452                discovery: None,
    -2453                proxy_url: None,
    -2454                dns_resolver: DnsResolver::new(),
    -2455                server_config,
    -2456                #[cfg(any(test, feature = "test-utils"))]
    -2457                insecure_skip_relay_cert_verify: false,
    -2458                #[cfg(any(test, feature = "test-utils"))]
    -2459                path_selection: PathSelection::default(),
    -2460                discovery_user_data: None,
    -2461                metrics: Default::default(),
    -2462            }
    -2463        }
    -2464    }
    +2431impl TryFrom<Ipv6Addr> for NodeIdMappedAddr {
    +2432    type Error = NodeIdMappedAddrError;
    +2433
    +2434    fn try_from(value: Ipv6Addr) -> Result<Self, Self::Error> {
    +2435        let octets = value.octets();
    +2436        if octets[0] == Self::ADDR_PREFIXL
    +2437            && octets[1..6] == Self::ADDR_GLOBAL_ID
    +2438            && octets[6..8] == Self::ADDR_SUBNET
    +2439        {
    +2440            return Ok(Self(value));
    +2441        }
    +2442        Err(NodeIdMappedAddrError)
    +2443    }
    +2444}
    +2445
    +2446impl std::fmt::Display for NodeIdMappedAddr {
    +2447    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    +2448        write!(f, "NodeIdMappedAddr({})", self.0)
    +2449    }
    +2450}
    +2451
    +2452fn disco_message_sent(msg: &disco::Message, metrics: &MagicsockMetrics) {
    +2453    match msg {
    +2454        disco::Message::Ping(_) => {
    +2455            metrics.sent_disco_ping.inc();
    +2456        }
    +2457        disco::Message::Pong(_) => {
    +2458            metrics.sent_disco_pong.inc();
    +2459        }
    +2460        disco::Message::CallMeMaybe(_) => {
    +2461            metrics.sent_disco_call_me_maybe.inc();
    +2462        }
    +2463    }
    +2464}
     2465
    -2466    /// Generate a server config with no ALPNS and a default transport configuration
    -2467    fn make_default_server_config(secret_key: &SecretKey) -> ServerConfig {
    -2468        let quic_server_config =
    -2469            crate::tls::TlsConfig::new(secret_key.clone()).make_server_config(vec![], false);
    -2470        let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
    -2471        server_config.transport_config(Arc::new(quinn::TransportConfig::default()));
    -2472        server_config
    -2473    }
    -2474
    -2475    impl MagicSock {
    -2476        #[track_caller]
    -2477        pub fn add_test_addr(&self, node_addr: NodeAddr) {
    -2478            self.add_node_addr(
    -2479                node_addr,
    -2480                Source::NamedApp {
    -2481                    name: "test".into(),
    -2482                },
    -2483            )
    -2484            .unwrap()
    -2485        }
    -2486    }
    -2487
    -2488    /// Magicsock plus wrappers for sending packets
    -2489    #[derive(Clone)]
    -2490    struct MagicStack {
    -2491        secret_key: SecretKey,
    -2492        endpoint: Endpoint,
    -2493    }
    -2494
    -2495    impl MagicStack {
    -2496        async fn new(relay_mode: RelayMode) -> Self {
    -2497            let secret_key = SecretKey::generate(rand::thread_rng());
    -2498
    -2499            let mut transport_config = quinn::TransportConfig::default();
    -2500            transport_config.max_idle_timeout(Some(Duration::from_secs(10).try_into().unwrap()));
    -2501
    -2502            let endpoint = Endpoint::builder()
    -2503                .secret_key(secret_key.clone())
    -2504                .transport_config(transport_config)
    -2505                .relay_mode(relay_mode)
    -2506                .alpns(vec![ALPN.to_vec()])
    -2507                .bind()
    -2508                .await
    -2509                .unwrap();
    -2510
    -2511            Self {
    -2512                secret_key,
    -2513                endpoint,
    -2514            }
    -2515        }
    -2516
    -2517        fn tracked_endpoints(&self) -> Vec<PublicKey> {
    -2518            self.endpoint
    -2519                .magic_sock()
    -2520                .list_remote_infos()
    -2521                .into_iter()
    -2522                .map(|ep| ep.node_id)
    -2523                .collect()
    -2524        }
    -2525
    -2526        fn public(&self) -> PublicKey {
    -2527            self.secret_key.public()
    -2528        }
    -2529    }
    -2530
    -2531    /// Monitors endpoint changes and plumbs things together.
    -2532    ///
    -2533    /// This is a way of connecting endpoints without a relay server.  Whenever the local
    -2534    /// endpoints of a magic endpoint change this address is added to the other magic
    -2535    /// sockets.  This function will await until the endpoints are connected the first time
    -2536    /// before returning.
    -2537    ///
    -2538    /// When the returned drop guard is dropped, the tasks doing this updating are stopped.
    -2539    #[instrument(skip_all)]
    -2540    async fn mesh_stacks(stacks: Vec<MagicStack>) -> Result<JoinSet<()>> {
    -2541        /// Registers endpoint addresses of a node to all other nodes.
    -2542        fn update_direct_addrs(
    -2543            stacks: &[MagicStack],
    -2544            my_idx: usize,
    -2545            new_addrs: BTreeSet<DirectAddr>,
    -2546        ) {
    -2547            let me = &stacks[my_idx];
    -2548            for (i, m) in stacks.iter().enumerate() {
    -2549                if i == my_idx {
    -2550                    continue;
    -2551                }
    -2552
    -2553                let addr = NodeAddr {
    -2554                    node_id: me.public(),
    -2555                    relay_url: None,
    -2556                    direct_addresses: new_addrs.iter().map(|ep| ep.addr).collect(),
    -2557                };
    -2558                m.endpoint.magic_sock().add_test_addr(addr);
    -2559            }
    -2560        }
    -2561
    -2562        // For each node, start a task which monitors its local endpoints and registers them
    -2563        // with the other nodes as local endpoints become known.
    -2564        let mut tasks = JoinSet::new();
    -2565        for (my_idx, m) in stacks.iter().enumerate() {
    -2566            let m = m.clone();
    -2567            let stacks = stacks.clone();
    -2568            tasks.spawn(async move {
    -2569                let me = m.endpoint.node_id().fmt_short();
    -2570                let mut stream = m.endpoint.direct_addresses().stream().filter_map(|i| i);
    -2571                while let Some(new_eps) = stream.next().await {
    -2572                    info!(%me, "conn{} endpoints update: {:?}", my_idx + 1, new_eps);
    -2573                    update_direct_addrs(&stacks, my_idx, new_eps);
    -2574                }
    -2575            });
    -2576        }
    +2466/// A *direct address* on which an iroh-node might be contactable.
    +2467///
    +2468/// Direct addresses are UDP socket addresses on which an iroh node could potentially be
    +2469/// contacted.  These can come from various sources depending on the network topology of the
    +2470/// iroh node, see [`DirectAddrType`] for the several kinds of sources.
    +2471#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)]
    +2472pub struct DirectAddr {
    +2473    /// The address.
    +2474    pub addr: SocketAddr,
    +2475    /// The origin of this direct address.
    +2476    pub typ: DirectAddrType,
    +2477}
    +2478
    +2479/// The type of direct address.
    +2480///
    +2481/// These are the various sources or origins from which an iroh node might have found a
    +2482/// possible [`DirectAddr`].
    +2483#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
    +2484pub enum DirectAddrType {
    +2485    /// Not yet determined..
    +2486    Unknown,
    +2487    /// A locally bound socket address.
    +2488    Local,
    +2489    /// Public internet address discovered via QAD.
    +2490    ///
    +2491    /// When possible an iroh node will perform QAD to discover which is the address
    +2492    /// from which it sends data on the public internet.  This can be different from locally
    +2493    /// bound addresses when the node is on a local network which performs NAT or similar.
    +2494    Qad,
    +2495    /// An address assigned by the router using port mapping.
    +2496    ///
    +2497    /// When possible an iroh node will request a port mapping from the local router to
    +2498    /// get a publicly routable direct address.
    +2499    Portmapped,
    +2500    /// Hard NAT: QAD'ed IPv4 address + local fixed port.
    +2501    ///
    +2502    /// It is possible to configure iroh to bound to a specific port and independently
    +2503    /// configure the router to forward this port to the iroh node.  This indicates a
    +2504    /// situation like this, which still uses QAD to discover the public address.
    +2505    Qad4LocalPort,
    +2506}
    +2507
    +2508impl Display for DirectAddrType {
    +2509    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +2510        match self {
    +2511            DirectAddrType::Unknown => write!(f, "?"),
    +2512            DirectAddrType::Local => write!(f, "local"),
    +2513            DirectAddrType::Qad => write!(f, "qad"),
    +2514            DirectAddrType::Portmapped => write!(f, "portmap"),
    +2515            DirectAddrType::Qad4LocalPort => write!(f, "qad4localport"),
    +2516        }
    +2517    }
    +2518}
    +2519
    +2520#[cfg(test)]
    +2521mod tests {
    +2522    use std::{collections::BTreeSet, net::SocketAddr, sync::Arc, time::Duration};
    +2523
    +2524    use data_encoding::HEXLOWER;
    +2525    use iroh_base::{NodeAddr, NodeId, PublicKey};
    +2526    use n0_future::{StreamExt, time};
    +2527    use n0_snafu::{Result, ResultExt};
    +2528    use n0_watcher::Watcher;
    +2529    use quinn::ServerConfig;
    +2530    use rand::{CryptoRng, Rng, RngCore, SeedableRng};
    +2531    use tokio::task::JoinSet;
    +2532    use tokio_util::task::AbortOnDropHandle;
    +2533    use tracing::{Instrument, error, info, info_span, instrument};
    +2534    use tracing_test::traced_test;
    +2535
    +2536    use super::{NodeIdMappedAddr, Options};
    +2537    use crate::{
    +2538        Endpoint, RelayMap, RelayMode, SecretKey,
    +2539        dns::DnsResolver,
    +2540        endpoint::{PathSelection, Source},
    +2541        magicsock::{Handle, MagicSock, node_map},
    +2542        tls::{self, DEFAULT_MAX_TLS_TICKETS},
    +2543    };
    +2544
    +2545    const ALPN: &[u8] = b"n0/test/1";
    +2546
    +2547    fn default_options<R: CryptoRng + ?Sized>(rng: &mut R) -> Options {
    +2548        let secret_key = SecretKey::generate(rng);
    +2549        let server_config = make_default_server_config(&secret_key);
    +2550        Options {
    +2551            addr_v4: None,
    +2552            addr_v6: None,
    +2553            secret_key,
    +2554            relay_map: RelayMap::empty(),
    +2555            discovery: Default::default(),
    +2556            proxy_url: None,
    +2557            dns_resolver: DnsResolver::new(),
    +2558            server_config,
    +2559            #[cfg(any(test, feature = "test-utils"))]
    +2560            insecure_skip_relay_cert_verify: false,
    +2561            #[cfg(any(test, feature = "test-utils"))]
    +2562            path_selection: PathSelection::default(),
    +2563            discovery_user_data: None,
    +2564            metrics: Default::default(),
    +2565        }
    +2566    }
    +2567
    +2568    /// Generate a server config with no ALPNS and a default transport configuration
    +2569    fn make_default_server_config(secret_key: &SecretKey) -> ServerConfig {
    +2570        let quic_server_config =
    +2571            crate::tls::TlsConfig::new(secret_key.clone(), DEFAULT_MAX_TLS_TICKETS)
    +2572                .make_server_config(vec![], false);
    +2573        let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
    +2574        server_config.transport_config(Arc::new(quinn::TransportConfig::default()));
    +2575        server_config
    +2576    }
     2577
    -2578        // Wait for all nodes to be registered with each other.
    -2579        time::timeout(Duration::from_secs(10), async move {
    -2580            let all_node_ids: Vec<_> = stacks.iter().map(|ms| ms.endpoint.node_id()).collect();
    -2581            loop {
    -2582                let mut ready = Vec::with_capacity(stacks.len());
    -2583                for ms in stacks.iter() {
    -2584                    let endpoints = ms.tracked_endpoints();
    -2585                    let my_node_id = ms.endpoint.node_id();
    -2586                    let all_nodes_meshed = all_node_ids
    -2587                        .iter()
    -2588                        .filter(|node_id| **node_id != my_node_id)
    -2589                        .all(|node_id| endpoints.contains(node_id));
    -2590                    ready.push(all_nodes_meshed);
    -2591                }
    -2592                if ready.iter().all(|meshed| *meshed) {
    -2593                    break;
    -2594                }
    -2595                time::sleep(Duration::from_millis(200)).await;
    -2596            }
    -2597        })
    -2598        .await
    -2599        .context("timeout")?;
    -2600        info!("all nodes meshed");
    -2601        Ok(tasks)
    -2602    }
    -2603
    -2604    #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))]
    -2605    async fn echo_receiver(ep: MagicStack, loss: ExpectedLoss) -> Result {
    -2606        info!("accepting conn");
    -2607        let conn = ep.endpoint.accept().await.expect("no conn");
    -2608
    -2609        info!("connecting");
    -2610        let conn = conn.await.context("connecting")?;
    -2611        info!("accepting bi");
    -2612        let (mut send_bi, mut recv_bi) = conn.accept_bi().await.context("accept bi")?;
    +2578    impl MagicSock {
    +2579        #[track_caller]
    +2580        pub fn add_test_addr(&self, node_addr: NodeAddr) {
    +2581            self.add_node_addr(
    +2582                node_addr,
    +2583                Source::NamedApp {
    +2584                    name: "test".into(),
    +2585                },
    +2586            )
    +2587            .unwrap()
    +2588        }
    +2589    }
    +2590
    +2591    /// Magicsock plus wrappers for sending packets
    +2592    #[derive(Clone)]
    +2593    struct MagicStack {
    +2594        secret_key: SecretKey,
    +2595        endpoint: Endpoint,
    +2596    }
    +2597
    +2598    impl MagicStack {
    +2599        async fn new<R: CryptoRng + ?Sized>(rng: &mut R, relay_mode: RelayMode) -> Self {
    +2600            let secret_key = SecretKey::generate(rng);
    +2601
    +2602            let mut transport_config = quinn::TransportConfig::default();
    +2603            transport_config.max_idle_timeout(Some(Duration::from_secs(10).try_into().unwrap()));
    +2604
    +2605            let endpoint = Endpoint::builder()
    +2606                .secret_key(secret_key.clone())
    +2607                .transport_config(transport_config)
    +2608                .relay_mode(relay_mode)
    +2609                .alpns(vec![ALPN.to_vec()])
    +2610                .bind()
    +2611                .await
    +2612                .unwrap();
     2613
    -2614        info!("reading");
    -2615        let val = recv_bi
    -2616            .read_to_end(usize::MAX)
    -2617            .await
    -2618            .context("read to end")?;
    +2614            Self {
    +2615                secret_key,
    +2616                endpoint,
    +2617            }
    +2618        }
     2619
    -2620        info!("replying");
    -2621        for chunk in val.chunks(12) {
    -2622            send_bi.write_all(chunk).await.context("write all")?;
    -2623        }
    -2624
    -2625        info!("finishing");
    -2626        send_bi.finish().context("finish")?;
    -2627        send_bi.stopped().await.context("stopped")?;
    +2620        fn tracked_endpoints(&self) -> Vec<PublicKey> {
    +2621            self.endpoint
    +2622                .magic_sock()
    +2623                .list_remote_infos()
    +2624                .into_iter()
    +2625                .map(|ep| ep.node_id)
    +2626                .collect()
    +2627        }
     2628
    -2629        let stats = conn.stats();
    -2630        info!("stats: {:#?}", stats);
    -2631        // TODO: ensure panics in this function are reported ok
    -2632        if matches!(loss, ExpectedLoss::AlmostNone) {
    -2633            assert!(
    -2634                stats.path.lost_packets < 10,
    -2635                "[receiver] should not loose many packets",
    -2636            );
    -2637        }
    -2638
    -2639        info!("close");
    -2640        conn.close(0u32.into(), b"done");
    -2641        info!("wait idle");
    -2642        ep.endpoint.endpoint().wait_idle().await;
    -2643
    -2644        Ok(())
    -2645    }
    -2646
    -2647    #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))]
    -2648    async fn echo_sender(
    -2649        ep: MagicStack,
    -2650        dest_id: PublicKey,
    -2651        msg: &[u8],
    -2652        loss: ExpectedLoss,
    -2653    ) -> Result {
    -2654        info!("connecting to {}", dest_id.fmt_short());
    -2655        let dest = NodeAddr::new(dest_id);
    -2656        let conn = ep.endpoint.connect(dest, ALPN).await?;
    -2657
    -2658        info!("opening bi");
    -2659        let (mut send_bi, mut recv_bi) = conn.open_bi().await.context("open bi")?;
    -2660
    -2661        info!("writing message");
    -2662        send_bi.write_all(msg).await.context("write all")?;
    -2663
    -2664        info!("finishing");
    -2665        send_bi.finish().context("finish")?;
    -2666        send_bi.stopped().await.context("stopped")?;
    -2667
    -2668        info!("reading_to_end");
    -2669        let val = recv_bi
    -2670            .read_to_end(usize::MAX)
    -2671            .await
    -2672            .context("read to end")?;
    -2673        assert_eq!(
    -2674            val,
    -2675            msg,
    -2676            "[sender] expected {}, got {}",
    -2677            HEXLOWER.encode(msg),
    -2678            HEXLOWER.encode(&val)
    -2679        );
    +2629        fn public(&self) -> PublicKey {
    +2630            self.secret_key.public()
    +2631        }
    +2632    }
    +2633
    +2634    /// Monitors endpoint changes and plumbs things together.
    +2635    ///
    +2636    /// This is a way of connecting endpoints without a relay server.  Whenever the local
    +2637    /// endpoints of a magic endpoint change this address is added to the other magic
    +2638    /// sockets.  This function will await until the endpoints are connected the first time
    +2639    /// before returning.
    +2640    ///
    +2641    /// When the returned drop guard is dropped, the tasks doing this updating are stopped.
    +2642    #[instrument(skip_all)]
    +2643    async fn mesh_stacks(stacks: Vec<MagicStack>) -> Result<JoinSet<()>> {
    +2644        /// Registers endpoint addresses of a node to all other nodes.
    +2645        fn update_direct_addrs(
    +2646            stacks: &[MagicStack],
    +2647            my_idx: usize,
    +2648            new_addrs: BTreeSet<SocketAddr>,
    +2649        ) {
    +2650            let me = &stacks[my_idx];
    +2651            for (i, m) in stacks.iter().enumerate() {
    +2652                if i == my_idx {
    +2653                    continue;
    +2654                }
    +2655
    +2656                let addr = NodeAddr {
    +2657                    node_id: me.public(),
    +2658                    relay_url: None,
    +2659                    direct_addresses: new_addrs.clone(),
    +2660                };
    +2661                m.endpoint.magic_sock().add_test_addr(addr);
    +2662            }
    +2663        }
    +2664
    +2665        // For each node, start a task which monitors its local endpoints and registers them
    +2666        // with the other nodes as local endpoints become known.
    +2667        let mut tasks = JoinSet::new();
    +2668        for (my_idx, m) in stacks.iter().enumerate() {
    +2669            let m = m.clone();
    +2670            let stacks = stacks.clone();
    +2671            tasks.spawn(async move {
    +2672                let me = m.endpoint.node_id().fmt_short();
    +2673                let mut stream = m.endpoint.watch_node_addr().stream();
    +2674                while let Some(addr) = stream.next().await {
    +2675                    info!(%me, "conn{} endpoints update: {:?}", my_idx + 1, addr.direct_addresses);
    +2676                    update_direct_addrs(&stacks, my_idx, addr.direct_addresses);
    +2677                }
    +2678            });
    +2679        }
     2680
    -2681        let stats = conn.stats();
    -2682        info!("stats: {:#?}", stats);
    -2683        if matches!(loss, ExpectedLoss::AlmostNone) {
    -2684            assert!(
    -2685                stats.path.lost_packets < 10,
    -2686                "[sender] should not loose many packets",
    -2687            );
    -2688        }
    -2689
    -2690        info!("close");
    -2691        conn.close(0u32.into(), b"done");
    -2692        info!("wait idle");
    -2693        ep.endpoint.endpoint().wait_idle().await;
    -2694        Ok(())
    -2695    }
    -2696
    -2697    #[derive(Debug, Copy, Clone)]
    -2698    enum ExpectedLoss {
    -2699        AlmostNone,
    -2700        YeahSure,
    -2701    }
    -2702
    -2703    /// Runs a roundtrip between the [`echo_sender`] and [`echo_receiver`].
    -2704    async fn run_roundtrip(
    -2705        sender: MagicStack,
    -2706        receiver: MagicStack,
    -2707        payload: &[u8],
    -2708        loss: ExpectedLoss,
    -2709    ) {
    -2710        let send_node_id = sender.endpoint.node_id();
    -2711        let recv_node_id = receiver.endpoint.node_id();
    -2712        info!("\nroundtrip: {send_node_id:#} -> {recv_node_id:#}");
    -2713
    -2714        let receiver_task = tokio::spawn(echo_receiver(receiver, loss));
    -2715        let sender_res = echo_sender(sender, recv_node_id, payload, loss).await;
    -2716        let sender_is_err = match sender_res {
    -2717            Ok(()) => false,
    -2718            Err(err) => {
    -2719                eprintln!("[sender] Error:\n{err:#?}");
    -2720                true
    -2721            }
    -2722        };
    -2723        let receiver_is_err = match receiver_task.await {
    -2724            Ok(Ok(())) => false,
    -2725            Ok(Err(err)) => {
    -2726                eprintln!("[receiver] Error:\n{err:#?}");
    -2727                true
    -2728            }
    -2729            Err(joinerr) => {
    -2730                if joinerr.is_panic() {
    -2731                    std::panic::resume_unwind(joinerr.into_panic());
    -2732                } else {
    -2733                    eprintln!("[receiver] Error:\n{joinerr:#?}");
    -2734                }
    -2735                true
    -2736            }
    -2737        };
    -2738        if sender_is_err || receiver_is_err {
    -2739            panic!("Sender or receiver errored");
    +2681        // Wait for all nodes to be registered with each other.
    +2682        time::timeout(Duration::from_secs(10), async move {
    +2683            let all_node_ids: Vec<_> = stacks.iter().map(|ms| ms.endpoint.node_id()).collect();
    +2684            loop {
    +2685                let mut ready = Vec::with_capacity(stacks.len());
    +2686                for ms in stacks.iter() {
    +2687                    let endpoints = ms.tracked_endpoints();
    +2688                    let my_node_id = ms.endpoint.node_id();
    +2689                    let all_nodes_meshed = all_node_ids
    +2690                        .iter()
    +2691                        .filter(|node_id| **node_id != my_node_id)
    +2692                        .all(|node_id| endpoints.contains(node_id));
    +2693                    ready.push(all_nodes_meshed);
    +2694                }
    +2695                if ready.iter().all(|meshed| *meshed) {
    +2696                    break;
    +2697                }
    +2698                time::sleep(Duration::from_millis(200)).await;
    +2699            }
    +2700        })
    +2701        .await
    +2702        .context("timeout")?;
    +2703        info!("all nodes meshed");
    +2704        Ok(tasks)
    +2705    }
    +2706
    +2707    #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))]
    +2708    async fn echo_receiver(ep: MagicStack, loss: ExpectedLoss) -> Result {
    +2709        info!("accepting conn");
    +2710        let conn = ep.endpoint.accept().await.expect("no conn");
    +2711
    +2712        info!("connecting");
    +2713        let conn = conn.await.context("connecting")?;
    +2714        info!("accepting bi");
    +2715        let (mut send_bi, mut recv_bi) = conn.accept_bi().await.context("accept bi")?;
    +2716
    +2717        info!("reading");
    +2718        let val = recv_bi
    +2719            .read_to_end(usize::MAX)
    +2720            .await
    +2721            .context("read to end")?;
    +2722
    +2723        info!("replying");
    +2724        for chunk in val.chunks(12) {
    +2725            send_bi.write_all(chunk).await.context("write all")?;
    +2726        }
    +2727
    +2728        info!("finishing");
    +2729        send_bi.finish().context("finish")?;
    +2730        send_bi.stopped().await.context("stopped")?;
    +2731
    +2732        let stats = conn.stats();
    +2733        info!("stats: {:#?}", stats);
    +2734        // TODO: ensure panics in this function are reported ok
    +2735        if matches!(loss, ExpectedLoss::AlmostNone) {
    +2736            assert!(
    +2737                stats.path.lost_packets < 10,
    +2738                "[receiver] should not loose many packets",
    +2739            );
     2740        }
    -2741    }
    -2742
    -2743    #[tokio::test(flavor = "multi_thread")]
    -2744    #[traced_test]
    -2745    async fn test_two_devices_roundtrip_quinn_magic() -> Result {
    -2746        let m1 = MagicStack::new(RelayMode::Disabled).await;
    -2747        let m2 = MagicStack::new(RelayMode::Disabled).await;
    -2748
    -2749        let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    -2750
    -2751        for i in 0..5 {
    -2752            info!("\n-- round {i}");
    -2753            run_roundtrip(
    -2754                m1.clone(),
    -2755                m2.clone(),
    -2756                b"hello m1",
    -2757                ExpectedLoss::AlmostNone,
    -2758            )
    -2759            .await;
    -2760            run_roundtrip(
    -2761                m2.clone(),
    -2762                m1.clone(),
    -2763                b"hello m2",
    -2764                ExpectedLoss::AlmostNone,
    -2765            )
    -2766            .await;
    -2767
    -2768            info!("\n-- larger data");
    -2769            let mut data = vec![0u8; 10 * 1024];
    -2770            rand::thread_rng().fill_bytes(&mut data);
    -2771            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::AlmostNone).await;
    -2772            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::AlmostNone).await;
    -2773        }
    -2774
    -2775        Ok(())
    -2776    }
    -2777
    -2778    #[tokio::test]
    -2779    #[traced_test]
    -2780    async fn test_regression_network_change_rebind_wakes_connection_driver() -> n0_snafu::Result {
    -2781        let m1 = MagicStack::new(RelayMode::Disabled).await;
    -2782        let m2 = MagicStack::new(RelayMode::Disabled).await;
    +2741
    +2742        info!("close");
    +2743        conn.close(0u32.into(), b"done");
    +2744        info!("wait idle");
    +2745        ep.endpoint.endpoint().wait_idle().await;
    +2746
    +2747        Ok(())
    +2748    }
    +2749
    +2750    #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))]
    +2751    async fn echo_sender(
    +2752        ep: MagicStack,
    +2753        dest_id: PublicKey,
    +2754        msg: &[u8],
    +2755        loss: ExpectedLoss,
    +2756    ) -> Result {
    +2757        info!("connecting to {}", dest_id.fmt_short());
    +2758        let dest = NodeAddr::new(dest_id);
    +2759        let conn = ep.endpoint.connect(dest, ALPN).await?;
    +2760
    +2761        info!("opening bi");
    +2762        let (mut send_bi, mut recv_bi) = conn.open_bi().await.context("open bi")?;
    +2763
    +2764        info!("writing message");
    +2765        send_bi.write_all(msg).await.context("write all")?;
    +2766
    +2767        info!("finishing");
    +2768        send_bi.finish().context("finish")?;
    +2769        send_bi.stopped().await.context("stopped")?;
    +2770
    +2771        info!("reading_to_end");
    +2772        let val = recv_bi
    +2773            .read_to_end(usize::MAX)
    +2774            .await
    +2775            .context("read to end")?;
    +2776        assert_eq!(
    +2777            val,
    +2778            msg,
    +2779            "[sender] expected {}, got {}",
    +2780            HEXLOWER.encode(msg),
    +2781            HEXLOWER.encode(&val)
    +2782        );
     2783
    -2784        println!("Net change");
    -2785        m1.endpoint.magic_sock().force_network_change(true).await;
    -2786        tokio::time::sleep(Duration::from_secs(1)).await; // wait for socket rebinding
    -2787
    -2788        let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    -2789
    -2790        let _handle = AbortOnDropHandle::new(tokio::spawn({
    -2791            let endpoint = m2.endpoint.clone();
    -2792            async move {
    -2793                while let Some(incoming) = endpoint.accept().await {
    -2794                    println!("Incoming first conn!");
    -2795                    let conn = incoming.await.e()?;
    -2796                    conn.closed().await;
    -2797                }
    -2798
    -2799                Ok::<_, n0_snafu::Error>(())
    -2800            }
    -2801        }));
    -2802
    -2803        println!("first conn!");
    -2804        let conn = m1
    -2805            .endpoint
    -2806            .connect(m2.endpoint.node_addr().initialized().await?, ALPN)
    -2807            .await?;
    -2808        println!("Closing first conn");
    -2809        conn.close(0u32.into(), b"bye lolz");
    -2810        conn.closed().await;
    -2811        println!("Closed first conn");
    -2812
    -2813        Ok(())
    -2814    }
    -2815
    -2816    #[tokio::test(flavor = "multi_thread")]
    -2817    #[traced_test]
    -2818    async fn test_two_devices_roundtrip_network_change() -> Result {
    -2819        time::timeout(
    -2820            Duration::from_secs(90),
    -2821            test_two_devices_roundtrip_network_change_impl(),
    -2822        )
    -2823        .await
    -2824        .context("timeout")?
    -2825    }
    -2826
    -2827    /// Same structure as `test_two_devices_roundtrip_quinn_magic`, but interrupts regularly
    -2828    /// with (simulated) network changes.
    -2829    async fn test_two_devices_roundtrip_network_change_impl() -> Result {
    -2830        let m1 = MagicStack::new(RelayMode::Disabled).await;
    -2831        let m2 = MagicStack::new(RelayMode::Disabled).await;
    -2832
    -2833        let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    -2834
    -2835        let offset = || {
    -2836            let delay = rand::thread_rng().gen_range(10..=500);
    -2837            Duration::from_millis(delay)
    -2838        };
    -2839        let rounds = 5;
    -2840
    -2841        // Regular network changes to m1 only.
    -2842        let m1_network_change_guard = {
    -2843            let m1 = m1.clone();
    -2844            let task = tokio::spawn(async move {
    -2845                loop {
    -2846                    println!("[m1] network change");
    -2847                    m1.endpoint.magic_sock().force_network_change(true).await;
    -2848                    time::sleep(offset()).await;
    -2849                }
    -2850            });
    -2851            AbortOnDropHandle::new(task)
    -2852        };
    -2853
    -2854        for i in 0..rounds {
    -2855            println!("-- [m1 changes] round {}", i + 1);
    -2856            run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await;
    -2857            run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await;
    -2858
    -2859            println!("-- [m1 changes] larger data");
    -2860            let mut data = vec![0u8; 10 * 1024];
    -2861            rand::thread_rng().fill_bytes(&mut data);
    -2862            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await;
    -2863            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await;
    -2864        }
    -2865
    -2866        std::mem::drop(m1_network_change_guard);
    -2867
    -2868        // Regular network changes to m2 only.
    -2869        let m2_network_change_guard = {
    -2870            let m2 = m2.clone();
    -2871            let task = tokio::spawn(async move {
    -2872                loop {
    -2873                    println!("[m2] network change");
    -2874                    m2.endpoint.magic_sock().force_network_change(true).await;
    -2875                    time::sleep(offset()).await;
    -2876                }
    -2877            });
    -2878            AbortOnDropHandle::new(task)
    -2879        };
    -2880
    -2881        for i in 0..rounds {
    -2882            println!("-- [m2 changes] round {}", i + 1);
    -2883            run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await;
    -2884            run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await;
    -2885
    -2886            println!("-- [m2 changes] larger data");
    -2887            let mut data = vec![0u8; 10 * 1024];
    -2888            rand::thread_rng().fill_bytes(&mut data);
    -2889            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await;
    -2890            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await;
    -2891        }
    +2784        let stats = conn.stats();
    +2785        info!("stats: {:#?}", stats);
    +2786        if matches!(loss, ExpectedLoss::AlmostNone) {
    +2787            assert!(
    +2788                stats.path.lost_packets < 10,
    +2789                "[sender] should not loose many packets",
    +2790            );
    +2791        }
    +2792
    +2793        info!("close");
    +2794        conn.close(0u32.into(), b"done");
    +2795        info!("wait idle");
    +2796        ep.endpoint.endpoint().wait_idle().await;
    +2797        Ok(())
    +2798    }
    +2799
    +2800    #[derive(Debug, Copy, Clone)]
    +2801    enum ExpectedLoss {
    +2802        AlmostNone,
    +2803        YeahSure,
    +2804    }
    +2805
    +2806    /// Runs a roundtrip between the [`echo_sender`] and [`echo_receiver`].
    +2807    async fn run_roundtrip(
    +2808        sender: MagicStack,
    +2809        receiver: MagicStack,
    +2810        payload: &[u8],
    +2811        loss: ExpectedLoss,
    +2812    ) {
    +2813        let send_node_id = sender.endpoint.node_id();
    +2814        let recv_node_id = receiver.endpoint.node_id();
    +2815        info!("\nroundtrip: {send_node_id:#} -> {recv_node_id:#}");
    +2816
    +2817        let receiver_task = tokio::spawn(echo_receiver(receiver, loss));
    +2818        let sender_res = echo_sender(sender, recv_node_id, payload, loss).await;
    +2819        let sender_is_err = match sender_res {
    +2820            Ok(()) => false,
    +2821            Err(err) => {
    +2822                eprintln!("[sender] Error:\n{err:#?}");
    +2823                true
    +2824            }
    +2825        };
    +2826        let receiver_is_err = match receiver_task.await {
    +2827            Ok(Ok(())) => false,
    +2828            Ok(Err(err)) => {
    +2829                eprintln!("[receiver] Error:\n{err:#?}");
    +2830                true
    +2831            }
    +2832            Err(joinerr) => {
    +2833                if joinerr.is_panic() {
    +2834                    std::panic::resume_unwind(joinerr.into_panic());
    +2835                } else {
    +2836                    eprintln!("[receiver] Error:\n{joinerr:#?}");
    +2837                }
    +2838                true
    +2839            }
    +2840        };
    +2841        if sender_is_err || receiver_is_err {
    +2842            panic!("Sender or receiver errored");
    +2843        }
    +2844    }
    +2845
    +2846    #[tokio::test(flavor = "multi_thread")]
    +2847    #[traced_test]
    +2848    async fn test_two_devices_roundtrip_quinn_magic() -> Result {
    +2849        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +2850        let m1 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +2851        let m2 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +2852
    +2853        let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    +2854
    +2855        for i in 0..5 {
    +2856            info!("\n-- round {i}");
    +2857            run_roundtrip(
    +2858                m1.clone(),
    +2859                m2.clone(),
    +2860                b"hello m1",
    +2861                ExpectedLoss::AlmostNone,
    +2862            )
    +2863            .await;
    +2864            run_roundtrip(
    +2865                m2.clone(),
    +2866                m1.clone(),
    +2867                b"hello m2",
    +2868                ExpectedLoss::AlmostNone,
    +2869            )
    +2870            .await;
    +2871
    +2872            info!("\n-- larger data");
    +2873            let mut data = vec![0u8; 10 * 1024];
    +2874            rng.fill_bytes(&mut data);
    +2875            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::AlmostNone).await;
    +2876            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::AlmostNone).await;
    +2877        }
    +2878
    +2879        Ok(())
    +2880    }
    +2881
    +2882    #[tokio::test]
    +2883    #[traced_test]
    +2884    async fn test_regression_network_change_rebind_wakes_connection_driver() -> n0_snafu::Result {
    +2885        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +2886        let m1 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +2887        let m2 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +2888
    +2889        println!("Net change");
    +2890        m1.endpoint.magic_sock().force_network_change(true).await;
    +2891        tokio::time::sleep(Duration::from_secs(1)).await; // wait for socket rebinding
     2892
    -2893        std::mem::drop(m2_network_change_guard);
    +2893        let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
     2894
    -2895        // Regular network changes to both m1 and m2 only.
    -2896        let m1_m2_network_change_guard = {
    -2897            let m1 = m1.clone();
    -2898            let m2 = m2.clone();
    -2899            let task = tokio::spawn(async move {
    -2900                println!("-- [m1] network change");
    -2901                m1.endpoint.magic_sock().force_network_change(true).await;
    -2902                println!("-- [m2] network change");
    -2903                m2.endpoint.magic_sock().force_network_change(true).await;
    -2904                time::sleep(offset()).await;
    -2905            });
    -2906            AbortOnDropHandle::new(task)
    -2907        };
    -2908
    -2909        for i in 0..rounds {
    -2910            println!("-- [m1 & m2 changes] round {}", i + 1);
    -2911            run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await;
    -2912            run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await;
    -2913
    -2914            println!("-- [m1 & m2 changes] larger data");
    -2915            let mut data = vec![0u8; 10 * 1024];
    -2916            rand::thread_rng().fill_bytes(&mut data);
    -2917            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await;
    -2918            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await;
    -2919        }
    -2920
    -2921        std::mem::drop(m1_m2_network_change_guard);
    -2922        Ok(())
    -2923    }
    -2924
    -2925    #[tokio::test(flavor = "multi_thread")]
    -2926    #[traced_test]
    -2927    async fn test_two_devices_setup_teardown() -> Result {
    -2928        for i in 0..10 {
    -2929            println!("-- round {i}");
    -2930            println!("setting up magic stack");
    -2931            let m1 = MagicStack::new(RelayMode::Disabled).await;
    -2932            let m2 = MagicStack::new(RelayMode::Disabled).await;
    -2933
    -2934            let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    +2895        let _handle = AbortOnDropHandle::new(tokio::spawn({
    +2896            let endpoint = m2.endpoint.clone();
    +2897            async move {
    +2898                while let Some(incoming) = endpoint.accept().await {
    +2899                    println!("Incoming first conn!");
    +2900                    let conn = incoming.await.e()?;
    +2901                    conn.closed().await;
    +2902                }
    +2903
    +2904                Ok::<_, n0_snafu::Error>(())
    +2905            }
    +2906        }));
    +2907
    +2908        println!("first conn!");
    +2909        let conn = m1.endpoint.connect(m2.endpoint.node_addr(), ALPN).await?;
    +2910        println!("Closing first conn");
    +2911        conn.close(0u32.into(), b"bye lolz");
    +2912        conn.closed().await;
    +2913        println!("Closed first conn");
    +2914
    +2915        Ok(())
    +2916    }
    +2917
    +2918    #[tokio::test(flavor = "multi_thread")]
    +2919    #[traced_test]
    +2920    async fn test_two_devices_roundtrip_network_change() -> Result {
    +2921        time::timeout(
    +2922            Duration::from_secs(90),
    +2923            test_two_devices_roundtrip_network_change_impl(),
    +2924        )
    +2925        .await
    +2926        .context("timeout")?
    +2927    }
    +2928
    +2929    /// Same structure as `test_two_devices_roundtrip_quinn_magic`, but interrupts regularly
    +2930    /// with (simulated) network changes.
    +2931    async fn test_two_devices_roundtrip_network_change_impl() -> Result {
    +2932        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +2933        let m1 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +2934        let m2 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
     2935
    -2936            println!("closing endpoints");
    -2937            let msock1 = m1.endpoint.magic_sock();
    -2938            let msock2 = m2.endpoint.magic_sock();
    -2939            m1.endpoint.close().await;
    -2940            m2.endpoint.close().await;
    -2941
    -2942            assert!(msock1.msock.is_closed());
    -2943            assert!(msock2.msock.is_closed());
    -2944        }
    -2945        Ok(())
    -2946    }
    -2947
    -2948    #[tokio::test]
    -2949    #[traced_test]
    -2950    async fn test_local_endpoints() {
    -2951        let ms = Handle::new(Default::default()).await.unwrap();
    -2952
    -2953        // See if we can get endpoints.
    -2954        let eps0 = ms.direct_addresses().initialized().await.unwrap();
    -2955        println!("{eps0:?}");
    -2956        assert!(!eps0.is_empty());
    +2936        let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    +2937
    +2938        let offset = |rng: &mut rand_chacha::ChaCha8Rng| {
    +2939            let delay = rng.random_range(10..=500);
    +2940            Duration::from_millis(delay)
    +2941        };
    +2942        let rounds = 5;
    +2943
    +2944        // Regular network changes to m1 only.
    +2945        let m1_network_change_guard = {
    +2946            let m1 = m1.clone();
    +2947            let mut rng = rng.clone();
    +2948            let task = tokio::spawn(async move {
    +2949                loop {
    +2950                    println!("[m1] network change");
    +2951                    m1.endpoint.magic_sock().force_network_change(true).await;
    +2952                    time::sleep(offset(&mut rng)).await;
    +2953                }
    +2954            });
    +2955            AbortOnDropHandle::new(task)
    +2956        };
     2957
    -2958        // Getting the endpoints again immediately should give the same results.
    -2959        let eps1 = ms.direct_addresses().initialized().await.unwrap();
    -2960        println!("{eps1:?}");
    -2961        assert_eq!(eps0, eps1);
    -2962    }
    -2963
    -2964    /// Creates a new [`quinn::Endpoint`] hooked up to a [`MagicSock`].
    -2965    ///
    -2966    /// This is without involving [`crate::endpoint::Endpoint`].  The socket will accept
    -2967    /// connections using [`ALPN`].
    -2968    ///
    -2969    /// Use [`magicsock_connect`] to establish connections.
    -2970    #[instrument(name = "ep", skip_all, fields(me = secret_key.public().fmt_short()))]
    -2971    async fn magicsock_ep(secret_key: SecretKey) -> Result<Handle> {
    -2972        let quic_server_config =
    -2973            tls::TlsConfig::new(secret_key.clone()).make_server_config(vec![ALPN.to_vec()], true);
    -2974        let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
    -2975        server_config.transport_config(Arc::new(quinn::TransportConfig::default()));
    -2976
    -2977        let dns_resolver = DnsResolver::new();
    -2978        let opts = Options {
    -2979            addr_v4: None,
    -2980            addr_v6: None,
    -2981            secret_key: secret_key.clone(),
    -2982            relay_map: RelayMap::empty(),
    -2983            relay_protocol: iroh_relay::http::Protocol::default(),
    -2984            node_map: None,
    -2985            discovery: None,
    -2986            discovery_user_data: None,
    -2987            dns_resolver,
    -2988            proxy_url: None,
    -2989            server_config,
    -2990            insecure_skip_relay_cert_verify: false,
    -2991            path_selection: PathSelection::default(),
    -2992            metrics: Default::default(),
    -2993        };
    -2994        let msock = MagicSock::spawn(opts).await?;
    -2995        Ok(msock)
    -2996    }
    +2958        for i in 0..rounds {
    +2959            println!("-- [m1 changes] round {}", i + 1);
    +2960            run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await;
    +2961            run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await;
    +2962
    +2963            println!("-- [m1 changes] larger data");
    +2964            let mut data = vec![0u8; 10 * 1024];
    +2965            rng.fill_bytes(&mut data);
    +2966            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await;
    +2967            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await;
    +2968        }
    +2969
    +2970        std::mem::drop(m1_network_change_guard);
    +2971
    +2972        // Regular network changes to m2 only.
    +2973        let m2_network_change_guard = {
    +2974            let m2 = m2.clone();
    +2975            let mut rng = rng.clone();
    +2976            let task = tokio::spawn(async move {
    +2977                loop {
    +2978                    println!("[m2] network change");
    +2979                    m2.endpoint.magic_sock().force_network_change(true).await;
    +2980                    time::sleep(offset(&mut rng)).await;
    +2981                }
    +2982            });
    +2983            AbortOnDropHandle::new(task)
    +2984        };
    +2985
    +2986        for i in 0..rounds {
    +2987            println!("-- [m2 changes] round {}", i + 1);
    +2988            run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await;
    +2989            run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await;
    +2990
    +2991            println!("-- [m2 changes] larger data");
    +2992            let mut data = vec![0u8; 10 * 1024];
    +2993            rng.fill_bytes(&mut data);
    +2994            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await;
    +2995            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await;
    +2996        }
     2997
    -2998    /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`.
    -2999    ///
    -3000    /// Uses [`ALPN`], `node_id`, must match `addr`.
    -3001    #[instrument(name = "connect", skip_all, fields(me = ep_secret_key.public().fmt_short()))]
    -3002    async fn magicsock_connect(
    -3003        ep: &quinn::Endpoint,
    -3004        ep_secret_key: SecretKey,
    -3005        addr: NodeIdMappedAddr,
    -3006        node_id: NodeId,
    -3007    ) -> Result<quinn::Connection> {
    -3008        // Endpoint::connect sets this, do the same to have similar behaviour.
    -3009        let mut transport_config = quinn::TransportConfig::default();
    -3010        transport_config.keep_alive_interval(Some(Duration::from_secs(1)));
    -3011
    -3012        magicsock_connect_with_transport_config(
    -3013            ep,
    -3014            ep_secret_key,
    -3015            addr,
    -3016            node_id,
    -3017            Arc::new(transport_config),
    -3018        )
    -3019        .await
    -3020    }
    -3021
    -3022    /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`.
    -3023    ///
    -3024    /// This version allows customising the transport config.
    -3025    ///
    -3026    /// Uses [`ALPN`], `node_id`, must match `addr`.
    -3027    #[instrument(name = "connect", skip_all, fields(me = ep_secret_key.public().fmt_short()))]
    -3028    async fn magicsock_connect_with_transport_config(
    -3029        ep: &quinn::Endpoint,
    -3030        ep_secret_key: SecretKey,
    -3031        mapped_addr: NodeIdMappedAddr,
    -3032        node_id: NodeId,
    -3033        transport_config: Arc<quinn::TransportConfig>,
    -3034    ) -> Result<quinn::Connection> {
    -3035        let alpns = vec![ALPN.to_vec()];
    -3036        let quic_client_config =
    -3037            tls::TlsConfig::new(ep_secret_key.clone()).make_client_config(alpns, true);
    -3038        let mut client_config = quinn::ClientConfig::new(Arc::new(quic_client_config));
    -3039        client_config.transport_config(transport_config);
    -3040        let connect = ep
    -3041            .connect_with(
    -3042                client_config,
    -3043                mapped_addr.private_socket_addr(),
    -3044                &tls::name::encode(node_id),
    -3045            )
    -3046            .context("connect")?;
    -3047        let connection = connect.await.e()?;
    -3048        Ok(connection)
    -3049    }
    -3050
    -3051    #[tokio::test]
    -3052    #[traced_test]
    -3053    async fn test_try_send_no_send_addr() {
    -3054        // Regression test: if there is no send_addr we should keep being able to use the
    -3055        // Endpoint.
    -3056
    -3057        let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]);
    -3058        let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]);
    -3059        let node_id_2 = secret_key_2.public();
    -3060        let secret_key_missing_node = SecretKey::from_bytes(&[255u8; 32]);
    -3061        let node_id_missing_node = secret_key_missing_node.public();
    -3062
    -3063        let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap();
    -3064
    -3065        // Generate an address not present in the NodeMap.
    -3066        let bad_addr = NodeIdMappedAddr::generate();
    -3067
    -3068        // 500ms is rather fast here.  Running this locally it should always be the correct
    -3069        // timeout.  If this is too slow however the test will not become flaky as we are
    -3070        // expecting the timeout, we might just get the timeout for the wrong reason.  But
    -3071        // this speeds up the test.
    -3072        let res = tokio::time::timeout(
    -3073            Duration::from_millis(500),
    -3074            magicsock_connect(
    -3075                msock_1.endpoint(),
    -3076                secret_key_1.clone(),
    -3077                bad_addr,
    -3078                node_id_missing_node,
    -3079            ),
    -3080        )
    -3081        .await;
    -3082        assert!(res.is_err(), "expecting timeout");
    -3083
    -3084        // Now check we can still create another connection with this endpoint.
    -3085        let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap();
    -3086
    -3087        // This needs an accept task
    -3088        let accept_task = tokio::spawn({
    -3089            async fn accept(ep: quinn::Endpoint) -> Result<()> {
    -3090                let incoming = ep.accept().await.context("no incoming")?;
    -3091                let _conn = incoming
    -3092                    .accept()
    -3093                    .context("accept")?
    -3094                    .await
    -3095                    .context("connecting")?;
    -3096
    -3097                // Keep this connection alive for a while
    -3098                tokio::time::sleep(Duration::from_secs(10)).await;
    -3099                info!("accept finished");
    -3100                Ok(())
    -3101            }
    -3102            let ep = msock_2.endpoint().clone();
    -3103            async move {
    -3104                if let Err(err) = accept(ep).await {
    -3105                    error!("{err:#}");
    -3106                }
    -3107            }
    -3108            .instrument(info_span!("ep2.accept, me = node_id_2.fmt_short()"))
    -3109        });
    -3110        let _accept_task = AbortOnDropHandle::new(accept_task);
    -3111
    -3112        let node_addr_2 = NodeAddr {
    -3113            node_id: node_id_2,
    -3114            relay_url: None,
    -3115            direct_addresses: msock_2
    -3116                .direct_addresses()
    -3117                .initialized()
    -3118                .await
    -3119                .expect("no direct addrs")
    -3120                .into_iter()
    -3121                .map(|x| x.addr)
    -3122                .collect(),
    -3123        };
    -3124        msock_1
    -3125            .add_node_addr(
    -3126                node_addr_2,
    -3127                Source::NamedApp {
    -3128                    name: "test".into(),
    -3129                },
    -3130            )
    -3131            .unwrap();
    -3132        let addr = msock_1.get_mapping_addr(node_id_2).unwrap();
    -3133        let res = tokio::time::timeout(
    -3134            Duration::from_secs(10),
    -3135            magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr, node_id_2),
    -3136        )
    -3137        .await
    -3138        .expect("timeout while connecting");
    -3139
    -3140        // aka assert!(res.is_ok()) but with nicer error reporting.
    -3141        res.unwrap();
    -3142
    -3143        // TODO: Now check if we can connect to a repaired ep_3, but we can't modify that
    -3144        // much internal state for now.
    -3145    }
    -3146
    -3147    #[tokio::test]
    -3148    #[traced_test]
    -3149    async fn test_try_send_no_udp_addr_or_relay_url() {
    -3150        // This specifically tests the `if udp_addr.is_none() && relay_url.is_none()`
    -3151        // behaviour of MagicSock::try_send.
    -3152
    -3153        let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]);
    -3154        let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]);
    -3155        let node_id_2 = secret_key_2.public();
    -3156
    -3157        let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap();
    -3158        let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap();
    -3159        let ep_2 = msock_2.endpoint().clone();
    -3160
    -3161        // We need a task to accept the connection.
    -3162        let accept_task = tokio::spawn({
    -3163            async fn accept(ep: quinn::Endpoint) -> Result<()> {
    -3164                let incoming = ep.accept().await.context("no incoming")?;
    -3165                let conn = incoming
    -3166                    .accept()
    -3167                    .context("accept")?
    -3168                    .await
    -3169                    .context("connecting")?;
    -3170                let mut stream = conn.accept_uni().await.context("accept uni")?;
    -3171                stream.read_to_end(1 << 16).await.context("read to end")?;
    -3172                info!("accept finished");
    -3173                Ok(())
    -3174            }
    -3175            async move {
    -3176                if let Err(err) = accept(ep_2).await {
    -3177                    error!("{err:#}");
    -3178                }
    -3179            }
    -3180            .instrument(info_span!("ep2.accept", me = node_id_2.fmt_short()))
    -3181        });
    -3182        let _accept_task = AbortOnDropHandle::new(accept_task);
    -3183
    -3184        // Add an empty entry in the NodeMap of ep_1
    -3185        msock_1.node_map.add_node_addr(
    -3186            NodeAddr {
    -3187                node_id: node_id_2,
    -3188                relay_url: None,
    -3189                direct_addresses: Default::default(),
    -3190            },
    -3191            Source::NamedApp {
    -3192                name: "test".into(),
    -3193            },
    -3194            &msock_1.metrics.magicsock,
    -3195        );
    -3196        let addr_2 = msock_1.get_mapping_addr(node_id_2).unwrap();
    -3197
    -3198        // Set a low max_idle_timeout so quinn gives up on this quickly and our test does
    -3199        // not take forever.  You need to check the log output to verify this is really
    -3200        // triggering the correct error.
    -3201        // In test_try_send_no_send_addr() above you may have noticed we used
    -3202        // tokio::time::timeout() on the connection attempt instead.  Here however we want
    -3203        // Quinn itself to have fully given up on the connection attempt because we will
    -3204        // later connect to **the same** node.  If Quinn did not give up on the connection
    -3205        // we'd close it on drop, and the retransmits of the close packets would interfere
    -3206        // with the next handshake, closing it during the handshake.  This makes the test a
    -3207        // little slower though.
    -3208        let mut transport_config = quinn::TransportConfig::default();
    -3209        transport_config.max_idle_timeout(Some(Duration::from_millis(200).try_into().unwrap()));
    -3210        let res = magicsock_connect_with_transport_config(
    -3211            msock_1.endpoint(),
    -3212            secret_key_1.clone(),
    -3213            addr_2,
    -3214            node_id_2,
    -3215            Arc::new(transport_config),
    -3216        )
    -3217        .await;
    -3218        assert!(res.is_err(), "expected timeout");
    -3219        info!("first connect timed out as expected");
    -3220
    -3221        // Provide correct addressing information
    -3222        msock_1.node_map.add_node_addr(
    -3223            NodeAddr {
    -3224                node_id: node_id_2,
    -3225                relay_url: None,
    -3226                direct_addresses: msock_2
    -3227                    .direct_addresses()
    -3228                    .initialized()
    -3229                    .await
    -3230                    .expect("no direct addrs")
    -3231                    .into_iter()
    -3232                    .map(|x| x.addr)
    -3233                    .collect(),
    -3234            },
    -3235            Source::NamedApp {
    -3236                name: "test".into(),
    -3237            },
    -3238            &msock_1.metrics.magicsock,
    -3239        );
    -3240
    -3241        // We can now connect
    -3242        tokio::time::timeout(Duration::from_secs(10), async move {
    -3243            info!("establishing new connection");
    -3244            let conn =
    -3245                magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr_2, node_id_2)
    -3246                    .await
    -3247                    .unwrap();
    -3248            info!("have connection");
    -3249            let mut stream = conn.open_uni().await.unwrap();
    -3250            stream.write_all(b"hello").await.unwrap();
    -3251            stream.finish().unwrap();
    -3252            stream.stopped().await.unwrap();
    -3253            info!("finished stream");
    -3254        })
    -3255        .await
    -3256        .expect("connection timed out");
    +2998        std::mem::drop(m2_network_change_guard);
    +2999
    +3000        // Regular network changes to both m1 and m2 only.
    +3001        let m1_m2_network_change_guard = {
    +3002            let m1 = m1.clone();
    +3003            let m2 = m2.clone();
    +3004            let mut rng = rng.clone();
    +3005            let task = tokio::spawn(async move {
    +3006                println!("-- [m1] network change");
    +3007                m1.endpoint.magic_sock().force_network_change(true).await;
    +3008                println!("-- [m2] network change");
    +3009                m2.endpoint.magic_sock().force_network_change(true).await;
    +3010                time::sleep(offset(&mut rng)).await;
    +3011            });
    +3012            AbortOnDropHandle::new(task)
    +3013        };
    +3014
    +3015        for i in 0..rounds {
    +3016            println!("-- [m1 & m2 changes] round {}", i + 1);
    +3017            run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await;
    +3018            run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await;
    +3019
    +3020            println!("-- [m1 & m2 changes] larger data");
    +3021            let mut data = vec![0u8; 10 * 1024];
    +3022            rng.fill_bytes(&mut data);
    +3023            run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await;
    +3024            run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await;
    +3025        }
    +3026
    +3027        std::mem::drop(m1_m2_network_change_guard);
    +3028        Ok(())
    +3029    }
    +3030
    +3031    #[tokio::test(flavor = "multi_thread")]
    +3032    #[traced_test]
    +3033    async fn test_two_devices_setup_teardown() -> Result {
    +3034        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +3035        for i in 0..10 {
    +3036            println!("-- round {i}");
    +3037            println!("setting up magic stack");
    +3038            let m1 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +3039            let m2 = MagicStack::new(&mut rng, RelayMode::Disabled).await;
    +3040
    +3041            let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?;
    +3042
    +3043            println!("closing endpoints");
    +3044            let msock1 = m1.endpoint.magic_sock();
    +3045            let msock2 = m2.endpoint.magic_sock();
    +3046            m1.endpoint.close().await;
    +3047            m2.endpoint.close().await;
    +3048
    +3049            assert!(msock1.msock.is_closed());
    +3050            assert!(msock2.msock.is_closed());
    +3051        }
    +3052        Ok(())
    +3053    }
    +3054
    +3055    #[tokio::test]
    +3056    #[traced_test]
    +3057    async fn test_direct_addresses() {
    +3058        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +3059        let ms = Handle::new(default_options(&mut rng)).await.unwrap();
    +3060
    +3061        // See if we can get endpoints.
    +3062        let eps0 = ms.direct_addresses().get();
    +3063        println!("{eps0:?}");
    +3064        assert!(!eps0.is_empty());
    +3065
    +3066        // Getting the endpoints again immediately should give the same results.
    +3067        let eps1 = ms.direct_addresses().get();
    +3068        println!("{eps1:?}");
    +3069        assert_eq!(eps0, eps1);
    +3070    }
    +3071
    +3072    /// Creates a new [`quinn::Endpoint`] hooked up to a [`MagicSock`].
    +3073    ///
    +3074    /// This is without involving [`crate::endpoint::Endpoint`].  The socket will accept
    +3075    /// connections using [`ALPN`].
    +3076    ///
    +3077    /// Use [`magicsock_connect`] to establish connections.
    +3078    #[instrument(name = "ep", skip_all, fields(me = %secret_key.public().fmt_short()))]
    +3079    async fn magicsock_ep(secret_key: SecretKey) -> Result<Handle> {
    +3080        let quic_server_config = tls::TlsConfig::new(secret_key.clone(), DEFAULT_MAX_TLS_TICKETS)
    +3081            .make_server_config(vec![ALPN.to_vec()], true);
    +3082        let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config));
    +3083        server_config.transport_config(Arc::new(quinn::TransportConfig::default()));
    +3084
    +3085        let dns_resolver = DnsResolver::new();
    +3086        let opts = Options {
    +3087            addr_v4: None,
    +3088            addr_v6: None,
    +3089            secret_key: secret_key.clone(),
    +3090            relay_map: RelayMap::empty(),
    +3091            discovery: Default::default(),
    +3092            discovery_user_data: None,
    +3093            dns_resolver,
    +3094            proxy_url: None,
    +3095            server_config,
    +3096            insecure_skip_relay_cert_verify: false,
    +3097            path_selection: PathSelection::default(),
    +3098            metrics: Default::default(),
    +3099        };
    +3100        let msock = MagicSock::spawn(opts).await?;
    +3101        Ok(msock)
    +3102    }
    +3103
    +3104    /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`.
    +3105    ///
    +3106    /// Uses [`ALPN`], `node_id`, must match `addr`.
    +3107    #[instrument(name = "connect", skip_all, fields(me = %ep_secret_key.public().fmt_short()))]
    +3108    async fn magicsock_connect(
    +3109        ep: &quinn::Endpoint,
    +3110        ep_secret_key: SecretKey,
    +3111        addr: NodeIdMappedAddr,
    +3112        node_id: NodeId,
    +3113    ) -> Result<quinn::Connection> {
    +3114        // Endpoint::connect sets this, do the same to have similar behaviour.
    +3115        let mut transport_config = quinn::TransportConfig::default();
    +3116        transport_config.keep_alive_interval(Some(Duration::from_secs(1)));
    +3117
    +3118        magicsock_connect_with_transport_config(
    +3119            ep,
    +3120            ep_secret_key,
    +3121            addr,
    +3122            node_id,
    +3123            Arc::new(transport_config),
    +3124        )
    +3125        .await
    +3126    }
    +3127
    +3128    /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`.
    +3129    ///
    +3130    /// This version allows customising the transport config.
    +3131    ///
    +3132    /// Uses [`ALPN`], `node_id`, must match `addr`.
    +3133    #[instrument(name = "connect", skip_all, fields(me = %ep_secret_key.public().fmt_short()))]
    +3134    async fn magicsock_connect_with_transport_config(
    +3135        ep: &quinn::Endpoint,
    +3136        ep_secret_key: SecretKey,
    +3137        mapped_addr: NodeIdMappedAddr,
    +3138        node_id: NodeId,
    +3139        transport_config: Arc<quinn::TransportConfig>,
    +3140    ) -> Result<quinn::Connection> {
    +3141        let alpns = vec![ALPN.to_vec()];
    +3142        let quic_client_config =
    +3143            tls::TlsConfig::new(ep_secret_key.clone(), DEFAULT_MAX_TLS_TICKETS)
    +3144                .make_client_config(alpns, true);
    +3145        let mut client_config = quinn::ClientConfig::new(Arc::new(quic_client_config));
    +3146        client_config.transport_config(transport_config);
    +3147        let connect = ep
    +3148            .connect_with(
    +3149                client_config,
    +3150                mapped_addr.private_socket_addr(),
    +3151                &tls::name::encode(node_id),
    +3152            )
    +3153            .context("connect")?;
    +3154        let connection = connect.await.e()?;
    +3155        Ok(connection)
    +3156    }
    +3157
    +3158    #[tokio::test]
    +3159    #[traced_test]
    +3160    async fn test_try_send_no_send_addr() {
    +3161        // Regression test: if there is no send_addr we should keep being able to use the
    +3162        // Endpoint.
    +3163
    +3164        let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]);
    +3165        let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]);
    +3166        let node_id_2 = secret_key_2.public();
    +3167        let secret_key_missing_node = SecretKey::from_bytes(&[255u8; 32]);
    +3168        let node_id_missing_node = secret_key_missing_node.public();
    +3169
    +3170        let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap();
    +3171
    +3172        // Generate an address not present in the NodeMap.
    +3173        let bad_addr = NodeIdMappedAddr::generate();
    +3174
    +3175        // 500ms is rather fast here.  Running this locally it should always be the correct
    +3176        // timeout.  If this is too slow however the test will not become flaky as we are
    +3177        // expecting the timeout, we might just get the timeout for the wrong reason.  But
    +3178        // this speeds up the test.
    +3179        let res = tokio::time::timeout(
    +3180            Duration::from_millis(500),
    +3181            magicsock_connect(
    +3182                msock_1.endpoint(),
    +3183                secret_key_1.clone(),
    +3184                bad_addr,
    +3185                node_id_missing_node,
    +3186            ),
    +3187        )
    +3188        .await;
    +3189        assert!(res.is_err(), "expecting timeout");
    +3190
    +3191        // Now check we can still create another connection with this endpoint.
    +3192        let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap();
    +3193
    +3194        // This needs an accept task
    +3195        let accept_task = tokio::spawn({
    +3196            async fn accept(ep: quinn::Endpoint) -> Result<()> {
    +3197                let incoming = ep.accept().await.context("no incoming")?;
    +3198                let _conn = incoming
    +3199                    .accept()
    +3200                    .context("accept")?
    +3201                    .await
    +3202                    .context("connecting")?;
    +3203
    +3204                // Keep this connection alive for a while
    +3205                tokio::time::sleep(Duration::from_secs(10)).await;
    +3206                info!("accept finished");
    +3207                Ok(())
    +3208            }
    +3209            let ep = msock_2.endpoint().clone();
    +3210            async move {
    +3211                if let Err(err) = accept(ep).await {
    +3212                    error!("{err:#}");
    +3213                }
    +3214            }
    +3215            .instrument(info_span!("ep2.accept, me = node_id_2.fmt_short()"))
    +3216        });
    +3217        let _accept_task = AbortOnDropHandle::new(accept_task);
    +3218
    +3219        let node_addr_2 = NodeAddr {
    +3220            node_id: node_id_2,
    +3221            relay_url: None,
    +3222            direct_addresses: msock_2
    +3223                .direct_addresses()
    +3224                .get()
    +3225                .into_iter()
    +3226                .map(|x| x.addr)
    +3227                .collect(),
    +3228        };
    +3229        msock_1
    +3230            .add_node_addr(
    +3231                node_addr_2,
    +3232                Source::NamedApp {
    +3233                    name: "test".into(),
    +3234                },
    +3235            )
    +3236            .unwrap();
    +3237        let addr = msock_1.get_mapping_addr(node_id_2).unwrap();
    +3238        let res = tokio::time::timeout(
    +3239            Duration::from_secs(10),
    +3240            magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr, node_id_2),
    +3241        )
    +3242        .await
    +3243        .expect("timeout while connecting");
    +3244
    +3245        // aka assert!(res.is_ok()) but with nicer error reporting.
    +3246        res.unwrap();
    +3247
    +3248        // TODO: Now check if we can connect to a repaired ep_3, but we can't modify that
    +3249        // much internal state for now.
    +3250    }
    +3251
    +3252    #[tokio::test]
    +3253    #[traced_test]
    +3254    async fn test_try_send_no_udp_addr_or_relay_url() {
    +3255        // This specifically tests the `if udp_addr.is_none() && relay_url.is_none()`
    +3256        // behaviour of MagicSock::try_send.
     3257
    -3258        // TODO: could remove the addresses again, send, add it back and see it recover.
    -3259        // But we don't have that much private access to the NodeMap.  This will do for now.
    -3260    }
    +3258        let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]);
    +3259        let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]);
    +3260        let node_id_2 = secret_key_2.public();
     3261
    -3262    #[tokio::test]
    -3263    async fn test_add_node_addr() -> Result {
    -3264        let stack = MagicStack::new(RelayMode::Default).await;
    -3265        let mut rng = rand::thread_rng();
    -3266
    -3267        assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 0);
    -3268
    -3269        // Empty
    -3270        let empty_addr = NodeAddr {
    -3271            node_id: SecretKey::generate(&mut rng).public(),
    -3272            relay_url: None,
    -3273            direct_addresses: Default::default(),
    -3274        };
    -3275        let err = stack
    -3276            .endpoint
    -3277            .magic_sock()
    -3278            .add_node_addr(empty_addr, node_map::Source::App)
    -3279            .unwrap_err();
    -3280        assert!(err
    -3281            .to_string()
    -3282            .to_lowercase()
    -3283            .contains("empty addressing info"));
    -3284
    -3285        // relay url only
    -3286        let addr = NodeAddr {
    -3287            node_id: SecretKey::generate(&mut rng).public(),
    -3288            relay_url: Some("http://my-relay.com".parse().unwrap()),
    -3289            direct_addresses: Default::default(),
    -3290        };
    -3291        stack
    -3292            .endpoint
    -3293            .magic_sock()
    -3294            .add_node_addr(addr, node_map::Source::App)?;
    -3295        assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 1);
    -3296
    -3297        // addrs only
    -3298        let addr = NodeAddr {
    -3299            node_id: SecretKey::generate(&mut rng).public(),
    -3300            relay_url: None,
    -3301            direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(),
    -3302        };
    -3303        stack
    -3304            .endpoint
    -3305            .magic_sock()
    -3306            .add_node_addr(addr, node_map::Source::App)?;
    -3307        assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 2);
    -3308
    -3309        // both
    -3310        let addr = NodeAddr {
    -3311            node_id: SecretKey::generate(&mut rng).public(),
    -3312            relay_url: Some("http://my-relay.com".parse().unwrap()),
    -3313            direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(),
    -3314        };
    -3315        stack
    -3316            .endpoint
    -3317            .magic_sock()
    -3318            .add_node_addr(addr, node_map::Source::App)?;
    -3319        assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 3);
    -3320
    -3321        Ok(())
    -3322    }
    -3323}
    \ No newline at end of file +3262 let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap(); +3263 let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap(); +3264 let ep_2 = msock_2.endpoint().clone(); +3265 +3266 // We need a task to accept the connection. +3267 let accept_task = tokio::spawn({ +3268 async fn accept(ep: quinn::Endpoint) -> Result<()> { +3269 let incoming = ep.accept().await.context("no incoming")?; +3270 let conn = incoming +3271 .accept() +3272 .context("accept")? +3273 .await +3274 .context("connecting")?; +3275 let mut stream = conn.accept_uni().await.context("accept uni")?; +3276 stream.read_to_end(1 << 16).await.context("read to end")?; +3277 info!("accept finished"); +3278 Ok(()) +3279 } +3280 async move { +3281 if let Err(err) = accept(ep_2).await { +3282 error!("{err:#}"); +3283 } +3284 } +3285 .instrument(info_span!("ep2.accept", me = %node_id_2.fmt_short())) +3286 }); +3287 let _accept_task = AbortOnDropHandle::new(accept_task); +3288 +3289 // Add an empty entry in the NodeMap of ep_1 +3290 msock_1.node_map.add_node_addr( +3291 NodeAddr { +3292 node_id: node_id_2, +3293 relay_url: None, +3294 direct_addresses: Default::default(), +3295 }, +3296 Source::NamedApp { +3297 name: "test".into(), +3298 }, +3299 true, +3300 &msock_1.metrics.magicsock, +3301 ); +3302 let addr_2 = msock_1.get_mapping_addr(node_id_2).unwrap(); +3303 +3304 // Set a low max_idle_timeout so quinn gives up on this quickly and our test does +3305 // not take forever. You need to check the log output to verify this is really +3306 // triggering the correct error. +3307 // In test_try_send_no_send_addr() above you may have noticed we used +3308 // tokio::time::timeout() on the connection attempt instead. Here however we want +3309 // Quinn itself to have fully given up on the connection attempt because we will +3310 // later connect to **the same** node. If Quinn did not give up on the connection +3311 // we'd close it on drop, and the retransmits of the close packets would interfere +3312 // with the next handshake, closing it during the handshake. This makes the test a +3313 // little slower though. +3314 let mut transport_config = quinn::TransportConfig::default(); +3315 transport_config.max_idle_timeout(Some(Duration::from_millis(200).try_into().unwrap())); +3316 let res = magicsock_connect_with_transport_config( +3317 msock_1.endpoint(), +3318 secret_key_1.clone(), +3319 addr_2, +3320 node_id_2, +3321 Arc::new(transport_config), +3322 ) +3323 .await; +3324 assert!(res.is_err(), "expected timeout"); +3325 info!("first connect timed out as expected"); +3326 +3327 // Provide correct addressing information +3328 msock_1.node_map.add_node_addr( +3329 NodeAddr { +3330 node_id: node_id_2, +3331 relay_url: None, +3332 direct_addresses: msock_2 +3333 .direct_addresses() +3334 .get() +3335 .into_iter() +3336 .map(|x| x.addr) +3337 .collect(), +3338 }, +3339 Source::NamedApp { +3340 name: "test".into(), +3341 }, +3342 true, +3343 &msock_1.metrics.magicsock, +3344 ); +3345 +3346 // We can now connect +3347 tokio::time::timeout(Duration::from_secs(10), async move { +3348 info!("establishing new connection"); +3349 let conn = +3350 magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr_2, node_id_2) +3351 .await +3352 .unwrap(); +3353 info!("have connection"); +3354 let mut stream = conn.open_uni().await.unwrap(); +3355 stream.write_all(b"hello").await.unwrap(); +3356 stream.finish().unwrap(); +3357 stream.stopped().await.unwrap(); +3358 info!("finished stream"); +3359 }) +3360 .await +3361 .expect("connection timed out"); +3362 +3363 // TODO: could remove the addresses again, send, add it back and see it recover. +3364 // But we don't have that much private access to the NodeMap. This will do for now. +3365 } +3366 +3367 #[tokio::test] +3368 async fn test_add_node_addr() -> Result { +3369 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +3370 let stack = MagicStack::new(&mut rng, RelayMode::Default).await; +3371 +3372 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 0); +3373 +3374 // Empty +3375 let empty_addr = NodeAddr { +3376 node_id: SecretKey::generate(&mut rng).public(), +3377 relay_url: None, +3378 direct_addresses: Default::default(), +3379 }; +3380 let err = stack +3381 .endpoint +3382 .magic_sock() +3383 .add_node_addr(empty_addr, node_map::Source::App) +3384 .unwrap_err(); +3385 assert!( +3386 err.to_string() +3387 .to_lowercase() +3388 .contains("empty addressing info") +3389 ); +3390 +3391 // relay url only +3392 let addr = NodeAddr { +3393 node_id: SecretKey::generate(&mut rng).public(), +3394 relay_url: Some("http://my-relay.com".parse().unwrap()), +3395 direct_addresses: Default::default(), +3396 }; +3397 stack +3398 .endpoint +3399 .magic_sock() +3400 .add_node_addr(addr, node_map::Source::App)?; +3401 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 1); +3402 +3403 // addrs only +3404 let addr = NodeAddr { +3405 node_id: SecretKey::generate(&mut rng).public(), +3406 relay_url: None, +3407 direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), +3408 }; +3409 stack +3410 .endpoint +3411 .magic_sock() +3412 .add_node_addr(addr, node_map::Source::App)?; +3413 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 2); +3414 +3415 // both +3416 let addr = NodeAddr { +3417 node_id: SecretKey::generate(&mut rng).public(), +3418 relay_url: Some("http://my-relay.com".parse().unwrap()), +3419 direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), +3420 }; +3421 stack +3422 .endpoint +3423 .magic_sock() +3424 .add_node_addr(addr, node_map::Source::App)?; +3425 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 3); +3426 +3427 Ok(()) +3428 } +3429}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/metrics.rs.html b/pr/3367/docs/src/iroh/magicsock/metrics.rs.html index 9f387432e2..34292147bc 100644 --- a/pr/3367/docs/src/iroh/magicsock/metrics.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/metrics.rs.html @@ -1,12 +1,12 @@ -metrics.rs - source

    iroh/magicsock/
    metrics.rs

    1use iroh_metrics::{Counter, MetricsGroup};
    +metrics.rs - source

    iroh/magicsock/
    metrics.rs

    1use iroh_metrics::{Counter, Histogram, MetricsGroup};
     2use serde::{Deserialize, Serialize};
     3
     4/// Enum of metrics for the module
     5// TODO(frando): Add description doc strings for each metric.
     6#[allow(missing_docs)]
    -7#[derive(Debug, Default, Serialize, Deserialize, MetricsGroup)]
    +7#[derive(Debug, Serialize, Deserialize, MetricsGroup)]
     8#[non_exhaustive]
    -9#[metrics(name = "magicsock")]
    +9#[metrics(name = "magicsock", default)]
     10pub struct Metrics {
     11    pub update_direct_addrs: Counter,
     12
    @@ -77,4 +77,23 @@
     77    pub connection_handshake_success: Counter,
     78    /// Number of connections with a successful handshake that became direct.
     79    pub connection_became_direct: Counter,
    -80}
    \ No newline at end of file +80 +81 /* +82 * Path Congestion Metrics +83 */ +84 /// Number of times a path was marked as outdated due to consecutive ping failures. +85 pub path_marked_outdated: Counter, +86 /// Number of ping failures recorded across all paths. +87 pub path_ping_failures: Counter, +88 /// Number of consecutive failure resets (path recovered). +89 pub path_failure_resets: Counter, +90 /// Histogram of packet loss rates (0.0-1.0) observed on UDP paths. +91 #[default(Histogram::new(vec![0.0, 0.01, 0.05, 0.1, 0.2, 0.5, 1.0]))] +92 pub path_packet_loss_rate: Histogram, +93 /// Histogram of RTT variance (in milliseconds) as a congestion indicator. +94 #[default(Histogram::new(vec![0.0, 1.0, 5.0, 10.0, 20.0, 50.0, 100.0, 200.0]))] +95 pub path_rtt_variance_ms: Histogram, +96 /// Histogram of path quality scores (0.0-1.0). +97 #[default(Histogram::new(vec![0.0, 0.3, 0.5, 0.7, 0.85, 0.95, 1.0]))] +98 pub path_quality_score: Histogram, +99}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/node_map.rs.html b/pr/3367/docs/src/iroh/magicsock/node_map.rs.html index 1555befd9c..247fb51ec5 100644 --- a/pr/3367/docs/src/iroh/magicsock/node_map.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/node_map.rs.html @@ -1,891 +1,935 @@ -node_map.rs - source

    iroh/magicsock/
    node_map.rs

    1use std::{
    -2    collections::{hash_map::Entry, BTreeSet, HashMap},
    +node_map.rs - source

    iroh/magicsock/
    node_map.rs

    1use std::{
    +2    collections::{BTreeSet, HashMap, hash_map::Entry},
     3    hash::Hash,
     4    net::{IpAddr, SocketAddr},
     5    sync::Mutex,
    -6};
    -7
    -8use iroh_base::{NodeAddr, NodeId, PublicKey, RelayUrl};
    -9use n0_future::time::Instant;
    -10use serde::{Deserialize, Serialize};
    -11use stun_rs::TransactionId;
    -12use tracing::{debug, info, instrument, trace, warn};
    -13
    -14use self::{
    -15    best_addr::ClearReason,
    -16    node_state::{NodeState, Options, PingHandled},
    -17};
    -18use super::{metrics::Metrics, transports, ActorMessage, NodeIdMappedAddr};
    -19use crate::disco::{CallMeMaybe, Pong, SendAddr};
    -20#[cfg(any(test, feature = "test-utils"))]
    -21use crate::endpoint::PathSelection;
    -22
    -23mod best_addr;
    -24mod node_state;
    -25mod path_state;
    -26mod udp_paths;
    -27
    -28pub use node_state::{ConnectionType, ControlMsg, DirectAddrInfo, RemoteInfo};
    -29pub(super) use node_state::{DiscoPingPurpose, PingAction, PingRole, SendPing};
    -30
    -31/// Number of nodes that are inactive for which we keep info about. This limit is enforced
    -32/// periodically via [`NodeMap::prune_inactive`].
    -33const MAX_INACTIVE_NODES: usize = 30;
    -34
    -35/// Map of the [`NodeState`] information for all the known nodes.
    +6    time::Duration,
    +7};
    +8
    +9use iroh_base::{NodeAddr, NodeId, PublicKey, RelayUrl};
    +10use n0_future::time::Instant;
    +11use serde::{Deserialize, Serialize};
    +12use stun_rs::TransactionId;
    +13use tracing::{debug, info, instrument, trace, warn};
    +14
    +15use self::node_state::{NodeState, Options, PingHandled};
    +16use super::{ActorMessage, NodeIdMappedAddr, metrics::Metrics, transports};
    +17use crate::disco::{CallMeMaybe, Pong, SendAddr};
    +18#[cfg(any(test, feature = "test-utils"))]
    +19use crate::endpoint::PathSelection;
    +20
    +21mod node_state;
    +22mod path_state;
    +23mod path_validity;
    +24mod udp_paths;
    +25
    +26pub use node_state::{ConnectionType, ControlMsg, DirectAddrInfo};
    +27pub(super) use node_state::{DiscoPingPurpose, PingAction, PingRole, RemoteInfo, SendPing};
    +28
    +29/// Number of nodes that are inactive for which we keep info about. This limit is enforced
    +30/// periodically via [`NodeMap::prune_inactive`].
    +31const MAX_INACTIVE_NODES: usize = 30;
    +32
    +33/// Map of the [`NodeState`] information for all the known nodes.
    +34///
    +35/// The nodes can be looked up by:
     36///
    -37/// The nodes can be looked up by:
    -38///
    -39/// - The node's ID in this map, only useful if you know the ID from an insert or lookup.
    -40///   This is static and never changes.
    -41///
    -42/// - The [`NodeIdMappedAddr`] which internally identifies the node to the QUIC stack.  This
    -43///   is static and never changes.
    -44///
    -45/// - The nodes's public key, aka `PublicKey` or "node_key".  This is static and never changes,
    -46///   however a node could be added when this is not yet known.
    -47///
    -48/// - A public socket address on which they are reachable on the internet, known as ip-port.
    -49///   These come and go as the node moves around on the internet
    -50///
    -51/// An index of nodeInfos by node key, NodeIdMappedAddr, and discovered ip:port endpoints.
    -52#[derive(Debug, Default)]
    -53pub(super) struct NodeMap {
    -54    inner: Mutex<NodeMapInner>,
    -55}
    -56
    -57#[derive(Default, Debug)]
    -58pub(super) struct NodeMapInner {
    -59    by_node_key: HashMap<NodeId, usize>,
    -60    by_ip_port: HashMap<IpPort, usize>,
    -61    by_quic_mapped_addr: HashMap<NodeIdMappedAddr, usize>,
    -62    by_id: HashMap<usize, NodeState>,
    -63    next_id: usize,
    -64    #[cfg(any(test, feature = "test-utils"))]
    -65    path_selection: PathSelection,
    -66}
    -67
    -68/// Identifier to look up a [`NodeState`] in the [`NodeMap`].
    -69///
    -70/// You can look up entries in [`NodeMap`] with various keys, depending on the context you
    -71/// have for the node.  These are all the keys the [`NodeMap`] can use.
    -72#[derive(Debug, Clone)]
    -73enum NodeStateKey {
    -74    Idx(usize),
    -75    NodeId(NodeId),
    -76    NodeIdMappedAddr(NodeIdMappedAddr),
    -77    IpPort(IpPort),
    -78}
    -79
    -80/// The origin or *source* through which an address associated with a remote node
    -81/// was discovered.
    -82///
    -83/// An aggregate of the [`Source`]s of all the addresses of a node describe the
    -84/// [`Source`]s of the node itself.
    -85///
    -86/// A [`Source`] helps track how and where an address was learned. Multiple
    -87/// sources can be associated with a single address, if we have discovered this
    -88/// address through multiple means.
    -89///
    -90/// Each time a [`NodeAddr`] is added to the node map, usually through
    -91/// [`crate::endpoint::Endpoint::add_node_addr_with_source`], a [`Source`] must be supplied to indicate
    -92/// how the address was obtained.
    -93///
    -94/// A [`Source`] can describe a variety of places that an address or node was
    -95/// discovered, such as a configured discovery service, the network itself
    -96/// (if another node has reached out to us), or as a user supplied [`NodeAddr`].
    -97
    -98#[derive(Serialize, Deserialize, strum::Display, Debug, Clone, Eq, PartialEq, Hash)]
    -99#[strum(serialize_all = "kebab-case")]
    -100pub enum Source {
    -101    /// Address was loaded from the fs.
    -102    Saved,
    -103    /// A node communicated with us first via UDP.
    -104    Udp,
    -105    /// A node communicated with us first via relay.
    -106    Relay,
    -107    /// Application layer added the address directly.
    -108    App,
    -109    /// The address was discovered by a discovery service.
    -110    #[strum(serialize = "{name}")]
    -111    Discovery {
    -112        /// The name of the discovery service that discovered the address.
    -113        name: String,
    -114    },
    -115    /// Application layer with a specific name added the node directly.
    -116    #[strum(serialize = "{name}")]
    -117    NamedApp {
    -118        /// The name of the application that added the node
    -119        name: String,
    -120    },
    -121}
    -122
    -123impl NodeMap {
    -124    #[cfg(not(any(test, feature = "test-utils")))]
    -125    /// Create a new [`NodeMap`] from a list of [`NodeAddr`]s.
    -126    pub(super) fn load_from_vec(nodes: Vec<NodeAddr>, metrics: &Metrics) -> Self {
    -127        Self::from_inner(NodeMapInner::load_from_vec(nodes, metrics))
    -128    }
    -129
    -130    #[cfg(any(test, feature = "test-utils"))]
    -131    /// Create a new [`NodeMap`] from a list of [`NodeAddr`]s.
    -132    pub(super) fn load_from_vec(
    -133        nodes: Vec<NodeAddr>,
    -134        path_selection: PathSelection,
    -135        metrics: &Metrics,
    -136    ) -> Self {
    -137        Self::from_inner(NodeMapInner::load_from_vec(nodes, path_selection, metrics))
    -138    }
    -139
    -140    fn from_inner(inner: NodeMapInner) -> Self {
    -141        Self {
    -142            inner: Mutex::new(inner),
    -143        }
    -144    }
    -145
    -146    /// Add the contact information for a node.
    -147    pub(super) fn add_node_addr(&self, node_addr: NodeAddr, source: Source, metrics: &Metrics) {
    -148        self.inner
    -149            .lock()
    -150            .expect("poisoned")
    -151            .add_node_addr(node_addr, source, metrics)
    -152    }
    -153
    -154    /// Number of nodes currently listed.
    -155    pub(super) fn node_count(&self) -> usize {
    -156        self.inner.lock().expect("poisoned").node_count()
    -157    }
    -158
    -159    #[cfg(not(wasm_browser))]
    -160    pub(super) fn receive_udp(
    -161        &self,
    -162        udp_addr: SocketAddr,
    -163    ) -> Option<(PublicKey, NodeIdMappedAddr)> {
    -164        self.inner.lock().expect("poisoned").receive_udp(udp_addr)
    -165    }
    -166
    -167    pub(super) fn receive_relay(&self, relay_url: &RelayUrl, src: NodeId) -> NodeIdMappedAddr {
    -168        self.inner
    -169            .lock()
    -170            .expect("poisoned")
    -171            .receive_relay(relay_url, src)
    -172    }
    -173
    -174    pub(super) fn notify_ping_sent(
    -175        &self,
    -176        id: usize,
    -177        dst: SendAddr,
    -178        tx_id: stun_rs::TransactionId,
    -179        purpose: DiscoPingPurpose,
    -180        msg_sender: tokio::sync::mpsc::Sender<ActorMessage>,
    -181    ) {
    -182        if let Some(ep) = self
    -183            .inner
    -184            .lock()
    -185            .expect("poisoned")
    -186            .get_mut(NodeStateKey::Idx(id))
    -187        {
    -188            ep.ping_sent(dst, tx_id, purpose, msg_sender);
    -189        }
    -190    }
    -191
    -192    pub(super) fn notify_ping_timeout(&self, id: usize, tx_id: stun_rs::TransactionId) {
    -193        if let Some(ep) = self
    -194            .inner
    -195            .lock()
    -196            .expect("poisoned")
    -197            .get_mut(NodeStateKey::Idx(id))
    -198        {
    -199            ep.ping_timeout(tx_id);
    -200        }
    -201    }
    -202
    -203    pub(super) fn get_quic_mapped_addr_for_node_key(
    -204        &self,
    -205        node_key: NodeId,
    -206    ) -> Option<NodeIdMappedAddr> {
    -207        self.inner
    -208            .lock()
    -209            .expect("poisoned")
    -210            .get(NodeStateKey::NodeId(node_key))
    -211            .map(|ep| *ep.quic_mapped_addr())
    -212    }
    -213
    -214    /// Insert a received ping into the node map, and return whether a ping with this tx_id was already
    -215    /// received.
    -216    pub(super) fn handle_ping(
    -217        &self,
    -218        sender: PublicKey,
    -219        src: SendAddr,
    -220        tx_id: TransactionId,
    -221    ) -> PingHandled {
    -222        self.inner
    -223            .lock()
    -224            .expect("poisoned")
    -225            .handle_ping(sender, src, tx_id)
    -226    }
    -227
    -228    pub(super) fn handle_pong(&self, sender: PublicKey, src: &transports::Addr, pong: Pong) {
    -229        self.inner
    -230            .lock()
    -231            .expect("poisoned")
    -232            .handle_pong(sender, src, pong)
    -233    }
    -234
    -235    #[must_use = "actions must be handled"]
    -236    pub(super) fn handle_call_me_maybe(
    +37/// - The node's ID in this map, only useful if you know the ID from an insert or lookup.
    +38///   This is static and never changes.
    +39///
    +40/// - The [`NodeIdMappedAddr`] which internally identifies the node to the QUIC stack.  This
    +41///   is static and never changes.
    +42///
    +43/// - The nodes's public key, aka `PublicKey` or "node_key".  This is static and never changes,
    +44///   however a node could be added when this is not yet known.
    +45///
    +46/// - A public socket address on which they are reachable on the internet, known as ip-port.
    +47///   These come and go as the node moves around on the internet
    +48///
    +49/// An index of nodeInfos by node key, NodeIdMappedAddr, and discovered ip:port endpoints.
    +50#[derive(Debug, Default)]
    +51pub(super) struct NodeMap {
    +52    inner: Mutex<NodeMapInner>,
    +53}
    +54
    +55#[derive(Default, Debug)]
    +56pub(super) struct NodeMapInner {
    +57    by_node_key: HashMap<NodeId, usize>,
    +58    by_ip_port: HashMap<IpPort, usize>,
    +59    by_quic_mapped_addr: HashMap<NodeIdMappedAddr, usize>,
    +60    by_id: HashMap<usize, NodeState>,
    +61    next_id: usize,
    +62    #[cfg(any(test, feature = "test-utils"))]
    +63    path_selection: PathSelection,
    +64}
    +65
    +66/// Identifier to look up a [`NodeState`] in the [`NodeMap`].
    +67///
    +68/// You can look up entries in [`NodeMap`] with various keys, depending on the context you
    +69/// have for the node.  These are all the keys the [`NodeMap`] can use.
    +70#[derive(Debug, Clone)]
    +71enum NodeStateKey {
    +72    Idx(usize),
    +73    NodeId(NodeId),
    +74    NodeIdMappedAddr(NodeIdMappedAddr),
    +75    IpPort(IpPort),
    +76}
    +77
    +78/// The origin or *source* through which an address associated with a remote node
    +79/// was discovered.
    +80///
    +81/// An aggregate of the [`Source`]s of all the addresses of a node describe the
    +82/// [`Source`]s of the node itself.
    +83///
    +84/// A [`Source`] helps track how and where an address was learned. Multiple
    +85/// sources can be associated with a single address, if we have discovered this
    +86/// address through multiple means.
    +87///
    +88/// Each time a [`NodeAddr`] is added to the node map a [`Source`] must be supplied to indicate
    +89/// how the address was obtained.
    +90///
    +91/// A [`Source`] can describe a variety of places that an address or node was
    +92/// discovered, such as a configured discovery service, the network itself
    +93/// (if another node has reached out to us), or as a user supplied [`NodeAddr`].
    +94
    +95#[derive(Serialize, Deserialize, strum::Display, Debug, Clone, Eq, PartialEq, Hash)]
    +96#[strum(serialize_all = "kebab-case")]
    +97pub enum Source {
    +98    /// Address was loaded from the fs.
    +99    Saved,
    +100    /// A node communicated with us first via UDP.
    +101    Udp,
    +102    /// A node communicated with us first via relay.
    +103    Relay,
    +104    /// Application layer added the address directly.
    +105    App,
    +106    /// The address was discovered by a discovery service.
    +107    #[strum(serialize = "{name}")]
    +108    Discovery {
    +109        /// The name of the discovery service that discovered the address.
    +110        name: String,
    +111    },
    +112    /// Application layer with a specific name added the node directly.
    +113    #[strum(serialize = "{name}")]
    +114    NamedApp {
    +115        /// The name of the application that added the node
    +116        name: String,
    +117    },
    +118}
    +119
    +120impl NodeMap {
    +121    /// Create a new [`NodeMap`] from a list of [`NodeAddr`]s.
    +122    pub(super) fn load_from_vec(
    +123        nodes: Vec<NodeAddr>,
    +124        #[cfg(any(test, feature = "test-utils"))] path_selection: PathSelection,
    +125        have_ipv6: bool,
    +126        metrics: &Metrics,
    +127    ) -> Self {
    +128        Self::from_inner(NodeMapInner::load_from_vec(
    +129            nodes,
    +130            #[cfg(any(test, feature = "test-utils"))]
    +131            path_selection,
    +132            have_ipv6,
    +133            metrics,
    +134        ))
    +135    }
    +136
    +137    fn from_inner(inner: NodeMapInner) -> Self {
    +138        Self {
    +139            inner: Mutex::new(inner),
    +140        }
    +141    }
    +142
    +143    /// Add the contact information for a node.
    +144    pub(super) fn add_node_addr(
    +145        &self,
    +146        node_addr: NodeAddr,
    +147        source: Source,
    +148        have_v6: bool,
    +149        metrics: &Metrics,
    +150    ) {
    +151        self.inner
    +152            .lock()
    +153            .expect("poisoned")
    +154            .add_node_addr(node_addr, source, have_v6, metrics)
    +155    }
    +156
    +157    /// Number of nodes currently listed.
    +158    pub(super) fn node_count(&self) -> usize {
    +159        self.inner.lock().expect("poisoned").node_count()
    +160    }
    +161
    +162    #[cfg(not(wasm_browser))]
    +163    pub(super) fn receive_udp(
    +164        &self,
    +165        udp_addr: SocketAddr,
    +166    ) -> Option<(PublicKey, NodeIdMappedAddr)> {
    +167        self.inner.lock().expect("poisoned").receive_udp(udp_addr)
    +168    }
    +169
    +170    pub(super) fn receive_relay(&self, relay_url: &RelayUrl, src: NodeId) -> NodeIdMappedAddr {
    +171        self.inner
    +172            .lock()
    +173            .expect("poisoned")
    +174            .receive_relay(relay_url, src)
    +175    }
    +176
    +177    pub(super) fn notify_ping_sent(
    +178        &self,
    +179        id: usize,
    +180        dst: SendAddr,
    +181        tx_id: stun_rs::TransactionId,
    +182        purpose: DiscoPingPurpose,
    +183        msg_sender: tokio::sync::mpsc::Sender<ActorMessage>,
    +184    ) {
    +185        if let Some(ep) = self
    +186            .inner
    +187            .lock()
    +188            .expect("poisoned")
    +189            .get_mut(NodeStateKey::Idx(id))
    +190        {
    +191            ep.ping_sent(dst, tx_id, purpose, msg_sender);
    +192        }
    +193    }
    +194
    +195    pub(super) fn notify_ping_timeout(
    +196        &self,
    +197        id: usize,
    +198        tx_id: stun_rs::TransactionId,
    +199        metrics: &Metrics,
    +200    ) {
    +201        if let Some(ep) = self
    +202            .inner
    +203            .lock()
    +204            .expect("poisoned")
    +205            .get_mut(NodeStateKey::Idx(id))
    +206        {
    +207            ep.ping_timeout(tx_id, Instant::now(), metrics);
    +208        }
    +209    }
    +210
    +211    pub(super) fn get_quic_mapped_addr_for_node_key(
    +212        &self,
    +213        node_key: NodeId,
    +214    ) -> Option<NodeIdMappedAddr> {
    +215        self.inner
    +216            .lock()
    +217            .expect("poisoned")
    +218            .get(NodeStateKey::NodeId(node_key))
    +219            .map(|ep| *ep.quic_mapped_addr())
    +220    }
    +221
    +222    /// Insert a received ping into the node map, and return whether a ping with this tx_id was already
    +223    /// received.
    +224    pub(super) fn handle_ping(
    +225        &self,
    +226        sender: PublicKey,
    +227        src: SendAddr,
    +228        tx_id: TransactionId,
    +229    ) -> PingHandled {
    +230        self.inner
    +231            .lock()
    +232            .expect("poisoned")
    +233            .handle_ping(sender, src, tx_id)
    +234    }
    +235
    +236    pub(super) fn handle_pong(
     237        &self,
     238        sender: PublicKey,
    -239        cm: CallMeMaybe,
    -240        metrics: &Metrics,
    -241    ) -> Vec<PingAction> {
    -242        self.inner
    -243            .lock()
    -244            .expect("poisoned")
    -245            .handle_call_me_maybe(sender, cm, metrics)
    -246    }
    -247
    -248    #[allow(clippy::type_complexity)]
    -249    pub(super) fn get_send_addrs(
    -250        &self,
    -251        addr: NodeIdMappedAddr,
    -252        have_ipv6: bool,
    -253        metrics: &Metrics,
    -254    ) -> Option<(
    -255        PublicKey,
    -256        Option<SocketAddr>,
    -257        Option<RelayUrl>,
    -258        Vec<PingAction>,
    -259    )> {
    -260        let mut inner = self.inner.lock().expect("poisoned");
    -261        let ep = inner.get_mut(NodeStateKey::NodeIdMappedAddr(addr))?;
    -262        let public_key = *ep.public_key();
    -263        trace!(dest = %addr, node_id = %public_key.fmt_short(), "dst mapped to NodeId");
    -264        let (udp_addr, relay_url, ping_actions) = ep.get_send_addrs(have_ipv6, metrics);
    -265        Some((public_key, udp_addr, relay_url, ping_actions))
    -266    }
    -267
    -268    pub(super) fn reset_node_states(&self) {
    -269        let mut inner = self.inner.lock().expect("poisoned");
    -270        for (_, ep) in inner.node_states_mut() {
    -271            ep.note_connectivity_change();
    -272        }
    -273    }
    -274
    -275    pub(super) fn nodes_stayin_alive(&self) -> Vec<PingAction> {
    -276        let mut inner = self.inner.lock().expect("poisoned");
    -277        inner
    -278            .node_states_mut()
    -279            .flat_map(|(_idx, node_state)| node_state.stayin_alive())
    -280            .collect()
    -281    }
    -282
    -283    /// Returns the [`RemoteInfo`]s for each node in the node map.
    -284    pub(super) fn list_remote_infos(&self, now: Instant) -> Vec<RemoteInfo> {
    -285        // NOTE: calls to this method will often call `into_iter` (or similar methods). Note that
    -286        // we can't avoid `collect` here since it would hold a lock for an indefinite time. Even if
    -287        // we were to find this acceptable, dealing with the lifetimes of the mutex's guard and the
    -288        // internal iterator will be a hassle, if possible at all.
    -289        self.inner
    -290            .lock()
    -291            .expect("poisoned")
    -292            .remote_infos_iter(now)
    -293            .collect()
    -294    }
    -295
    -296    /// Returns a [`n0_watcher::Direct`] for given node's [`ConnectionType`].
    -297    ///
    -298    /// # Errors
    -299    ///
    -300    /// Will return `None` if there is not an entry in the [`NodeMap`] for
    -301    /// the `node_id`
    -302    pub(super) fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    -303        self.inner.lock().expect("poisoned").conn_type(node_id)
    -304    }
    -305
    -306    /// Get the [`RemoteInfo`]s for the node identified by [`NodeId`].
    -307    pub(super) fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    -308        self.inner.lock().expect("poisoned").remote_info(node_id)
    -309    }
    -310
    -311    /// Prunes nodes without recent activity so that at most [`MAX_INACTIVE_NODES`] are kept.
    -312    pub(super) fn prune_inactive(&self) {
    -313        self.inner.lock().expect("poisoned").prune_inactive();
    -314    }
    -315
    -316    pub(crate) fn on_direct_addr_discovered(&self, discovered: BTreeSet<SocketAddr>) {
    -317        self.inner
    -318            .lock()
    -319            .expect("poisoned")
    -320            .on_direct_addr_discovered(discovered);
    -321    }
    -322}
    -323
    -324impl NodeMapInner {
    -325    #[cfg(not(any(test, feature = "test-utils")))]
    -326    /// Create a new [`NodeMap`] from a list of [`NodeAddr`]s.
    -327    fn load_from_vec(nodes: Vec<NodeAddr>, metrics: &Metrics) -> Self {
    -328        let mut me = Self::default();
    -329        for node_addr in nodes {
    -330            me.add_node_addr(node_addr, Source::Saved, metrics);
    -331        }
    -332        me
    -333    }
    -334
    -335    #[cfg(any(test, feature = "test-utils"))]
    -336    /// Create a new [`NodeMap`] from a list of [`NodeAddr`]s.
    -337    fn load_from_vec(
    -338        nodes: Vec<NodeAddr>,
    -339        path_selection: PathSelection,
    -340        metrics: &Metrics,
    -341    ) -> Self {
    -342        let mut me = Self {
    -343            path_selection,
    -344            ..Default::default()
    -345        };
    -346        for node_addr in nodes {
    -347            me.add_node_addr(node_addr, Source::Saved, metrics);
    -348        }
    -349        me
    -350    }
    -351
    -352    /// Add the contact information for a node.
    -353    #[instrument(skip_all, fields(node = %node_addr.node_id.fmt_short()))]
    -354    fn add_node_addr(&mut self, node_addr: NodeAddr, source: Source, metrics: &Metrics) {
    -355        let source0 = source.clone();
    -356        let node_id = node_addr.node_id;
    -357        let relay_url = node_addr.relay_url.clone();
    -358        #[cfg(any(test, feature = "test-utils"))]
    -359        let path_selection = self.path_selection;
    -360        let node_state = self.get_or_insert_with(NodeStateKey::NodeId(node_id), || Options {
    -361            node_id,
    -362            relay_url,
    -363            active: false,
    -364            source,
    -365            #[cfg(any(test, feature = "test-utils"))]
    -366            path_selection,
    -367        });
    -368        node_state.update_from_node_addr(
    -369            node_addr.relay_url.as_ref(),
    -370            &node_addr.direct_addresses,
    -371            source0,
    -372            metrics,
    -373        );
    -374        let id = node_state.id();
    -375        for addr in node_addr.direct_addresses() {
    -376            self.set_node_state_for_ip_port(*addr, id);
    -377        }
    -378    }
    -379
    -380    /// Prunes direct addresses from nodes that claim to share an address we know points to us.
    -381    pub(super) fn on_direct_addr_discovered(&mut self, discovered: BTreeSet<SocketAddr>) {
    -382        for addr in discovered {
    -383            self.remove_by_ipp(addr.into(), ClearReason::MatchesOurLocalAddr)
    -384        }
    -385    }
    -386
    -387    /// Removes a direct address from a node.
    -388    fn remove_by_ipp(&mut self, ipp: IpPort, reason: ClearReason) {
    -389        if let Some(id) = self.by_ip_port.remove(&ipp) {
    -390            if let Entry::Occupied(mut entry) = self.by_id.entry(id) {
    -391                let node = entry.get_mut();
    -392                node.remove_direct_addr(&ipp, reason);
    -393                if node.direct_addresses().count() == 0 {
    -394                    let node_id = node.public_key();
    -395                    let mapped_addr = node.quic_mapped_addr();
    -396                    self.by_node_key.remove(node_id);
    -397                    self.by_quic_mapped_addr.remove(mapped_addr);
    -398                    debug!(node_id=%node_id.fmt_short(), ?reason, "removing node");
    -399                    entry.remove();
    -400                }
    -401            }
    -402        }
    -403    }
    -404
    -405    fn get_id(&self, id: NodeStateKey) -> Option<usize> {
    -406        match id {
    -407            NodeStateKey::Idx(id) => Some(id),
    -408            NodeStateKey::NodeId(node_key) => self.by_node_key.get(&node_key).copied(),
    -409            NodeStateKey::NodeIdMappedAddr(addr) => self.by_quic_mapped_addr.get(&addr).copied(),
    -410            NodeStateKey::IpPort(ipp) => self.by_ip_port.get(&ipp).copied(),
    -411        }
    -412    }
    -413
    -414    fn get_mut(&mut self, id: NodeStateKey) -> Option<&mut NodeState> {
    -415        self.get_id(id).and_then(|id| self.by_id.get_mut(&id))
    -416    }
    -417
    -418    fn get(&self, id: NodeStateKey) -> Option<&NodeState> {
    -419        self.get_id(id).and_then(|id| self.by_id.get(&id))
    -420    }
    -421
    -422    fn get_or_insert_with(
    -423        &mut self,
    -424        id: NodeStateKey,
    -425        f: impl FnOnce() -> Options,
    -426    ) -> &mut NodeState {
    -427        let id = self.get_id(id);
    +239        src: &transports::Addr,
    +240        pong: Pong,
    +241        metrics: &Metrics,
    +242    ) {
    +243        self.inner
    +244            .lock()
    +245            .expect("poisoned")
    +246            .handle_pong(sender, src, pong, metrics)
    +247    }
    +248
    +249    #[must_use = "actions must be handled"]
    +250    pub(super) fn handle_call_me_maybe(
    +251        &self,
    +252        sender: PublicKey,
    +253        cm: CallMeMaybe,
    +254        metrics: &Metrics,
    +255    ) -> Vec<PingAction> {
    +256        self.inner
    +257            .lock()
    +258            .expect("poisoned")
    +259            .handle_call_me_maybe(sender, cm, metrics)
    +260    }
    +261
    +262    #[allow(clippy::type_complexity)]
    +263    pub(super) fn get_send_addrs(
    +264        &self,
    +265        addr: NodeIdMappedAddr,
    +266        have_ipv6: bool,
    +267        metrics: &Metrics,
    +268    ) -> Option<(
    +269        PublicKey,
    +270        Option<SocketAddr>,
    +271        Option<RelayUrl>,
    +272        Vec<PingAction>,
    +273    )> {
    +274        let mut inner = self.inner.lock().expect("poisoned");
    +275        let ep = inner.get_mut(NodeStateKey::NodeIdMappedAddr(addr))?;
    +276        let public_key = *ep.public_key();
    +277        trace!(dest = %addr, node_id = %public_key.fmt_short(), "dst mapped to NodeId");
    +278        let (udp_addr, relay_url, ping_actions) = ep.get_send_addrs(have_ipv6, metrics);
    +279        Some((public_key, udp_addr, relay_url, ping_actions))
    +280    }
    +281
    +282    pub(super) fn reset_node_states(&self, metrics: &Metrics) {
    +283        let now = Instant::now();
    +284        let mut inner = self.inner.lock().expect("poisoned");
    +285        for (_, ep) in inner.node_states_mut() {
    +286            ep.note_connectivity_change(now, metrics);
    +287        }
    +288    }
    +289
    +290    pub(super) fn nodes_stayin_alive(&self, have_ipv6: bool) -> Vec<PingAction> {
    +291        let mut inner = self.inner.lock().expect("poisoned");
    +292        inner
    +293            .node_states_mut()
    +294            .flat_map(|(_idx, node_state)| node_state.stayin_alive(have_ipv6))
    +295            .collect()
    +296    }
    +297
    +298    /// Returns the [`RemoteInfo`]s for each node in the node map.
    +299    #[cfg(test)]
    +300    pub(super) fn list_remote_infos(&self, now: Instant) -> Vec<RemoteInfo> {
    +301        // NOTE: calls to this method will often call `into_iter` (or similar methods). Note that
    +302        // we can't avoid `collect` here since it would hold a lock for an indefinite time. Even if
    +303        // we were to find this acceptable, dealing with the lifetimes of the mutex's guard and the
    +304        // internal iterator will be a hassle, if possible at all.
    +305        self.inner
    +306            .lock()
    +307            .expect("poisoned")
    +308            .remote_infos_iter(now)
    +309            .collect()
    +310    }
    +311
    +312    /// Returns a [`n0_watcher::Direct`] for given node's [`ConnectionType`].
    +313    ///
    +314    /// # Errors
    +315    ///
    +316    /// Will return `None` if there is not an entry in the [`NodeMap`] for
    +317    /// the `node_id`
    +318    pub(super) fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    +319        self.inner.lock().expect("poisoned").conn_type(node_id)
    +320    }
    +321
    +322    pub(super) fn latency(&self, node_id: NodeId) -> Option<Duration> {
    +323        self.inner.lock().expect("poisoned").latency(node_id)
    +324    }
    +325
    +326    /// Get the [`RemoteInfo`]s for the node identified by [`NodeId`].
    +327    pub(super) fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    +328        self.inner.lock().expect("poisoned").remote_info(node_id)
    +329    }
    +330
    +331    /// Prunes nodes without recent activity so that at most [`MAX_INACTIVE_NODES`] are kept.
    +332    pub(super) fn prune_inactive(&self) {
    +333        self.inner.lock().expect("poisoned").prune_inactive();
    +334    }
    +335
    +336    pub(crate) fn on_direct_addr_discovered(&self, discovered: BTreeSet<SocketAddr>) {
    +337        self.inner
    +338            .lock()
    +339            .expect("poisoned")
    +340            .on_direct_addr_discovered(discovered, Instant::now());
    +341    }
    +342}
    +343
    +344impl NodeMapInner {
    +345    /// Create a new [`NodeMap`] from a list of [`NodeAddr`]s.
    +346    fn load_from_vec(
    +347        nodes: Vec<NodeAddr>,
    +348        #[cfg(any(test, feature = "test-utils"))] path_selection: PathSelection,
    +349        have_ipv6: bool,
    +350        metrics: &Metrics,
    +351    ) -> Self {
    +352        let mut me = Self {
    +353            #[cfg(any(test, feature = "test-utils"))]
    +354            path_selection,
    +355            ..Default::default()
    +356        };
    +357        for node_addr in nodes {
    +358            me.add_node_addr(node_addr, Source::Saved, have_ipv6, metrics);
    +359        }
    +360        me
    +361    }
    +362
    +363    /// Add the contact information for a node.
    +364    #[instrument(skip_all, fields(node = %node_addr.node_id.fmt_short()))]
    +365    fn add_node_addr(
    +366        &mut self,
    +367        node_addr: NodeAddr,
    +368        source: Source,
    +369        have_ipv6: bool,
    +370        metrics: &Metrics,
    +371    ) {
    +372        let source0 = source.clone();
    +373        let node_id = node_addr.node_id;
    +374        let relay_url = node_addr.relay_url.clone();
    +375        #[cfg(any(test, feature = "test-utils"))]
    +376        let path_selection = self.path_selection;
    +377        let node_state = self.get_or_insert_with(NodeStateKey::NodeId(node_id), || Options {
    +378            node_id,
    +379            relay_url,
    +380            active: false,
    +381            source,
    +382            #[cfg(any(test, feature = "test-utils"))]
    +383            path_selection,
    +384        });
    +385        node_state.update_from_node_addr(
    +386            node_addr.relay_url.as_ref(),
    +387            &node_addr.direct_addresses,
    +388            source0,
    +389            have_ipv6,
    +390            metrics,
    +391        );
    +392        let id = node_state.id();
    +393        for addr in node_addr.direct_addresses() {
    +394            self.set_node_state_for_ip_port(*addr, id);
    +395        }
    +396    }
    +397
    +398    /// Prunes direct addresses from nodes that claim to share an address we know points to us.
    +399    pub(super) fn on_direct_addr_discovered(
    +400        &mut self,
    +401        discovered: BTreeSet<SocketAddr>,
    +402        now: Instant,
    +403    ) {
    +404        for addr in discovered {
    +405            self.remove_by_ipp(addr.into(), now, "matches our local addr")
    +406        }
    +407    }
    +408
    +409    /// Removes a direct address from a node.
    +410    fn remove_by_ipp(&mut self, ipp: IpPort, now: Instant, why: &'static str) {
    +411        if let Some(id) = self.by_ip_port.remove(&ipp) {
    +412            if let Entry::Occupied(mut entry) = self.by_id.entry(id) {
    +413                let node = entry.get_mut();
    +414                node.remove_direct_addr(&ipp, now, why);
    +415                if node.direct_addresses().count() == 0 {
    +416                    let node_id = node.public_key();
    +417                    let mapped_addr = node.quic_mapped_addr();
    +418                    self.by_node_key.remove(node_id);
    +419                    self.by_quic_mapped_addr.remove(mapped_addr);
    +420                    debug!(node_id=%node_id.fmt_short(), why, "removing node");
    +421                    entry.remove();
    +422                }
    +423            }
    +424        }
    +425    }
    +426
    +427    fn get_id(&self, id: NodeStateKey) -> Option<usize> {
     428        match id {
    -429            None => self.insert_node(f()),
    -430            Some(id) => self.by_id.get_mut(&id).expect("is not empty"),
    -431        }
    -432    }
    -433
    -434    /// Number of nodes currently listed.
    -435    fn node_count(&self) -> usize {
    -436        self.by_id.len()
    -437    }
    -438
    -439    /// Marks the node we believe to be at `ipp` as recently used.
    -440    #[cfg(not(wasm_browser))]
    -441    fn receive_udp(&mut self, udp_addr: SocketAddr) -> Option<(NodeId, NodeIdMappedAddr)> {
    -442        let ip_port: IpPort = udp_addr.into();
    -443        let Some(node_state) = self.get_mut(NodeStateKey::IpPort(ip_port)) else {
    -444            trace!(src=%udp_addr, "receive_udp: no node_state found for addr, ignore");
    -445            return None;
    -446        };
    -447        node_state.receive_udp(ip_port, Instant::now());
    -448        Some((*node_state.public_key(), *node_state.quic_mapped_addr()))
    -449    }
    -450
    -451    #[instrument(skip_all, fields(src = %src.fmt_short()))]
    -452    fn receive_relay(&mut self, relay_url: &RelayUrl, src: NodeId) -> NodeIdMappedAddr {
    -453        #[cfg(any(test, feature = "test-utils"))]
    -454        let path_selection = self.path_selection;
    -455        let node_state = self.get_or_insert_with(NodeStateKey::NodeId(src), || {
    -456            trace!("packets from unknown node, insert into node map");
    -457            Options {
    -458                node_id: src,
    -459                relay_url: Some(relay_url.clone()),
    -460                active: true,
    -461                source: Source::Relay,
    -462                #[cfg(any(test, feature = "test-utils"))]
    -463                path_selection,
    -464            }
    -465        });
    -466        node_state.receive_relay(relay_url, src, Instant::now());
    -467        *node_state.quic_mapped_addr()
    -468    }
    -469
    -470    fn node_states(&self) -> impl Iterator<Item = (&usize, &NodeState)> {
    -471        self.by_id.iter()
    -472    }
    -473
    -474    fn node_states_mut(&mut self) -> impl Iterator<Item = (&usize, &mut NodeState)> {
    -475        self.by_id.iter_mut()
    -476    }
    -477
    -478    /// Get the [`RemoteInfo`]s for all nodes.
    -479    fn remote_infos_iter(&self, now: Instant) -> impl Iterator<Item = RemoteInfo> + '_ {
    -480        self.node_states().map(move |(_, ep)| ep.info(now))
    -481    }
    -482
    -483    /// Get the [`RemoteInfo`]s for each node.
    -484    fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    -485        self.get(NodeStateKey::NodeId(node_id))
    -486            .map(|ep| ep.info(Instant::now()))
    -487    }
    -488
    -489    /// Returns a stream of [`ConnectionType`].
    -490    ///
    -491    /// Sends the current [`ConnectionType`] whenever any changes to the
    -492    /// connection type for `public_key` has occurred.
    -493    ///
    -494    /// # Errors
    -495    ///
    -496    /// Will return `None` if there is not an entry in the [`NodeMap`] for
    -497    /// the `public_key`
    -498    fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    -499        self.get(NodeStateKey::NodeId(node_id))
    -500            .map(|ep| ep.conn_type())
    -501    }
    -502
    -503    fn handle_pong(&mut self, sender: NodeId, src: &transports::Addr, pong: Pong) {
    -504        if let Some(ns) = self.get_mut(NodeStateKey::NodeId(sender)).as_mut() {
    -505            let insert = ns.handle_pong(&pong, src.clone().into());
    -506            if let Some((src, key)) = insert {
    -507                self.set_node_key_for_ip_port(src, &key);
    -508            }
    -509            trace!(?insert, "received pong")
    -510        } else {
    -511            warn!("received pong: node unknown, ignore")
    -512        }
    -513    }
    -514
    -515    #[must_use = "actions must be handled"]
    -516    fn handle_call_me_maybe(
    -517        &mut self,
    -518        sender: NodeId,
    -519        cm: CallMeMaybe,
    -520        metrics: &Metrics,
    -521    ) -> Vec<PingAction> {
    -522        let ns_id = NodeStateKey::NodeId(sender);
    -523        if let Some(id) = self.get_id(ns_id.clone()) {
    -524            for number in &cm.my_numbers {
    -525                // ensure the new addrs are known
    -526                self.set_node_state_for_ip_port(*number, id);
    -527            }
    -528        }
    -529        match self.get_mut(ns_id) {
    -530            None => {
    -531                debug!("received call-me-maybe: ignore, node is unknown");
    -532                metrics.recv_disco_call_me_maybe_bad_disco.inc();
    -533                vec![]
    -534            }
    -535            Some(ns) => {
    -536                debug!(endpoints = ?cm.my_numbers, "received call-me-maybe");
    -537
    -538                ns.handle_call_me_maybe(cm)
    -539            }
    -540        }
    -541    }
    -542
    -543    fn handle_ping(&mut self, sender: NodeId, src: SendAddr, tx_id: TransactionId) -> PingHandled {
    -544        #[cfg(any(test, feature = "test-utils"))]
    -545        let path_selection = self.path_selection;
    -546        let node_state = self.get_or_insert_with(NodeStateKey::NodeId(sender), || {
    -547            debug!("received ping: node unknown, add to node map");
    -548            let source = if src.is_relay() {
    -549                Source::Relay
    -550            } else {
    -551                Source::Udp
    -552            };
    -553            Options {
    -554                node_id: sender,
    -555                relay_url: src.relay_url(),
    -556                active: true,
    -557                source,
    -558                #[cfg(any(test, feature = "test-utils"))]
    -559                path_selection,
    -560            }
    -561        });
    -562
    -563        let handled = node_state.handle_ping(src.clone(), tx_id);
    -564        if let SendAddr::Udp(ref addr) = src {
    -565            if matches!(handled.role, PingRole::NewPath) {
    -566                self.set_node_key_for_ip_port(*addr, &sender);
    -567            }
    -568        }
    -569        handled
    -570    }
    -571
    -572    /// Inserts a new node into the [`NodeMap`].
    -573    fn insert_node(&mut self, options: Options) -> &mut NodeState {
    -574        info!(
    -575            node = %options.node_id.fmt_short(),
    -576            relay_url = ?options.relay_url,
    -577            source = %options.source,
    -578            "inserting new node in NodeMap",
    -579        );
    -580        let id = self.next_id;
    -581        self.next_id = self.next_id.wrapping_add(1);
    -582        let node_state = NodeState::new(id, options);
    -583
    -584        // update indices
    -585        self.by_quic_mapped_addr
    -586            .insert(*node_state.quic_mapped_addr(), id);
    -587        self.by_node_key.insert(*node_state.public_key(), id);
    -588
    -589        self.by_id.insert(id, node_state);
    -590        self.by_id.get_mut(&id).expect("just inserted")
    -591    }
    -592
    -593    /// Makes future node lookups by ipp return the same endpoint as a lookup by nk.
    -594    ///
    -595    /// This should only be called with a fully verified mapping of ipp to
    -596    /// nk, because calling this function defines the endpoint we hand to
    -597    /// WireGuard for packets received from ipp.
    -598    fn set_node_key_for_ip_port(&mut self, ipp: impl Into<IpPort>, nk: &PublicKey) {
    -599        let ipp = ipp.into();
    -600        if let Some(id) = self.by_ip_port.get(&ipp) {
    -601            if !self.by_node_key.contains_key(nk) {
    -602                self.by_node_key.insert(*nk, *id);
    -603            }
    -604            self.by_ip_port.remove(&ipp);
    -605        }
    -606        if let Some(id) = self.by_node_key.get(nk) {
    -607            trace!("insert ip -> id: {:?} -> {}", ipp, id);
    -608            self.by_ip_port.insert(ipp, *id);
    -609        }
    -610    }
    -611
    -612    fn set_node_state_for_ip_port(&mut self, ipp: impl Into<IpPort>, id: usize) {
    -613        let ipp = ipp.into();
    -614        trace!(?ipp, ?id, "set endpoint for ip:port");
    -615        self.by_ip_port.insert(ipp, id);
    -616    }
    -617
    -618    /// Prunes nodes without recent activity so that at most [`MAX_INACTIVE_NODES`] are kept.
    -619    fn prune_inactive(&mut self) {
    -620        let now = Instant::now();
    -621        let mut prune_candidates: Vec<_> = self
    -622            .by_id
    -623            .values()
    -624            .filter(|node| !node.is_active(&now))
    -625            .map(|node| (*node.public_key(), node.last_used()))
    -626            .collect();
    +429            NodeStateKey::Idx(id) => Some(id),
    +430            NodeStateKey::NodeId(node_key) => self.by_node_key.get(&node_key).copied(),
    +431            NodeStateKey::NodeIdMappedAddr(addr) => self.by_quic_mapped_addr.get(&addr).copied(),
    +432            NodeStateKey::IpPort(ipp) => self.by_ip_port.get(&ipp).copied(),
    +433        }
    +434    }
    +435
    +436    fn get_mut(&mut self, id: NodeStateKey) -> Option<&mut NodeState> {
    +437        self.get_id(id).and_then(|id| self.by_id.get_mut(&id))
    +438    }
    +439
    +440    fn get(&self, id: NodeStateKey) -> Option<&NodeState> {
    +441        self.get_id(id).and_then(|id| self.by_id.get(&id))
    +442    }
    +443
    +444    fn get_or_insert_with(
    +445        &mut self,
    +446        id: NodeStateKey,
    +447        f: impl FnOnce() -> Options,
    +448    ) -> &mut NodeState {
    +449        let id = self.get_id(id);
    +450        match id {
    +451            None => self.insert_node(f()),
    +452            Some(id) => self.by_id.get_mut(&id).expect("is not empty"),
    +453        }
    +454    }
    +455
    +456    /// Number of nodes currently listed.
    +457    fn node_count(&self) -> usize {
    +458        self.by_id.len()
    +459    }
    +460
    +461    /// Marks the node we believe to be at `ipp` as recently used.
    +462    #[cfg(not(wasm_browser))]
    +463    fn receive_udp(&mut self, udp_addr: SocketAddr) -> Option<(NodeId, NodeIdMappedAddr)> {
    +464        let ip_port: IpPort = udp_addr.into();
    +465        let Some(node_state) = self.get_mut(NodeStateKey::IpPort(ip_port)) else {
    +466            trace!(src=%udp_addr, "receive_udp: no node_state found for addr, ignore");
    +467            return None;
    +468        };
    +469        node_state.receive_udp(ip_port, Instant::now());
    +470        Some((*node_state.public_key(), *node_state.quic_mapped_addr()))
    +471    }
    +472
    +473    #[instrument(skip_all, fields(src = %src.fmt_short()))]
    +474    fn receive_relay(&mut self, relay_url: &RelayUrl, src: NodeId) -> NodeIdMappedAddr {
    +475        #[cfg(any(test, feature = "test-utils"))]
    +476        let path_selection = self.path_selection;
    +477        let node_state = self.get_or_insert_with(NodeStateKey::NodeId(src), || {
    +478            trace!("packets from unknown node, insert into node map");
    +479            Options {
    +480                node_id: src,
    +481                relay_url: Some(relay_url.clone()),
    +482                active: true,
    +483                source: Source::Relay,
    +484                #[cfg(any(test, feature = "test-utils"))]
    +485                path_selection,
    +486            }
    +487        });
    +488        node_state.receive_relay(relay_url, src, Instant::now());
    +489        *node_state.quic_mapped_addr()
    +490    }
    +491
    +492    #[cfg(test)]
    +493    fn node_states(&self) -> impl Iterator<Item = (&usize, &NodeState)> {
    +494        self.by_id.iter()
    +495    }
    +496
    +497    fn node_states_mut(&mut self) -> impl Iterator<Item = (&usize, &mut NodeState)> {
    +498        self.by_id.iter_mut()
    +499    }
    +500
    +501    /// Get the [`RemoteInfo`]s for all nodes.
    +502    #[cfg(test)]
    +503    fn remote_infos_iter(&self, now: Instant) -> impl Iterator<Item = RemoteInfo> + '_ {
    +504        self.node_states().map(move |(_, ep)| ep.info(now))
    +505    }
    +506
    +507    /// Get the [`RemoteInfo`]s for each node.
    +508    fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> {
    +509        self.get(NodeStateKey::NodeId(node_id))
    +510            .map(|ep| ep.info(Instant::now()))
    +511    }
    +512
    +513    /// Returns a stream of [`ConnectionType`].
    +514    ///
    +515    /// Sends the current [`ConnectionType`] whenever any changes to the
    +516    /// connection type for `public_key` has occurred.
    +517    ///
    +518    /// # Errors
    +519    ///
    +520    /// Will return `None` if there is not an entry in the [`NodeMap`] for
    +521    /// the `public_key`
    +522    fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> {
    +523        self.get(NodeStateKey::NodeId(node_id))
    +524            .map(|ep| ep.conn_type())
    +525    }
    +526
    +527    fn latency(&self, node_id: NodeId) -> Option<Duration> {
    +528        self.get(NodeStateKey::NodeId(node_id))
    +529            .and_then(|ep| ep.latency())
    +530    }
    +531
    +532    fn handle_pong(
    +533        &mut self,
    +534        sender: NodeId,
    +535        src: &transports::Addr,
    +536        pong: Pong,
    +537        metrics: &Metrics,
    +538    ) {
    +539        if let Some(ns) = self.get_mut(NodeStateKey::NodeId(sender)).as_mut() {
    +540            let insert = ns.handle_pong(&pong, src.clone().into(), metrics);
    +541            if let Some((src, key)) = insert {
    +542                self.set_node_key_for_ip_port(src, &key);
    +543            }
    +544            trace!(?insert, "received pong")
    +545        } else {
    +546            warn!("received pong: node unknown, ignore")
    +547        }
    +548    }
    +549
    +550    #[must_use = "actions must be handled"]
    +551    fn handle_call_me_maybe(
    +552        &mut self,
    +553        sender: NodeId,
    +554        cm: CallMeMaybe,
    +555        metrics: &Metrics,
    +556    ) -> Vec<PingAction> {
    +557        let ns_id = NodeStateKey::NodeId(sender);
    +558        if let Some(id) = self.get_id(ns_id.clone()) {
    +559            for number in &cm.my_numbers {
    +560                // ensure the new addrs are known
    +561                self.set_node_state_for_ip_port(*number, id);
    +562            }
    +563        }
    +564        match self.get_mut(ns_id) {
    +565            None => {
    +566                debug!("received call-me-maybe: ignore, node is unknown");
    +567                metrics.recv_disco_call_me_maybe_bad_disco.inc();
    +568                vec![]
    +569            }
    +570            Some(ns) => {
    +571                debug!(endpoints = ?cm.my_numbers, "received call-me-maybe");
    +572
    +573                ns.handle_call_me_maybe(cm, metrics)
    +574            }
    +575        }
    +576    }
    +577
    +578    fn handle_ping(&mut self, sender: NodeId, src: SendAddr, tx_id: TransactionId) -> PingHandled {
    +579        #[cfg(any(test, feature = "test-utils"))]
    +580        let path_selection = self.path_selection;
    +581        let node_state = self.get_or_insert_with(NodeStateKey::NodeId(sender), || {
    +582            debug!("received ping: node unknown, add to node map");
    +583            let source = if src.is_relay() {
    +584                Source::Relay
    +585            } else {
    +586                Source::Udp
    +587            };
    +588            Options {
    +589                node_id: sender,
    +590                relay_url: src.relay_url(),
    +591                active: true,
    +592                source,
    +593                #[cfg(any(test, feature = "test-utils"))]
    +594                path_selection,
    +595            }
    +596        });
    +597
    +598        let handled = node_state.handle_ping(src.clone(), tx_id);
    +599        if let SendAddr::Udp(ref addr) = src {
    +600            if matches!(handled.role, PingRole::NewPath) {
    +601                self.set_node_key_for_ip_port(*addr, &sender);
    +602            }
    +603        }
    +604        handled
    +605    }
    +606
    +607    /// Inserts a new node into the [`NodeMap`].
    +608    fn insert_node(&mut self, options: Options) -> &mut NodeState {
    +609        info!(
    +610            node = %options.node_id.fmt_short(),
    +611            relay_url = ?options.relay_url,
    +612            source = %options.source,
    +613            "inserting new node in NodeMap",
    +614        );
    +615        let id = self.next_id;
    +616        self.next_id = self.next_id.wrapping_add(1);
    +617        let node_state = NodeState::new(id, options);
    +618
    +619        // update indices
    +620        self.by_quic_mapped_addr
    +621            .insert(*node_state.quic_mapped_addr(), id);
    +622        self.by_node_key.insert(*node_state.public_key(), id);
    +623
    +624        self.by_id.insert(id, node_state);
    +625        self.by_id.get_mut(&id).expect("just inserted")
    +626    }
     627
    -628        let prune_count = prune_candidates.len().saturating_sub(MAX_INACTIVE_NODES);
    -629        if prune_count == 0 {
    -630            // within limits
    -631            return;
    -632        }
    -633
    -634        prune_candidates.sort_unstable_by_key(|(_pk, last_used)| *last_used);
    -635        prune_candidates.truncate(prune_count);
    -636        for (public_key, last_used) in prune_candidates.into_iter() {
    -637            let node = public_key.fmt_short();
    -638            match last_used.map(|instant| instant.elapsed()) {
    -639                Some(last_used) => trace!(%node, ?last_used, "pruning inactive"),
    -640                None => trace!(%node, last_used=%"never", "pruning inactive"),
    -641            }
    -642
    -643            let Some(id) = self.by_node_key.remove(&public_key) else {
    -644                debug_assert!(false, "missing by_node_key entry for pk in by_id");
    -645                continue;
    -646            };
    -647
    -648            let Some(ep) = self.by_id.remove(&id) else {
    -649                debug_assert!(false, "missing by_id entry for id in by_node_key");
    -650                continue;
    -651            };
    +628    /// Makes future node lookups by ipp return the same endpoint as a lookup by nk.
    +629    ///
    +630    /// This should only be called with a fully verified mapping of ipp to
    +631    /// nk, because calling this function defines the endpoint we hand to
    +632    /// WireGuard for packets received from ipp.
    +633    fn set_node_key_for_ip_port(&mut self, ipp: impl Into<IpPort>, nk: &PublicKey) {
    +634        let ipp = ipp.into();
    +635        if let Some(id) = self.by_ip_port.get(&ipp) {
    +636            if !self.by_node_key.contains_key(nk) {
    +637                self.by_node_key.insert(*nk, *id);
    +638            }
    +639            self.by_ip_port.remove(&ipp);
    +640        }
    +641        if let Some(id) = self.by_node_key.get(nk) {
    +642            trace!("insert ip -> id: {:?} -> {}", ipp, id);
    +643            self.by_ip_port.insert(ipp, *id);
    +644        }
    +645    }
    +646
    +647    fn set_node_state_for_ip_port(&mut self, ipp: impl Into<IpPort>, id: usize) {
    +648        let ipp = ipp.into();
    +649        trace!(?ipp, ?id, "set endpoint for ip:port");
    +650        self.by_ip_port.insert(ipp, id);
    +651    }
     652
    -653            for ip_port in ep.direct_addresses() {
    -654                self.by_ip_port.remove(&ip_port);
    -655            }
    -656
    -657            self.by_quic_mapped_addr.remove(ep.quic_mapped_addr());
    -658        }
    -659    }
    -660}
    -661
    -662/// An (Ip, Port) pair.
    -663///
    -664/// NOTE: storing an [`IpPort`] is safer than storing a [`SocketAddr`] because for IPv6 socket
    -665/// addresses include fields that can't be assumed consistent even within a single connection.
    -666#[derive(Debug, derive_more::Display, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
    -667#[display("{}", SocketAddr::from(*self))]
    -668pub struct IpPort {
    -669    ip: IpAddr,
    -670    port: u16,
    -671}
    -672
    -673impl From<SocketAddr> for IpPort {
    -674    fn from(socket_addr: SocketAddr) -> Self {
    -675        Self {
    -676            ip: socket_addr.ip(),
    -677            port: socket_addr.port(),
    -678        }
    -679    }
    -680}
    -681
    -682impl From<IpPort> for SocketAddr {
    -683    fn from(ip_port: IpPort) -> Self {
    -684        let IpPort { ip, port } = ip_port;
    -685        (ip, port).into()
    -686    }
    -687}
    -688
    -689impl IpPort {
    -690    pub fn ip(&self) -> &IpAddr {
    -691        &self.ip
    -692    }
    -693
    -694    pub fn port(&self) -> u16 {
    -695        self.port
    -696    }
    -697}
    -698
    -699#[cfg(test)]
    -700mod tests {
    -701    use std::net::Ipv4Addr;
    -702
    -703    use iroh_base::SecretKey;
    -704    use tracing_test::traced_test;
    -705
    -706    use super::{node_state::MAX_INACTIVE_DIRECT_ADDRESSES, *};
    +653    /// Prunes nodes without recent activity so that at most [`MAX_INACTIVE_NODES`] are kept.
    +654    fn prune_inactive(&mut self) {
    +655        let now = Instant::now();
    +656        let mut prune_candidates: Vec<_> = self
    +657            .by_id
    +658            .values()
    +659            .filter(|node| !node.is_active(&now))
    +660            .map(|node| (*node.public_key(), node.last_used()))
    +661            .collect();
    +662
    +663        let prune_count = prune_candidates.len().saturating_sub(MAX_INACTIVE_NODES);
    +664        if prune_count == 0 {
    +665            // within limits
    +666            return;
    +667        }
    +668
    +669        prune_candidates.sort_unstable_by_key(|(_pk, last_used)| *last_used);
    +670        prune_candidates.truncate(prune_count);
    +671        for (public_key, last_used) in prune_candidates.into_iter() {
    +672            let node = public_key.fmt_short();
    +673            match last_used.map(|instant| instant.elapsed()) {
    +674                Some(last_used) => trace!(%node, ?last_used, "pruning inactive"),
    +675                None => trace!(%node, last_used=%"never", "pruning inactive"),
    +676            }
    +677
    +678            let Some(id) = self.by_node_key.remove(&public_key) else {
    +679                debug_assert!(false, "missing by_node_key entry for pk in by_id");
    +680                continue;
    +681            };
    +682
    +683            let Some(ep) = self.by_id.remove(&id) else {
    +684                debug_assert!(false, "missing by_id entry for id in by_node_key");
    +685                continue;
    +686            };
    +687
    +688            for ip_port in ep.direct_addresses() {
    +689                self.by_ip_port.remove(&ip_port);
    +690            }
    +691
    +692            self.by_quic_mapped_addr.remove(ep.quic_mapped_addr());
    +693        }
    +694    }
    +695}
    +696
    +697/// An (Ip, Port) pair.
    +698///
    +699/// NOTE: storing an [`IpPort`] is safer than storing a [`SocketAddr`] because for IPv6 socket
    +700/// addresses include fields that can't be assumed consistent even within a single connection.
    +701#[derive(Debug, derive_more::Display, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
    +702#[display("{}", SocketAddr::from(*self))]
    +703pub struct IpPort {
    +704    ip: IpAddr,
    +705    port: u16,
    +706}
     707
    -708    impl NodeMap {
    -709        #[track_caller]
    -710        fn add_test_addr(&self, node_addr: NodeAddr) {
    -711            self.add_node_addr(
    -712                node_addr,
    -713                Source::NamedApp {
    -714                    name: "test".into(),
    -715                },
    -716                &Default::default(),
    -717            )
    -718        }
    -719    }
    -720
    -721    /// Test persisting and loading of known nodes.
    -722    #[tokio::test]
    -723    #[traced_test]
    -724    async fn restore_from_vec() {
    -725        let node_map = NodeMap::default();
    -726
    -727        let mut rng = rand::thread_rng();
    -728        let node_a = SecretKey::generate(&mut rng).public();
    -729        let node_b = SecretKey::generate(&mut rng).public();
    -730        let node_c = SecretKey::generate(&mut rng).public();
    -731        let node_d = SecretKey::generate(&mut rng).public();
    -732
    -733        let relay_x: RelayUrl = "https://my-relay-1.com".parse().unwrap();
    -734        let relay_y: RelayUrl = "https://my-relay-2.com".parse().unwrap();
    -735
    -736        let direct_addresses_a = [addr(4000), addr(4001)];
    -737        let direct_addresses_c = [addr(5000)];
    -738
    -739        let node_addr_a = NodeAddr::new(node_a)
    -740            .with_relay_url(relay_x)
    -741            .with_direct_addresses(direct_addresses_a);
    -742        let node_addr_b = NodeAddr::new(node_b).with_relay_url(relay_y);
    -743        let node_addr_c = NodeAddr::new(node_c).with_direct_addresses(direct_addresses_c);
    -744        let node_addr_d = NodeAddr::new(node_d);
    -745
    -746        node_map.add_test_addr(node_addr_a);
    -747        node_map.add_test_addr(node_addr_b);
    -748        node_map.add_test_addr(node_addr_c);
    -749        node_map.add_test_addr(node_addr_d);
    -750
    -751        let mut addrs: Vec<NodeAddr> = node_map
    -752            .list_remote_infos(Instant::now())
    -753            .into_iter()
    -754            .filter_map(|info| {
    -755                let addr: NodeAddr = info.into();
    -756                if addr.is_empty() {
    -757                    return None;
    -758                }
    -759                Some(addr)
    -760            })
    -761            .collect();
    -762        let loaded_node_map =
    -763            NodeMap::load_from_vec(addrs.clone(), PathSelection::default(), &Default::default());
    -764
    -765        let mut loaded: Vec<NodeAddr> = loaded_node_map
    -766            .list_remote_infos(Instant::now())
    -767            .into_iter()
    -768            .filter_map(|info| {
    -769                let addr: NodeAddr = info.into();
    -770                if addr.is_empty() {
    -771                    return None;
    -772                }
    -773                Some(addr)
    -774            })
    -775            .collect();
    -776
    -777        loaded.sort_unstable();
    -778        addrs.sort_unstable();
    -779
    -780        // compare the node maps via their known nodes
    -781        assert_eq!(addrs, loaded);
    -782    }
    -783
    -784    fn addr(port: u16) -> SocketAddr {
    -785        (std::net::IpAddr::V4(Ipv4Addr::LOCALHOST), port).into()
    -786    }
    +708impl From<SocketAddr> for IpPort {
    +709    fn from(socket_addr: SocketAddr) -> Self {
    +710        Self {
    +711            ip: socket_addr.ip(),
    +712            port: socket_addr.port(),
    +713        }
    +714    }
    +715}
    +716
    +717impl From<IpPort> for SocketAddr {
    +718    fn from(ip_port: IpPort) -> Self {
    +719        let IpPort { ip, port } = ip_port;
    +720        (ip, port).into()
    +721    }
    +722}
    +723
    +724impl IpPort {
    +725    pub fn ip(&self) -> &IpAddr {
    +726        &self.ip
    +727    }
    +728
    +729    pub fn port(&self) -> u16 {
    +730        self.port
    +731    }
    +732}
    +733
    +734#[cfg(test)]
    +735mod tests {
    +736    use std::net::Ipv4Addr;
    +737
    +738    use iroh_base::SecretKey;
    +739    use rand::SeedableRng;
    +740    use tracing_test::traced_test;
    +741
    +742    use super::{node_state::MAX_INACTIVE_DIRECT_ADDRESSES, *};
    +743
    +744    impl NodeMap {
    +745        #[track_caller]
    +746        fn add_test_addr(&self, node_addr: NodeAddr) {
    +747            self.add_node_addr(
    +748                node_addr,
    +749                Source::NamedApp {
    +750                    name: "test".into(),
    +751                },
    +752                true,
    +753                &Default::default(),
    +754            )
    +755        }
    +756    }
    +757
    +758    /// Test persisting and loading of known nodes.
    +759    #[tokio::test]
    +760    #[traced_test]
    +761    async fn restore_from_vec() {
    +762        let node_map = NodeMap::default();
    +763
    +764        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +765        let node_a = SecretKey::generate(&mut rng).public();
    +766        let node_b = SecretKey::generate(&mut rng).public();
    +767        let node_c = SecretKey::generate(&mut rng).public();
    +768        let node_d = SecretKey::generate(&mut rng).public();
    +769
    +770        let relay_x: RelayUrl = "https://my-relay-1.com".parse().unwrap();
    +771        let relay_y: RelayUrl = "https://my-relay-2.com".parse().unwrap();
    +772
    +773        let direct_addresses_a = [addr(4000), addr(4001)];
    +774        let direct_addresses_c = [addr(5000)];
    +775
    +776        let node_addr_a = NodeAddr::new(node_a)
    +777            .with_relay_url(relay_x)
    +778            .with_direct_addresses(direct_addresses_a);
    +779        let node_addr_b = NodeAddr::new(node_b).with_relay_url(relay_y);
    +780        let node_addr_c = NodeAddr::new(node_c).with_direct_addresses(direct_addresses_c);
    +781        let node_addr_d = NodeAddr::new(node_d);
    +782
    +783        node_map.add_test_addr(node_addr_a);
    +784        node_map.add_test_addr(node_addr_b);
    +785        node_map.add_test_addr(node_addr_c);
    +786        node_map.add_test_addr(node_addr_d);
     787
    -788    #[test]
    -789    #[traced_test]
    -790    fn test_prune_direct_addresses() {
    -791        let node_map = NodeMap::default();
    -792        let public_key = SecretKey::generate(rand::thread_rng()).public();
    -793        let id = node_map
    -794            .inner
    -795            .lock()
    -796            .unwrap()
    -797            .insert_node(Options {
    -798                node_id: public_key,
    -799                relay_url: None,
    -800                active: false,
    -801                source: Source::NamedApp {
    -802                    name: "test".into(),
    -803                },
    -804                path_selection: PathSelection::default(),
    -805            })
    -806            .id();
    -807
    -808        const LOCALHOST: IpAddr = IpAddr::V4(std::net::Ipv4Addr::LOCALHOST);
    -809
    -810        // add [`MAX_INACTIVE_DIRECT_ADDRESSES`] active direct addresses and double
    -811        // [`MAX_INACTIVE_DIRECT_ADDRESSES`] that are inactive
    -812
    -813        info!("Adding active addresses");
    -814        for i in 0..MAX_INACTIVE_DIRECT_ADDRESSES {
    -815            let addr = SocketAddr::new(LOCALHOST, 5000 + i as u16);
    -816            let node_addr = NodeAddr::new(public_key).with_direct_addresses([addr]);
    -817            // add address
    -818            node_map.add_test_addr(node_addr);
    -819            // make it active
    -820            node_map.inner.lock().unwrap().receive_udp(addr);
    -821        }
    -822
    -823        info!("Adding offline/inactive addresses");
    -824        for i in 0..MAX_INACTIVE_DIRECT_ADDRESSES * 2 {
    -825            let addr = SocketAddr::new(LOCALHOST, 6000 + i as u16);
    -826            let node_addr = NodeAddr::new(public_key).with_direct_addresses([addr]);
    -827            node_map.add_test_addr(node_addr);
    -828        }
    -829
    -830        let mut node_map_inner = node_map.inner.lock().unwrap();
    -831        let endpoint = node_map_inner.by_id.get_mut(&id).unwrap();
    -832
    -833        info!("Adding alive addresses");
    -834        for i in 0..MAX_INACTIVE_DIRECT_ADDRESSES {
    -835            let addr = SendAddr::Udp(SocketAddr::new(LOCALHOST, 7000 + i as u16));
    -836            let txid = stun_rs::TransactionId::from([i as u8; 12]);
    -837            // Note that this already invokes .prune_direct_addresses() because these are
    -838            // new UDP paths.
    -839            endpoint.handle_ping(addr, txid);
    -840        }
    -841
    -842        info!("Pruning addresses");
    -843        endpoint.prune_direct_addresses();
    -844
    -845        // Half the offline addresses should have been pruned.  All the active and alive
    -846        // addresses should have been kept.
    -847        assert_eq!(
    -848            endpoint.direct_addresses().count(),
    -849            MAX_INACTIVE_DIRECT_ADDRESSES * 3
    -850        );
    +788        let mut addrs: Vec<NodeAddr> = node_map
    +789            .list_remote_infos(Instant::now())
    +790            .into_iter()
    +791            .filter_map(|info| {
    +792                let addr: NodeAddr = info.into();
    +793                if addr.is_empty() {
    +794                    return None;
    +795                }
    +796                Some(addr)
    +797            })
    +798            .collect();
    +799        let loaded_node_map = NodeMap::load_from_vec(
    +800            addrs.clone(),
    +801            PathSelection::default(),
    +802            true,
    +803            &Default::default(),
    +804        );
    +805
    +806        let mut loaded: Vec<NodeAddr> = loaded_node_map
    +807            .list_remote_infos(Instant::now())
    +808            .into_iter()
    +809            .filter_map(|info| {
    +810                let addr: NodeAddr = info.into();
    +811                if addr.is_empty() {
    +812                    return None;
    +813                }
    +814                Some(addr)
    +815            })
    +816            .collect();
    +817
    +818        loaded.sort_unstable();
    +819        addrs.sort_unstable();
    +820
    +821        // compare the node maps via their known nodes
    +822        assert_eq!(addrs, loaded);
    +823    }
    +824
    +825    fn addr(port: u16) -> SocketAddr {
    +826        (std::net::IpAddr::V4(Ipv4Addr::LOCALHOST), port).into()
    +827    }
    +828
    +829    #[test]
    +830    #[traced_test]
    +831    fn test_prune_direct_addresses() {
    +832        let node_map = NodeMap::default();
    +833        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +834        let public_key = SecretKey::generate(&mut rng).public();
    +835        let id = node_map
    +836            .inner
    +837            .lock()
    +838            .unwrap()
    +839            .insert_node(Options {
    +840                node_id: public_key,
    +841                relay_url: None,
    +842                active: false,
    +843                source: Source::NamedApp {
    +844                    name: "test".into(),
    +845                },
    +846                path_selection: PathSelection::default(),
    +847            })
    +848            .id();
    +849
    +850        const LOCALHOST: IpAddr = IpAddr::V4(std::net::Ipv4Addr::LOCALHOST);
     851
    -852        // We should have both offline and alive addresses which are not active.
    -853        assert_eq!(
    -854            endpoint
    -855                .direct_address_states()
    -856                .filter(|(_addr, state)| !state.is_active())
    -857                .count(),
    -858            MAX_INACTIVE_DIRECT_ADDRESSES * 2
    -859        )
    -860    }
    -861
    -862    #[test]
    -863    fn test_prune_inactive() {
    -864        let node_map = NodeMap::default();
    -865        // add one active node and more than MAX_INACTIVE_NODES inactive nodes
    -866        let active_node = SecretKey::generate(rand::thread_rng()).public();
    -867        let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 167);
    -868        node_map.add_test_addr(NodeAddr::new(active_node).with_direct_addresses([addr]));
    -869        node_map
    -870            .inner
    -871            .lock()
    -872            .unwrap()
    -873            .receive_udp(addr)
    -874            .expect("registered");
    -875
    -876        for _ in 0..MAX_INACTIVE_NODES + 1 {
    -877            let node = SecretKey::generate(rand::thread_rng()).public();
    -878            node_map.add_test_addr(NodeAddr::new(node));
    -879        }
    -880
    -881        assert_eq!(node_map.node_count(), MAX_INACTIVE_NODES + 2);
    -882        node_map.prune_inactive();
    -883        assert_eq!(node_map.node_count(), MAX_INACTIVE_NODES + 1);
    -884        node_map
    -885            .inner
    -886            .lock()
    -887            .unwrap()
    -888            .get(NodeStateKey::NodeId(active_node))
    -889            .expect("should not be pruned");
    -890    }
    -891}
    \ No newline at end of file +852 // add [`MAX_INACTIVE_DIRECT_ADDRESSES`] active direct addresses and double +853 // [`MAX_INACTIVE_DIRECT_ADDRESSES`] that are inactive +854 +855 info!("Adding active addresses"); +856 for i in 0..MAX_INACTIVE_DIRECT_ADDRESSES { +857 let addr = SocketAddr::new(LOCALHOST, 5000 + i as u16); +858 let node_addr = NodeAddr::new(public_key).with_direct_addresses([addr]); +859 // add address +860 node_map.add_test_addr(node_addr); +861 // make it active +862 node_map.inner.lock().unwrap().receive_udp(addr); +863 } +864 +865 info!("Adding offline/inactive addresses"); +866 for i in 0..MAX_INACTIVE_DIRECT_ADDRESSES * 2 { +867 let addr = SocketAddr::new(LOCALHOST, 6000 + i as u16); +868 let node_addr = NodeAddr::new(public_key).with_direct_addresses([addr]); +869 node_map.add_test_addr(node_addr); +870 } +871 +872 let mut node_map_inner = node_map.inner.lock().unwrap(); +873 let endpoint = node_map_inner.by_id.get_mut(&id).unwrap(); +874 +875 info!("Adding alive addresses"); +876 for i in 0..MAX_INACTIVE_DIRECT_ADDRESSES { +877 let addr = SendAddr::Udp(SocketAddr::new(LOCALHOST, 7000 + i as u16)); +878 let txid = stun_rs::TransactionId::from([i as u8; 12]); +879 // Note that this already invokes .prune_direct_addresses() because these are +880 // new UDP paths. +881 endpoint.handle_ping(addr, txid); +882 } +883 +884 info!("Pruning addresses"); +885 endpoint.prune_direct_addresses(Instant::now()); +886 +887 // Half the offline addresses should have been pruned. All the active and alive +888 // addresses should have been kept. +889 assert_eq!( +890 endpoint.direct_addresses().count(), +891 MAX_INACTIVE_DIRECT_ADDRESSES * 3 +892 ); +893 +894 // We should have both offline and alive addresses which are not active. +895 assert_eq!( +896 endpoint +897 .direct_address_states() +898 .filter(|(_addr, state)| !state.is_active()) +899 .count(), +900 MAX_INACTIVE_DIRECT_ADDRESSES * 2 +901 ) +902 } +903 +904 #[test] +905 fn test_prune_inactive() { +906 let node_map = NodeMap::default(); +907 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +908 +909 // add one active node and more than MAX_INACTIVE_NODES inactive nodes +910 let active_node = SecretKey::generate(&mut rng).public(); +911 let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 167); +912 node_map.add_test_addr(NodeAddr::new(active_node).with_direct_addresses([addr])); +913 node_map +914 .inner +915 .lock() +916 .unwrap() +917 .receive_udp(addr) +918 .expect("registered"); +919 +920 for _ in 0..MAX_INACTIVE_NODES + 1 { +921 let node = SecretKey::generate(&mut rng).public(); +922 node_map.add_test_addr(NodeAddr::new(node)); +923 } +924 +925 assert_eq!(node_map.node_count(), MAX_INACTIVE_NODES + 2); +926 node_map.prune_inactive(); +927 assert_eq!(node_map.node_count(), MAX_INACTIVE_NODES + 1); +928 node_map +929 .inner +930 .lock() +931 .unwrap() +932 .get(NodeStateKey::NodeId(active_node)) +933 .expect("should not be pruned"); +934 } +935}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/node_map/best_addr.rs.html b/pr/3367/docs/src/iroh/magicsock/node_map/best_addr.rs.html deleted file mode 100644 index bea43b1bb6..0000000000 --- a/pr/3367/docs/src/iroh/magicsock/node_map/best_addr.rs.html +++ /dev/null @@ -1,221 +0,0 @@ -best_addr.rs - source

    iroh/magicsock/node_map/
    best_addr.rs

    1//! The [`BestAddr`] is the currently active best address for UDP sends.
    -2
    -3use std::net::SocketAddr;
    -4
    -5use n0_future::time::{Duration, Instant};
    -6use tracing::{debug, info};
    -7
    -8/// How long we trust a UDP address as the exclusive path (without using relay) without having heard a Pong reply.
    -9const TRUST_UDP_ADDR_DURATION: Duration = Duration::from_millis(6500);
    -10
    -11#[derive(Debug, Default)]
    -12pub(super) struct BestAddr(Option<BestAddrInner>);
    -13
    -14#[derive(Debug)]
    -15struct BestAddrInner {
    -16    addr: AddrLatency,
    -17    trust_until: Option<Instant>,
    -18    confirmed_at: Instant,
    -19}
    -20
    -21impl BestAddrInner {
    -22    fn is_trusted(&self, now: Instant) -> bool {
    -23        self.trust_until
    -24            .map(|trust_until| trust_until >= now)
    -25            .unwrap_or(false)
    -26    }
    -27
    -28    fn addr(&self) -> SocketAddr {
    -29        self.addr.addr
    -30    }
    -31}
    -32
    -33#[derive(Debug)]
    -34pub(super) enum Source {
    -35    ReceivedPong,
    -36    BestCandidate,
    -37    Udp,
    -38}
    -39
    -40impl Source {
    -41    fn trust_until(&self, from: Instant) -> Instant {
    -42        match self {
    -43            Source::ReceivedPong => from + TRUST_UDP_ADDR_DURATION,
    -44            // TODO: Fix time
    -45            Source::BestCandidate => from + Duration::from_secs(60 * 60),
    -46            Source::Udp => from + TRUST_UDP_ADDR_DURATION,
    -47        }
    -48    }
    -49}
    -50
    -51#[derive(Debug)]
    -52pub(super) enum State<'a> {
    -53    Valid(&'a AddrLatency),
    -54    Outdated(&'a AddrLatency),
    -55    Empty,
    -56}
    -57
    -58#[derive(Debug, Clone, Copy)]
    -59pub enum ClearReason {
    -60    Inactive,
    -61    PongTimeout,
    -62    MatchesOurLocalAddr,
    -63}
    -64
    -65impl BestAddr {
    -66    #[cfg(test)]
    -67    pub fn from_parts(
    -68        addr: SocketAddr,
    -69        latency: Duration,
    -70        confirmed_at: Instant,
    -71        trust_until: Instant,
    -72    ) -> Self {
    -73        let inner = BestAddrInner {
    -74            addr: AddrLatency { addr, latency },
    -75            confirmed_at,
    -76            trust_until: Some(trust_until),
    -77        };
    -78        Self(Some(inner))
    -79    }
    -80
    -81    pub fn is_empty(&self) -> bool {
    -82        self.0.is_none()
    -83    }
    -84
    -85    /// Unconditionally clears the best address.
    -86    pub fn clear(&mut self, reason: ClearReason, has_relay: bool) {
    -87        let old = self.0.take();
    -88        if let Some(old_addr) = old.as_ref().map(BestAddrInner::addr) {
    -89            info!(?reason, ?has_relay, %old_addr, "clearing best_addr");
    -90        }
    -91    }
    -92
    -93    /// Clears the best address if equal to `addr`.
    -94    pub fn clear_if_equals(&mut self, addr: SocketAddr, reason: ClearReason, has_relay: bool) {
    -95        if self.addr() == Some(addr) {
    -96            self.clear(reason, has_relay)
    -97        }
    -98    }
    -99
    -100    pub fn clear_trust(&mut self, why: &'static str) {
    -101        if let Some(state) = self.0.as_mut() {
    -102            info!(
    -103                %why,
    -104                prev_trust_until = ?state.trust_until,
    -105                "clearing best_addr trust",
    -106            );
    -107            state.trust_until = None;
    -108        }
    -109    }
    -110
    -111    pub fn insert_if_better_or_reconfirm(
    -112        &mut self,
    -113        addr: SocketAddr,
    -114        latency: Duration,
    -115        source: Source,
    -116        confirmed_at: Instant,
    -117    ) {
    -118        match self.0.as_mut() {
    -119            None => {
    -120                self.insert(addr, latency, source, confirmed_at);
    -121            }
    -122            Some(state) => {
    -123                let candidate = AddrLatency { addr, latency };
    -124                if !state.is_trusted(confirmed_at) || candidate.is_better_than(&state.addr) {
    -125                    self.insert(addr, latency, source, confirmed_at);
    -126                } else if state.addr.addr == addr {
    -127                    state.confirmed_at = confirmed_at;
    -128                    state.trust_until = Some(source.trust_until(confirmed_at));
    -129                }
    -130            }
    -131        }
    -132    }
    -133
    -134    /// Reset the expiry, if the passed in addr matches the currently used one.
    -135    #[cfg(not(wasm_browser))]
    -136    pub fn reconfirm_if_used(&mut self, addr: SocketAddr, source: Source, confirmed_at: Instant) {
    -137        if let Some(state) = self.0.as_mut() {
    -138            if state.addr.addr == addr {
    -139                state.confirmed_at = confirmed_at;
    -140                state.trust_until = Some(source.trust_until(confirmed_at));
    -141            }
    -142        }
    -143    }
    -144
    -145    fn insert(
    -146        &mut self,
    -147        addr: SocketAddr,
    -148        latency: Duration,
    -149        source: Source,
    -150        confirmed_at: Instant,
    -151    ) {
    -152        let trust_until = source.trust_until(confirmed_at);
    -153
    -154        if self
    -155            .0
    -156            .as_ref()
    -157            .map(|prev| prev.addr.addr == addr)
    -158            .unwrap_or_default()
    -159        {
    -160            debug!(
    -161                %addr,
    -162                latency = ?latency,
    -163                trust_for = ?trust_until.duration_since(Instant::now()),
    -164               "re-selecting direct path for node"
    -165            );
    -166        } else {
    -167            info!(
    -168               %addr,
    -169               latency = ?latency,
    -170               trust_for = ?trust_until.duration_since(Instant::now()),
    -171               "selecting new direct path for node"
    -172            );
    -173        }
    -174        let inner = BestAddrInner {
    -175            addr: AddrLatency { addr, latency },
    -176            trust_until: Some(trust_until),
    -177            confirmed_at,
    -178        };
    -179        self.0 = Some(inner);
    -180    }
    -181
    -182    pub fn state(&self, now: Instant) -> State<'_> {
    -183        match &self.0 {
    -184            None => State::Empty,
    -185            Some(state) => match state.trust_until {
    -186                Some(expiry) if now < expiry => State::Valid(&state.addr),
    -187                Some(_) | None => State::Outdated(&state.addr),
    -188            },
    -189        }
    -190    }
    -191
    -192    pub fn addr(&self) -> Option<SocketAddr> {
    -193        self.0.as_ref().map(BestAddrInner::addr)
    -194    }
    -195}
    -196
    -197/// A `SocketAddr` with an associated latency.
    -198#[derive(Debug, Clone)]
    -199pub struct AddrLatency {
    -200    pub addr: SocketAddr,
    -201    pub latency: Duration,
    -202}
    -203
    -204impl AddrLatency {
    -205    /// Reports whether `self` is a better addr to use than `other`.
    -206    fn is_better_than(&self, other: &Self) -> bool {
    -207        if self.addr == other.addr {
    -208            return false;
    -209        }
    -210        if self.addr.is_ipv6() && other.addr.is_ipv4() {
    -211            // Prefer IPv6 for being a bit more robust, as long as
    -212            // the latencies are roughly equivalent.
    -213            if self.latency / 10 * 9 < other.latency {
    -214                return true;
    -215            }
    -216        } else if self.addr.is_ipv4() && other.addr.is_ipv6() && other.is_better_than(self) {
    -217            return false;
    -218        }
    -219        self.latency < other.latency
    -220    }
    -221}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/node_map/node_state.rs.html b/pr/3367/docs/src/iroh/magicsock/node_map/node_state.rs.html index be4daa0d31..fee1902eb9 100644 --- a/pr/3367/docs/src/iroh/magicsock/node_map/node_state.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/node_map/node_state.rs.html @@ -1,1746 +1,1740 @@ -node_state.rs - source

    iroh/magicsock/node_map/
    node_state.rs

    1use std::{
    -2    collections::{btree_map::Entry, BTreeSet, HashMap},
    +node_state.rs - source

    iroh/magicsock/node_map/
    node_state.rs

    1use std::{
    +2    collections::{BTreeSet, HashMap, btree_map::Entry},
     3    hash::Hash,
     4    net::{IpAddr, SocketAddr},
    -5};
    -6
    -7use data_encoding::HEXLOWER;
    -8use iroh_base::{NodeAddr, NodeId, PublicKey, RelayUrl};
    -9use n0_future::{
    -10    task::{self, AbortOnDropHandle},
    -11    time::{self, Duration, Instant},
    -12};
    -13use n0_watcher::Watchable;
    -14use serde::{Deserialize, Serialize};
    -15use tokio::sync::mpsc;
    -16use tracing::{debug, event, info, instrument, trace, warn, Level};
    -17
    -18use super::{
    -19    best_addr::{self, ClearReason, Source as BestAddrSource},
    -20    path_state::{summarize_node_paths, PathState},
    -21    udp_paths::{NodeUdpPaths, UdpSendAddr},
    -22    IpPort, Source,
    +5    sync::atomic::AtomicBool,
    +6};
    +7
    +8use data_encoding::HEXLOWER;
    +9use iroh_base::{NodeAddr, NodeId, PublicKey, RelayUrl};
    +10use n0_future::{
    +11    task::{self, AbortOnDropHandle},
    +12    time::{self, Duration, Instant},
    +13};
    +14use n0_watcher::Watchable;
    +15use serde::{Deserialize, Serialize};
    +16use tokio::sync::mpsc;
    +17use tracing::{Level, debug, event, info, instrument, trace, warn};
    +18
    +19use super::{
    +20    IpPort, Source,
    +21    path_state::{PathState, summarize_node_paths},
    +22    udp_paths::{NodeUdpPaths, UdpSendAddr},
     23};
     24#[cfg(any(test, feature = "test-utils"))]
     25use crate::endpoint::PathSelection;
     26use crate::{
     27    disco::{self, SendAddr},
    -28    magicsock::{ActorMessage, MagicsockMetrics, NodeIdMappedAddr, HEARTBEAT_INTERVAL},
    -29};
    -30
    -31/// Number of addresses that are not active that we keep around per node.
    -32///
    -33/// See [`NodeState::prune_direct_addresses`].
    -34pub(super) const MAX_INACTIVE_DIRECT_ADDRESSES: usize = 20;
    -35
    -36/// How long since an endpoint path was last alive before it might be pruned.
    -37const LAST_ALIVE_PRUNE_DURATION: Duration = Duration::from_secs(120);
    +28    magicsock::{
    +29        ActorMessage, HEARTBEAT_INTERVAL, MagicsockMetrics, NodeIdMappedAddr,
    +30        node_map::path_validity::PathValidity,
    +31    },
    +32};
    +33
    +34/// Number of addresses that are not active that we keep around per node.
    +35///
    +36/// See [`NodeState::prune_direct_addresses`].
    +37pub(super) const MAX_INACTIVE_DIRECT_ADDRESSES: usize = 20;
     38
    -39/// How long we wait for a pong reply before assuming it's never coming.
    -40const PING_TIMEOUT_DURATION: Duration = Duration::from_secs(5);
    +39/// How long since an endpoint path was last alive before it might be pruned.
    +40const LAST_ALIVE_PRUNE_DURATION: Duration = Duration::from_secs(120);
     41
    -42/// The latency at or under which we don't try to upgrade to a better path.
    -43const GOOD_ENOUGH_LATENCY: Duration = Duration::from_millis(5);
    +42/// How long we wait for a pong reply before assuming it's never coming.
    +43const PING_TIMEOUT_DURATION: Duration = Duration::from_secs(5);
     44
    -45/// How long since the last activity we try to keep an established endpoint peering alive.
    -46/// It's also the idle time at which we stop doing QAD queries to keep NAT mappings alive.
    -47pub(super) const SESSION_ACTIVE_TIMEOUT: Duration = Duration::from_secs(45);
    -48
    -49/// How often we try to upgrade to a better patheven if we have some non-relay route that works.
    -50const UPGRADE_INTERVAL: Duration = Duration::from_secs(60);
    +45/// The latency at or under which we don't try to upgrade to a better path.
    +46const GOOD_ENOUGH_LATENCY: Duration = Duration::from_millis(5);
    +47
    +48/// How long since the last activity we try to keep an established endpoint peering alive.
    +49/// It's also the idle time at which we stop doing QAD queries to keep NAT mappings alive.
    +50pub(super) const SESSION_ACTIVE_TIMEOUT: Duration = Duration::from_secs(45);
     51
    -52/// How long until we send a stayin alive ping
    -53const STAYIN_ALIVE_MIN_ELAPSED: Duration = Duration::from_secs(2);
    +52/// How often we try to upgrade to a better patheven if we have some non-relay route that works.
    +53const UPGRADE_INTERVAL: Duration = Duration::from_secs(60);
     54
    -55#[derive(Debug)]
    -56pub(in crate::magicsock) enum PingAction {
    -57    SendCallMeMaybe {
    -58        relay_url: RelayUrl,
    -59        dst_node: NodeId,
    -60    },
    -61    SendPing(SendPing),
    -62}
    -63
    -64#[derive(Debug)]
    -65pub(in crate::magicsock) struct SendPing {
    -66    pub id: usize,
    -67    pub dst: SendAddr,
    -68    pub dst_node: NodeId,
    -69    pub tx_id: stun_rs::TransactionId,
    -70    pub purpose: DiscoPingPurpose,
    -71}
    -72
    -73/// Indicating an [`NodeState`] has handled a ping.
    -74#[derive(Debug)]
    -75pub struct PingHandled {
    -76    /// What this ping did to the [`NodeState`].
    -77    pub role: PingRole,
    -78    /// Whether the sender path should also be pinged.
    -79    ///
    -80    /// This is the case if an [`NodeState`] does not yet have a direct path, i.e. it has no
    -81    /// best_addr.  In this case we want to ping right back to open the direct path in this
    -82    /// direction as well.
    -83    pub needs_ping_back: Option<SendPing>,
    -84}
    -85
    -86#[derive(Debug)]
    -87pub enum PingRole {
    -88    Duplicate,
    -89    NewPath,
    -90    LikelyHeartbeat,
    -91    Activate,
    -92}
    -93
    -94/// An iroh node, which we can have connections with.
    -95///
    -96/// The whole point of the magicsock is that we can have multiple **paths** to a particular
    -97/// node.  One of these paths is via the endpoint's home relay node but as we establish a
    -98/// connection we'll hopefully discover more direct paths.
    -99#[derive(Debug)]
    -100pub(super) struct NodeState {
    -101    /// The ID used as index in the [`NodeMap`].
    -102    ///
    -103    /// [`NodeMap`]: super::NodeMap
    -104    id: usize,
    -105    /// The UDP address used on the QUIC-layer to address this node.
    -106    quic_mapped_addr: NodeIdMappedAddr,
    -107    /// The global identifier for this endpoint.
    -108    node_id: NodeId,
    -109    /// The last time we pinged all endpoints.
    -110    last_full_ping: Option<Instant>,
    -111    /// The url of relay node that we can relay over to communicate.
    -112    ///
    -113    /// The fallback/bootstrap path, if non-zero (non-zero for well-behaved clients).
    -114    relay_url: Option<(RelayUrl, PathState)>,
    -115    udp_paths: NodeUdpPaths,
    -116    sent_pings: HashMap<stun_rs::TransactionId, SentPing>,
    -117    /// Last time this node was used.
    -118    ///
    -119    /// A node is marked as in use when sending datagrams to them, or when having received
    -120    /// datagrams from it. Regardless of whether the datagrams are payload or DISCO, and whether
    -121    /// they go via UDP or the relay.
    -122    ///
    -123    /// Note that sending datagrams to a node does not mean the node receives them.
    -124    last_used: Option<Instant>,
    -125    /// Last time we sent a call-me-maybe.
    -126    ///
    -127    /// When we do not have a direct connection and we try to send some data, we will try to
    -128    /// do a full ping + call-me-maybe.  Usually each side only needs to send one
    -129    /// call-me-maybe to the other for holes to be punched in both directions however.  So
    -130    /// we only try and send one per [`HEARTBEAT_INTERVAL`].  Each [`HEARTBEAT_INTERVAL`]
    -131    /// the [`NodeState::stayin_alive`] function is called, which will trigger new
    -132    /// call-me-maybe messages as backup.
    -133    last_call_me_maybe: Option<Instant>,
    -134    /// The type of connection we have to the node, either direct, relay, mixed, or none.
    -135    conn_type: Watchable<ConnectionType>,
    -136    /// Whether the conn_type was ever observed to be `Direct` at some point.
    -137    ///
    -138    /// Used for metric reporting.
    -139    has_been_direct: bool,
    -140    /// Configuration for what path selection to use
    -141    #[cfg(any(test, feature = "test-utils"))]
    -142    path_selection: PathSelection,
    -143}
    -144
    -145/// Options for creating a new [`NodeState`].
    -146#[derive(Debug)]
    -147pub(super) struct Options {
    -148    pub(super) node_id: NodeId,
    -149    pub(super) relay_url: Option<RelayUrl>,
    -150    /// Is this endpoint currently active (sending data)?
    -151    pub(super) active: bool,
    -152    pub(super) source: super::Source,
    -153    #[cfg(any(test, feature = "test-utils"))]
    -154    pub(super) path_selection: PathSelection,
    -155}
    -156
    -157impl NodeState {
    -158    pub(super) fn new(id: usize, options: Options) -> Self {
    -159        let quic_mapped_addr = NodeIdMappedAddr::generate();
    -160
    -161        // TODO(frando): I don't think we need to track the `num_relay_conns_added`
    -162        // metric here. We do so in `Self::addr_for_send`.
    -163        // if options.relay_url.is_some() {
    -164        //     // we potentially have a relay connection to the node
    -165        //     inc!(MagicsockMetrics, num_relay_conns_added);
    -166        // }
    -167
    -168        let now = Instant::now();
    -169
    -170        NodeState {
    -171            id,
    -172            quic_mapped_addr,
    -173            node_id: options.node_id,
    -174            last_full_ping: None,
    -175            relay_url: options.relay_url.map(|url| {
    -176                (
    -177                    url.clone(),
    -178                    PathState::new(options.node_id, SendAddr::Relay(url), options.source, now),
    -179                )
    -180            }),
    -181            udp_paths: NodeUdpPaths::new(),
    -182            sent_pings: HashMap::new(),
    -183            last_used: options.active.then(Instant::now),
    -184            last_call_me_maybe: None,
    -185            conn_type: Watchable::new(ConnectionType::None),
    -186            has_been_direct: false,
    -187            #[cfg(any(test, feature = "test-utils"))]
    -188            path_selection: options.path_selection,
    -189        }
    -190    }
    -191
    -192    pub(super) fn public_key(&self) -> &PublicKey {
    -193        &self.node_id
    -194    }
    -195
    -196    pub(super) fn quic_mapped_addr(&self) -> &NodeIdMappedAddr {
    -197        &self.quic_mapped_addr
    -198    }
    -199
    -200    pub(super) fn id(&self) -> usize {
    -201        self.id
    -202    }
    -203
    -204    pub(super) fn conn_type(&self) -> n0_watcher::Direct<ConnectionType> {
    -205        self.conn_type.watch()
    -206    }
    -207
    -208    /// Returns info about this node.
    -209    pub(super) fn info(&self, now: Instant) -> RemoteInfo {
    -210        let conn_type = self.conn_type.get();
    -211        let latency = match conn_type {
    -212            ConnectionType::Direct(addr) => self
    -213                .udp_paths
    -214                .paths
    -215                .get(&addr.into())
    -216                .and_then(|state| state.latency()),
    -217            ConnectionType::Relay(ref url) => self
    -218                .relay_url
    -219                .as_ref()
    -220                .filter(|(relay_url, _)| relay_url == url)
    -221                .and_then(|(_, state)| state.latency()),
    -222            ConnectionType::Mixed(addr, ref url) => {
    -223                let addr_latency = self
    -224                    .udp_paths
    -225                    .paths
    -226                    .get(&addr.into())
    -227                    .and_then(|state| state.latency());
    -228                let relay_latency = self
    -229                    .relay_url
    -230                    .as_ref()
    -231                    .filter(|(relay_url, _)| relay_url == url)
    -232                    .and_then(|(_, state)| state.latency());
    -233                addr_latency.min(relay_latency)
    -234            }
    -235            ConnectionType::None => None,
    -236        };
    -237
    -238        let addrs = self
    -239            .udp_paths
    -240            .paths
    -241            .iter()
    -242            .map(|(addr, path_state)| DirectAddrInfo {
    -243                addr: SocketAddr::from(*addr),
    -244                latency: path_state.recent_pong.as_ref().map(|pong| pong.latency),
    -245                last_control: path_state.last_control_msg(now),
    -246                last_payload: path_state
    -247                    .last_payload_msg
    -248                    .as_ref()
    -249                    .map(|instant| now.duration_since(*instant)),
    -250                last_alive: path_state
    -251                    .last_alive()
    -252                    .map(|instant| now.duration_since(instant)),
    -253                sources: path_state
    -254                    .sources
    -255                    .iter()
    -256                    .map(|(source, instant)| (source.clone(), now.duration_since(*instant)))
    -257                    .collect(),
    -258            })
    -259            .collect();
    -260
    -261        RemoteInfo {
    -262            node_id: self.node_id,
    -263            relay_url: self.relay_url.clone().map(|r| r.into()),
    -264            addrs,
    -265            conn_type,
    -266            latency,
    -267            last_used: self.last_used.map(|instant| now.duration_since(instant)),
    -268        }
    -269    }
    -270
    -271    /// Returns the relay url of this endpoint
    -272    pub(super) fn relay_url(&self) -> Option<RelayUrl> {
    -273        self.relay_url.as_ref().map(|(url, _state)| url.clone())
    -274    }
    -275
    -276    /// Returns the address(es) that should be used for sending the next packet.
    -277    ///
    -278    /// This may return to send on one, both or no paths.
    -279    fn addr_for_send(
    -280        &mut self,
    -281        now: &Instant,
    -282        have_ipv6: bool,
    -283        metrics: &MagicsockMetrics,
    -284    ) -> (Option<SocketAddr>, Option<RelayUrl>) {
    -285        #[cfg(any(test, feature = "test-utils"))]
    -286        if self.path_selection == PathSelection::RelayOnly {
    -287            debug!(
    -288                "in `RelayOnly` mode, giving the relay address as the only viable address for this endpoint"
    -289            );
    -290            return (None, self.relay_url());
    -291        }
    -292        let (best_addr, relay_url) = match self.udp_paths.send_addr(*now, have_ipv6) {
    -293            UdpSendAddr::Valid(addr) => {
    -294                // If we have a valid address we use it.
    -295                trace!(%addr, "UdpSendAddr is valid, use it");
    -296                (Some(addr), None)
    -297            }
    -298            UdpSendAddr::Outdated(addr) => {
    -299                // If the address is outdated we use it, but send via relay at the same time.
    -300                // We also send disco pings so that it will become valid again if it still
    -301                // works (i.e. we don't need to holepunch again).
    -302                trace!(%addr, "UdpSendAddr is outdated, use it together with relay");
    -303                (Some(addr), self.relay_url())
    -304            }
    -305            UdpSendAddr::Unconfirmed(addr) => {
    -306                trace!(%addr, "UdpSendAddr is unconfirmed, use it together with relay");
    -307                (Some(addr), self.relay_url())
    -308            }
    -309            UdpSendAddr::None => {
    -310                trace!("No UdpSendAddr, use relay");
    -311                (None, self.relay_url())
    -312            }
    -313        };
    -314        let typ = match (best_addr, relay_url.clone()) {
    -315            (Some(best_addr), Some(relay_url)) => ConnectionType::Mixed(best_addr, relay_url),
    -316            (Some(best_addr), None) => ConnectionType::Direct(best_addr),
    -317            (None, Some(relay_url)) => ConnectionType::Relay(relay_url),
    -318            (None, None) => ConnectionType::None,
    +55/// How long until we send a stayin alive ping
    +56const STAYIN_ALIVE_MIN_ELAPSED: Duration = Duration::from_secs(2);
    +57
    +58#[derive(Debug)]
    +59pub(in crate::magicsock) enum PingAction {
    +60    SendCallMeMaybe {
    +61        relay_url: RelayUrl,
    +62        dst_node: NodeId,
    +63    },
    +64    SendPing(SendPing),
    +65}
    +66
    +67#[derive(Debug)]
    +68pub(in crate::magicsock) struct SendPing {
    +69    pub id: usize,
    +70    pub dst: SendAddr,
    +71    pub dst_node: NodeId,
    +72    pub tx_id: stun_rs::TransactionId,
    +73    pub purpose: DiscoPingPurpose,
    +74}
    +75
    +76/// Indicating an [`NodeState`] has handled a ping.
    +77#[derive(Debug)]
    +78pub struct PingHandled {
    +79    /// What this ping did to the [`NodeState`].
    +80    pub role: PingRole,
    +81    /// Whether the sender path should also be pinged.
    +82    ///
    +83    /// This is the case if an [`NodeState`] does not yet have a direct path, i.e. it has no
    +84    /// best_addr.  In this case we want to ping right back to open the direct path in this
    +85    /// direction as well.
    +86    pub needs_ping_back: Option<SendPing>,
    +87}
    +88
    +89#[derive(Debug)]
    +90pub enum PingRole {
    +91    Duplicate,
    +92    NewPath,
    +93    LikelyHeartbeat,
    +94    Activate,
    +95}
    +96
    +97/// An iroh node, which we can have connections with.
    +98///
    +99/// The whole point of the magicsock is that we can have multiple **paths** to a particular
    +100/// node.  One of these paths is via the endpoint's home relay node but as we establish a
    +101/// connection we'll hopefully discover more direct paths.
    +102#[derive(Debug)]
    +103pub(super) struct NodeState {
    +104    /// The ID used as index in the [`NodeMap`].
    +105    ///
    +106    /// [`NodeMap`]: super::NodeMap
    +107    id: usize,
    +108    /// The UDP address used on the QUIC-layer to address this node.
    +109    quic_mapped_addr: NodeIdMappedAddr,
    +110    /// The global identifier for this endpoint.
    +111    node_id: NodeId,
    +112    /// The last time we pinged all endpoints.
    +113    last_full_ping: Option<Instant>,
    +114    /// The url of relay node that we can relay over to communicate.
    +115    ///
    +116    /// The fallback/bootstrap path, if non-zero (non-zero for well-behaved clients).
    +117    relay_url: Option<(RelayUrl, PathState)>,
    +118    udp_paths: NodeUdpPaths,
    +119    sent_pings: HashMap<stun_rs::TransactionId, SentPing>,
    +120    /// Last time this node was used.
    +121    ///
    +122    /// A node is marked as in use when sending datagrams to them, or when having received
    +123    /// datagrams from it. Regardless of whether the datagrams are payload or DISCO, and whether
    +124    /// they go via UDP or the relay.
    +125    ///
    +126    /// Note that sending datagrams to a node does not mean the node receives them.
    +127    last_used: Option<Instant>,
    +128    /// Last time we sent a call-me-maybe.
    +129    ///
    +130    /// When we do not have a direct connection and we try to send some data, we will try to
    +131    /// do a full ping + call-me-maybe.  Usually each side only needs to send one
    +132    /// call-me-maybe to the other for holes to be punched in both directions however.  So
    +133    /// we only try and send one per [`HEARTBEAT_INTERVAL`].  Each [`HEARTBEAT_INTERVAL`]
    +134    /// the [`NodeState::stayin_alive`] function is called, which will trigger new
    +135    /// call-me-maybe messages as backup.
    +136    last_call_me_maybe: Option<Instant>,
    +137    /// The type of connection we have to the node, either direct, relay, mixed, or none.
    +138    conn_type: Watchable<ConnectionType>,
    +139    /// Whether the conn_type was ever observed to be `Direct` at some point.
    +140    ///
    +141    /// Used for metric reporting.
    +142    has_been_direct: AtomicBool,
    +143    /// Configuration for what path selection to use
    +144    #[cfg(any(test, feature = "test-utils"))]
    +145    path_selection: PathSelection,
    +146}
    +147
    +148/// Options for creating a new [`NodeState`].
    +149#[derive(Debug)]
    +150pub(super) struct Options {
    +151    pub(super) node_id: NodeId,
    +152    pub(super) relay_url: Option<RelayUrl>,
    +153    /// Is this endpoint currently active (sending data)?
    +154    pub(super) active: bool,
    +155    pub(super) source: super::Source,
    +156    #[cfg(any(test, feature = "test-utils"))]
    +157    pub(super) path_selection: PathSelection,
    +158}
    +159
    +160impl NodeState {
    +161    pub(super) fn new(id: usize, options: Options) -> Self {
    +162        let quic_mapped_addr = NodeIdMappedAddr::generate();
    +163
    +164        // TODO(frando): I don't think we need to track the `num_relay_conns_added`
    +165        // metric here. We do so in `Self::addr_for_send`.
    +166        // if options.relay_url.is_some() {
    +167        //     // we potentially have a relay connection to the node
    +168        //     inc!(MagicsockMetrics, num_relay_conns_added);
    +169        // }
    +170
    +171        let now = Instant::now();
    +172
    +173        NodeState {
    +174            id,
    +175            quic_mapped_addr,
    +176            node_id: options.node_id,
    +177            last_full_ping: None,
    +178            relay_url: options.relay_url.map(|url| {
    +179                (
    +180                    url.clone(),
    +181                    PathState::new(options.node_id, SendAddr::Relay(url), options.source, now),
    +182                )
    +183            }),
    +184            udp_paths: NodeUdpPaths::new(),
    +185            sent_pings: HashMap::new(),
    +186            last_used: options.active.then(Instant::now),
    +187            last_call_me_maybe: None,
    +188            conn_type: Watchable::new(ConnectionType::None),
    +189            has_been_direct: AtomicBool::new(false),
    +190            #[cfg(any(test, feature = "test-utils"))]
    +191            path_selection: options.path_selection,
    +192        }
    +193    }
    +194
    +195    pub(super) fn public_key(&self) -> &PublicKey {
    +196        &self.node_id
    +197    }
    +198
    +199    pub(super) fn quic_mapped_addr(&self) -> &NodeIdMappedAddr {
    +200        &self.quic_mapped_addr
    +201    }
    +202
    +203    pub(super) fn id(&self) -> usize {
    +204        self.id
    +205    }
    +206
    +207    pub(super) fn conn_type(&self) -> n0_watcher::Direct<ConnectionType> {
    +208        self.conn_type.watch()
    +209    }
    +210
    +211    pub(super) fn latency(&self) -> Option<Duration> {
    +212        match self.conn_type.get() {
    +213            ConnectionType::Direct(addr) => self
    +214                .udp_paths
    +215                .paths()
    +216                .get(&addr.into())
    +217                .and_then(|state| state.latency()),
    +218            ConnectionType::Relay(ref url) => self
    +219                .relay_url
    +220                .as_ref()
    +221                .filter(|(relay_url, _)| relay_url == url)
    +222                .and_then(|(_, state)| state.latency()),
    +223            ConnectionType::Mixed(addr, ref url) => {
    +224                let addr_latency = self
    +225                    .udp_paths
    +226                    .paths()
    +227                    .get(&addr.into())
    +228                    .and_then(|state| state.latency());
    +229                let relay_latency = self
    +230                    .relay_url
    +231                    .as_ref()
    +232                    .filter(|(relay_url, _)| relay_url == url)
    +233                    .and_then(|(_, state)| state.latency());
    +234                addr_latency.min(relay_latency)
    +235            }
    +236            ConnectionType::None => None,
    +237        }
    +238    }
    +239
    +240    /// Returns info about this node.
    +241    pub(super) fn info(&self, now: Instant) -> RemoteInfo {
    +242        let conn_type = self.conn_type.get();
    +243        let latency = self.latency();
    +244
    +245        let addrs = self
    +246            .udp_paths
    +247            .paths()
    +248            .iter()
    +249            .map(|(addr, path_state)| DirectAddrInfo {
    +250                addr: SocketAddr::from(*addr),
    +251                latency: path_state.validity.latency(),
    +252                last_control: path_state.last_control_msg(now),
    +253                last_payload: path_state
    +254                    .last_payload_msg
    +255                    .as_ref()
    +256                    .map(|instant| now.duration_since(*instant)),
    +257                last_alive: path_state
    +258                    .last_alive()
    +259                    .map(|instant| now.duration_since(instant)),
    +260                sources: path_state
    +261                    .sources
    +262                    .iter()
    +263                    .map(|(source, instant)| (source.clone(), now.duration_since(*instant)))
    +264                    .collect(),
    +265            })
    +266            .collect();
    +267
    +268        RemoteInfo {
    +269            node_id: self.node_id,
    +270            relay_url: self.relay_url.clone().map(|r| r.into()),
    +271            addrs,
    +272            conn_type,
    +273            latency,
    +274            last_used: self.last_used.map(|instant| now.duration_since(instant)),
    +275        }
    +276    }
    +277
    +278    /// Returns the relay url of this endpoint
    +279    pub(super) fn relay_url(&self) -> Option<RelayUrl> {
    +280        self.relay_url.as_ref().map(|(url, _state)| url.clone())
    +281    }
    +282
    +283    /// Returns the address(es) that should be used for sending the next packet.
    +284    ///
    +285    /// This may return to send on one, both or no paths.
    +286    fn addr_for_send(
    +287        &self,
    +288        have_ipv6: bool,
    +289        metrics: &MagicsockMetrics,
    +290    ) -> (Option<SocketAddr>, Option<RelayUrl>) {
    +291        #[cfg(any(test, feature = "test-utils"))]
    +292        if self.path_selection == PathSelection::RelayOnly {
    +293            debug!(
    +294                "in `RelayOnly` mode, giving the relay address as the only viable address for this endpoint"
    +295            );
    +296            return (None, self.relay_url());
    +297        }
    +298        let (best_addr, relay_url) = match self.udp_paths.send_addr(have_ipv6) {
    +299            UdpSendAddr::Valid(addr) => {
    +300                // If we have a valid address we use it.
    +301                trace!(%addr, ?have_ipv6, "UdpSendAddr is valid, use it");
    +302                (Some(*addr), None)
    +303            }
    +304            UdpSendAddr::Outdated(addr) => {
    +305                // If the address is outdated we use it, but send via relay at the same time.
    +306                // We also send disco pings so that it will become valid again if it still
    +307                // works (i.e. we don't need to holepunch again).
    +308                trace!(%addr, ?have_ipv6, "UdpSendAddr is outdated, use it together with relay");
    +309                (Some(*addr), self.relay_url())
    +310            }
    +311            UdpSendAddr::Unconfirmed(addr) => {
    +312                trace!(%addr, ?have_ipv6, "UdpSendAddr is unconfirmed, use it together with relay");
    +313                (Some(*addr), self.relay_url())
    +314            }
    +315            UdpSendAddr::None => {
    +316                trace!(?have_ipv6, "No UdpSendAddr, use relay");
    +317                (None, self.relay_url())
    +318            }
     319        };
    -320        if !self.has_been_direct && matches!(&typ, ConnectionType::Direct(_)) {
    -321            self.has_been_direct = true;
    -322            metrics.nodes_contacted_directly.inc();
    -323        }
    -324        if let Ok(prev_typ) = self.conn_type.set(typ.clone()) {
    -325            // The connection type has changed.
    -326            event!(
    -327                target: "iroh::_events::conn_type::changed",
    -328                Level::DEBUG,
    -329                remote_node = %self.node_id.fmt_short(),
    -330                conn_type = ?typ,
    -331            );
    -332            info!(%typ, "new connection type");
    -333
    -334            // Update some metrics
    -335            match (prev_typ, typ) {
    -336                (ConnectionType::Relay(_), ConnectionType::Direct(_))
    -337                | (ConnectionType::Mixed(_, _), ConnectionType::Direct(_)) => {
    -338                    metrics.num_direct_conns_added.inc();
    -339                    metrics.num_relay_conns_removed.inc();
    -340                }
    -341                (ConnectionType::Direct(_), ConnectionType::Relay(_))
    -342                | (ConnectionType::Direct(_), ConnectionType::Mixed(_, _)) => {
    -343                    metrics.num_direct_conns_removed.inc();
    -344                    metrics.num_relay_conns_added.inc();
    -345                }
    -346                (ConnectionType::None, ConnectionType::Direct(_)) => {
    -347                    metrics.num_direct_conns_added.inc();
    -348                }
    -349                (ConnectionType::Direct(_), ConnectionType::None) => {
    -350                    metrics.num_direct_conns_removed.inc();
    -351                }
    -352                (ConnectionType::None, ConnectionType::Relay(_))
    -353                | (ConnectionType::None, ConnectionType::Mixed(_, _)) => {
    +320        let typ = match (best_addr, relay_url.clone()) {
    +321            (Some(best_addr), Some(relay_url)) => ConnectionType::Mixed(best_addr, relay_url),
    +322            (Some(best_addr), None) => ConnectionType::Direct(best_addr),
    +323            (None, Some(relay_url)) => ConnectionType::Relay(relay_url),
    +324            (None, None) => ConnectionType::None,
    +325        };
    +326        if matches!(&typ, ConnectionType::Direct(_)) {
    +327            let before = self
    +328                .has_been_direct
    +329                .swap(true, std::sync::atomic::Ordering::Relaxed);
    +330            if !before {
    +331                metrics.nodes_contacted_directly.inc();
    +332            }
    +333        }
    +334        if let Ok(prev_typ) = self.conn_type.set(typ.clone()) {
    +335            // The connection type has changed.
    +336            event!(
    +337                target: "iroh::_events::conn_type::changed",
    +338                Level::DEBUG,
    +339                remote_node = %self.node_id.fmt_short(),
    +340                conn_type = ?typ,
    +341            );
    +342            info!(%typ, "new connection type");
    +343
    +344            // Update some metrics
    +345            match (prev_typ, typ) {
    +346                (ConnectionType::Relay(_), ConnectionType::Direct(_))
    +347                | (ConnectionType::Mixed(_, _), ConnectionType::Direct(_)) => {
    +348                    metrics.num_direct_conns_added.inc();
    +349                    metrics.num_relay_conns_removed.inc();
    +350                }
    +351                (ConnectionType::Direct(_), ConnectionType::Relay(_))
    +352                | (ConnectionType::Direct(_), ConnectionType::Mixed(_, _)) => {
    +353                    metrics.num_direct_conns_removed.inc();
     354                    metrics.num_relay_conns_added.inc();
     355                }
    -356                (ConnectionType::Relay(_), ConnectionType::None)
    -357                | (ConnectionType::Mixed(_, _), ConnectionType::None) => {
    -358                    metrics.num_relay_conns_removed.inc();
    -359                }
    -360                _ => (),
    -361            }
    -362        }
    -363        (best_addr, relay_url)
    -364    }
    -365
    -366    /// Removes a direct address for this node.
    -367    ///
    -368    /// If this is also the best address, it will be cleared as well.
    -369    pub(super) fn remove_direct_addr(&mut self, ip_port: &IpPort, reason: ClearReason) {
    -370        let Some(state) = self.udp_paths.paths.remove(ip_port) else {
    -371            return;
    -372        };
    -373
    -374        match state.last_alive().map(|instant| instant.elapsed()) {
    -375            Some(last_alive) => debug!(%ip_port, ?last_alive, ?reason, "pruning address"),
    -376            None => debug!(%ip_port, last_seen=%"never", ?reason, "pruning address"),
    -377        }
    -378
    -379        self.udp_paths.best_addr.clear_if_equals(
    -380            (*ip_port).into(),
    -381            reason,
    -382            self.relay_url.is_some(),
    -383        );
    -384    }
    -385
    -386    /// Whether we need to send another call-me-maybe to the endpoint.
    -387    ///
    -388    /// Basically we need to send a call-me-maybe if we need to find a better path.  Maybe
    -389    /// we only have a relay path, or our path is expired.
    -390    ///
    -391    /// When a call-me-maybe message is sent we also need to send pings to all known paths
    -392    /// of the endpoint.  The [`NodeState::send_call_me_maybe`] function takes care of this.
    -393    #[cfg(not(wasm_browser))]
    -394    #[instrument("want_call_me_maybe", skip_all)]
    -395    fn want_call_me_maybe(&self, now: &Instant) -> bool {
    -396        trace!("full ping: wanted?");
    -397        let Some(last_full_ping) = self.last_full_ping else {
    -398            debug!("no previous full ping: need full ping");
    -399            return true;
    -400        };
    -401        match self.udp_paths.best_addr.state(*now) {
    -402            best_addr::State::Empty => {
    -403                debug!("best addr not set: need full ping");
    -404                true
    -405            }
    -406            best_addr::State::Outdated(_) => {
    -407                debug!("best addr expired: need full ping");
    +356                (ConnectionType::None, ConnectionType::Direct(_)) => {
    +357                    metrics.num_direct_conns_added.inc();
    +358                }
    +359                (ConnectionType::Direct(_), ConnectionType::None) => {
    +360                    metrics.num_direct_conns_removed.inc();
    +361                }
    +362                (ConnectionType::None, ConnectionType::Relay(_))
    +363                | (ConnectionType::None, ConnectionType::Mixed(_, _)) => {
    +364                    metrics.num_relay_conns_added.inc();
    +365                }
    +366                (ConnectionType::Relay(_), ConnectionType::None)
    +367                | (ConnectionType::Mixed(_, _), ConnectionType::None) => {
    +368                    metrics.num_relay_conns_removed.inc();
    +369                }
    +370                _ => (),
    +371            }
    +372        }
    +373        (best_addr, relay_url)
    +374    }
    +375
    +376    /// Removes a direct address for this node.
    +377    ///
    +378    /// If this is also the best address, it will be cleared as well.
    +379    pub(super) fn remove_direct_addr(&mut self, ip_port: &IpPort, now: Instant, why: &'static str) {
    +380        let Some(state) = self.udp_paths.access_mut(now).paths().remove(ip_port) else {
    +381            return;
    +382        };
    +383
    +384        match state.last_alive().map(|instant| instant.elapsed()) {
    +385            Some(last_alive) => debug!(%ip_port, ?last_alive, why, "pruning address"),
    +386            None => debug!(%ip_port, last_seen=%"never", why, "pruning address"),
    +387        }
    +388    }
    +389
    +390    /// Whether we need to send another call-me-maybe to the endpoint.
    +391    ///
    +392    /// Basically we need to send a call-me-maybe if we need to find a better path.  Maybe
    +393    /// we only have a relay path, or our path is expired.
    +394    ///
    +395    /// When a call-me-maybe message is sent we also need to send pings to all known paths
    +396    /// of the endpoint.  The [`NodeState::send_call_me_maybe`] function takes care of this.
    +397    #[cfg(not(wasm_browser))]
    +398    #[instrument("want_call_me_maybe", skip_all)]
    +399    fn want_call_me_maybe(&self, now: &Instant, have_ipv6: bool) -> bool {
    +400        trace!("full ping: wanted?");
    +401        let Some(last_full_ping) = self.last_full_ping else {
    +402            debug!("no previous full ping: need full ping");
    +403            return true;
    +404        };
    +405        match &self.udp_paths.send_addr(have_ipv6) {
    +406            UdpSendAddr::None | UdpSendAddr::Unconfirmed(_) => {
    +407                debug!("best addr not set: need full ping");
     408                true
     409            }
    -410            best_addr::State::Valid(addr) => {
    -411                if addr.latency > GOOD_ENOUGH_LATENCY && *now - last_full_ping >= UPGRADE_INTERVAL {
    -412                    debug!(
    -413                        "full ping interval expired and latency is only {}ms: need full ping",
    -414                        addr.latency.as_millis()
    -415                    );
    -416                    true
    -417                } else {
    -418                    trace!(?now, "best_addr valid: not needed");
    -419                    false
    -420                }
    -421            }
    -422        }
    -423    }
    -424
    -425    #[cfg(wasm_browser)]
    -426    fn want_call_me_maybe(&self, _now: &Instant) -> bool {
    -427        trace!("full ping: skipped in browser");
    -428        false
    -429    }
    -430
    -431    /// Cleanup the expired ping for the passed in txid.
    -432    #[instrument("disco", skip_all, fields(node = %self.node_id.fmt_short()))]
    -433    pub(super) fn ping_timeout(&mut self, txid: stun_rs::TransactionId) {
    -434        if let Some(sp) = self.sent_pings.remove(&txid) {
    -435            debug!(tx = %HEXLOWER.encode(&txid), addr = %sp.to, "pong not received in timeout");
    -436            match sp.to {
    -437                SendAddr::Udp(addr) => {
    -438                    if let Some(path_state) = self.udp_paths.paths.get_mut(&addr.into()) {
    -439                        path_state.last_ping = None;
    -440                        let consider_alive = path_state
    -441                            .last_alive()
    -442                            .map(|last_alive| last_alive.elapsed() <= PING_TIMEOUT_DURATION)
    -443                            .unwrap_or(false);
    -444                        if !consider_alive {
    -445                            // If there was no sign of life from this path during the time
    -446                            // which we should have received the pong, clear best addr and
    -447                            // pong.  Both are used to select this path again, but we know
    -448                            // it's not a usable path now.
    -449                            path_state.recent_pong = None;
    -450                            self.udp_paths.best_addr.clear_if_equals(
    -451                                addr,
    -452                                ClearReason::PongTimeout,
    -453                                self.relay_url().is_some(),
    -454                            )
    -455                        }
    -456                    } else {
    -457                        // If we have no state for the best addr it should have been cleared
    -458                        // anyway.
    -459                        self.udp_paths.best_addr.clear_if_equals(
    -460                            addr,
    -461                            ClearReason::PongTimeout,
    -462                            self.relay_url.is_some(),
    -463                        );
    -464                    }
    -465                }
    -466                SendAddr::Relay(ref url) => {
    -467                    if let Some((home_relay, relay_state)) = self.relay_url.as_mut() {
    -468                        if home_relay == url {
    -469                            // lost connectivity via relay
    -470                            relay_state.last_ping = None;
    -471                        }
    -472                    }
    -473                }
    -474            }
    -475        }
    -476    }
    -477
    -478    #[must_use = "pings must be handled"]
    -479    fn start_ping(&self, dst: SendAddr, purpose: DiscoPingPurpose) -> Option<SendPing> {
    -480        #[cfg(any(test, feature = "test-utils"))]
    -481        if self.path_selection == PathSelection::RelayOnly && !dst.is_relay() {
    -482            // don't attempt any hole punching in relay only mode
    -483            warn!("in `RelayOnly` mode, ignoring request to start a hole punching attempt.");
    -484            return None;
    -485        }
    -486        #[cfg(wasm_browser)]
    -487        if !dst.is_relay() {
    -488            return None; // Similar to `RelayOnly` mode, we don't send UDP pings for hole-punching.
    -489        }
    -490
    -491        let tx_id = stun_rs::TransactionId::default();
    -492        trace!(tx = %HEXLOWER.encode(&tx_id), %dst, ?purpose,
    -493               dst = %self.node_id.fmt_short(), "start ping");
    -494        event!(
    -495            target: "iroh::_events::ping::sent",
    -496            Level::DEBUG,
    -497            remote_node = %self.node_id.fmt_short(),
    -498            ?dst,
    -499            txn = ?tx_id,
    -500            ?purpose,
    -501        );
    -502        Some(SendPing {
    -503            id: self.id,
    -504            dst,
    -505            dst_node: self.node_id,
    -506            tx_id,
    -507            purpose,
    -508        })
    -509    }
    -510
    -511    /// Record the fact that a ping has been sent out.
    -512    pub(super) fn ping_sent(
    -513        &mut self,
    -514        to: SendAddr,
    -515        tx_id: stun_rs::TransactionId,
    -516        purpose: DiscoPingPurpose,
    -517        sender: mpsc::Sender<ActorMessage>,
    -518    ) {
    -519        trace!(%to, tx = %HEXLOWER.encode(&tx_id), ?purpose, "record ping sent");
    -520
    -521        let now = Instant::now();
    -522        let mut path_found = false;
    -523        match to {
    -524            SendAddr::Udp(addr) => {
    -525                if let Some(st) = self.udp_paths.paths.get_mut(&addr.into()) {
    -526                    st.last_ping.replace(now);
    -527                    path_found = true
    -528                }
    -529            }
    -530            SendAddr::Relay(ref url) => {
    -531                if let Some((home_relay, relay_state)) = self.relay_url.as_mut() {
    -532                    if home_relay == url {
    -533                        relay_state.last_ping.replace(now);
    -534                        path_found = true
    -535                    }
    -536                }
    -537            }
    -538        }
    -539        if !path_found {
    -540            // Shouldn't happen. But don't ping an endpoint that's not active for us.
    -541            warn!(%to, ?purpose, "unexpected attempt to ping no longer live path");
    -542            return;
    -543        }
    -544
    -545        let id = self.id;
    -546        let _expiry_task = AbortOnDropHandle::new(task::spawn(async move {
    -547            time::sleep(PING_TIMEOUT_DURATION).await;
    -548            sender
    -549                .send(ActorMessage::EndpointPingExpired(id, tx_id))
    -550                .await
    -551                .ok();
    -552        }));
    -553        self.sent_pings.insert(
    -554            tx_id,
    -555            SentPing {
    -556                to,
    -557                at: now,
    -558                purpose,
    -559                _expiry_task,
    -560            },
    -561        );
    -562    }
    -563
    -564    /// Send a DISCO call-me-maybe message to the peer.
    -565    ///
    -566    /// This takes care of sending the needed pings beforehand.  This ensures that we open
    -567    /// our firewall's port so that when the receiver sends us DISCO pings in response to
    -568    /// our call-me-maybe they will reach us and the other side establishes a direct
    -569    /// connection upon our subsequent pong response.
    -570    ///
    -571    /// For [`SendCallMeMaybe::IfNoRecent`], **no** paths will be pinged if there already
    -572    /// was a recent call-me-maybe sent.
    -573    ///
    -574    /// The caller is responsible for sending the messages.
    -575    #[must_use = "actions must be handled"]
    -576    fn send_call_me_maybe(&mut self, now: Instant, always: SendCallMeMaybe) -> Vec<PingAction> {
    -577        match always {
    -578            SendCallMeMaybe::Always => (),
    -579            SendCallMeMaybe::IfNoRecent => {
    -580                let had_recent_call_me_maybe = self
    -581                    .last_call_me_maybe
    -582                    .map(|when| when.elapsed() < HEARTBEAT_INTERVAL)
    -583                    .unwrap_or(false);
    -584                if had_recent_call_me_maybe {
    -585                    trace!("skipping call-me-maybe, still recent");
    -586                    return Vec::new();
    -587                }
    -588            }
    -589        }
    -590        // We send pings regardless of whether we have a RelayUrl.  If we were given any
    -591        // direct address paths to contact but no RelayUrl, we still need to send a DISCO
    -592        // ping to the direct address paths so that the other node will learn about us and
    -593        // accepts the connection.
    -594        let mut msgs = self.send_pings(now);
    -595
    -596        if let Some(url) = self.relay_url() {
    -597            debug!(%url, "queue call-me-maybe");
    -598            msgs.push(PingAction::SendCallMeMaybe {
    -599                relay_url: url,
    -600                dst_node: self.node_id,
    -601            });
    -602            self.last_call_me_maybe = Some(now);
    -603        } else {
    -604            debug!("can not send call-me-maybe, no relay URL");
    -605        }
    -606
    -607        msgs
    -608    }
    -609
    -610    /// Send DISCO Pings to all the paths of this node.
    -611    ///
    -612    /// Any paths to the node which have not been recently pinged will be sent a disco
    -613    /// ping.
    -614    ///
    -615    /// The caller is responsible for sending the messages.
    -616    #[must_use = "actions must be handled"]
    -617    fn send_pings(&mut self, now: Instant) -> Vec<PingAction> {
    -618        // We allocate +1 in case the caller wants to add a call-me-maybe message.
    -619        let mut ping_msgs = Vec::with_capacity(self.udp_paths.paths.len() + 1);
    -620
    -621        if let Some((url, state)) = self.relay_url.as_ref() {
    -622            if state.needs_ping(&now) {
    -623                debug!(%url, "relay path needs ping");
    -624                if let Some(msg) =
    -625                    self.start_ping(SendAddr::Relay(url.clone()), DiscoPingPurpose::Discovery)
    -626                {
    -627                    ping_msgs.push(PingAction::SendPing(msg))
    -628                }
    -629            }
    -630        }
    -631
    -632        #[cfg(any(test, feature = "test-utils"))]
    -633        if self.path_selection == PathSelection::RelayOnly {
    -634            warn!("in `RelayOnly` mode, ignoring request to respond to a hole punching attempt.");
    -635            return ping_msgs;
    -636        }
    -637
    -638        self.prune_direct_addresses();
    -639        let mut ping_dsts = String::from("[");
    -640        self.udp_paths
    -641            .paths
    -642            .iter()
    -643            .filter_map(|(ipp, state)| state.needs_ping(&now).then_some(*ipp))
    -644            .filter_map(|ipp| {
    -645                self.start_ping(SendAddr::Udp(ipp.into()), DiscoPingPurpose::Discovery)
    -646            })
    -647            .for_each(|msg| {
    -648                use std::fmt::Write;
    -649                write!(&mut ping_dsts, " {} ", msg.dst).ok();
    -650                ping_msgs.push(PingAction::SendPing(msg));
    -651            });
    -652        ping_dsts.push(']');
    -653        debug!(
    -654            %ping_dsts,
    -655            dst = %self.node_id.fmt_short(),
    -656            paths = %summarize_node_paths(&self.udp_paths.paths),
    -657            "sending pings to node",
    -658        );
    -659        self.last_full_ping.replace(now);
    -660        ping_msgs
    -661    }
    -662
    -663    pub(super) fn update_from_node_addr(
    -664        &mut self,
    -665        new_relay_url: Option<&RelayUrl>,
    -666        new_addrs: &BTreeSet<SocketAddr>,
    -667        source: super::Source,
    -668        metrics: &MagicsockMetrics,
    -669    ) {
    -670        if self.udp_paths.best_addr.is_empty() {
    -671            // we do not have a direct connection, so changing the relay information may
    -672            // have an effect on our connection status
    -673            if self.relay_url.is_none() && new_relay_url.is_some() {
    -674                // we did not have a relay connection before, but now we do
    -675                metrics.num_relay_conns_added.inc();
    -676            } else if self.relay_url.is_some() && new_relay_url.is_none() {
    -677                // we had a relay connection before but do not have one now
    -678                metrics.num_relay_conns_removed.inc();
    -679            }
    -680        }
    -681
    -682        let now = Instant::now();
    -683
    -684        if new_relay_url.is_some() && new_relay_url != self.relay_url().as_ref() {
    -685            debug!(
    -686                "Changing relay node from {:?} to {:?}",
    -687                self.relay_url, new_relay_url
    -688            );
    -689            self.relay_url = new_relay_url.map(|url| {
    -690                (
    -691                    url.clone(),
    -692                    PathState::new(self.node_id, url.clone().into(), source.clone(), now),
    -693                )
    -694            });
    -695        }
    -696
    -697        for &addr in new_addrs.iter() {
    -698            self.udp_paths
    -699                .paths
    -700                .entry(addr.into())
    -701                .and_modify(|path_state| {
    -702                    path_state.add_source(source.clone(), now);
    -703                })
    -704                .or_insert_with(|| {
    -705                    PathState::new(self.node_id, SendAddr::from(addr), source.clone(), now)
    -706                });
    -707        }
    -708        let paths = summarize_node_paths(&self.udp_paths.paths);
    -709        debug!(new = ?new_addrs , %paths, "added new direct paths for endpoint");
    -710    }
    -711
    -712    /// Handle a received Disco Ping.
    -713    ///
    -714    /// - Ensures the paths the ping was received on is a known path for this endpoint.
    -715    ///
    -716    /// - If there is no best_addr for this endpoint yet, sends a ping itself to try and
    -717    ///   establish one.
    -718    ///
    -719    /// This is called once we've already verified that we got a valid discovery message
    -720    /// from `self` via ep.
    -721    pub(super) fn handle_ping(
    -722        &mut self,
    -723        path: SendAddr,
    -724        tx_id: stun_rs::TransactionId,
    -725    ) -> PingHandled {
    -726        let now = Instant::now();
    +410            UdpSendAddr::Outdated(_) => {
    +411                debug!("best addr expired: need full ping");
    +412                true
    +413            }
    +414            UdpSendAddr::Valid(addr) => {
    +415                let latency = self
    +416                    .udp_paths
    +417                    .paths()
    +418                    .get(&(*addr).into())
    +419                    .expect("send path not tracked?")
    +420                    .latency()
    +421                    .expect("send_addr marked valid incorrectly");
    +422                if latency > GOOD_ENOUGH_LATENCY && *now - last_full_ping >= UPGRADE_INTERVAL {
    +423                    debug!(
    +424                        "full ping interval expired and latency is only {}ms: need full ping",
    +425                        latency.as_millis()
    +426                    );
    +427                    true
    +428                } else {
    +429                    trace!(?now, "best_addr valid: not needed");
    +430                    false
    +431                }
    +432            }
    +433        }
    +434    }
    +435
    +436    #[cfg(wasm_browser)]
    +437    fn want_call_me_maybe(&self, _now: &Instant, _have_ipv6: bool) -> bool {
    +438        trace!("full ping: skipped in browser");
    +439        false
    +440    }
    +441
    +442    /// Cleanup the expired ping for the passed in txid.
    +443    #[instrument("disco", skip_all, fields(node = %self.node_id.fmt_short()))]
    +444    pub(super) fn ping_timeout(
    +445        &mut self,
    +446        txid: stun_rs::TransactionId,
    +447        now: Instant,
    +448        metrics: &MagicsockMetrics,
    +449    ) {
    +450        if let Some(sp) = self.sent_pings.remove(&txid) {
    +451            debug!(tx = %HEXLOWER.encode(&txid), addr = %sp.to, "pong not received in timeout");
    +452            match sp.to {
    +453                SendAddr::Udp(addr) => {
    +454                    if let Some(path_state) =
    +455                        self.udp_paths.access_mut(now).paths().get_mut(&addr.into())
    +456                    {
    +457                        path_state.last_ping = None;
    +458                        let consider_alive = path_state
    +459                            .last_alive()
    +460                            .map(|last_alive| last_alive.elapsed() <= PING_TIMEOUT_DURATION)
    +461                            .unwrap_or(false);
    +462                        if !consider_alive {
    +463                            // If there was no sign of life from this path during the time
    +464                            // which we should have received the pong, clear best addr and
    +465                            // pong.  Both are used to select this path again, but we know
    +466                            // it's not a usable path now.
    +467                            path_state.validity = PathValidity::empty();
    +468                            metrics.path_ping_failures.inc();
    +469
    +470                            path_state.validity.record_metrics(metrics);
    +471                            metrics.path_marked_outdated.inc();
    +472                        }
    +473                    }
    +474                }
    +475                SendAddr::Relay(ref url) => {
    +476                    if let Some((home_relay, relay_state)) = self.relay_url.as_mut() {
    +477                        if home_relay == url {
    +478                            // lost connectivity via relay
    +479                            relay_state.last_ping = None;
    +480                        }
    +481                    }
    +482                }
    +483            }
    +484        }
    +485    }
    +486
    +487    #[must_use = "pings must be handled"]
    +488    fn start_ping(&self, dst: SendAddr, purpose: DiscoPingPurpose) -> Option<SendPing> {
    +489        #[cfg(any(test, feature = "test-utils"))]
    +490        if self.path_selection == PathSelection::RelayOnly && !dst.is_relay() {
    +491            // don't attempt any hole punching in relay only mode
    +492            warn!("in `RelayOnly` mode, ignoring request to start a hole punching attempt.");
    +493            return None;
    +494        }
    +495        #[cfg(wasm_browser)]
    +496        if !dst.is_relay() {
    +497            return None; // Similar to `RelayOnly` mode, we don't send UDP pings for hole-punching.
    +498        }
    +499
    +500        let tx_id = stun_rs::TransactionId::default();
    +501        trace!(tx = %HEXLOWER.encode(&tx_id), %dst, ?purpose,
    +502               dst = %self.node_id.fmt_short(), "start ping");
    +503        event!(
    +504            target: "iroh::_events::ping::sent",
    +505            Level::DEBUG,
    +506            remote_node = %self.node_id.fmt_short(),
    +507            ?dst,
    +508            txn = ?tx_id,
    +509            ?purpose,
    +510        );
    +511        Some(SendPing {
    +512            id: self.id,
    +513            dst,
    +514            dst_node: self.node_id,
    +515            tx_id,
    +516            purpose,
    +517        })
    +518    }
    +519
    +520    /// Record the fact that a ping has been sent out.
    +521    pub(super) fn ping_sent(
    +522        &mut self,
    +523        to: SendAddr,
    +524        tx_id: stun_rs::TransactionId,
    +525        purpose: DiscoPingPurpose,
    +526        sender: mpsc::Sender<ActorMessage>,
    +527    ) {
    +528        trace!(%to, tx = %HEXLOWER.encode(&tx_id), ?purpose, "record ping sent");
    +529
    +530        let now = Instant::now();
    +531        let mut path_found = false;
    +532        match to {
    +533            SendAddr::Udp(addr) => {
    +534                if let Some(st) = self.udp_paths.access_mut(now).paths().get_mut(&addr.into()) {
    +535                    st.last_ping.replace(now);
    +536                    st.validity.record_ping_sent();
    +537                    path_found = true
    +538                }
    +539            }
    +540            SendAddr::Relay(ref url) => {
    +541                if let Some((home_relay, relay_state)) = self.relay_url.as_mut() {
    +542                    if home_relay == url {
    +543                        relay_state.last_ping.replace(now);
    +544                        path_found = true
    +545                    }
    +546                }
    +547            }
    +548        }
    +549        if !path_found {
    +550            // Shouldn't happen. But don't ping an endpoint that's not active for us.
    +551            warn!(%to, ?purpose, "unexpected attempt to ping no longer live path");
    +552            return;
    +553        }
    +554
    +555        let id = self.id;
    +556        let _expiry_task = AbortOnDropHandle::new(task::spawn(async move {
    +557            time::sleep(PING_TIMEOUT_DURATION).await;
    +558            sender
    +559                .send(ActorMessage::EndpointPingExpired(id, tx_id))
    +560                .await
    +561                .ok();
    +562        }));
    +563        self.sent_pings.insert(
    +564            tx_id,
    +565            SentPing {
    +566                to,
    +567                at: now,
    +568                purpose,
    +569                _expiry_task,
    +570            },
    +571        );
    +572    }
    +573
    +574    /// Send a DISCO call-me-maybe message to the peer.
    +575    ///
    +576    /// This takes care of sending the needed pings beforehand.  This ensures that we open
    +577    /// our firewall's port so that when the receiver sends us DISCO pings in response to
    +578    /// our call-me-maybe they will reach us and the other side establishes a direct
    +579    /// connection upon our subsequent pong response.
    +580    ///
    +581    /// For [`SendCallMeMaybe::IfNoRecent`], **no** paths will be pinged if there already
    +582    /// was a recent call-me-maybe sent.
    +583    ///
    +584    /// The caller is responsible for sending the messages.
    +585    #[must_use = "actions must be handled"]
    +586    fn send_call_me_maybe(&mut self, now: Instant, always: SendCallMeMaybe) -> Vec<PingAction> {
    +587        match always {
    +588            SendCallMeMaybe::Always => (),
    +589            SendCallMeMaybe::IfNoRecent => {
    +590                let had_recent_call_me_maybe = self
    +591                    .last_call_me_maybe
    +592                    .map(|when| when.elapsed() < HEARTBEAT_INTERVAL)
    +593                    .unwrap_or(false);
    +594                if had_recent_call_me_maybe {
    +595                    trace!("skipping call-me-maybe, still recent");
    +596                    return Vec::new();
    +597                }
    +598            }
    +599        }
    +600        // We send pings regardless of whether we have a RelayUrl.  If we were given any
    +601        // direct address paths to contact but no RelayUrl, we still need to send a DISCO
    +602        // ping to the direct address paths so that the other node will learn about us and
    +603        // accepts the connection.
    +604        let mut msgs = self.send_pings(now);
    +605
    +606        if let Some(url) = self.relay_url() {
    +607            debug!(%url, "queue call-me-maybe");
    +608            msgs.push(PingAction::SendCallMeMaybe {
    +609                relay_url: url,
    +610                dst_node: self.node_id,
    +611            });
    +612            self.last_call_me_maybe = Some(now);
    +613        } else {
    +614            debug!("can not send call-me-maybe, no relay URL");
    +615        }
    +616
    +617        msgs
    +618    }
    +619
    +620    /// Send DISCO Pings to all the paths of this node.
    +621    ///
    +622    /// Any paths to the node which have not been recently pinged will be sent a disco
    +623    /// ping.
    +624    ///
    +625    /// The caller is responsible for sending the messages.
    +626    #[must_use = "actions must be handled"]
    +627    fn send_pings(&mut self, now: Instant) -> Vec<PingAction> {
    +628        // We allocate +1 in case the caller wants to add a call-me-maybe message.
    +629        let mut ping_msgs = Vec::with_capacity(self.udp_paths.paths().len() + 1);
    +630
    +631        if let Some((url, state)) = self.relay_url.as_ref() {
    +632            if state.needs_ping(&now) {
    +633                debug!(%url, "relay path needs ping");
    +634                if let Some(msg) =
    +635                    self.start_ping(SendAddr::Relay(url.clone()), DiscoPingPurpose::Discovery)
    +636                {
    +637                    ping_msgs.push(PingAction::SendPing(msg))
    +638                }
    +639            }
    +640        }
    +641
    +642        #[cfg(any(test, feature = "test-utils"))]
    +643        if self.path_selection == PathSelection::RelayOnly {
    +644            warn!("in `RelayOnly` mode, ignoring request to respond to a hole punching attempt.");
    +645            return ping_msgs;
    +646        }
    +647
    +648        self.prune_direct_addresses(now);
    +649        let mut ping_dsts = String::from("[");
    +650        self.udp_paths
    +651            .paths()
    +652            .iter()
    +653            .filter_map(|(ipp, state)| state.needs_ping(&now).then_some(*ipp))
    +654            .filter_map(|ipp| {
    +655                self.start_ping(SendAddr::Udp(ipp.into()), DiscoPingPurpose::Discovery)
    +656            })
    +657            .for_each(|msg| {
    +658                use std::fmt::Write;
    +659                write!(&mut ping_dsts, " {} ", msg.dst).ok();
    +660                ping_msgs.push(PingAction::SendPing(msg));
    +661            });
    +662        ping_dsts.push(']');
    +663        debug!(
    +664            %ping_dsts,
    +665            dst = %self.node_id.fmt_short(),
    +666            paths = %summarize_node_paths(self.udp_paths.paths()),
    +667            "sending pings to node",
    +668        );
    +669        self.last_full_ping.replace(now);
    +670        ping_msgs
    +671    }
    +672
    +673    pub(super) fn update_from_node_addr(
    +674        &mut self,
    +675        new_relay_url: Option<&RelayUrl>,
    +676        new_addrs: &BTreeSet<SocketAddr>,
    +677        source: super::Source,
    +678        have_ipv6: bool,
    +679        metrics: &MagicsockMetrics,
    +680    ) {
    +681        if matches!(
    +682            self.udp_paths.send_addr(have_ipv6),
    +683            UdpSendAddr::None | UdpSendAddr::Unconfirmed(_)
    +684        ) {
    +685            // we do not have a direct connection, so changing the relay information may
    +686            // have an effect on our connection status
    +687            if self.relay_url.is_none() && new_relay_url.is_some() {
    +688                // we did not have a relay connection before, but now we do
    +689                metrics.num_relay_conns_added.inc();
    +690            } else if self.relay_url.is_some() && new_relay_url.is_none() {
    +691                // we had a relay connection before but do not have one now
    +692                metrics.num_relay_conns_removed.inc();
    +693            }
    +694        }
    +695
    +696        let now = Instant::now();
    +697
    +698        if new_relay_url.is_some() && new_relay_url != self.relay_url().as_ref() {
    +699            debug!(
    +700                "Changing relay node from {:?} to {:?}",
    +701                self.relay_url, new_relay_url
    +702            );
    +703            self.relay_url = new_relay_url.map(|url| {
    +704                (
    +705                    url.clone(),
    +706                    PathState::new(self.node_id, url.clone().into(), source.clone(), now),
    +707                )
    +708            });
    +709        }
    +710
    +711        let mut access = self.udp_paths.access_mut(now);
    +712        for &addr in new_addrs.iter() {
    +713            access
    +714                .paths()
    +715                .entry(addr.into())
    +716                .and_modify(|path_state| {
    +717                    path_state.add_source(source.clone(), now);
    +718                })
    +719                .or_insert_with(|| {
    +720                    PathState::new(self.node_id, SendAddr::from(addr), source.clone(), now)
    +721                });
    +722        }
    +723        drop(access);
    +724        let paths = summarize_node_paths(self.udp_paths.paths());
    +725        debug!(new = ?new_addrs , %paths, "added new direct paths for endpoint");
    +726    }
     727
    -728        let role = match path {
    -729            SendAddr::Udp(addr) => match self.udp_paths.paths.entry(addr.into()) {
    -730                Entry::Occupied(mut occupied) => occupied.get_mut().handle_ping(tx_id, now),
    -731                Entry::Vacant(vacant) => {
    -732                    info!(%addr, "new direct addr for node");
    -733                    vacant.insert(PathState::with_ping(
    -734                        self.node_id,
    -735                        path.clone(),
    -736                        tx_id,
    -737                        Source::Udp,
    -738                        now,
    -739                    ));
    -740                    PingRole::NewPath
    -741                }
    -742            },
    -743            SendAddr::Relay(ref url) => {
    -744                match self.relay_url.as_mut() {
    -745                    Some((home_url, _state)) if home_url != url => {
    -746                        // either the node changed relays or we didn't have a relay address for the
    -747                        // node. In both cases, trust the new confirmed url
    -748                        info!(%url, "new relay addr for node");
    -749                        self.relay_url = Some((
    -750                            url.clone(),
    -751                            PathState::with_ping(
    -752                                self.node_id,
    -753                                path.clone(),
    -754                                tx_id,
    -755                                Source::Relay,
    -756                                now,
    -757                            ),
    -758                        ));
    -759                        PingRole::NewPath
    -760                    }
    -761                    Some((_home_url, state)) => state.handle_ping(tx_id, now),
    -762                    None => {
    -763                        info!(%url, "new relay addr for node");
    -764                        self.relay_url = Some((
    -765                            url.clone(),
    -766                            PathState::with_ping(
    -767                                self.node_id,
    -768                                path.clone(),
    -769                                tx_id,
    -770                                Source::Relay,
    -771                                now,
    -772                            ),
    -773                        ));
    -774                        PingRole::NewPath
    -775                    }
    -776                }
    -777            }
    -778        };
    -779        event!(
    -780            target: "iroh::_events::ping::recv",
    -781            Level::DEBUG,
    -782            remote_node = %self.node_id.fmt_short(),
    -783            src = ?path,
    -784            txn = ?tx_id,
    -785            ?role,
    -786        );
    -787
    -788        if matches!(path, SendAddr::Udp(_)) && matches!(role, PingRole::NewPath) {
    -789            self.prune_direct_addresses();
    -790        }
    -791
    -792        // if the endpoint does not yet have a best_addrr
    -793        let needs_ping_back = if matches!(path, SendAddr::Udp(_))
    -794            && matches!(
    -795                self.udp_paths.best_addr.state(now),
    -796                best_addr::State::Empty | best_addr::State::Outdated(_)
    -797            ) {
    -798            // We also need to send a ping to make this path available to us as well.  This
    -799            // is always sent together with a pong.  So in the worst case the pong gets lost
    -800            // and this ping does not.  In that case we ping-pong until both sides have
    -801            // received at least one pong.  Once both sides have received one pong they both
    -802            // have a best_addr and this ping will stop being sent.
    -803            self.start_ping(path, DiscoPingPurpose::PingBack)
    -804        } else {
    -805            None
    -806        };
    -807
    -808        debug!(
    -809            ?role,
    -810            needs_ping_back = ?needs_ping_back.is_some(),
    -811            paths = %summarize_node_paths(&self.udp_paths.paths),
    -812            "endpoint handled ping",
    -813        );
    -814        PingHandled {
    -815            role,
    -816            needs_ping_back,
    -817        }
    -818    }
    -819
    -820    /// Prune inactive paths.
    -821    ///
    -822    /// This trims the list of inactive paths for an endpoint.  At most
    -823    /// [`MAX_INACTIVE_DIRECT_ADDRESSES`] are kept.
    -824    pub(super) fn prune_direct_addresses(&mut self) {
    -825        // prune candidates are addresses that are not active
    -826        let mut prune_candidates: Vec<_> = self
    -827            .udp_paths
    -828            .paths
    -829            .iter()
    -830            .filter(|(_ip_port, state)| !state.is_active())
    -831            .map(|(ip_port, state)| (*ip_port, state.last_alive()))
    -832            .filter(|(_ipp, last_alive)| match last_alive {
    -833                Some(last_seen) => last_seen.elapsed() > LAST_ALIVE_PRUNE_DURATION,
    -834                None => true,
    -835            })
    -836            .collect();
    -837        let prune_count = prune_candidates
    -838            .len()
    -839            .saturating_sub(MAX_INACTIVE_DIRECT_ADDRESSES);
    -840        if prune_count == 0 {
    -841            // nothing to do, within limits
    -842            debug!(
    -843                paths = %summarize_node_paths(&self.udp_paths.paths),
    -844                "prune addresses: {prune_count} pruned",
    -845            );
    -846            return;
    -847        }
    -848
    -849        // sort leaving the worst addresses first (never contacted) and better ones (most recently
    -850        // used ones) last
    -851        prune_candidates.sort_unstable_by_key(|(_ip_port, last_alive)| *last_alive);
    -852        prune_candidates.truncate(prune_count);
    -853        for (ip_port, _last_alive) in prune_candidates.into_iter() {
    -854            self.remove_direct_addr(&ip_port, ClearReason::Inactive)
    -855        }
    -856        debug!(
    -857            paths = %summarize_node_paths(&self.udp_paths.paths),
    -858            "prune addresses: {prune_count} pruned",
    -859        );
    -860    }
    -861
    -862    /// Called when connectivity changes enough that we should question our earlier
    -863    /// assumptions about which paths work.
    -864    #[instrument("disco", skip_all, fields(node = %self.node_id.fmt_short()))]
    -865    pub(super) fn note_connectivity_change(&mut self) {
    -866        self.udp_paths.best_addr.clear_trust("connectivity changed");
    -867        for es in self.udp_paths.paths.values_mut() {
    -868            es.clear();
    -869        }
    -870    }
    -871
    -872    /// Handles a Pong message (a reply to an earlier ping).
    -873    ///
    -874    /// It reports the address and key that should be inserted for the endpoint if any.
    -875    #[instrument(skip(self))]
    -876    pub(super) fn handle_pong(
    -877        &mut self,
    -878        m: &disco::Pong,
    -879        src: SendAddr,
    -880    ) -> Option<(SocketAddr, PublicKey)> {
    -881        event!(
    -882            target: "iroh::_events::pong::recv",
    -883            Level::DEBUG,
    -884            remote_node = self.node_id.fmt_short(),
    -885            ?src,
    -886            txn = ?m.tx_id,
    -887        );
    -888        let is_relay = src.is_relay();
    -889        match self.sent_pings.remove(&m.tx_id) {
    -890            None => {
    -891                // This is not a pong for a ping we sent.  In reality however we probably
    -892                // did send this ping but it has timed-out by the time we receive this pong
    -893                // so we removed the state already.
    -894                debug!(tx = %HEXLOWER.encode(&m.tx_id), "received unknown pong (did it timeout?)");
    -895                None
    -896            }
    -897            Some(sp) => {
    -898                let mut node_map_insert = None;
    -899
    -900                let now = Instant::now();
    -901                let latency = now - sp.at;
    -902
    -903                debug!(
    -904                    tx = %HEXLOWER.encode(&m.tx_id),
    -905                    src = %src,
    -906                    reported_ping_src = %m.ping_observed_addr,
    -907                    ping_dst = %sp.to,
    -908                    is_relay = %src.is_relay(),
    -909                    latency = %latency.as_millis(),
    -910                    "received pong",
    -911                );
    -912
    -913                match src {
    -914                    SendAddr::Udp(addr) => {
    -915                        match self.udp_paths.paths.get_mut(&addr.into()) {
    -916                            None => {
    -917                                warn!("ignoring pong: no state for src addr");
    -918                                // This is no longer an endpoint we care about.
    -919                                return node_map_insert;
    -920                            }
    -921                            Some(st) => {
    -922                                node_map_insert = Some((addr, self.node_id));
    -923                                st.add_pong_reply(PongReply {
    -924                                    latency,
    -925                                    pong_at: now,
    -926                                    from: src,
    -927                                    pong_src: m.ping_observed_addr.clone(),
    -928                                });
    -929                            }
    -930                        }
    -931                        debug!(
    -932                            paths = %summarize_node_paths(&self.udp_paths.paths),
    -933                            "handled pong",
    -934                        );
    -935                    }
    -936                    SendAddr::Relay(ref url) => match self.relay_url.as_mut() {
    -937                        Some((home_url, state)) if home_url == url => {
    -938                            state.add_pong_reply(PongReply {
    -939                                latency,
    -940                                pong_at: now,
    -941                                from: src,
    -942                                pong_src: m.ping_observed_addr.clone(),
    -943                            });
    -944                        }
    -945                        other => {
    -946                            // if we are here then we sent this ping, but the url changed
    -947                            // waiting for the response. It was either set to None or changed to
    -948                            // another relay. This should either never happen or be extremely
    -949                            // unlikely. Log and ignore for now
    -950                            warn!(
    -951                                stored=?other,
    -952                                received=?url,
    -953                                "ignoring pong via relay for different relay from last one",
    -954                            );
    -955                        }
    -956                    },
    -957                }
    -958
    -959                // Promote this pong response to our current best address if it's lower latency.
    -960                // TODO(bradfitz): decide how latency vs. preference order affects decision
    -961                if let SendAddr::Udp(to) = sp.to {
    -962                    debug_assert!(!is_relay, "mismatching relay & udp");
    -963                    self.udp_paths.best_addr.insert_if_better_or_reconfirm(
    -964                        to,
    -965                        latency,
    -966                        best_addr::Source::ReceivedPong,
    -967                        now,
    -968                    );
    -969                }
    -970
    -971                node_map_insert
    -972            }
    -973        }
    -974    }
    -975
    -976    /// Handles a DISCO CallMeMaybe discovery message.
    -977    ///
    -978    /// The contract for use of this message is that the node has already pinged to us via
    -979    /// UDP, so their stateful firewall should be open. Now we can Ping back and make it
    -980    /// through.
    -981    ///
    -982    /// However if the remote side has no direct path information to us, they would not have
    -983    /// had any [`IpPort`]s to send pings to and our pings might end up blocked.  But at
    -984    /// least open the firewalls on our side, giving the other side another change of making
    -985    /// it through when it pings in response.
    -986    pub(super) fn handle_call_me_maybe(&mut self, m: disco::CallMeMaybe) -> Vec<PingAction> {
    -987        let now = Instant::now();
    -988        let mut call_me_maybe_ipps = BTreeSet::new();
    -989
    -990        for peer_sockaddr in &m.my_numbers {
    -991            if let IpAddr::V6(ip) = peer_sockaddr.ip() {
    -992                if netwatch::ip::is_unicast_link_local(ip) {
    -993                    // We send these out, but ignore them for now.
    -994                    // TODO: teach the ping code to ping on all interfaces for these.
    -995                    continue;
    -996                }
    -997            }
    -998            let ipp = IpPort::from(*peer_sockaddr);
    -999            call_me_maybe_ipps.insert(ipp);
    -1000            self.udp_paths
    -1001                .paths
    -1002                .entry(ipp)
    -1003                .or_insert_with(|| {
    -1004                    PathState::new(
    -1005                        self.node_id,
    -1006                        SendAddr::from(*peer_sockaddr),
    -1007                        Source::Relay,
    -1008                        now,
    -1009                    )
    -1010                })
    -1011                .call_me_maybe_time
    -1012                .replace(now);
    -1013        }
    -1014
    -1015        // Zero out all the last_ping times to force send_pings to send new ones, even if
    -1016        // it's been less than 5 seconds ago.  Also clear pongs for direct addresses not
    -1017        // included in the updated set.
    -1018        for (ipp, st) in self.udp_paths.paths.iter_mut() {
    -1019            st.last_ping = None;
    -1020            if !call_me_maybe_ipps.contains(ipp) {
    -1021                // TODO: This seems like a weird way to signal that the endpoint no longer
    -1022                // thinks it has this IpPort as an available path.
    -1023                if st.recent_pong.is_some() {
    -1024                    debug!(path=?ipp ,"clearing recent pong");
    -1025                    st.recent_pong = None;
    -1026                }
    -1027            }
    -1028        }
    -1029        // Clear trust on our best_addr if it is not included in the updated set.  Also
    -1030        // clear the last call-me-maybe send time so we will send one again.
    -1031        if let Some(addr) = self.udp_paths.best_addr.addr() {
    -1032            let ipp: IpPort = addr.into();
    -1033            if !call_me_maybe_ipps.contains(&ipp) {
    -1034                self.udp_paths
    -1035                    .best_addr
    -1036                    .clear_trust("best_addr not in new call-me-maybe");
    -1037                self.last_call_me_maybe = None;
    -1038            }
    +728    /// Handle a received Disco Ping.
    +729    ///
    +730    /// - Ensures the paths the ping was received on is a known path for this endpoint.
    +731    ///
    +732    /// - If there is no best_addr for this endpoint yet, sends a ping itself to try and
    +733    ///   establish one.
    +734    ///
    +735    /// This is called once we've already verified that we got a valid discovery message
    +736    /// from `self` via ep.
    +737    pub(super) fn handle_ping(
    +738        &mut self,
    +739        path: SendAddr,
    +740        tx_id: stun_rs::TransactionId,
    +741    ) -> PingHandled {
    +742        let now = Instant::now();
    +743
    +744        let role = match path {
    +745            SendAddr::Udp(addr) => {
    +746                match self.udp_paths.access_mut(now).paths().entry(addr.into()) {
    +747                    Entry::Occupied(mut occupied) => occupied.get_mut().handle_ping(tx_id, now),
    +748                    Entry::Vacant(vacant) => {
    +749                        info!(%addr, "new direct addr for node");
    +750                        vacant.insert(PathState::with_ping(
    +751                            self.node_id,
    +752                            path.clone(),
    +753                            tx_id,
    +754                            Source::Udp,
    +755                            now,
    +756                        ));
    +757                        PingRole::NewPath
    +758                    }
    +759                }
    +760            }
    +761            SendAddr::Relay(ref url) => {
    +762                match self.relay_url.as_mut() {
    +763                    Some((home_url, _state)) if home_url != url => {
    +764                        // either the node changed relays or we didn't have a relay address for the
    +765                        // node. In both cases, trust the new confirmed url
    +766                        info!(%url, "new relay addr for node");
    +767                        self.relay_url = Some((
    +768                            url.clone(),
    +769                            PathState::with_ping(
    +770                                self.node_id,
    +771                                path.clone(),
    +772                                tx_id,
    +773                                Source::Relay,
    +774                                now,
    +775                            ),
    +776                        ));
    +777                        PingRole::NewPath
    +778                    }
    +779                    Some((_home_url, state)) => state.handle_ping(tx_id, now),
    +780                    None => {
    +781                        info!(%url, "new relay addr for node");
    +782                        self.relay_url = Some((
    +783                            url.clone(),
    +784                            PathState::with_ping(
    +785                                self.node_id,
    +786                                path.clone(),
    +787                                tx_id,
    +788                                Source::Relay,
    +789                                now,
    +790                            ),
    +791                        ));
    +792                        PingRole::NewPath
    +793                    }
    +794                }
    +795            }
    +796        };
    +797        event!(
    +798            target: "iroh::_events::ping::recv",
    +799            Level::DEBUG,
    +800            remote_node = %self.node_id.fmt_short(),
    +801            src = ?path,
    +802            txn = ?tx_id,
    +803            ?role,
    +804        );
    +805
    +806        if matches!(path, SendAddr::Udp(_)) && matches!(role, PingRole::NewPath) {
    +807            self.prune_direct_addresses(now);
    +808        }
    +809
    +810        // if the endpoint does not yet have a best_addr
    +811        let needs_ping_back = if matches!(path, SendAddr::Udp(_))
    +812            && matches!(
    +813                self.udp_paths.send_addr(true),
    +814                UdpSendAddr::None | UdpSendAddr::Unconfirmed(_) | UdpSendAddr::Outdated(_)
    +815            ) {
    +816            // We also need to send a ping to make this path available to us as well.  This
    +817            // is always sent together with a pong.  So in the worst case the pong gets lost
    +818            // and this ping does not.  In that case we ping-pong until both sides have
    +819            // received at least one pong.  Once both sides have received one pong they both
    +820            // have a best_addr and this ping will stop being sent.
    +821            self.start_ping(path, DiscoPingPurpose::PingBack)
    +822        } else {
    +823            None
    +824        };
    +825
    +826        debug!(
    +827            ?role,
    +828            needs_ping_back = ?needs_ping_back.is_some(),
    +829            paths = %summarize_node_paths(self.udp_paths.paths()),
    +830            "endpoint handled ping",
    +831        );
    +832        PingHandled {
    +833            role,
    +834            needs_ping_back,
    +835        }
    +836    }
    +837
    +838    /// Prune inactive paths.
    +839    ///
    +840    /// This trims the list of inactive paths for an endpoint.  At most
    +841    /// [`MAX_INACTIVE_DIRECT_ADDRESSES`] are kept.
    +842    pub(super) fn prune_direct_addresses(&mut self, now: Instant) {
    +843        // prune candidates are addresses that are not active
    +844        let mut prune_candidates: Vec<_> = self
    +845            .udp_paths
    +846            .paths()
    +847            .iter()
    +848            .filter(|(_ip_port, state)| !state.is_active())
    +849            .map(|(ip_port, state)| (*ip_port, state.last_alive()))
    +850            .filter(|(_ipp, last_alive)| match last_alive {
    +851                Some(last_seen) => last_seen.elapsed() > LAST_ALIVE_PRUNE_DURATION,
    +852                None => true,
    +853            })
    +854            .collect();
    +855        let prune_count = prune_candidates
    +856            .len()
    +857            .saturating_sub(MAX_INACTIVE_DIRECT_ADDRESSES);
    +858        if prune_count == 0 {
    +859            // nothing to do, within limits
    +860            debug!(
    +861                paths = %summarize_node_paths(self.udp_paths.paths()),
    +862                "prune addresses: {prune_count} pruned",
    +863            );
    +864            return;
    +865        }
    +866
    +867        // sort leaving the worst addresses first (never contacted) and better ones (most recently
    +868        // used ones) last
    +869        prune_candidates.sort_unstable_by_key(|(_ip_port, last_alive)| *last_alive);
    +870        prune_candidates.truncate(prune_count);
    +871        for (ip_port, _last_alive) in prune_candidates.into_iter() {
    +872            self.remove_direct_addr(&ip_port, now, "inactive");
    +873        }
    +874        debug!(
    +875            paths = %summarize_node_paths(self.udp_paths.paths()),
    +876            "prune addresses: {prune_count} pruned",
    +877        );
    +878    }
    +879
    +880    /// Called when connectivity changes enough that we should question our earlier
    +881    /// assumptions about which paths work.
    +882    #[instrument("disco", skip_all, fields(node = %self.node_id.fmt_short()))]
    +883    pub(super) fn note_connectivity_change(&mut self, now: Instant, metrics: &MagicsockMetrics) {
    +884        let mut guard = self.udp_paths.access_mut(now);
    +885        for es in guard.paths().values_mut() {
    +886            es.validity.record_metrics(metrics);
    +887            es.clear();
    +888        }
    +889    }
    +890
    +891    /// Handles a Pong message (a reply to an earlier ping).
    +892    ///
    +893    /// It reports the address and key that should be inserted for the endpoint if any.
    +894    #[instrument(skip(self, metrics))]
    +895    pub(super) fn handle_pong(
    +896        &mut self,
    +897        m: &disco::Pong,
    +898        src: SendAddr,
    +899        metrics: &MagicsockMetrics,
    +900    ) -> Option<(SocketAddr, PublicKey)> {
    +901        event!(
    +902            target: "iroh::_events::pong::recv",
    +903            Level::DEBUG,
    +904            remote_node = %self.node_id.fmt_short(),
    +905            ?src,
    +906            txn = ?m.tx_id,
    +907        );
    +908        let is_relay = src.is_relay();
    +909        match self.sent_pings.remove(&m.tx_id) {
    +910            None => {
    +911                // This is not a pong for a ping we sent.  In reality however we probably
    +912                // did send this ping but it has timed-out by the time we receive this pong
    +913                // so we removed the state already.
    +914                debug!(tx = %HEXLOWER.encode(&m.tx_id), "received unknown pong (did it timeout?)");
    +915                None
    +916            }
    +917            Some(sp) => {
    +918                let mut node_map_insert = None;
    +919
    +920                let now = Instant::now();
    +921                let latency = now - sp.at;
    +922
    +923                debug!(
    +924                    tx = %HEXLOWER.encode(&m.tx_id),
    +925                    src = %src,
    +926                    reported_ping_src = %m.ping_observed_addr,
    +927                    ping_dst = %sp.to,
    +928                    is_relay = %src.is_relay(),
    +929                    latency = %latency.as_millis(),
    +930                    "received pong",
    +931                );
    +932
    +933                match src {
    +934                    SendAddr::Udp(addr) => {
    +935                        match self.udp_paths.access_mut(now).paths().get_mut(&addr.into()) {
    +936                            None => {
    +937                                warn!("ignoring pong: no state for src addr");
    +938                                // This is no longer an endpoint we care about.
    +939                                return node_map_insert;
    +940                            }
    +941                            Some(st) => {
    +942                                node_map_insert = Some((addr, self.node_id));
    +943                                st.add_pong_reply(
    +944                                    PongReply {
    +945                                        latency,
    +946                                        pong_at: now,
    +947                                        from: src,
    +948                                        pong_src: m.ping_observed_addr.clone(),
    +949                                    },
    +950                                    metrics,
    +951                                );
    +952                            }
    +953                        }
    +954                        debug!(
    +955                            paths = %summarize_node_paths(self.udp_paths.paths()),
    +956                            "handled pong",
    +957                        );
    +958                    }
    +959                    SendAddr::Relay(ref url) => match self.relay_url.as_mut() {
    +960                        Some((home_url, state)) if home_url == url => {
    +961                            state.add_pong_reply(
    +962                                PongReply {
    +963                                    latency,
    +964                                    pong_at: now,
    +965                                    from: src,
    +966                                    pong_src: m.ping_observed_addr.clone(),
    +967                                },
    +968                                metrics,
    +969                            );
    +970                        }
    +971                        other => {
    +972                            // if we are here then we sent this ping, but the url changed
    +973                            // waiting for the response. It was either set to None or changed to
    +974                            // another relay. This should either never happen or be extremely
    +975                            // unlikely. Log and ignore for now
    +976                            warn!(
    +977                                stored=?other,
    +978                                received=?url,
    +979                                "ignoring pong via relay for different relay from last one",
    +980                            );
    +981                        }
    +982                    },
    +983                }
    +984
    +985                // Promote this pong response to our current best address if it's lower latency.
    +986                // TODO(bradfitz): decide how latency vs. preference order affects decision
    +987                if let SendAddr::Udp(_to) = sp.to {
    +988                    debug_assert!(!is_relay, "mismatching relay & udp");
    +989                }
    +990
    +991                node_map_insert
    +992            }
    +993        }
    +994    }
    +995
    +996    /// Handles a DISCO CallMeMaybe discovery message.
    +997    ///
    +998    /// The contract for use of this message is that the node has already pinged to us via
    +999    /// UDP, so their stateful firewall should be open. Now we can Ping back and make it
    +1000    /// through.
    +1001    ///
    +1002    /// However if the remote side has no direct path information to us, they would not have
    +1003    /// had any [`IpPort`]s to send pings to and our pings might end up blocked.  But at
    +1004    /// least open the firewalls on our side, giving the other side another change of making
    +1005    /// it through when it pings in response.
    +1006    pub(super) fn handle_call_me_maybe(
    +1007        &mut self,
    +1008        m: disco::CallMeMaybe,
    +1009        metrics: &MagicsockMetrics,
    +1010    ) -> Vec<PingAction> {
    +1011        let now = Instant::now();
    +1012        let mut call_me_maybe_ipps = BTreeSet::new();
    +1013
    +1014        let mut guard = self.udp_paths.access_mut(now);
    +1015
    +1016        for peer_sockaddr in &m.my_numbers {
    +1017            if let IpAddr::V6(ip) = peer_sockaddr.ip() {
    +1018                if netwatch::ip::is_unicast_link_local(ip) {
    +1019                    // We send these out, but ignore them for now.
    +1020                    // TODO: teach the ping code to ping on all interfaces for these.
    +1021                    continue;
    +1022                }
    +1023            }
    +1024            let ipp = IpPort::from(*peer_sockaddr);
    +1025            call_me_maybe_ipps.insert(ipp);
    +1026            guard
    +1027                .paths()
    +1028                .entry(ipp)
    +1029                .or_insert_with(|| {
    +1030                    PathState::new(
    +1031                        self.node_id,
    +1032                        SendAddr::from(*peer_sockaddr),
    +1033                        Source::Relay,
    +1034                        now,
    +1035                    )
    +1036                })
    +1037                .call_me_maybe_time
    +1038                .replace(now);
     1039        }
    -1040        debug!(
    -1041            paths = %summarize_node_paths(&self.udp_paths.paths),
    -1042            "updated endpoint paths from call-me-maybe",
    -1043        );
    -1044        self.send_pings(now)
    -1045    }
    -1046
    -1047    /// Marks this node as having received a UDP payload message.
    -1048    #[cfg(not(wasm_browser))]
    -1049    pub(super) fn receive_udp(&mut self, addr: IpPort, now: Instant) {
    -1050        let Some(state) = self.udp_paths.paths.get_mut(&addr) else {
    -1051            debug_assert!(false, "node map inconsistency by_ip_port <-> direct addr");
    -1052            return;
    -1053        };
    -1054        state.last_payload_msg = Some(now);
    -1055        self.last_used = Some(now);
    -1056        self.udp_paths
    -1057            .best_addr
    -1058            .reconfirm_if_used(addr.into(), BestAddrSource::Udp, now);
    -1059    }
    -1060
    -1061    pub(super) fn receive_relay(&mut self, url: &RelayUrl, src: NodeId, now: Instant) {
    -1062        match self.relay_url.as_mut() {
    -1063            Some((current_home, state)) if current_home == url => {
    -1064                // We received on the expected url. update state.
    -1065                state.last_payload_msg = Some(now);
    -1066            }
    -1067            Some((_current_home, _state)) => {
    -1068                // we have a different url. we only update on ping, not on receive_relay.
    -1069            }
    -1070            None => {
    -1071                self.relay_url = Some((
    -1072                    url.clone(),
    -1073                    PathState::with_last_payload(
    -1074                        src,
    -1075                        SendAddr::from(url.clone()),
    -1076                        Source::Relay,
    -1077                        now,
    -1078                    ),
    -1079                ));
    -1080            }
    -1081        }
    -1082        self.last_used = Some(now);
    -1083    }
    -1084
    -1085    pub(super) fn last_ping(&self, addr: &SendAddr) -> Option<Instant> {
    -1086        match addr {
    -1087            SendAddr::Udp(addr) => self
    -1088                .udp_paths
    -1089                .paths
    -1090                .get(&(*addr).into())
    -1091                .and_then(|ep| ep.last_ping),
    -1092            SendAddr::Relay(url) => self
    -1093                .relay_url
    -1094                .as_ref()
    -1095                .filter(|(home_url, _state)| home_url == url)
    -1096                .and_then(|(_home_url, state)| state.last_ping),
    -1097        }
    -1098    }
    -1099
    -1100    /// Checks if this `Endpoint` is currently actively being used.
    -1101    pub(super) fn is_active(&self, now: &Instant) -> bool {
    -1102        match self.last_used {
    -1103            Some(last_active) => now.duration_since(last_active) <= SESSION_ACTIVE_TIMEOUT,
    -1104            None => false,
    -1105        }
    -1106    }
    -1107
    -1108    /// Send a heartbeat to the node to keep the connection alive, or trigger a full ping
    -1109    /// if necessary.
    -1110    #[instrument("stayin_alive", skip_all, fields(node = %self.node_id.fmt_short()))]
    -1111    pub(super) fn stayin_alive(&mut self) -> Vec<PingAction> {
    -1112        trace!("stayin_alive");
    -1113        let now = Instant::now();
    -1114        if !self.is_active(&now) {
    -1115            trace!("skipping stayin alive: session is inactive");
    -1116            return Vec::new();
    -1117        }
    -1118
    -1119        // If we do not have an optimal addr, send pings to all known places.
    -1120        if self.want_call_me_maybe(&now) {
    -1121            debug!("sending a call-me-maybe");
    -1122            return self.send_call_me_maybe(now, SendCallMeMaybe::Always);
    +1040
    +1041        // Zero out all the last_ping times to force send_pings to send new ones, even if
    +1042        // it's been less than 5 seconds ago.  Also clear pongs for direct addresses not
    +1043        // included in the updated set.
    +1044        for (ipp, st) in guard.paths().iter_mut() {
    +1045            st.last_ping = None;
    +1046            if !call_me_maybe_ipps.contains(ipp) {
    +1047                // TODO: This seems like a weird way to signal that the endpoint no longer
    +1048                // thinks it has this IpPort as an available path.
    +1049                if !st.validity.is_empty() {
    +1050                    debug!(path=?ipp ,"clearing recent pong");
    +1051                    st.validity.record_metrics(metrics);
    +1052                    st.validity = PathValidity::empty();
    +1053                }
    +1054            }
    +1055        }
    +1056        if guard.has_best_addr_changed() {
    +1057            // Clear the last call-me-maybe send time so we will send one again.
    +1058            self.last_call_me_maybe = None;
    +1059        }
    +1060        debug!(
    +1061            paths = %summarize_node_paths(self.udp_paths.paths()),
    +1062            "updated endpoint paths from call-me-maybe",
    +1063        );
    +1064        self.send_pings(now)
    +1065    }
    +1066
    +1067    /// Marks this node as having received a UDP payload message.
    +1068    #[cfg(not(wasm_browser))]
    +1069    pub(super) fn receive_udp(&mut self, addr: IpPort, now: Instant) {
    +1070        let mut guard = self.udp_paths.access_mut(now);
    +1071        let Some(state) = guard.paths().get_mut(&addr) else {
    +1072            debug_assert!(false, "node map inconsistency by_ip_port <-> direct addr");
    +1073            return;
    +1074        };
    +1075        state.receive_payload(now);
    +1076        self.last_used = Some(now);
    +1077    }
    +1078
    +1079    pub(super) fn receive_relay(&mut self, url: &RelayUrl, src: NodeId, now: Instant) {
    +1080        match self.relay_url.as_mut() {
    +1081            Some((current_home, state)) if current_home == url => {
    +1082                // We received on the expected url. update state.
    +1083                state.receive_payload(now);
    +1084            }
    +1085            Some((_current_home, _state)) => {
    +1086                // we have a different url. we only update on ping, not on receive_relay.
    +1087            }
    +1088            None => {
    +1089                self.relay_url = Some((
    +1090                    url.clone(),
    +1091                    PathState::with_last_payload(
    +1092                        src,
    +1093                        SendAddr::from(url.clone()),
    +1094                        Source::Relay,
    +1095                        now,
    +1096                    ),
    +1097                ));
    +1098            }
    +1099        }
    +1100        self.last_used = Some(now);
    +1101    }
    +1102
    +1103    pub(super) fn last_ping(&self, addr: &SendAddr) -> Option<Instant> {
    +1104        match addr {
    +1105            SendAddr::Udp(addr) => self
    +1106                .udp_paths
    +1107                .paths()
    +1108                .get(&(*addr).into())
    +1109                .and_then(|ep| ep.last_ping),
    +1110            SendAddr::Relay(url) => self
    +1111                .relay_url
    +1112                .as_ref()
    +1113                .filter(|(home_url, _state)| home_url == url)
    +1114                .and_then(|(_home_url, state)| state.last_ping),
    +1115        }
    +1116    }
    +1117
    +1118    /// Checks if this `Endpoint` is currently actively being used.
    +1119    pub(super) fn is_active(&self, now: &Instant) -> bool {
    +1120        match self.last_used {
    +1121            Some(last_active) => now.duration_since(last_active) <= SESSION_ACTIVE_TIMEOUT,
    +1122            None => false,
     1123        }
    -1124
    -1125        // Send heartbeat ping to keep the current addr going as long as we need it.
    -1126        if let Some(udp_addr) = self.udp_paths.best_addr.addr() {
    -1127            let elapsed = self.last_ping(&SendAddr::Udp(udp_addr)).map(|l| now - l);
    -1128            // Send a ping if the last ping is older than 2 seconds.
    -1129            let needs_ping = match elapsed {
    -1130                Some(e) => e >= STAYIN_ALIVE_MIN_ELAPSED,
    -1131                None => false,
    -1132            };
    -1133
    -1134            if needs_ping {
    -1135                debug!(
    -1136                    dst = %udp_addr,
    -1137                    since_last_ping=?elapsed,
    -1138                    "send stayin alive ping",
    -1139                );
    -1140                if let Some(msg) =
    -1141                    self.start_ping(SendAddr::Udp(udp_addr), DiscoPingPurpose::StayinAlive)
    -1142                {
    -1143                    return vec![PingAction::SendPing(msg)];
    -1144                }
    -1145            }
    -1146        }
    -1147
    -1148        Vec::new()
    -1149    }
    -1150
    -1151    /// Returns the addresses on which a payload should be sent right now.
    -1152    ///
    -1153    /// This is in the hot path of `.poll_send()`.
    -1154    #[instrument("get_send_addrs", skip_all, fields(node = %self.node_id.fmt_short()))]
    -1155    pub(crate) fn get_send_addrs(
    -1156        &mut self,
    -1157        have_ipv6: bool,
    -1158        metrics: &MagicsockMetrics,
    -1159    ) -> (Option<SocketAddr>, Option<RelayUrl>, Vec<PingAction>) {
    -1160        let now = Instant::now();
    -1161        let prev = self.last_used.replace(now);
    -1162        if prev.is_none() {
    -1163            // this is the first time we are trying to connect to this node
    -1164            metrics.nodes_contacted.inc();
    -1165        }
    -1166        let (udp_addr, relay_url) = self.addr_for_send(&now, have_ipv6, metrics);
    -1167
    -1168        let ping_msgs = if self.want_call_me_maybe(&now) {
    -1169            self.send_call_me_maybe(now, SendCallMeMaybe::IfNoRecent)
    -1170        } else {
    -1171            Vec::new()
    -1172        };
    -1173        trace!(
    -1174            ?udp_addr,
    -1175            ?relay_url,
    -1176            pings = %ping_msgs.len(),
    -1177            "found send address",
    -1178        );
    -1179        (udp_addr, relay_url, ping_msgs)
    -1180    }
    -1181
    -1182    /// Get the direct addresses for this endpoint.
    -1183    pub(super) fn direct_addresses(&self) -> impl Iterator<Item = IpPort> + '_ {
    -1184        self.udp_paths.paths.keys().copied()
    -1185    }
    -1186
    -1187    #[cfg(test)]
    -1188    pub(super) fn direct_address_states(&self) -> impl Iterator<Item = (&IpPort, &PathState)> + '_ {
    -1189        self.udp_paths.paths.iter()
    -1190    }
    -1191
    -1192    pub(super) fn last_used(&self) -> Option<Instant> {
    -1193        self.last_used
    -1194    }
    -1195}
    -1196
    -1197impl From<RemoteInfo> for NodeAddr {
    -1198    fn from(info: RemoteInfo) -> Self {
    -1199        let direct_addresses = info
    -1200            .addrs
    -1201            .into_iter()
    -1202            .map(|info| info.addr)
    -1203            .collect::<BTreeSet<_>>();
    -1204
    -1205        NodeAddr {
    -1206            node_id: info.node_id,
    -1207            relay_url: info.relay_url.map(Into::into),
    -1208            direct_addresses,
    -1209        }
    +1124    }
    +1125
    +1126    /// Send a heartbeat to the node to keep the connection alive, or trigger a full ping
    +1127    /// if necessary.
    +1128    #[instrument("stayin_alive", skip_all, fields(node = %self.node_id.fmt_short()))]
    +1129    pub(super) fn stayin_alive(&mut self, have_ipv6: bool) -> Vec<PingAction> {
    +1130        trace!("stayin_alive");
    +1131        let now = Instant::now();
    +1132        if !self.is_active(&now) {
    +1133            trace!("skipping stayin alive: session is inactive");
    +1134            return Vec::new();
    +1135        }
    +1136
    +1137        // If we do not have an optimal addr, send pings to all known places.
    +1138        if self.want_call_me_maybe(&now, have_ipv6) {
    +1139            debug!("sending a call-me-maybe");
    +1140            return self.send_call_me_maybe(now, SendCallMeMaybe::Always);
    +1141        }
    +1142
    +1143        // Send heartbeat ping to keep the current addr going as long as we need it.
    +1144        if let Some(udp_addr) = self.udp_paths.send_addr(have_ipv6).get_addr() {
    +1145            let elapsed = self.last_ping(&SendAddr::Udp(udp_addr)).map(|l| now - l);
    +1146            // Send a ping if the last ping is older than 2 seconds.
    +1147            let needs_ping = match elapsed {
    +1148                Some(e) => e >= STAYIN_ALIVE_MIN_ELAPSED,
    +1149                None => false,
    +1150            };
    +1151
    +1152            if needs_ping {
    +1153                debug!(
    +1154                    dst = %udp_addr,
    +1155                    since_last_ping=?elapsed,
    +1156                    "send stayin alive ping",
    +1157                );
    +1158                if let Some(msg) =
    +1159                    self.start_ping(SendAddr::Udp(udp_addr), DiscoPingPurpose::StayinAlive)
    +1160                {
    +1161                    return vec![PingAction::SendPing(msg)];
    +1162                }
    +1163            }
    +1164        }
    +1165
    +1166        Vec::new()
    +1167    }
    +1168
    +1169    /// Returns the addresses on which a payload should be sent right now.
    +1170    ///
    +1171    /// This is in the hot path of `.poll_send()`.
    +1172    // TODO(matheus23): Make this take &self. That's not quite possible yet due to `send_call_me_maybe`
    +1173    // eventually calling `prune_direct_addresses` (which needs &mut self)
    +1174    #[instrument("get_send_addrs", skip_all, fields(node = %self.node_id.fmt_short()))]
    +1175    pub(crate) fn get_send_addrs(
    +1176        &mut self,
    +1177        have_ipv6: bool,
    +1178        metrics: &MagicsockMetrics,
    +1179    ) -> (Option<SocketAddr>, Option<RelayUrl>, Vec<PingAction>) {
    +1180        let now = Instant::now();
    +1181        let prev = self.last_used.replace(now);
    +1182        if prev.is_none() {
    +1183            // this is the first time we are trying to connect to this node
    +1184            metrics.nodes_contacted.inc();
    +1185        }
    +1186        let (udp_addr, relay_url) = self.addr_for_send(have_ipv6, metrics);
    +1187
    +1188        let ping_msgs = if self.want_call_me_maybe(&now, have_ipv6) {
    +1189            self.send_call_me_maybe(now, SendCallMeMaybe::IfNoRecent)
    +1190        } else {
    +1191            Vec::new()
    +1192        };
    +1193        trace!(
    +1194            ?udp_addr,
    +1195            ?relay_url,
    +1196            pings = %ping_msgs.len(),
    +1197            "found send address",
    +1198        );
    +1199        (udp_addr, relay_url, ping_msgs)
    +1200    }
    +1201
    +1202    /// Get the direct addresses for this endpoint.
    +1203    pub(super) fn direct_addresses(&self) -> impl Iterator<Item = IpPort> + '_ {
    +1204        self.udp_paths.paths().keys().copied()
    +1205    }
    +1206
    +1207    #[cfg(test)]
    +1208    pub(super) fn direct_address_states(&self) -> impl Iterator<Item = (&IpPort, &PathState)> + '_ {
    +1209        self.udp_paths.paths().iter()
     1210    }
    -1211}
    -1212
    -1213/// Whether to send a call-me-maybe message after sending pings to all known paths.
    -1214///
    -1215/// `IfNoRecent` will only send a call-me-maybe if no previous one was sent in the last
    -1216/// [`HEARTBEAT_INTERVAL`].
    -1217#[derive(Debug)]
    -1218enum SendCallMeMaybe {
    -1219    Always,
    -1220    IfNoRecent,
    -1221}
    -1222
    -1223#[derive(Debug, Clone, PartialEq, Eq, Hash)]
    -1224pub(super) struct PongReply {
    -1225    pub(super) latency: Duration,
    -1226    /// When we received the pong.
    -1227    pub(super) pong_at: Instant,
    -1228    /// The pong's src (usually same as endpoint map key).
    -1229    pub(super) from: SendAddr,
    -1230    /// What they reported they heard.
    -1231    pub(super) pong_src: SendAddr,
    -1232}
    -1233
    -1234#[derive(Debug)]
    -1235pub(super) struct SentPing {
    -1236    pub(super) to: SendAddr,
    -1237    pub(super) at: Instant,
    -1238    #[allow(dead_code)]
    -1239    pub(super) purpose: DiscoPingPurpose,
    -1240    pub(super) _expiry_task: AbortOnDropHandle<()>,
    +1211
    +1212    pub(super) fn last_used(&self) -> Option<Instant> {
    +1213        self.last_used
    +1214    }
    +1215}
    +1216
    +1217impl From<RemoteInfo> for NodeAddr {
    +1218    fn from(info: RemoteInfo) -> Self {
    +1219        let direct_addresses = info
    +1220            .addrs
    +1221            .into_iter()
    +1222            .map(|info| info.addr)
    +1223            .collect::<BTreeSet<_>>();
    +1224
    +1225        NodeAddr {
    +1226            node_id: info.node_id,
    +1227            relay_url: info.relay_url.map(Into::into),
    +1228            direct_addresses,
    +1229        }
    +1230    }
    +1231}
    +1232
    +1233/// Whether to send a call-me-maybe message after sending pings to all known paths.
    +1234///
    +1235/// `IfNoRecent` will only send a call-me-maybe if no previous one was sent in the last
    +1236/// [`HEARTBEAT_INTERVAL`].
    +1237#[derive(Debug)]
    +1238enum SendCallMeMaybe {
    +1239    Always,
    +1240    IfNoRecent,
     1241}
     1242
    -1243/// The reason why a discovery ping message was sent.
    -1244#[derive(Debug, Clone, Copy, PartialEq, Eq)]
    -1245pub enum DiscoPingPurpose {
    -1246    /// The purpose of a ping was to see if a path was valid.
    -1247    Discovery,
    -1248    /// Ping to ensure the current route is still valid.
    -1249    StayinAlive,
    -1250    /// When a ping was received and no direct connection exists yet.
    -1251    ///
    -1252    /// When a ping was received we suspect a direct connection is possible.  If we do not
    -1253    /// yet have one that triggers a ping, indicated with this reason.
    -1254    PingBack,
    -1255}
    -1256
    -1257/// The type of control message we have received.
    -1258#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize, derive_more::Display)]
    -1259pub enum ControlMsg {
    -1260    /// We received a Ping from the node.
    -1261    #[display("ping←")]
    -1262    Ping,
    -1263    /// We received a Pong from the node.
    -1264    #[display("pong←")]
    -1265    Pong,
    -1266    /// We received a CallMeMaybe.
    -1267    #[display("call me")]
    -1268    CallMeMaybe,
    -1269}
    -1270
    -1271/// Information about a *direct address*.
    -1272///
    -1273/// The *direct addresses* of an iroh node are those that could be used by other nodes to
    -1274/// establish direct connectivity, depending on the network situation. Due to NAT configurations,
    -1275/// for example, not all direct addresses of a node are usable by all peers.
    -1276#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    -1277pub struct DirectAddrInfo {
    -1278    /// The UDP address reported by the remote node.
    -1279    pub addr: SocketAddr,
    -1280    /// The latency to the remote node over this network path.
    -1281    ///
    -1282    /// If there has never been any connectivity via this address no latency will be known.
    -1283    pub latency: Option<Duration>,
    -1284    /// Last control message received by this node about this address.
    -1285    ///
    -1286    /// This contains the elapsed duration since the control message was received and the
    -1287    /// kind of control message received at that time.  Only the most recent control message
    -1288    /// is returned.
    -1289    ///
    -1290    /// Note that [`ControlMsg::CallMeMaybe`] is received via a relay path, while
    -1291    /// [`ControlMsg::Ping`] and [`ControlMsg::Pong`] are received on the path to
    -1292    /// [`DirectAddrInfo::addr`] itself and thus convey very different information.
    -1293    pub last_control: Option<(Duration, ControlMsg)>,
    -1294    /// Elapsed time since the last payload message was received on this network path.
    -1295    ///
    -1296    /// This indicates how long ago a QUIC datagram was received from the remote node sent
    -1297    /// from this [`DirectAddrInfo::addr`].  It indicates the network path was in use to
    -1298    /// transport payload data.
    -1299    pub last_payload: Option<Duration>,
    -1300    /// Elapsed time since this network path was known to exist.
    +1243#[derive(Debug, Clone, PartialEq, Eq, Hash)]
    +1244pub(super) struct PongReply {
    +1245    pub(super) latency: Duration,
    +1246    /// When we received the pong.
    +1247    pub(super) pong_at: Instant,
    +1248    /// The pong's src (usually same as endpoint map key).
    +1249    pub(super) from: SendAddr,
    +1250    /// What they reported they heard.
    +1251    pub(super) pong_src: SendAddr,
    +1252}
    +1253
    +1254#[derive(Debug)]
    +1255pub(super) struct SentPing {
    +1256    pub(super) to: SendAddr,
    +1257    pub(super) at: Instant,
    +1258    #[allow(dead_code)]
    +1259    pub(super) purpose: DiscoPingPurpose,
    +1260    pub(super) _expiry_task: AbortOnDropHandle<()>,
    +1261}
    +1262
    +1263/// The reason why a discovery ping message was sent.
    +1264#[derive(Debug, Clone, Copy, PartialEq, Eq)]
    +1265pub enum DiscoPingPurpose {
    +1266    /// The purpose of a ping was to see if a path was valid.
    +1267    Discovery,
    +1268    /// Ping to ensure the current route is still valid.
    +1269    StayinAlive,
    +1270    /// When a ping was received and no direct connection exists yet.
    +1271    ///
    +1272    /// When a ping was received we suspect a direct connection is possible.  If we do not
    +1273    /// yet have one that triggers a ping, indicated with this reason.
    +1274    PingBack,
    +1275}
    +1276
    +1277/// The type of control message we have received.
    +1278#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize, derive_more::Display)]
    +1279pub enum ControlMsg {
    +1280    /// We received a Ping from the node.
    +1281    #[display("ping←")]
    +1282    Ping,
    +1283    /// We received a Pong from the node.
    +1284    #[display("pong←")]
    +1285    Pong,
    +1286    /// We received a CallMeMaybe.
    +1287    #[display("call me")]
    +1288    CallMeMaybe,
    +1289}
    +1290
    +1291/// Information about a *direct address*.
    +1292///
    +1293/// The *direct addresses* of an iroh node are those that could be used by other nodes to
    +1294/// establish direct connectivity, depending on the network situation. Due to NAT configurations,
    +1295/// for example, not all direct addresses of a node are usable by all peers.
    +1296#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    +1297pub struct DirectAddrInfo {
    +1298    /// The UDP address reported by the remote node.
    +1299    pub addr: SocketAddr,
    +1300    /// The latency to the remote node over this network path.
     1301    ///
    -1302    /// A network path is considered to exist only because the remote node advertised it.
    -1303    /// It may not mean the path is usable.  However, if there was any communication with
    -1304    /// the remote node over this network path it also means the path exists.
    +1302    /// If there has never been any connectivity via this address no latency will be known.
    +1303    pub latency: Option<Duration>,
    +1304    /// Last control message received by this node about this address.
     1305    ///
    -1306    /// The elapsed time since *any* confirmation of the path's existence was received is
    -1307    /// returned.  If the remote node moved networks and no longer has this path, this could
    -1308    /// be a long duration.  If the path was added via [`Endpoint::add_node_addr`] or some
    -1309    /// node discovery the path may never have been known to exist.
    -1310    ///
    -1311    /// [`Endpoint::add_node_addr`]: crate::endpoint::Endpoint::add_node_addr
    -1312    pub last_alive: Option<Duration>,
    -1313    /// A [`HashMap`] of [`Source`]s to [`Duration`]s.
    -1314    ///
    -1315    /// The [`Duration`] indicates the elapsed time since this source last
    -1316    /// recorded this address.
    -1317    ///
    -1318    /// The [`Duration`] will always indicate the most recent time the source
    -1319    /// recorded this address.
    -1320    pub sources: HashMap<Source, Duration>,
    -1321}
    -1322
    -1323/// Information about the network path to a remote node via a relay server.
    -1324#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    -1325pub struct RelayUrlInfo {
    -1326    /// The relay URL.
    -1327    pub relay_url: RelayUrl,
    -1328    /// Elapsed time since this relay path last received payload or control data.
    +1306    /// This contains the elapsed duration since the control message was received and the
    +1307    /// kind of control message received at that time.  Only the most recent control message
    +1308    /// is returned.
    +1309    ///
    +1310    /// Note that [`ControlMsg::CallMeMaybe`] is received via a relay path, while
    +1311    /// [`ControlMsg::Ping`] and [`ControlMsg::Pong`] are received on the path to
    +1312    /// [`DirectAddrInfo::addr`] itself and thus convey very different information.
    +1313    pub last_control: Option<(Duration, ControlMsg)>,
    +1314    /// Elapsed time since the last payload message was received on this network path.
    +1315    ///
    +1316    /// This indicates how long ago a QUIC datagram was received from the remote node sent
    +1317    /// from this [`DirectAddrInfo::addr`].  It indicates the network path was in use to
    +1318    /// transport payload data.
    +1319    pub last_payload: Option<Duration>,
    +1320    /// Elapsed time since this network path was known to exist.
    +1321    ///
    +1322    /// A network path is considered to exist only because the remote node advertised it.
    +1323    /// It may not mean the path is usable.  However, if there was any communication with
    +1324    /// the remote node over this network path it also means the path exists.
    +1325    ///
    +1326    /// The elapsed time since *any* confirmation of the path's existence was received is
    +1327    /// returned.  If the remote node moved networks and no longer has this path, this could
    +1328    /// be a long duration.
     1329    pub last_alive: Option<Duration>,
    -1330    /// Latency to the remote node over this relayed network path.
    -1331    pub latency: Option<Duration>,
    -1332}
    -1333
    -1334impl From<(RelayUrl, PathState)> for RelayUrlInfo {
    -1335    fn from(value: (RelayUrl, PathState)) -> Self {
    -1336        RelayUrlInfo {
    -1337            relay_url: value.0,
    -1338            last_alive: value.1.last_alive().map(|i| i.elapsed()),
    -1339            latency: value.1.latency(),
    -1340        }
    -1341    }
    -1342}
    -1343
    -1344impl From<RelayUrlInfo> for RelayUrl {
    -1345    fn from(value: RelayUrlInfo) -> Self {
    -1346        value.relay_url
    -1347    }
    -1348}
    -1349
    -1350/// Details about a remote iroh node which is known to this node.
    -1351///
    -1352/// Having details of a node does not mean it can be connected to, nor that it has ever been
    -1353/// connected to in the past. There are various reasons a node might be known: it could have
    -1354/// been manually added via [`Endpoint::add_node_addr`], it could have been added by some
    -1355/// discovery mechanism, the node could have contacted this node, etc.
    -1356///
    -1357/// [`Endpoint::add_node_addr`]: crate::endpoint::Endpoint::add_node_addr
    -1358#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    -1359pub struct RemoteInfo {
    -1360    /// The globally unique identifier for this node.
    -1361    pub node_id: NodeId,
    -1362    /// Relay server information, if available.
    -1363    pub relay_url: Option<RelayUrlInfo>,
    -1364    /// The addresses at which this node might be reachable.
    -1365    ///
    -1366    /// Some of these addresses might only be valid for networks we are not part of, but the remote
    -1367    /// node might be a part of.
    -1368    pub addrs: Vec<DirectAddrInfo>,
    -1369    /// The type of connection we have to the node, either direct or over relay.
    -1370    pub conn_type: ConnectionType,
    -1371    /// The latency of the current network path to the remote node.
    -1372    pub latency: Option<Duration>,
    -1373    /// Time elapsed time since last we have sent to or received from the node.
    -1374    ///
    -1375    /// This is the duration since *any* data (payload or control messages) was sent or receive
    -1376    /// from the remote node. Note that sending to the remote node does not imply
    -1377    /// the remote node received anything.
    -1378    pub last_used: Option<Duration>,
    -1379}
    -1380
    -1381impl RemoteInfo {
    -1382    /// Get the duration since the last activity we received from this endpoint
    -1383    /// on any of its direct addresses.
    -1384    pub fn last_received(&self) -> Option<Duration> {
    -1385        self.addrs
    -1386            .iter()
    -1387            .filter_map(|addr| addr.last_control.map(|x| x.0).min(addr.last_payload))
    -1388            .min()
    -1389    }
    -1390
    -1391    /// Whether there is a possible known network path to the remote node.
    -1392    ///
    -1393    /// Note that this does not provide any guarantees of whether any network path is
    -1394    /// usable.
    -1395    pub fn has_send_address(&self) -> bool {
    -1396        self.relay_url.is_some() || !self.addrs.is_empty()
    -1397    }
    -1398
    -1399    /// Returns a deduplicated list of [`Source`]s merged from all address in the [`RemoteInfo`].
    -1400    ///
    -1401    /// Deduplication is on the (`Source`, `Duration`) tuple, so you will get multiple [`Source`]s
    -1402    /// for each `Source` variant, if different addresses were discovered from the same [`Source`]
    -1403    /// at different times.
    -1404    ///
    -1405    /// The list is sorted from least to most recent [`Source`].
    -1406    pub fn sources(&self) -> Vec<(Source, Duration)> {
    -1407        let mut sources = vec![];
    -1408        for addr in &self.addrs {
    -1409            for source in &addr.sources {
    -1410                let source = (source.0.clone(), *source.1);
    -1411                if !sources.contains(&source) {
    -1412                    sources.push(source)
    -1413                }
    -1414            }
    -1415        }
    -1416        sources.sort_by(|a, b| b.1.cmp(&a.1));
    -1417        sources
    -1418    }
    -1419}
    -1420
    -1421/// The type of connection we have to the endpoint.
    -1422#[derive(derive_more::Display, Default, Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    -1423pub enum ConnectionType {
    -1424    /// Direct UDP connection
    -1425    #[display("direct({_0})")]
    -1426    Direct(SocketAddr),
    -1427    /// Relay connection over relay
    -1428    #[display("relay({_0})")]
    -1429    Relay(RelayUrl),
    -1430    /// Both a UDP and a relay connection are used.
    -1431    ///
    -1432    /// This is the case if we do have a UDP address, but are missing a recent confirmation that
    -1433    /// the address works.
    -1434    #[display("mixed(udp: {_0}, relay: {_1})")]
    -1435    Mixed(SocketAddr, RelayUrl),
    -1436    /// We have no verified connection to this PublicKey
    -1437    #[default]
    -1438    #[display("none")]
    -1439    None,
    -1440}
    +1330    /// A [`HashMap`] of [`Source`]s to [`Duration`]s.
    +1331    ///
    +1332    /// The [`Duration`] indicates the elapsed time since this source last
    +1333    /// recorded this address.
    +1334    ///
    +1335    /// The [`Duration`] will always indicate the most recent time the source
    +1336    /// recorded this address.
    +1337    pub sources: HashMap<Source, Duration>,
    +1338}
    +1339
    +1340/// Information about the network path to a remote node via a relay server.
    +1341#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    +1342pub struct RelayUrlInfo {
    +1343    /// The relay URL.
    +1344    pub relay_url: RelayUrl,
    +1345    /// Elapsed time since this relay path last received payload or control data.
    +1346    pub last_alive: Option<Duration>,
    +1347    /// Latency to the remote node over this relayed network path.
    +1348    pub latency: Option<Duration>,
    +1349}
    +1350
    +1351impl From<(RelayUrl, PathState)> for RelayUrlInfo {
    +1352    fn from(value: (RelayUrl, PathState)) -> Self {
    +1353        RelayUrlInfo {
    +1354            relay_url: value.0,
    +1355            last_alive: value.1.last_alive().map(|i| i.elapsed()),
    +1356            latency: value.1.latency(),
    +1357        }
    +1358    }
    +1359}
    +1360
    +1361impl From<RelayUrlInfo> for RelayUrl {
    +1362    fn from(value: RelayUrlInfo) -> Self {
    +1363        value.relay_url
    +1364    }
    +1365}
    +1366
    +1367/// Details about a remote iroh node which is known to this node.
    +1368///
    +1369/// Having details of a node does not mean it can be connected to, nor that it has ever been
    +1370/// connected to in the past. There are various reasons a node might be known: it could have
    +1371/// been manually added via [`Endpoint::add_node_addr`], it could have been added by some
    +1372/// discovery mechanism, the node could have contacted this node, etc.
    +1373///
    +1374/// [`Endpoint::add_node_addr`]: crate::endpoint::Endpoint::add_node_addr
    +1375#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    +1376pub(crate) struct RemoteInfo {
    +1377    /// The globally unique identifier for this node.
    +1378    pub node_id: NodeId,
    +1379    /// Relay server information, if available.
    +1380    pub relay_url: Option<RelayUrlInfo>,
    +1381    /// The addresses at which this node might be reachable.
    +1382    ///
    +1383    /// Some of these addresses might only be valid for networks we are not part of, but the remote
    +1384    /// node might be a part of.
    +1385    pub addrs: Vec<DirectAddrInfo>,
    +1386    /// The type of connection we have to the node, either direct or over relay.
    +1387    pub conn_type: ConnectionType,
    +1388    /// The latency of the current network path to the remote node.
    +1389    pub latency: Option<Duration>,
    +1390    /// Time elapsed time since last we have sent to or received from the node.
    +1391    ///
    +1392    /// This is the duration since *any* data (payload or control messages) was sent or receive
    +1393    /// from the remote node. Note that sending to the remote node does not imply
    +1394    /// the remote node received anything.
    +1395    pub last_used: Option<Duration>,
    +1396}
    +1397
    +1398impl RemoteInfo {
    +1399    /// Get the duration since the last activity we received from this endpoint
    +1400    /// on any of its direct addresses.
    +1401    pub(crate) fn last_received(&self) -> Option<Duration> {
    +1402        self.addrs
    +1403            .iter()
    +1404            .filter_map(|addr| addr.last_control.map(|x| x.0).min(addr.last_payload))
    +1405            .min()
    +1406    }
    +1407
    +1408    /// Whether there is a possible known network path to the remote node.
    +1409    ///
    +1410    /// Note that this does not provide any guarantees of whether any network path is
    +1411    /// usable.
    +1412    pub(crate) fn has_send_address(&self) -> bool {
    +1413        self.relay_url.is_some() || !self.addrs.is_empty()
    +1414    }
    +1415}
    +1416
    +1417/// The type of connection we have to the endpoint.
    +1418#[derive(derive_more::Display, Default, Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
    +1419pub enum ConnectionType {
    +1420    /// Direct UDP connection
    +1421    #[display("direct({_0})")]
    +1422    Direct(SocketAddr),
    +1423    /// Relay connection over relay
    +1424    #[display("relay({_0})")]
    +1425    Relay(RelayUrl),
    +1426    /// Both a UDP and a relay connection are used.
    +1427    ///
    +1428    /// This is the case if we do have a UDP address, but are missing a recent confirmation that
    +1429    /// the address works.
    +1430    #[display("mixed(udp: {_0}, relay: {_1})")]
    +1431    Mixed(SocketAddr, RelayUrl),
    +1432    /// We have no verified connection to this PublicKey
    +1433    #[default]
    +1434    #[display("none")]
    +1435    None,
    +1436}
    +1437
    +1438#[cfg(test)]
    +1439mod tests {
    +1440    use std::{collections::BTreeMap, net::Ipv4Addr};
     1441
    -1442#[cfg(test)]
    -1443mod tests {
    -1444    use std::{collections::BTreeMap, net::Ipv4Addr};
    -1445
    -1446    use best_addr::BestAddr;
    -1447    use iroh_base::SecretKey;
    -1448
    -1449    use super::*;
    -1450    use crate::magicsock::node_map::{NodeMap, NodeMapInner};
    -1451
    -1452    #[test]
    -1453    fn test_remote_infos() {
    -1454        let now = Instant::now();
    -1455        let elapsed = Duration::from_secs(3);
    -1456        let later = now + elapsed;
    -1457        let send_addr: RelayUrl = "https://my-relay.com".parse().unwrap();
    -1458        let pong_src = SendAddr::Udp("0.0.0.0:1".parse().unwrap());
    -1459        let latency = Duration::from_millis(50);
    -1460
    -1461        let relay_and_state = |node_id: NodeId, url: RelayUrl| {
    -1462            let relay_state = PathState::with_pong_reply(
    -1463                node_id,
    -1464                PongReply {
    -1465                    latency,
    -1466                    pong_at: now,
    -1467                    from: SendAddr::Relay(send_addr.clone()),
    -1468                    pong_src: pong_src.clone(),
    -1469                },
    -1470            );
    -1471            Some((url, relay_state))
    -1472        };
    -1473
    -1474        // endpoint with a `best_addr` that has a latency but no relay
    -1475        let (a_endpoint, a_socket_addr) = {
    -1476            let key = SecretKey::generate(rand::thread_rng());
    -1477            let node_id = key.public();
    -1478            let ip_port = IpPort {
    -1479                ip: Ipv4Addr::UNSPECIFIED.into(),
    -1480                port: 10,
    -1481            };
    -1482            let endpoint_state = BTreeMap::from([(
    -1483                ip_port,
    -1484                PathState::with_pong_reply(
    -1485                    node_id,
    -1486                    PongReply {
    -1487                        latency,
    -1488                        pong_at: now,
    -1489                        from: SendAddr::Udp(ip_port.into()),
    -1490                        pong_src: pong_src.clone(),
    -1491                    },
    -1492                ),
    -1493            )]);
    -1494            (
    -1495                NodeState {
    -1496                    id: 0,
    -1497                    quic_mapped_addr: NodeIdMappedAddr::generate(),
    -1498                    node_id: key.public(),
    -1499                    last_full_ping: None,
    -1500                    relay_url: None,
    -1501                    udp_paths: NodeUdpPaths::from_parts(
    -1502                        endpoint_state,
    -1503                        BestAddr::from_parts(
    -1504                            ip_port.into(),
    -1505                            latency,
    -1506                            now,
    -1507                            now + Duration::from_secs(100),
    -1508                        ),
    -1509                    ),
    -1510                    sent_pings: HashMap::new(),
    -1511                    last_used: Some(now),
    -1512                    last_call_me_maybe: None,
    -1513                    conn_type: Watchable::new(ConnectionType::Direct(ip_port.into())),
    -1514                    has_been_direct: true,
    -1515                    #[cfg(any(test, feature = "test-utils"))]
    -1516                    path_selection: PathSelection::default(),
    -1517                },
    -1518                ip_port.into(),
    -1519            )
    -1520        };
    -1521        // endpoint w/ no best addr but a relay w/ latency
    -1522        let b_endpoint = {
    -1523            // let socket_addr = "0.0.0.0:9".parse().unwrap();
    -1524            let key = SecretKey::generate(rand::thread_rng());
    -1525            NodeState {
    -1526                id: 1,
    -1527                quic_mapped_addr: NodeIdMappedAddr::generate(),
    -1528                node_id: key.public(),
    -1529                last_full_ping: None,
    -1530                relay_url: relay_and_state(key.public(), send_addr.clone()),
    -1531                udp_paths: NodeUdpPaths::new(),
    -1532                sent_pings: HashMap::new(),
    -1533                last_used: Some(now),
    -1534                last_call_me_maybe: None,
    -1535                conn_type: Watchable::new(ConnectionType::Relay(send_addr.clone())),
    -1536                has_been_direct: false,
    -1537                #[cfg(any(test, feature = "test-utils"))]
    -1538                path_selection: PathSelection::default(),
    -1539            }
    -1540        };
    -1541
    -1542        // endpoint w/ no best addr but a relay w/ no latency
    -1543        let c_endpoint = {
    -1544            // let socket_addr = "0.0.0.0:8".parse().unwrap();
    -1545            let key = SecretKey::generate(rand::thread_rng());
    -1546            NodeState {
    -1547                id: 2,
    -1548                quic_mapped_addr: NodeIdMappedAddr::generate(),
    -1549                node_id: key.public(),
    -1550                last_full_ping: None,
    -1551                relay_url: Some((
    -1552                    send_addr.clone(),
    -1553                    PathState::new(
    -1554                        key.public(),
    -1555                        SendAddr::from(send_addr.clone()),
    -1556                        Source::App,
    -1557                        now,
    -1558                    ),
    -1559                )),
    -1560                udp_paths: NodeUdpPaths::new(),
    -1561                sent_pings: HashMap::new(),
    -1562                last_used: Some(now),
    -1563                last_call_me_maybe: None,
    -1564                conn_type: Watchable::new(ConnectionType::Relay(send_addr.clone())),
    -1565                has_been_direct: false,
    -1566                #[cfg(any(test, feature = "test-utils"))]
    -1567                path_selection: PathSelection::default(),
    -1568            }
    -1569        };
    -1570
    -1571        // endpoint w/ expired best addr and relay w/ latency
    -1572        let (d_endpoint, d_socket_addr) = {
    -1573            let socket_addr: SocketAddr = "0.0.0.0:7".parse().unwrap();
    -1574            let expired = now.checked_sub(Duration::from_secs(100)).unwrap();
    -1575            let key = SecretKey::generate(rand::thread_rng());
    -1576            let node_id = key.public();
    -1577            let endpoint_state = BTreeMap::from([(
    -1578                IpPort::from(socket_addr),
    -1579                PathState::with_pong_reply(
    -1580                    node_id,
    -1581                    PongReply {
    -1582                        latency,
    -1583                        pong_at: now,
    -1584                        from: SendAddr::Udp(socket_addr),
    -1585                        pong_src: pong_src.clone(),
    -1586                    },
    -1587                ),
    -1588            )]);
    -1589            (
    -1590                NodeState {
    -1591                    id: 3,
    -1592                    quic_mapped_addr: NodeIdMappedAddr::generate(),
    -1593                    node_id: key.public(),
    -1594                    last_full_ping: None,
    -1595                    relay_url: relay_and_state(key.public(), send_addr.clone()),
    -1596                    udp_paths: NodeUdpPaths::from_parts(
    -1597                        endpoint_state,
    -1598                        BestAddr::from_parts(socket_addr, Duration::from_millis(80), now, expired),
    -1599                    ),
    -1600                    sent_pings: HashMap::new(),
    -1601                    last_used: Some(now),
    -1602                    last_call_me_maybe: None,
    -1603                    conn_type: Watchable::new(ConnectionType::Mixed(
    -1604                        socket_addr,
    -1605                        send_addr.clone(),
    -1606                    )),
    -1607                    has_been_direct: false,
    -1608                    #[cfg(any(test, feature = "test-utils"))]
    -1609                    path_selection: PathSelection::default(),
    -1610                },
    -1611                socket_addr,
    -1612            )
    -1613        };
    -1614
    -1615        let mut expect = Vec::from([
    -1616            RemoteInfo {
    -1617                node_id: a_endpoint.node_id,
    -1618                relay_url: None,
    -1619                addrs: Vec::from([DirectAddrInfo {
    -1620                    addr: a_socket_addr,
    -1621                    latency: Some(latency),
    -1622                    last_control: Some((elapsed, ControlMsg::Pong)),
    -1623                    last_payload: None,
    -1624                    last_alive: Some(elapsed),
    -1625                    sources: HashMap::new(),
    -1626                }]),
    -1627                conn_type: ConnectionType::Direct(a_socket_addr),
    -1628                latency: Some(latency),
    -1629                last_used: Some(elapsed),
    -1630            },
    -1631            RemoteInfo {
    -1632                node_id: b_endpoint.node_id,
    -1633                relay_url: Some(RelayUrlInfo {
    -1634                    relay_url: b_endpoint.relay_url.as_ref().unwrap().0.clone(),
    -1635                    last_alive: None,
    -1636                    latency: Some(latency),
    -1637                }),
    -1638                addrs: Vec::new(),
    -1639                conn_type: ConnectionType::Relay(send_addr.clone()),
    -1640                latency: Some(latency),
    -1641                last_used: Some(elapsed),
    -1642            },
    -1643            RemoteInfo {
    -1644                node_id: c_endpoint.node_id,
    -1645                relay_url: Some(RelayUrlInfo {
    -1646                    relay_url: c_endpoint.relay_url.as_ref().unwrap().0.clone(),
    -1647                    last_alive: None,
    -1648                    latency: None,
    -1649                }),
    -1650                addrs: Vec::new(),
    -1651                conn_type: ConnectionType::Relay(send_addr.clone()),
    -1652                latency: None,
    -1653                last_used: Some(elapsed),
    -1654            },
    -1655            RemoteInfo {
    -1656                node_id: d_endpoint.node_id,
    -1657                relay_url: Some(RelayUrlInfo {
    -1658                    relay_url: d_endpoint.relay_url.as_ref().unwrap().0.clone(),
    -1659                    last_alive: None,
    -1660                    latency: Some(latency),
    -1661                }),
    -1662                addrs: Vec::from([DirectAddrInfo {
    -1663                    addr: d_socket_addr,
    -1664                    latency: Some(latency),
    -1665                    last_control: Some((elapsed, ControlMsg::Pong)),
    -1666                    last_payload: None,
    -1667                    last_alive: Some(elapsed),
    -1668                    sources: HashMap::new(),
    -1669                }]),
    -1670                conn_type: ConnectionType::Mixed(d_socket_addr, send_addr.clone()),
    -1671                latency: Some(Duration::from_millis(50)),
    -1672                last_used: Some(elapsed),
    -1673            },
    -1674        ]);
    -1675
    -1676        let node_map = NodeMap::from_inner(NodeMapInner {
    -1677            by_node_key: HashMap::from([
    -1678                (a_endpoint.node_id, a_endpoint.id),
    -1679                (b_endpoint.node_id, b_endpoint.id),
    -1680                (c_endpoint.node_id, c_endpoint.id),
    -1681                (d_endpoint.node_id, d_endpoint.id),
    -1682            ]),
    -1683            by_ip_port: HashMap::from([
    -1684                (a_socket_addr.into(), a_endpoint.id),
    -1685                (d_socket_addr.into(), d_endpoint.id),
    -1686            ]),
    -1687            by_quic_mapped_addr: HashMap::from([
    -1688                (a_endpoint.quic_mapped_addr, a_endpoint.id),
    -1689                (b_endpoint.quic_mapped_addr, b_endpoint.id),
    -1690                (c_endpoint.quic_mapped_addr, c_endpoint.id),
    -1691                (d_endpoint.quic_mapped_addr, d_endpoint.id),
    -1692            ]),
    -1693            by_id: HashMap::from([
    -1694                (a_endpoint.id, a_endpoint),
    -1695                (b_endpoint.id, b_endpoint),
    -1696                (c_endpoint.id, c_endpoint),
    -1697                (d_endpoint.id, d_endpoint),
    -1698            ]),
    -1699            next_id: 5,
    -1700            path_selection: PathSelection::default(),
    -1701        });
    -1702        let mut got = node_map.list_remote_infos(later);
    -1703        got.sort_by_key(|p| p.node_id);
    -1704        expect.sort_by_key(|p| p.node_id);
    -1705        remove_non_deterministic_fields(&mut got);
    -1706        assert_eq!(expect, got);
    +1442    use iroh_base::SecretKey;
    +1443    use rand::SeedableRng;
    +1444
    +1445    use super::*;
    +1446    use crate::magicsock::node_map::{NodeMap, NodeMapInner};
    +1447
    +1448    #[test]
    +1449    fn test_remote_infos() {
    +1450        let now = Instant::now();
    +1451        let elapsed = Duration::from_secs(3);
    +1452        let later = now + elapsed;
    +1453        let send_addr: RelayUrl = "https://my-relay.com".parse().unwrap();
    +1454        let pong_src = SendAddr::Udp("0.0.0.0:1".parse().unwrap());
    +1455        let latency = Duration::from_millis(50);
    +1456
    +1457        let relay_and_state = |node_id: NodeId, url: RelayUrl| {
    +1458            let relay_state = PathState::with_pong_reply(
    +1459                node_id,
    +1460                PongReply {
    +1461                    latency,
    +1462                    pong_at: now,
    +1463                    from: SendAddr::Relay(send_addr.clone()),
    +1464                    pong_src: pong_src.clone(),
    +1465                },
    +1466            );
    +1467            Some((url, relay_state))
    +1468        };
    +1469
    +1470        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1471
    +1472        // endpoint with a `best_addr` that has a latency but no relay
    +1473        let (a_endpoint, a_socket_addr) = {
    +1474            let key = SecretKey::generate(&mut rng);
    +1475            let node_id = key.public();
    +1476            let ip_port = IpPort {
    +1477                ip: Ipv4Addr::UNSPECIFIED.into(),
    +1478                port: 10,
    +1479            };
    +1480            let endpoint_state = BTreeMap::from([(
    +1481                ip_port,
    +1482                PathState::with_pong_reply(
    +1483                    node_id,
    +1484                    PongReply {
    +1485                        latency,
    +1486                        pong_at: now,
    +1487                        from: SendAddr::Udp(ip_port.into()),
    +1488                        pong_src: pong_src.clone(),
    +1489                    },
    +1490                ),
    +1491            )]);
    +1492            (
    +1493                NodeState {
    +1494                    id: 0,
    +1495                    quic_mapped_addr: NodeIdMappedAddr::generate(),
    +1496                    node_id: key.public(),
    +1497                    last_full_ping: None,
    +1498                    relay_url: None,
    +1499                    udp_paths: NodeUdpPaths::from_parts(
    +1500                        endpoint_state,
    +1501                        UdpSendAddr::Valid(ip_port.into()),
    +1502                    ),
    +1503                    sent_pings: HashMap::new(),
    +1504                    last_used: Some(now),
    +1505                    last_call_me_maybe: None,
    +1506                    conn_type: Watchable::new(ConnectionType::Direct(ip_port.into())),
    +1507                    has_been_direct: AtomicBool::new(true),
    +1508                    #[cfg(any(test, feature = "test-utils"))]
    +1509                    path_selection: PathSelection::default(),
    +1510                },
    +1511                ip_port.into(),
    +1512            )
    +1513        };
    +1514        // endpoint w/ no best addr but a relay w/ latency
    +1515        let b_endpoint = {
    +1516            // let socket_addr = "0.0.0.0:9".parse().unwrap();
    +1517            let key = SecretKey::generate(&mut rng);
    +1518            NodeState {
    +1519                id: 1,
    +1520                quic_mapped_addr: NodeIdMappedAddr::generate(),
    +1521                node_id: key.public(),
    +1522                last_full_ping: None,
    +1523                relay_url: relay_and_state(key.public(), send_addr.clone()),
    +1524                udp_paths: NodeUdpPaths::new(),
    +1525                sent_pings: HashMap::new(),
    +1526                last_used: Some(now),
    +1527                last_call_me_maybe: None,
    +1528                conn_type: Watchable::new(ConnectionType::Relay(send_addr.clone())),
    +1529                has_been_direct: AtomicBool::new(false),
    +1530                #[cfg(any(test, feature = "test-utils"))]
    +1531                path_selection: PathSelection::default(),
    +1532            }
    +1533        };
    +1534
    +1535        // endpoint w/ no best addr but a relay w/ no latency
    +1536        let c_endpoint = {
    +1537            // let socket_addr = "0.0.0.0:8".parse().unwrap();
    +1538            let key = SecretKey::generate(&mut rng);
    +1539            NodeState {
    +1540                id: 2,
    +1541                quic_mapped_addr: NodeIdMappedAddr::generate(),
    +1542                node_id: key.public(),
    +1543                last_full_ping: None,
    +1544                relay_url: Some((
    +1545                    send_addr.clone(),
    +1546                    PathState::new(
    +1547                        key.public(),
    +1548                        SendAddr::from(send_addr.clone()),
    +1549                        Source::App,
    +1550                        now,
    +1551                    ),
    +1552                )),
    +1553                udp_paths: NodeUdpPaths::new(),
    +1554                sent_pings: HashMap::new(),
    +1555                last_used: Some(now),
    +1556                last_call_me_maybe: None,
    +1557                conn_type: Watchable::new(ConnectionType::Relay(send_addr.clone())),
    +1558                has_been_direct: AtomicBool::new(false),
    +1559                #[cfg(any(test, feature = "test-utils"))]
    +1560                path_selection: PathSelection::default(),
    +1561            }
    +1562        };
    +1563
    +1564        // endpoint w/ expired best addr and relay w/ latency
    +1565        let (d_endpoint, d_socket_addr) = {
    +1566            let socket_addr: SocketAddr = "0.0.0.0:7".parse().unwrap();
    +1567            let key = SecretKey::generate(&mut rng);
    +1568            let node_id = key.public();
    +1569            let endpoint_state = BTreeMap::from([(
    +1570                IpPort::from(socket_addr),
    +1571                PathState::with_pong_reply(
    +1572                    node_id,
    +1573                    PongReply {
    +1574                        latency,
    +1575                        pong_at: now,
    +1576                        from: SendAddr::Udp(socket_addr),
    +1577                        pong_src: pong_src.clone(),
    +1578                    },
    +1579                ),
    +1580            )]);
    +1581            (
    +1582                NodeState {
    +1583                    id: 3,
    +1584                    quic_mapped_addr: NodeIdMappedAddr::generate(),
    +1585                    node_id: key.public(),
    +1586                    last_full_ping: None,
    +1587                    relay_url: relay_and_state(key.public(), send_addr.clone()),
    +1588                    udp_paths: NodeUdpPaths::from_parts(
    +1589                        endpoint_state,
    +1590                        UdpSendAddr::Outdated(socket_addr),
    +1591                    ),
    +1592                    sent_pings: HashMap::new(),
    +1593                    last_used: Some(now),
    +1594                    last_call_me_maybe: None,
    +1595                    conn_type: Watchable::new(ConnectionType::Mixed(
    +1596                        socket_addr,
    +1597                        send_addr.clone(),
    +1598                    )),
    +1599                    has_been_direct: AtomicBool::new(false),
    +1600                    #[cfg(any(test, feature = "test-utils"))]
    +1601                    path_selection: PathSelection::default(),
    +1602                },
    +1603                socket_addr,
    +1604            )
    +1605        };
    +1606
    +1607        let mut expect = Vec::from([
    +1608            RemoteInfo {
    +1609                node_id: a_endpoint.node_id,
    +1610                relay_url: None,
    +1611                addrs: Vec::from([DirectAddrInfo {
    +1612                    addr: a_socket_addr,
    +1613                    latency: Some(latency),
    +1614                    last_control: Some((elapsed, ControlMsg::Pong)),
    +1615                    last_payload: None,
    +1616                    last_alive: Some(elapsed),
    +1617                    sources: HashMap::new(),
    +1618                }]),
    +1619                conn_type: ConnectionType::Direct(a_socket_addr),
    +1620                latency: Some(latency),
    +1621                last_used: Some(elapsed),
    +1622            },
    +1623            RemoteInfo {
    +1624                node_id: b_endpoint.node_id,
    +1625                relay_url: Some(RelayUrlInfo {
    +1626                    relay_url: b_endpoint.relay_url.as_ref().unwrap().0.clone(),
    +1627                    last_alive: None,
    +1628                    latency: Some(latency),
    +1629                }),
    +1630                addrs: Vec::new(),
    +1631                conn_type: ConnectionType::Relay(send_addr.clone()),
    +1632                latency: Some(latency),
    +1633                last_used: Some(elapsed),
    +1634            },
    +1635            RemoteInfo {
    +1636                node_id: c_endpoint.node_id,
    +1637                relay_url: Some(RelayUrlInfo {
    +1638                    relay_url: c_endpoint.relay_url.as_ref().unwrap().0.clone(),
    +1639                    last_alive: None,
    +1640                    latency: None,
    +1641                }),
    +1642                addrs: Vec::new(),
    +1643                conn_type: ConnectionType::Relay(send_addr.clone()),
    +1644                latency: None,
    +1645                last_used: Some(elapsed),
    +1646            },
    +1647            RemoteInfo {
    +1648                node_id: d_endpoint.node_id,
    +1649                relay_url: Some(RelayUrlInfo {
    +1650                    relay_url: d_endpoint.relay_url.as_ref().unwrap().0.clone(),
    +1651                    last_alive: None,
    +1652                    latency: Some(latency),
    +1653                }),
    +1654                addrs: Vec::from([DirectAddrInfo {
    +1655                    addr: d_socket_addr,
    +1656                    latency: Some(latency),
    +1657                    last_control: Some((elapsed, ControlMsg::Pong)),
    +1658                    last_payload: None,
    +1659                    last_alive: Some(elapsed),
    +1660                    sources: HashMap::new(),
    +1661                }]),
    +1662                conn_type: ConnectionType::Mixed(d_socket_addr, send_addr.clone()),
    +1663                latency: Some(Duration::from_millis(50)),
    +1664                last_used: Some(elapsed),
    +1665            },
    +1666        ]);
    +1667
    +1668        let node_map = NodeMap::from_inner(NodeMapInner {
    +1669            by_node_key: HashMap::from([
    +1670                (a_endpoint.node_id, a_endpoint.id),
    +1671                (b_endpoint.node_id, b_endpoint.id),
    +1672                (c_endpoint.node_id, c_endpoint.id),
    +1673                (d_endpoint.node_id, d_endpoint.id),
    +1674            ]),
    +1675            by_ip_port: HashMap::from([
    +1676                (a_socket_addr.into(), a_endpoint.id),
    +1677                (d_socket_addr.into(), d_endpoint.id),
    +1678            ]),
    +1679            by_quic_mapped_addr: HashMap::from([
    +1680                (a_endpoint.quic_mapped_addr, a_endpoint.id),
    +1681                (b_endpoint.quic_mapped_addr, b_endpoint.id),
    +1682                (c_endpoint.quic_mapped_addr, c_endpoint.id),
    +1683                (d_endpoint.quic_mapped_addr, d_endpoint.id),
    +1684            ]),
    +1685            by_id: HashMap::from([
    +1686                (a_endpoint.id, a_endpoint),
    +1687                (b_endpoint.id, b_endpoint),
    +1688                (c_endpoint.id, c_endpoint),
    +1689                (d_endpoint.id, d_endpoint),
    +1690            ]),
    +1691            next_id: 5,
    +1692            path_selection: PathSelection::default(),
    +1693        });
    +1694        let mut got = node_map.list_remote_infos(later);
    +1695        got.sort_by_key(|p| p.node_id);
    +1696        expect.sort_by_key(|p| p.node_id);
    +1697        remove_non_deterministic_fields(&mut got);
    +1698        assert_eq!(expect, got);
    +1699    }
    +1700
    +1701    fn remove_non_deterministic_fields(infos: &mut [RemoteInfo]) {
    +1702        for info in infos.iter_mut() {
    +1703            if info.relay_url.is_some() {
    +1704                info.relay_url.as_mut().unwrap().last_alive = None;
    +1705            }
    +1706        }
     1707    }
     1708
    -1709    fn remove_non_deterministic_fields(infos: &mut [RemoteInfo]) {
    -1710        for info in infos.iter_mut() {
    -1711            if info.relay_url.is_some() {
    -1712                info.relay_url.as_mut().unwrap().last_alive = None;
    -1713            }
    -1714        }
    -1715    }
    -1716
    -1717    #[test]
    -1718    fn test_prune_direct_addresses() {
    -1719        // When we handle a call-me-maybe with more than MAX_INACTIVE_DIRECT_ADDRESSES we do
    -1720        // not want to prune them right away but send pings to all of them.
    -1721
    -1722        let key = SecretKey::generate(rand::thread_rng());
    -1723        let opts = Options {
    -1724            node_id: key.public(),
    -1725            relay_url: None,
    -1726            active: true,
    -1727            source: crate::magicsock::Source::NamedApp {
    -1728                name: "test".into(),
    -1729            },
    -1730            path_selection: PathSelection::default(),
    -1731        };
    -1732        let mut ep = NodeState::new(0, opts);
    -1733
    -1734        let my_numbers_count: u16 = (MAX_INACTIVE_DIRECT_ADDRESSES + 5).try_into().unwrap();
    -1735        let my_numbers = (0u16..my_numbers_count)
    -1736            .map(|i| SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 1000 + i))
    -1737            .collect();
    -1738        let call_me_maybe = disco::CallMeMaybe { my_numbers };
    -1739
    -1740        let ping_messages = ep.handle_call_me_maybe(call_me_maybe);
    -1741
    -1742        // We have no relay server and no previous direct addresses, so we should get the same
    -1743        // number of pings as direct addresses in the call-me-maybe.
    -1744        assert_eq!(ping_messages.len(), my_numbers_count as usize);
    -1745    }
    -1746}
    \ No newline at end of file +1709 #[test] +1710 fn test_prune_direct_addresses() { +1711 // When we handle a call-me-maybe with more than MAX_INACTIVE_DIRECT_ADDRESSES we do +1712 // not want to prune them right away but send pings to all of them. +1713 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +1714 +1715 let key = SecretKey::generate(&mut rng); +1716 let opts = Options { +1717 node_id: key.public(), +1718 relay_url: None, +1719 active: true, +1720 source: crate::magicsock::Source::NamedApp { +1721 name: "test".into(), +1722 }, +1723 path_selection: PathSelection::default(), +1724 }; +1725 let mut ep = NodeState::new(0, opts); +1726 +1727 let my_numbers_count: u16 = (MAX_INACTIVE_DIRECT_ADDRESSES + 5).try_into().unwrap(); +1728 let my_numbers = (0u16..my_numbers_count) +1729 .map(|i| SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 1000 + i)) +1730 .collect(); +1731 let call_me_maybe = disco::CallMeMaybe { my_numbers }; +1732 +1733 let metrics = MagicsockMetrics::default(); +1734 let ping_messages = ep.handle_call_me_maybe(call_me_maybe, &metrics); +1735 +1736 // We have no relay server and no previous direct addresses, so we should get the same +1737 // number of pings as direct addresses in the call-me-maybe. +1738 assert_eq!(ping_messages.len(), my_numbers_count as usize); +1739 } +1740}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/node_map/path_state.rs.html b/pr/3367/docs/src/iroh/magicsock/node_map/path_state.rs.html index 7b858e8cfe..7ef31bfdb0 100644 --- a/pr/3367/docs/src/iroh/magicsock/node_map/path_state.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/node_map/path_state.rs.html @@ -1,326 +1,330 @@ -path_state.rs - source

    iroh/magicsock/node_map/
    path_state.rs

    1//! The state kept for each network path to a remote node.
    +path_state.rs - source

    iroh/magicsock/node_map/
    path_state.rs

    1//! The state kept for each network path to a remote node.
     2
    -3use std::{
    -4    collections::{BTreeMap, HashMap},
    -5    net::SocketAddr,
    -6};
    -7
    -8use iroh_base::NodeId;
    -9use n0_future::time::{Duration, Instant};
    -10use tracing::{debug, event, Level};
    -11
    -12use super::{
    -13    node_state::{ControlMsg, PongReply, SESSION_ACTIVE_TIMEOUT},
    -14    IpPort, PingRole, Source,
    -15};
    -16use crate::{disco::SendAddr, magicsock::HEARTBEAT_INTERVAL};
    -17
    -18/// The minimum time between pings to an endpoint.
    -19///
    -20/// Except in the case of CallMeMaybe frames resetting the counter, as the first pings
    -21/// likely didn't through the firewall.
    -22const DISCO_PING_INTERVAL: Duration = Duration::from_secs(5);
    -23
    -24/// State about a particular path to another [`NodeState`].
    -25///
    -26/// This state is used for both the relay path and any direct UDP paths.
    -27///
    -28/// [`NodeState`]: super::node_state::NodeState
    -29#[derive(Debug, Clone, PartialEq, Eq)]
    -30pub(super) struct PathState {
    -31    /// The node for which this path exists.
    -32    node_id: NodeId,
    -33    /// The path this applies for.
    -34    path: SendAddr,
    -35    /// The last (outgoing) ping time.
    -36    pub(super) last_ping: Option<Instant>,
    -37
    -38    /// If non-zero, means that this was an endpoint that we learned about at runtime (from an
    -39    /// incoming ping). If so, we keep the time updated and use it to discard old candidates.
    -40    // NOTE: tx_id Originally added in tailscale due to <https://github.com/tailscale/tailscale/issues/7078>.
    -41    last_got_ping: Option<(Instant, stun_rs::TransactionId)>,
    -42
    -43    /// The time this endpoint was last advertised via a call-me-maybe DISCO message.
    -44    pub(super) call_me_maybe_time: Option<Instant>,
    +3use std::collections::{BTreeMap, HashMap};
    +4
    +5use iroh_base::NodeId;
    +6use n0_future::time::{Duration, Instant};
    +7use tracing::{Level, debug, event};
    +8
    +9use super::{
    +10    IpPort, PingRole, Source,
    +11    node_state::{ControlMsg, PongReply, SESSION_ACTIVE_TIMEOUT},
    +12};
    +13use crate::{
    +14    disco::SendAddr,
    +15    magicsock::{
    +16        HEARTBEAT_INTERVAL, Metrics as MagicsockMetrics,
    +17        node_map::path_validity::{self, PathValidity},
    +18    },
    +19};
    +20
    +21/// The minimum time between pings to an endpoint.
    +22///
    +23/// Except in the case of CallMeMaybe frames resetting the counter, as the first pings
    +24/// likely didn't through the firewall.
    +25const DISCO_PING_INTERVAL: Duration = Duration::from_secs(5);
    +26
    +27/// State about a particular path to another [`NodeState`].
    +28///
    +29/// This state is used for both the relay path and any direct UDP paths.
    +30///
    +31/// [`NodeState`]: super::node_state::NodeState
    +32#[derive(Debug, Clone)]
    +33pub(super) struct PathState {
    +34    /// The node for which this path exists.
    +35    node_id: NodeId,
    +36    /// The path this applies for.
    +37    path: SendAddr,
    +38    /// The last (outgoing) ping time.
    +39    pub(super) last_ping: Option<Instant>,
    +40
    +41    /// If non-zero, means that this was an endpoint that we learned about at runtime (from an
    +42    /// incoming ping). If so, we keep the time updated and use it to discard old candidates.
    +43    // NOTE: tx_id Originally added in tailscale due to <https://github.com/tailscale/tailscale/issues/7078>.
    +44    last_got_ping: Option<(Instant, stun_rs::TransactionId)>,
     45
    -46    /// The most recent [`PongReply`].
    -47    ///
    -48    /// Previous replies are cleared when they are no longer relevant to determine whether
    -49    /// this path can still be used to reach the remote node.
    -50    pub(super) recent_pong: Option<PongReply>,
    -51    /// When the last payload data was **received** via this path.
    +46    /// The time this endpoint was last advertised via a call-me-maybe DISCO message.
    +47    pub(super) call_me_maybe_time: Option<Instant>,
    +48
    +49    /// Tracks whether this path is valid.
    +50    ///
    +51    /// Also stores the latest [`PongReply`], if there is one.
     52    ///
    -53    /// This excludes DISCO messages.
    -54    pub(super) last_payload_msg: Option<Instant>,
    -55    /// Sources is a map of [`Source`]s to [`Instant`]s, keeping track of all the ways we have
    -56    /// learned about this path
    -57    ///
    -58    /// We keep track of only the latest [`Instant`] for each [`Source`], keeping the size of
    -59    /// the map of sources down to one entry per type of source.
    -60    pub(super) sources: HashMap<Source, Instant>,
    -61}
    -62
    -63impl PathState {
    -64    pub(super) fn new(node_id: NodeId, path: SendAddr, source: Source, now: Instant) -> Self {
    -65        let mut sources = HashMap::new();
    -66        sources.insert(source, now);
    -67        Self {
    -68            node_id,
    -69            path,
    -70            last_ping: None,
    -71            last_got_ping: None,
    -72            call_me_maybe_time: None,
    -73            recent_pong: None,
    -74            last_payload_msg: None,
    -75            sources,
    -76        }
    -77    }
    -78
    -79    pub(super) fn udp_addr(&self) -> Option<SocketAddr> {
    -80        match self.path {
    -81            SendAddr::Udp(addr) => Some(addr),
    -82            SendAddr::Relay(_) => None,
    -83        }
    -84    }
    -85
    -86    pub(super) fn with_last_payload(
    -87        node_id: NodeId,
    -88        path: SendAddr,
    -89        source: Source,
    -90        now: Instant,
    -91    ) -> Self {
    -92        let mut sources = HashMap::new();
    -93        sources.insert(source, now);
    -94        PathState {
    -95            node_id,
    -96            path,
    -97            last_ping: None,
    -98            last_got_ping: None,
    -99            call_me_maybe_time: None,
    -100            recent_pong: None,
    -101            last_payload_msg: Some(now),
    -102            sources,
    -103        }
    -104    }
    -105
    -106    pub(super) fn with_ping(
    -107        node_id: NodeId,
    -108        path: SendAddr,
    -109        tx_id: stun_rs::TransactionId,
    -110        source: Source,
    -111        now: Instant,
    -112    ) -> Self {
    -113        let mut new = PathState::new(node_id, path, source, now);
    -114        new.handle_ping(tx_id, now);
    -115        new
    -116    }
    -117
    -118    pub(super) fn add_pong_reply(&mut self, r: PongReply) {
    -119        if let SendAddr::Udp(ref path) = self.path {
    -120            if self.recent_pong.is_none() {
    -121                event!(
    -122                    target: "iroh::_events::holepunched",
    -123                    Level::DEBUG,
    -124                    remote_node = %self.node_id.fmt_short(),
    -125                    path = ?path,
    -126                    direction = "outgoing",
    -127                );
    -128            }
    -129        }
    -130        self.recent_pong = Some(r);
    +53    /// See [`PathValidity`] docs.
    +54    pub(super) validity: PathValidity,
    +55    /// When the last payload data was **received** via this path.
    +56    ///
    +57    /// This excludes DISCO messages.
    +58    pub(super) last_payload_msg: Option<Instant>,
    +59    /// Sources is a map of [`Source`]s to [`Instant`]s, keeping track of all the ways we have
    +60    /// learned about this path
    +61    ///
    +62    /// We keep track of only the latest [`Instant`] for each [`Source`], keeping the size of
    +63    /// the map of sources down to one entry per type of source.
    +64    pub(super) sources: HashMap<Source, Instant>,
    +65}
    +66
    +67impl PathState {
    +68    pub(super) fn new(node_id: NodeId, path: SendAddr, source: Source, now: Instant) -> Self {
    +69        let mut sources = HashMap::new();
    +70        sources.insert(source, now);
    +71        Self {
    +72            node_id,
    +73            path,
    +74            last_ping: None,
    +75            last_got_ping: None,
    +76            call_me_maybe_time: None,
    +77            validity: PathValidity::empty(),
    +78            last_payload_msg: None,
    +79            sources,
    +80        }
    +81    }
    +82
    +83    pub(super) fn with_last_payload(
    +84        node_id: NodeId,
    +85        path: SendAddr,
    +86        source: Source,
    +87        now: Instant,
    +88    ) -> Self {
    +89        let mut sources = HashMap::new();
    +90        sources.insert(source, now);
    +91        PathState {
    +92            node_id,
    +93            path,
    +94            last_ping: None,
    +95            last_got_ping: None,
    +96            call_me_maybe_time: None,
    +97            validity: PathValidity::empty(),
    +98            last_payload_msg: Some(now),
    +99            sources,
    +100        }
    +101    }
    +102
    +103    pub(super) fn with_ping(
    +104        node_id: NodeId,
    +105        path: SendAddr,
    +106        tx_id: stun_rs::TransactionId,
    +107        source: Source,
    +108        now: Instant,
    +109    ) -> Self {
    +110        let mut new = PathState::new(node_id, path, source, now);
    +111        new.handle_ping(tx_id, now);
    +112        new
    +113    }
    +114
    +115    pub(super) fn add_pong_reply(&mut self, r: PongReply, metrics: &MagicsockMetrics) {
    +116        if let SendAddr::Udp(ref path) = self.path {
    +117            if self.validity.is_empty() {
    +118                event!(
    +119                    target: "iroh::_events::holepunched",
    +120                    Level::DEBUG,
    +121                    remote_node = %self.node_id.fmt_short(),
    +122                    path = ?path,
    +123                    direction = "outgoing",
    +124                );
    +125            }
    +126        }
    +127
    +128        self.validity.update_pong(r.pong_at, r.latency);
    +129
    +130        self.validity.record_metrics(metrics);
     131    }
     132
    -133    #[cfg(test)]
    -134    pub(super) fn with_pong_reply(node_id: NodeId, r: PongReply) -> Self {
    -135        PathState {
    -136            node_id,
    -137            path: r.from.clone(),
    -138            last_ping: None,
    -139            last_got_ping: None,
    -140            call_me_maybe_time: None,
    -141            recent_pong: Some(r),
    -142            last_payload_msg: None,
    -143            sources: HashMap::new(),
    -144        }
    -145    }
    -146
    -147    /// Check whether this path is considered active.
    -148    ///
    -149    /// Active means the path has received payload messages within the last
    -150    /// [`SESSION_ACTIVE_TIMEOUT`].
    -151    ///
    -152    /// Note that a path might be alive but not active if it's contactable but not in
    -153    /// use.
    -154    pub(super) fn is_active(&self) -> bool {
    -155        self.last_payload_msg
    -156            .as_ref()
    -157            .map(|instant| instant.elapsed() <= SESSION_ACTIVE_TIMEOUT)
    -158            .unwrap_or(false)
    -159    }
    -160
    -161    /// Returns the instant the last incoming ping was received.
    -162    pub(super) fn last_incoming_ping(&self) -> Option<&Instant> {
    -163        self.last_got_ping.as_ref().map(|(time, _tx_id)| time)
    -164    }
    -165
    -166    /// Reports the last instant this path was considered alive.
    -167    ///
    -168    /// Alive means the path is considered in use by the remote endpoint.  Either because we
    -169    /// received a payload message, a DISCO message (ping, pong) or it was advertised in a
    -170    /// call-me-maybe message.
    -171    ///
    -172    /// This is the most recent instant between:
    -173    /// - when last pong was received.
    -174    /// - when this path was last advertised in a received CallMeMaybe message.
    -175    /// - When the last payload transmission occurred.
    -176    /// - when the last ping from them was received.
    -177    pub(super) fn last_alive(&self) -> Option<Instant> {
    -178        self.recent_pong
    -179            .as_ref()
    -180            .map(|pong| &pong.pong_at)
    -181            .into_iter()
    -182            .chain(self.last_payload_msg.as_ref())
    -183            .chain(self.call_me_maybe_time.as_ref())
    -184            .chain(self.last_incoming_ping())
    -185            .max()
    -186            .copied()
    -187    }
    -188
    -189    /// The last control or DISCO message **about** this path.
    -190    ///
    -191    /// This is the most recent instant among:
    -192    /// - when last pong was received.
    -193    /// - when this path was last advertised in a received CallMeMaybe message.
    -194    /// - when the last ping from them was received.
    -195    ///
    -196    /// Returns the time elapsed since the last control message, and the type of control message.
    -197    pub(super) fn last_control_msg(&self, now: Instant) -> Option<(Duration, ControlMsg)> {
    -198        // get every control message and assign it its kind
    -199        let last_pong = self
    -200            .recent_pong
    -201            .as_ref()
    -202            .map(|pong| (pong.pong_at, ControlMsg::Pong));
    -203        let last_call_me_maybe = self
    -204            .call_me_maybe_time
    -205            .as_ref()
    -206            .map(|call_me| (*call_me, ControlMsg::CallMeMaybe));
    -207        let last_ping = self
    -208            .last_incoming_ping()
    -209            .map(|ping| (*ping, ControlMsg::Ping));
    -210
    -211        last_pong
    -212            .into_iter()
    -213            .chain(last_call_me_maybe)
    -214            .chain(last_ping)
    -215            .max_by_key(|(instant, _kind)| *instant)
    -216            .map(|(instant, kind)| (now.duration_since(instant), kind))
    -217    }
    -218
    -219    /// Returns the latency from the most recent pong, if available.
    -220    pub(super) fn latency(&self) -> Option<Duration> {
    -221        self.recent_pong.as_ref().map(|p| p.latency)
    -222    }
    -223
    -224    pub(super) fn needs_ping(&self, now: &Instant) -> bool {
    -225        match self.last_ping {
    -226            None => true,
    -227            Some(last_ping) => {
    -228                let elapsed = now.duration_since(last_ping);
    -229
    -230                // TODO: remove!
    -231                // This logs "ping is too new" for each send whenever the endpoint does *not* need
    -232                // a ping. Pretty sure this is not a useful log, but maybe there was a reason?
    -233                // if !needs_ping {
    -234                //     debug!("ping is too new: {}ms", elapsed.as_millis());
    -235                // }
    -236                elapsed > DISCO_PING_INTERVAL
    -237            }
    -238        }
    -239    }
    -240
    -241    pub(super) fn handle_ping(&mut self, tx_id: stun_rs::TransactionId, now: Instant) -> PingRole {
    -242        if Some(&tx_id) == self.last_got_ping.as_ref().map(|(_t, tx_id)| tx_id) {
    -243            PingRole::Duplicate
    -244        } else {
    -245            let prev = self.last_got_ping.replace((now, tx_id));
    -246            let heartbeat_deadline = HEARTBEAT_INTERVAL + (HEARTBEAT_INTERVAL / 2);
    -247            match prev {
    -248                Some((prev_time, _tx)) if now.duration_since(prev_time) <= heartbeat_deadline => {
    -249                    PingRole::LikelyHeartbeat
    -250                }
    -251                Some((prev_time, _tx)) => {
    -252                    debug!(
    -253                        elapsed = ?now.duration_since(prev_time),
    -254                        "heartbeat missed, reactivating",
    -255                    );
    -256                    PingRole::Activate
    -257                }
    -258                None => {
    -259                    if let SendAddr::Udp(ref addr) = self.path {
    -260                        event!(
    -261                            target: "iroh::_events::holepunched",
    -262                            Level::DEBUG,
    -263                            remote_node = %self.node_id.fmt_short(),
    -264                            path = ?addr,
    -265                            direction = "incoming",
    -266                        );
    -267                    }
    -268                    PingRole::Activate
    -269                }
    -270            }
    -271        }
    -272    }
    -273
    -274    pub(super) fn add_source(&mut self, source: Source, now: Instant) {
    -275        self.sources.insert(source, now);
    +133    pub(super) fn receive_payload(&mut self, now: Instant) {
    +134        self.last_payload_msg = Some(now);
    +135        self.validity
    +136            .receive_payload(now, path_validity::Source::QuicPayload);
    +137    }
    +138
    +139    #[cfg(test)]
    +140    pub(super) fn with_pong_reply(node_id: NodeId, r: PongReply) -> Self {
    +141        PathState {
    +142            node_id,
    +143            path: r.from.clone(),
    +144            last_ping: None,
    +145            last_got_ping: None,
    +146            call_me_maybe_time: None,
    +147            validity: PathValidity::new(r.pong_at, r.latency),
    +148            last_payload_msg: None,
    +149            sources: HashMap::new(),
    +150        }
    +151    }
    +152
    +153    /// Check whether this path is considered active.
    +154    ///
    +155    /// Active means the path has received payload messages within the last
    +156    /// [`SESSION_ACTIVE_TIMEOUT`].
    +157    ///
    +158    /// Note that a path might be alive but not active if it's contactable but not in
    +159    /// use.
    +160    pub(super) fn is_active(&self) -> bool {
    +161        self.last_payload_msg
    +162            .as_ref()
    +163            .map(|instant| instant.elapsed() <= SESSION_ACTIVE_TIMEOUT)
    +164            .unwrap_or(false)
    +165    }
    +166
    +167    /// Returns the instant the last incoming ping was received.
    +168    pub(super) fn last_incoming_ping(&self) -> Option<&Instant> {
    +169        self.last_got_ping.as_ref().map(|(time, _tx_id)| time)
    +170    }
    +171
    +172    /// Reports the last instant this path was considered alive.
    +173    ///
    +174    /// Alive means the path is considered in use by the remote endpoint.  Either because we
    +175    /// received a payload message, a DISCO message (ping, pong) or it was advertised in a
    +176    /// call-me-maybe message.
    +177    ///
    +178    /// This is the most recent instant between:
    +179    /// - when last pong was received.
    +180    /// - when this path was last advertised in a received CallMeMaybe message.
    +181    /// - When the last payload transmission occurred.
    +182    /// - when the last ping from them was received.
    +183    pub(super) fn last_alive(&self) -> Option<Instant> {
    +184        self.validity
    +185            .latest_pong()
    +186            .into_iter()
    +187            .chain(self.last_payload_msg)
    +188            .chain(self.call_me_maybe_time)
    +189            .chain(self.last_incoming_ping().cloned())
    +190            .max()
    +191    }
    +192
    +193    /// The last control or DISCO message **about** this path.
    +194    ///
    +195    /// This is the most recent instant among:
    +196    /// - when last pong was received.
    +197    /// - when this path was last advertised in a received CallMeMaybe message.
    +198    /// - when the last ping from them was received.
    +199    ///
    +200    /// Returns the time elapsed since the last control message, and the type of control message.
    +201    pub(super) fn last_control_msg(&self, now: Instant) -> Option<(Duration, ControlMsg)> {
    +202        // get every control message and assign it its kind
    +203        let last_pong = self
    +204            .validity
    +205            .latest_pong()
    +206            .map(|pong_at| (pong_at, ControlMsg::Pong));
    +207        let last_call_me_maybe = self
    +208            .call_me_maybe_time
    +209            .as_ref()
    +210            .map(|call_me| (*call_me, ControlMsg::CallMeMaybe));
    +211        let last_ping = self
    +212            .last_incoming_ping()
    +213            .map(|ping| (*ping, ControlMsg::Ping));
    +214
    +215        last_pong
    +216            .into_iter()
    +217            .chain(last_call_me_maybe)
    +218            .chain(last_ping)
    +219            .max_by_key(|(instant, _kind)| *instant)
    +220            .map(|(instant, kind)| (now.duration_since(instant), kind))
    +221    }
    +222
    +223    /// Returns the latency from the most recent pong, if available.
    +224    pub(super) fn latency(&self) -> Option<Duration> {
    +225        self.validity.latency()
    +226    }
    +227
    +228    pub(super) fn needs_ping(&self, now: &Instant) -> bool {
    +229        match self.last_ping {
    +230            None => true,
    +231            Some(last_ping) => {
    +232                let elapsed = now.duration_since(last_ping);
    +233
    +234                // TODO: remove!
    +235                // This logs "ping is too new" for each send whenever the endpoint does *not* need
    +236                // a ping. Pretty sure this is not a useful log, but maybe there was a reason?
    +237                // if !needs_ping {
    +238                //     debug!("ping is too new: {}ms", elapsed.as_millis());
    +239                // }
    +240                elapsed > DISCO_PING_INTERVAL
    +241            }
    +242        }
    +243    }
    +244
    +245    pub(super) fn handle_ping(&mut self, tx_id: stun_rs::TransactionId, now: Instant) -> PingRole {
    +246        if Some(&tx_id) == self.last_got_ping.as_ref().map(|(_t, tx_id)| tx_id) {
    +247            PingRole::Duplicate
    +248        } else {
    +249            let prev = self.last_got_ping.replace((now, tx_id));
    +250            let heartbeat_deadline = HEARTBEAT_INTERVAL + (HEARTBEAT_INTERVAL / 2);
    +251            match prev {
    +252                Some((prev_time, _tx)) if now.duration_since(prev_time) <= heartbeat_deadline => {
    +253                    PingRole::LikelyHeartbeat
    +254                }
    +255                Some((prev_time, _tx)) => {
    +256                    debug!(
    +257                        elapsed = ?now.duration_since(prev_time),
    +258                        "heartbeat missed, reactivating",
    +259                    );
    +260                    PingRole::Activate
    +261                }
    +262                None => {
    +263                    if let SendAddr::Udp(ref addr) = self.path {
    +264                        event!(
    +265                            target: "iroh::_events::holepunched",
    +266                            Level::DEBUG,
    +267                            remote_node = %self.node_id.fmt_short(),
    +268                            path = ?addr,
    +269                            direction = "incoming",
    +270                        );
    +271                    }
    +272                    PingRole::Activate
    +273                }
    +274            }
    +275        }
     276    }
     277
    -278    pub(super) fn clear(&mut self) {
    -279        self.last_ping = None;
    -280        self.last_got_ping = None;
    -281        self.call_me_maybe_time = None;
    -282        self.recent_pong = None;
    -283    }
    -284
    -285    fn summary(&self, mut w: impl std::fmt::Write) -> std::fmt::Result {
    -286        write!(w, "{{ ")?;
    -287        if self.is_active() {
    -288            write!(w, "active ")?;
    -289        }
    -290        if let Some(ref pong) = self.recent_pong {
    -291            write!(w, "pong-received({:?} ago) ", pong.pong_at.elapsed())?;
    -292        }
    -293        if let Some(when) = self.last_incoming_ping() {
    -294            write!(w, "ping-received({:?} ago) ", when.elapsed())?;
    -295        }
    -296        if let Some(ref when) = self.last_ping {
    -297            write!(w, "ping-sent({:?} ago) ", when.elapsed())?;
    -298        }
    -299        if let Some(last_source) = self.sources.iter().max_by_key(|&(_, instant)| instant) {
    -300            write!(
    -301                w,
    -302                "last-source: {}({:?} ago)",
    -303                last_source.0,
    -304                last_source.1.elapsed()
    -305            )?;
    -306        }
    -307        write!(w, "}}")
    -308    }
    -309}
    -310
    -311// TODO: Make an `EndpointPaths` struct and do things nicely.
    -312pub(super) fn summarize_node_paths(paths: &BTreeMap<IpPort, PathState>) -> String {
    -313    use std::fmt::Write;
    +278    pub(super) fn add_source(&mut self, source: Source, now: Instant) {
    +279        self.sources.insert(source, now);
    +280    }
    +281
    +282    pub(super) fn clear(&mut self) {
    +283        self.last_ping = None;
    +284        self.last_got_ping = None;
    +285        self.call_me_maybe_time = None;
    +286        self.validity = PathValidity::empty();
    +287    }
    +288
    +289    fn summary(&self, mut w: impl std::fmt::Write) -> std::fmt::Result {
    +290        write!(w, "{{ ")?;
    +291        if self.is_active() {
    +292            write!(w, "active ")?;
    +293        }
    +294        if let Some(pong_at) = self.validity.latest_pong() {
    +295            write!(w, "pong-received({:?} ago) ", pong_at.elapsed())?;
    +296        }
    +297        if let Some(when) = self.last_incoming_ping() {
    +298            write!(w, "ping-received({:?} ago) ", when.elapsed())?;
    +299        }
    +300        if let Some(ref when) = self.last_ping {
    +301            write!(w, "ping-sent({:?} ago) ", when.elapsed())?;
    +302        }
    +303        if let Some(last_source) = self.sources.iter().max_by_key(|&(_, instant)| instant) {
    +304            write!(
    +305                w,
    +306                "last-source: {}({:?} ago)",
    +307                last_source.0,
    +308                last_source.1.elapsed()
    +309            )?;
    +310        }
    +311        write!(w, "}}")
    +312    }
    +313}
     314
    -315    let mut w = String::new();
    -316    write!(&mut w, "[").ok();
    -317    for (i, (ipp, state)) in paths.iter().enumerate() {
    -318        if i > 0 {
    -319            write!(&mut w, ", ").ok();
    -320        }
    -321        write!(&mut w, "{ipp}").ok();
    -322        state.summary(&mut w).ok();
    -323    }
    -324    write!(&mut w, "]").ok();
    -325    w
    -326}
    \ No newline at end of file +315// TODO: Make an `EndpointPaths` struct and do things nicely. +316pub(super) fn summarize_node_paths(paths: &BTreeMap<IpPort, PathState>) -> String { +317 use std::fmt::Write; +318 +319 let mut w = String::new(); +320 write!(&mut w, "[").ok(); +321 for (i, (ipp, state)) in paths.iter().enumerate() { +322 if i > 0 { +323 write!(&mut w, ", ").ok(); +324 } +325 write!(&mut w, "{ipp}").ok(); +326 state.summary(&mut w).ok(); +327 } +328 write!(&mut w, "]").ok(); +329 w +330}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/node_map/path_validity.rs.html b/pr/3367/docs/src/iroh/magicsock/node_map/path_validity.rs.html new file mode 100644 index 0000000000..a2fa354fdc --- /dev/null +++ b/pr/3367/docs/src/iroh/magicsock/node_map/path_validity.rs.html @@ -0,0 +1,398 @@ +path_validity.rs - source

    iroh/magicsock/node_map/
    path_validity.rs

    1use n0_future::time::{Duration, Instant};
    +2
    +3use crate::magicsock::Metrics as MagicsockMetrics;
    +4
    +5/// How long we trust a UDP address as the exclusive path (i.e. without also sending via the relay).
    +6///
    +7/// Trust for a UDP address begins when we receive a DISCO UDP pong on that address.
    +8/// It is then further extended by this duration every time we receive QUIC payload data while it's
    +9/// currently trusted.
    +10///
    +11/// If trust goes away, it can be brought back with another valid DISCO UDP pong.
    +12const TRUST_UDP_ADDR_DURATION: Duration = Duration::from_millis(6500);
    +13
    +14/// Tracks a path's validity.
    +15///
    +16/// A path is valid:
    +17/// - For [`Source::trust_duration`] after a successful [`PongReply`].
    +18/// - For [`Source::trust_duration`] longer starting at the most recent
    +19///   received application payload *while the path was valid*.
    +20///
    +21/// [`PongReply`]: super::node_state::PongReply
    +22#[derive(Debug, Clone, Default)]
    +23pub(super) struct PathValidity(Option<Inner>);
    +24
    +25#[derive(Debug, Clone)]
    +26struct Inner {
    +27    latest_pong: Instant,
    +28    latency: Duration,
    +29    trust_until: Instant,
    +30    congestion_metrics: CongestionMetrics,
    +31}
    +32
    +33/// Congestion tracking for a UDP path.
    +34#[derive(Debug, Default, Clone)]
    +35struct CongestionMetrics {
    +36    /// Rolling window of recent latency measurements (stores up to 8 samples).
    +37    latency_samples: [Option<Duration>; 8],
    +38    /// Index for next sample insertion (circular buffer).
    +39    sample_index: usize,
    +40    /// Total pings sent on this path.
    +41    pings_sent: u32,
    +42    /// Total pongs received on this path.
    +43    pongs_received: u32,
    +44}
    +45
    +46impl CongestionMetrics {
    +47    fn add_latency_sample(&mut self, latency: Duration) {
    +48        self.latency_samples[self.sample_index] = Some(latency);
    +49        self.sample_index = (self.sample_index + 1) % self.latency_samples.len();
    +50        self.pongs_received = self.pongs_received.saturating_add(1);
    +51    }
    +52
    +53    fn record_ping_sent(&mut self) {
    +54        self.pings_sent = self.pings_sent.saturating_add(1);
    +55    }
    +56
    +57    /// Calculate packet loss rate (0.0 to 1.0).
    +58    fn packet_loss_rate(&self) -> f64 {
    +59        if self.pings_sent == 0 {
    +60            return 0.0;
    +61        }
    +62        let lost = self.pings_sent.saturating_sub(self.pongs_received);
    +63        lost as f64 / self.pings_sent as f64
    +64    }
    +65
    +66    /// Calculate RTT variance as a congestion indicator.
    +67    /// Higher variance suggests congestion or unstable path.
    +68    fn rtt_variance(&self) -> Option<Duration> {
    +69        let samples: Vec<Duration> = self.latency_samples.iter().filter_map(|&s| s).collect();
    +70
    +71        if samples.len() < 2 {
    +72            return None;
    +73        }
    +74
    +75        let mean = samples.iter().sum::<Duration>() / samples.len() as u32;
    +76        let variance: f64 = samples
    +77            .iter()
    +78            .map(|&s| {
    +79                let diff = s.as_secs_f64() - mean.as_secs_f64();
    +80                diff * diff
    +81            })
    +82            .sum::<f64>()
    +83            / samples.len() as f64;
    +84
    +85        Some(Duration::from_secs_f64(variance.sqrt()))
    +86    }
    +87
    +88    /// Calculate average latency from recent samples.
    +89    #[cfg(test)]
    +90    fn avg_latency(&self) -> Option<Duration> {
    +91        let samples: Vec<Duration> = self.latency_samples.iter().filter_map(|&s| s).collect();
    +92
    +93        if samples.is_empty() {
    +94            return None;
    +95        }
    +96
    +97        Some(samples.iter().sum::<Duration>() / samples.len() as u32)
    +98    }
    +99
    +100    /// Path quality score (0.0 = worst, 1.0 = best).
    +101    /// Factors in packet loss and RTT variance.
    +102    fn quality_score(&self) -> f64 {
    +103        let packet_loss = self.packet_loss_rate();
    +104
    +105        // Defensive: packet_loss should never exceed 1.0, but clamp just in case
    +106        if packet_loss > 1.0 {
    +107            tracing::warn!(
    +108                packet_loss,
    +109                pings_sent = self.pings_sent,
    +110                pongs_received = self.pongs_received,
    +111                "packet loss rate exceeded 1.0 - possible bug in tracking"
    +112            );
    +113        }
    +114        let loss_penalty = (1.0 - packet_loss).clamp(0.0, 1.0);
    +115
    +116        // Penalize high RTT variance
    +117        let variance_penalty = match self.rtt_variance() {
    +118            Some(var) if var.as_millis() > 50 => 0.7,
    +119            Some(var) if var.as_millis() > 20 => 0.85,
    +120            Some(_) => 1.0,
    +121            None => 1.0,
    +122        };
    +123
    +124        loss_penalty * variance_penalty
    +125    }
    +126}
    +127
    +128#[derive(Debug)]
    +129pub(super) enum Source {
    +130    ReceivedPong,
    +131    QuicPayload,
    +132}
    +133
    +134impl Source {
    +135    fn trust_duration(&self) -> Duration {
    +136        match self {
    +137            Source::ReceivedPong => TRUST_UDP_ADDR_DURATION,
    +138            Source::QuicPayload => TRUST_UDP_ADDR_DURATION,
    +139        }
    +140    }
    +141}
    +142
    +143impl PathValidity {
    +144    pub(super) fn new(pong_at: Instant, latency: Duration) -> Self {
    +145        let mut metrics = CongestionMetrics::default();
    +146        // Account for the ping that must have been sent to receive this pong
    +147        metrics.record_ping_sent();
    +148        metrics.add_latency_sample(latency);
    +149        Self(Some(Inner {
    +150            trust_until: pong_at + Source::ReceivedPong.trust_duration(),
    +151            latest_pong: pong_at,
    +152            latency,
    +153            congestion_metrics: metrics,
    +154        }))
    +155    }
    +156
    +157    /// Update with a new pong, preserving congestion history.
    +158    pub(super) fn update_pong(&mut self, pong_at: Instant, latency: Duration) {
    +159        match &mut self.0 {
    +160            Some(inner) => {
    +161                inner.trust_until = pong_at + Source::ReceivedPong.trust_duration();
    +162                inner.latest_pong = pong_at;
    +163                inner.latency = latency;
    +164                inner.congestion_metrics.add_latency_sample(latency);
    +165            }
    +166            None => {
    +167                *self = Self::new(pong_at, latency);
    +168            }
    +169        }
    +170    }
    +171
    +172    pub(super) fn empty() -> Self {
    +173        Self(None)
    +174    }
    +175
    +176    pub(super) fn is_empty(&self) -> bool {
    +177        self.0.is_none()
    +178    }
    +179
    +180    pub(super) fn is_valid(&self, now: Instant) -> bool {
    +181        let Some(state) = self.0.as_ref() else {
    +182            return false;
    +183        };
    +184
    +185        state.is_valid(now)
    +186    }
    +187
    +188    pub(super) fn latency_if_valid(&self, now: Instant) -> Option<Duration> {
    +189        let state = self.0.as_ref()?;
    +190        state.is_valid(now).then_some(state.latency)
    +191    }
    +192
    +193    pub(super) fn is_outdated(&self, now: Instant) -> bool {
    +194        let Some(state) = self.0.as_ref() else {
    +195            return false;
    +196        };
    +197
    +198        // We *used* to be valid, but are now outdated.
    +199        // This happens when we had a DISCO pong but didn't receive
    +200        // any payload data or further pongs for at least TRUST_UDP_ADDR_DURATION
    +201        state.is_outdated(now)
    +202    }
    +203
    +204    pub(super) fn latency_if_outdated(&self, now: Instant) -> Option<Duration> {
    +205        let state = self.0.as_ref()?;
    +206        state.is_outdated(now).then_some(state.latency)
    +207    }
    +208
    +209    /// Reconfirms path validity, if a payload was received while the
    +210    /// path was valid.
    +211    pub(super) fn receive_payload(&mut self, now: Instant, source: Source) {
    +212        let Some(state) = self.0.as_mut() else {
    +213            return;
    +214        };
    +215
    +216        if state.is_valid(now) {
    +217            state.trust_until = now + source.trust_duration();
    +218        }
    +219    }
    +220
    +221    pub(super) fn latency(&self) -> Option<Duration> {
    +222        Some(self.0.as_ref()?.latency)
    +223    }
    +224
    +225    pub(super) fn latest_pong(&self) -> Option<Instant> {
    +226        Some(self.0.as_ref()?.latest_pong)
    +227    }
    +228
    +229    /// Record that a ping was sent on this path.
    +230    pub(super) fn record_ping_sent(&mut self) {
    +231        if let Some(state) = self.0.as_mut() {
    +232            state.congestion_metrics.record_ping_sent();
    +233        }
    +234    }
    +235
    +236    /// Get the path quality score (0.0 = worst, 1.0 = best).
    +237    #[cfg(test)]
    +238    pub(super) fn quality_score(&self) -> f64 {
    +239        self.0
    +240            .as_ref()
    +241            .map(|state| state.congestion_metrics.quality_score())
    +242            .unwrap_or(0.0)
    +243    }
    +244
    +245    /// Get packet loss rate for this path.
    +246    #[cfg(test)]
    +247    pub(super) fn packet_loss_rate(&self) -> f64 {
    +248        self.0
    +249            .as_ref()
    +250            .map(|state| state.congestion_metrics.packet_loss_rate())
    +251            .unwrap_or(0.0)
    +252    }
    +253
    +254    /// Get RTT variance as congestion indicator.
    +255    #[cfg(test)]
    +256    pub(super) fn rtt_variance(&self) -> Option<Duration> {
    +257        self.0
    +258            .as_ref()
    +259            .and_then(|state| state.congestion_metrics.rtt_variance())
    +260    }
    +261
    +262    /// Get average latency from recent samples.
    +263    #[cfg(test)]
    +264    pub(super) fn avg_latency(&self) -> Option<Duration> {
    +265        self.0
    +266            .as_ref()
    +267            .and_then(|state| state.congestion_metrics.avg_latency())
    +268    }
    +269
    +270    /// Record congestion metrics to the metrics system.
    +271    /// Should be called periodically or on significant events.
    +272    pub(super) fn record_metrics(&self, metrics: &MagicsockMetrics) {
    +273        let Some(state) = self.0.as_ref() else {
    +274            return;
    +275        };
    +276
    +277        let loss_rate = state.congestion_metrics.packet_loss_rate();
    +278        metrics.path_packet_loss_rate.observe(loss_rate);
    +279
    +280        if let Some(variance) = state.congestion_metrics.rtt_variance() {
    +281            metrics
    +282                .path_rtt_variance_ms
    +283                .observe(variance.as_millis() as f64);
    +284        }
    +285
    +286        let quality = state.congestion_metrics.quality_score();
    +287        metrics.path_quality_score.observe(quality);
    +288    }
    +289}
    +290
    +291impl Inner {
    +292    fn is_valid(&self, now: Instant) -> bool {
    +293        self.latest_pong <= now && now < self.trust_until
    +294    }
    +295
    +296    fn is_outdated(&self, now: Instant) -> bool {
    +297        self.latest_pong <= now && self.trust_until <= now
    +298    }
    +299}
    +300
    +301#[cfg(test)]
    +302mod tests {
    +303    use n0_future::time::{Duration, Instant};
    +304
    +305    use super::{PathValidity, Source, TRUST_UDP_ADDR_DURATION};
    +306
    +307    #[tokio::test(start_paused = true)]
    +308    async fn test_basic_path_validity_lifetime() {
    +309        let mut validity = PathValidity(None);
    +310        assert!(!validity.is_valid(Instant::now()));
    +311        assert!(!validity.is_outdated(Instant::now()));
    +312
    +313        validity = PathValidity::new(Instant::now(), Duration::from_millis(20));
    +314        assert!(validity.is_valid(Instant::now()));
    +315        assert!(!validity.is_outdated(Instant::now()));
    +316
    +317        tokio::time::advance(TRUST_UDP_ADDR_DURATION / 2).await;
    +318        assert!(validity.is_valid(Instant::now()));
    +319        assert!(!validity.is_outdated(Instant::now()));
    +320
    +321        validity.receive_payload(Instant::now(), Source::QuicPayload);
    +322        assert!(validity.is_valid(Instant::now()));
    +323        assert!(!validity.is_outdated(Instant::now()));
    +324
    +325        tokio::time::advance(TRUST_UDP_ADDR_DURATION / 2).await;
    +326        assert!(validity.is_valid(Instant::now()));
    +327        assert!(!validity.is_outdated(Instant::now()));
    +328
    +329        tokio::time::advance(TRUST_UDP_ADDR_DURATION / 2).await;
    +330        assert!(!validity.is_valid(Instant::now()));
    +331        assert!(validity.is_outdated(Instant::now()));
    +332    }
    +333    #[tokio::test]
    +334    async fn test_congestion_metrics() {
    +335        let mut validity = PathValidity::new(Instant::now(), Duration::from_millis(10));
    +336        // new() initializes with pings_sent=1, pongs_received=1
    +337
    +338        // Record some additional ping sends
    +339        validity.record_ping_sent();
    +340        validity.record_ping_sent();
    +341        validity.record_ping_sent();
    +342        // Now: pings_sent=4, pongs_received=1
    +343
    +344        validity.update_pong(Instant::now(), Duration::from_millis(15));
    +345        // Now: pings_sent=4, pongs_received=2
    +346
    +347        // Packet loss should be (4-2)/4 = 0.5
    +348        let loss_rate = validity.packet_loss_rate();
    +349        assert!((loss_rate - 0.5).abs() < 0.01);
    +350
    +351        // Quality score should be reduced due to packet loss
    +352        let quality = validity.quality_score();
    +353        assert!(quality < 1.0);
    +354        assert!(quality > 0.45); // Should still be relatively good (1.0 - 0.5 = 0.5)
    +355    }
    +356
    +357    #[tokio::test]
    +358    async fn test_congestion_rtt_variance() {
    +359        let mut validity = PathValidity::new(Instant::now(), Duration::from_millis(10));
    +360
    +361        // Add varying latencies
    +362        validity.update_pong(Instant::now(), Duration::from_millis(10));
    +363        validity.update_pong(Instant::now(), Duration::from_millis(50));
    +364        validity.update_pong(Instant::now(), Duration::from_millis(20));
    +365        validity.update_pong(Instant::now(), Duration::from_millis(40));
    +366
    +367        // Should have variance
    +368        let variance = validity.rtt_variance();
    +369        assert!(variance.is_some());
    +370        assert!(variance.unwrap().as_millis() > 0);
    +371
    +372        // Average latency should be around 30ms
    +373        let avg = validity.avg_latency();
    +374        assert!(avg.is_some());
    +375        let avg_ms = avg.unwrap().as_millis();
    +376        assert!((25..=35).contains(&avg_ms));
    +377    }
    +378
    +379    #[tokio::test]
    +380    async fn test_quality_score_with_high_variance() {
    +381        let mut validity = PathValidity::new(Instant::now(), Duration::from_millis(10));
    +382
    +383        // Add highly varying latencies (simulating congestion)
    +384        for i in 0..8 {
    +385            let latency = if i % 2 == 0 {
    +386                Duration::from_millis(10)
    +387            } else {
    +388                Duration::from_millis(100)
    +389            };
    +390            validity.update_pong(Instant::now(), latency);
    +391            validity.record_ping_sent();
    +392        }
    +393
    +394        // Quality should be penalized due to high variance
    +395        let quality = validity.quality_score();
    +396        assert!(quality < 0.9); // Should be penalized
    +397    }
    +398}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/node_map/udp_paths.rs.html b/pr/3367/docs/src/iroh/magicsock/node_map/udp_paths.rs.html index 87b8369e67..7b97f650ed 100644 --- a/pr/3367/docs/src/iroh/magicsock/node_map/udp_paths.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/node_map/udp_paths.rs.html @@ -1,4 +1,4 @@ -udp_paths.rs - source

    iroh/magicsock/node_map/
    udp_paths.rs

    1//! Path state for UDP addresses of a single peer node.
    +udp_paths.rs - source

    iroh/magicsock/node_map/
    udp_paths.rs

    1//! Path state for UDP addresses of a single peer node.
     2//!
     3//! This started as simply moving the [`NodeState`]'s `direct_addresses` and `best_addr`
     4//! into one place together.  The aim is for external places to not directly interact with
    @@ -7,174 +7,243 @@
     7//! [`NodeState`]: super::node_state::NodeState
     8use std::{collections::BTreeMap, net::SocketAddr};
     9
    -10use n0_future::time::{Duration, Instant};
    -11use rand::seq::IteratorRandom;
    -12use tracing::warn;
    -13
    -14use super::{
    -15    best_addr::{self, BestAddr},
    -16    node_state::PongReply,
    -17    path_state::PathState,
    -18    IpPort,
    -19};
    -20use crate::disco::SendAddr;
    -21
    -22/// The address on which to send datagrams over UDP.
    +10use n0_future::time::Instant;
    +11use tracing::{Level, event};
    +12
    +13use super::{IpPort, path_state::PathState};
    +14
    +15/// The address on which to send datagrams over UDP.
    +16///
    +17/// The [`MagicSock`] sends packets to zero or one UDP address, depending on the known paths
    +18/// to the remote node.  This conveys the UDP address to send on from the [`NodeUdpPaths`]
    +19/// to the [`NodeState`].
    +20///
    +21/// [`NodeUdpPaths`] contains all the UDP path states, while [`NodeState`] has to decide the
    +22/// bigger picture including the relay server.
     23///
    -24/// The [`MagicSock`] sends packets to zero or one UDP address, depending on the known paths
    -25/// to the remote node.  This conveys the UDP address to send on from the [`NodeUdpPaths`]
    -26/// to the [`NodeState`].
    -27///
    -28/// [`NodeUdpPaths`] contains all the UDP path states, while [`NodeState`] has to decide the
    -29/// bigger picture including the relay server.
    -30///
    -31/// See [`NodeUdpPaths::send_addr`].
    -32///
    -33/// [`MagicSock`]: crate::magicsock::MagicSock
    -34/// [`NodeState`]: super::node_state::NodeState
    -35#[derive(Debug)]
    -36pub(super) enum UdpSendAddr {
    -37    /// The UDP address can be relied on to deliver data to the remote node.
    -38    ///
    -39    /// This means this path is usable with a reasonable latency and can be fully trusted to
    -40    /// transport payload data to the remote node.
    -41    Valid(SocketAddr),
    -42    /// The UDP address is highly likely to work, but has not been used for a while.
    -43    ///
    -44    /// The path should be usable but has not carried DISCO or payload data for a little too
    -45    /// long.  It is best to also use a backup, i.e. relay, path if possible.
    -46    Outdated(SocketAddr),
    -47    /// The UDP address is not known to work, but it might.
    -48    ///
    -49    /// We know this UDP address belongs to the remote node, but we do not know if the path
    -50    /// already works or may need holepunching before it will start to work.  It might even
    -51    /// never work.  It is still useful to send to this together with backup path,
    -52    /// i.e. relay, in case the path works: if the path does not need holepunching it might
    -53    /// be much faster.  And if there is no relay path at all it might be the only way to
    -54    /// establish a connection.
    -55    Unconfirmed(SocketAddr),
    -56    /// No known UDP path exists to the remote node.
    -57    None,
    -58}
    -59
    -60/// The UDP paths for a single node.
    -61///
    -62/// Paths are identified by the [`IpPort`] of their UDP address.
    -63///
    -64/// Initially this collects two structs directly from the [`NodeState`] into one place,
    -65/// leaving the APIs and astractions the same.  The goal is that this slowly migrates
    -66/// directly interacting with this data into only receiving [`PathState`] updates.  This
    -67/// will consolidate the logic of direct path selection and make this simpler to reason
    -68/// about.  However doing that all at once is too large a refactor.
    -69///
    -70/// [`NodeState`]: super::node_state::NodeState
    -71#[derive(Debug, Default)]
    -72pub(super) struct NodeUdpPaths {
    -73    /// The state for each of this node's direct paths.
    -74    pub(super) paths: BTreeMap<IpPort, PathState>,
    -75    /// Best UDP path currently selected.
    -76    pub(super) best_addr: BestAddr,
    -77    /// If we had to choose a path because we had no `best_addr` it is stored here.
    -78    chosen_candidate: Option<IpPort>,
    -79}
    -80
    -81impl NodeUdpPaths {
    -82    pub(super) fn new() -> Self {
    -83        Default::default()
    -84    }
    -85
    -86    #[cfg(test)]
    -87    pub(super) fn from_parts(paths: BTreeMap<IpPort, PathState>, best_addr: BestAddr) -> Self {
    -88        Self {
    -89            paths,
    -90            best_addr,
    -91            chosen_candidate: None,
    -92        }
    -93    }
    +24/// See [`NodeUdpPaths::send_addr`].
    +25///
    +26/// [`MagicSock`]: crate::magicsock::MagicSock
    +27/// [`NodeState`]: super::node_state::NodeState
    +28#[derive(Debug, Default, Clone, Copy, Eq, PartialEq)]
    +29pub(super) enum UdpSendAddr {
    +30    /// The UDP address can be relied on to deliver data to the remote node.
    +31    ///
    +32    /// This means this path is usable with a reasonable latency and can be fully trusted to
    +33    /// transport payload data to the remote node.
    +34    Valid(SocketAddr),
    +35    /// The UDP address is highly likely to work, but has not been used for a while.
    +36    ///
    +37    /// The path should be usable but has not carried DISCO or payload data for a little too
    +38    /// long.  It is best to also use a backup, i.e. relay, path if possible.
    +39    Outdated(SocketAddr),
    +40    /// The UDP address is not known to work, but it might.
    +41    ///
    +42    /// We know this UDP address belongs to the remote node, but we do not know if the path
    +43    /// already works or may need holepunching before it will start to work.  It might even
    +44    /// never work.  It is still useful to send to this together with backup path,
    +45    /// i.e. relay, in case the path works: if the path does not need holepunching it might
    +46    /// be much faster.  And if there is no relay path at all it might be the only way to
    +47    /// establish a connection.
    +48    Unconfirmed(SocketAddr),
    +49    /// No known UDP path exists to the remote node.
    +50    #[default]
    +51    None,
    +52}
    +53
    +54impl UdpSendAddr {
    +55    pub fn get_addr(&self) -> Option<SocketAddr> {
    +56        match self {
    +57            UdpSendAddr::Valid(addr)
    +58            | UdpSendAddr::Outdated(addr)
    +59            | UdpSendAddr::Unconfirmed(addr) => Some(*addr),
    +60            UdpSendAddr::None => None,
    +61        }
    +62    }
    +63}
    +64
    +65/// The UDP paths for a single node.
    +66///
    +67/// Paths are identified by the [`IpPort`] of their UDP address.
    +68///
    +69/// Initially this collects two structs directly from the [`NodeState`] into one place,
    +70/// leaving the APIs and astractions the same.  The goal is that this slowly migrates
    +71/// directly interacting with this data into only receiving [`PathState`] updates.  This
    +72/// will consolidate the logic of direct path selection and make this simpler to reason
    +73/// about.  However doing that all at once is too large a refactor.
    +74///
    +75/// [`NodeState`]: super::node_state::NodeState
    +76#[derive(Debug, Default)]
    +77pub(super) struct NodeUdpPaths {
    +78    /// The state for each of this node's direct paths.
    +79    paths: BTreeMap<IpPort, PathState>,
    +80    /// The current address we use to send on.
    +81    ///
    +82    /// This is *almost* the same as going through `paths` and finding
    +83    /// the best one, except that this is
    +84    /// 1. Not updated in `send_addr`, but instead when there's changes to `paths`, so that `send_addr` can take `&self`.
    +85    /// 2. Slightly sticky: It only changes when
    +86    ///   - the current send addr is not a validated path anymore or
    +87    ///   - we received a pong with lower latency.
    +88    best: UdpSendAddr,
    +89    /// The current best address to send on from all IPv4 addresses we have available.
    +90    ///
    +91    /// Follows the same logic as `best` above, but doesn't include any IPv6 addresses.
    +92    best_ipv4: UdpSendAddr,
    +93}
     94
    -95    /// Returns the current UDP address to send on.
    -96    ///
    -97    /// TODO: The goal here is for this to simply return the already known send address, so
    -98    /// it should be `&self` and not `&mut self`.  This is only possible once the state from
    -99    /// [`NodeUdpPaths`] is no longer modified from outside.
    -100    pub(super) fn send_addr(&mut self, now: Instant, have_ipv6: bool) -> UdpSendAddr {
    -101        self.assign_best_addr_from_candidates_if_empty();
    -102        match self.best_addr.state(now) {
    -103            best_addr::State::Valid(addr) => UdpSendAddr::Valid(addr.addr),
    -104            best_addr::State::Outdated(addr) => UdpSendAddr::Outdated(addr.addr),
    -105            best_addr::State::Empty => {
    -106                // No direct connection has been used before.  If we know of any possible
    -107                // candidate addresses, randomly try to use one.  This path is most
    -108                // effective when folks use a NodeAddr with exactly one direct address which
    -109                // they know to work, effectively like using a traditional socket or QUIC
    -110                // endpoint.
    -111                let addr = self
    -112                    .chosen_candidate
    -113                    .and_then(|ipp| self.paths.get(&ipp))
    -114                    .and_then(|path| path.udp_addr())
    -115                    .filter(|addr| addr.is_ipv4() || have_ipv6)
    -116                    .or_else(|| {
    -117                        // Look for a new candidate in all the known paths.  This may look
    -118                        // like a RNG use on the hot-path but this is normally invoked at
    -119                        // most most once at startup.
    -120                        let addr = self
    -121                            .paths
    -122                            .values()
    -123                            .filter_map(|path| path.udp_addr())
    -124                            .filter(|addr| addr.is_ipv4() || have_ipv6)
    -125                            .choose(&mut rand::thread_rng());
    -126                        self.chosen_candidate = addr.map(IpPort::from);
    -127                        addr
    -128                    });
    -129                match addr {
    -130                    Some(addr) => UdpSendAddr::Unconfirmed(addr),
    -131                    None => UdpSendAddr::None,
    -132                }
    -133            }
    -134        }
    -135    }
    -136
    -137    /// Fixup best_addr from candidates.
    -138    ///
    -139    /// If somehow we end up in a state where we failed to set a best_addr, while we do have
    -140    /// valid candidates, this will chose a candidate and set best_addr again.  Most likely
    -141    /// this is a bug elsewhere though.
    -142    fn assign_best_addr_from_candidates_if_empty(&mut self) {
    -143        if !self.best_addr.is_empty() {
    -144            return;
    -145        }
    -146
    -147        // The highest acceptable latency for an endpoint path.  If the latency is higher
    -148        // then this the path will be ignored.
    -149        const MAX_LATENCY: Duration = Duration::from_secs(60 * 60);
    -150        let best_pong = self.paths.iter().fold(None, |best_pong, (ipp, state)| {
    -151            let best_latency = best_pong
    -152                .map(|p: &PongReply| p.latency)
    -153                .unwrap_or(MAX_LATENCY);
    -154            match state.recent_pong {
    -155                // This pong is better if it has a lower latency, or if it has the same
    -156                // latency but on an IPv6 path.
    -157                Some(ref pong)
    -158                    if pong.latency < best_latency
    -159                        || (pong.latency == best_latency && ipp.ip().is_ipv6()) =>
    -160                {
    -161                    Some(pong)
    -162                }
    -163                _ => best_pong,
    -164            }
    -165        });
    -166
    -167        // If we found a candidate, set to best addr
    -168        if let Some(pong) = best_pong {
    -169            if let SendAddr::Udp(addr) = pong.from {
    -170                warn!(%addr, "No best_addr was set, choose candidate with lowest latency");
    -171                self.best_addr.insert_if_better_or_reconfirm(
    -172                    addr,
    -173                    pong.latency,
    -174                    best_addr::Source::BestCandidate,
    -175                    pong.pong_at,
    -176                )
    -177            }
    -178        }
    -179    }
    -180}
    \ No newline at end of file +95pub(super) struct MutAccess<'a> { +96 now: Instant, +97 inner: &'a mut NodeUdpPaths, +98} +99 +100impl<'a> MutAccess<'a> { +101 pub fn paths(&mut self) -> &mut BTreeMap<IpPort, PathState> { +102 &mut self.inner.paths +103 } +104 +105 pub fn has_best_addr_changed(self) -> bool { +106 let changed = self.inner.update_to_best_addr(self.now); +107 std::mem::forget(self); // don't run drop +108 changed +109 } +110} +111 +112impl Drop for MutAccess<'_> { +113 fn drop(&mut self) { +114 self.inner.update_to_best_addr(self.now); +115 } +116} +117 +118impl NodeUdpPaths { +119 pub(super) fn new() -> Self { +120 Default::default() +121 } +122 +123 #[cfg(test)] +124 pub(super) fn from_parts(paths: BTreeMap<IpPort, PathState>, best: UdpSendAddr) -> Self { +125 Self { +126 paths, +127 best_ipv4: best, // we only use ipv4 addrs in tests +128 best, +129 } +130 } +131 +132 /// Returns the current UDP address to send on. +133 pub(super) fn send_addr(&self, have_ipv6: bool) -> &UdpSendAddr { +134 if !have_ipv6 { +135 // If it's a valid address, it doesn't matter if our interface scan determined that we +136 // "probably" don't have IPv6, because we clearly were able to send and receive a ping/pong over IPv6. +137 if matches!(&self.best, UdpSendAddr::Valid(_)) { +138 return &self.best; +139 } +140 return &self.best_ipv4; +141 } +142 &self.best +143 } +144 +145 /// Returns a guard for accessing the inner paths mutably. +146 /// +147 /// This guard ensures that [`Self::send_addr`] will be updated on drop. +148 pub(super) fn access_mut(&mut self, now: Instant) -> MutAccess<'_> { +149 MutAccess { now, inner: self } +150 } +151 +152 /// Returns immutable access to the inner paths. +153 pub(super) fn paths(&self) -> &BTreeMap<IpPort, PathState> { +154 &self.paths +155 } +156 +157 /// Changes the current best address(es) to ones chosen as described in [`Self::best_addr`] docs. +158 /// +159 /// Returns whether one of the best addresses had to change. +160 /// +161 /// This should be called any time that `paths` is modified. +162 fn update_to_best_addr(&mut self, now: Instant) -> bool { +163 let best_ipv4 = self.best_addr(false, now); +164 let best = self.best_addr(true, now); +165 let mut changed = false; +166 if best_ipv4 != self.best_ipv4 { +167 event!( +168 target: "iroh::_events::udp::best_ipv4", +169 Level::DEBUG, +170 ?best_ipv4, +171 ); +172 changed = true; +173 } +174 if best != self.best { +175 event!( +176 target: "iroh::_events::udp::best", +177 Level::DEBUG, +178 ?best, +179 ); +180 changed = true; +181 } +182 self.best_ipv4 = best_ipv4; +183 self.best = best; +184 changed +185 } +186 +187 /// Returns the current best address of all available paths, ignoring +188 /// the currently chosen best address. +189 /// +190 /// We try to find the lowest latency [`UdpSendAddr::Valid`], if one exists, otherwise +191 /// we try to find the lowest latency [`UdpSendAddr::Outdated`], if one exists, otherwise +192 /// we return essentially an arbitrary [`UdpSendAddr::Unconfirmed`]. +193 /// +194 /// If we don't have any addresses, returns [`UdpSendAddr::None`]. +195 /// +196 /// If `have_ipv6` is false, we only search among ipv4 candidates. +197 fn best_addr(&self, have_ipv6: bool, now: Instant) -> UdpSendAddr { +198 let Some((ipp, path)) = self +199 .paths +200 .iter() +201 .filter(|(ipp, _)| have_ipv6 || ipp.ip.is_ipv4()) +202 .max_by_key(|(ipp, path)| { +203 // We find the best by sorting on a key of type (Option<ReverseOrd<Duration>>, Option<ReverseOrd<Duration>>, bool) +204 // where the first is set to Some(ReverseOrd(latency)) iff path.is_valid(now) and +205 // the second is set to Some(ReverseOrd(latency)) if path.is_outdated(now) and +206 // the third is set to whether the ipp is ipv6. +207 // This makes max_by_key sort for the lowest valid latency first, then sort for +208 // the lowest outdated latency second, and if latencies are equal, it'll sort IPv6 paths first. +209 let is_ipv6 = ipp.ip.is_ipv6(); +210 if let Some(latency) = path.validity.latency_if_valid(now) { +211 (Some(ReverseOrd(latency)), None, is_ipv6) +212 } else if let Some(latency) = path.validity.latency_if_outdated(now) { +213 (None, Some(ReverseOrd(latency)), is_ipv6) +214 } else { +215 (None, None, is_ipv6) +216 } +217 }) +218 else { +219 return UdpSendAddr::None; +220 }; +221 +222 if path.validity.is_valid(now) { +223 UdpSendAddr::Valid((*ipp).into()) +224 } else if path.validity.is_outdated(now) { +225 UdpSendAddr::Outdated((*ipp).into()) +226 } else { +227 UdpSendAddr::Unconfirmed((*ipp).into()) +228 } +229 } +230} +231 +232/// Implements the reverse [`Ord`] implementation for the wrapped type. +233/// +234/// Literally calls [`std::cmp::Ordering::reverse`] on the inner value's +235/// ordering. +236#[derive(PartialEq, Eq)] +237struct ReverseOrd<N: PartialOrd + Ord + PartialEq + Eq>(N); +238 +239impl<N: PartialOrd + Ord + PartialEq + Eq> Ord for ReverseOrd<N> { +240 fn cmp(&self, other: &Self) -> std::cmp::Ordering { +241 self.0.cmp(&other.0).reverse() +242 } +243} +244 +245impl<N: PartialOrd + Ord + PartialEq + Eq> PartialOrd for ReverseOrd<N> { +246 fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> { +247 Some(self.cmp(other)) +248 } +249}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/transports.rs.html b/pr/3367/docs/src/iroh/magicsock/transports.rs.html index e2c2dbd95e..8c3130d4aa 100644 --- a/pr/3367/docs/src/iroh/magicsock/transports.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/transports.rs.html @@ -1,8 +1,8 @@ -transports.rs - source

    iroh/magicsock/
    transports.rs

    1use std::{
    +transports.rs - source

    iroh/magicsock/
    transports.rs

    1use std::{
     2    io::{self, IoSliceMut},
     3    net::{IpAddr, Ipv6Addr, SocketAddr, SocketAddrV6},
     4    pin::Pin,
    -5    sync::{atomic::AtomicUsize, Arc},
    +5    sync::{Arc, atomic::AtomicUsize},
     6    task::{Context, Poll},
     7};
     8
    @@ -145,7 +145,7 @@
     145    /// For IP based transports this is the [`SocketAddr`] of the socket,
     146    /// for relay transports, this is the home relay.
     147    pub(crate) fn local_addrs(&self) -> Vec<Addr> {
    -148        self.local_addrs_watch().get().expect("not disconnected")
    +148        self.local_addrs_watch().get()
     149    }
     150
     151    /// Watch for all currently known local addresses.
    @@ -420,7 +420,7 @@
     420        match destination {
     421            #[cfg(wasm_browser)]
     422            Addr::Ip(..) => {
    -423                return Poll::Ready(Err(io::Error::other("IP is unsupported in browser")))
    +423                return Poll::Ready(Err(io::Error::other("IP is unsupported in browser")));
     424            }
     425            #[cfg(not(wasm_browser))]
     426            Addr::Ip(addr) => {
    @@ -448,7 +448,7 @@
     448    }
     449
     450    /// Best effort sending
    -451    fn inner_try_send(
    +451    pub(crate) fn inner_try_send(
     452        &self,
     453        destination: &Addr,
     454        src: Option<IpAddr>,
    @@ -498,7 +498,7 @@
     498        transmit: &quinn_udp::Transmit,
     499        cx: &mut Context,
     500    ) -> Poll<io::Result<()>> {
    -501        let active_paths = self.msock.prepare_send(transmit)?;
    +501        let active_paths = self.msock.prepare_send(&self, transmit)?;
     502
     503        if active_paths.is_empty() {
     504            // Returning Ok here means we let QUIC timeout.
    @@ -550,7 +550,7 @@
     550    }
     551
     552    fn try_send(self: Pin<&mut Self>, transmit: &quinn_udp::Transmit) -> io::Result<()> {
    -553        let active_paths = self.msock.prepare_send(transmit)?;
    +553        let active_paths = self.msock.prepare_send(&self, transmit)?;
     554        if active_paths.is_empty() {
     555            // Returning Ok here means we let QUIC timeout.
     556            // Returning an error would immediately fail a connection.
    diff --git a/pr/3367/docs/src/iroh/magicsock/transports/ip.rs.html b/pr/3367/docs/src/iroh/magicsock/transports/ip.rs.html
    index 8b9d231df9..d58cd6c07d 100644
    --- a/pr/3367/docs/src/iroh/magicsock/transports/ip.rs.html
    +++ b/pr/3367/docs/src/iroh/magicsock/transports/ip.rs.html
    @@ -1,4 +1,4 @@
    -ip.rs - source

    iroh/magicsock/transports/
    ip.rs

    1use std::{
    +ip.rs - source

    iroh/magicsock/transports/
    ip.rs

    1use std::{
     2    io,
     3    net::{IpAddr, SocketAddr},
     4    pin::Pin,
    @@ -129,119 +129,134 @@
     129}
     130
     131impl IpSender {
    -132    pub(super) fn is_valid_send_addr(&self, addr: &SocketAddr) -> bool {
    -133        #[allow(clippy::match_like_matches_macro)]
    -134        match (self.bind_addr, addr) {
    -135            (SocketAddr::V4(_), SocketAddr::V4(..)) => true,
    -136            (SocketAddr::V6(_), SocketAddr::V6(..)) => true,
    -137            _ => false,
    -138        }
    -139    }
    -140
    -141    pub(super) async fn send(
    -142        &self,
    -143        destination: SocketAddr,
    -144        src: Option<IpAddr>,
    -145        transmit: &Transmit<'_>,
    -146    ) -> io::Result<()> {
    -147        trace!("sending to {}", destination);
    -148        let total_bytes = transmit.contents.len() as u64;
    -149        let res = self
    -150            .sender
    -151            .send(&quinn_udp::Transmit {
    -152                destination,
    -153                ecn: transmit.ecn,
    -154                contents: transmit.contents,
    -155                segment_size: transmit.segment_size,
    -156                src_ip: src,
    -157            })
    -158            .await;
    -159        trace!("send res: {:?}", res);
    -160
    -161        match res {
    -162            Ok(res) => {
    -163                match destination {
    -164                    SocketAddr::V4(_) => {
    -165                        self.metrics.send_ipv4.inc_by(total_bytes);
    -166                    }
    -167                    SocketAddr::V6(_) => {
    -168                        self.metrics.send_ipv6.inc_by(total_bytes);
    -169                    }
    -170                }
    -171                Ok(res)
    -172            }
    -173            Err(err) => Err(err),
    -174        }
    -175    }
    -176
    -177    pub(super) fn poll_send(
    -178        mut self: Pin<&mut Self>,
    -179        cx: &mut std::task::Context,
    -180        destination: SocketAddr,
    -181        src: Option<IpAddr>,
    -182        transmit: &Transmit<'_>,
    -183    ) -> Poll<io::Result<()>> {
    -184        trace!("sending to {}", destination);
    -185        let total_bytes = transmit.contents.len() as u64;
    -186        let res = Pin::new(&mut self.sender).poll_send(
    -187            &quinn_udp::Transmit {
    -188                destination,
    -189                ecn: transmit.ecn,
    -190                contents: transmit.contents,
    -191                segment_size: transmit.segment_size,
    -192                src_ip: src,
    -193            },
    -194            cx,
    -195        );
    -196        trace!("send res: {:?}", res);
    -197
    -198        match res {
    -199            Poll::Ready(Ok(res)) => {
    -200                match destination {
    -201                    SocketAddr::V4(_) => {
    -202                        self.metrics.send_ipv4.inc_by(total_bytes);
    -203                    }
    -204                    SocketAddr::V6(_) => {
    -205                        self.metrics.send_ipv6.inc_by(total_bytes);
    -206                    }
    -207                }
    -208                Poll::Ready(Ok(res))
    -209            }
    -210            Poll::Ready(Err(err)) => Poll::Ready(Err(err)),
    -211            Poll::Pending => Poll::Pending,
    -212        }
    -213    }
    -214
    -215    pub(super) fn try_send(
    -216        &self,
    -217        destination: SocketAddr,
    -218        src: Option<IpAddr>,
    -219        transmit: &Transmit<'_>,
    -220    ) -> io::Result<()> {
    -221        trace!("sending to {}", destination);
    -222        let total_bytes = transmit.contents.len() as u64;
    -223        let res = self.sender.try_send(&quinn_udp::Transmit {
    -224            destination,
    -225            ecn: transmit.ecn,
    -226            contents: transmit.contents,
    -227            segment_size: transmit.segment_size,
    -228            src_ip: src,
    -229        });
    -230        trace!("send res: {:?}", res);
    -231
    -232        match res {
    -233            Ok(res) => {
    -234                match destination {
    -235                    SocketAddr::V4(_) => {
    -236                        self.metrics.send_ipv4.inc_by(total_bytes);
    -237                    }
    -238                    SocketAddr::V6(_) => {
    -239                        self.metrics.send_ipv6.inc_by(total_bytes);
    -240                    }
    -241                }
    -242                Ok(res)
    -243            }
    -244            Err(err) => Err(err),
    -245        }
    -246    }
    -247}
    \ No newline at end of file +132 pub(super) fn is_valid_send_addr(&self, dst: &SocketAddr) -> bool { +133 // Our net-tools crate binds sockets to their specific family. This means an IPv6 +134 // socket can not sent to IPv4, on any platform. So we need to convert and +135 // IPv4-mapped IPv6 address back to it's canonical IPv4 address. +136 let dst_ip = dst.ip().to_canonical(); +137 +138 #[allow(clippy::match_like_matches_macro)] +139 match (self.bind_addr.ip(), dst_ip) { +140 (IpAddr::V4(_), IpAddr::V4(_)) => true, +141 (IpAddr::V6(_), IpAddr::V6(_)) => true, +142 _ => false, +143 } +144 } +145 +146 pub(super) async fn send( +147 &self, +148 destination: SocketAddr, +149 src: Option<IpAddr>, +150 transmit: &Transmit<'_>, +151 ) -> io::Result<()> { +152 trace!("sending to {}", destination); +153 let total_bytes = transmit.contents.len() as u64; +154 let res = self +155 .sender +156 .send(&quinn_udp::Transmit { +157 destination: Self::canonical_addr(destination), +158 ecn: transmit.ecn, +159 contents: transmit.contents, +160 segment_size: transmit.segment_size, +161 src_ip: src, +162 }) +163 .await; +164 trace!("send res: {:?}", res); +165 +166 match res { +167 Ok(res) => { +168 match destination { +169 SocketAddr::V4(_) => { +170 self.metrics.send_ipv4.inc_by(total_bytes); +171 } +172 SocketAddr::V6(_) => { +173 self.metrics.send_ipv6.inc_by(total_bytes); +174 } +175 } +176 Ok(res) +177 } +178 Err(err) => Err(err), +179 } +180 } +181 +182 /// Creates a canonical socket address. +183 /// +184 /// We may be asked to send IPv4-mapped IPv6 addresses. But our sockets are configured +185 /// to only send their actual family. So we need to map those back to the canonical +186 /// addresses. +187 #[inline] +188 fn canonical_addr(addr: SocketAddr) -> SocketAddr { +189 SocketAddr::new(addr.ip().to_canonical(), addr.port()) +190 } +191 +192 pub(super) fn poll_send( +193 mut self: Pin<&mut Self>, +194 cx: &mut std::task::Context, +195 destination: SocketAddr, +196 src: Option<IpAddr>, +197 transmit: &Transmit<'_>, +198 ) -> Poll<io::Result<()>> { +199 trace!("sending to {}", destination); +200 let total_bytes = transmit.contents.len() as u64; +201 let res = Pin::new(&mut self.sender).poll_send( +202 &quinn_udp::Transmit { +203 destination: Self::canonical_addr(destination), +204 ecn: transmit.ecn, +205 contents: transmit.contents, +206 segment_size: transmit.segment_size, +207 src_ip: src, +208 }, +209 cx, +210 ); +211 trace!("send res: {:?}", res); +212 +213 match res { +214 Poll::Ready(Ok(res)) => { +215 match destination { +216 SocketAddr::V4(_) => { +217 self.metrics.send_ipv4.inc_by(total_bytes); +218 } +219 SocketAddr::V6(_) => { +220 self.metrics.send_ipv6.inc_by(total_bytes); +221 } +222 } +223 Poll::Ready(Ok(res)) +224 } +225 Poll::Ready(Err(err)) => Poll::Ready(Err(err)), +226 Poll::Pending => Poll::Pending, +227 } +228 } +229 +230 pub(super) fn try_send( +231 &self, +232 destination: SocketAddr, +233 src: Option<IpAddr>, +234 transmit: &Transmit<'_>, +235 ) -> io::Result<()> { +236 trace!("sending to {}", destination); +237 let total_bytes = transmit.contents.len() as u64; +238 let res = self.sender.try_send(&quinn_udp::Transmit { +239 destination, +240 ecn: transmit.ecn, +241 contents: transmit.contents, +242 segment_size: transmit.segment_size, +243 src_ip: src, +244 }); +245 trace!("send res: {:?}", res); +246 +247 match res { +248 Ok(res) => { +249 match destination { +250 SocketAddr::V4(_) => { +251 self.metrics.send_ipv4.inc_by(total_bytes); +252 } +253 SocketAddr::V6(_) => { +254 self.metrics.send_ipv6.inc_by(total_bytes); +255 } +256 } +257 Ok(res) +258 } +259 Err(err) => Err(err), +260 } +261 } +262}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/transports/relay.rs.html b/pr/3367/docs/src/iroh/magicsock/transports/relay.rs.html index 9d50ab24b4..cb511392eb 100644 --- a/pr/3367/docs/src/iroh/magicsock/transports/relay.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/transports/relay.rs.html @@ -1,22 +1,22 @@ -relay.rs - source

    iroh/magicsock/transports/
    relay.rs

    1use std::{
    +relay.rs - source

    iroh/magicsock/transports/
    relay.rs

    1use std::{
     2    io,
    -3    task::{Context, Poll},
    -4};
    -5
    -6use bytes::Bytes;
    -7use iroh_base::{NodeId, RelayUrl};
    -8use n0_future::{
    -9    ready,
    -10    task::{self, AbortOnDropHandle},
    -11};
    -12use n0_watcher::{Watchable, Watcher as _};
    -13use smallvec::SmallVec;
    -14use tokio::sync::mpsc;
    -15use tokio_util::sync::PollSender;
    -16use tracing::{error, info_span, trace, warn, Instrument};
    -17
    -18use super::{Addr, Transmit};
    -19use crate::magicsock::RelayContents;
    +3    num::NonZeroU16,
    +4    task::{Context, Poll},
    +5};
    +6
    +7use bytes::Bytes;
    +8use iroh_base::{NodeId, RelayUrl};
    +9use iroh_relay::protos::relay::Datagrams;
    +10use n0_future::{
    +11    ready,
    +12    task::{self, AbortOnDropHandle},
    +13};
    +14use n0_watcher::{Watchable, Watcher as _};
    +15use tokio::sync::mpsc;
    +16use tokio_util::sync::PollSender;
    +17use tracing::{Instrument, error, info_span, trace, warn};
    +18
    +19use super::{Addr, Transmit};
     20
     21mod actor;
     22
    @@ -29,397 +29,419 @@
     29    relay_datagram_recv_queue: mpsc::Receiver<RelayRecvDatagram>,
     30    /// Channel on which to send datagrams via a relay server.
     31    relay_datagram_send_channel: mpsc::Sender<RelaySendItem>,
    -32    actor_sender: mpsc::Sender<RelayActorMessage>,
    -33    _actor_handle: AbortOnDropHandle<()>,
    -34    my_relay: Watchable<Option<RelayUrl>>,
    -35    my_node_id: NodeId,
    -36}
    -37
    -38impl RelayTransport {
    -39    pub(crate) fn new(config: RelayActorConfig) -> Self {
    -40        let (relay_datagram_send_tx, relay_datagram_send_rx) = mpsc::channel(256);
    -41
    -42        let (relay_datagram_recv_tx, relay_datagram_recv_rx) = mpsc::channel(512);
    +32    /// A datagram from the last poll_recv that didn't quite fit our buffers.
    +33    pending_item: Option<RelayRecvDatagram>,
    +34    actor_sender: mpsc::Sender<RelayActorMessage>,
    +35    _actor_handle: AbortOnDropHandle<()>,
    +36    my_relay: Watchable<Option<RelayUrl>>,
    +37    my_node_id: NodeId,
    +38}
    +39
    +40impl RelayTransport {
    +41    pub(crate) fn new(config: RelayActorConfig) -> Self {
    +42        let (relay_datagram_send_tx, relay_datagram_send_rx) = mpsc::channel(256);
     43
    -44        let (actor_sender, actor_receiver) = mpsc::channel(256);
    +44        let (relay_datagram_recv_tx, relay_datagram_recv_rx) = mpsc::channel(512);
     45
    -46        let my_node_id = config.secret_key.public();
    -47        let my_relay = config.my_relay.clone();
    -48
    -49        let relay_actor = RelayActor::new(config, relay_datagram_recv_tx);
    +46        let (actor_sender, actor_receiver) = mpsc::channel(256);
    +47
    +48        let my_node_id = config.secret_key.public();
    +49        let my_relay = config.my_relay.clone();
     50
    -51        let actor_handle = AbortOnDropHandle::new(task::spawn(
    -52            async move {
    -53                relay_actor
    -54                    .run(actor_receiver, relay_datagram_send_rx)
    -55                    .await;
    -56            }
    -57            .instrument(info_span!("relay-actor")),
    -58        ));
    -59
    -60        Self {
    -61            relay_datagram_recv_queue: relay_datagram_recv_rx,
    -62            relay_datagram_send_channel: relay_datagram_send_tx,
    -63            actor_sender,
    -64            _actor_handle: actor_handle,
    -65            my_relay,
    -66            my_node_id,
    -67        }
    -68    }
    -69
    -70    pub(crate) fn create_sender(&self) -> RelaySender {
    -71        RelaySender {
    -72            sender: PollSender::new(self.relay_datagram_send_channel.clone()),
    -73        }
    -74    }
    -75
    -76    pub(super) fn poll_recv(
    -77        &mut self,
    -78        cx: &mut Context,
    -79        bufs: &mut [io::IoSliceMut<'_>],
    -80        metas: &mut [quinn_udp::RecvMeta],
    -81        source_addrs: &mut [Addr],
    -82    ) -> Poll<io::Result<usize>> {
    -83        let mut num_msgs = 0;
    -84        for ((buf_out, meta_out), addr) in bufs
    -85            .iter_mut()
    -86            .zip(metas.iter_mut())
    -87            .zip(source_addrs.iter_mut())
    -88        {
    -89            let dm = match self.relay_datagram_recv_queue.poll_recv(cx) {
    -90                Poll::Ready(Some(recv)) => recv,
    -91                Poll::Ready(None) => {
    -92                    error!("relay_recv_channel closed");
    -93                    return Poll::Ready(Err(io::Error::new(
    -94                        io::ErrorKind::NotConnected,
    -95                        "connection closed",
    -96                    )));
    -97                }
    -98                Poll::Pending => {
    -99                    break;
    +51        let relay_actor = RelayActor::new(config, relay_datagram_recv_tx);
    +52
    +53        let actor_handle = AbortOnDropHandle::new(task::spawn(
    +54            async move {
    +55                relay_actor
    +56                    .run(actor_receiver, relay_datagram_send_rx)
    +57                    .await;
    +58            }
    +59            .instrument(info_span!("relay-actor")),
    +60        ));
    +61
    +62        Self {
    +63            relay_datagram_recv_queue: relay_datagram_recv_rx,
    +64            relay_datagram_send_channel: relay_datagram_send_tx,
    +65            pending_item: None,
    +66            actor_sender,
    +67            _actor_handle: actor_handle,
    +68            my_relay,
    +69            my_node_id,
    +70        }
    +71    }
    +72
    +73    pub(crate) fn create_sender(&self) -> RelaySender {
    +74        RelaySender {
    +75            sender: PollSender::new(self.relay_datagram_send_channel.clone()),
    +76        }
    +77    }
    +78
    +79    pub(super) fn poll_recv(
    +80        &mut self,
    +81        cx: &mut Context,
    +82        bufs: &mut [io::IoSliceMut<'_>],
    +83        metas: &mut [quinn_udp::RecvMeta],
    +84        source_addrs: &mut [Addr],
    +85    ) -> Poll<io::Result<usize>> {
    +86        let mut num_msgs = 0;
    +87        for ((buf_out, meta_out), addr) in bufs
    +88            .iter_mut()
    +89            .zip(metas.iter_mut())
    +90            .zip(source_addrs.iter_mut())
    +91        {
    +92            let dm = match self.poll_recv_queue(cx) {
    +93                Poll::Ready(Some(recv)) => recv,
    +94                Poll::Ready(None) => {
    +95                    error!("relay_recv_channel closed");
    +96                    return Poll::Ready(Err(io::Error::new(
    +97                        io::ErrorKind::NotConnected,
    +98                        "connection closed",
    +99                    )));
     100                }
    -101            };
    -102
    -103            buf_out[..dm.buf.len()].copy_from_slice(&dm.buf);
    -104            meta_out.len = dm.buf.len();
    -105            meta_out.stride = dm.buf.len();
    -106            meta_out.ecn = None;
    -107            meta_out.dst_ip = None; // TODO: insert the relay url for this relay
    -108
    -109            *addr = (dm.url, dm.src).into();
    -110            num_msgs += 1;
    -111        }
    -112
    -113        // If we have any msgs to report, they are in the first `num_msgs_total` slots
    -114        if num_msgs > 0 {
    -115            debug_assert!(num_msgs <= metas.len());
    -116            Poll::Ready(Ok(num_msgs))
    -117        } else {
    -118            Poll::Pending
    -119        }
    -120    }
    -121
    -122    pub(super) fn local_addr_watch(
    -123        &self,
    -124    ) -> n0_watcher::Map<n0_watcher::Direct<Option<RelayUrl>>, Option<(RelayUrl, NodeId)>> {
    -125        let my_node_id = self.my_node_id;
    -126        self.my_relay
    -127            .watch()
    -128            .map(move |url| url.map(|url| (url, my_node_id)))
    -129            .expect("disconnected")
    -130    }
    -131
    -132    pub(super) fn create_network_change_sender(&self) -> RelayNetworkChangeSender {
    -133        RelayNetworkChangeSender {
    -134            sender: self.actor_sender.clone(),
    -135        }
    -136    }
    -137}
    -138
    -139#[derive(Debug)]
    -140pub(super) struct RelayNetworkChangeSender {
    -141    sender: mpsc::Sender<RelayActorMessage>,
    -142}
    -143
    -144impl RelayNetworkChangeSender {
    -145    pub(super) fn on_network_change(&self, report: &crate::magicsock::Report) {
    -146        self.send_relay_actor(RelayActorMessage::NetworkChange {
    -147            report: report.clone(),
    -148        });
    -149    }
    -150
    -151    pub(super) fn rebind(&self) -> io::Result<()> {
    -152        self.send_relay_actor(RelayActorMessage::MaybeCloseRelaysOnRebind);
    -153
    -154        Ok(())
    -155    }
    -156
    -157    fn send_relay_actor(&self, msg: RelayActorMessage) {
    -158        match self.sender.try_send(msg) {
    -159            Ok(_) => {}
    -160            Err(mpsc::error::TrySendError::Closed(_)) => {
    -161                warn!("unable to send to relay actor, already closed");
    -162            }
    -163            Err(mpsc::error::TrySendError::Full(_)) => {
    -164                warn!("dropping message for relay actor, channel is full");
    -165            }
    -166        }
    -167    }
    -168}
    -169
    -170/// Sender to send datagrams to the [`RelayActor`].
    -171///
    -172/// This includes the waker coordination required to support [`quinn::UdpSender::poll_send`].
    -173#[derive(Debug, Clone)]
    -174pub(crate) struct RelaySender {
    -175    sender: PollSender<RelaySendItem>,
    -176}
    -177
    -178impl RelaySender {
    -179    pub(super) fn is_valid_send_addr(&self, _url: &RelayUrl, _node_id: &NodeId) -> bool {
    -180        true
    -181    }
    -182
    -183    pub(super) async fn send(
    -184        &self,
    -185        dest_url: RelayUrl,
    -186        dest_node: NodeId,
    -187        transmit: &Transmit<'_>,
    -188    ) -> io::Result<()> {
    -189        let contents = split_packets(transmit);
    -190
    -191        let item = RelaySendItem {
    -192            remote_node: dest_node,
    -193            url: dest_url.clone(),
    -194            datagrams: contents,
    -195        };
    -196
    -197        let dest_node = item.remote_node;
    -198        let dest_url = item.url.clone();
    -199        let Some(sender) = self.sender.get_ref() else {
    -200            return Err(io::Error::other("channel closed"));
    -201        };
    -202        match sender.send(item).await {
    -203            Ok(_) => {
    -204                trace!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -205                        "send relay: message queued");
    -206                Ok(())
    -207            }
    -208            Err(mpsc::error::SendError(_)) => {
    -209                error!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -210                        "send relay: message dropped, channel to actor is closed");
    -211                Err(io::Error::new(
    -212                    io::ErrorKind::ConnectionReset,
    -213                    "channel to actor is closed",
    -214                ))
    -215            }
    -216        }
    -217    }
    +101                Poll::Pending => {
    +102                    break;
    +103                }
    +104            };
    +105
    +106            // This *tries* to make the datagrams fit into our buffer by re-batching them.
    +107            let num_segments = dm
    +108                .datagrams
    +109                .segment_size
    +110                .map_or(1, |ss| buf_out.len() / u16::from(ss) as usize);
    +111            let datagrams = dm.datagrams.take_segments(num_segments);
    +112            let empty_after = dm.datagrams.contents.is_empty();
    +113            let dm = RelayRecvDatagram {
    +114                datagrams,
    +115                src: dm.src,
    +116                url: dm.url.clone(),
    +117            };
    +118            // take_segments can leave `self.pending_item` empty, in that case we clear it
    +119            if empty_after {
    +120                self.pending_item = None;
    +121            }
    +122
    +123            if buf_out.len() < dm.datagrams.contents.len() {
    +124                // Our receive buffer isn't big enough to process this datagram.
    +125                // Continuing would cause a panic.
    +126                warn!(
    +127                    quinn_buf_len = buf_out.len(),
    +128                    datagram_len = dm.datagrams.contents.len(),
    +129                    segment_size = ?dm.datagrams.segment_size,
    +130                    "dropping received datagram: quinn buffer too small"
    +131                );
    +132                break;
    +133                // In theory we could put some logic in here to fragment the datagram in case
    +134                // we still have enough room in our `buf_out` left to fit a couple of
    +135                // `dm.datagrams.segment_size`es, but we *should* have cut those datagrams
    +136                // to appropriate sizes earlier in the pipeline (just before we put them
    +137                // into the `relay_datagram_recv_queue` in the `ActiveRelayActor`).
    +138                // So the only case in which this happens is we receive a datagram via the relay
    +139                // that's essentially bigger than our configured `max_udp_payload_size`.
    +140                // In that case we drop it and let MTU discovery take over.
    +141            }
    +142
    +143            buf_out[..dm.datagrams.contents.len()].copy_from_slice(&dm.datagrams.contents);
    +144            meta_out.len = dm.datagrams.contents.len();
    +145            meta_out.stride = dm
    +146                .datagrams
    +147                .segment_size
    +148                .map_or(dm.datagrams.contents.len(), |s| u16::from(s) as usize);
    +149            meta_out.ecn = None;
    +150            meta_out.dst_ip = None; // TODO: insert the relay url for this relay
    +151
    +152            *addr = (dm.url, dm.src).into();
    +153            num_msgs += 1;
    +154        }
    +155
    +156        // If we have any msgs to report, they are in the first `num_msgs_total` slots
    +157        if num_msgs > 0 {
    +158            debug_assert!(num_msgs <= metas.len());
    +159            Poll::Ready(Ok(num_msgs))
    +160        } else {
    +161            Poll::Pending
    +162        }
    +163    }
    +164
    +165    pub(super) fn local_addr_watch(
    +166        &self,
    +167    ) -> n0_watcher::Map<n0_watcher::Direct<Option<RelayUrl>>, Option<(RelayUrl, NodeId)>> {
    +168        let my_node_id = self.my_node_id;
    +169        self.my_relay
    +170            .watch()
    +171            .map(move |url| url.map(|url| (url, my_node_id)))
    +172            .expect("disconnected")
    +173    }
    +174
    +175    pub(super) fn create_network_change_sender(&self) -> RelayNetworkChangeSender {
    +176        RelayNetworkChangeSender {
    +177            sender: self.actor_sender.clone(),
    +178        }
    +179    }
    +180
    +181    /// Makes sure we have a pending item stored, if not, it'll poll a new one from the queue.
    +182    ///
    +183    /// Returns a mutable reference to the stored pending item.
    +184    #[inline]
    +185    fn poll_recv_queue<'a>(
    +186        &'a mut self,
    +187        cx: &mut Context,
    +188    ) -> Poll<Option<&'a mut RelayRecvDatagram>> {
    +189        // Borrow checker doesn't quite understand an if let Some(_)... here
    +190        if self.pending_item.is_some() {
    +191            return Poll::Ready(self.pending_item.as_mut());
    +192        }
    +193
    +194        let item = match self.relay_datagram_recv_queue.poll_recv(cx) {
    +195            Poll::Ready(Some(item)) => item,
    +196            Poll::Ready(None) => return Poll::Ready(None),
    +197            Poll::Pending => return Poll::Pending,
    +198        };
    +199
    +200        Poll::Ready(Some(self.pending_item.insert(item)))
    +201    }
    +202}
    +203
    +204#[derive(Debug)]
    +205pub(super) struct RelayNetworkChangeSender {
    +206    sender: mpsc::Sender<RelayActorMessage>,
    +207}
    +208
    +209impl RelayNetworkChangeSender {
    +210    pub(super) fn on_network_change(&self, report: &crate::magicsock::Report) {
    +211        self.send_relay_actor(RelayActorMessage::NetworkChange {
    +212            report: report.clone(),
    +213        });
    +214    }
    +215
    +216    pub(super) fn rebind(&self) -> io::Result<()> {
    +217        self.send_relay_actor(RelayActorMessage::MaybeCloseRelaysOnRebind);
     218
    -219    pub(super) fn poll_send(
    -220        &mut self,
    -221        cx: &mut Context,
    -222        dest_url: RelayUrl,
    -223        dest_node: NodeId,
    -224        transmit: &Transmit<'_>,
    -225    ) -> Poll<io::Result<()>> {
    -226        match ready!(self.sender.poll_reserve(cx)) {
    -227            Ok(()) => {
    -228                trace!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -229                    "send relay: message queued");
    -230
    -231                let contents = split_packets(transmit);
    -232                let item = RelaySendItem {
    -233                    remote_node: dest_node,
    -234                    url: dest_url.clone(),
    -235                    datagrams: contents,
    -236                };
    -237                let dest_node = item.remote_node;
    -238                let dest_url = item.url.clone();
    -239
    -240                match self.sender.send_item(item) {
    -241                    Ok(()) => Poll::Ready(Ok(())),
    -242                    Err(_err) => {
    -243                        error!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -244                      "send relay: message dropped, channel to actor is closed");
    -245                        Poll::Ready(Err(io::Error::new(
    -246                            io::ErrorKind::ConnectionReset,
    -247                            "channel to actor is closed",
    -248                        )))
    -249                    }
    -250                }
    -251            }
    -252            Err(_err) => {
    -253                error!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -254                      "send relay: message dropped, channel to actor is closed");
    -255                Poll::Ready(Err(io::Error::new(
    -256                    io::ErrorKind::ConnectionReset,
    -257                    "channel to actor is closed",
    -258                )))
    -259            }
    -260        }
    -261    }
    -262
    -263    pub(super) fn try_send(
    -264        &self,
    -265        dest_url: RelayUrl,
    -266        dest_node: NodeId,
    -267        transmit: &Transmit<'_>,
    -268    ) -> io::Result<()> {
    -269        let contents = split_packets(transmit);
    -270
    -271        let item = RelaySendItem {
    -272            remote_node: dest_node,
    -273            url: dest_url.clone(),
    -274            datagrams: contents,
    -275        };
    -276
    -277        let dest_node = item.remote_node;
    -278        let dest_url = item.url.clone();
    -279
    -280        let Some(sender) = self.sender.get_ref() else {
    -281            return Err(io::Error::other("channel closed"));
    -282        };
    +219        Ok(())
    +220    }
    +221
    +222    fn send_relay_actor(&self, msg: RelayActorMessage) {
    +223        match self.sender.try_send(msg) {
    +224            Ok(_) => {}
    +225            Err(mpsc::error::TrySendError::Closed(_)) => {
    +226                warn!("unable to send to relay actor, already closed");
    +227            }
    +228            Err(mpsc::error::TrySendError::Full(_)) => {
    +229                warn!("dropping message for relay actor, channel is full");
    +230            }
    +231        }
    +232    }
    +233}
    +234
    +235/// Sender to send datagrams to the [`RelayActor`].
    +236///
    +237/// This includes the waker coordination required to support [`quinn::UdpSender::poll_send`].
    +238#[derive(Debug, Clone)]
    +239pub(crate) struct RelaySender {
    +240    sender: PollSender<RelaySendItem>,
    +241}
    +242
    +243impl RelaySender {
    +244    pub(super) fn is_valid_send_addr(&self, _url: &RelayUrl, _node_id: &NodeId) -> bool {
    +245        true
    +246    }
    +247
    +248    pub(super) async fn send(
    +249        &self,
    +250        dest_url: RelayUrl,
    +251        dest_node: NodeId,
    +252        transmit: &Transmit<'_>,
    +253    ) -> io::Result<()> {
    +254        let contents = datagrams_from_transmit(transmit);
    +255
    +256        let item = RelaySendItem {
    +257            remote_node: dest_node,
    +258            url: dest_url.clone(),
    +259            datagrams: contents,
    +260        };
    +261
    +262        let dest_node = item.remote_node;
    +263        let dest_url = item.url.clone();
    +264        let Some(sender) = self.sender.get_ref() else {
    +265            return Err(io::Error::other("channel closed"));
    +266        };
    +267        match sender.send(item).await {
    +268            Ok(_) => {
    +269                trace!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    +270                        "send relay: message queued");
    +271                Ok(())
    +272            }
    +273            Err(mpsc::error::SendError(_)) => {
    +274                error!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    +275                        "send relay: message dropped, channel to actor is closed");
    +276                Err(io::Error::new(
    +277                    io::ErrorKind::ConnectionReset,
    +278                    "channel to actor is closed",
    +279                ))
    +280            }
    +281        }
    +282    }
     283
    -284        match sender.try_send(item) {
    -285            Ok(_) => {
    -286                trace!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -287                       "send relay: message queued");
    -288                Ok(())
    -289            }
    -290            Err(mpsc::error::TrySendError::Closed(_)) => {
    -291                error!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -292                    "send relay: message dropped, channel to actor is closed");
    -293                Err(io::Error::new(
    -294                    io::ErrorKind::ConnectionReset,
    -295                    "channel to actor is closed",
    -296                ))
    -297            }
    -298            Err(mpsc::error::TrySendError::Full(_)) => {
    -299                warn!(node = %dest_node.fmt_short(), relay_url = %dest_url,
    -300                      "send relay: message dropped, channel to actor is full");
    -301                Err(io::Error::new(io::ErrorKind::WouldBlock, "channel full"))
    -302            }
    -303        }
    -304    }
    -305}
    -306
    -307/// Split a transmit containing a GSO payload into individual packets.
    -308///
    -309/// This allocates the data.
    -310///
    -311/// If the transmit has a segment size it contains multiple GSO packets.  It will be split
    -312/// into multiple packets according to that segment size.  If it does not have a segment
    -313/// size, the contents will be sent as a single packet.
    -314// TODO: If quinn stayed on bytes this would probably be much cheaper, probably.  Need to
    -315// figure out where they allocate the Vec.
    -316fn split_packets(transmit: &Transmit<'_>) -> RelayContents {
    -317    let mut res = SmallVec::with_capacity(1);
    -318    let contents = transmit.contents;
    -319    if let Some(segment_size) = transmit.segment_size {
    -320        for chunk in contents.chunks(segment_size) {
    -321            res.push(Bytes::from(chunk.to_vec()));
    -322        }
    -323    } else {
    -324        res.push(Bytes::from(contents.to_vec()));
    -325    }
    -326    res
    -327}
    -328
    -329#[cfg(test)]
    -330mod tests {
    -331    use std::{collections::BTreeSet, time::Duration};
    -332
    -333    use iroh_base::NodeId;
    -334    use tokio::task::JoinSet;
    -335    use tracing::debug;
    -336
    -337    use super::*;
    -338    use crate::defaults::staging;
    -339
    -340    #[test]
    -341    fn test_split_packets() {
    -342        fn mk_transmit(contents: &[u8], segment_size: Option<usize>) -> Transmit<'_> {
    -343            Transmit {
    -344                ecn: None,
    -345                contents,
    -346                segment_size,
    -347            }
    -348        }
    -349        fn mk_expected(parts: impl IntoIterator<Item = &'static str>) -> RelayContents {
    -350            parts
    -351                .into_iter()
    -352                .map(|p| p.as_bytes().to_vec().into())
    -353                .collect()
    -354        }
    -355        // no split
    -356        assert_eq!(
    -357            split_packets(&mk_transmit(b"hello", None)),
    -358            mk_expected(["hello"])
    -359        );
    -360        // split without rest
    -361        assert_eq!(
    -362            split_packets(&mk_transmit(b"helloworld", Some(5))),
    -363            mk_expected(["hello", "world"])
    -364        );
    -365        // split with rest and second transmit
    -366        assert_eq!(
    -367            split_packets(&mk_transmit(b"hello world", Some(5))),
    -368            mk_expected(["hello", " worl", "d"]) // spellchecker:disable-line
    -369        );
    -370        // split that results in 1 packet
    -371        assert_eq!(
    -372            split_packets(&mk_transmit(b"hello world", Some(1000))),
    -373            mk_expected(["hello world"])
    -374        );
    -375    }
    -376
    -377    #[tokio::test(flavor = "multi_thread")]
    -378    async fn test_relay_datagram_queue() {
    -379        let capacity = 16;
    -380        let (sender, mut receiver) = mpsc::channel(capacity);
    -381        let url = staging::default_na_relay_node().url;
    -382
    -383        let mut tasks = JoinSet::new();
    -384
    -385        tasks.spawn({
    -386            async move {
    -387                let mut expected_msgs: BTreeSet<usize> = (0..capacity).collect();
    -388                while !expected_msgs.is_empty() {
    -389                    let datagram: RelayRecvDatagram = receiver.recv().await.unwrap();
    -390                    let msg_num = usize::from_le_bytes(datagram.buf.as_ref().try_into().unwrap());
    -391                    debug!("Received {msg_num}");
    -392
    -393                    if !expected_msgs.remove(&msg_num) {
    -394                        panic!("Received message number {msg_num} twice or more, but expected it only exactly once.");
    -395                    }
    -396                }
    -397            }
    -398        });
    -399
    -400        for i in 0..capacity {
    -401            tasks.spawn({
    -402                let sender = sender.clone();
    -403                let url = url.clone();
    -404                async move {
    -405                    debug!("Sending {i}");
    -406                    sender
    -407                        .try_send(RelayRecvDatagram {
    -408                            url,
    -409                            src: NodeId::from_bytes(&[0u8; 32]).unwrap(),
    -410                            buf: Bytes::copy_from_slice(&i.to_le_bytes()),
    -411                        })
    -412                        .unwrap();
    -413                }
    -414            });
    -415        }
    -416
    -417        // We expect all of this work to be done in 10 seconds max.
    -418        if tokio::time::timeout(Duration::from_secs(10), tasks.join_all())
    -419            .await
    -420            .is_err()
    -421        {
    -422            panic!("Timeout - not all messages between 0 and {capacity} received.");
    -423        }
    -424    }
    -425}
    \ No newline at end of file +284 pub(super) fn poll_send( +285 &mut self, +286 cx: &mut Context, +287 dest_url: RelayUrl, +288 dest_node: NodeId, +289 transmit: &Transmit<'_>, +290 ) -> Poll<io::Result<()>> { +291 match ready!(self.sender.poll_reserve(cx)) { +292 Ok(()) => { +293 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, +294 "send relay: message queued"); +295 +296 let contents = datagrams_from_transmit(transmit); +297 let item = RelaySendItem { +298 remote_node: dest_node, +299 url: dest_url.clone(), +300 datagrams: contents, +301 }; +302 let dest_node = item.remote_node; +303 let dest_url = item.url.clone(); +304 +305 match self.sender.send_item(item) { +306 Ok(()) => Poll::Ready(Ok(())), +307 Err(_err) => { +308 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +309 "send relay: message dropped, channel to actor is closed"); +310 Poll::Ready(Err(io::Error::new( +311 io::ErrorKind::ConnectionReset, +312 "channel to actor is closed", +313 ))) +314 } +315 } +316 } +317 Err(_err) => { +318 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +319 "send relay: message dropped, channel to actor is closed"); +320 Poll::Ready(Err(io::Error::new( +321 io::ErrorKind::ConnectionReset, +322 "channel to actor is closed", +323 ))) +324 } +325 } +326 } +327 +328 pub(super) fn try_send( +329 &self, +330 dest_url: RelayUrl, +331 dest_node: NodeId, +332 transmit: &Transmit<'_>, +333 ) -> io::Result<()> { +334 let contents = datagrams_from_transmit(transmit); +335 +336 let item = RelaySendItem { +337 remote_node: dest_node, +338 url: dest_url.clone(), +339 datagrams: contents, +340 }; +341 +342 let dest_node = item.remote_node; +343 let dest_url = item.url.clone(); +344 +345 let Some(sender) = self.sender.get_ref() else { +346 return Err(io::Error::other("channel closed")); +347 }; +348 +349 match sender.try_send(item) { +350 Ok(_) => { +351 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, +352 "send relay: message queued"); +353 Ok(()) +354 } +355 Err(mpsc::error::TrySendError::Closed(_)) => { +356 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +357 "send relay: message dropped, channel to actor is closed"); +358 Err(io::Error::new( +359 io::ErrorKind::ConnectionReset, +360 "channel to actor is closed", +361 )) +362 } +363 Err(mpsc::error::TrySendError::Full(_)) => { +364 warn!(node = %dest_node.fmt_short(), relay_url = %dest_url, +365 "send relay: message dropped, channel to actor is full"); +366 Err(io::Error::new(io::ErrorKind::WouldBlock, "channel full")) +367 } +368 } +369 } +370} +371 +372/// Translate a UDP transmit to the `Datagrams` type for sending over the relay. +373fn datagrams_from_transmit(transmit: &Transmit<'_>) -> Datagrams { +374 Datagrams { +375 ecn: transmit.ecn.map(|ecn| match ecn { +376 quinn_udp::EcnCodepoint::Ect0 => quinn_proto::EcnCodepoint::Ect0, +377 quinn_udp::EcnCodepoint::Ect1 => quinn_proto::EcnCodepoint::Ect1, +378 quinn_udp::EcnCodepoint::Ce => quinn_proto::EcnCodepoint::Ce, +379 }), +380 segment_size: transmit +381 .segment_size +382 .map(|ss| ss as u16) +383 .and_then(NonZeroU16::new), +384 contents: Bytes::copy_from_slice(transmit.contents), +385 } +386} +387 +388#[cfg(test)] +389mod tests { +390 use std::{collections::BTreeSet, time::Duration}; +391 +392 use iroh_base::NodeId; +393 use tokio::task::JoinSet; +394 use tracing::debug; +395 +396 use super::*; +397 use crate::defaults::staging; +398 +399 #[tokio::test(flavor = "multi_thread")] +400 async fn test_relay_datagram_queue() { +401 let capacity = 16; +402 let (sender, mut receiver) = mpsc::channel(capacity); +403 let url = staging::default_na_relay_node().url; +404 +405 let mut tasks = JoinSet::new(); +406 +407 tasks.spawn({ +408 async move { +409 let mut expected_msgs: BTreeSet<usize> = (0..capacity).collect(); +410 while !expected_msgs.is_empty() { +411 let datagram: RelayRecvDatagram = receiver.recv().await.unwrap(); +412 let msg_num = usize::from_le_bytes(datagram.datagrams.contents.as_ref().try_into().unwrap()); +413 debug!("Received {msg_num}"); +414 +415 if !expected_msgs.remove(&msg_num) { +416 panic!("Received message number {msg_num} twice or more, but expected it only exactly once."); +417 } +418 } +419 } +420 }); +421 +422 for i in 0..capacity { +423 tasks.spawn({ +424 let sender = sender.clone(); +425 let url = url.clone(); +426 async move { +427 debug!("Sending {i}"); +428 sender +429 .try_send(RelayRecvDatagram { +430 url, +431 src: NodeId::from_bytes(&[0u8; 32]).unwrap(), +432 datagrams: Datagrams::from(&i.to_le_bytes()), +433 }) +434 .unwrap(); +435 } +436 }); +437 } +438 +439 // We expect all of this work to be done in 10 seconds max. +440 if tokio::time::timeout(Duration::from_secs(10), tasks.join_all()) +441 .await +442 .is_err() +443 { +444 panic!("Timeout - not all messages between 0 and {capacity} received."); +445 } +446 } +447}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/magicsock/transports/relay/actor.rs.html b/pr/3367/docs/src/iroh/magicsock/transports/relay/actor.rs.html index 7b6df21dc6..0972b20e16 100644 --- a/pr/3367/docs/src/iroh/magicsock/transports/relay/actor.rs.html +++ b/pr/3367/docs/src/iroh/magicsock/transports/relay/actor.rs.html @@ -1,4 +1,4 @@ -actor.rs - source

    iroh/magicsock/transports/relay/
    actor.rs

    1//! The relay actor.
    +actor.rs - source

    iroh/magicsock/transports/relay/
    actor.rs

    1//! The relay actor.
     2//!
     3//! The [`RelayActor`] handles all the relay connections.  It is helped by the
     4//! [`ActiveRelayActor`] which handles a single relay connection.
    @@ -30,1719 +30,1545 @@
     30    collections::{BTreeMap, BTreeSet},
     31    future::Future,
     32    net::IpAddr,
    -33    pin::{pin, Pin},
    +33    pin::{Pin, pin},
     34    sync::{
    -35        atomic::{AtomicBool, Ordering},
    -36        Arc,
    +35        Arc,
    +36        atomic::{AtomicBool, Ordering},
     37    },
     38};
     39
     40use backon::{Backoff, BackoffBuilder, ExponentialBuilder};
    -41use bytes::{Bytes, BytesMut};
    -42use iroh_base::{NodeId, PublicKey, RelayUrl, SecretKey};
    -43use iroh_relay::{
    -44    self as relay,
    -45    client::{Client, ConnectError, ReceivedMessage, RecvError, SendError, SendMessage},
    -46    PingTracker, MAX_PACKET_SIZE,
    -47};
    -48use n0_future::{
    +41use iroh_base::{NodeId, RelayUrl, SecretKey};
    +42use iroh_relay::{
    +43    self as relay, PingTracker,
    +44    client::{Client, ConnectError, RecvError, SendError},
    +45    protos::relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg},
    +46};
    +47use n0_future::{
    +48    FuturesUnorderedBounded, SinkExt, StreamExt,
     49    task::JoinSet,
     50    time::{self, Duration, Instant, MissedTickBehavior},
    -51    FuturesUnorderedBounded, SinkExt, StreamExt,
    -52};
    -53use n0_watcher::Watchable;
    -54use nested_enum_utils::common_fields;
    -55use netwatch::interfaces;
    -56use snafu::{IntoError, ResultExt, Snafu};
    -57use tokio::sync::{mpsc, oneshot};
    -58use tokio_util::sync::CancellationToken;
    -59use tracing::{debug, error, event, info, info_span, instrument, trace, warn, Instrument, Level};
    -60use url::Url;
    -61
    -62#[cfg(not(wasm_browser))]
    -63use crate::dns::DnsResolver;
    -64use crate::{
    -65    magicsock::{Metrics as MagicsockMetrics, RelayContents},
    -66    net_report::Report,
    -67    util::MaybeFuture,
    -68};
    -69
    -70/// How long a non-home relay connection needs to be idle (last written to) before we close it.
    -71const RELAY_INACTIVE_CLEANUP_TIME: Duration = Duration::from_secs(60);
    -72
    -73/// Maximum size a datagram payload is allowed to be.
    -74const MAX_PAYLOAD_SIZE: usize = MAX_PACKET_SIZE - PublicKey::LENGTH;
    -75
    -76/// Interval in which we ping the relay server to ensure the connection is alive.
    -77///
    -78/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some
    -79/// chance of recovering.
    -80const PING_INTERVAL: Duration = Duration::from_secs(15);
    -81
    -82/// Number of datagrams which can be sent to the relay server in one batch.
    -83///
    -84/// This means while this batch is sending to the server no other relay protocol frames can
    -85/// be sent to the server, e.g. no Ping frames or so.  While the maximum packet size is
    -86/// rather large, each item can typically be expected to up to 1500 or the max GSO size.
    -87const SEND_DATAGRAM_BATCH_SIZE: usize = 20;
    -88
    -89/// Timeout for establishing the relay connection.
    -90///
    -91/// This includes DNS, dialing the server, upgrading the connection, and completing the
    -92/// handshake.
    -93const CONNECT_TIMEOUT: Duration = Duration::from_secs(10);
    -94
    -95/// Time after which the [`ActiveRelayActor`] will drop undeliverable datagrams.
    -96///
    -97/// When the [`ActiveRelayActor`] is not connected it can not deliver datagrams.  However it
    -98/// will still receive datagrams to send from the [`RelayActor`].  If connecting takes
    -99/// longer than this timeout datagrams will be dropped.
    +51};
    +52use n0_watcher::Watchable;
    +53use nested_enum_utils::common_fields;
    +54use netwatch::interfaces;
    +55use snafu::{IntoError, ResultExt, Snafu};
    +56use tokio::sync::{mpsc, oneshot};
    +57use tokio_util::sync::CancellationToken;
    +58use tracing::{Instrument, Level, debug, error, event, info, info_span, instrument, trace, warn};
    +59use url::Url;
    +60
    +61#[cfg(not(wasm_browser))]
    +62use crate::dns::DnsResolver;
    +63use crate::{magicsock::Metrics as MagicsockMetrics, net_report::Report, util::MaybeFuture};
    +64
    +65/// How long a non-home relay connection needs to be idle (last written to) before we close it.
    +66const RELAY_INACTIVE_CLEANUP_TIME: Duration = Duration::from_secs(60);
    +67
    +68/// Interval in which we ping the relay server to ensure the connection is alive.
    +69///
    +70/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some
    +71/// chance of recovering.
    +72const PING_INTERVAL: Duration = Duration::from_secs(15);
    +73
    +74/// Number of datagrams which can be sent to the relay server in one batch.
    +75///
    +76/// This means while this batch is sending to the server no other relay protocol frames can
    +77/// be sent to the server, e.g. no Ping frames or so.  While the maximum packet size is
    +78/// rather large, each item can typically be expected to up to 1500 or the max GSO size.
    +79const SEND_DATAGRAM_BATCH_SIZE: usize = 20;
    +80
    +81/// Timeout for establishing the relay connection.
    +82///
    +83/// This includes DNS, dialing the server, upgrading the connection, and completing the
    +84/// handshake.
    +85const CONNECT_TIMEOUT: Duration = Duration::from_secs(10);
    +86
    +87/// Time after which the [`ActiveRelayActor`] will drop undeliverable datagrams.
    +88///
    +89/// When the [`ActiveRelayActor`] is not connected it can not deliver datagrams.  However it
    +90/// will still receive datagrams to send from the [`RelayActor`].  If connecting takes
    +91/// longer than this timeout datagrams will be dropped.
    +92///
    +93/// This value is set to 3 times the QUIC initial Probe Timeout (PTO).
    +94const UNDELIVERABLE_DATAGRAM_TIMEOUT: Duration = Duration::from_secs(3);
    +95
    +96/// An actor which handles the connection to a single relay server.
    +97///
    +98/// It is responsible for maintaining the connection to the relay server and handling all
    +99/// communication with it.
     100///
    -101/// This value is set to 3 times the QUIC initial Probe Timeout (PTO).
    -102const UNDELIVERABLE_DATAGRAM_TIMEOUT: Duration = Duration::from_secs(3);
    -103
    -104/// An actor which handles the connection to a single relay server.
    +101/// The actor shuts down itself on inactivity: inactivity is determined when no more
    +102/// datagrams are being queued to send.
    +103///
    +104/// This actor has 3 main states it can be in, each has it's dedicated run loop:
     105///
    -106/// It is responsible for maintaining the connection to the relay server and handling all
    -107/// communication with it.
    -108///
    -109/// The actor shuts down itself on inactivity: inactivity is determined when no more
    -110/// datagrams are being queued to send.
    -111///
    -112/// This actor has 3 main states it can be in, each has it's dedicated run loop:
    -113///
    -114/// - Dialing the relay server.
    +106/// - Dialing the relay server.
    +107///
    +108///   This will continuously dial the server until connected, using exponential backoff if
    +109///   it can not connect.  See [`ActiveRelayActor::run_dialing`].
    +110///
    +111/// - Connected to the relay server.
    +112///
    +113///   This state allows receiving from the relay server, though sending is idle in this
    +114///   state.  See [`ActiveRelayActor::run_connected`].
     115///
    -116///   This will continuously dial the server until connected, using exponential backoff if
    -117///   it can not connect.  See [`ActiveRelayActor::run_dialing`].
    -118///
    -119/// - Connected to the relay server.
    -120///
    -121///   This state allows receiving from the relay server, though sending is idle in this
    -122///   state.  See [`ActiveRelayActor::run_connected`].
    -123///
    -124/// - Sending to the relay server.
    -125///
    -126///   This is a sub-state of `connected` so the actor can still be receiving from the relay
    -127///   server at this time.  However it is actively sending data to the server so can not
    -128///   consume any further items from inboxes which will result in sending more data to the
    -129///   server until the actor goes back to the `connected` state.
    -130///
    -131/// All these are driven from the top-level [`ActiveRelayActor::run`] loop.
    -132#[derive(Debug)]
    -133struct ActiveRelayActor {
    -134    // The inboxes and channels this actor communicates over.
    -135    /// Inbox for messages which should be handled without any blocking.
    -136    prio_inbox: mpsc::Receiver<ActiveRelayPrioMessage>,
    -137    /// Inbox for messages which involve sending to the relay server.
    -138    inbox: mpsc::Receiver<ActiveRelayMessage>,
    -139    /// Queue for received relay datagrams.
    -140    relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>,
    -141    /// Channel on which we queue packets to send to the relay.
    -142    relay_datagrams_send: mpsc::Receiver<RelaySendItem>,
    -143
    -144    // Other actor state.
    -145    /// The relay server for this actor.
    -146    url: RelayUrl,
    -147    /// Builder which can repeatedly build a relay client.
    -148    relay_client_builder: relay::client::ClientBuilder,
    -149    /// Whether or not this is the home relay server.
    -150    ///
    -151    /// The home relay server needs to maintain it's connection to the relay server, even if
    -152    /// the relay actor is otherwise idle.
    -153    is_home_relay: bool,
    -154    /// When this expires the actor has been idle and should shut down.
    -155    ///
    -156    /// Unless it is managing the home relay connection.  Inactivity is only tracked on the
    -157    /// last datagram sent to the relay, received datagrams will trigger QUIC ACKs which is
    -158    /// sufficient to keep active connections open.
    -159    inactive_timeout: Pin<Box<time::Sleep>>,
    -160    /// Token indicating the [`ActiveRelayActor`] should stop.
    -161    stop_token: CancellationToken,
    -162    metrics: Arc<MagicsockMetrics>,
    -163}
    -164
    -165#[derive(Debug)]
    -166enum ActiveRelayMessage {
    -167    /// Triggers a connection check to the relay server.
    -168    ///
    -169    /// Sometimes it is known the local network interfaces have changed in which case it
    -170    /// might be prudent to check if the relay connection is still working.  `Vec<IpAddr>`
    -171    /// should contain the current local IP addresses.  If the connection uses a local
    -172    /// socket with an IP address in this list the relay server will be pinged.  If the
    -173    /// connection uses a local socket with an IP address not in this list the server will
    -174    /// always re-connect.
    -175    CheckConnection(Vec<IpAddr>),
    -176    /// Sets this relay as the home relay, or not.
    -177    SetHomeRelay(bool),
    -178    #[cfg(test)]
    -179    GetLocalAddr(oneshot::Sender<Option<SocketAddr>>),
    -180    #[cfg(test)]
    -181    PingServer(oneshot::Sender<()>),
    -182}
    -183
    -184/// Messages for the [`ActiveRelayActor`] which should never block.
    -185///
    -186/// Most messages in the [`ActiveRelayMessage`] enum trigger sending to the relay server,
    -187/// which can be blocking.  So the actor may not always be processing that inbox.  Messages
    -188/// here are processed immediately.
    -189#[derive(Debug)]
    -190enum ActiveRelayPrioMessage {
    -191    /// Returns whether or not this relay can reach the NodeId.
    -192    HasNodeRoute(NodeId, oneshot::Sender<bool>),
    -193}
    -194
    -195/// Configuration needed to start an [`ActiveRelayActor`].
    -196#[derive(Debug)]
    -197struct ActiveRelayActorOptions {
    -198    url: RelayUrl,
    -199    prio_inbox_: mpsc::Receiver<ActiveRelayPrioMessage>,
    -200    inbox: mpsc::Receiver<ActiveRelayMessage>,
    -201    relay_datagrams_send: mpsc::Receiver<RelaySendItem>,
    -202    relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>,
    -203    connection_opts: RelayConnectionOptions,
    -204    stop_token: CancellationToken,
    -205    metrics: Arc<MagicsockMetrics>,
    -206}
    -207
    -208/// Configuration needed to create a connection to a relay server.
    -209#[derive(Debug, Clone)]
    -210struct RelayConnectionOptions {
    -211    secret_key: SecretKey,
    -212    #[cfg(not(wasm_browser))]
    -213    dns_resolver: DnsResolver,
    -214    proxy_url: Option<Url>,
    -215    prefer_ipv6: Arc<AtomicBool>,
    -216    #[cfg(any(test, feature = "test-utils"))]
    -217    insecure_skip_cert_verify: bool,
    -218    protocol: iroh_relay::http::Protocol,
    -219}
    -220
    -221/// Possible reasons for a failed relay connection.
    -222#[allow(missing_docs)]
    -223#[common_fields({
    -224    backtrace: Option<snafu::Backtrace>,
    -225    #[snafu(implicit)]
    -226    span_trace: n0_snafu::SpanTrace,
    -227})]
    -228#[derive(Debug, Snafu)]
    -229enum RelayConnectionError {
    -230    #[snafu(display("Failed to connect to relay server"))]
    -231    Dial { source: DialError },
    -232    #[snafu(display("Failed to handshake with relay server"))]
    -233    Handshake { source: RunError },
    -234    #[snafu(display("Lost connection to relay server"))]
    -235    Established { source: RunError },
    -236}
    -237
    -238#[allow(missing_docs)]
    -239#[common_fields({
    -240    backtrace: Option<snafu::Backtrace>,
    -241    #[snafu(implicit)]
    -242    span_trace: n0_snafu::SpanTrace,
    -243})]
    -244#[derive(Debug, Snafu)]
    -245enum RunError {
    -246    #[snafu(display("Send timeout"))]
    -247    SendTimeout {},
    -248    #[snafu(display("Ping timeout"))]
    -249    PingTimeout {},
    -250    #[snafu(display("Local IP no longer valid"))]
    -251    LocalIpInvalid {},
    -252    #[snafu(display("No local address"))]
    -253    LocalAddrMissing {},
    -254    #[snafu(display("Stream closed by server."))]
    -255    StreamClosedServer {},
    -256    #[snafu(display("Client stream read failed"))]
    -257    ClientStreamRead { source: RecvError },
    -258    #[snafu(display("Client stream write failed"))]
    -259    ClientStreamWrite { source: SendError },
    -260}
    -261
    -262#[allow(missing_docs)]
    -263#[common_fields({
    -264    backtrace: Option<snafu::Backtrace>,
    -265    #[snafu(implicit)]
    -266    span_trace: n0_snafu::SpanTrace,
    -267})]
    -268#[derive(Debug, Snafu)]
    -269enum DialError {
    -270    #[snafu(display("timeout trying to establish a connection"))]
    -271    Timeout {},
    -272    #[snafu(display("unable to connect"))]
    -273    Connect {
    -274        #[snafu(source(from(ConnectError, Box::new)))]
    -275        source: Box<ConnectError>,
    -276    },
    -277}
    -278
    -279impl ActiveRelayActor {
    -280    fn new(opts: ActiveRelayActorOptions) -> Self {
    -281        let ActiveRelayActorOptions {
    -282            url,
    -283            prio_inbox_: prio_inbox,
    -284            inbox,
    -285            relay_datagrams_send,
    +116/// - Sending to the relay server.
    +117///
    +118///   This is a sub-state of `connected` so the actor can still be receiving from the relay
    +119///   server at this time.  However it is actively sending data to the server so can not
    +120///   consume any further items from inboxes which will result in sending more data to the
    +121///   server until the actor goes back to the `connected` state.
    +122///
    +123/// All these are driven from the top-level [`ActiveRelayActor::run`] loop.
    +124#[derive(Debug)]
    +125struct ActiveRelayActor {
    +126    // The inboxes and channels this actor communicates over.
    +127    /// Inbox for messages which should be handled without any blocking.
    +128    prio_inbox: mpsc::Receiver<ActiveRelayPrioMessage>,
    +129    /// Inbox for messages which involve sending to the relay server.
    +130    inbox: mpsc::Receiver<ActiveRelayMessage>,
    +131    /// Queue for received relay datagrams.
    +132    relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>,
    +133    /// Channel on which we queue packets to send to the relay.
    +134    relay_datagrams_send: mpsc::Receiver<RelaySendItem>,
    +135
    +136    // Other actor state.
    +137    /// The relay server for this actor.
    +138    url: RelayUrl,
    +139    /// Builder which can repeatedly build a relay client.
    +140    relay_client_builder: relay::client::ClientBuilder,
    +141    /// Whether or not this is the home relay server.
    +142    ///
    +143    /// The home relay server needs to maintain it's connection to the relay server, even if
    +144    /// the relay actor is otherwise idle.
    +145    is_home_relay: bool,
    +146    /// When this expires the actor has been idle and should shut down.
    +147    ///
    +148    /// Unless it is managing the home relay connection.  Inactivity is only tracked on the
    +149    /// last datagram sent to the relay, received datagrams will trigger QUIC ACKs which is
    +150    /// sufficient to keep active connections open.
    +151    inactive_timeout: Pin<Box<time::Sleep>>,
    +152    /// Token indicating the [`ActiveRelayActor`] should stop.
    +153    stop_token: CancellationToken,
    +154    metrics: Arc<MagicsockMetrics>,
    +155}
    +156
    +157#[derive(Debug)]
    +158enum ActiveRelayMessage {
    +159    /// Triggers a connection check to the relay server.
    +160    ///
    +161    /// Sometimes it is known the local network interfaces have changed in which case it
    +162    /// might be prudent to check if the relay connection is still working.  `Vec<IpAddr>`
    +163    /// should contain the current local IP addresses.  If the connection uses a local
    +164    /// socket with an IP address in this list the relay server will be pinged.  If the
    +165    /// connection uses a local socket with an IP address not in this list the server will
    +166    /// always re-connect.
    +167    CheckConnection(Vec<IpAddr>),
    +168    /// Sets this relay as the home relay, or not.
    +169    SetHomeRelay(bool),
    +170    #[cfg(test)]
    +171    GetLocalAddr(oneshot::Sender<Option<SocketAddr>>),
    +172    #[cfg(test)]
    +173    PingServer(oneshot::Sender<()>),
    +174}
    +175
    +176/// Messages for the [`ActiveRelayActor`] which should never block.
    +177///
    +178/// Most messages in the [`ActiveRelayMessage`] enum trigger sending to the relay server,
    +179/// which can be blocking.  So the actor may not always be processing that inbox.  Messages
    +180/// here are processed immediately.
    +181#[derive(Debug)]
    +182enum ActiveRelayPrioMessage {
    +183    /// Returns whether or not this relay can reach the NodeId.
    +184    HasNodeRoute(NodeId, oneshot::Sender<bool>),
    +185}
    +186
    +187/// Configuration needed to start an [`ActiveRelayActor`].
    +188#[derive(Debug)]
    +189struct ActiveRelayActorOptions {
    +190    url: RelayUrl,
    +191    prio_inbox_: mpsc::Receiver<ActiveRelayPrioMessage>,
    +192    inbox: mpsc::Receiver<ActiveRelayMessage>,
    +193    relay_datagrams_send: mpsc::Receiver<RelaySendItem>,
    +194    relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>,
    +195    connection_opts: RelayConnectionOptions,
    +196    stop_token: CancellationToken,
    +197    metrics: Arc<MagicsockMetrics>,
    +198}
    +199
    +200/// Configuration needed to create a connection to a relay server.
    +201#[derive(Debug, Clone)]
    +202struct RelayConnectionOptions {
    +203    secret_key: SecretKey,
    +204    #[cfg(not(wasm_browser))]
    +205    dns_resolver: DnsResolver,
    +206    proxy_url: Option<Url>,
    +207    prefer_ipv6: Arc<AtomicBool>,
    +208    #[cfg(any(test, feature = "test-utils"))]
    +209    insecure_skip_cert_verify: bool,
    +210}
    +211
    +212/// Possible reasons for a failed relay connection.
    +213#[allow(missing_docs)]
    +214#[common_fields({
    +215    backtrace: Option<snafu::Backtrace>,
    +216    #[snafu(implicit)]
    +217    span_trace: n0_snafu::SpanTrace,
    +218})]
    +219#[derive(Debug, Snafu)]
    +220enum RelayConnectionError {
    +221    #[snafu(display("Failed to connect to relay server"))]
    +222    Dial { source: DialError },
    +223    #[snafu(display("Failed to handshake with relay server"))]
    +224    Handshake { source: RunError },
    +225    #[snafu(display("Lost connection to relay server"))]
    +226    Established { source: RunError },
    +227}
    +228
    +229#[allow(missing_docs)]
    +230#[common_fields({
    +231    backtrace: Option<snafu::Backtrace>,
    +232    #[snafu(implicit)]
    +233    span_trace: n0_snafu::SpanTrace,
    +234})]
    +235#[derive(Debug, Snafu)]
    +236enum RunError {
    +237    #[snafu(display("Send timeout"))]
    +238    SendTimeout {},
    +239    #[snafu(display("Ping timeout"))]
    +240    PingTimeout {},
    +241    #[snafu(display("Local IP no longer valid"))]
    +242    LocalIpInvalid {},
    +243    #[snafu(display("No local address"))]
    +244    LocalAddrMissing {},
    +245    #[snafu(display("Stream closed by server."))]
    +246    StreamClosedServer {},
    +247    #[snafu(display("Client stream read failed"))]
    +248    ClientStreamRead { source: RecvError },
    +249    #[snafu(display("Client stream write failed"))]
    +250    ClientStreamWrite { source: SendError },
    +251}
    +252
    +253#[allow(missing_docs)]
    +254#[common_fields({
    +255    backtrace: Option<snafu::Backtrace>,
    +256    #[snafu(implicit)]
    +257    span_trace: n0_snafu::SpanTrace,
    +258})]
    +259#[derive(Debug, Snafu)]
    +260enum DialError {
    +261    #[snafu(display("timeout (>{timeout:?}) trying to establish a connection"))]
    +262    Timeout { timeout: Duration },
    +263    #[snafu(display("unable to connect"))]
    +264    Connect {
    +265        #[snafu(source(from(ConnectError, Box::new)))]
    +266        source: Box<ConnectError>,
    +267    },
    +268}
    +269
    +270impl ActiveRelayActor {
    +271    fn new(opts: ActiveRelayActorOptions) -> Self {
    +272        let ActiveRelayActorOptions {
    +273            url,
    +274            prio_inbox_: prio_inbox,
    +275            inbox,
    +276            relay_datagrams_send,
    +277            relay_datagrams_recv,
    +278            connection_opts,
    +279            stop_token,
    +280            metrics,
    +281        } = opts;
    +282        let relay_client_builder = Self::create_relay_builder(url.clone(), connection_opts);
    +283        ActiveRelayActor {
    +284            prio_inbox,
    +285            inbox,
     286            relay_datagrams_recv,
    -287            connection_opts,
    -288            stop_token,
    -289            metrics,
    -290        } = opts;
    -291        let relay_client_builder = Self::create_relay_builder(url.clone(), connection_opts);
    -292        ActiveRelayActor {
    -293            prio_inbox,
    -294            inbox,
    -295            relay_datagrams_recv,
    -296            relay_datagrams_send,
    -297            url,
    -298            relay_client_builder,
    -299            is_home_relay: false,
    -300            inactive_timeout: Box::pin(time::sleep(RELAY_INACTIVE_CLEANUP_TIME)),
    -301            stop_token,
    -302            metrics,
    -303        }
    -304    }
    -305
    -306    fn create_relay_builder(
    -307        url: RelayUrl,
    -308        opts: RelayConnectionOptions,
    -309    ) -> relay::client::ClientBuilder {
    -310        let RelayConnectionOptions {
    -311            secret_key,
    -312            #[cfg(not(wasm_browser))]
    -313            dns_resolver,
    -314            proxy_url,
    -315            prefer_ipv6,
    -316            #[cfg(any(test, feature = "test-utils"))]
    -317            insecure_skip_cert_verify,
    -318            protocol,
    -319        } = opts;
    -320
    -321        let mut builder = relay::client::ClientBuilder::new(
    -322            url,
    -323            secret_key,
    -324            #[cfg(not(wasm_browser))]
    -325            dns_resolver,
    -326        )
    -327        .protocol(protocol)
    -328        .address_family_selector(move || prefer_ipv6.load(Ordering::Relaxed));
    -329        if let Some(proxy_url) = proxy_url {
    -330            builder = builder.proxy_url(proxy_url);
    -331        }
    -332        #[cfg(any(test, feature = "test-utils"))]
    -333        let builder = builder.insecure_skip_cert_verify(insecure_skip_cert_verify);
    -334        builder
    -335    }
    -336
    -337    /// The main actor run loop.
    -338    ///
    -339    /// Primarily switches between the dialing and connected states.
    -340    async fn run(mut self) {
    -341        // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs.
    -342        // From the existing description, it is wrong here.
    -343        // self.metrics.num_relay_conns_added.inc();
    -344
    -345        let mut backoff = Self::build_backoff();
    -346
    -347        while let Err(err) = self.run_once().await {
    -348            warn!("{err}");
    -349            match err {
    -350                RelayConnectionError::Dial { .. } | RelayConnectionError::Handshake { .. } => {
    -351                    // If dialing failed, or if the relay connection failed before we received a pong,
    -352                    // we wait an exponentially increasing time until we attempt to reconnect again.
    -353                    let Some(delay) = backoff.next() else {
    -354                        warn!("retries exceeded");
    -355                        break;
    -356                    };
    -357                    debug!("retry in {delay:?}");
    -358                    time::sleep(delay).await;
    -359                }
    -360                RelayConnectionError::Established { .. } => {
    -361                    // If the relay connection remained established long enough so that we received a pong
    -362                    // from the relay server, we reset the backoff and attempt to reconnect immediately.
    -363                    backoff = Self::build_backoff();
    -364                }
    -365            }
    -366        }
    -367        debug!("exiting");
    -368        // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs.
    -369        // From the existing description, it is wrong here.
    -370        // self.metrics.num_relay_conns_removed.inc();
    -371    }
    -372
    -373    fn build_backoff() -> impl Backoff {
    -374        ExponentialBuilder::new()
    -375            .with_min_delay(Duration::from_millis(10))
    -376            .with_max_delay(Duration::from_secs(16))
    -377            .with_jitter()
    -378            .without_max_times()
    -379            .build()
    -380    }
    -381
    -382    /// Attempt to connect to the relay, and run the connected actor loop.
    -383    ///
    -384    /// Returns `Ok(())` if the actor loop should shut down. Returns an error if dialing failed,
    -385    /// or if the relay connection failed while connected. In both cases, the connection should
    -386    /// be retried with a backoff.
    -387    async fn run_once(&mut self) -> Result<(), RelayConnectionError> {
    -388        let client = match self.run_dialing().instrument(info_span!("dialing")).await {
    -389            Some(client_res) => client_res.context(DialSnafu)?,
    -390            None => return Ok(()),
    -391        };
    -392        self.run_connected(client)
    -393            .instrument(info_span!("connected"))
    -394            .await
    -395    }
    -396
    -397    fn reset_inactive_timeout(&mut self) {
    -398        self.inactive_timeout
    -399            .as_mut()
    -400            .reset(Instant::now() + RELAY_INACTIVE_CLEANUP_TIME);
    -401    }
    -402
    -403    fn set_home_relay(&mut self, is_home: bool) {
    -404        let prev = std::mem::replace(&mut self.is_home_relay, is_home);
    -405        if self.is_home_relay != prev {
    -406            event!(
    -407                target: "iroh::_events::relay::home_changed",
    -408                Level::DEBUG,
    -409                url = %self.url,
    -410                home_relay = self.is_home_relay,
    -411            );
    -412        }
    -413    }
    -414
    -415    /// Actor loop when connecting to the relay server.
    -416    ///
    -417    /// Returns `None` if the actor needs to shut down.  Returns `Some(Ok(client))` when the
    -418    /// connection is established, and `Some(Err(err))` if dialing the relay failed.
    -419    async fn run_dialing(&mut self) -> Option<Result<iroh_relay::client::Client, DialError>> {
    -420        debug!("Actor loop: connecting to relay.");
    -421
    -422        // We regularly flush the relay_datagrams_send queue so it is not full of stale
    -423        // packets while reconnecting.  Those datagrams are dropped and the QUIC congestion
    -424        // controller will have to handle this (DISCO packets do not yet have retry).  This
    -425        // is not an ideal mechanism, an alternative approach would be to use
    -426        // e.g. ConcurrentQueue with force_push, though now you might still send very stale
    -427        // packets when eventually connected.  So perhaps this is a reasonable compromise.
    -428        let mut send_datagram_flush = time::interval(UNDELIVERABLE_DATAGRAM_TIMEOUT);
    -429        send_datagram_flush.set_missed_tick_behavior(MissedTickBehavior::Delay);
    -430        send_datagram_flush.reset(); // Skip the immediate interval
    -431
    -432        let dialing_fut = self.dial_relay();
    -433        tokio::pin!(dialing_fut);
    -434        loop {
    -435            tokio::select! {
    -436                biased;
    -437                _ = self.stop_token.cancelled() => {
    -438                    debug!("Shutdown.");
    -439                    break None;
    +287            relay_datagrams_send,
    +288            url,
    +289            relay_client_builder,
    +290            is_home_relay: false,
    +291            inactive_timeout: Box::pin(time::sleep(RELAY_INACTIVE_CLEANUP_TIME)),
    +292            stop_token,
    +293            metrics,
    +294        }
    +295    }
    +296
    +297    fn create_relay_builder(
    +298        url: RelayUrl,
    +299        opts: RelayConnectionOptions,
    +300    ) -> relay::client::ClientBuilder {
    +301        let RelayConnectionOptions {
    +302            secret_key,
    +303            #[cfg(not(wasm_browser))]
    +304            dns_resolver,
    +305            proxy_url,
    +306            prefer_ipv6,
    +307            #[cfg(any(test, feature = "test-utils"))]
    +308            insecure_skip_cert_verify,
    +309        } = opts;
    +310
    +311        let mut builder = relay::client::ClientBuilder::new(
    +312            url,
    +313            secret_key,
    +314            #[cfg(not(wasm_browser))]
    +315            dns_resolver,
    +316        )
    +317        .address_family_selector(move || prefer_ipv6.load(Ordering::Relaxed));
    +318        if let Some(proxy_url) = proxy_url {
    +319            builder = builder.proxy_url(proxy_url);
    +320        }
    +321        #[cfg(any(test, feature = "test-utils"))]
    +322        let builder = builder.insecure_skip_cert_verify(insecure_skip_cert_verify);
    +323        builder
    +324    }
    +325
    +326    /// The main actor run loop.
    +327    ///
    +328    /// Primarily switches between the dialing and connected states.
    +329    async fn run(mut self) {
    +330        // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs.
    +331        // From the existing description, it is wrong here.
    +332        // self.metrics.num_relay_conns_added.inc();
    +333
    +334        let mut backoff = Self::build_backoff();
    +335
    +336        while let Err(err) = self.run_once().await {
    +337            warn!("{err}");
    +338            match err {
    +339                RelayConnectionError::Dial { .. } | RelayConnectionError::Handshake { .. } => {
    +340                    // If dialing failed, or if the relay connection failed before we received a pong,
    +341                    // we wait an exponentially increasing time until we attempt to reconnect again.
    +342                    let Some(delay) = backoff.next() else {
    +343                        warn!("retries exceeded");
    +344                        break;
    +345                    };
    +346                    debug!("retry in {delay:?}");
    +347                    time::sleep(delay).await;
    +348                }
    +349                RelayConnectionError::Established { .. } => {
    +350                    // If the relay connection remained established long enough so that we received a pong
    +351                    // from the relay server, we reset the backoff and attempt to reconnect immediately.
    +352                    backoff = Self::build_backoff();
    +353                }
    +354            }
    +355        }
    +356        debug!("exiting");
    +357        // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs.
    +358        // From the existing description, it is wrong here.
    +359        // self.metrics.num_relay_conns_removed.inc();
    +360    }
    +361
    +362    fn build_backoff() -> impl Backoff {
    +363        ExponentialBuilder::new()
    +364            .with_min_delay(Duration::from_millis(10))
    +365            .with_max_delay(Duration::from_secs(16))
    +366            .with_jitter()
    +367            .without_max_times()
    +368            .build()
    +369    }
    +370
    +371    /// Attempt to connect to the relay, and run the connected actor loop.
    +372    ///
    +373    /// Returns `Ok(())` if the actor loop should shut down. Returns an error if dialing failed,
    +374    /// or if the relay connection failed while connected. In both cases, the connection should
    +375    /// be retried with a backoff.
    +376    async fn run_once(&mut self) -> Result<(), RelayConnectionError> {
    +377        let client = match self.run_dialing().instrument(info_span!("dialing")).await {
    +378            Some(client_res) => client_res.context(DialSnafu)?,
    +379            None => return Ok(()),
    +380        };
    +381        self.run_connected(client)
    +382            .instrument(info_span!("connected"))
    +383            .await
    +384    }
    +385
    +386    fn reset_inactive_timeout(&mut self) {
    +387        self.inactive_timeout
    +388            .as_mut()
    +389            .reset(Instant::now() + RELAY_INACTIVE_CLEANUP_TIME);
    +390    }
    +391
    +392    fn set_home_relay(&mut self, is_home: bool) {
    +393        let prev = std::mem::replace(&mut self.is_home_relay, is_home);
    +394        if self.is_home_relay != prev {
    +395            event!(
    +396                target: "iroh::_events::relay::home_changed",
    +397                Level::DEBUG,
    +398                url = %self.url,
    +399                home_relay = self.is_home_relay,
    +400            );
    +401        }
    +402    }
    +403
    +404    /// Actor loop when connecting to the relay server.
    +405    ///
    +406    /// Returns `None` if the actor needs to shut down.  Returns `Some(Ok(client))` when the
    +407    /// connection is established, and `Some(Err(err))` if dialing the relay failed.
    +408    async fn run_dialing(&mut self) -> Option<Result<iroh_relay::client::Client, DialError>> {
    +409        debug!("Actor loop: connecting to relay.");
    +410
    +411        // We regularly flush the relay_datagrams_send queue so it is not full of stale
    +412        // packets while reconnecting.  Those datagrams are dropped and the QUIC congestion
    +413        // controller will have to handle this (DISCO packets do not yet have retry).  This
    +414        // is not an ideal mechanism, an alternative approach would be to use
    +415        // e.g. ConcurrentQueue with force_push, though now you might still send very stale
    +416        // packets when eventually connected.  So perhaps this is a reasonable compromise.
    +417        let mut send_datagram_flush = time::interval(UNDELIVERABLE_DATAGRAM_TIMEOUT);
    +418        send_datagram_flush.set_missed_tick_behavior(MissedTickBehavior::Delay);
    +419        send_datagram_flush.reset(); // Skip the immediate interval
    +420
    +421        let dialing_fut = self.dial_relay();
    +422        tokio::pin!(dialing_fut);
    +423        loop {
    +424            tokio::select! {
    +425                biased;
    +426                _ = self.stop_token.cancelled() => {
    +427                    debug!("Shutdown.");
    +428                    break None;
    +429                }
    +430                msg = self.prio_inbox.recv() => {
    +431                    let Some(msg) = msg else {
    +432                        warn!("Priority inbox closed, shutdown.");
    +433                        break None;
    +434                    };
    +435                    match msg {
    +436                        ActiveRelayPrioMessage::HasNodeRoute(_peer, sender) => {
    +437                            sender.send(false).ok();
    +438                        }
    +439                    }
     440                }
    -441                msg = self.prio_inbox.recv() => {
    -442                    let Some(msg) = msg else {
    -443                        warn!("Priority inbox closed, shutdown.");
    -444                        break None;
    -445                    };
    -446                    match msg {
    -447                        ActiveRelayPrioMessage::HasNodeRoute(_peer, sender) => {
    -448                            sender.send(false).ok();
    -449                        }
    -450                    }
    -451                }
    -452                res = &mut dialing_fut => {
    -453                    match res {
    -454                        Ok(client) => {
    -455                            break Some(Ok(client));
    -456                        }
    -457                        Err(err) => {
    -458                            break Some(Err(err));
    +441                res = &mut dialing_fut => {
    +442                    match res {
    +443                        Ok(client) => {
    +444                            break Some(Ok(client));
    +445                        }
    +446                        Err(err) => {
    +447                            break Some(Err(err));
    +448                        }
    +449                    }
    +450                }
    +451                msg = self.inbox.recv() => {
    +452                    let Some(msg) = msg else {
    +453                        debug!("Inbox closed, shutdown.");
    +454                        break None;
    +455                    };
    +456                    match msg {
    +457                        ActiveRelayMessage::SetHomeRelay(is_home) => {
    +458                            self.set_home_relay(is_home);
     459                        }
    -460                    }
    -461                }
    -462                msg = self.inbox.recv() => {
    -463                    let Some(msg) = msg else {
    -464                        debug!("Inbox closed, shutdown.");
    -465                        break None;
    -466                    };
    -467                    match msg {
    -468                        ActiveRelayMessage::SetHomeRelay(is_home) => {
    -469                            self.set_home_relay(is_home);
    -470                        }
    -471                        ActiveRelayMessage::CheckConnection(_local_ips) => {}
    -472                        #[cfg(test)]
    -473                        ActiveRelayMessage::GetLocalAddr(sender) => {
    -474                            sender.send(None).ok();
    -475                        }
    -476                        #[cfg(test)]
    -477                        ActiveRelayMessage::PingServer(sender) => {
    -478                            drop(sender);
    -479                        }
    -480                    }
    -481                }
    -482                _ = send_datagram_flush.tick() => {
    -483                    self.reset_inactive_timeout();
    -484                    let mut logged = false;
    -485                    while self.relay_datagrams_send.try_recv().is_ok() {
    -486                        if !logged {
    -487                            debug!(?UNDELIVERABLE_DATAGRAM_TIMEOUT, "Dropping datagrams to send.");
    -488                            logged = true;
    -489                        }
    -490                    }
    -491                }
    -492                _ = &mut self.inactive_timeout, if !self.is_home_relay => {
    -493                    debug!(?RELAY_INACTIVE_CLEANUP_TIME, "Inactive, exiting.");
    -494                    break None;
    -495                }
    -496            }
    -497        }
    -498    }
    -499
    -500    /// Returns a future which will complete once connected to the relay server.
    -501    ///
    -502    /// The future only completes once the connection is established and retries
    -503    /// connections.  It currently does not ever return `Err` as the retries continue
    -504    /// forever.
    -505    // This is using `impl Future` to return a future without a reference to self.
    -506    fn dial_relay(&self) -> impl Future<Output = Result<Client, DialError>> {
    -507        let client_builder = self.relay_client_builder.clone();
    -508        async move {
    -509            match time::timeout(CONNECT_TIMEOUT, client_builder.connect()).await {
    -510                Ok(Ok(client)) => Ok(client),
    -511                Ok(Err(err)) => Err(ConnectSnafu.into_error(err)),
    -512                Err(_) => Err(TimeoutSnafu.build()),
    -513            }
    -514        }
    -515    }
    -516
    -517    /// Runs the actor loop when connected to a relay server.
    -518    ///
    -519    /// Returns `Ok` if the actor needs to shut down.  `Err` is returned if the connection
    -520    /// to the relay server is lost.
    -521    async fn run_connected(
    -522        &mut self,
    -523        client: iroh_relay::client::Client,
    -524    ) -> Result<(), RelayConnectionError> {
    -525        debug!("Actor loop: connected to relay");
    -526        event!(
    -527            target: "iroh::_events::relay::connected",
    -528            Level::DEBUG,
    -529            url = %self.url,
    -530            home_relay = self.is_home_relay,
    -531        );
    -532
    -533        let (mut client_stream, client_sink) = client.split();
    -534        let mut client_sink = client_sink.sink_map_err(|e| ClientStreamWriteSnafu.into_error(e));
    -535
    -536        let mut state = ConnectedRelayState {
    -537            ping_tracker: PingTracker::default(),
    -538            nodes_present: BTreeSet::new(),
    -539            last_packet_src: None,
    -540            pong_pending: None,
    -541            established: false,
    -542            #[cfg(test)]
    -543            test_pong: None,
    -544        };
    +460                        ActiveRelayMessage::CheckConnection(_local_ips) => {}
    +461                        #[cfg(test)]
    +462                        ActiveRelayMessage::GetLocalAddr(sender) => {
    +463                            sender.send(None).ok();
    +464                        }
    +465                        #[cfg(test)]
    +466                        ActiveRelayMessage::PingServer(sender) => {
    +467                            drop(sender);
    +468                        }
    +469                    }
    +470                }
    +471                _ = send_datagram_flush.tick() => {
    +472                    self.reset_inactive_timeout();
    +473                    let mut logged = false;
    +474                    while self.relay_datagrams_send.try_recv().is_ok() {
    +475                        if !logged {
    +476                            debug!(?UNDELIVERABLE_DATAGRAM_TIMEOUT, "Dropping datagrams to send.");
    +477                            logged = true;
    +478                        }
    +479                    }
    +480                }
    +481                _ = &mut self.inactive_timeout, if !self.is_home_relay => {
    +482                    debug!(?RELAY_INACTIVE_CLEANUP_TIME, "Inactive, exiting.");
    +483                    break None;
    +484                }
    +485            }
    +486        }
    +487    }
    +488
    +489    /// Returns a future which will complete once connected to the relay server.
    +490    ///
    +491    /// The future only completes once the connection is established and retries
    +492    /// connections.  It currently does not ever return `Err` as the retries continue
    +493    /// forever.
    +494    // This is using `impl Future` to return a future without a reference to self.
    +495    fn dial_relay(&self) -> impl Future<Output = Result<Client, DialError>> + use<> {
    +496        let client_builder = self.relay_client_builder.clone();
    +497        async move {
    +498            match time::timeout(CONNECT_TIMEOUT, client_builder.connect()).await {
    +499                Ok(Ok(client)) => Ok(client),
    +500                Ok(Err(err)) => Err(ConnectSnafu.into_error(err)),
    +501                Err(_) => Err(TimeoutSnafu {
    +502                    timeout: CONNECT_TIMEOUT,
    +503                }
    +504                .build()),
    +505            }
    +506        }
    +507    }
    +508
    +509    /// Runs the actor loop when connected to a relay server.
    +510    ///
    +511    /// Returns `Ok` if the actor needs to shut down.  `Err` is returned if the connection
    +512    /// to the relay server is lost.
    +513    async fn run_connected(
    +514        &mut self,
    +515        client: iroh_relay::client::Client,
    +516    ) -> Result<(), RelayConnectionError> {
    +517        debug!("Actor loop: connected to relay");
    +518        event!(
    +519            target: "iroh::_events::relay::connected",
    +520            Level::DEBUG,
    +521            url = %self.url,
    +522            home_relay = self.is_home_relay,
    +523        );
    +524
    +525        let (mut client_stream, client_sink) = client.split();
    +526        let mut client_sink = client_sink.sink_map_err(|e| ClientStreamWriteSnafu.into_error(e));
    +527
    +528        let mut state = ConnectedRelayState {
    +529            ping_tracker: PingTracker::default(),
    +530            nodes_present: BTreeSet::new(),
    +531            last_packet_src: None,
    +532            pong_pending: None,
    +533            established: false,
    +534            #[cfg(test)]
    +535            test_pong: None,
    +536        };
    +537
    +538        // A buffer to pass through multiple datagrams at once as an optimisation.
    +539        let mut send_datagrams_buf = Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE);
    +540
    +541        // Regularly send pings so we know the connection is healthy.
    +542        // The first ping will be sent immediately.
    +543        let mut ping_interval = time::interval(PING_INTERVAL);
    +544        ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
     545
    -546        // A buffer to pass through multiple datagrams at once as an optimisation.
    -547        let mut send_datagrams_buf = Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE);
    -548
    -549        // Regularly send pings so we know the connection is healthy.
    -550        // The first ping will be sent immediately.
    -551        let mut ping_interval = time::interval(PING_INTERVAL);
    -552        ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
    -553
    -554        let res = loop {
    -555            if let Some(data) = state.pong_pending.take() {
    -556                let fut = client_sink.send(SendMessage::Pong(data));
    -557                self.run_sending(fut, &mut state, &mut client_stream)
    -558                    .await?;
    -559            }
    -560            tokio::select! {
    -561                biased;
    -562                _ = self.stop_token.cancelled() => {
    -563                    debug!("Shutdown.");
    -564                    break Ok(());
    -565                }
    -566                msg = self.prio_inbox.recv() => {
    -567                    let Some(msg) = msg else {
    -568                        warn!("Priority inbox closed, shutdown.");
    -569                        break Ok(());
    -570                    };
    -571                    match msg {
    -572                        ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => {
    -573                            let has_peer = state.nodes_present.contains(&peer);
    -574                            sender.send(has_peer).ok();
    -575                        }
    -576                    }
    +546        let res = loop {
    +547            if let Some(data) = state.pong_pending.take() {
    +548                let fut = client_sink.send(ClientToRelayMsg::Pong(data));
    +549                self.run_sending(fut, &mut state, &mut client_stream)
    +550                    .await?;
    +551            }
    +552            tokio::select! {
    +553                biased;
    +554                _ = self.stop_token.cancelled() => {
    +555                    debug!("Shutdown.");
    +556                    break Ok(());
    +557                }
    +558                msg = self.prio_inbox.recv() => {
    +559                    let Some(msg) = msg else {
    +560                        warn!("Priority inbox closed, shutdown.");
    +561                        break Ok(());
    +562                    };
    +563                    match msg {
    +564                        ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => {
    +565                            let has_peer = state.nodes_present.contains(&peer);
    +566                            sender.send(has_peer).ok();
    +567                        }
    +568                    }
    +569                }
    +570                _ = state.ping_tracker.timeout() => {
    +571                    break Err(PingTimeoutSnafu.build());
    +572                }
    +573                _ = ping_interval.tick() => {
    +574                    let data = state.ping_tracker.new_ping();
    +575                    let fut = client_sink.send(ClientToRelayMsg::Ping(data));
    +576                    self.run_sending(fut, &mut state, &mut client_stream).await?;
     577                }
    -578                _ = state.ping_tracker.timeout() => {
    -579                    break Err(PingTimeoutSnafu.build());
    -580                }
    -581                _ = ping_interval.tick() => {
    -582                    let data = state.ping_tracker.new_ping();
    -583                    let fut = client_sink.send(SendMessage::Ping(data));
    -584                    self.run_sending(fut, &mut state, &mut client_stream).await?;
    -585                }
    -586                msg = self.inbox.recv() => {
    -587                    let Some(msg) = msg else {
    -588                        warn!("Inbox closed, shutdown.");
    -589                        break Ok(());
    -590                    };
    -591                    match msg {
    -592                        ActiveRelayMessage::SetHomeRelay(is_home) => {
    -593                            self.set_home_relay(is_home);
    -594                        }
    -595                        ActiveRelayMessage::CheckConnection(local_ips) => {
    -596                            match client_stream.local_addr() {
    -597                                Some(addr) if local_ips.contains(&addr.ip()) => {
    -598                                    let data = state.ping_tracker.new_ping();
    -599                                    let fut = client_sink.send(SendMessage::Ping(data));
    -600                                    self.run_sending(fut, &mut state, &mut client_stream).await?;
    -601                                }
    -602                                Some(_) => break Err(LocalIpInvalidSnafu.build()),
    -603                                None => break Err(LocalAddrMissingSnafu.build()),
    -604                            }
    -605                        }
    -606                        #[cfg(test)]
    -607                        ActiveRelayMessage::GetLocalAddr(sender) => {
    -608                            let addr = client_stream.local_addr();
    -609                            sender.send(addr).ok();
    -610                        }
    -611                        #[cfg(test)]
    -612                        ActiveRelayMessage::PingServer(sender) => {
    -613                            let data = rand::random();
    -614                            state.test_pong = Some((data, sender));
    -615                            let fut = client_sink.send(SendMessage::Ping(data));
    -616                            self.run_sending(fut, &mut state, &mut client_stream).await?;
    -617                        }
    -618                    }
    -619                }
    -620                count = self.relay_datagrams_send.recv_many(
    -621                    &mut send_datagrams_buf,
    -622                    SEND_DATAGRAM_BATCH_SIZE,
    -623                ) => {
    -624                    if count == 0 {
    -625                        warn!("Datagram inbox closed, shutdown");
    -626                        break Ok(());
    -627                    };
    -628                    self.reset_inactive_timeout();
    -629                    // TODO: This allocation is *very* unfortunate.  But so is the
    -630                    // allocation *inside* of PacketizeIter...
    -631                    let dgrams = std::mem::replace(
    -632                        &mut send_datagrams_buf,
    -633                        Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE),
    -634                    );
    -635                    // TODO(frando): can we avoid the clone here?
    -636                    let metrics = self.metrics.clone();
    -637                    let packet_iter = dgrams.into_iter().flat_map(|datagrams| {
    -638                        PacketizeIter::<_, MAX_PAYLOAD_SIZE>::new(
    -639                            datagrams.remote_node,
    -640                            datagrams.datagrams.clone(),
    -641                        )
    -642                        .map(|p| {
    -643                            Ok(SendMessage::SendPacket(p.node_id, p.payload))
    -644                        })
    -645                    });
    -646                    let mut packet_stream = n0_future::stream::iter(packet_iter).inspect(|m| {
    -647                        if let Ok(SendMessage::SendPacket(_node_id, payload)) = m {
    -648                            metrics.send_relay.inc_by(payload.len() as _);
    -649                        }
    -650                    });
    -651                    let fut = client_sink.send_all(&mut packet_stream);
    -652                    self.run_sending(fut, &mut state, &mut client_stream).await?;
    -653                }
    -654                msg = client_stream.next() => {
    -655                    let Some(msg) = msg else {
    -656                        break Err(StreamClosedServerSnafu.build());
    -657                    };
    -658                    match msg {
    -659                        Ok(msg) => {
    -660                            self.handle_relay_msg(msg, &mut state);
    -661                            // reset the ping timer, we have just received a message
    -662                            ping_interval.reset();
    -663                        },
    -664                        Err(err) => break Err(ClientStreamReadSnafu.into_error(err)),
    -665                    }
    -666                }
    -667                _ = &mut self.inactive_timeout, if !self.is_home_relay => {
    -668                    debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting.");
    -669                    break Ok(());
    -670                }
    -671            }
    -672        };
    -673
    -674        if res.is_ok() {
    -675            if let Err(err) = client_sink.close().await {
    -676                debug!("Failed to close client sink gracefully: {err:#}");
    -677            }
    -678        }
    -679
    -680        res.map_err(|err| state.map_err(err))
    -681    }
    -682
    -683    fn handle_relay_msg(&mut self, msg: ReceivedMessage, state: &mut ConnectedRelayState) {
    -684        match msg {
    -685            ReceivedMessage::ReceivedPacket {
    -686                remote_node_id,
    -687                data,
    -688            } => {
    -689                trace!(len = %data.len(), "received msg");
    -690                // If this is a new sender, register a route for this peer.
    -691                if state
    -692                    .last_packet_src
    -693                    .as_ref()
    -694                    .map(|p| *p != remote_node_id)
    -695                    .unwrap_or(true)
    -696                {
    -697                    // Avoid map lookup with high throughput single peer.
    -698                    state.last_packet_src = Some(remote_node_id);
    -699                    state.nodes_present.insert(remote_node_id);
    -700                }
    -701                for datagram in PacketSplitIter::new(self.url.clone(), remote_node_id, data) {
    -702                    let Ok(datagram) = datagram else {
    -703                        warn!("Invalid packet split");
    -704                        break;
    -705                    };
    -706                    if let Err(err) = self.relay_datagrams_recv.try_send(datagram) {
    -707                        warn!("Dropping received relay packet: {err:#}");
    -708                    }
    -709                }
    +578                msg = self.inbox.recv() => {
    +579                    let Some(msg) = msg else {
    +580                        warn!("Inbox closed, shutdown.");
    +581                        break Ok(());
    +582                    };
    +583                    match msg {
    +584                        ActiveRelayMessage::SetHomeRelay(is_home) => {
    +585                            self.set_home_relay(is_home);
    +586                        }
    +587                        ActiveRelayMessage::CheckConnection(local_ips) => {
    +588                            match client_stream.local_addr() {
    +589                                Some(addr) if local_ips.contains(&addr.ip()) => {
    +590                                    let data = state.ping_tracker.new_ping();
    +591                                    let fut = client_sink.send(ClientToRelayMsg::Ping(data));
    +592                                    self.run_sending(fut, &mut state, &mut client_stream).await?;
    +593                                }
    +594                                Some(_) => break Err(LocalIpInvalidSnafu.build()),
    +595                                None => break Err(LocalAddrMissingSnafu.build()),
    +596                            }
    +597                        }
    +598                        #[cfg(test)]
    +599                        ActiveRelayMessage::GetLocalAddr(sender) => {
    +600                            let addr = client_stream.local_addr();
    +601                            sender.send(addr).ok();
    +602                        }
    +603                        #[cfg(test)]
    +604                        ActiveRelayMessage::PingServer(sender) => {
    +605                            let data = rand::random();
    +606                            state.test_pong = Some((data, sender));
    +607                            let fut = client_sink.send(ClientToRelayMsg::Ping(data));
    +608                            self.run_sending(fut, &mut state, &mut client_stream).await?;
    +609                        }
    +610                    }
    +611                }
    +612                count = self.relay_datagrams_send.recv_many(
    +613                    &mut send_datagrams_buf,
    +614                    SEND_DATAGRAM_BATCH_SIZE,
    +615                ) => {
    +616                    if count == 0 {
    +617                        warn!("Datagram inbox closed, shutdown");
    +618                        break Ok(());
    +619                    };
    +620                    self.reset_inactive_timeout();
    +621                    // TODO(frando): can we avoid the clone here?
    +622                    let metrics = self.metrics.clone();
    +623                    let packet_iter = send_datagrams_buf.drain(..).map(|item| {
    +624                        metrics.send_relay.inc_by(item.datagrams.contents.len() as _);
    +625                        Ok(ClientToRelayMsg::Datagrams {
    +626                            dst_node_id: item.remote_node,
    +627                            datagrams: item.datagrams,
    +628                        })
    +629                    });
    +630                    let mut packet_stream = n0_future::stream::iter(packet_iter);
    +631                    let fut = client_sink.send_all(&mut packet_stream);
    +632                    self.run_sending(fut, &mut state, &mut client_stream).await?;
    +633                }
    +634                msg = client_stream.next() => {
    +635                    let Some(msg) = msg else {
    +636                        break Err(StreamClosedServerSnafu.build());
    +637                    };
    +638                    match msg {
    +639                        Ok(msg) => {
    +640                            self.handle_relay_msg(msg, &mut state);
    +641                            // reset the ping timer, we have just received a message
    +642                            ping_interval.reset();
    +643                        },
    +644                        Err(err) => break Err(ClientStreamReadSnafu.into_error(err)),
    +645                    }
    +646                }
    +647                _ = &mut self.inactive_timeout, if !self.is_home_relay => {
    +648                    debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting.");
    +649                    break Ok(());
    +650                }
    +651            }
    +652        };
    +653
    +654        if res.is_ok() {
    +655            if let Err(err) = client_sink.close().await {
    +656                debug!("Failed to close client sink gracefully: {err:#}");
    +657            }
    +658        }
    +659
    +660        res.map_err(|err| state.map_err(err))
    +661    }
    +662
    +663    fn handle_relay_msg(&mut self, msg: RelayToClientMsg, state: &mut ConnectedRelayState) {
    +664        match msg {
    +665            RelayToClientMsg::Datagrams {
    +666                remote_node_id,
    +667                datagrams,
    +668            } => {
    +669                trace!(len = datagrams.contents.len(), "received msg");
    +670                // If this is a new sender, register a route for this peer.
    +671                if state
    +672                    .last_packet_src
    +673                    .as_ref()
    +674                    .map(|p| *p != remote_node_id)
    +675                    .unwrap_or(true)
    +676                {
    +677                    // Avoid map lookup with high throughput single peer.
    +678                    state.last_packet_src = Some(remote_node_id);
    +679                    state.nodes_present.insert(remote_node_id);
    +680                }
    +681
    +682                if let Err(err) = self.relay_datagrams_recv.try_send(RelayRecvDatagram {
    +683                    url: self.url.clone(),
    +684                    src: remote_node_id,
    +685                    datagrams,
    +686                }) {
    +687                    warn!("Dropping received relay packet: {err:#}");
    +688                }
    +689            }
    +690            RelayToClientMsg::NodeGone(node_id) => {
    +691                state.nodes_present.remove(&node_id);
    +692            }
    +693            RelayToClientMsg::Ping(data) => state.pong_pending = Some(data),
    +694            RelayToClientMsg::Pong(data) => {
    +695                #[cfg(test)]
    +696                {
    +697                    if let Some((expected_data, sender)) = state.test_pong.take() {
    +698                        if data == expected_data {
    +699                            sender.send(()).ok();
    +700                        } else {
    +701                            state.test_pong = Some((expected_data, sender));
    +702                        }
    +703                    }
    +704                }
    +705                state.ping_tracker.pong_received(data);
    +706                state.established = true;
    +707            }
    +708            RelayToClientMsg::Health { problem } => {
    +709                warn!("Relay server reports problem: {problem}");
     710            }
    -711            ReceivedMessage::NodeGone(node_id) => {
    -712                state.nodes_present.remove(&node_id);
    +711            RelayToClientMsg::Restarting { .. } => {
    +712                trace!("Ignoring {msg:?}")
     713            }
    -714            ReceivedMessage::Ping(data) => state.pong_pending = Some(data),
    -715            ReceivedMessage::Pong(data) => {
    -716                #[cfg(test)]
    -717                {
    -718                    if let Some((expected_data, sender)) = state.test_pong.take() {
    -719                        if data == expected_data {
    -720                            sender.send(()).ok();
    -721                        } else {
    -722                            state.test_pong = Some((expected_data, sender));
    -723                        }
    -724                    }
    -725                }
    -726                state.ping_tracker.pong_received(data);
    -727                state.established = true;
    -728            }
    -729            ReceivedMessage::Health { problem } => {
    -730                let problem = problem.as_deref().unwrap_or("unknown");
    -731                warn!("Relay server reports problem: {problem}");
    -732            }
    -733            ReceivedMessage::KeepAlive | ReceivedMessage::ServerRestarting { .. } => {
    -734                trace!("Ignoring {msg:?}")
    -735            }
    -736        }
    -737    }
    -738
    -739    /// Run the actor main loop while sending to the relay server.
    -740    ///
    -741    /// While sending the actor should not read any inboxes which will give it more things
    -742    /// to send to the relay server.
    -743    ///
    -744    /// # Returns
    -745    ///
    -746    /// On `Err` the relay connection should be disconnected.  An `Ok` return means either
    -747    /// the actor should shut down, consult the [`ActiveRelayActor::stop_token`] and
    -748    /// [`ActiveRelayActor::inactive_timeout`] for this, or the send was successful.
    -749    #[instrument(name = "tx", skip_all)]
    -750    async fn run_sending<T>(
    -751        &mut self,
    -752        sending_fut: impl Future<Output = Result<T, RunError>>,
    -753        state: &mut ConnectedRelayState,
    -754        client_stream: &mut iroh_relay::client::ClientStream,
    -755    ) -> Result<(), RelayConnectionError> {
    -756        // we use the same time as for our ping interval
    -757        let send_timeout = PING_INTERVAL;
    -758
    -759        let mut timeout = pin!(time::sleep(send_timeout));
    -760        let mut sending_fut = pin!(sending_fut);
    -761        let res = loop {
    -762            tokio::select! {
    -763                biased;
    -764                _ = self.stop_token.cancelled() => {
    -765                    break Ok(());
    -766                }
    -767                _ = &mut timeout => {
    -768                    break Err(SendTimeoutSnafu.build());
    -769                }
    -770                msg = self.prio_inbox.recv() => {
    +714        }
    +715    }
    +716
    +717    /// Run the actor main loop while sending to the relay server.
    +718    ///
    +719    /// While sending the actor should not read any inboxes which will give it more things
    +720    /// to send to the relay server.
    +721    ///
    +722    /// # Returns
    +723    ///
    +724    /// On `Err` the relay connection should be disconnected.  An `Ok` return means either
    +725    /// the actor should shut down, consult the [`ActiveRelayActor::stop_token`] and
    +726    /// [`ActiveRelayActor::inactive_timeout`] for this, or the send was successful.
    +727    #[instrument(name = "tx", skip_all)]
    +728    async fn run_sending<T>(
    +729        &mut self,
    +730        sending_fut: impl Future<Output = Result<T, RunError>>,
    +731        state: &mut ConnectedRelayState,
    +732        client_stream: &mut iroh_relay::client::ClientStream,
    +733    ) -> Result<(), RelayConnectionError> {
    +734        // we use the same time as for our ping interval
    +735        let send_timeout = PING_INTERVAL;
    +736
    +737        let mut timeout = pin!(time::sleep(send_timeout));
    +738        let mut sending_fut = pin!(sending_fut);
    +739        let res = loop {
    +740            tokio::select! {
    +741                biased;
    +742                _ = self.stop_token.cancelled() => {
    +743                    break Ok(());
    +744                }
    +745                _ = &mut timeout => {
    +746                    break Err(SendTimeoutSnafu.build());
    +747                }
    +748                msg = self.prio_inbox.recv() => {
    +749                    let Some(msg) = msg else {
    +750                        warn!("Priority inbox closed, shutdown.");
    +751                        break Ok(());
    +752                    };
    +753                    match msg {
    +754                        ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => {
    +755                            let has_peer = state.nodes_present.contains(&peer);
    +756                            sender.send(has_peer).ok();
    +757                        }
    +758                    }
    +759                }
    +760                res = &mut sending_fut => {
    +761                    match res {
    +762                        Ok(_) => break Ok(()),
    +763                        Err(err) => break Err(err),
    +764                    }
    +765                }
    +766                _ = state.ping_tracker.timeout() => {
    +767                    break Err(PingTimeoutSnafu.build());
    +768                }
    +769                // No need to read the inbox or datagrams to send.
    +770                msg = client_stream.next() => {
     771                    let Some(msg) = msg else {
    -772                        warn!("Priority inbox closed, shutdown.");
    -773                        break Ok(());
    -774                    };
    -775                    match msg {
    -776                        ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => {
    -777                            let has_peer = state.nodes_present.contains(&peer);
    -778                            sender.send(has_peer).ok();
    -779                        }
    -780                    }
    -781                }
    -782                res = &mut sending_fut => {
    -783                    match res {
    -784                        Ok(_) => break Ok(()),
    -785                        Err(err) => break Err(err),
    -786                    }
    -787                }
    -788                _ = state.ping_tracker.timeout() => {
    -789                    break Err(PingTimeoutSnafu.build());
    -790                }
    -791                // No need to read the inbox or datagrams to send.
    -792                msg = client_stream.next() => {
    -793                    let Some(msg) = msg else {
    -794                        break Err(StreamClosedServerSnafu.build());
    -795                    };
    -796                    match msg {
    -797                        Ok(msg) => self.handle_relay_msg(msg, state),
    -798                        Err(err) => break Err(ClientStreamReadSnafu.into_error(err)),
    -799                    }
    -800                }
    -801                _ = &mut self.inactive_timeout, if !self.is_home_relay => {
    -802                    debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting.");
    -803                    break Ok(());
    -804                }
    -805            }
    -806        };
    -807        res.map_err(|err| state.map_err(err))
    -808    }
    -809}
    -810
    -811/// Shared state when the [`ActiveRelayActor`] is connected to a relay server.
    -812///
    -813/// Common state between [`ActiveRelayActor::run_connected`] and
    -814/// [`ActiveRelayActor::run_sending`].
    -815#[derive(Debug)]
    -816struct ConnectedRelayState {
    -817    /// Tracks pings we have sent, awaits pong replies.
    -818    ping_tracker: PingTracker,
    -819    /// Nodes which are reachable via this relay server.
    -820    nodes_present: BTreeSet<NodeId>,
    -821    /// The [`NodeId`] from whom we received the last packet.
    -822    ///
    -823    /// This is to avoid a slower lookup in the [`ConnectedRelayState::nodes_present`] map
    -824    /// when we are only communicating to a single remote node.
    -825    last_packet_src: Option<NodeId>,
    -826    /// A pong we need to send ASAP.
    -827    pong_pending: Option<[u8; 8]>,
    -828    /// Whether the connection is to be considered established.
    -829    ///
    -830    /// This is set to `true` once a pong was received from the server.
    -831    established: bool,
    -832    #[cfg(test)]
    -833    test_pong: Option<([u8; 8], oneshot::Sender<()>)>,
    -834}
    -835
    -836impl ConnectedRelayState {
    -837    fn map_err(&self, error: RunError) -> RelayConnectionError {
    -838        if self.established {
    -839            EstablishedSnafu.into_error(error)
    -840        } else {
    -841            HandshakeSnafu.into_error(error)
    -842        }
    -843    }
    -844}
    -845
    -846pub(super) enum RelayActorMessage {
    -847    MaybeCloseRelaysOnRebind,
    -848    NetworkChange { report: Report },
    -849}
    -850
    -851#[derive(Debug, Clone)]
    -852pub(crate) struct RelaySendItem {
    -853    /// The destination for the datagrams.
    -854    pub(crate) remote_node: NodeId,
    -855    /// The home relay of the remote node.
    -856    pub(crate) url: RelayUrl,
    -857    /// One or more datagrams to send.
    -858    pub(crate) datagrams: RelayContents,
    -859}
    -860
    -861pub(super) struct RelayActor {
    -862    config: Config,
    -863    /// Queue on which to put received datagrams.
    -864    relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>,
    -865    /// The actors managing each currently used relay server.
    -866    ///
    -867    /// These actors will exit when they have any inactivity.  Otherwise they will keep
    -868    /// trying to maintain a connection to the relay server as needed.
    -869    active_relays: BTreeMap<RelayUrl, ActiveRelayHandle>,
    -870    /// The tasks for the [`ActiveRelayActor`]s in `active_relays` above.
    -871    active_relay_tasks: JoinSet<()>,
    -872    cancel_token: CancellationToken,
    -873}
    -874
    -875#[derive(Debug)]
    -876pub struct Config {
    -877    pub my_relay: Watchable<Option<RelayUrl>>,
    -878    pub secret_key: SecretKey,
    -879    #[cfg(not(wasm_browser))]
    -880    pub dns_resolver: DnsResolver,
    -881    /// Proxy
    -882    pub proxy_url: Option<Url>,
    -883    /// If the last net_report report, reports IPv6 to be available.
    -884    pub ipv6_reported: Arc<AtomicBool>,
    -885    #[cfg(any(test, feature = "test-utils"))]
    -886    pub insecure_skip_relay_cert_verify: bool,
    -887    pub metrics: Arc<MagicsockMetrics>,
    -888    pub protocol: iroh_relay::http::Protocol,
    -889}
    -890
    -891impl RelayActor {
    -892    pub(super) fn new(
    -893        config: Config,
    -894        relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>,
    -895    ) -> Self {
    -896        let cancel_token = CancellationToken::new();
    -897        Self {
    -898            config,
    -899            relay_datagram_recv_queue,
    -900            active_relays: Default::default(),
    -901            active_relay_tasks: JoinSet::new(),
    -902            cancel_token,
    -903        }
    -904    }
    -905
    -906    pub(super) async fn run(
    -907        mut self,
    -908        mut receiver: mpsc::Receiver<RelayActorMessage>,
    -909        mut datagram_send_channel: mpsc::Receiver<RelaySendItem>,
    -910    ) {
    -911        // When this future is present, it is sending pending datagrams to an
    -912        // ActiveRelayActor.  We can not process further datagrams during this time.
    -913        let mut datagram_send_fut = std::pin::pin!(MaybeFuture::none());
    -914
    -915        loop {
    -916            tokio::select! {
    -917                biased;
    -918                _ = self.cancel_token.cancelled() => {
    -919                    debug!("shutting down");
    -920                    break;
    -921                }
    -922                Some(res) = self.active_relay_tasks.join_next() => {
    -923                    match res {
    -924                        Ok(()) => (),
    -925                        Err(err) if err.is_panic() => {
    -926                            error!("ActiveRelayActor task panicked: {err:#?}");
    -927                        }
    -928                        Err(err) if err.is_cancelled() => {
    -929                            error!("ActiveRelayActor cancelled: {err:#?}");
    -930                        }
    -931                        Err(err) => error!("ActiveRelayActor failed: {err:#?}"),
    -932                    }
    -933                    self.reap_active_relays();
    -934                }
    -935                msg = receiver.recv() => {
    -936                    let Some(msg) = msg else {
    -937                        debug!("Inbox dropped, shutting down.");
    -938                        break;
    -939                    };
    -940                    let cancel_token = self.cancel_token.child_token();
    -941                    cancel_token.run_until_cancelled(self.handle_msg(msg)).await;
    -942                }
    -943                // Only poll for new datagrams if we are not blocked on sending them.
    -944                item = datagram_send_channel.recv(), if datagram_send_fut.is_none() => {
    -945                    let Some(item) = item else {
    -946                        debug!("Datagram send channel dropped, shutting down.");
    -947                        break;
    -948                    };
    -949                    let token = self.cancel_token.child_token();
    -950                    if let Some(Some(fut)) = token.run_until_cancelled(
    -951                        self.try_send_datagram(item)
    -952                    ).await {
    -953                        datagram_send_fut.as_mut().set_future(fut);
    -954                    }
    -955                }
    -956                // Only poll this future if it is in use.
    -957                _ = &mut datagram_send_fut, if datagram_send_fut.is_some() => {
    -958                    datagram_send_fut.as_mut().set_none();
    -959                }
    -960            }
    -961        }
    -962
    -963        // try shutdown
    -964        if time::timeout(Duration::from_secs(3), self.close_all_active_relays())
    -965            .await
    -966            .is_err()
    -967        {
    -968            warn!("Failed to shut down all ActiveRelayActors");
    -969        }
    -970    }
    -971
    -972    async fn handle_msg(&mut self, msg: RelayActorMessage) {
    -973        match msg {
    -974            RelayActorMessage::NetworkChange { report } => {
    -975                self.on_network_change(report).await;
    -976            }
    -977            RelayActorMessage::MaybeCloseRelaysOnRebind => {
    -978                self.maybe_close_relays_on_rebind().await;
    -979            }
    -980        }
    -981    }
    -982
    -983    /// Sends datagrams to the correct [`ActiveRelayActor`], or returns a future.
    -984    ///
    -985    /// If the datagram can not be sent immediately, because the destination channel is
    -986    /// full, a future is returned that will complete once the datagrams have been sent to
    -987    /// the [`ActiveRelayActor`].
    -988    async fn try_send_datagram(&mut self, item: RelaySendItem) -> Option<impl Future<Output = ()>> {
    -989        let url = item.url.clone();
    -990        let handle = self
    -991            .active_relay_handle_for_node(&item.url, &item.remote_node)
    -992            .await;
    -993        match handle.datagrams_send_queue.try_send(item) {
    -994            Ok(()) => None,
    -995            Err(mpsc::error::TrySendError::Closed(_)) => {
    -996                warn!(?url, "Dropped datagram(s): ActiveRelayActor closed.");
    -997                None
    -998            }
    -999            Err(mpsc::error::TrySendError::Full(item)) => {
    -1000                let sender = handle.datagrams_send_queue.clone();
    -1001                let fut = async move {
    -1002                    if sender.send(item).await.is_err() {
    -1003                        warn!(?url, "Dropped datagram(s): ActiveRelayActor closed.");
    -1004                    }
    -1005                };
    -1006                Some(fut)
    -1007            }
    -1008        }
    -1009    }
    -1010
    -1011    async fn on_network_change(&mut self, report: Report) {
    -1012        let my_relay = self.config.my_relay.get();
    -1013        if report.preferred_relay == my_relay {
    -1014            // No change.
    -1015            return;
    -1016        }
    -1017        let old_relay = self
    -1018            .config
    -1019            .my_relay
    -1020            .set(report.preferred_relay.clone())
    -1021            .unwrap_or_else(|e| e);
    -1022
    -1023        if let Some(relay_url) = report.preferred_relay {
    -1024            self.config.metrics.relay_home_change.inc();
    -1025
    -1026            // On change, notify all currently connected relay servers and
    -1027            // start connecting to our home relay if we are not already.
    -1028            info!("home is now relay {}, was {:?}", relay_url, old_relay);
    -1029            self.set_home_relay(relay_url).await;
    -1030        }
    -1031    }
    -1032
    -1033    async fn set_home_relay(&mut self, home_url: RelayUrl) {
    -1034        let home_url_ref = &home_url;
    -1035        n0_future::join_all(self.active_relays.iter().map(|(url, handle)| async move {
    -1036            let is_preferred = url == home_url_ref;
    -1037            handle
    -1038                .inbox_addr
    -1039                .send(ActiveRelayMessage::SetHomeRelay(is_preferred))
    -1040                .await
    -1041                .ok()
    -1042        }))
    -1043        .await;
    -1044        // Ensure we have an ActiveRelayActor for the current home relay.
    -1045        self.active_relay_handle(home_url);
    -1046    }
    -1047
    -1048    /// Returns the handle for the [`ActiveRelayActor`] to reach `remote_node`.
    -1049    ///
    -1050    /// The node is expected to be reachable on `url`, but if no [`ActiveRelayActor`] for
    -1051    /// `url` exists but another existing [`ActiveRelayActor`] already knows about the node,
    -1052    /// that other node is used.
    -1053    async fn active_relay_handle_for_node(
    -1054        &mut self,
    -1055        url: &RelayUrl,
    -1056        remote_node: &NodeId,
    -1057    ) -> ActiveRelayHandle {
    -1058        if let Some(handle) = self.active_relays.get(url) {
    -1059            return handle.clone();
    -1060        }
    -1061
    -1062        let mut found_relay: Option<RelayUrl> = None;
    -1063        // If we don't have an open connection to the remote node's home relay, see if
    -1064        // we have an open connection to a relay node where we'd heard from that peer
    -1065        // already.  E.g. maybe they dialed our home relay recently.
    -1066        {
    -1067            // Futures which return Some(RelayUrl) if the relay knows about the remote node.
    -1068            let check_futs = self.active_relays.iter().map(|(url, handle)| async move {
    -1069                let (tx, rx) = oneshot::channel();
    -1070                handle
    -1071                    .prio_inbox_addr
    -1072                    .send(ActiveRelayPrioMessage::HasNodeRoute(*remote_node, tx))
    -1073                    .await
    -1074                    .ok();
    -1075                match rx.await {
    -1076                    Ok(true) => Some(url.clone()),
    -1077                    _ => None,
    -1078                }
    -1079            });
    -1080            let mut futures = FuturesUnorderedBounded::from_iter(check_futs);
    -1081            while let Some(maybe_url) = futures.next().await {
    -1082                if maybe_url.is_some() {
    -1083                    found_relay = maybe_url;
    -1084                    break;
    +772                        break Err(StreamClosedServerSnafu.build());
    +773                    };
    +774                    match msg {
    +775                        Ok(msg) => self.handle_relay_msg(msg, state),
    +776                        Err(err) => break Err(ClientStreamReadSnafu.into_error(err)),
    +777                    }
    +778                }
    +779                _ = &mut self.inactive_timeout, if !self.is_home_relay => {
    +780                    debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting.");
    +781                    break Ok(());
    +782                }
    +783            }
    +784        };
    +785        res.map_err(|err| state.map_err(err))
    +786    }
    +787}
    +788
    +789/// Shared state when the [`ActiveRelayActor`] is connected to a relay server.
    +790///
    +791/// Common state between [`ActiveRelayActor::run_connected`] and
    +792/// [`ActiveRelayActor::run_sending`].
    +793#[derive(Debug)]
    +794struct ConnectedRelayState {
    +795    /// Tracks pings we have sent, awaits pong replies.
    +796    ping_tracker: PingTracker,
    +797    /// Nodes which are reachable via this relay server.
    +798    nodes_present: BTreeSet<NodeId>,
    +799    /// The [`NodeId`] from whom we received the last packet.
    +800    ///
    +801    /// This is to avoid a slower lookup in the [`ConnectedRelayState::nodes_present`] map
    +802    /// when we are only communicating to a single remote node.
    +803    last_packet_src: Option<NodeId>,
    +804    /// A pong we need to send ASAP.
    +805    pong_pending: Option<[u8; 8]>,
    +806    /// Whether the connection is to be considered established.
    +807    ///
    +808    /// This is set to `true` once a pong was received from the server.
    +809    established: bool,
    +810    #[cfg(test)]
    +811    test_pong: Option<([u8; 8], oneshot::Sender<()>)>,
    +812}
    +813
    +814impl ConnectedRelayState {
    +815    fn map_err(&self, error: RunError) -> RelayConnectionError {
    +816        if self.established {
    +817            EstablishedSnafu.into_error(error)
    +818        } else {
    +819            HandshakeSnafu.into_error(error)
    +820        }
    +821    }
    +822}
    +823
    +824pub(super) enum RelayActorMessage {
    +825    MaybeCloseRelaysOnRebind,
    +826    NetworkChange { report: Report },
    +827}
    +828
    +829#[derive(Debug, Clone)]
    +830pub(crate) struct RelaySendItem {
    +831    /// The destination for the datagrams.
    +832    pub(crate) remote_node: NodeId,
    +833    /// The home relay of the remote node.
    +834    pub(crate) url: RelayUrl,
    +835    /// One or more datagrams to send.
    +836    pub(crate) datagrams: Datagrams,
    +837}
    +838
    +839pub(super) struct RelayActor {
    +840    config: Config,
    +841    /// Queue on which to put received datagrams.
    +842    relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>,
    +843    /// The actors managing each currently used relay server.
    +844    ///
    +845    /// These actors will exit when they have any inactivity.  Otherwise they will keep
    +846    /// trying to maintain a connection to the relay server as needed.
    +847    active_relays: BTreeMap<RelayUrl, ActiveRelayHandle>,
    +848    /// The tasks for the [`ActiveRelayActor`]s in `active_relays` above.
    +849    active_relay_tasks: JoinSet<()>,
    +850    cancel_token: CancellationToken,
    +851}
    +852
    +853#[derive(Debug)]
    +854pub struct Config {
    +855    pub my_relay: Watchable<Option<RelayUrl>>,
    +856    pub secret_key: SecretKey,
    +857    #[cfg(not(wasm_browser))]
    +858    pub dns_resolver: DnsResolver,
    +859    /// Proxy
    +860    pub proxy_url: Option<Url>,
    +861    /// If the last net_report report, reports IPv6 to be available.
    +862    pub ipv6_reported: Arc<AtomicBool>,
    +863    #[cfg(any(test, feature = "test-utils"))]
    +864    pub insecure_skip_relay_cert_verify: bool,
    +865    pub metrics: Arc<MagicsockMetrics>,
    +866}
    +867
    +868impl RelayActor {
    +869    pub(super) fn new(
    +870        config: Config,
    +871        relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>,
    +872    ) -> Self {
    +873        let cancel_token = CancellationToken::new();
    +874        Self {
    +875            config,
    +876            relay_datagram_recv_queue,
    +877            active_relays: Default::default(),
    +878            active_relay_tasks: JoinSet::new(),
    +879            cancel_token,
    +880        }
    +881    }
    +882
    +883    pub(super) async fn run(
    +884        mut self,
    +885        mut receiver: mpsc::Receiver<RelayActorMessage>,
    +886        mut datagram_send_channel: mpsc::Receiver<RelaySendItem>,
    +887    ) {
    +888        // When this future is present, it is sending pending datagrams to an
    +889        // ActiveRelayActor.  We can not process further datagrams during this time.
    +890        let mut datagram_send_fut = std::pin::pin!(MaybeFuture::none());
    +891
    +892        loop {
    +893            tokio::select! {
    +894                biased;
    +895                _ = self.cancel_token.cancelled() => {
    +896                    debug!("shutting down");
    +897                    break;
    +898                }
    +899                Some(res) = self.active_relay_tasks.join_next() => {
    +900                    match res {
    +901                        Ok(()) => (),
    +902                        Err(err) if err.is_panic() => {
    +903                            error!("ActiveRelayActor task panicked: {err:#?}");
    +904                        }
    +905                        Err(err) if err.is_cancelled() => {
    +906                            error!("ActiveRelayActor cancelled: {err:#?}");
    +907                        }
    +908                        Err(err) => error!("ActiveRelayActor failed: {err:#?}"),
    +909                    }
    +910                    self.reap_active_relays();
    +911                }
    +912                msg = receiver.recv() => {
    +913                    let Some(msg) = msg else {
    +914                        debug!("Inbox dropped, shutting down.");
    +915                        break;
    +916                    };
    +917                    let cancel_token = self.cancel_token.child_token();
    +918                    cancel_token.run_until_cancelled(self.handle_msg(msg)).await;
    +919                }
    +920                // Only poll for new datagrams if we are not blocked on sending them.
    +921                item = datagram_send_channel.recv(), if datagram_send_fut.is_none() => {
    +922                    let Some(item) = item else {
    +923                        debug!("Datagram send channel dropped, shutting down.");
    +924                        break;
    +925                    };
    +926                    let token = self.cancel_token.child_token();
    +927                    if let Some(Some(fut)) = token.run_until_cancelled(
    +928                        self.try_send_datagram(item)
    +929                    ).await {
    +930                        datagram_send_fut.as_mut().set_future(fut);
    +931                    }
    +932                }
    +933                // Only poll this future if it is in use.
    +934                _ = &mut datagram_send_fut, if datagram_send_fut.is_some() => {
    +935                    datagram_send_fut.as_mut().set_none();
    +936                }
    +937            }
    +938        }
    +939
    +940        // try shutdown
    +941        if time::timeout(Duration::from_secs(3), self.close_all_active_relays())
    +942            .await
    +943            .is_err()
    +944        {
    +945            warn!("Failed to shut down all ActiveRelayActors");
    +946        }
    +947    }
    +948
    +949    async fn handle_msg(&mut self, msg: RelayActorMessage) {
    +950        match msg {
    +951            RelayActorMessage::NetworkChange { report } => {
    +952                self.on_network_change(report).await;
    +953            }
    +954            RelayActorMessage::MaybeCloseRelaysOnRebind => {
    +955                self.maybe_close_relays_on_rebind().await;
    +956            }
    +957        }
    +958    }
    +959
    +960    /// Sends datagrams to the correct [`ActiveRelayActor`], or returns a future.
    +961    ///
    +962    /// If the datagram can not be sent immediately, because the destination channel is
    +963    /// full, a future is returned that will complete once the datagrams have been sent to
    +964    /// the [`ActiveRelayActor`].
    +965    async fn try_send_datagram(
    +966        &mut self,
    +967        item: RelaySendItem,
    +968    ) -> Option<impl Future<Output = ()> + use<>> {
    +969        let url = item.url.clone();
    +970        let handle = self
    +971            .active_relay_handle_for_node(&item.url, &item.remote_node)
    +972            .await;
    +973        match handle.datagrams_send_queue.try_send(item) {
    +974            Ok(()) => None,
    +975            Err(mpsc::error::TrySendError::Closed(_)) => {
    +976                warn!(?url, "Dropped datagram(s): ActiveRelayActor closed.");
    +977                None
    +978            }
    +979            Err(mpsc::error::TrySendError::Full(item)) => {
    +980                let sender = handle.datagrams_send_queue.clone();
    +981                let fut = async move {
    +982                    if sender.send(item).await.is_err() {
    +983                        warn!(?url, "Dropped datagram(s): ActiveRelayActor closed.");
    +984                    }
    +985                };
    +986                Some(fut)
    +987            }
    +988        }
    +989    }
    +990
    +991    async fn on_network_change(&mut self, report: Report) {
    +992        let my_relay = self.config.my_relay.get();
    +993        if report.preferred_relay == my_relay {
    +994            // No change.
    +995            return;
    +996        }
    +997        let old_relay = self
    +998            .config
    +999            .my_relay
    +1000            .set(report.preferred_relay.clone())
    +1001            .unwrap_or_else(|e| e);
    +1002
    +1003        if let Some(relay_url) = report.preferred_relay {
    +1004            self.config.metrics.relay_home_change.inc();
    +1005
    +1006            // On change, notify all currently connected relay servers and
    +1007            // start connecting to our home relay if we are not already.
    +1008            info!("home is now relay {}, was {:?}", relay_url, old_relay);
    +1009            self.set_home_relay(relay_url).await;
    +1010        }
    +1011    }
    +1012
    +1013    async fn set_home_relay(&mut self, home_url: RelayUrl) {
    +1014        let home_url_ref = &home_url;
    +1015        n0_future::join_all(self.active_relays.iter().map(|(url, handle)| async move {
    +1016            let is_preferred = url == home_url_ref;
    +1017            handle
    +1018                .inbox_addr
    +1019                .send(ActiveRelayMessage::SetHomeRelay(is_preferred))
    +1020                .await
    +1021                .ok()
    +1022        }))
    +1023        .await;
    +1024        // Ensure we have an ActiveRelayActor for the current home relay.
    +1025        self.active_relay_handle(home_url);
    +1026    }
    +1027
    +1028    /// Returns the handle for the [`ActiveRelayActor`] to reach `remote_node`.
    +1029    ///
    +1030    /// The node is expected to be reachable on `url`, but if no [`ActiveRelayActor`] for
    +1031    /// `url` exists but another existing [`ActiveRelayActor`] already knows about the node,
    +1032    /// that other node is used.
    +1033    async fn active_relay_handle_for_node(
    +1034        &mut self,
    +1035        url: &RelayUrl,
    +1036        remote_node: &NodeId,
    +1037    ) -> ActiveRelayHandle {
    +1038        if let Some(handle) = self.active_relays.get(url) {
    +1039            return handle.clone();
    +1040        }
    +1041
    +1042        let mut found_relay: Option<RelayUrl> = None;
    +1043        // If we don't have an open connection to the remote node's home relay, see if
    +1044        // we have an open connection to a relay node where we'd heard from that peer
    +1045        // already.  E.g. maybe they dialed our home relay recently.
    +1046        {
    +1047            // Futures which return Some(RelayUrl) if the relay knows about the remote node.
    +1048            let check_futs = self.active_relays.iter().map(|(url, handle)| async move {
    +1049                let (tx, rx) = oneshot::channel();
    +1050                handle
    +1051                    .prio_inbox_addr
    +1052                    .send(ActiveRelayPrioMessage::HasNodeRoute(*remote_node, tx))
    +1053                    .await
    +1054                    .ok();
    +1055                match rx.await {
    +1056                    Ok(true) => Some(url.clone()),
    +1057                    _ => None,
    +1058                }
    +1059            });
    +1060            let mut futures = FuturesUnorderedBounded::from_iter(check_futs);
    +1061            while let Some(maybe_url) = futures.next().await {
    +1062                if maybe_url.is_some() {
    +1063                    found_relay = maybe_url;
    +1064                    break;
    +1065                }
    +1066            }
    +1067        }
    +1068        let url = found_relay.unwrap_or(url.clone());
    +1069        self.active_relay_handle(url)
    +1070    }
    +1071
    +1072    /// Returns the handle of the [`ActiveRelayActor`].
    +1073    fn active_relay_handle(&mut self, url: RelayUrl) -> ActiveRelayHandle {
    +1074        match self.active_relays.get(&url) {
    +1075            Some(e) => e.clone(),
    +1076            None => {
    +1077                let handle = self.start_active_relay(url.clone());
    +1078                if Some(&url) == self.config.my_relay.get().as_ref() {
    +1079                    if let Err(err) = handle
    +1080                        .inbox_addr
    +1081                        .try_send(ActiveRelayMessage::SetHomeRelay(true))
    +1082                    {
    +1083                        error!("Home relay not set, send to new actor failed: {err:#}.");
    +1084                    }
     1085                }
    -1086            }
    -1087        }
    -1088        let url = found_relay.unwrap_or(url.clone());
    -1089        self.active_relay_handle(url)
    -1090    }
    -1091
    -1092    /// Returns the handle of the [`ActiveRelayActor`].
    -1093    fn active_relay_handle(&mut self, url: RelayUrl) -> ActiveRelayHandle {
    -1094        match self.active_relays.get(&url) {
    -1095            Some(e) => e.clone(),
    -1096            None => {
    -1097                let handle = self.start_active_relay(url.clone());
    -1098                if Some(&url) == self.config.my_relay.get().as_ref() {
    -1099                    if let Err(err) = handle
    -1100                        .inbox_addr
    -1101                        .try_send(ActiveRelayMessage::SetHomeRelay(true))
    -1102                    {
    -1103                        error!("Home relay not set, send to new actor failed: {err:#}.");
    -1104                    }
    -1105                }
    -1106                self.active_relays.insert(url, handle.clone());
    -1107                self.log_active_relay();
    -1108                handle
    -1109            }
    -1110        }
    -1111    }
    -1112
    -1113    fn start_active_relay(&mut self, url: RelayUrl) -> ActiveRelayHandle {
    -1114        debug!(?url, "Adding relay connection");
    -1115
    -1116        let connection_opts = RelayConnectionOptions {
    -1117            secret_key: self.config.secret_key.clone(),
    -1118            #[cfg(not(wasm_browser))]
    -1119            dns_resolver: self.config.dns_resolver.clone(),
    -1120            proxy_url: self.config.proxy_url.clone(),
    -1121            prefer_ipv6: self.config.ipv6_reported.clone(),
    -1122            #[cfg(any(test, feature = "test-utils"))]
    -1123            insecure_skip_cert_verify: self.config.insecure_skip_relay_cert_verify,
    -1124            protocol: self.config.protocol,
    -1125        };
    -1126
    -1127        // TODO: Replace 64 with PER_CLIENT_SEND_QUEUE_DEPTH once that's unused
    -1128        let (send_datagram_tx, send_datagram_rx) = mpsc::channel(64);
    -1129        let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(32);
    -1130        let (inbox_tx, inbox_rx) = mpsc::channel(64);
    -1131        let span = info_span!("active-relay", %url);
    -1132        let opts = ActiveRelayActorOptions {
    -1133            url,
    -1134            prio_inbox_: prio_inbox_rx,
    -1135            inbox: inbox_rx,
    -1136            relay_datagrams_send: send_datagram_rx,
    -1137            relay_datagrams_recv: self.relay_datagram_recv_queue.clone(),
    -1138            connection_opts,
    -1139            stop_token: self.cancel_token.child_token(),
    -1140            metrics: self.config.metrics.clone(),
    -1141        };
    -1142        let actor = ActiveRelayActor::new(opts);
    -1143        self.active_relay_tasks.spawn(
    -1144            async move {
    -1145                actor.run().await;
    -1146            }
    -1147            .instrument(span),
    -1148        );
    -1149        let handle = ActiveRelayHandle {
    -1150            prio_inbox_addr: prio_inbox_tx,
    -1151            inbox_addr: inbox_tx,
    -1152            datagrams_send_queue: send_datagram_tx,
    -1153        };
    -1154        self.log_active_relay();
    -1155        handle
    -1156    }
    -1157
    -1158    /// Closes the relay connections not originating from a local IP address.
    -1159    ///
    -1160    /// Called in response to a rebind, any relay connection originating from an address
    -1161    /// that's not known to be currently a local IP address should be closed.  All the other
    -1162    /// relay connections are pinged.
    -1163    async fn maybe_close_relays_on_rebind(&mut self) {
    -1164        #[cfg(not(wasm_browser))]
    -1165        let ifs = interfaces::State::new().await;
    -1166        #[cfg(not(wasm_browser))]
    -1167        let local_ips: Vec<_> = ifs
    -1168            .interfaces
    -1169            .values()
    -1170            .flat_map(|netif| netif.addrs())
    -1171            .map(|ipnet| ipnet.addr())
    -1172            .collect();
    -1173        // In browsers, we don't have this information. This will do the right thing in the ActiveRelayActor, though.
    -1174        #[cfg(wasm_browser)]
    -1175        let local_ips = Vec::new();
    -1176        let send_futs = self.active_relays.values().map(|handle| {
    -1177            let local_ips = local_ips.clone();
    -1178            async move {
    -1179                handle
    -1180                    .inbox_addr
    -1181                    .send(ActiveRelayMessage::CheckConnection(local_ips))
    -1182                    .await
    -1183                    .ok();
    -1184            }
    -1185        });
    -1186        n0_future::join_all(send_futs).await;
    +1086                self.active_relays.insert(url, handle.clone());
    +1087                self.log_active_relay();
    +1088                handle
    +1089            }
    +1090        }
    +1091    }
    +1092
    +1093    fn start_active_relay(&mut self, url: RelayUrl) -> ActiveRelayHandle {
    +1094        debug!(?url, "Adding relay connection");
    +1095
    +1096        let connection_opts = RelayConnectionOptions {
    +1097            secret_key: self.config.secret_key.clone(),
    +1098            #[cfg(not(wasm_browser))]
    +1099            dns_resolver: self.config.dns_resolver.clone(),
    +1100            proxy_url: self.config.proxy_url.clone(),
    +1101            prefer_ipv6: self.config.ipv6_reported.clone(),
    +1102            #[cfg(any(test, feature = "test-utils"))]
    +1103            insecure_skip_cert_verify: self.config.insecure_skip_relay_cert_verify,
    +1104        };
    +1105
    +1106        // TODO: Replace 64 with PER_CLIENT_SEND_QUEUE_DEPTH once that's unused
    +1107        let (send_datagram_tx, send_datagram_rx) = mpsc::channel(64);
    +1108        let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(32);
    +1109        let (inbox_tx, inbox_rx) = mpsc::channel(64);
    +1110        let span = info_span!("active-relay", %url);
    +1111        let opts = ActiveRelayActorOptions {
    +1112            url,
    +1113            prio_inbox_: prio_inbox_rx,
    +1114            inbox: inbox_rx,
    +1115            relay_datagrams_send: send_datagram_rx,
    +1116            relay_datagrams_recv: self.relay_datagram_recv_queue.clone(),
    +1117            connection_opts,
    +1118            stop_token: self.cancel_token.child_token(),
    +1119            metrics: self.config.metrics.clone(),
    +1120        };
    +1121        let actor = ActiveRelayActor::new(opts);
    +1122        self.active_relay_tasks.spawn(
    +1123            async move {
    +1124                actor.run().await;
    +1125            }
    +1126            .instrument(span),
    +1127        );
    +1128        let handle = ActiveRelayHandle {
    +1129            prio_inbox_addr: prio_inbox_tx,
    +1130            inbox_addr: inbox_tx,
    +1131            datagrams_send_queue: send_datagram_tx,
    +1132        };
    +1133        self.log_active_relay();
    +1134        handle
    +1135    }
    +1136
    +1137    /// Closes the relay connections not originating from a local IP address.
    +1138    ///
    +1139    /// Called in response to a rebind, any relay connection originating from an address
    +1140    /// that's not known to be currently a local IP address should be closed.  All the other
    +1141    /// relay connections are pinged.
    +1142    async fn maybe_close_relays_on_rebind(&mut self) {
    +1143        #[cfg(not(wasm_browser))]
    +1144        let ifs = interfaces::State::new().await;
    +1145        #[cfg(not(wasm_browser))]
    +1146        let local_ips: Vec<_> = ifs
    +1147            .interfaces
    +1148            .values()
    +1149            .flat_map(|netif| netif.addrs())
    +1150            .map(|ipnet| ipnet.addr())
    +1151            .collect();
    +1152        // In browsers, we don't have this information. This will do the right thing in the ActiveRelayActor, though.
    +1153        #[cfg(wasm_browser)]
    +1154        let local_ips = Vec::new();
    +1155        let send_futs = self.active_relays.values().map(|handle| {
    +1156            let local_ips = local_ips.clone();
    +1157            async move {
    +1158                handle
    +1159                    .inbox_addr
    +1160                    .send(ActiveRelayMessage::CheckConnection(local_ips))
    +1161                    .await
    +1162                    .ok();
    +1163            }
    +1164        });
    +1165        n0_future::join_all(send_futs).await;
    +1166        self.log_active_relay();
    +1167    }
    +1168
    +1169    /// Cleans up [`ActiveRelayActor`]s which have stopped running.
    +1170    fn reap_active_relays(&mut self) {
    +1171        self.active_relays
    +1172            .retain(|_url, handle| !handle.inbox_addr.is_closed());
    +1173
    +1174        // Make sure home relay exists
    +1175        if let Some(url) = self.config.my_relay.get() {
    +1176            self.active_relay_handle(url);
    +1177        }
    +1178        self.log_active_relay();
    +1179    }
    +1180
    +1181    /// Stops all [`ActiveRelayActor`]s and awaits for them to finish.
    +1182    async fn close_all_active_relays(&mut self) {
    +1183        self.cancel_token.cancel();
    +1184        let tasks = std::mem::take(&mut self.active_relay_tasks);
    +1185        tasks.join_all().await;
    +1186
     1187        self.log_active_relay();
     1188    }
     1189
    -1190    /// Cleans up [`ActiveRelayActor`]s which have stopped running.
    -1191    fn reap_active_relays(&mut self) {
    -1192        self.active_relays
    -1193            .retain(|_url, handle| !handle.inbox_addr.is_closed());
    -1194
    -1195        // Make sure home relay exists
    -1196        if let Some(url) = self.config.my_relay.get() {
    -1197            self.active_relay_handle(url);
    -1198        }
    -1199        self.log_active_relay();
    -1200    }
    -1201
    -1202    /// Stops all [`ActiveRelayActor`]s and awaits for them to finish.
    -1203    async fn close_all_active_relays(&mut self) {
    -1204        self.cancel_token.cancel();
    -1205        let tasks = std::mem::take(&mut self.active_relay_tasks);
    -1206        tasks.join_all().await;
    -1207
    -1208        self.log_active_relay();
    -1209    }
    +1190    fn log_active_relay(&self) {
    +1191        debug!("{} active relay conns{}", self.active_relays.len(), {
    +1192            let mut s = String::new();
    +1193            if !self.active_relays.is_empty() {
    +1194                s += ":";
    +1195                for node in self.active_relay_sorted() {
    +1196                    s += &format!(" relay-{node}");
    +1197                }
    +1198            }
    +1199            s
    +1200        });
    +1201    }
    +1202
    +1203    fn active_relay_sorted(&self) -> impl Iterator<Item = RelayUrl> + use<> {
    +1204        let mut ids: Vec<_> = self.active_relays.keys().cloned().collect();
    +1205        ids.sort();
    +1206
    +1207        ids.into_iter()
    +1208    }
    +1209}
     1210
    -1211    fn log_active_relay(&self) {
    -1212        debug!("{} active relay conns{}", self.active_relays.len(), {
    -1213            let mut s = String::new();
    -1214            if !self.active_relays.is_empty() {
    -1215                s += ":";
    -1216                for node in self.active_relay_sorted() {
    -1217                    s += &format!(" relay-{}", node,);
    -1218                }
    -1219            }
    -1220            s
    -1221        });
    -1222    }
    -1223
    -1224    fn active_relay_sorted(&self) -> impl Iterator<Item = RelayUrl> {
    -1225        let mut ids: Vec<_> = self.active_relays.keys().cloned().collect();
    -1226        ids.sort();
    -1227
    -1228        ids.into_iter()
    -1229    }
    -1230}
    -1231
    -1232/// Handle to one [`ActiveRelayActor`].
    -1233#[derive(Debug, Clone)]
    -1234struct ActiveRelayHandle {
    -1235    prio_inbox_addr: mpsc::Sender<ActiveRelayPrioMessage>,
    -1236    inbox_addr: mpsc::Sender<ActiveRelayMessage>,
    -1237    datagrams_send_queue: mpsc::Sender<RelaySendItem>,
    -1238}
    -1239
    -1240/// A packet to send over the relay.
    -1241///
    -1242/// This is nothing but a newtype, it should be constructed using [`PacketizeIter`].  This
    -1243/// is a packet of one or more datagrams, each prefixed with a u16-be length.  This is what
    -1244/// the `Frame::SendPacket` of the `DerpCodec` transports and is produced by
    -1245/// [`PacketizeIter`] and transformed back into datagrams using [`PacketSplitIter`].
    -1246#[derive(Debug, PartialEq, Eq)]
    -1247struct RelaySendPacket {
    -1248    node_id: NodeId,
    -1249    payload: Bytes,
    -1250}
    -1251
    -1252/// A single datagram received from a relay server.
    -1253///
    -1254/// This could be either a QUIC or DISCO packet.
    -1255#[derive(Debug)]
    -1256pub(crate) struct RelayRecvDatagram {
    -1257    pub(crate) url: RelayUrl,
    -1258    pub(crate) src: NodeId,
    -1259    pub(crate) buf: Bytes,
    -1260}
    -1261
    -1262/// Combines datagrams into a single DISCO frame of at most MAX_PACKET_SIZE.
    -1263///
    -1264/// The disco `iroh_relay::protos::Frame::SendPacket` frame can contain more then a single
    -1265/// datagram.  Each datagram in this frame is prefixed with a little-endian 2-byte length
    -1266/// prefix.  This occurs when Quinn sends a GSO transmit containing more than one datagram,
    -1267/// which are split using `split_packets`.
    -1268///
    -1269/// The [`PacketSplitIter`] does the inverse and splits such packets back into individual
    -1270/// datagrams.
    -1271struct PacketizeIter<I: Iterator, const N: usize> {
    -1272    node_id: NodeId,
    -1273    iter: std::iter::Peekable<I>,
    -1274    buffer: BytesMut,
    -1275}
    -1276
    -1277impl<I: Iterator, const N: usize> PacketizeIter<I, N> {
    -1278    /// Create a new new PacketizeIter from something that can be turned into an
    -1279    /// iterator of slices, like a `Vec<Bytes>`.
    -1280    fn new(node_id: NodeId, iter: impl IntoIterator<IntoIter = I>) -> Self {
    -1281        Self {
    -1282            node_id,
    -1283            iter: iter.into_iter().peekable(),
    -1284            buffer: BytesMut::with_capacity(N),
    -1285        }
    -1286    }
    -1287}
    -1288
    -1289impl<I: Iterator, const N: usize> Iterator for PacketizeIter<I, N>
    -1290where
    -1291    I::Item: AsRef<[u8]>,
    -1292{
    -1293    type Item = RelaySendPacket;
    -1294
    -1295    fn next(&mut self) -> Option<Self::Item> {
    -1296        use bytes::BufMut;
    -1297        while let Some(next_bytes) = self.iter.peek() {
    -1298            let next_bytes = next_bytes.as_ref();
    -1299            assert!(next_bytes.len() + 2 <= N);
    -1300            let next_length: u16 = next_bytes.len().try_into().expect("items < 64k size");
    -1301            if self.buffer.len() + next_bytes.len() + 2 > N {
    -1302                break;
    -1303            }
    -1304            self.buffer.put_u16_le(next_length);
    -1305            self.buffer.put_slice(next_bytes);
    -1306            self.iter.next();
    -1307        }
    -1308        if !self.buffer.is_empty() {
    -1309            Some(RelaySendPacket {
    -1310                node_id: self.node_id,
    -1311                payload: self.buffer.split().freeze(),
    -1312            })
    -1313        } else {
    -1314            None
    -1315        }
    -1316    }
    -1317}
    -1318
    -1319/// Splits a single [`ReceivedMessage::ReceivedPacket`] frame into datagrams.
    -1320///
    -1321/// This splits packets joined by [`PacketizeIter`] back into individual datagrams.  See
    -1322/// that struct for more details.
    -1323#[derive(Debug)]
    -1324struct PacketSplitIter {
    -1325    url: RelayUrl,
    -1326    src: NodeId,
    -1327    bytes: Bytes,
    -1328}
    -1329
    -1330impl PacketSplitIter {
    -1331    /// Create a new PacketSplitIter from a packet.
    -1332    fn new(url: RelayUrl, src: NodeId, bytes: Bytes) -> Self {
    -1333        Self { url, src, bytes }
    -1334    }
    -1335
    -1336    fn fail(&mut self) -> Option<std::io::Result<RelayRecvDatagram>> {
    -1337        self.bytes.clear();
    -1338        Some(Err(std::io::Error::new(
    -1339            std::io::ErrorKind::UnexpectedEof,
    -1340            "",
    -1341        )))
    +1211/// Handle to one [`ActiveRelayActor`].
    +1212#[derive(Debug, Clone)]
    +1213struct ActiveRelayHandle {
    +1214    prio_inbox_addr: mpsc::Sender<ActiveRelayPrioMessage>,
    +1215    inbox_addr: mpsc::Sender<ActiveRelayMessage>,
    +1216    datagrams_send_queue: mpsc::Sender<RelaySendItem>,
    +1217}
    +1218
    +1219/// A single datagram received from a relay server.
    +1220///
    +1221/// This could be either a QUIC or DISCO packet.
    +1222#[derive(Debug)]
    +1223pub(crate) struct RelayRecvDatagram {
    +1224    pub(crate) url: RelayUrl,
    +1225    pub(crate) src: NodeId,
    +1226    pub(crate) datagrams: Datagrams,
    +1227}
    +1228
    +1229#[cfg(test)]
    +1230mod tests {
    +1231    use std::{
    +1232        sync::{Arc, atomic::AtomicBool},
    +1233        time::Duration,
    +1234    };
    +1235
    +1236    use iroh_base::{NodeId, RelayUrl, SecretKey};
    +1237    use iroh_relay::{PingTracker, protos::relay::Datagrams};
    +1238    use n0_snafu::{Error, Result, ResultExt};
    +1239    use tokio::sync::{mpsc, oneshot};
    +1240    use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle};
    +1241    use tracing::{Instrument, info, info_span};
    +1242    use tracing_test::traced_test;
    +1243
    +1244    use super::{
    +1245        ActiveRelayActor, ActiveRelayActorOptions, ActiveRelayMessage, ActiveRelayPrioMessage,
    +1246        RELAY_INACTIVE_CLEANUP_TIME, RelayConnectionOptions, RelayRecvDatagram, RelaySendItem,
    +1247        UNDELIVERABLE_DATAGRAM_TIMEOUT,
    +1248    };
    +1249    use crate::{dns::DnsResolver, test_utils};
    +1250
    +1251    /// Starts a new [`ActiveRelayActor`].
    +1252    #[allow(clippy::too_many_arguments)]
    +1253    fn start_active_relay_actor(
    +1254        secret_key: SecretKey,
    +1255        stop_token: CancellationToken,
    +1256        url: RelayUrl,
    +1257        prio_inbox_rx: mpsc::Receiver<ActiveRelayPrioMessage>,
    +1258        inbox_rx: mpsc::Receiver<ActiveRelayMessage>,
    +1259        relay_datagrams_send: mpsc::Receiver<RelaySendItem>,
    +1260        relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>,
    +1261        span: tracing::Span,
    +1262    ) -> AbortOnDropHandle<()> {
    +1263        let opts = ActiveRelayActorOptions {
    +1264            url,
    +1265            prio_inbox_: prio_inbox_rx,
    +1266            inbox: inbox_rx,
    +1267            relay_datagrams_send,
    +1268            relay_datagrams_recv,
    +1269            connection_opts: RelayConnectionOptions {
    +1270                secret_key,
    +1271                dns_resolver: DnsResolver::new(),
    +1272                proxy_url: None,
    +1273                prefer_ipv6: Arc::new(AtomicBool::new(true)),
    +1274                insecure_skip_cert_verify: true,
    +1275            },
    +1276            stop_token,
    +1277            metrics: Default::default(),
    +1278        };
    +1279        let task = tokio::spawn(ActiveRelayActor::new(opts).run().instrument(span));
    +1280        AbortOnDropHandle::new(task)
    +1281    }
    +1282
    +1283    /// Starts an [`ActiveRelayActor`] as an "iroh echo node".
    +1284    ///
    +1285    /// This actor will connect to the relay server, pretending to be an iroh node, and echo
    +1286    /// back any datagram it receives from the relay.  This is used by the
    +1287    /// [`ActiveRelayNode`] under test to check connectivity works.
    +1288    fn start_echo_node(relay_url: RelayUrl) -> (NodeId, AbortOnDropHandle<()>) {
    +1289        let secret_key = SecretKey::from_bytes(&[8u8; 32]);
    +1290        let (recv_datagram_tx, mut recv_datagram_rx) = mpsc::channel(16);
    +1291        let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16);
    +1292        let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8);
    +1293        let (inbox_tx, inbox_rx) = mpsc::channel(16);
    +1294        let cancel_token = CancellationToken::new();
    +1295        let actor_task = start_active_relay_actor(
    +1296            secret_key.clone(),
    +1297            cancel_token.clone(),
    +1298            relay_url.clone(),
    +1299            prio_inbox_rx,
    +1300            inbox_rx,
    +1301            send_datagram_rx,
    +1302            recv_datagram_tx,
    +1303            info_span!("echo-node"),
    +1304        );
    +1305        let echo_task = tokio::spawn({
    +1306            let relay_url = relay_url.clone();
    +1307            async move {
    +1308                loop {
    +1309                    let datagram = recv_datagram_rx.recv().await;
    +1310                    if let Some(recv) = datagram {
    +1311                        let RelayRecvDatagram {
    +1312                            url: _,
    +1313                            src,
    +1314                            datagrams,
    +1315                        } = recv;
    +1316                        info!(from = %src.fmt_short(), "Received datagram");
    +1317                        let send = RelaySendItem {
    +1318                            remote_node: src,
    +1319                            url: relay_url.clone(),
    +1320                            datagrams,
    +1321                        };
    +1322                        send_datagram_tx.send(send).await.ok();
    +1323                    }
    +1324                }
    +1325            }
    +1326            .instrument(info_span!("echo-task"))
    +1327        });
    +1328        let echo_task = AbortOnDropHandle::new(echo_task);
    +1329        let supervisor_task = tokio::spawn(async move {
    +1330            let _guard = cancel_token.drop_guard();
    +1331            // move the inboxes here so it is not dropped, as this stops the actor.
    +1332            let _prio_inbox_tx = prio_inbox_tx;
    +1333            let _inbox_tx = inbox_tx;
    +1334            tokio::select! {
    +1335                biased;
    +1336                _ = actor_task => (),
    +1337                _ = echo_task => (),
    +1338            };
    +1339        });
    +1340        let supervisor_task = AbortOnDropHandle::new(supervisor_task);
    +1341        (secret_key.public(), supervisor_task)
     1342    }
    -1343}
    -1344
    -1345impl Iterator for PacketSplitIter {
    -1346    type Item = std::io::Result<RelayRecvDatagram>;
    -1347
    -1348    fn next(&mut self) -> Option<Self::Item> {
    -1349        use bytes::Buf;
    -1350        if self.bytes.has_remaining() {
    -1351            if self.bytes.remaining() < 2 {
    -1352                return self.fail();
    -1353            }
    -1354            let len = self.bytes.get_u16_le() as usize;
    -1355            if self.bytes.remaining() < len {
    -1356                return self.fail();
    -1357            }
    -1358            let buf = self.bytes.split_to(len);
    -1359            Some(Ok(RelayRecvDatagram {
    -1360                url: self.url.clone(),
    -1361                src: self.src,
    -1362                buf,
    -1363            }))
    -1364        } else {
    -1365            None
    -1366        }
    -1367    }
    -1368}
    -1369
    -1370#[cfg(test)]
    -1371mod tests {
    -1372    use std::{
    -1373        sync::{atomic::AtomicBool, Arc},
    -1374        time::Duration,
    -1375    };
    -1376
    -1377    use bytes::Bytes;
    -1378    use iroh_base::{NodeId, RelayUrl, SecretKey};
    -1379    use iroh_relay::PingTracker;
    -1380    use n0_snafu::{Error, Result, ResultExt};
    -1381    use smallvec::smallvec;
    -1382    use tokio::sync::{mpsc, oneshot};
    -1383    use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle};
    -1384    use tracing::{info, info_span, Instrument};
    -1385    use tracing_test::traced_test;
    -1386
    -1387    use super::{
    -1388        ActiveRelayActor, ActiveRelayActorOptions, ActiveRelayMessage, ActiveRelayPrioMessage,
    -1389        PacketizeIter, RelayConnectionOptions, RelayRecvDatagram, RelaySendItem, MAX_PACKET_SIZE,
    -1390        RELAY_INACTIVE_CLEANUP_TIME, UNDELIVERABLE_DATAGRAM_TIMEOUT,
    -1391    };
    -1392    use crate::{dns::DnsResolver, test_utils};
    -1393
    -1394    #[test]
    -1395    fn test_packetize_iter() {
    -1396        let node_id = SecretKey::generate(rand::thread_rng()).public();
    -1397        let empty_vec: Vec<Bytes> = Vec::new();
    -1398        let mut iter = PacketizeIter::<_, MAX_PACKET_SIZE>::new(node_id, empty_vec);
    -1399        assert_eq!(None, iter.next());
    -1400
    -1401        let single_vec = vec!["Hello"];
    -1402        let iter = PacketizeIter::<_, MAX_PACKET_SIZE>::new(node_id, single_vec);
    -1403        let result = iter.collect::<Vec<_>>();
    -1404        assert_eq!(1, result.len());
    -1405        assert_eq!(
    -1406            &[5, 0, b'H', b'e', b'l', b'l', b'o'],
    -1407            &result[0].payload[..]
    -1408        );
    -1409
    -1410        let spacer = vec![0u8; MAX_PACKET_SIZE - 10];
    -1411        let multiple_vec = vec![&b"Hello"[..], &spacer, &b"World"[..]];
    -1412        let iter = PacketizeIter::<_, MAX_PACKET_SIZE>::new(node_id, multiple_vec);
    -1413        let result = iter.collect::<Vec<_>>();
    -1414        assert_eq!(2, result.len());
    -1415        assert_eq!(
    -1416            &[5, 0, b'H', b'e', b'l', b'l', b'o'],
    -1417            &result[0].payload[..7]
    -1418        );
    -1419        assert_eq!(
    -1420            &[5, 0, b'W', b'o', b'r', b'l', b'd'],
    -1421            &result[1].payload[..]
    -1422        );
    -1423    }
    -1424
    -1425    /// Starts a new [`ActiveRelayActor`].
    -1426    #[allow(clippy::too_many_arguments)]
    -1427    fn start_active_relay_actor(
    -1428        secret_key: SecretKey,
    -1429        stop_token: CancellationToken,
    -1430        url: RelayUrl,
    -1431        prio_inbox_rx: mpsc::Receiver<ActiveRelayPrioMessage>,
    -1432        inbox_rx: mpsc::Receiver<ActiveRelayMessage>,
    -1433        relay_datagrams_send: mpsc::Receiver<RelaySendItem>,
    -1434        relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>,
    -1435        span: tracing::Span,
    -1436    ) -> AbortOnDropHandle<()> {
    -1437        let opts = ActiveRelayActorOptions {
    -1438            url,
    -1439            prio_inbox_: prio_inbox_rx,
    -1440            inbox: inbox_rx,
    -1441            relay_datagrams_send,
    -1442            relay_datagrams_recv,
    -1443            connection_opts: RelayConnectionOptions {
    -1444                secret_key,
    -1445                dns_resolver: DnsResolver::new(),
    -1446                proxy_url: None,
    -1447                prefer_ipv6: Arc::new(AtomicBool::new(true)),
    -1448                insecure_skip_cert_verify: true,
    -1449                protocol: iroh_relay::http::Protocol::default(),
    -1450            },
    -1451            stop_token,
    -1452            metrics: Default::default(),
    -1453        };
    -1454        let task = tokio::spawn(ActiveRelayActor::new(opts).run().instrument(span));
    -1455        AbortOnDropHandle::new(task)
    -1456    }
    -1457
    -1458    /// Starts an [`ActiveRelayActor`] as an "iroh echo node".
    -1459    ///
    -1460    /// This actor will connect to the relay server, pretending to be an iroh node, and echo
    -1461    /// back any datagram it receives from the relay.  This is used by the
    -1462    /// [`ActiveRelayNode`] under test to check connectivity works.
    -1463    fn start_echo_node(relay_url: RelayUrl) -> (NodeId, AbortOnDropHandle<()>) {
    -1464        let secret_key = SecretKey::from_bytes(&[8u8; 32]);
    -1465        let (recv_datagram_tx, mut recv_datagram_rx) = mpsc::channel(16);
    -1466        let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16);
    -1467        let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8);
    -1468        let (inbox_tx, inbox_rx) = mpsc::channel(16);
    -1469        let cancel_token = CancellationToken::new();
    -1470        let actor_task = start_active_relay_actor(
    -1471            secret_key.clone(),
    -1472            cancel_token.clone(),
    -1473            relay_url.clone(),
    -1474            prio_inbox_rx,
    -1475            inbox_rx,
    -1476            send_datagram_rx,
    -1477            recv_datagram_tx,
    -1478            info_span!("echo-node"),
    -1479        );
    -1480        let echo_task = tokio::spawn({
    -1481            let relay_url = relay_url.clone();
    -1482            async move {
    -1483                loop {
    -1484                    let datagram = recv_datagram_rx.recv().await;
    -1485                    if let Some(recv) = datagram {
    -1486                        let RelayRecvDatagram { url: _, src, buf } = recv;
    -1487                        info!(from = src.fmt_short(), "Received datagram");
    -1488                        let send = RelaySendItem {
    -1489                            remote_node: src,
    -1490                            url: relay_url.clone(),
    -1491                            datagrams: smallvec![buf],
    -1492                        };
    -1493                        send_datagram_tx.send(send).await.ok();
    -1494                    }
    -1495                }
    -1496            }
    -1497            .instrument(info_span!("echo-task"))
    -1498        });
    -1499        let echo_task = AbortOnDropHandle::new(echo_task);
    -1500        let supervisor_task = tokio::spawn(async move {
    -1501            let _guard = cancel_token.drop_guard();
    -1502            // move the inboxes here so it is not dropped, as this stops the actor.
    -1503            let _prio_inbox_tx = prio_inbox_tx;
    -1504            let _inbox_tx = inbox_tx;
    -1505            tokio::select! {
    -1506                biased;
    -1507                _ = actor_task => (),
    -1508                _ = echo_task => (),
    -1509            };
    -1510        });
    -1511        let supervisor_task = AbortOnDropHandle::new(supervisor_task);
    -1512        (secret_key.public(), supervisor_task)
    -1513    }
    -1514
    -1515    /// Sends a message to the echo node, receives the response.
    -1516    ///
    -1517    /// This takes care of retry and timeout.  Because we don't know when both the
    -1518    /// node-under-test and the echo node will be ready and datagrams aren't queued to send
    -1519    /// forever, we have to retry a few times.
    -1520    async fn send_recv_echo(
    -1521        item: RelaySendItem,
    -1522        tx: &mpsc::Sender<RelaySendItem>,
    -1523        rx: &mut mpsc::Receiver<RelayRecvDatagram>,
    -1524    ) -> Result<()> {
    -1525        assert!(item.datagrams.len() == 1);
    -1526        tokio::time::timeout(Duration::from_secs(10), async move {
    -1527            loop {
    -1528                let res = tokio::time::timeout(UNDELIVERABLE_DATAGRAM_TIMEOUT, async {
    -1529                    tx.send(item.clone()).await.context("send item")?;
    -1530                    let RelayRecvDatagram {
    -1531                        url: _,
    -1532                        src: _,
    -1533                        buf,
    -1534                    } = rx.recv().await.unwrap();
    -1535
    -1536                    assert_eq!(buf.as_ref(), item.datagrams[0]);
    -1537
    -1538                    Ok::<_, Error>(())
    -1539                })
    -1540                .await;
    -1541                if res.is_ok() {
    -1542                    break;
    -1543                }
    -1544            }
    -1545        })
    -1546        .await
    -1547        .expect("overall timeout exceeded");
    -1548        Ok(())
    -1549    }
    +1343
    +1344    /// Sends a message to the echo node, receives the response.
    +1345    ///
    +1346    /// This takes care of retry and timeout.  Because we don't know when both the
    +1347    /// node-under-test and the echo node will be ready and datagrams aren't queued to send
    +1348    /// forever, we have to retry a few times.
    +1349    async fn send_recv_echo(
    +1350        item: RelaySendItem,
    +1351        tx: &mpsc::Sender<RelaySendItem>,
    +1352        rx: &mut mpsc::Receiver<RelayRecvDatagram>,
    +1353    ) -> Result<()> {
    +1354        tokio::time::timeout(Duration::from_secs(10), async move {
    +1355            loop {
    +1356                let res = tokio::time::timeout(UNDELIVERABLE_DATAGRAM_TIMEOUT, async {
    +1357                    tx.send(item.clone()).await.context("send item")?;
    +1358                    let RelayRecvDatagram {
    +1359                        url: _,
    +1360                        src: _,
    +1361                        datagrams,
    +1362                    } = rx.recv().await.unwrap();
    +1363
    +1364                    assert_eq!(datagrams, item.datagrams);
    +1365
    +1366                    Ok::<_, Error>(())
    +1367                })
    +1368                .await;
    +1369                if res.is_ok() {
    +1370                    break;
    +1371                }
    +1372            }
    +1373        })
    +1374        .await
    +1375        .expect("overall timeout exceeded");
    +1376        Ok(())
    +1377    }
    +1378
    +1379    #[tokio::test]
    +1380    #[traced_test]
    +1381    async fn test_active_relay_reconnect() -> Result {
    +1382        let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?;
    +1383        let (peer_node, _echo_node_task) = start_echo_node(relay_url.clone());
    +1384
    +1385        let secret_key = SecretKey::from_bytes(&[1u8; 32]);
    +1386        let (datagram_recv_tx, mut datagram_recv_rx) = mpsc::channel(16);
    +1387        let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16);
    +1388        let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8);
    +1389        let (inbox_tx, inbox_rx) = mpsc::channel(16);
    +1390        let cancel_token = CancellationToken::new();
    +1391        let task = start_active_relay_actor(
    +1392            secret_key,
    +1393            cancel_token.clone(),
    +1394            relay_url.clone(),
    +1395            prio_inbox_rx,
    +1396            inbox_rx,
    +1397            send_datagram_rx,
    +1398            datagram_recv_tx.clone(),
    +1399            info_span!("actor-under-test"),
    +1400        );
    +1401
    +1402        // Send a datagram to our echo node.
    +1403        info!("first echo");
    +1404        let hello_send_item = RelaySendItem {
    +1405            remote_node: peer_node,
    +1406            url: relay_url.clone(),
    +1407            datagrams: Datagrams::from(b"hello"),
    +1408        };
    +1409        send_recv_echo(
    +1410            hello_send_item.clone(),
    +1411            &send_datagram_tx,
    +1412            &mut datagram_recv_rx,
    +1413        )
    +1414        .await?;
    +1415
    +1416        // Now ask to check the connection, triggering a ping but no reconnect.
    +1417        let (tx, rx) = oneshot::channel();
    +1418        inbox_tx
    +1419            .send(ActiveRelayMessage::GetLocalAddr(tx))
    +1420            .await
    +1421            .context("send get local addr msg")?;
    +1422
    +1423        let local_addr = rx
    +1424            .await
    +1425            .context("wait for local addr msg")?
    +1426            .context("no local addr")?;
    +1427        info!(?local_addr, "check connection with addr");
    +1428        inbox_tx
    +1429            .send(ActiveRelayMessage::CheckConnection(vec![local_addr.ip()]))
    +1430            .await
    +1431            .context("send check connection message")?;
    +1432
    +1433        // Sync the ActiveRelayActor. Ping blocks it and we want to be sure it has handled
    +1434        // another inbox message before continuing.
    +1435        let (tx, rx) = oneshot::channel();
    +1436        inbox_tx
    +1437            .send(ActiveRelayMessage::GetLocalAddr(tx))
    +1438            .await
    +1439            .context("send get local addr msg")?;
    +1440        rx.await.context("recv send local addr msg")?;
    +1441
    +1442        // Echo should still work.
    +1443        info!("second echo");
    +1444        send_recv_echo(
    +1445            hello_send_item.clone(),
    +1446            &send_datagram_tx,
    +1447            &mut datagram_recv_rx,
    +1448        )
    +1449        .await?;
    +1450
    +1451        // Now ask to check the connection, this will reconnect without pinging because we
    +1452        // do not supply any "valid" local IP addresses.
    +1453        info!("check connection");
    +1454        inbox_tx
    +1455            .send(ActiveRelayMessage::CheckConnection(Vec::new()))
    +1456            .await
    +1457            .context("send check connection msg")?;
    +1458
    +1459        // Give some time to reconnect, mostly to sort logs rather than functional.
    +1460        tokio::time::sleep(Duration::from_millis(10)).await;
    +1461
    +1462        // Echo should still work.
    +1463        info!("third echo");
    +1464        send_recv_echo(
    +1465            hello_send_item.clone(),
    +1466            &send_datagram_tx,
    +1467            &mut datagram_recv_rx,
    +1468        )
    +1469        .await?;
    +1470
    +1471        // Shut down the actor.
    +1472        cancel_token.cancel();
    +1473        task.await.context("wait for task to finish")?;
    +1474
    +1475        Ok(())
    +1476    }
    +1477
    +1478    #[tokio::test]
    +1479    #[traced_test]
    +1480    async fn test_active_relay_inactive() -> Result {
    +1481        let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?;
    +1482
    +1483        let secret_key = SecretKey::from_bytes(&[1u8; 32]);
    +1484        let (datagram_recv_tx, _datagram_recv_rx) = mpsc::channel(16);
    +1485        let (_send_datagram_tx, send_datagram_rx) = mpsc::channel(16);
    +1486        let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8);
    +1487        let (inbox_tx, inbox_rx) = mpsc::channel(16);
    +1488        let cancel_token = CancellationToken::new();
    +1489        let mut task = start_active_relay_actor(
    +1490            secret_key,
    +1491            cancel_token.clone(),
    +1492            relay_url,
    +1493            prio_inbox_rx,
    +1494            inbox_rx,
    +1495            send_datagram_rx,
    +1496            datagram_recv_tx,
    +1497            info_span!("actor-under-test"),
    +1498        );
    +1499
    +1500        // Wait until the actor is connected to the relay server.
    +1501        tokio::time::timeout(Duration::from_millis(200), async {
    +1502            loop {
    +1503                let (tx, rx) = oneshot::channel();
    +1504                inbox_tx.send(ActiveRelayMessage::PingServer(tx)).await.ok();
    +1505                if tokio::time::timeout(Duration::from_millis(100), rx)
    +1506                    .await
    +1507                    .map(|resp| resp.is_ok())
    +1508                    .unwrap_or_default()
    +1509                {
    +1510                    break;
    +1511                }
    +1512            }
    +1513        })
    +1514        .await
    +1515        .context("timeout")?;
    +1516
    +1517        // From now on, we pause time
    +1518        tokio::time::pause();
    +1519        // We now have an idling ActiveRelayActor.  If we advance time just a little it
    +1520        // should stay alive.
    +1521        info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME / 2");
    +1522        tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME / 2).await;
    +1523
    +1524        assert!(
    +1525            tokio::time::timeout(Duration::from_millis(100), &mut task)
    +1526                .await
    +1527                .is_err(),
    +1528            "actor task terminated"
    +1529        );
    +1530
    +1531        // If we advance time a lot it should finish.
    +1532        info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME");
    +1533        tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME).await;
    +1534        assert!(
    +1535            tokio::time::timeout(Duration::from_millis(100), task)
    +1536                .await
    +1537                .is_ok(),
    +1538            "actor task still running"
    +1539        );
    +1540
    +1541        cancel_token.cancel();
    +1542
    +1543        Ok(())
    +1544    }
    +1545
    +1546    #[tokio::test]
    +1547    async fn test_ping_tracker() {
    +1548        tokio::time::pause();
    +1549        let mut tracker = PingTracker::default();
     1550
    -1551    #[tokio::test]
    -1552    #[traced_test]
    -1553    async fn test_active_relay_reconnect() -> Result {
    -1554        let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?;
    -1555        let (peer_node, _echo_node_task) = start_echo_node(relay_url.clone());
    -1556
    -1557        let secret_key = SecretKey::from_bytes(&[1u8; 32]);
    -1558        let (datagram_recv_tx, mut datagram_recv_rx) = mpsc::channel(16);
    -1559        let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16);
    -1560        let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8);
    -1561        let (inbox_tx, inbox_rx) = mpsc::channel(16);
    -1562        let cancel_token = CancellationToken::new();
    -1563        let task = start_active_relay_actor(
    -1564            secret_key,
    -1565            cancel_token.clone(),
    -1566            relay_url.clone(),
    -1567            prio_inbox_rx,
    -1568            inbox_rx,
    -1569            send_datagram_rx,
    -1570            datagram_recv_tx.clone(),
    -1571            info_span!("actor-under-test"),
    -1572        );
    -1573
    -1574        // Send a datagram to our echo node.
    -1575        info!("first echo");
    -1576        let hello_send_item = RelaySendItem {
    -1577            remote_node: peer_node,
    -1578            url: relay_url.clone(),
    -1579            datagrams: smallvec![Bytes::from_static(b"hello")],
    -1580        };
    -1581        send_recv_echo(
    -1582            hello_send_item.clone(),
    -1583            &send_datagram_tx,
    -1584            &mut datagram_recv_rx,
    -1585        )
    -1586        .await?;
    -1587
    -1588        // Now ask to check the connection, triggering a ping but no reconnect.
    -1589        let (tx, rx) = oneshot::channel();
    -1590        inbox_tx
    -1591            .send(ActiveRelayMessage::GetLocalAddr(tx))
    -1592            .await
    -1593            .context("send get local addr msg")?;
    -1594
    -1595        let local_addr = rx
    -1596            .await
    -1597            .context("wait for local addr msg")?
    -1598            .context("no local addr")?;
    -1599        info!(?local_addr, "check connection with addr");
    -1600        inbox_tx
    -1601            .send(ActiveRelayMessage::CheckConnection(vec![local_addr.ip()]))
    -1602            .await
    -1603            .context("send check connection message")?;
    -1604
    -1605        // Sync the ActiveRelayActor. Ping blocks it and we want to be sure it has handled
    -1606        // another inbox message before continuing.
    -1607        let (tx, rx) = oneshot::channel();
    -1608        inbox_tx
    -1609            .send(ActiveRelayMessage::GetLocalAddr(tx))
    -1610            .await
    -1611            .context("send get local addr msg")?;
    -1612        rx.await.context("recv send local addr msg")?;
    -1613
    -1614        // Echo should still work.
    -1615        info!("second echo");
    -1616        send_recv_echo(
    -1617            hello_send_item.clone(),
    -1618            &send_datagram_tx,
    -1619            &mut datagram_recv_rx,
    -1620        )
    -1621        .await?;
    -1622
    -1623        // Now ask to check the connection, this will reconnect without pinging because we
    -1624        // do not supply any "valid" local IP addresses.
    -1625        info!("check connection");
    -1626        inbox_tx
    -1627            .send(ActiveRelayMessage::CheckConnection(Vec::new()))
    -1628            .await
    -1629            .context("send check connection msg")?;
    -1630
    -1631        // Give some time to reconnect, mostly to sort logs rather than functional.
    -1632        tokio::time::sleep(Duration::from_millis(10)).await;
    -1633
    -1634        // Echo should still work.
    -1635        info!("third echo");
    -1636        send_recv_echo(
    -1637            hello_send_item.clone(),
    -1638            &send_datagram_tx,
    -1639            &mut datagram_recv_rx,
    -1640        )
    -1641        .await?;
    -1642
    -1643        // Shut down the actor.
    -1644        cancel_token.cancel();
    -1645        task.await.context("wait for task to finish")?;
    -1646
    -1647        Ok(())
    -1648    }
    -1649
    -1650    #[tokio::test]
    -1651    #[traced_test]
    -1652    async fn test_active_relay_inactive() -> Result {
    -1653        let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?;
    -1654
    -1655        let secret_key = SecretKey::from_bytes(&[1u8; 32]);
    -1656        let (datagram_recv_tx, _datagram_recv_rx) = mpsc::channel(16);
    -1657        let (_send_datagram_tx, send_datagram_rx) = mpsc::channel(16);
    -1658        let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8);
    -1659        let (inbox_tx, inbox_rx) = mpsc::channel(16);
    -1660        let cancel_token = CancellationToken::new();
    -1661        let mut task = start_active_relay_actor(
    -1662            secret_key,
    -1663            cancel_token.clone(),
    -1664            relay_url,
    -1665            prio_inbox_rx,
    -1666            inbox_rx,
    -1667            send_datagram_rx,
    -1668            datagram_recv_tx,
    -1669            info_span!("actor-under-test"),
    -1670        );
    -1671
    -1672        // Wait until the actor is connected to the relay server.
    -1673        tokio::time::timeout(Duration::from_secs(5), async {
    -1674            loop {
    -1675                let (tx, rx) = oneshot::channel();
    -1676                inbox_tx.send(ActiveRelayMessage::PingServer(tx)).await.ok();
    -1677                if tokio::time::timeout(Duration::from_millis(200), rx)
    -1678                    .await
    -1679                    .map(|resp| resp.is_ok())
    -1680                    .unwrap_or_default()
    -1681                {
    -1682                    break;
    -1683                }
    -1684            }
    -1685        })
    -1686        .await
    -1687        .context("timeout")?;
    -1688
    -1689        // We now have an idling ActiveRelayActor.  If we advance time just a little it
    -1690        // should stay alive.
    -1691        info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME / 2");
    -1692        tokio::time::pause();
    -1693        tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME / 2).await;
    -1694        tokio::time::resume();
    -1695
    -1696        assert!(
    -1697            tokio::time::timeout(Duration::from_millis(100), &mut task)
    -1698                .await
    -1699                .is_err(),
    -1700            "actor task terminated"
    -1701        );
    -1702
    -1703        // If we advance time a lot it should finish.
    -1704        info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME");
    -1705        tokio::time::pause();
    -1706        tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME).await;
    -1707        tokio::time::resume();
    -1708        assert!(
    -1709            tokio::time::timeout(Duration::from_secs(1), task)
    -1710                .await
    -1711                .is_ok(),
    -1712            "actor task still running"
    -1713        );
    -1714
    -1715        cancel_token.cancel();
    -1716
    -1717        Ok(())
    -1718    }
    -1719
    -1720    #[tokio::test]
    -1721    async fn test_ping_tracker() {
    -1722        tokio::time::pause();
    -1723        let mut tracker = PingTracker::default();
    -1724
    -1725        let ping0 = tracker.new_ping();
    -1726
    -1727        let res = tokio::time::timeout(Duration::from_secs(1), tracker.timeout()).await;
    -1728        assert!(res.is_err(), "no ping timeout has elapsed yet");
    -1729
    -1730        tracker.pong_received(ping0);
    -1731        let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await;
    -1732        assert!(res.is_err(), "ping completed before timeout");
    -1733
    -1734        let _ping1 = tracker.new_ping();
    -1735
    -1736        let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await;
    -1737        assert!(res.is_ok(), "ping timeout should have happened");
    -1738
    -1739        let _ping2 = tracker.new_ping();
    -1740
    -1741        tokio::time::sleep(Duration::from_secs(10)).await;
    -1742        let res = tokio::time::timeout(Duration::from_millis(1), tracker.timeout()).await;
    -1743        assert!(res.is_ok(), "ping timeout happened in the past");
    -1744
    -1745        let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await;
    -1746        assert!(res.is_err(), "ping timeout should only happen once");
    -1747    }
    -1748}
    \ No newline at end of file +1551 let ping0 = tracker.new_ping(); +1552 +1553 let res = tokio::time::timeout(Duration::from_secs(1), tracker.timeout()).await; +1554 assert!(res.is_err(), "no ping timeout has elapsed yet"); +1555 +1556 tracker.pong_received(ping0); +1557 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; +1558 assert!(res.is_err(), "ping completed before timeout"); +1559 +1560 let _ping1 = tracker.new_ping(); +1561 +1562 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; +1563 assert!(res.is_ok(), "ping timeout should have happened"); +1564 +1565 let _ping2 = tracker.new_ping(); +1566 +1567 tokio::time::sleep(Duration::from_secs(10)).await; +1568 let res = tokio::time::timeout(Duration::from_millis(1), tracker.timeout()).await; +1569 assert!(res.is_ok(), "ping timeout happened in the past"); +1570 +1571 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; +1572 assert!(res.is_err(), "ping timeout should only happen once"); +1573 } +1574}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/metrics.rs.html b/pr/3367/docs/src/iroh/metrics.rs.html index 142a6b341f..c4b2db5784 100644 --- a/pr/3367/docs/src/iroh/metrics.rs.html +++ b/pr/3367/docs/src/iroh/metrics.rs.html @@ -1,4 +1,4 @@ -metrics.rs - source

    iroh/
    metrics.rs

    1//! Co-locating all of the iroh metrics structs
    +metrics.rs - source

    iroh/
    metrics.rs

    1//! Co-locating all of the iroh metrics structs
     2use std::sync::Arc;
     3
     4use iroh_metrics::MetricsGroupSet;
    diff --git a/pr/3367/docs/src/iroh/net_report.rs.html b/pr/3367/docs/src/iroh/net_report.rs.html
    index cd2a8a5c39..ed827552d8 100644
    --- a/pr/3367/docs/src/iroh/net_report.rs.html
    +++ b/pr/3367/docs/src/iroh/net_report.rs.html
    @@ -1,11 +1,11 @@
    -net_report.rs - source

    iroh/
    net_report.rs

    1//! Checks the network conditions from the current host.
    +net_report.rs - source

    iroh/
    net_report.rs

    1//! Checks the network conditions from the current host.
     2//!
     3//! NetReport is responsible for finding out the network conditions of the current host, like
     4//! whether it is connected to the internet via IPv4 and/or IPv6, what the NAT situation is
     5//! etc and reachability to the configured relays.
     6// Based on <https://github.com/tailscale/tailscale/blob/main/net/netcheck/netcheck.go>
     7
    -8#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))]
    +8#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
     9#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
     10#![cfg_attr(not(test), deny(clippy::unwrap_used))]
     11#![cfg_attr(wasm_browser, allow(unused))]
    @@ -18,1083 +18,1092 @@
     18};
     19
     20use defaults::timeouts::PROBES_TIMEOUT;
    -21use iroh_base::RelayUrl;
    -22#[cfg(not(wasm_browser))]
    -23use iroh_relay::dns::DnsResolver;
    +21// exported primarily for use in documentation
    +22pub use defaults::timeouts::TIMEOUT;
    +23use iroh_base::RelayUrl;
     24#[cfg(not(wasm_browser))]
    -25use iroh_relay::quic::QuicClient;
    +25use iroh_relay::RelayNode;
     26#[cfg(not(wasm_browser))]
    -27use iroh_relay::RelayNode;
    -28use iroh_relay::{
    -29    quic::{QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON},
    -30    RelayMap,
    -31};
    -32#[cfg(not(wasm_browser))]
    -33use n0_future::task;
    -34use n0_future::{
    -35    task::AbortOnDropHandle,
    -36    time::{self, Duration, Instant},
    +27use iroh_relay::dns::DnsResolver;
    +28#[cfg(not(wasm_browser))]
    +29use iroh_relay::quic::QuicClient;
    +30use iroh_relay::{
    +31    RelayMap,
    +32    quic::{QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON},
    +33};
    +34#[cfg(not(wasm_browser))]
    +35use n0_future::task;
    +36use n0_future::{
     37    StreamExt,
    -38};
    -39use n0_watcher::{Watchable, Watcher};
    -40use tokio::task::JoinSet;
    -41use tokio_util::sync::CancellationToken;
    -42use tracing::{debug, trace, warn};
    -43
    -44#[cfg(not(wasm_browser))]
    -45use self::reportgen::QadProbeReport;
    -46use self::reportgen::{ProbeFinished, ProbeReport};
    -47
    -48mod defaults;
    -49mod ip_mapped_addrs;
    -50mod metrics;
    -51mod probes;
    -52mod report;
    -53mod reportgen;
    -54
    -55mod options;
    +38    task::AbortOnDropHandle,
    +39    time::{self, Duration, Instant},
    +40};
    +41use n0_watcher::{Watchable, Watcher};
    +42use tokio::task::JoinSet;
    +43use tokio_util::sync::CancellationToken;
    +44use tracing::{debug, trace, warn};
    +45
    +46#[cfg(not(wasm_browser))]
    +47use self::reportgen::QadProbeReport;
    +48use self::reportgen::{ProbeFinished, ProbeReport};
    +49
    +50mod defaults;
    +51mod ip_mapped_addrs;
    +52mod metrics;
    +53mod probes;
    +54mod report;
    +55mod reportgen;
     56
    -57/// We "vendor" what we need of the library in browsers for simplicity.
    -58///
    -59/// We could consider making `portmapper` compile to wasm in the future,
    -60/// but what we need is so little it's likely not worth it.
    -61#[cfg(wasm_browser)]
    -62pub(crate) mod portmapper {
    -63    /// Output of a port mapping probe.
    -64    #[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)]
    -65    #[display("portmap={{ UPnP: {upnp}, PMP: {nat_pmp}, PCP: {pcp} }}")]
    -66    pub struct ProbeOutput {
    -67        /// If UPnP can be considered available.
    -68        pub upnp: bool,
    -69        /// If PCP can be considered available.
    -70        pub pcp: bool,
    -71        /// If PMP can be considered available.
    -72        pub nat_pmp: bool,
    -73    }
    -74}
    -75
    -76pub(crate) use ip_mapped_addrs::{IpMappedAddr, IpMappedAddresses};
    +57mod options;
    +58
    +59/// We "vendor" what we need of the library in browsers for simplicity.
    +60///
    +61/// We could consider making `portmapper` compile to wasm in the future,
    +62/// but what we need is so little it's likely not worth it.
    +63#[cfg(wasm_browser)]
    +64pub(crate) mod portmapper {
    +65    /// Output of a port mapping probe.
    +66    #[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)]
    +67    #[display("portmap={{ UPnP: {upnp}, PMP: {nat_pmp}, PCP: {pcp} }}")]
    +68    pub struct ProbeOutput {
    +69        /// If UPnP can be considered available.
    +70        pub upnp: bool,
    +71        /// If PCP can be considered available.
    +72        pub pcp: bool,
    +73        /// If PMP can be considered available.
    +74        pub nat_pmp: bool,
    +75    }
    +76}
     77
    -78pub(crate) use self::reportgen::IfStateDetails;
    -79#[cfg(not(wasm_browser))]
    -80use self::reportgen::SocketState;
    -81pub use self::{
    -82    metrics::Metrics,
    -83    options::Options,
    -84    probes::Probe,
    -85    report::{RelayLatencies, Report},
    -86    reportgen::QuicConfig,
    -87};
    -88use crate::util::MaybeFuture;
    -89
    -90const FULL_REPORT_INTERVAL: Duration = Duration::from_secs(5 * 60);
    +78pub(crate) use ip_mapped_addrs::{IpMappedAddr, IpMappedAddresses};
    +79
    +80pub(crate) use self::reportgen::IfStateDetails;
    +81#[cfg(not(wasm_browser))]
    +82use self::reportgen::SocketState;
    +83pub use self::{
    +84    metrics::Metrics,
    +85    options::Options,
    +86    probes::Probe,
    +87    report::{RelayLatencies, Report},
    +88    reportgen::QuicConfig,
    +89};
    +90use crate::util::MaybeFuture;
     91
    -92/// The maximum latency of all nodes, if none are found yet.
    -93///
    -94/// Normally the max latency of all nodes is computed, but if we don't yet know any nodes
    -95/// latencies we return this as default.  This is the value of the initial QAD probe
    -96/// delays.  It is only used as time to wait for further latencies to arrive, which *should*
    -97/// never happen unless there already is at least one latency.  Yet here we are, defining a
    -98/// default which will never be used.
    -99const DEFAULT_MAX_LATENCY: Duration = Duration::from_millis(100);
    -100
    -101const ENOUGH_NODES: usize = 3;
    +92const FULL_REPORT_INTERVAL: Duration = Duration::from_secs(5 * 60);
    +93
    +94/// The maximum latency of all nodes, if none are found yet.
    +95///
    +96/// Normally the max latency of all nodes is computed, but if we don't yet know any nodes
    +97/// latencies we return this as default.  This is the value of the initial QAD probe
    +98/// delays.  It is only used as time to wait for further latencies to arrive, which *should*
    +99/// never happen unless there already is at least one latency.  Yet here we are, defining a
    +100/// default which will never be used.
    +101const DEFAULT_MAX_LATENCY: Duration = Duration::from_millis(100);
     102
    -103/// Client to run net_reports.
    -104#[derive(Debug)]
    -105pub(crate) struct Client {
    -106    #[cfg(not(wasm_browser))]
    -107    socket_state: SocketState,
    -108    metrics: Arc<Metrics>,
    -109    probes: BTreeSet<Probe>,
    -110    relay_map: RelayMap,
    -111    #[cfg(not(wasm_browser))]
    -112    qad_conns: QadConns,
    -113    #[cfg(any(test, feature = "test-utils"))]
    -114    insecure_skip_relay_cert_verify: bool,
    -115
    -116    /// A collection of previously generated reports.
    -117    ///
    -118    /// Sometimes it is useful to look at past reports to decide what to do.
    -119    reports: Reports,
    -120}
    -121
    -122#[cfg(not(wasm_browser))]
    -123#[derive(Debug, Default)]
    -124struct QadConns {
    -125    v4: Option<(RelayUrl, QadConn)>,
    -126    v6: Option<(RelayUrl, QadConn)>,
    -127}
    -128
    -129#[cfg(not(wasm_browser))]
    -130impl QadConns {
    -131    fn clear(&mut self) {
    -132        if let Some((_, conn)) = self.v4.take() {
    -133            conn.conn
    -134                .close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    -135        }
    -136        if let Some((_, conn)) = self.v6.take() {
    -137            conn.conn
    -138                .close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    -139        }
    -140    }
    -141
    -142    fn current(&self) -> Vec<ProbeReport> {
    -143        let mut reports = Vec::new();
    -144        if let Some((_, ref conn)) = self.v4 {
    -145            if let Some(mut r) = conn.observer.get() {
    -146                // grab latest rtt
    -147                r.latency = conn.conn.rtt();
    -148                reports.push(ProbeReport::QadIpv4(r));
    -149            }
    -150        }
    -151
    -152        if let Some((_, ref conn)) = self.v6 {
    -153            if let Some(mut r) = conn.observer.get() {
    -154                // grab latest rtt
    -155                r.latency = conn.conn.rtt();
    -156                reports.push(ProbeReport::QadIpv6(r));
    -157            }
    -158        }
    -159
    -160        reports
    -161    }
    -162
    -163    fn watch_v4(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin {
    -164        let watcher = self.v4.as_ref().map(|(_url, conn)| conn.observer.watch());
    -165
    -166        if let Some(watcher) = watcher {
    -167            watcher.stream_updates_only().boxed()
    -168        } else {
    -169            n0_future::stream::empty().boxed()
    -170        }
    -171    }
    -172
    -173    fn watch_v6(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin {
    -174        let watcher = self.v6.as_ref().map(|(_url, conn)| conn.observer.watch());
    -175        if let Some(watcher) = watcher {
    -176            watcher.stream_updates_only().boxed()
    -177        } else {
    -178            n0_future::stream::empty().boxed()
    -179        }
    -180    }
    -181}
    -182
    -183#[cfg(not(wasm_browser))]
    -184#[derive(Debug)]
    -185struct QadConn {
    -186    conn: quinn::Connection,
    -187    observer: Watchable<Option<QadProbeReport>>,
    -188    _handle: AbortOnDropHandle<()>,
    -189}
    -190
    -191#[derive(Debug)]
    -192struct Reports {
    -193    /// Do a full relay scan, even if last is `Some`.
    -194    next_full: bool,
    -195    /// Some previous reports.
    -196    prev: BTreeMap<Instant, Report>,
    -197    /// Most recent report.
    -198    last: Option<Report>,
    -199    /// Time of last full (non-incremental) report.
    -200    last_full: Instant,
    -201}
    -202
    -203impl Default for Reports {
    -204    fn default() -> Self {
    -205        Self {
    -206            next_full: true,
    -207            prev: Default::default(),
    -208            last: Default::default(),
    -209            last_full: Instant::now(),
    -210        }
    -211    }
    -212}
    -213
    -214impl Client {
    -215    /// Creates a new net_report client.
    -216    pub(crate) fn new(
    -217        #[cfg(not(wasm_browser))] dns_resolver: DnsResolver,
    -218        #[cfg(not(wasm_browser))] ip_mapped_addrs: Option<IpMappedAddresses>,
    -219        relay_map: RelayMap,
    -220        opts: Options,
    -221        metrics: Arc<Metrics>,
    -222    ) -> Self {
    -223        let probes = opts.as_protocols();
    -224        #[cfg(any(test, feature = "test-utils"))]
    -225        let insecure_skip_relay_cert_verify = opts.insecure_skip_relay_cert_verify;
    -226
    -227        #[cfg(not(wasm_browser))]
    -228        let quic_client = opts
    -229            .quic_config
    -230            .map(|c| iroh_relay::quic::QuicClient::new(c.ep, c.client_config));
    -231
    -232        #[cfg(not(wasm_browser))]
    -233        let socket_state = SocketState {
    -234            quic_client,
    -235            dns_resolver,
    -236            ip_mapped_addrs,
    -237        };
    -238
    -239        Client {
    -240            #[cfg(not(wasm_browser))]
    -241            socket_state,
    -242            metrics,
    -243            reports: Reports::default(),
    -244            probes,
    -245            relay_map,
    -246            #[cfg(not(wasm_browser))]
    -247            qad_conns: QadConns::default(),
    -248            #[cfg(any(test, feature = "test-utils"))]
    -249            insecure_skip_relay_cert_verify,
    -250        }
    -251    }
    -252
    -253    /// Generates a [`Report`].
    -254    ///
    -255    /// Look at [`Options`] for the different configuration options.
    -256    pub(crate) async fn get_report(&mut self, if_state: IfStateDetails, is_major: bool) -> Report {
    -257        let now = Instant::now();
    -258
    -259        let mut do_full = is_major
    -260            || self.reports.next_full
    -261            || now.duration_since(self.reports.last_full) > FULL_REPORT_INTERVAL;
    -262
    -263        debug!(%do_full, "net_report starting");
    +103const ENOUGH_NODES: usize = 3;
    +104
    +105/// Client to run net_reports.
    +106#[derive(Debug)]
    +107pub(crate) struct Client {
    +108    #[cfg(not(wasm_browser))]
    +109    socket_state: SocketState,
    +110    metrics: Arc<Metrics>,
    +111    probes: BTreeSet<Probe>,
    +112    relay_map: RelayMap,
    +113    #[cfg(not(wasm_browser))]
    +114    qad_conns: QadConns,
    +115    #[cfg(any(test, feature = "test-utils"))]
    +116    insecure_skip_relay_cert_verify: bool,
    +117
    +118    /// A collection of previously generated reports.
    +119    ///
    +120    /// Sometimes it is useful to look at past reports to decide what to do.
    +121    reports: Reports,
    +122}
    +123
    +124#[cfg(not(wasm_browser))]
    +125#[derive(Debug, Default)]
    +126struct QadConns {
    +127    v4: Option<(RelayUrl, QadConn)>,
    +128    v6: Option<(RelayUrl, QadConn)>,
    +129}
    +130
    +131#[cfg(not(wasm_browser))]
    +132impl QadConns {
    +133    fn clear(&mut self) {
    +134        if let Some((_, conn)) = self.v4.take() {
    +135            conn.conn
    +136                .close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    +137        }
    +138        if let Some((_, conn)) = self.v6.take() {
    +139            conn.conn
    +140                .close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    +141        }
    +142    }
    +143
    +144    fn current(&self) -> Vec<ProbeReport> {
    +145        let mut reports = Vec::new();
    +146        if let Some((_, ref conn)) = self.v4 {
    +147            if let Some(mut r) = conn.observer.get() {
    +148                // grab latest rtt
    +149                r.latency = conn.conn.rtt();
    +150                reports.push(ProbeReport::QadIpv4(r));
    +151            }
    +152        }
    +153
    +154        if let Some((_, ref conn)) = self.v6 {
    +155            if let Some(mut r) = conn.observer.get() {
    +156                // grab latest rtt
    +157                r.latency = conn.conn.rtt();
    +158                reports.push(ProbeReport::QadIpv6(r));
    +159            }
    +160        }
    +161
    +162        reports
    +163    }
    +164
    +165    fn watch_v4(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin + use<> {
    +166        let watcher = self.v4.as_ref().map(|(_url, conn)| conn.observer.watch());
    +167
    +168        if let Some(watcher) = watcher {
    +169            watcher.stream_updates_only().boxed()
    +170        } else {
    +171            n0_future::stream::empty().boxed()
    +172        }
    +173    }
    +174
    +175    fn watch_v6(&self) -> impl n0_future::Stream<Item = Option<QadProbeReport>> + Unpin + use<> {
    +176        let watcher = self.v6.as_ref().map(|(_url, conn)| conn.observer.watch());
    +177        if let Some(watcher) = watcher {
    +178            watcher.stream_updates_only().boxed()
    +179        } else {
    +180            n0_future::stream::empty().boxed()
    +181        }
    +182    }
    +183}
    +184
    +185#[cfg(not(wasm_browser))]
    +186#[derive(Debug)]
    +187struct QadConn {
    +188    conn: quinn::Connection,
    +189    observer: Watchable<Option<QadProbeReport>>,
    +190    _handle: AbortOnDropHandle<()>,
    +191}
    +192
    +193#[derive(Debug)]
    +194struct Reports {
    +195    /// Do a full relay scan, even if last is `Some`.
    +196    next_full: bool,
    +197    /// Some previous reports.
    +198    prev: BTreeMap<Instant, Report>,
    +199    /// Most recent report.
    +200    last: Option<Report>,
    +201    /// Time of last full (non-incremental) report.
    +202    last_full: Instant,
    +203}
    +204
    +205impl Default for Reports {
    +206    fn default() -> Self {
    +207        Self {
    +208            next_full: true,
    +209            prev: Default::default(),
    +210            last: Default::default(),
    +211            last_full: Instant::now(),
    +212        }
    +213    }
    +214}
    +215
    +216impl Client {
    +217    /// Creates a new net_report client.
    +218    pub(crate) fn new(
    +219        #[cfg(not(wasm_browser))] dns_resolver: DnsResolver,
    +220        #[cfg(not(wasm_browser))] ip_mapped_addrs: Option<IpMappedAddresses>,
    +221        relay_map: RelayMap,
    +222        opts: Options,
    +223        metrics: Arc<Metrics>,
    +224    ) -> Self {
    +225        let probes = opts.as_protocols();
    +226        #[cfg(any(test, feature = "test-utils"))]
    +227        let insecure_skip_relay_cert_verify = opts.insecure_skip_relay_cert_verify;
    +228
    +229        #[cfg(not(wasm_browser))]
    +230        let quic_client = opts
    +231            .quic_config
    +232            .map(|c| iroh_relay::quic::QuicClient::new(c.ep, c.client_config));
    +233
    +234        #[cfg(not(wasm_browser))]
    +235        let socket_state = SocketState {
    +236            quic_client,
    +237            dns_resolver,
    +238            ip_mapped_addrs,
    +239        };
    +240
    +241        Client {
    +242            #[cfg(not(wasm_browser))]
    +243            socket_state,
    +244            metrics,
    +245            reports: Reports::default(),
    +246            probes,
    +247            relay_map,
    +248            #[cfg(not(wasm_browser))]
    +249            qad_conns: QadConns::default(),
    +250            #[cfg(any(test, feature = "test-utils"))]
    +251            insecure_skip_relay_cert_verify,
    +252        }
    +253    }
    +254
    +255    /// Generates a [`Report`].
    +256    ///
    +257    /// Look at [`Options`] for the different configuration options.
    +258    pub(crate) async fn get_report(&mut self, if_state: IfStateDetails, is_major: bool) -> Report {
    +259        let now = Instant::now();
    +260
    +261        let mut do_full = is_major
    +262            || self.reports.next_full
    +263            || now.duration_since(self.reports.last_full) > FULL_REPORT_INTERVAL;
     264
    -265        // If the last report had a captive portal and reported no UDP access,
    -266        // it's possible that we didn't get a useful net_report due to the
    -267        // captive portal blocking us. If so, make this report a full (non-incremental) one.
    -268        if !do_full {
    -269            if let Some(ref last) = self.reports.last {
    -270                if !last.has_udp() && last.captive_portal == Some(true) {
    -271                    do_full = true;
    -272                }
    -273            }
    -274        }
    -275        if do_full {
    -276            self.reports.last = None; // causes ProbePlan::new below to do a full (initial) plan
    -277            self.reports.next_full = false;
    -278            self.reports.last_full = now;
    -279            self.metrics.reports_full.inc();
    -280        }
    -281        self.metrics.reports.inc();
    -282
    -283        let enough_relays = std::cmp::min(self.relay_map.len(), ENOUGH_NODES);
    -284        #[cfg(wasm_browser)]
    -285        let if_state = IfStateDetails::default();
    -286        #[cfg(not(wasm_browser))]
    -287        let if_state = IfStateDetails {
    -288            have_v4: if_state.have_v4,
    -289            have_v6: if_state.have_v6,
    -290        };
    -291
    -292        let mut report = Report::default();
    +265        debug!(%do_full, "net_report starting");
    +266
    +267        // If the last report had a captive portal and reported no UDP access,
    +268        // it's possible that we didn't get a useful net_report due to the
    +269        // captive portal blocking us. If so, make this report a full (non-incremental) one.
    +270        if !do_full {
    +271            if let Some(ref last) = self.reports.last {
    +272                if !last.has_udp() && last.captive_portal == Some(true) {
    +273                    do_full = true;
    +274                }
    +275            }
    +276        }
    +277        if do_full {
    +278            self.reports.last = None; // causes ProbePlan::new below to do a full (initial) plan
    +279            self.reports.next_full = false;
    +280            self.reports.last_full = now;
    +281            self.metrics.reports_full.inc();
    +282        }
    +283        self.metrics.reports.inc();
    +284
    +285        let enough_relays = std::cmp::min(self.relay_map.len(), ENOUGH_NODES);
    +286        #[cfg(wasm_browser)]
    +287        let if_state = IfStateDetails::default();
    +288        #[cfg(not(wasm_browser))]
    +289        let if_state = IfStateDetails {
    +290            have_v4: if_state.have_v4,
    +291            have_v6: if_state.have_v6,
    +292        };
     293
    -294        // Start the reportgen client to start any needed probes
    -295        let (actor, mut probe_rx) = reportgen::Client::new(
    -296            self.reports.last.clone(),
    -297            self.relay_map.clone(),
    -298            self.probes.clone(),
    -299            if_state.clone(),
    -300            #[cfg(not(wasm_browser))]
    -301            self.socket_state.clone(),
    -302            #[cfg(any(test, feature = "test-utils"))]
    -303            self.insecure_skip_relay_cert_verify,
    -304        );
    -305
    -306        #[cfg(not(wasm_browser))]
    -307        let reports = self
    -308            .spawn_qad_probes(&if_state, enough_relays, do_full)
    -309            .await;
    -310
    -311        #[cfg(not(wasm_browser))]
    -312        for r in reports {
    -313            report.update(&r);
    -314        }
    -315
    -316        let mut timeout_fut = std::pin::pin!(MaybeFuture::default());
    +294        let mut report = Report::default();
    +295
    +296        // Start the reportgen client to start any needed probes
    +297        let (actor, mut probe_rx) = reportgen::Client::new(
    +298            self.reports.last.clone(),
    +299            self.relay_map.clone(),
    +300            self.probes.clone(),
    +301            if_state.clone(),
    +302            #[cfg(not(wasm_browser))]
    +303            self.socket_state.clone(),
    +304            #[cfg(any(test, feature = "test-utils"))]
    +305            self.insecure_skip_relay_cert_verify,
    +306        );
    +307
    +308        #[cfg(not(wasm_browser))]
    +309        let reports = self
    +310            .spawn_qad_probes(&if_state, enough_relays, do_full)
    +311            .await;
    +312
    +313        #[cfg(not(wasm_browser))]
    +314        for r in reports {
    +315            report.update(&r);
    +316        }
     317
    -318        #[cfg(not(wasm_browser))]
    -319        let mut qad_v4_stream = self.qad_conns.watch_v4();
    -320        #[cfg(wasm_browser)]
    -321        let mut qad_v4_stream = n0_future::stream::empty::<Option<()>>();
    -322        #[cfg(not(wasm_browser))]
    -323        let mut qad_v6_stream = self.qad_conns.watch_v6();
    -324        #[cfg(wasm_browser)]
    -325        let mut qad_v6_stream = n0_future::stream::empty::<Option<()>>();
    -326
    -327        loop {
    -328            tokio::select! {
    -329                biased;
    -330
    -331                _ = &mut timeout_fut, if timeout_fut.is_some() => {
    -332                    trace!("timeout done, shutting down");
    -333                    drop(actor); // shuts down the probes
    -334                    break;
    -335                }
    -336
    -337                Some(Some(r)) = qad_v4_stream.next() => {
    -338                    #[cfg(not(wasm_browser))]
    -339                    {
    -340                        trace!(?r, "new report from QAD V4");
    -341                        report.update(&ProbeReport::QadIpv4(r));
    -342                    }
    -343                }
    -344
    -345                Some(Some(r)) = qad_v6_stream.next() => {
    -346                    #[cfg(not(wasm_browser))]
    -347                    {
    -348                        trace!(?r, "new report from QAD V6");
    -349                        report.update(&ProbeReport::QadIpv6(r));
    -350                    }
    -351                }
    -352
    -353                maybe_probe = probe_rx.recv() => {
    -354                    let Some(probe_res) = maybe_probe else {
    -355                        break;
    -356                    };
    -357                    trace!(?probe_res, "handling probe");
    -358                    match probe_res {
    -359                        ProbeFinished::Regular(probe) => match probe {
    -360                            Ok(probe) => {
    -361                                report.update(&probe);
    -362                                if timeout_fut.is_none() {
    -363                                    if let Some(timeout) = self.have_enough_reports(enough_relays, &report) {
    -364                                        timeout_fut.as_mut().set_future(time::sleep(timeout));
    -365                                    }
    -366                                }
    -367                            }
    -368                            Err(err) => {
    -369                                trace!("probe errored: {:?}", err);
    -370                            }
    -371                        },
    -372                        #[cfg(not(wasm_browser))]
    -373                        ProbeFinished::CaptivePortal(portal) => {
    -374                            report.captive_portal = portal;
    -375                        }
    -376                    }
    -377                }
    -378            }
    -379        }
    -380
    -381        self.add_report_history_and_set_preferred_relay(&mut report);
    -382        debug!(
    -383            ?report,
    -384            "generated report in {:02}ms",
    -385            now.elapsed().as_millis()
    -386        );
    -387
    -388        report
    -389    }
    -390
    -391    #[cfg(not(wasm_browser))]
    -392    async fn spawn_qad_probes(
    -393        &mut self,
    -394        if_state: &IfStateDetails,
    -395        enough_relays: usize,
    -396        do_full: bool,
    -397    ) -> Vec<ProbeReport> {
    -398        use tracing::{info_span, Instrument};
    -399
    -400        debug!("spawning QAD probes");
    +318        let mut timeout_fut = std::pin::pin!(MaybeFuture::default());
    +319
    +320        #[cfg(not(wasm_browser))]
    +321        let mut qad_v4_stream = self.qad_conns.watch_v4();
    +322        #[cfg(wasm_browser)]
    +323        let mut qad_v4_stream = n0_future::stream::empty::<Option<()>>();
    +324        #[cfg(not(wasm_browser))]
    +325        let mut qad_v6_stream = self.qad_conns.watch_v6();
    +326        #[cfg(wasm_browser)]
    +327        let mut qad_v6_stream = n0_future::stream::empty::<Option<()>>();
    +328
    +329        loop {
    +330            tokio::select! {
    +331                biased;
    +332
    +333                _ = &mut timeout_fut, if timeout_fut.is_some() => {
    +334                    trace!("timeout done, shutting down");
    +335                    drop(actor); // shuts down the probes
    +336                    break;
    +337                }
    +338
    +339                Some(Some(r)) = qad_v4_stream.next() => {
    +340                    #[cfg(not(wasm_browser))]
    +341                    {
    +342                        trace!(?r, "new report from QAD V4");
    +343                        report.update(&ProbeReport::QadIpv4(r));
    +344                    }
    +345                }
    +346
    +347                Some(Some(r)) = qad_v6_stream.next() => {
    +348                    #[cfg(not(wasm_browser))]
    +349                    {
    +350                        trace!(?r, "new report from QAD V6");
    +351                        report.update(&ProbeReport::QadIpv6(r));
    +352                    }
    +353                }
    +354
    +355                maybe_probe = probe_rx.recv() => {
    +356                    let Some(probe_res) = maybe_probe else {
    +357                        break;
    +358                    };
    +359                    trace!(?probe_res, "handling probe");
    +360                    match probe_res {
    +361                        ProbeFinished::Regular(probe) => match probe {
    +362                            Ok(probe) => {
    +363                                report.update(&probe);
    +364                                if timeout_fut.is_none() {
    +365                                    if let Some(timeout) = self.have_enough_reports(enough_relays, &report) {
    +366                                        timeout_fut.as_mut().set_future(time::sleep(timeout));
    +367                                    }
    +368                                }
    +369                            }
    +370                            Err(err) => {
    +371                                trace!("probe errored: {:?}", err);
    +372                            }
    +373                        },
    +374                        #[cfg(not(wasm_browser))]
    +375                        ProbeFinished::CaptivePortal(portal) => {
    +376                            report.captive_portal = portal;
    +377                        }
    +378                    }
    +379                }
    +380            }
    +381        }
    +382
    +383        self.add_report_history_and_set_preferred_relay(&mut report);
    +384        debug!(
    +385            ?report,
    +386            "generated report in {:02}ms",
    +387            now.elapsed().as_millis()
    +388        );
    +389
    +390        report
    +391    }
    +392
    +393    #[cfg(not(wasm_browser))]
    +394    async fn spawn_qad_probes(
    +395        &mut self,
    +396        if_state: &IfStateDetails,
    +397        enough_relays: usize,
    +398        do_full: bool,
    +399    ) -> Vec<ProbeReport> {
    +400        use tracing::{Instrument, warn_span};
     401
    -402        let Some(ref quic_client) = self.socket_state.quic_client else {
    -403            return Vec::new();
    -404        };
    -405
    -406        if do_full {
    -407            // clear out existing connections if we are doing a full reset
    -408            self.qad_conns.clear();
    -409        }
    -410
    -411        if let Some((url, conn)) = &self.qad_conns.v4 {
    -412            // verify conn is still around
    -413            if let Some(reason) = conn.conn.close_reason() {
    -414                trace!(?url, "QAD v4 conn closed: {}", reason);
    -415                self.qad_conns.v4.take();
    -416            }
    -417        }
    -418        if let Some((url, conn)) = &self.qad_conns.v6 {
    -419            // verify conn is still around
    -420            if let Some(reason) = conn.conn.close_reason() {
    -421                trace!(?url, "QAD v6 conn closed: {}", reason);
    -422                self.qad_conns.v6.take();
    -423            }
    -424        }
    -425        if self.qad_conns.v4.is_some() && self.qad_conns.v6.is_some() == if_state.have_v6 {
    -426            trace!("not spawning QAD, already have probes");
    -427            return self.qad_conns.current();
    -428        }
    -429
    -430        // TODO: randomize choice?
    -431        const MAX_RELAYS: usize = 5;
    -432
    -433        let mut v4_buf = JoinSet::new();
    -434        let cancel_v4 = CancellationToken::new();
    -435        let mut v6_buf = JoinSet::new();
    -436        let cancel_v6 = CancellationToken::new();
    -437
    -438        for relay_node in self.relay_map.nodes().take(MAX_RELAYS) {
    -439            if if_state.have_v4 {
    -440                debug!(?relay_node.url, "v4 QAD probe");
    -441                let ip_mapped_addrs = self.socket_state.ip_mapped_addrs.clone();
    -442                let relay_node = relay_node.clone();
    -443                let dns_resolver = self.socket_state.dns_resolver.clone();
    -444                let quic_client = quic_client.clone();
    -445                let relay_url = relay_node.url.clone();
    -446                v4_buf.spawn(
    -447                    cancel_v4
    -448                        .child_token()
    -449                        .run_until_cancelled_owned(time::timeout(
    -450                            PROBES_TIMEOUT,
    -451                            run_probe_v4(ip_mapped_addrs, relay_node, quic_client, dns_resolver),
    -452                        ))
    -453                        .instrument(info_span!("QAD IPv6", %relay_url)),
    -454                );
    -455            }
    -456
    -457            if if_state.have_v6 {
    -458                debug!(?relay_node.url, "v6 QAD probe");
    -459                let ip_mapped_addrs = self.socket_state.ip_mapped_addrs.clone();
    -460                let relay_node = relay_node.clone();
    -461                let dns_resolver = self.socket_state.dns_resolver.clone();
    -462                let quic_client = quic_client.clone();
    -463                let relay_url = relay_node.url.clone();
    -464                v6_buf.spawn(
    -465                    cancel_v6
    -466                        .child_token()
    -467                        .run_until_cancelled_owned(time::timeout(
    -468                            PROBES_TIMEOUT,
    -469                            run_probe_v6(ip_mapped_addrs, relay_node, quic_client, dns_resolver),
    -470                        ))
    -471                        .instrument(info_span!("QAD IPv6", %relay_url)),
    -472                );
    -473            }
    -474        }
    -475
    -476        let mut reports = Vec::new();
    +402        debug!("spawning QAD probes");
    +403
    +404        let Some(ref quic_client) = self.socket_state.quic_client else {
    +405            return Vec::new();
    +406        };
    +407
    +408        if do_full {
    +409            // clear out existing connections if we are doing a full reset
    +410            self.qad_conns.clear();
    +411        }
    +412
    +413        if let Some((url, conn)) = &self.qad_conns.v4 {
    +414            // verify conn is still around
    +415            if let Some(reason) = conn.conn.close_reason() {
    +416                trace!(?url, "QAD v4 conn closed: {}", reason);
    +417                self.qad_conns.v4.take();
    +418            }
    +419        }
    +420        if let Some((url, conn)) = &self.qad_conns.v6 {
    +421            // verify conn is still around
    +422            if let Some(reason) = conn.conn.close_reason() {
    +423                trace!(?url, "QAD v6 conn closed: {}", reason);
    +424                self.qad_conns.v6.take();
    +425            }
    +426        }
    +427        if self.qad_conns.v4.is_some() && self.qad_conns.v6.is_some() == if_state.have_v6 {
    +428            trace!("not spawning QAD, already have probes");
    +429            return self.qad_conns.current();
    +430        }
    +431
    +432        // TODO: randomize choice?
    +433        const MAX_RELAYS: usize = 5;
    +434
    +435        let mut v4_buf = JoinSet::new();
    +436        let cancel_v4 = CancellationToken::new();
    +437        let mut v6_buf = JoinSet::new();
    +438        let cancel_v6 = CancellationToken::new();
    +439
    +440        for relay_node in self.relay_map.nodes().take(MAX_RELAYS) {
    +441            if if_state.have_v4 {
    +442                debug!(?relay_node.url, "v4 QAD probe");
    +443                let ip_mapped_addrs = self.socket_state.ip_mapped_addrs.clone();
    +444                let relay_node = relay_node.clone();
    +445                let dns_resolver = self.socket_state.dns_resolver.clone();
    +446                let quic_client = quic_client.clone();
    +447                let relay_url = relay_node.url.clone();
    +448                v4_buf.spawn(
    +449                    cancel_v4
    +450                        .child_token()
    +451                        .run_until_cancelled_owned(time::timeout(
    +452                            PROBES_TIMEOUT,
    +453                            run_probe_v4(ip_mapped_addrs, relay_node, quic_client, dns_resolver),
    +454                        ))
    +455                        .instrument(warn_span!("QAD-IPv4", %relay_url)),
    +456                );
    +457            }
    +458
    +459            if if_state.have_v6 {
    +460                debug!(?relay_node.url, "v6 QAD probe");
    +461                let ip_mapped_addrs = self.socket_state.ip_mapped_addrs.clone();
    +462                let relay_node = relay_node.clone();
    +463                let dns_resolver = self.socket_state.dns_resolver.clone();
    +464                let quic_client = quic_client.clone();
    +465                let relay_url = relay_node.url.clone();
    +466                v6_buf.spawn(
    +467                    cancel_v6
    +468                        .child_token()
    +469                        .run_until_cancelled_owned(time::timeout(
    +470                            PROBES_TIMEOUT,
    +471                            run_probe_v6(ip_mapped_addrs, relay_node, quic_client, dns_resolver),
    +472                        ))
    +473                        .instrument(warn_span!("QAD-IPv6", %relay_url)),
    +474                );
    +475            }
    +476        }
     477
    -478        loop {
    -479            if reports.len() >= enough_relays {
    -480                debug!("enough probes: {}", reports.len());
    -481                cancel_v4.cancel();
    -482                cancel_v6.cancel();
    -483                break;
    -484            }
    -485
    -486            tokio::select! {
    -487                biased;
    -488
    -489                val = v4_buf.join_next(), if !v4_buf.is_empty() => {
    -490                    match val {
    -491                        Some(Ok(Some(Ok(res)))) => {
    -492                            match res {
    -493                                Ok((r, conn)) => {
    -494                                    debug!(?r, "got v4 QAD conn");
    -495                                    let url = r.node.clone();
    -496                                    reports.push(ProbeReport::QadIpv4(r));
    -497                                    if self.qad_conns.v4.is_none() {
    -498                                        self.qad_conns.v4.replace((url, conn));
    -499                                    } else {
    -500                                        conn.conn.close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    -501                                    }
    -502                                }
    -503                                Err(err) => {
    -504                                    debug!("probe v4 failed: {:?}", err);
    -505                                }
    -506                            }
    -507                        }
    -508                        Some(Err(err)) => {
    -509                            if err.is_panic() {
    -510                                panic!("probe v4 panicked: {:?}", err);
    -511                            }
    -512                            warn!("probe v4 failed: {:?}", err);
    -513                        }
    -514                        Some(Ok(None)) => {
    -515                            debug!("probe v4 canceled");
    -516                        }
    -517                        Some(Ok(Some(Err(time::Elapsed { .. })))) => {
    -518                            debug!("probe v4 timed out");
    +478        let mut reports = Vec::new();
    +479
    +480        // We set _pending to true if at least one report was started for each category.
    +481        // If we did not start any report for either category, _pending is set to false right away
    +482        // (it "completed" in the sense that nothing will ever run). If we did start at least one report,
    +483        // _pending is set to true, and will be set to false further down once the first task
    +484        // completed.
    +485        let mut ipv4_pending = !v4_buf.is_empty();
    +486        let mut ipv6_pending = !v6_buf.is_empty();
    +487        loop {
    +488            // We early-abort the tasks once we have at least `enough_relays` reports,
    +489            // and at least one ipv4 and one ipv6 report completed (if they were started, see comment above).
    +490            if reports.len() >= enough_relays && !ipv4_pending && !ipv6_pending {
    +491                debug!("enough probes: {}", reports.len());
    +492                cancel_v4.cancel();
    +493                cancel_v6.cancel();
    +494                break;
    +495            }
    +496
    +497            tokio::select! {
    +498                biased;
    +499
    +500                val = v4_buf.join_next(), if !v4_buf.is_empty() => {
    +501                    ipv4_pending = false;
    +502                    match val {
    +503                        Some(Ok(Some(Ok(res)))) => {
    +504                            match res {
    +505                                Ok((r, conn)) => {
    +506                                    debug!(?r, "got v4 QAD conn");
    +507                                    let url = r.node.clone();
    +508                                    reports.push(ProbeReport::QadIpv4(r));
    +509                                    if self.qad_conns.v4.is_none() {
    +510                                        self.qad_conns.v4.replace((url, conn));
    +511                                    } else {
    +512                                        conn.conn.close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    +513                                    }
    +514                                }
    +515                                Err(err) => {
    +516                                    debug!("probe v4 failed: {err:?}");
    +517                                }
    +518                            }
     519                        }
    -520                        None => {}
    -521                    }
    -522                }
    -523                val = v6_buf.join_next(), if !v6_buf.is_empty() => {
    -524                    match val {
    -525                        Some(Ok(Some(Ok(res)))) => {
    -526                            match res {
    -527                                Ok((r, conn)) => {
    -528                                    debug!(?r, "got v6 QAD conn");
    -529                                    let url = r.node.clone();
    -530                                    reports.push(ProbeReport::QadIpv6(r));
    -531                                    if self.qad_conns.v6.is_none() {
    -532                                        self.qad_conns.v6.replace((url, conn));
    -533                                    } else {
    -534                                        conn.conn.close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    -535                                    }
    -536                                }
    -537                                Err(err) => {
    -538                                    debug!("probe v6 failed: {:?}", err);
    -539                                }
    -540                            }
    -541                        }
    -542                        Some(Err(err)) => {
    -543                            if err.is_panic() {
    -544                                panic!("probe v6 panicked: {:?}", err);
    -545                            }
    -546                            warn!("probe v6 failed: {:?}", err);
    -547                        }
    -548                        Some(Ok(None)) => {
    -549                            debug!("probe v6 canceled");
    -550                        }
    -551                        Some(Ok(Some(Err(time::Elapsed { .. })))) => {
    -552                            debug!("probe v6 timed out");
    -553                        }
    -554                        None => {}
    -555                    }
    -556                }
    -557                else => {
    -558                    break;
    -559                }
    -560            }
    -561        }
    -562
    -563        reports
    -564    }
    -565
    -566    fn have_enough_reports(&self, enough_relays: usize, report: &Report) -> Option<Duration> {
    -567        // Once we've heard from enough relay servers (3), start a timer to give up on the other
    -568        // probes. The timer's duration is a function of whether this is our initial full
    -569        // probe or an incremental one. For incremental ones, wait for the duration of the
    -570        // slowest relay. For initial ones, double that.
    -571        let latencies: Vec<Duration> = report.relay_latency.iter().map(|(_, l)| l).collect();
    -572        let have_enough_latencies = latencies.len() >= enough_relays;
    -573
    -574        if have_enough_latencies {
    -575            let timeout = match self.reports.last.is_some() {
    -576                true => Duration::from_secs(0),
    -577                false => latencies
    -578                    .iter()
    -579                    .max()
    -580                    .copied()
    -581                    .unwrap_or(DEFAULT_MAX_LATENCY),
    -582            };
    -583            debug!(
    -584                reports=latencies.len(),
    -585                delay=?timeout,
    -586                "Have enough probe reports, aborting further probes soon",
    -587            );
    -588
    -589            Some(timeout)
    -590        } else {
    -591            None
    -592        }
    -593    }
    -594
    -595    /// Adds `r` to the set of recent Reports and mutates `r.preferred_relay` to contain the best recent one.
    -596    fn add_report_history_and_set_preferred_relay(&mut self, r: &mut Report) {
    -597        let mut prev_relay = None;
    -598        if let Some(ref last) = self.reports.last {
    -599            prev_relay.clone_from(&last.preferred_relay);
    -600
    -601            // If we don't have new information, copy this from the last report
    -602            if r.mapping_varies_by_dest_ipv4.is_none() {
    -603                r.mapping_varies_by_dest_ipv4 = last.mapping_varies_by_dest_ipv4;
    -604            }
    -605            if r.mapping_varies_by_dest_ipv6.is_none() {
    -606                r.mapping_varies_by_dest_ipv6 = last.mapping_varies_by_dest_ipv6;
    -607            }
    -608        }
    -609
    -610        let now = Instant::now();
    -611        const MAX_AGE: Duration = Duration::from_secs(5 * 60);
    -612
    -613        // relay ID => its best recent latency in last MAX_AGE
    -614        let mut best_recent = RelayLatencies::default();
    -615
    -616        // chain the current report as we are still mutating it
    -617        let prevs_iter = self
    -618            .reports
    -619            .prev
    -620            .iter()
    -621            .map(|(a, b)| -> (&Instant, &Report) { (a, b) });
    +520                        Some(Err(err)) => {
    +521                            if err.is_panic() {
    +522                                panic!("probe v4 panicked: {err:?}");
    +523                            }
    +524                            warn!("probe v4 failed: {err:?}");
    +525                        }
    +526                        Some(Ok(None)) => {
    +527                            debug!("probe v4 canceled");
    +528                        }
    +529                        Some(Ok(Some(Err(time::Elapsed { .. })))) => {
    +530                            debug!("probe v4 timed out");
    +531                        }
    +532                        None => {}
    +533                    }
    +534                }
    +535                val = v6_buf.join_next(), if !v6_buf.is_empty() => {
    +536                    ipv6_pending = false;
    +537                    match val {
    +538                        Some(Ok(Some(Ok(res)))) => {
    +539                            match res {
    +540                                Ok((r, conn)) => {
    +541                                    debug!(?r, "got v6 QAD conn");
    +542                                    let url = r.node.clone();
    +543                                    reports.push(ProbeReport::QadIpv6(r));
    +544                                    if self.qad_conns.v6.is_none() {
    +545                                        self.qad_conns.v6.replace((url, conn));
    +546                                    } else {
    +547                                        conn.conn.close(QUIC_ADDR_DISC_CLOSE_CODE, QUIC_ADDR_DISC_CLOSE_REASON);
    +548                                    }
    +549                                }
    +550                                Err(err) => {
    +551                                    debug!("probe v6 failed: {err:?}");
    +552                                }
    +553                            }
    +554                        }
    +555                        Some(Err(err)) => {
    +556                            if err.is_panic() {
    +557                                panic!("probe v6 panicked: {err:?}");
    +558                            }
    +559                            warn!("probe v6 failed: {err:?}");
    +560                        }
    +561                        Some(Ok(None)) => {
    +562                            debug!("probe v6 canceled");
    +563                        }
    +564                        Some(Ok(Some(Err(time::Elapsed { .. })))) => {
    +565                            debug!("probe v6 timed out");
    +566                        }
    +567                        None => {}
    +568                    }
    +569                }
    +570                else => {
    +571                    break;
    +572                }
    +573            }
    +574        }
    +575
    +576        reports
    +577    }
    +578
    +579    fn have_enough_reports(&self, enough_relays: usize, report: &Report) -> Option<Duration> {
    +580        // Once we've heard from enough relay servers (3), start a timer to give up on the other
    +581        // probes. The timer's duration is a function of whether this is our initial full
    +582        // probe or an incremental one. For incremental ones, wait for the duration of the
    +583        // slowest relay. For initial ones, double that.
    +584        let latencies: Vec<Duration> = report.relay_latency.iter().map(|(_, l)| l).collect();
    +585        let have_enough_latencies = latencies.len() >= enough_relays;
    +586
    +587        if have_enough_latencies {
    +588            let timeout = match self.reports.last.is_some() {
    +589                true => Duration::from_secs(0),
    +590                false => latencies
    +591                    .iter()
    +592                    .max()
    +593                    .copied()
    +594                    .unwrap_or(DEFAULT_MAX_LATENCY),
    +595            };
    +596            debug!(
    +597                reports=latencies.len(),
    +598                delay=?timeout,
    +599                "Have enough probe reports, aborting further probes soon",
    +600            );
    +601
    +602            Some(timeout)
    +603        } else {
    +604            None
    +605        }
    +606    }
    +607
    +608    /// Adds `r` to the set of recent Reports and mutates `r.preferred_relay` to contain the best recent one.
    +609    fn add_report_history_and_set_preferred_relay(&mut self, r: &mut Report) {
    +610        let mut prev_relay = None;
    +611        if let Some(ref last) = self.reports.last {
    +612            prev_relay.clone_from(&last.preferred_relay);
    +613
    +614            // If we don't have new information, copy this from the last report
    +615            if r.mapping_varies_by_dest_ipv4.is_none() {
    +616                r.mapping_varies_by_dest_ipv4 = last.mapping_varies_by_dest_ipv4;
    +617            }
    +618            if r.mapping_varies_by_dest_ipv6.is_none() {
    +619                r.mapping_varies_by_dest_ipv6 = last.mapping_varies_by_dest_ipv6;
    +620            }
    +621        }
     622
    -623        let mut to_remove = Vec::new();
    -624        for (t, pr) in prevs_iter {
    -625            if now.duration_since(*t) > MAX_AGE {
    -626                to_remove.push(*t);
    -627                continue;
    -628            }
    -629            best_recent.merge(&pr.relay_latency);
    -630        }
    -631        // merge in current run
    -632        best_recent.merge(&r.relay_latency);
    -633
    -634        for t in to_remove {
    -635            self.reports.prev.remove(&t);
    -636        }
    -637
    -638        // Then, pick which currently-alive relay server from the
    -639        // current report has the best latency over the past MAX_AGE.
    -640        let mut best_any = Duration::default();
    -641        let mut old_relay_cur_latency = Duration::default();
    -642        {
    -643            for (url, duration) in r.relay_latency.iter() {
    -644                if Some(url) == prev_relay.as_ref() {
    -645                    old_relay_cur_latency = duration;
    -646                }
    -647                if let Some(best) = best_recent.get(url) {
    -648                    if r.preferred_relay.is_none() || best < best_any {
    -649                        best_any = best;
    -650                        r.preferred_relay.replace(url.clone());
    -651                    }
    -652                }
    -653            }
    -654
    -655            // If we're changing our preferred relay but the old one's still
    -656            // accessible and the new one's not much better, just stick with
    -657            // where we are.
    -658            if prev_relay.is_some()
    -659                && r.preferred_relay != prev_relay
    -660                && !old_relay_cur_latency.is_zero()
    -661                && best_any > old_relay_cur_latency / 3 * 2
    -662            {
    -663                r.preferred_relay = prev_relay;
    -664            }
    -665        }
    -666
    -667        self.reports.prev.insert(now, r.clone());
    -668        self.reports.last = Some(r.clone());
    -669    }
    -670}
    -671
    -672#[cfg(not(wasm_browser))]
    -673async fn run_probe_v4(
    -674    ip_mapped_addrs: Option<IpMappedAddresses>,
    -675    relay_node: Arc<RelayNode>,
    -676    quic_client: QuicClient,
    -677    dns_resolver: DnsResolver,
    -678) -> n0_snafu::Result<(QadProbeReport, QadConn)> {
    -679    use n0_snafu::ResultExt;
    -680
    -681    let relay_addr_orig = reportgen::get_relay_addr_ipv4(&dns_resolver, &relay_node).await?;
    -682    let relay_addr =
    -683        reportgen::maybe_to_mapped_addr(ip_mapped_addrs.as_ref(), relay_addr_orig.into());
    +623        let now = Instant::now();
    +624        const MAX_AGE: Duration = Duration::from_secs(5 * 60);
    +625
    +626        // relay ID => its best recent latency in last MAX_AGE
    +627        let mut best_recent = RelayLatencies::default();
    +628
    +629        // chain the current report as we are still mutating it
    +630        let prevs_iter = self
    +631            .reports
    +632            .prev
    +633            .iter()
    +634            .map(|(a, b)| -> (&Instant, &Report) { (a, b) });
    +635
    +636        let mut to_remove = Vec::new();
    +637        for (t, pr) in prevs_iter {
    +638            if now.duration_since(*t) > MAX_AGE {
    +639                to_remove.push(*t);
    +640                continue;
    +641            }
    +642            best_recent.merge(&pr.relay_latency);
    +643        }
    +644        // merge in current run
    +645        best_recent.merge(&r.relay_latency);
    +646
    +647        for t in to_remove {
    +648            self.reports.prev.remove(&t);
    +649        }
    +650
    +651        // Then, pick which currently-alive relay server from the
    +652        // current report has the best latency over the past MAX_AGE.
    +653        let mut best_any = Duration::default();
    +654        let mut old_relay_cur_latency = Duration::default();
    +655        {
    +656            for (url, duration) in r.relay_latency.iter() {
    +657                if Some(url) == prev_relay.as_ref() {
    +658                    old_relay_cur_latency = duration;
    +659                }
    +660                if let Some(best) = best_recent.get(url) {
    +661                    if r.preferred_relay.is_none() || best < best_any {
    +662                        best_any = best;
    +663                        r.preferred_relay.replace(url.clone());
    +664                    }
    +665                }
    +666            }
    +667
    +668            // If we're changing our preferred relay but the old one's still
    +669            // accessible and the new one's not much better, just stick with
    +670            // where we are.
    +671            if prev_relay.is_some()
    +672                && r.preferred_relay != prev_relay
    +673                && !old_relay_cur_latency.is_zero()
    +674                && best_any > old_relay_cur_latency / 3 * 2
    +675            {
    +676                r.preferred_relay = prev_relay;
    +677            }
    +678        }
    +679
    +680        self.reports.prev.insert(now, r.clone());
    +681        self.reports.last = Some(r.clone());
    +682    }
    +683}
     684
    -685    debug!(?relay_addr_orig, ?relay_addr, "relay addr v4");
    -686    let host = relay_node.url.host_str().context("missing host url")?;
    -687    let conn = quic_client.create_conn(relay_addr, host).await?;
    -688    let mut receiver = conn.observed_external_addr();
    -689
    -690    // wait for an addr
    -691    let addr = receiver
    -692        .wait_for(|addr| addr.is_some())
    -693        .await
    -694        .context("receiver dropped")?
    -695        .expect("known");
    -696    let report = QadProbeReport {
    -697        node: relay_node.url.clone(),
    -698        addr: SocketAddr::new(addr.ip().to_canonical(), addr.port()),
    -699        latency: conn.rtt(),
    -700    };
    -701
    -702    let observer = Watchable::new(None);
    -703    let ob = observer.clone();
    -704    let node = relay_node.url.clone();
    -705    let conn2 = conn.clone();
    -706    let handle = task::spawn(async move {
    -707        loop {
    -708            let val = *receiver.borrow();
    -709            // if we've sent to an ipv4 address, but received an observed address
    -710            // that is ivp6 then the address is an [IPv4-Mapped IPv6 Addresses](https://doc.rust-lang.org/beta/std/net/struct.Ipv6Addr.html#ipv4-mapped-ipv6-addresses)
    -711            let val = val.map(|val| SocketAddr::new(val.ip().to_canonical(), val.port()));
    -712            let latency = conn2.rtt();
    -713            trace!(?val, ?relay_addr, ?latency, "got addr V4");
    -714            if ob
    -715                .set(val.map(|addr| QadProbeReport {
    -716                    node: node.clone(),
    -717                    addr,
    -718                    latency,
    -719                }))
    -720                .is_err()
    -721            {
    -722                // cancel if the observer is gone
    -723                break;
    -724            }
    -725            if receiver.changed().await.is_err() {
    -726                break;
    -727            }
    -728        }
    -729    });
    -730    let handle = AbortOnDropHandle::new(handle);
    -731
    -732    Ok((
    -733        report,
    -734        QadConn {
    -735            conn,
    -736            observer,
    -737            _handle: handle,
    -738        },
    -739    ))
    -740}
    -741
    -742#[cfg(not(wasm_browser))]
    -743async fn run_probe_v6(
    -744    ip_mapped_addrs: Option<IpMappedAddresses>,
    -745    relay_node: Arc<RelayNode>,
    -746    quic_client: QuicClient,
    -747    dns_resolver: DnsResolver,
    -748) -> n0_snafu::Result<(QadProbeReport, QadConn)> {
    -749    use n0_snafu::ResultExt;
    -750    let relay_addr_orig = reportgen::get_relay_addr_ipv6(&dns_resolver, &relay_node).await?;
    -751    let relay_addr =
    -752        reportgen::maybe_to_mapped_addr(ip_mapped_addrs.as_ref(), relay_addr_orig.into());
    -753
    -754    debug!(?relay_addr_orig, ?relay_addr, "relay addr v6");
    -755    let host = relay_node.url.host_str().context("missing host url")?;
    -756    let conn = quic_client.create_conn(relay_addr, host).await?;
    -757    let mut receiver = conn.observed_external_addr();
    -758
    -759    // wait for an addr
    -760    let addr = receiver
    -761        .wait_for(|addr| addr.is_some())
    -762        .await
    -763        .context("receiver dropped")?
    -764        .expect("known");
    -765    let report = QadProbeReport {
    -766        node: relay_node.url.clone(),
    -767        addr: SocketAddr::new(addr.ip().to_canonical(), addr.port()),
    -768        latency: conn.rtt(),
    -769    };
    -770
    -771    let observer = Watchable::new(None);
    -772    let ob = observer.clone();
    -773    let node = relay_node.url.clone();
    -774    let conn2 = conn.clone();
    -775    let handle = task::spawn(async move {
    -776        loop {
    -777            let val = *receiver.borrow();
    -778            // if we've sent to an ipv4 address, but received an observed address
    -779            // that is ivp6 then the address is an IPv4-Mapped IPv6 Addresses
    -780            let val = val.map(|val| SocketAddr::new(val.ip().to_canonical(), val.port()));
    -781            let latency = conn2.rtt();
    -782            trace!(?val, ?relay_addr, ?latency, "got addr V6");
    -783            if ob
    -784                .set(val.map(|addr| QadProbeReport {
    -785                    node: node.clone(),
    -786                    addr,
    -787                    latency,
    -788                }))
    -789                .is_err()
    -790            {
    -791                // cancel if the observer is gone
    -792                break;
    -793            }
    -794            if receiver.changed().await.is_err() {
    -795                break;
    -796            }
    -797        }
    -798    });
    -799    let handle = AbortOnDropHandle::new(handle);
    -800
    -801    Ok((
    -802        report,
    -803        QadConn {
    -804            conn,
    -805            observer,
    -806            _handle: handle,
    -807        },
    -808    ))
    -809}
    -810
    -811#[cfg(test)]
    -812mod test_utils {
    -813    //! Creates a relay server against which to perform tests
    -814
    -815    use iroh_relay::{server, RelayNode, RelayQuicConfig};
    -816
    -817    pub(crate) async fn relay() -> (server::Server, RelayNode) {
    -818        let server = server::Server::spawn(server::testing::server_config())
    -819            .await
    -820            .expect("should serve relay");
    -821        let quic = Some(RelayQuicConfig {
    -822            port: server.quic_addr().expect("server should run quic").port(),
    -823        });
    -824        let node_desc = RelayNode {
    -825            url: server.https_url().expect("should work as relay"),
    -826            quic,
    -827        };
    -828
    -829        (server, node_desc)
    -830    }
    -831
    -832    /// Create a [`crate::RelayMap`] of the given size.
    -833    ///
    -834    /// This function uses [`relay`]. Note that the returned map uses internal order that will
    -835    /// often _not_ match the order of the servers.
    -836    pub(crate) async fn relay_map(relays: usize) -> (Vec<server::Server>, crate::RelayMap) {
    -837        let mut servers = Vec::with_capacity(relays);
    -838        let mut nodes = Vec::with_capacity(relays);
    -839        for _ in 0..relays {
    -840            let (relay_server, node) = relay().await;
    -841            servers.push(relay_server);
    -842            nodes.push(node);
    -843        }
    -844        (servers, crate::RelayMap::from_iter(nodes))
    -845    }
    -846}
    -847
    -848#[cfg(test)]
    -849mod tests {
    -850    use std::net::{Ipv4Addr, SocketAddr};
    -851
    -852    use iroh_base::RelayUrl;
    -853    use iroh_relay::dns::DnsResolver;
    -854    use n0_snafu::{Result, ResultExt};
    -855    use tokio_util::sync::CancellationToken;
    -856    use tracing_test::traced_test;
    -857
    -858    use super::*;
    -859    use crate::net_report::probes::Probe;
    +685#[cfg(not(wasm_browser))]
    +686async fn run_probe_v4(
    +687    ip_mapped_addrs: Option<IpMappedAddresses>,
    +688    relay_node: Arc<RelayNode>,
    +689    quic_client: QuicClient,
    +690    dns_resolver: DnsResolver,
    +691) -> n0_snafu::Result<(QadProbeReport, QadConn)> {
    +692    use n0_snafu::ResultExt;
    +693
    +694    let relay_addr_orig = reportgen::get_relay_addr_ipv4(&dns_resolver, &relay_node).await?;
    +695    let relay_addr =
    +696        reportgen::maybe_to_mapped_addr(ip_mapped_addrs.as_ref(), relay_addr_orig.into());
    +697
    +698    debug!(?relay_addr_orig, ?relay_addr, "relay addr v4");
    +699    let host = relay_node.url.host_str().context("missing host url")?;
    +700    let conn = quic_client.create_conn(relay_addr, host).await?;
    +701    let mut receiver = conn.observed_external_addr();
    +702
    +703    // wait for an addr
    +704    let addr = receiver
    +705        .wait_for(|addr| addr.is_some())
    +706        .await
    +707        .context("receiver dropped")?
    +708        .expect("known");
    +709    let report = QadProbeReport {
    +710        node: relay_node.url.clone(),
    +711        addr: SocketAddr::new(addr.ip().to_canonical(), addr.port()),
    +712        latency: conn.rtt(),
    +713    };
    +714
    +715    let observer = Watchable::new(None);
    +716    let node = relay_node.url.clone();
    +717    let handle = task::spawn({
    +718        let conn = conn.clone();
    +719        let observer = observer.clone();
    +720        async move {
    +721            loop {
    +722                let val = *receiver.borrow();
    +723                // if we've sent to an ipv4 address, but received an observed address
    +724                // that is ivp6 then the address is an [IPv4-Mapped IPv6 Addresses](https://doc.rust-lang.org/beta/std/net/struct.Ipv6Addr.html#ipv4-mapped-ipv6-addresses)
    +725                let val = val.map(|val| SocketAddr::new(val.ip().to_canonical(), val.port()));
    +726                let latency = conn.rtt();
    +727                trace!(?val, ?relay_addr, ?latency, "got addr V4");
    +728                observer
    +729                    .set(val.map(|addr| QadProbeReport {
    +730                        node: node.clone(),
    +731                        addr,
    +732                        latency,
    +733                    }))
    +734                    .ok();
    +735                if receiver.changed().await.is_err() {
    +736                    break;
    +737                }
    +738            }
    +739        }
    +740    });
    +741    let handle = AbortOnDropHandle::new(handle);
    +742
    +743    Ok((
    +744        report,
    +745        QadConn {
    +746            conn,
    +747            observer,
    +748            _handle: handle,
    +749        },
    +750    ))
    +751}
    +752
    +753#[cfg(not(wasm_browser))]
    +754async fn run_probe_v6(
    +755    ip_mapped_addrs: Option<IpMappedAddresses>,
    +756    relay_node: Arc<RelayNode>,
    +757    quic_client: QuicClient,
    +758    dns_resolver: DnsResolver,
    +759) -> n0_snafu::Result<(QadProbeReport, QadConn)> {
    +760    use n0_snafu::ResultExt;
    +761    let relay_addr_orig = reportgen::get_relay_addr_ipv6(&dns_resolver, &relay_node).await?;
    +762    let relay_addr =
    +763        reportgen::maybe_to_mapped_addr(ip_mapped_addrs.as_ref(), relay_addr_orig.into());
    +764
    +765    debug!(?relay_addr_orig, ?relay_addr, "relay addr v6");
    +766    let host = relay_node.url.host_str().context("missing host url")?;
    +767    let conn = quic_client.create_conn(relay_addr, host).await?;
    +768    let mut receiver = conn.observed_external_addr();
    +769
    +770    // wait for an addr
    +771    let addr = receiver
    +772        .wait_for(|addr| addr.is_some())
    +773        .await
    +774        .context("receiver dropped")?
    +775        .expect("known");
    +776    let report = QadProbeReport {
    +777        node: relay_node.url.clone(),
    +778        addr: SocketAddr::new(addr.ip().to_canonical(), addr.port()),
    +779        latency: conn.rtt(),
    +780    };
    +781
    +782    let observer = Watchable::new(None);
    +783    let node = relay_node.url.clone();
    +784    let handle = task::spawn({
    +785        let observer = observer.clone();
    +786        let conn = conn.clone();
    +787        async move {
    +788            loop {
    +789                let val = *receiver.borrow();
    +790                // if we've sent to an ipv4 address, but received an observed address
    +791                // that is ivp6 then the address is an [IPv4-Mapped IPv6 Addresses](https://doc.rust-lang.org/beta/std/net/struct.Ipv6Addr.html#ipv4-mapped-ipv6-addresses)
    +792                let val = val.map(|val| SocketAddr::new(val.ip().to_canonical(), val.port()));
    +793                let latency = conn.rtt();
    +794                trace!(?val, ?relay_addr, ?latency, "got addr V6");
    +795                observer
    +796                    .set(val.map(|addr| QadProbeReport {
    +797                        node: node.clone(),
    +798                        addr,
    +799                        latency,
    +800                    }))
    +801                    .ok();
    +802                if receiver.changed().await.is_err() {
    +803                    break;
    +804                }
    +805            }
    +806        }
    +807    });
    +808    let handle = AbortOnDropHandle::new(handle);
    +809
    +810    Ok((
    +811        report,
    +812        QadConn {
    +813            conn,
    +814            observer,
    +815            _handle: handle,
    +816        },
    +817    ))
    +818}
    +819
    +820#[cfg(test)]
    +821mod test_utils {
    +822    //! Creates a relay server against which to perform tests
    +823
    +824    use iroh_relay::{RelayNode, RelayQuicConfig, server};
    +825
    +826    pub(crate) async fn relay() -> (server::Server, RelayNode) {
    +827        let server = server::Server::spawn(server::testing::server_config())
    +828            .await
    +829            .expect("should serve relay");
    +830        let quic = Some(RelayQuicConfig {
    +831            port: server.quic_addr().expect("server should run quic").port(),
    +832        });
    +833        let node_desc = RelayNode {
    +834            url: server.https_url().expect("should work as relay"),
    +835            quic,
    +836        };
    +837
    +838        (server, node_desc)
    +839    }
    +840
    +841    /// Create a [`crate::RelayMap`] of the given size.
    +842    ///
    +843    /// This function uses [`relay`]. Note that the returned map uses internal order that will
    +844    /// often _not_ match the order of the servers.
    +845    pub(crate) async fn relay_map(relays: usize) -> (Vec<server::Server>, crate::RelayMap) {
    +846        let mut servers = Vec::with_capacity(relays);
    +847        let mut nodes = Vec::with_capacity(relays);
    +848        for _ in 0..relays {
    +849            let (relay_server, node) = relay().await;
    +850            servers.push(relay_server);
    +851            nodes.push(node);
    +852        }
    +853        (servers, crate::RelayMap::from_iter(nodes))
    +854    }
    +855}
    +856
    +857#[cfg(test)]
    +858mod tests {
    +859    use std::net::{Ipv4Addr, SocketAddr};
     860
    -861    #[tokio::test(flavor = "multi_thread")]
    -862    #[traced_test]
    -863    async fn test_basic() -> Result<()> {
    -864        let (server, relay) = test_utils::relay().await;
    -865        let client_config = iroh_relay::client::make_dangerous_client_config();
    -866        let ep = quinn::Endpoint::client(SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 0)).e()?;
    -867        let quic_addr_disc = QuicConfig {
    -868            ep: ep.clone(),
    -869            client_config,
    -870            ipv4: true,
    -871            ipv6: true,
    -872        };
    -873        let relay_map = RelayMap::from(relay);
    -874
    -875        let resolver = DnsResolver::new();
    -876        let opts = Options::default()
    -877            .quic_config(Some(quic_addr_disc.clone()))
    -878            .insecure_skip_relay_cert_verify(true);
    -879        let mut client = Client::new(
    -880            resolver.clone(),
    -881            None,
    -882            relay_map.clone(),
    -883            opts.clone(),
    -884            Default::default(),
    -885        );
    -886        let if_state = IfStateDetails::fake();
    -887
    -888        // Note that the ProbePlan will change with each iteration.
    -889        for i in 0..5 {
    -890            let cancel = CancellationToken::new();
    -891            println!("--round {}", i);
    -892            let r = client.get_report(if_state.clone(), false).await;
    -893
    -894            assert!(r.has_udp(), "want UDP");
    -895            dbg!(&r);
    -896            assert!(
    -897                !r.relay_latency.is_empty(),
    -898                "expected at least 1 key in RelayLatency; got none",
    -899            );
    -900            assert!(
    -901                r.relay_latency.iter().next().is_some(),
    -902                "expected key 1 in RelayLatency; got {:?}",
    -903                r.relay_latency
    -904            );
    -905            assert!(r.global_v4.is_some(), "expected globalV4 set");
    -906            assert!(r.preferred_relay.is_some(),);
    -907            cancel.cancel();
    -908        }
    -909
    -910        drop(client);
    -911        ep.wait_idle().await;
    -912        server.shutdown().await?;
    -913
    -914        Ok(())
    -915    }
    -916
    -917    #[tokio::test(flavor = "current_thread", start_paused = true)]
    -918    async fn test_add_report_history_set_preferred_relay() -> Result {
    -919        fn relay_url(i: u16) -> RelayUrl {
    -920            format!("http://{i}.com").parse().unwrap()
    -921        }
    +861    use iroh_base::RelayUrl;
    +862    use iroh_relay::dns::DnsResolver;
    +863    use n0_snafu::{Result, ResultExt};
    +864    use tokio_util::sync::CancellationToken;
    +865    use tracing_test::traced_test;
    +866
    +867    use super::*;
    +868    use crate::net_report::probes::Probe;
    +869
    +870    #[tokio::test(flavor = "multi_thread")]
    +871    #[traced_test]
    +872    async fn test_basic() -> Result<()> {
    +873        let (server, relay) = test_utils::relay().await;
    +874        let client_config = iroh_relay::client::make_dangerous_client_config();
    +875        let ep = quinn::Endpoint::client(SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 0)).e()?;
    +876        let quic_addr_disc = QuicConfig {
    +877            ep: ep.clone(),
    +878            client_config,
    +879            ipv4: true,
    +880            ipv6: true,
    +881        };
    +882        let relay_map = RelayMap::from(relay);
    +883
    +884        let resolver = DnsResolver::new();
    +885        let opts = Options::default()
    +886            .quic_config(Some(quic_addr_disc.clone()))
    +887            .insecure_skip_relay_cert_verify(true);
    +888        let mut client = Client::new(
    +889            resolver.clone(),
    +890            None,
    +891            relay_map.clone(),
    +892            opts.clone(),
    +893            Default::default(),
    +894        );
    +895        let if_state = IfStateDetails::fake();
    +896
    +897        // Note that the ProbePlan will change with each iteration.
    +898        for i in 0..5 {
    +899            let cancel = CancellationToken::new();
    +900            println!("--round {i}");
    +901            let r = client.get_report(if_state.clone(), false).await;
    +902
    +903            assert!(r.has_udp(), "want UDP");
    +904            dbg!(&r);
    +905            assert!(
    +906                !r.relay_latency.is_empty(),
    +907                "expected at least 1 key in RelayLatency; got none",
    +908            );
    +909            assert!(
    +910                r.relay_latency.iter().next().is_some(),
    +911                "expected key 1 in RelayLatency; got {:?}",
    +912                r.relay_latency
    +913            );
    +914            assert!(r.global_v4.is_some(), "expected globalV4 set");
    +915            assert!(r.preferred_relay.is_some(),);
    +916            cancel.cancel();
    +917        }
    +918
    +919        drop(client);
    +920        ep.wait_idle().await;
    +921        server.shutdown().await?;
     922
    -923        // report returns a *Report from (relay host, Duration)+ pairs.
    -924        fn report(a: impl IntoIterator<Item = (&'static str, u64)>) -> Option<Report> {
    -925            let mut report = Report::default();
    -926            for (s, d) in a {
    -927                assert!(s.starts_with('d'), "invalid relay server key");
    -928                let id: u16 = s[1..].parse().unwrap();
    -929                report.relay_latency.update_relay(
    -930                    relay_url(id),
    -931                    Duration::from_secs(d),
    -932                    Probe::QadIpv4,
    -933                );
    -934            }
    -935
    -936            Some(report)
    -937        }
    -938        struct Step {
    -939            /// Delay in seconds
    -940            after: u64,
    -941            r: Option<Report>,
    -942        }
    -943        struct Test {
    -944            name: &'static str,
    -945            steps: Vec<Step>,
    -946            /// want PreferredRelay on final step
    -947            want_relay: Option<RelayUrl>,
    -948            // wanted len(c.prev)
    -949            want_prev_len: usize,
    -950        }
    -951
    -952        let tests = [
    -953            Test {
    -954                name: "first_reading",
    -955                steps: vec![Step {
    -956                    after: 0,
    -957                    r: report([("d1", 2), ("d2", 3)]),
    -958                }],
    -959                want_prev_len: 1,
    -960                want_relay: Some(relay_url(1)),
    -961            },
    +923        Ok(())
    +924    }
    +925
    +926    #[tokio::test(flavor = "current_thread", start_paused = true)]
    +927    async fn test_add_report_history_set_preferred_relay() -> Result {
    +928        fn relay_url(i: u16) -> RelayUrl {
    +929            format!("http://{i}.com").parse().unwrap()
    +930        }
    +931
    +932        // report returns a *Report from (relay host, Duration)+ pairs.
    +933        fn report(a: impl IntoIterator<Item = (&'static str, u64)>) -> Option<Report> {
    +934            let mut report = Report::default();
    +935            for (s, d) in a {
    +936                assert!(s.starts_with('d'), "invalid relay server key");
    +937                let id: u16 = s[1..].parse().unwrap();
    +938                report.relay_latency.update_relay(
    +939                    relay_url(id),
    +940                    Duration::from_secs(d),
    +941                    Probe::QadIpv4,
    +942                );
    +943            }
    +944
    +945            Some(report)
    +946        }
    +947        struct Step {
    +948            /// Delay in seconds
    +949            after: u64,
    +950            r: Option<Report>,
    +951        }
    +952        struct Test {
    +953            name: &'static str,
    +954            steps: Vec<Step>,
    +955            /// want PreferredRelay on final step
    +956            want_relay: Option<RelayUrl>,
    +957            // wanted len(c.prev)
    +958            want_prev_len: usize,
    +959        }
    +960
    +961        let tests = [
     962            Test {
    -963                name: "with_two",
    -964                steps: vec![
    -965                    Step {
    -966                        after: 0,
    -967                        r: report([("d1", 2), ("d2", 3)]),
    -968                    },
    -969                    Step {
    -970                        after: 1,
    -971                        r: report([("d1", 4), ("d2", 3)]),
    -972                    },
    -973                ],
    -974                want_prev_len: 2,
    -975                want_relay: Some(relay_url(1)), // t0's d1 of 2 is still best
    -976            },
    -977            Test {
    -978                name: "but_now_d1_gone",
    -979                steps: vec![
    -980                    Step {
    -981                        after: 0,
    -982                        r: report([("d1", 2), ("d2", 3)]),
    -983                    },
    -984                    Step {
    -985                        after: 1,
    -986                        r: report([("d1", 4), ("d2", 3)]),
    -987                    },
    -988                    Step {
    -989                        after: 2,
    -990                        r: report([("d2", 3)]),
    -991                    },
    -992                ],
    -993                want_prev_len: 3,
    -994                want_relay: Some(relay_url(2)), // only option
    -995            },
    -996            Test {
    -997                name: "d1_is_back",
    -998                steps: vec![
    -999                    Step {
    -1000                        after: 0,
    -1001                        r: report([("d1", 2), ("d2", 3)]),
    -1002                    },
    -1003                    Step {
    -1004                        after: 1,
    -1005                        r: report([("d1", 4), ("d2", 3)]),
    -1006                    },
    -1007                    Step {
    -1008                        after: 2,
    -1009                        r: report([("d2", 3)]),
    -1010                    },
    -1011                    Step {
    -1012                        after: 3,
    -1013                        r: report([("d1", 4), ("d2", 3)]),
    -1014                    }, // same as 2 seconds ago
    -1015                ],
    -1016                want_prev_len: 4,
    -1017                want_relay: Some(relay_url(1)), // t0's d1 of 2 is still best
    -1018            },
    -1019            Test {
    -1020                name: "things_clean_up",
    -1021                steps: vec![
    -1022                    Step {
    -1023                        after: 0,
    -1024                        r: report([("d1", 1), ("d2", 2)]),
    -1025                    },
    -1026                    Step {
    -1027                        after: 1,
    -1028                        r: report([("d1", 1), ("d2", 2)]),
    -1029                    },
    -1030                    Step {
    -1031                        after: 2,
    -1032                        r: report([("d1", 1), ("d2", 2)]),
    -1033                    },
    -1034                    Step {
    -1035                        after: 3,
    -1036                        r: report([("d1", 1), ("d2", 2)]),
    -1037                    },
    -1038                    Step {
    -1039                        after: 10 * 60,
    -1040                        r: report([("d3", 3)]),
    -1041                    },
    -1042                ],
    -1043                want_prev_len: 1, // t=[0123]s all gone. (too old, older than 10 min)
    -1044                want_relay: Some(relay_url(3)), // only option
    -1045            },
    -1046            Test {
    -1047                name: "preferred_relay_hysteresis_no_switch",
    -1048                steps: vec![
    -1049                    Step {
    -1050                        after: 0,
    -1051                        r: report([("d1", 4), ("d2", 5)]),
    -1052                    },
    -1053                    Step {
    -1054                        after: 1,
    -1055                        r: report([("d1", 4), ("d2", 3)]),
    -1056                    },
    -1057                ],
    -1058                want_prev_len: 2,
    -1059                want_relay: Some(relay_url(1)), // 2 didn't get fast enough
    -1060            },
    -1061            Test {
    -1062                name: "preferred_relay_hysteresis_do_switch",
    -1063                steps: vec![
    -1064                    Step {
    -1065                        after: 0,
    -1066                        r: report([("d1", 4), ("d2", 5)]),
    -1067                    },
    -1068                    Step {
    -1069                        after: 1,
    -1070                        r: report([("d1", 4), ("d2", 1)]),
    -1071                    },
    -1072                ],
    -1073                want_prev_len: 2,
    -1074                want_relay: Some(relay_url(2)), // 2 got fast enough
    -1075            },
    -1076        ];
    -1077        let resolver = DnsResolver::new();
    -1078        for mut tt in tests {
    -1079            println!("test: {}", tt.name);
    -1080            let relay_map = RelayMap::empty();
    -1081            let opts = Options::default();
    -1082            let mut client =
    -1083                Client::new(resolver.clone(), None, relay_map, opts, Default::default());
    -1084            for s in &mut tt.steps {
    -1085                // trigger the timer
    -1086                tokio::time::advance(Duration::from_secs(s.after)).await;
    -1087                client.add_report_history_and_set_preferred_relay(s.r.as_mut().unwrap());
    -1088            }
    -1089            let last_report = tt.steps.last().unwrap().r.clone().unwrap();
    -1090            let got = client.reports.prev.len();
    -1091            let want = tt.want_prev_len;
    -1092            assert_eq!(got, want, "prev length");
    -1093            let got = &last_report.preferred_relay;
    -1094            let want = &tt.want_relay;
    -1095            assert_eq!(got, want, "preferred_relay");
    -1096        }
    -1097
    -1098        Ok(())
    -1099    }
    -1100}
    \ No newline at end of file +963 name: "first_reading", +964 steps: vec![Step { +965 after: 0, +966 r: report([("d1", 2), ("d2", 3)]), +967 }], +968 want_prev_len: 1, +969 want_relay: Some(relay_url(1)), +970 }, +971 Test { +972 name: "with_two", +973 steps: vec![ +974 Step { +975 after: 0, +976 r: report([("d1", 2), ("d2", 3)]), +977 }, +978 Step { +979 after: 1, +980 r: report([("d1", 4), ("d2", 3)]), +981 }, +982 ], +983 want_prev_len: 2, +984 want_relay: Some(relay_url(1)), // t0's d1 of 2 is still best +985 }, +986 Test { +987 name: "but_now_d1_gone", +988 steps: vec![ +989 Step { +990 after: 0, +991 r: report([("d1", 2), ("d2", 3)]), +992 }, +993 Step { +994 after: 1, +995 r: report([("d1", 4), ("d2", 3)]), +996 }, +997 Step { +998 after: 2, +999 r: report([("d2", 3)]), +1000 }, +1001 ], +1002 want_prev_len: 3, +1003 want_relay: Some(relay_url(2)), // only option +1004 }, +1005 Test { +1006 name: "d1_is_back", +1007 steps: vec![ +1008 Step { +1009 after: 0, +1010 r: report([("d1", 2), ("d2", 3)]), +1011 }, +1012 Step { +1013 after: 1, +1014 r: report([("d1", 4), ("d2", 3)]), +1015 }, +1016 Step { +1017 after: 2, +1018 r: report([("d2", 3)]), +1019 }, +1020 Step { +1021 after: 3, +1022 r: report([("d1", 4), ("d2", 3)]), +1023 }, // same as 2 seconds ago +1024 ], +1025 want_prev_len: 4, +1026 want_relay: Some(relay_url(1)), // t0's d1 of 2 is still best +1027 }, +1028 Test { +1029 name: "things_clean_up", +1030 steps: vec![ +1031 Step { +1032 after: 0, +1033 r: report([("d1", 1), ("d2", 2)]), +1034 }, +1035 Step { +1036 after: 1, +1037 r: report([("d1", 1), ("d2", 2)]), +1038 }, +1039 Step { +1040 after: 2, +1041 r: report([("d1", 1), ("d2", 2)]), +1042 }, +1043 Step { +1044 after: 3, +1045 r: report([("d1", 1), ("d2", 2)]), +1046 }, +1047 Step { +1048 after: 10 * 60, +1049 r: report([("d3", 3)]), +1050 }, +1051 ], +1052 want_prev_len: 1, // t=[0123]s all gone. (too old, older than 10 min) +1053 want_relay: Some(relay_url(3)), // only option +1054 }, +1055 Test { +1056 name: "preferred_relay_hysteresis_no_switch", +1057 steps: vec![ +1058 Step { +1059 after: 0, +1060 r: report([("d1", 4), ("d2", 5)]), +1061 }, +1062 Step { +1063 after: 1, +1064 r: report([("d1", 4), ("d2", 3)]), +1065 }, +1066 ], +1067 want_prev_len: 2, +1068 want_relay: Some(relay_url(1)), // 2 didn't get fast enough +1069 }, +1070 Test { +1071 name: "preferred_relay_hysteresis_do_switch", +1072 steps: vec![ +1073 Step { +1074 after: 0, +1075 r: report([("d1", 4), ("d2", 5)]), +1076 }, +1077 Step { +1078 after: 1, +1079 r: report([("d1", 4), ("d2", 1)]), +1080 }, +1081 ], +1082 want_prev_len: 2, +1083 want_relay: Some(relay_url(2)), // 2 got fast enough +1084 }, +1085 ]; +1086 let resolver = DnsResolver::new(); +1087 for mut tt in tests { +1088 println!("test: {}", tt.name); +1089 let relay_map = RelayMap::empty(); +1090 let opts = Options::default(); +1091 let mut client = +1092 Client::new(resolver.clone(), None, relay_map, opts, Default::default()); +1093 for s in &mut tt.steps { +1094 // trigger the timer +1095 tokio::time::advance(Duration::from_secs(s.after)).await; +1096 client.add_report_history_and_set_preferred_relay(s.r.as_mut().unwrap()); +1097 } +1098 let last_report = tt.steps.last().unwrap().r.clone().unwrap(); +1099 let got = client.reports.prev.len(); +1100 let want = tt.want_prev_len; +1101 assert_eq!(got, want, "prev length"); +1102 let got = &last_report.preferred_relay; +1103 let want = &tt.want_relay; +1104 assert_eq!(got, want, "preferred_relay"); +1105 } +1106 +1107 Ok(()) +1108 } +1109}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/net_report/defaults.rs.html b/pr/3367/docs/src/iroh/net_report/defaults.rs.html index fc8fe3e0ca..f2356a26d1 100644 --- a/pr/3367/docs/src/iroh/net_report/defaults.rs.html +++ b/pr/3367/docs/src/iroh/net_report/defaults.rs.html @@ -1,4 +1,4 @@ -defaults.rs - source

    iroh/net_report/
    defaults.rs

    1//! Default values used in net_report.
    +defaults.rs - source

    iroh/net_report/
    defaults.rs

    1//! Default values used in net_report.
     2
     3/// Contains all timeouts that we use in `iroh-net-report`.
     4pub(crate) mod timeouts {
    @@ -6,27 +6,34 @@
     6
     7    // Timeouts for net_report
     8
    -9    /// The maximum amount of time net_report will spend gathering a single report.
    -10    pub(crate) const OVERALL_REPORT_TIMEOUT: Duration = Duration::from_secs(5);
    -11
    -12    /// The total time we wait for all the probes.
    -13    ///
    -14    /// This includes the QAD and HTTPS probes, which will all
    -15    /// start at different times based on the ProbePlan.
    -16    pub(crate) const PROBES_TIMEOUT: Duration = Duration::from_secs(3);
    -17
    -18    /// How long to await for a captive-portal result.
    -19    ///
    -20    /// This delay is chosen so it starts after good-working QAD probes
    -21    /// would have finished, but not too long so the delay is bearable if
    -22    /// UDP/QAD is blocked.
    -23    pub(crate) const CAPTIVE_PORTAL_DELAY: Duration = Duration::from_millis(200);
    +9    /// The maximum amount of time, in seconds, the net_report will spend gathering a single report.
    +10    // This is separated from `OVERALL_REPORT_TIMEOUT` to use as a reference
    +11    // in documentation outside of this crate. `OVERALL_REPORT_TIMEOUT` is a
    +12    // duration and rustdoc cannot calculate it at runtime, and so cannot be
    +13    // used directly for documentation purposes.
    +14    pub const TIMEOUT: u64 = 5;
    +15
    +16    /// The maximum amount of time net_report will spend gathering a single report.
    +17    pub(crate) const OVERALL_REPORT_TIMEOUT: Duration = Duration::from_secs(TIMEOUT);
    +18
    +19    /// The total time we wait for all the probes.
    +20    ///
    +21    /// This includes the QAD and HTTPS probes, which will all
    +22    /// start at different times based on the ProbePlan.
    +23    pub(crate) const PROBES_TIMEOUT: Duration = Duration::from_secs(3);
     24
    -25    /// Timeout for captive portal checks
    +25    /// How long to await for a captive-portal result.
     26    ///
    -27    /// Must be lower than [`OVERALL_REPORT_TIMEOUT`] minus
    -28    /// [`CAPTIVE_PORTAL_DELAY`].
    -29    pub(crate) const CAPTIVE_PORTAL_TIMEOUT: Duration = Duration::from_secs(2);
    -30
    -31    pub(crate) const DNS_TIMEOUT: Duration = Duration::from_secs(3);
    -32}
    \ No newline at end of file +27 /// This delay is chosen so it starts after good-working QAD probes +28 /// would have finished, but not too long so the delay is bearable if +29 /// UDP/QAD is blocked. +30
    pub(crate) const CAPTIVE_PORTAL_DELAY: Duration = Duration::from_millis(200); +31 +32 /// Timeout for captive portal checks +33 /// +34 /// Must be lower than [`OVERALL_REPORT_TIMEOUT`] minus +35 /// [`CAPTIVE_PORTAL_DELAY`]. +36 pub(crate) const CAPTIVE_PORTAL_TIMEOUT: Duration = Duration::from_secs(2); +37 +38 pub(crate) const DNS_TIMEOUT: Duration = Duration::from_secs(3); +39}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/net_report/ip_mapped_addrs.rs.html b/pr/3367/docs/src/iroh/net_report/ip_mapped_addrs.rs.html index 117278f996..32689a3b32 100644 --- a/pr/3367/docs/src/iroh/net_report/ip_mapped_addrs.rs.html +++ b/pr/3367/docs/src/iroh/net_report/ip_mapped_addrs.rs.html @@ -1,9 +1,9 @@ -ip_mapped_addrs.rs - source

    iroh/net_report/
    ip_mapped_addrs.rs

    1use std::{
    +ip_mapped_addrs.rs - source

    iroh/net_report/
    ip_mapped_addrs.rs

    1use std::{
     2    collections::BTreeMap,
     3    net::{IpAddr, Ipv6Addr, SocketAddr},
     4    sync::{
    -5        atomic::{AtomicU64, Ordering},
    -6        Arc,
    +5        Arc,
    +6        atomic::{AtomicU64, Ordering},
     7    },
     8};
     9
    diff --git a/pr/3367/docs/src/iroh/net_report/metrics.rs.html b/pr/3367/docs/src/iroh/net_report/metrics.rs.html
    index 01b06729ed..74d17ba8b5 100644
    --- a/pr/3367/docs/src/iroh/net_report/metrics.rs.html
    +++ b/pr/3367/docs/src/iroh/net_report/metrics.rs.html
    @@ -1,4 +1,4 @@
    -metrics.rs - source

    iroh/net_report/
    metrics.rs

    1use iroh_metrics::{Counter, MetricsGroup};
    +metrics.rs - source

    iroh/net_report/
    metrics.rs

    1use iroh_metrics::{Counter, MetricsGroup};
     2use serde::{Deserialize, Serialize};
     3
     4/// Enum of metrics for the module
    diff --git a/pr/3367/docs/src/iroh/net_report/options.rs.html b/pr/3367/docs/src/iroh/net_report/options.rs.html
    index 55fbb8e7f6..debb3a880d 100644
    --- a/pr/3367/docs/src/iroh/net_report/options.rs.html
    +++ b/pr/3367/docs/src/iroh/net_report/options.rs.html
    @@ -1,4 +1,4 @@
    -options.rs - source

    iroh/net_report/
    options.rs

    1//! Options for creating a report gen client.
    +options.rs - source

    iroh/net_report/
    options.rs

    1//! Options for creating a report gen client.
     2
     3pub use imp::Options;
     4
    @@ -6,7 +6,7 @@
     6mod imp {
     7    use std::collections::BTreeSet;
     8
    -9    use crate::net_report::{probes::Probe, QuicConfig};
    +9    use crate::net_report::{QuicConfig, probes::Probe};
     10
     11    /// Options for running probes
     12    ///
    diff --git a/pr/3367/docs/src/iroh/net_report/probes.rs.html b/pr/3367/docs/src/iroh/net_report/probes.rs.html
    index 415cb9f52f..3a4b9ad2fb 100644
    --- a/pr/3367/docs/src/iroh/net_report/probes.rs.html
    +++ b/pr/3367/docs/src/iroh/net_report/probes.rs.html
    @@ -1,4 +1,4 @@
    -probes.rs - source

    iroh/net_report/
    probes.rs

    1//! The relay probes.
    +probes.rs - source

    iroh/net_report/
    probes.rs

    1//! The relay probes.
     2//!
     3//! All the probes try and establish the latency to the relay servers.  Preferably the QAD
     4//! probes work and we also learn about our public IP addresses and ports.  But fallback
    diff --git a/pr/3367/docs/src/iroh/net_report/report.rs.html b/pr/3367/docs/src/iroh/net_report/report.rs.html
    index 7fd5c6e87a..e2ae1ebc1e 100644
    --- a/pr/3367/docs/src/iroh/net_report/report.rs.html
    +++ b/pr/3367/docs/src/iroh/net_report/report.rs.html
    @@ -1,4 +1,4 @@
    -report.rs - source

    iroh/net_report/
    report.rs

    1use std::{
    +report.rs - source

    iroh/net_report/
    report.rs

    1use std::{
     2    collections::BTreeMap,
     3    fmt,
     4    net::{SocketAddr, SocketAddrV4, SocketAddrV6},
    @@ -6,209 +6,210 @@
     6};
     7
     8use iroh_base::RelayUrl;
    -9use tracing::warn;
    -10
    -11use super::{probes::Probe, ProbeReport};
    -12
    -13/// A net_report report.
    -14#[derive(Default, Debug, PartialEq, Eq, Clone)]
    -15pub struct Report {
    -16    /// A QAD IPv4 round trip completed.
    -17    pub udp_v4: bool,
    -18    /// A QAD IPv6 round trip completed.
    -19    pub udp_v6: bool,
    -20    /// Whether the reported public address differs when probing different servers (on IPv4).
    -21    pub mapping_varies_by_dest_ipv4: Option<bool>,
    -22    /// Whether the reported public address differs when probing different servers (on IPv6).
    -23    pub mapping_varies_by_dest_ipv6: Option<bool>,
    -24    /// Probe indicating the presence of port mapping protocols on the LAN.
    -25    /// `None` for unknown
    -26    pub preferred_relay: Option<RelayUrl>,
    -27    /// keyed by relay Url
    -28    pub relay_latency: RelayLatencies,
    -29    /// ip:port of global IPv4
    -30    pub global_v4: Option<SocketAddrV4>,
    -31    /// `[ip]:port` of global IPv6
    -32    pub global_v6: Option<SocketAddrV6>,
    -33    /// CaptivePortal is set when we think there's a captive portal that is
    -34    /// intercepting HTTP traffic.
    -35    pub captive_portal: Option<bool>,
    -36}
    -37
    -38impl fmt::Display for Report {
    -39    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    -40        fmt::Debug::fmt(&self, f)
    -41    }
    -42}
    -43
    -44impl Report {
    -45    /// Do we have any indication that UDP is working?
    -46    pub fn has_udp(&self) -> bool {
    -47        self.udp_v4 || self.udp_v6
    -48    }
    -49
    -50    /// Whether the reported public address differs when probing different servers.
    -51    pub fn mapping_varies_by_dest(&self) -> Option<bool> {
    -52        match (
    -53            self.mapping_varies_by_dest_ipv4,
    -54            self.mapping_varies_by_dest_ipv6,
    -55        ) {
    -56            (Some(v4), Some(v6)) => Some(v4 || v6),
    -57            (None, Some(v6)) => Some(v6),
    -58            (Some(v4), None) => Some(v4),
    -59            (None, None) => None,
    -60        }
    -61    }
    -62
    -63    /// Updates a net_report [`Report`] with a new [`ProbeReport`].
    -64    pub(super) fn update(&mut self, report: &ProbeReport) {
    -65        match report {
    -66            ProbeReport::Https(report) => {
    -67                self.relay_latency
    -68                    .update_relay(report.node.clone(), report.latency, Probe::Https);
    -69            }
    -70            #[cfg(not(wasm_browser))]
    -71            ProbeReport::QadIpv4(report) => {
    -72                self.relay_latency.update_relay(
    -73                    report.node.clone(),
    -74                    report.latency,
    -75                    Probe::QadIpv4,
    -76                );
    -77                let SocketAddr::V4(ipp) = report.addr else {
    -78                    warn!("received IPv6 address from IPv4 QAD: {}", report.addr);
    -79                    return;
    -80                };
    -81
    -82                self.udp_v4 = true;
    -83
    -84                tracing::debug!(?self.global_v4, ?self.mapping_varies_by_dest_ipv4, %ipp,"got");
    -85                if let Some(global) = self.global_v4 {
    -86                    if global == ipp {
    -87                        if self.mapping_varies_by_dest_ipv4.is_none() {
    -88                            self.mapping_varies_by_dest_ipv4 = Some(false);
    -89                        }
    -90                    } else {
    -91                        self.mapping_varies_by_dest_ipv4 = Some(true);
    -92                        warn!("IPv4 address detected by QAD varies by destination");
    -93                    }
    -94                } else {
    -95                    self.global_v4 = Some(ipp);
    -96                }
    -97            }
    -98            #[cfg(not(wasm_browser))]
    -99            ProbeReport::QadIpv6(report) => {
    -100                self.relay_latency.update_relay(
    -101                    report.node.clone(),
    -102                    report.latency,
    -103                    Probe::QadIpv6,
    -104                );
    -105                let SocketAddr::V6(ipp) = report.addr else {
    -106                    warn!("received IPv4 address from IPv6 QAD: {}", report.addr);
    -107                    return;
    -108                };
    -109
    -110                self.udp_v6 = true;
    -111                tracing::debug!(?self.global_v6, ?self.mapping_varies_by_dest_ipv6, %ipp,"got");
    -112                if let Some(global) = self.global_v6 {
    -113                    if global == ipp {
    -114                        if self.mapping_varies_by_dest_ipv6.is_none() {
    -115                            self.mapping_varies_by_dest_ipv6 = Some(false);
    -116                        }
    -117                    } else {
    -118                        self.mapping_varies_by_dest_ipv6 = Some(true);
    -119                        warn!("IPv6 address detected by QAD varies by destination");
    -120                    }
    -121                } else {
    -122                    self.global_v6 = Some(ipp);
    -123                }
    -124            }
    -125        }
    -126    }
    -127}
    -128
    -129/// Latencies per relay node.
    -130#[derive(Debug, Default, PartialEq, Eq, Clone)]
    -131pub struct RelayLatencies {
    -132    #[cfg(not(wasm_browser))]
    -133    ipv4: BTreeMap<RelayUrl, Duration>,
    -134    #[cfg(not(wasm_browser))]
    -135    ipv6: BTreeMap<RelayUrl, Duration>,
    -136    https: BTreeMap<RelayUrl, Duration>,
    -137}
    -138
    -139impl RelayLatencies {
    -140    /// Updates a relay's latency, if it is faster than before.
    -141    pub(super) fn update_relay(&mut self, url: RelayUrl, latency: Duration, probe: Probe) {
    -142        let list = match probe {
    -143            Probe::Https => &mut self.https,
    -144            #[cfg(not(wasm_browser))]
    -145            Probe::QadIpv4 => &mut self.ipv4,
    -146            #[cfg(not(wasm_browser))]
    -147            Probe::QadIpv6 => &mut self.ipv6,
    -148        };
    -149        let old_latency = list.entry(url).or_insert(latency);
    -150        if latency < *old_latency {
    -151            *old_latency = latency;
    -152        }
    -153    }
    -154
    -155    /// Merges another [`RelayLatencies`] into this one.
    -156    ///
    -157    /// For each relay the latency is updated using [`RelayLatencies::update_relay`].
    -158    pub(super) fn merge(&mut self, other: &RelayLatencies) {
    -159        for (url, latency) in other.https.iter() {
    -160            self.update_relay(url.clone(), *latency, Probe::Https);
    -161        }
    -162        #[cfg(not(wasm_browser))]
    -163        for (url, latency) in other.ipv4.iter() {
    -164            self.update_relay(url.clone(), *latency, Probe::QadIpv4);
    -165        }
    -166        #[cfg(not(wasm_browser))]
    -167        for (url, latency) in other.ipv6.iter() {
    -168            self.update_relay(url.clone(), *latency, Probe::QadIpv6);
    -169        }
    -170    }
    -171
    -172    /// Returns an iterator over all the relays and their latencies.
    -173    #[cfg(not(wasm_browser))]
    -174    pub fn iter(&self) -> impl Iterator<Item = (&'_ RelayUrl, Duration)> + '_ {
    -175        self.https
    -176            .iter()
    -177            .chain(self.ipv4.iter())
    -178            .chain(self.ipv6.iter())
    -179            .map(|(k, v)| (k, *v))
    -180    }
    -181
    -182    /// Returns an iterator over all the relays and their latencies.
    -183    #[cfg(wasm_browser)]
    -184    pub fn iter(&self) -> impl Iterator<Item = (&'_ RelayUrl, Duration)> + '_ {
    -185        self.https.iter().map(|(k, v)| (k, *v))
    -186    }
    -187
    -188    #[cfg(not(wasm_browser))]
    -189    pub(super) fn is_empty(&self) -> bool {
    -190        self.https.is_empty() && self.ipv4.is_empty() && self.ipv6.is_empty()
    -191    }
    -192
    -193    #[cfg(wasm_browser)]
    -194    pub(super) fn is_empty(&self) -> bool {
    -195        self.https.is_empty()
    -196    }
    -197
    -198    /// Returns the lowest latency across records.
    -199    pub(super) fn get(&self, url: &RelayUrl) -> Option<Duration> {
    -200        let mut list = Vec::with_capacity(3);
    -201        if let Some(val) = self.https.get(url) {
    -202            list.push(*val);
    -203        }
    -204        #[cfg(not(wasm_browser))]
    -205        if let Some(val) = self.ipv4.get(url) {
    -206            list.push(*val);
    -207        }
    -208        #[cfg(not(wasm_browser))]
    -209        if let Some(val) = self.ipv6.get(url) {
    -210            list.push(*val);
    -211        }
    -212        list.into_iter().min()
    -213    }
    -214}
    \ No newline at end of file +9use serde::{Deserialize, Serialize}; +10use tracing::warn; +11 +12use super::{ProbeReport, probes::Probe}; +13 +14/// A net_report report. +15#[derive(Default, Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] +16pub struct Report { +17 /// A QAD IPv4 round trip completed. +18 pub udp_v4: bool, +19 /// A QAD IPv6 round trip completed. +20 pub udp_v6: bool, +21 /// Whether the reported public address differs when probing different servers (on IPv4). +22 pub mapping_varies_by_dest_ipv4: Option<bool>, +23 /// Whether the reported public address differs when probing different servers (on IPv6). +24 pub mapping_varies_by_dest_ipv6: Option<bool>, +25 /// Probe indicating the presence of port mapping protocols on the LAN. +26 /// `None` for unknown +27 pub preferred_relay: Option<RelayUrl>, +28 /// keyed by relay Url +29 pub relay_latency: RelayLatencies, +30 /// ip:port of global IPv4 +31 pub global_v4: Option<SocketAddrV4>, +32 /// `[ip]:port` of global IPv6 +33 pub global_v6: Option<SocketAddrV6>, +34 /// CaptivePortal is set when we think there's a captive portal that is +35 /// intercepting HTTP traffic. +36 pub captive_portal: Option<bool>, +37} +38 +39impl fmt::Display for Report { +40 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +41 fmt::Debug::fmt(&self, f) +42 } +43} +44 +45impl Report { +46 /// Do we have any indication that UDP is working? +47 pub fn has_udp(&self) -> bool { +48 self.udp_v4 || self.udp_v6 +49 } +50 +51 /// Whether the reported public address differs when probing different servers. +52 pub fn mapping_varies_by_dest(&self) -> Option<bool> { +53 match ( +54 self.mapping_varies_by_dest_ipv4, +55 self.mapping_varies_by_dest_ipv6, +56 ) { +57 (Some(v4), Some(v6)) => Some(v4 || v6), +58 (None, Some(v6)) => Some(v6), +59 (Some(v4), None) => Some(v4), +60 (None, None) => None, +61 } +62 } +63 +64 /// Updates a net_report [`Report`] with a new [`ProbeReport`]. +65 pub(super) fn update(&mut self, report: &ProbeReport) { +66 match report { +67 ProbeReport::Https(report) => { +68 self.relay_latency +69 .update_relay(report.node.clone(), report.latency, Probe::Https); +70 } +71 #[cfg(not(wasm_browser))] +72 ProbeReport::QadIpv4(report) => { +73 self.relay_latency.update_relay( +74 report.node.clone(), +75 report.latency, +76 Probe::QadIpv4, +77 ); +78 let SocketAddr::V4(ipp) = report.addr else { +79 warn!("received IPv6 address from IPv4 QAD: {}", report.addr); +80 return; +81 }; +82 +83 self.udp_v4 = true; +84 +85 tracing::debug!(?self.global_v4, ?self.mapping_varies_by_dest_ipv4, %ipp,"got"); +86 if let Some(global) = self.global_v4 { +87 if global == ipp { +88 if self.mapping_varies_by_dest_ipv4.is_none() { +89 self.mapping_varies_by_dest_ipv4 = Some(false); +90 } +91 } else { +92 self.mapping_varies_by_dest_ipv4 = Some(true); +93 warn!("IPv4 address detected by QAD varies by destination"); +94 } +95 } else { +96 self.global_v4 = Some(ipp); +97 } +98 } +99 #[cfg(not(wasm_browser))] +100 ProbeReport::QadIpv6(report) => { +101 self.relay_latency.update_relay( +102 report.node.clone(), +103 report.latency, +104 Probe::QadIpv6, +105 ); +106 let SocketAddr::V6(ipp) = report.addr else { +107 warn!("received IPv4 address from IPv6 QAD: {}", report.addr); +108 return; +109 }; +110 +111 self.udp_v6 = true; +112 tracing::debug!(?self.global_v6, ?self.mapping_varies_by_dest_ipv6, %ipp,"got"); +113 if let Some(global) = self.global_v6 { +114 if global == ipp { +115 if self.mapping_varies_by_dest_ipv6.is_none() { +116 self.mapping_varies_by_dest_ipv6 = Some(false); +117 } +118 } else { +119 self.mapping_varies_by_dest_ipv6 = Some(true); +120 warn!("IPv6 address detected by QAD varies by destination"); +121 } +122 } else { +123 self.global_v6 = Some(ipp); +124 } +125 } +126 } +127 } +128} +129 +130/// Latencies per relay node. +131#[derive(Debug, Default, PartialEq, Eq, Clone, Serialize, Deserialize)] +132pub struct RelayLatencies { +133 #[cfg(not(wasm_browser))] +134 ipv4: BTreeMap<RelayUrl, Duration>, +135 #[cfg(not(wasm_browser))] +136 ipv6: BTreeMap<RelayUrl, Duration>, +137 https: BTreeMap<RelayUrl, Duration>, +138} +139 +140impl RelayLatencies { +141 /// Updates a relay's latency, if it is faster than before. +142 pub(super) fn update_relay(&mut self, url: RelayUrl, latency: Duration, probe: Probe) { +143 let list = match probe { +144 Probe::Https => &mut self.https, +145 #[cfg(not(wasm_browser))] +146 Probe::QadIpv4 => &mut self.ipv4, +147 #[cfg(not(wasm_browser))] +148 Probe::QadIpv6 => &mut self.ipv6, +149 }; +150 let old_latency = list.entry(url).or_insert(latency); +151 if latency < *old_latency { +152 *old_latency = latency; +153 } +154 } +155 +156 /// Merges another [`RelayLatencies`] into this one. +157 /// +158 /// For each relay the latency is updated using [`RelayLatencies::update_relay`]. +159 pub(super) fn merge(&mut self, other: &RelayLatencies) { +160 for (url, latency) in other.https.iter() { +161 self.update_relay(url.clone(), *latency, Probe::Https); +162 } +163 #[cfg(not(wasm_browser))] +164 for (url, latency) in other.ipv4.iter() { +165 self.update_relay(url.clone(), *latency, Probe::QadIpv4); +166 } +167 #[cfg(not(wasm_browser))] +168 for (url, latency) in other.ipv6.iter() { +169 self.update_relay(url.clone(), *latency, Probe::QadIpv6); +170 } +171 } +172 +173 /// Returns an iterator over all the relays and their latencies. +174 #[cfg(not(wasm_browser))] +175 pub fn iter(&self) -> impl Iterator<Item = (&'_ RelayUrl, Duration)> + '_ { +176 self.https +177 .iter() +178 .chain(self.ipv4.iter()) +179 .chain(self.ipv6.iter()) +180 .map(|(k, v)| (k, *v)) +181 } +182 +183 /// Returns an iterator over all the relays and their latencies. +184 #[cfg(wasm_browser)] +185 pub fn iter(&self) -> impl Iterator<Item = (&'_ RelayUrl, Duration)> + '_ { +186 self.https.iter().map(|(k, v)| (k, *v)) +187 } +188 +189 #[cfg(not(wasm_browser))] +190 pub(super) fn is_empty(&self) -> bool { +191 self.https.is_empty() && self.ipv4.is_empty() && self.ipv6.is_empty() +192 } +193 +194 #[cfg(wasm_browser)] +195 pub(super) fn is_empty(&self) -> bool { +196 self.https.is_empty() +197 } +198 +199 /// Returns the lowest latency across records. +200 pub(super) fn get(&self, url: &RelayUrl) -> Option<Duration> { +201 let mut list = Vec::with_capacity(3); +202 if let Some(val) = self.https.get(url) { +203 list.push(*val); +204 } +205 #[cfg(not(wasm_browser))] +206 if let Some(val) = self.ipv4.get(url) { +207 list.push(*val); +208 } +209 #[cfg(not(wasm_browser))] +210 if let Some(val) = self.ipv6.get(url) { +211 list.push(*val); +212 } +213 list.into_iter().min() +214 } +215}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/net_report/reportgen.rs.html b/pr/3367/docs/src/iroh/net_report/reportgen.rs.html index 9857371b03..1260365b42 100644 --- a/pr/3367/docs/src/iroh/net_report/reportgen.rs.html +++ b/pr/3367/docs/src/iroh/net_report/reportgen.rs.html @@ -1,4 +1,4 @@ -reportgen.rs - source

    iroh/net_report/
    reportgen.rs

    1//! The reportgen actor is responsible for generating a single net_report report.
    +reportgen.rs - source

    iroh/net_report/
    reportgen.rs

    1//! The reportgen actor is responsible for generating a single net_report report.
     2//!
     3//! It is implemented as an actor with [`Client`] as handle.
     4//!
    @@ -25,7 +25,7 @@
     25
     26use http::StatusCode;
     27use iroh_base::RelayUrl;
    -28use iroh_relay::{defaults::DEFAULT_RELAY_QUIC_PORT, http::RELAY_PROBE_PATH, RelayMap, RelayNode};
    +28use iroh_relay::{RelayMap, RelayNode, defaults::DEFAULT_RELAY_QUIC_PORT, http::RELAY_PROBE_PATH};
     29#[cfg(not(wasm_browser))]
     30use iroh_relay::{
     31    dns::{DnsError, DnsResolver, StaggeredError},
    @@ -34,854 +34,857 @@
     34#[cfg(wasm_browser)]
     35use n0_future::future::Pending;
     36use n0_future::{
    -37    task::{self, AbortOnDropHandle, JoinSet},
    -38    time::{self, Duration, Instant},
    -39    StreamExt as _,
    +37    StreamExt as _,
    +38    task::{self, AbortOnDropHandle, JoinSet},
    +39    time::{self, Duration, Instant},
     40};
     41use rand::seq::IteratorRandom;
     42use snafu::{IntoError, OptionExt, ResultExt, Snafu};
     43use tokio::sync::mpsc;
     44use tokio_util::sync::CancellationToken;
    -45use tracing::{debug, debug_span, error, info_span, trace, warn, Instrument};
    +45use tracing::{Instrument, debug, error, trace, warn, warn_span};
     46use url::Host;
     47
     48#[cfg(wasm_browser)]
     49use super::portmapper; // We stub the library
    -50#[cfg(not(wasm_browser))]
    -51use super::{defaults::timeouts::DNS_TIMEOUT, ip_mapped_addrs::IpMappedAddresses};
    -52use super::{
    -53    probes::{Probe, ProbePlan},
    -54    Report,
    -55};
    +50use super::{
    +51    Report,
    +52    probes::{Probe, ProbePlan},
    +53};
    +54#[cfg(not(wasm_browser))]
    +55use super::{defaults::timeouts::DNS_TIMEOUT, ip_mapped_addrs::IpMappedAddresses};
     56#[cfg(not(wasm_browser))]
     57use crate::discovery::dns::DNS_STAGGERING_MS;
    -58use crate::net_report::defaults::timeouts::{
    -59    CAPTIVE_PORTAL_DELAY, CAPTIVE_PORTAL_TIMEOUT, OVERALL_REPORT_TIMEOUT, PROBES_TIMEOUT,
    -60};
    -61
    -62/// Holds the state for a single report generation.
    -63///
    -64/// Dropping this will cancel the actor and stop the report generation.
    -65#[derive(Debug)]
    -66pub(super) struct Client {
    -67    _drop_guard: AbortOnDropHandle<()>,
    -68}
    -69
    -70/// Some details required from the interface state of the device.
    -71#[derive(Debug, Clone, Default)]
    -72pub(crate) struct IfStateDetails {
    -73    /// Do we have IPv4 capbilities
    -74    pub have_v4: bool,
    -75    /// Do we have IPv6 capbilities
    -76    pub have_v6: bool,
    -77}
    -78
    -79impl IfStateDetails {
    -80    #[cfg(test)]
    -81    pub(super) fn fake() -> Self {
    -82        IfStateDetails {
    -83            have_v4: true,
    -84            have_v6: true,
    -85        }
    -86    }
    -87}
    -88
    -89impl From<netwatch::netmon::State> for IfStateDetails {
    -90    fn from(value: netwatch::netmon::State) -> Self {
    -91        IfStateDetails {
    -92            have_v4: value.have_v4,
    -93            have_v6: value.have_v6,
    -94        }
    -95    }
    -96}
    -97
    -98/// Any state that depends on sockets being available in the current environment.
    -99///
    -100/// Factored out so it can be disabled easily in browsers.
    -101#[cfg(not(wasm_browser))]
    -102#[derive(Debug, Clone)]
    -103pub(crate) struct SocketState {
    -104    /// QUIC client to do QUIC address Discovery
    -105    pub(crate) quic_client: Option<QuicClient>,
    -106    /// The DNS resolver to use for probes that need to resolve DNS records.
    -107    pub(crate) dns_resolver: DnsResolver,
    -108    /// Optional [`IpMappedAddresses`] used to enable QAD in iroh
    -109    pub(crate) ip_mapped_addrs: Option<IpMappedAddresses>,
    -110}
    -111
    -112impl Client {
    -113    /// Creates a new actor generating a single report.
    -114    ///
    -115    /// The actor starts running immediately and only generates a single report, after which
    -116    /// it shuts down.  Dropping this handle will abort the actor.
    -117    pub(super) fn new(
    -118        last_report: Option<Report>,
    -119        relay_map: RelayMap,
    -120        protocols: BTreeSet<Probe>,
    -121        if_state: IfStateDetails,
    -122        #[cfg(not(wasm_browser))] socket_state: SocketState,
    -123        #[cfg(any(test, feature = "test-utils"))] insecure_skip_relay_cert_verify: bool,
    -124    ) -> (Self, mpsc::Receiver<ProbeFinished>) {
    -125        let (msg_tx, msg_rx) = mpsc::channel(32);
    -126        let actor = Actor {
    -127            msg_tx,
    -128            last_report,
    -129            relay_map,
    -130            protocols,
    -131            #[cfg(not(wasm_browser))]
    -132            socket_state,
    -133            #[cfg(any(test, feature = "test-utils"))]
    -134            insecure_skip_relay_cert_verify,
    -135            if_state,
    -136        };
    -137        let task = task::spawn(actor.run().instrument(info_span!("reportgen.actor")));
    -138        (
    -139            Self {
    -140                _drop_guard: AbortOnDropHandle::new(task),
    -141            },
    -142            msg_rx,
    -143        )
    -144    }
    -145}
    -146
    -147/// The reportstate actor.
    -148///
    -149/// This actor starts, generates a single report and exits.
    -150#[derive(Debug)]
    -151struct Actor {
    -152    msg_tx: mpsc::Sender<ProbeFinished>,
    -153
    -154    // Provided state
    -155    /// The previous report, if it exists.
    -156    last_report: Option<Report>,
    -157    /// The relay configuration.
    -158    relay_map: RelayMap,
    -159
    -160    // Internal state.
    -161    /// Protocols we should attempt to create probes for, if we have the correct
    -162    /// configuration for that protocol.
    -163    protocols: BTreeSet<Probe>,
    -164
    -165    /// Any socket-related state that doesn't exist/work in browsers
    -166    #[cfg(not(wasm_browser))]
    -167    socket_state: SocketState,
    -168    #[cfg(any(test, feature = "test-utils"))]
    -169    insecure_skip_relay_cert_verify: bool,
    -170    if_state: IfStateDetails,
    -171}
    -172
    -173#[allow(missing_docs)]
    -174#[derive(Debug, Snafu)]
    -175#[non_exhaustive]
    -176#[snafu(module)]
    -177pub(super) enum ProbesError {
    -178    #[snafu(display("Probe failed"))]
    -179    ProbeFailure { source: ProbeError },
    -180    #[snafu(display("All probes failed"))]
    -181    AllProbesFailed,
    -182    #[snafu(display("Probe cancelled"))]
    -183    Cancelled,
    -184    #[snafu(display("Probe timed out"))]
    -185    Timeout,
    -186}
    -187
    -188#[derive(Debug)]
    -189pub(super) enum ProbeFinished {
    -190    Regular(Result<ProbeReport, ProbesError>),
    -191    #[cfg(not(wasm_browser))]
    -192    CaptivePortal(Option<bool>),
    -193}
    -194
    -195impl Actor {
    -196    async fn run(self) {
    -197        match time::timeout(OVERALL_REPORT_TIMEOUT, self.run_inner()).await {
    -198            Ok(()) => debug!("reportgen actor finished"),
    -199            Err(time::Elapsed { .. }) => {
    -200                warn!("reportgen timed out");
    -201            }
    -202        }
    -203    }
    -204
    -205    /// Runs the main reportgen actor logic.
    -206    ///
    -207    /// This actor runs by:
    -208    ///
    -209    /// - Creates a captive portal future.
    -210    /// - Creates ProbeSet futures in a group of futures.
    -211    /// - Runs a main loop:
    -212    ///   - Drives all the above futures.
    -213    ///   - Receives actor messages (sent by those futures).
    -214    ///   - Updates the report, cancels unneeded futures.
    -215    /// - Sends the report to the net_report actor.
    -216    async fn run_inner(self) {
    -217        debug!("reportstate actor starting");
    -218
    -219        let mut probes = JoinSet::default();
    -220
    -221        let _probes_token = self.spawn_probes_task(self.if_state.clone(), &mut probes);
    -222        let mut num_probes = probes.len();
    +58use crate::{
    +59    net_report::defaults::timeouts::{
    +60        CAPTIVE_PORTAL_DELAY, CAPTIVE_PORTAL_TIMEOUT, OVERALL_REPORT_TIMEOUT, PROBES_TIMEOUT,
    +61    },
    +62    util::reqwest_client_builder,
    +63};
    +64
    +65/// Holds the state for a single report generation.
    +66///
    +67/// Dropping this will cancel the actor and stop the report generation.
    +68#[derive(Debug)]
    +69pub(super) struct Client {
    +70    _drop_guard: AbortOnDropHandle<()>,
    +71}
    +72
    +73/// Some details required from the interface state of the device.
    +74#[derive(Debug, Clone, Default)]
    +75pub(crate) struct IfStateDetails {
    +76    /// Do we have IPv4 capbilities
    +77    pub have_v4: bool,
    +78    /// Do we have IPv6 capbilities
    +79    pub have_v6: bool,
    +80}
    +81
    +82impl IfStateDetails {
    +83    #[cfg(test)]
    +84    pub(super) fn fake() -> Self {
    +85        IfStateDetails {
    +86            have_v4: true,
    +87            have_v6: true,
    +88        }
    +89    }
    +90}
    +91
    +92impl From<netwatch::netmon::State> for IfStateDetails {
    +93    fn from(value: netwatch::netmon::State) -> Self {
    +94        IfStateDetails {
    +95            have_v4: value.have_v4,
    +96            have_v6: value.have_v6,
    +97        }
    +98    }
    +99}
    +100
    +101/// Any state that depends on sockets being available in the current environment.
    +102///
    +103/// Factored out so it can be disabled easily in browsers.
    +104#[cfg(not(wasm_browser))]
    +105#[derive(Debug, Clone)]
    +106pub(crate) struct SocketState {
    +107    /// QUIC client to do QUIC address Discovery
    +108    pub(crate) quic_client: Option<QuicClient>,
    +109    /// The DNS resolver to use for probes that need to resolve DNS records.
    +110    pub(crate) dns_resolver: DnsResolver,
    +111    /// Optional [`IpMappedAddresses`] used to enable QAD in iroh
    +112    pub(crate) ip_mapped_addrs: Option<IpMappedAddresses>,
    +113}
    +114
    +115impl Client {
    +116    /// Creates a new actor generating a single report.
    +117    ///
    +118    /// The actor starts running immediately and only generates a single report, after which
    +119    /// it shuts down.  Dropping this handle will abort the actor.
    +120    pub(super) fn new(
    +121        last_report: Option<Report>,
    +122        relay_map: RelayMap,
    +123        protocols: BTreeSet<Probe>,
    +124        if_state: IfStateDetails,
    +125        #[cfg(not(wasm_browser))] socket_state: SocketState,
    +126        #[cfg(any(test, feature = "test-utils"))] insecure_skip_relay_cert_verify: bool,
    +127    ) -> (Self, mpsc::Receiver<ProbeFinished>) {
    +128        let (msg_tx, msg_rx) = mpsc::channel(32);
    +129        let actor = Actor {
    +130            msg_tx,
    +131            last_report,
    +132            relay_map,
    +133            protocols,
    +134            #[cfg(not(wasm_browser))]
    +135            socket_state,
    +136            #[cfg(any(test, feature = "test-utils"))]
    +137            insecure_skip_relay_cert_verify,
    +138            if_state,
    +139        };
    +140        let task = task::spawn(actor.run().instrument(warn_span!("reportgen-actor")));
    +141        (
    +142            Self {
    +143                _drop_guard: AbortOnDropHandle::new(task),
    +144            },
    +145            msg_rx,
    +146        )
    +147    }
    +148}
    +149
    +150/// The reportstate actor.
    +151///
    +152/// This actor starts, generates a single report and exits.
    +153#[derive(Debug)]
    +154struct Actor {
    +155    msg_tx: mpsc::Sender<ProbeFinished>,
    +156
    +157    // Provided state
    +158    /// The previous report, if it exists.
    +159    last_report: Option<Report>,
    +160    /// The relay configuration.
    +161    relay_map: RelayMap,
    +162
    +163    // Internal state.
    +164    /// Protocols we should attempt to create probes for, if we have the correct
    +165    /// configuration for that protocol.
    +166    protocols: BTreeSet<Probe>,
    +167
    +168    /// Any socket-related state that doesn't exist/work in browsers
    +169    #[cfg(not(wasm_browser))]
    +170    socket_state: SocketState,
    +171    #[cfg(any(test, feature = "test-utils"))]
    +172    insecure_skip_relay_cert_verify: bool,
    +173    if_state: IfStateDetails,
    +174}
    +175
    +176#[allow(missing_docs)]
    +177#[derive(Debug, Snafu)]
    +178#[non_exhaustive]
    +179#[snafu(module)]
    +180pub(super) enum ProbesError {
    +181    #[snafu(display("Probe failed"))]
    +182    ProbeFailure { source: ProbeError },
    +183    #[snafu(display("All probes failed"))]
    +184    AllProbesFailed,
    +185    #[snafu(display("Probe cancelled"))]
    +186    Cancelled,
    +187    #[snafu(display("Probe timed out"))]
    +188    Timeout,
    +189}
    +190
    +191#[derive(Debug)]
    +192pub(super) enum ProbeFinished {
    +193    Regular(Result<ProbeReport, ProbesError>),
    +194    #[cfg(not(wasm_browser))]
    +195    CaptivePortal(Option<bool>),
    +196}
    +197
    +198impl Actor {
    +199    async fn run(self) {
    +200        match time::timeout(OVERALL_REPORT_TIMEOUT, self.run_inner()).await {
    +201            Ok(()) => debug!("reportgen actor finished"),
    +202            Err(time::Elapsed { .. }) => {
    +203                warn!("reportgen timed out");
    +204            }
    +205        }
    +206    }
    +207
    +208    /// Runs the main reportgen actor logic.
    +209    ///
    +210    /// This actor runs by:
    +211    ///
    +212    /// - Creates a captive portal future.
    +213    /// - Creates ProbeSet futures in a group of futures.
    +214    /// - Runs a main loop:
    +215    ///   - Drives all the above futures.
    +216    ///   - Receives actor messages (sent by those futures).
    +217    ///   - Updates the report, cancels unneeded futures.
    +218    /// - Sends the report to the net_report actor.
    +219    async fn run_inner(self) {
    +220        debug!("reportstate actor starting");
    +221
    +222        let mut probes = JoinSet::default();
     223
    -224        let captive_token = self.prepare_captive_portal_task(&mut probes);
    -225
    -226        // any reports of working UDP/QUIC?
    -227        let mut have_udp = false;
    +224        let _probes_token = self.spawn_probes_task(self.if_state.clone(), &mut probes);
    +225        let mut num_probes = probes.len();
    +226
    +227        let captive_token = self.prepare_captive_portal_task(&mut probes);
     228
    -229        // Check for probes finishing.
    -230        while let Some(probe_result) = probes.join_next().await {
    -231            trace!(?probe_result, num_probes, "processing finished probe");
    -232            match probe_result {
    -233                Ok(report) => {
    -234                    #[cfg_attr(wasm_browser, allow(irrefutable_let_patterns))]
    -235                    if let ProbeFinished::Regular(report) = &report {
    -236                        have_udp |= report.as_ref().map(|r| r.is_udp()).unwrap_or_default();
    -237                        num_probes -= 1;
    -238
    -239                        // If all probes are done & we have_udp cancel captive
    -240                        if num_probes == 0 {
    -241                            debug!("all regular probes done");
    -242                            debug_assert!(probes.len() <= 1, "{} probes", probes.len());
    -243
    -244                            if have_udp {
    -245                                captive_token.cancel();
    -246                            }
    -247                        }
    -248                    }
    -249                    self.msg_tx.send(report).await.ok();
    -250                }
    -251                Err(e) => {
    -252                    if e.is_panic() {
    -253                        error!("Task panicked {:?}", e);
    -254                        break;
    -255                    }
    -256                    warn!("probes task join error: {:?}", e);
    -257                }
    -258            }
    -259        }
    -260    }
    -261
    -262    /// Creates the future which will perform the captive portal check.
    -263    fn prepare_captive_portal_task(&self, tasks: &mut JoinSet<ProbeFinished>) -> CancellationToken {
    -264        let token = CancellationToken::new();
    -265
    -266        // If we're doing a full probe, also check for a captive portal. We
    -267        // delay by a bit to wait for UDP QAD to finish, to avoid the probe if
    -268        // it's unnecessary.
    -269        #[cfg(not(wasm_browser))]
    -270        if self.last_report.is_none() {
    -271            // Even if we're doing a non-incremental update, we may want to try our
    -272            // preferred relay for captive portal detection.
    -273            let preferred_relay = self
    -274                .last_report
    -275                .as_ref()
    -276                .and_then(|l| l.preferred_relay.clone());
    -277
    -278            let dns_resolver = self.socket_state.dns_resolver.clone();
    -279            let dm = self.relay_map.clone();
    -280            let token = token.clone();
    -281            tasks.spawn(
    -282                async move {
    -283                    let res = token
    -284                        .run_until_cancelled_owned(async move {
    -285                            time::sleep(CAPTIVE_PORTAL_DELAY).await;
    -286                            trace!("check started after {CAPTIVE_PORTAL_DELAY:?}");
    -287                            time::timeout(
    -288                                CAPTIVE_PORTAL_TIMEOUT,
    -289                                check_captive_portal(&dns_resolver, &dm, preferred_relay),
    -290                            )
    -291                            .await
    -292                        })
    -293                        .await;
    -294                    let res = match res {
    -295                        Some(Ok(Ok(found))) => Some(found),
    -296                        Some(Ok(Err(err))) => {
    -297                            match err {
    -298                                CaptivePortalError::CreateReqwestClient { source }
    -299                                | CaptivePortalError::HttpRequest { source }
    -300                                    if source.is_connect() =>
    -301                                {
    -302                                    debug!("check_captive_portal failed: {source:#}");
    -303                                }
    -304                                err => warn!("check_captive_portal error: {err:#}"),
    -305                            }
    -306                            None
    -307                        }
    -308                        Some(Err(time::Elapsed { .. })) => {
    -309                            warn!("probe timed out");
    -310                            None
    -311                        }
    -312                        None => {
    -313                            trace!("probe cancelled");
    -314                            None
    -315                        }
    -316                    };
    -317                    ProbeFinished::CaptivePortal(res)
    -318                }
    -319                .instrument(debug_span!("captive-portal")),
    -320            );
    -321        }
    -322        token
    -323    }
    -324
    -325    /// Prepares the future which will run all the probes as per generated ProbePlan.
    -326    ///
    -327    /// Probes operate like the following:
    -328    ///
    -329    /// - A future is created for each probe in all probe sets.
    -330    /// - All probes in a set are grouped in [`JoinSet`].
    -331    /// - All those probe sets are grouped in one overall [`JoinSet`].
    -332    ///   - This future is polled by the main actor loop to make progress.
    -333    /// - Once a probe future is polled:
    -334    ///   - Many probes start with a delay, they sleep during this time.
    -335    ///   - When a probe starts it first asks the reportgen [`Actor`] if it is still useful
    -336    ///     to run.  If not it aborts the entire probe set.
    -337    ///   - When a probe finishes, its [`ProbeReport`] is yielded to the reportgen actor.
    -338    /// - Probes get aborted in several ways:
    -339    ///   - A running it can fail and abort the entire probe set if it deems the
    -340    ///     failure permanent.  Probes in a probe set are essentially retries.
    -341    ///   - Once there are [`ProbeReport`]s from enough nodes, all remaining probes are
    -342    ///     aborted.  That is, the main actor loop stops polling them.
    -343    fn spawn_probes_task(
    -344        &self,
    -345        if_state: IfStateDetails,
    -346        probes: &mut JoinSet<ProbeFinished>,
    -347    ) -> CancellationToken {
    -348        debug!(?if_state, "local interface details");
    -349        let plan = match self.last_report {
    -350            Some(ref report) => {
    -351                ProbePlan::with_last_report(&self.relay_map, report, &self.protocols)
    -352            }
    -353            None => ProbePlan::initial(&self.relay_map, &self.protocols),
    -354        };
    -355        trace!(%plan, "probe plan");
    -356
    -357        let token = CancellationToken::new();
    -358
    -359        for probe_set in plan.iter() {
    -360            let set_token = token.child_token();
    -361            let proto = probe_set.proto();
    -362            for (delay, relay_node) in probe_set.params() {
    -363                let probe_token = set_token.child_token();
    -364
    -365                let fut = probe_token.run_until_cancelled_owned(time::timeout(
    -366                    PROBES_TIMEOUT,
    -367                    proto.run(
    -368                        *delay,
    -369                        relay_node.clone(),
    -370                        #[cfg(not(wasm_browser))]
    -371                        self.socket_state.clone(),
    -372                        #[cfg(any(test, feature = "test-utils"))]
    -373                        self.insecure_skip_relay_cert_verify,
    -374                    ),
    -375                ));
    -376                probes.spawn(
    -377                    async move {
    -378                        let res = fut.await;
    -379                        let res = match res {
    -380                            Some(Ok(Ok(report))) => Ok(report),
    -381                            Some(Ok(Err(err))) => {
    -382                                warn!("probe failed: {:#}", err);
    -383                                Err(probes_error::ProbeFailureSnafu {}.into_error(err))
    -384                            }
    -385                            Some(Err(time::Elapsed { .. })) => {
    -386                                Err(probes_error::TimeoutSnafu.build())
    +229        // any reports of working UDP/QUIC?
    +230        let mut have_udp = false;
    +231
    +232        // Check for probes finishing.
    +233        while let Some(probe_result) = probes.join_next().await {
    +234            trace!(?probe_result, num_probes, "processing finished probe");
    +235            match probe_result {
    +236                Ok(report) => {
    +237                    #[cfg_attr(wasm_browser, allow(irrefutable_let_patterns))]
    +238                    if let ProbeFinished::Regular(report) = &report {
    +239                        have_udp |= report.as_ref().map(|r| r.is_udp()).unwrap_or_default();
    +240                        num_probes -= 1;
    +241
    +242                        // If all probes are done & we have_udp cancel captive
    +243                        if num_probes == 0 {
    +244                            debug!("all regular probes done");
    +245                            debug_assert!(probes.len() <= 1, "{} probes", probes.len());
    +246
    +247                            if have_udp {
    +248                                captive_token.cancel();
    +249                            }
    +250                        }
    +251                    }
    +252                    self.msg_tx.send(report).await.ok();
    +253                }
    +254                Err(e) => {
    +255                    if e.is_panic() {
    +256                        error!("Task panicked {:?}", e);
    +257                        break;
    +258                    }
    +259                    warn!("probes task join error: {:?}", e);
    +260                }
    +261            }
    +262        }
    +263    }
    +264
    +265    /// Creates the future which will perform the captive portal check.
    +266    fn prepare_captive_portal_task(&self, tasks: &mut JoinSet<ProbeFinished>) -> CancellationToken {
    +267        let token = CancellationToken::new();
    +268
    +269        // If we're doing a full probe, also check for a captive portal. We
    +270        // delay by a bit to wait for UDP QAD to finish, to avoid the probe if
    +271        // it's unnecessary.
    +272        #[cfg(not(wasm_browser))]
    +273        if self.last_report.is_none() {
    +274            // Even if we're doing a non-incremental update, we may want to try our
    +275            // preferred relay for captive portal detection.
    +276            let preferred_relay = self
    +277                .last_report
    +278                .as_ref()
    +279                .and_then(|l| l.preferred_relay.clone());
    +280
    +281            let dns_resolver = self.socket_state.dns_resolver.clone();
    +282            let dm = self.relay_map.clone();
    +283            let token = token.clone();
    +284            tasks.spawn(
    +285                async move {
    +286                    let res = token
    +287                        .run_until_cancelled_owned(async move {
    +288                            time::sleep(CAPTIVE_PORTAL_DELAY).await;
    +289                            trace!("check started after {CAPTIVE_PORTAL_DELAY:?}");
    +290                            time::timeout(
    +291                                CAPTIVE_PORTAL_TIMEOUT,
    +292                                check_captive_portal(&dns_resolver, &dm, preferred_relay),
    +293                            )
    +294                            .await
    +295                        })
    +296                        .await;
    +297                    let res = match res {
    +298                        Some(Ok(Ok(found))) => Some(found),
    +299                        Some(Ok(Err(err))) => {
    +300                            match err {
    +301                                CaptivePortalError::CreateReqwestClient { source }
    +302                                | CaptivePortalError::HttpRequest { source }
    +303                                    if source.is_connect() =>
    +304                                {
    +305                                    debug!("check_captive_portal failed: {source:#}");
    +306                                }
    +307                                err => warn!("check_captive_portal error: {err:#}"),
    +308                            }
    +309                            None
    +310                        }
    +311                        Some(Err(time::Elapsed { .. })) => {
    +312                            warn!("probe timed out");
    +313                            None
    +314                        }
    +315                        None => {
    +316                            trace!("probe cancelled");
    +317                            None
    +318                        }
    +319                    };
    +320                    ProbeFinished::CaptivePortal(res)
    +321                }
    +322                .instrument(warn_span!("captive-portal")),
    +323            );
    +324        }
    +325        token
    +326    }
    +327
    +328    /// Prepares the future which will run all the probes as per generated ProbePlan.
    +329    ///
    +330    /// Probes operate like the following:
    +331    ///
    +332    /// - A future is created for each probe in all probe sets.
    +333    /// - All probes in a set are grouped in [`JoinSet`].
    +334    /// - All those probe sets are grouped in one overall [`JoinSet`].
    +335    ///   - This future is polled by the main actor loop to make progress.
    +336    /// - Once a probe future is polled:
    +337    ///   - Many probes start with a delay, they sleep during this time.
    +338    ///   - When a probe starts it first asks the reportgen [`Actor`] if it is still useful
    +339    ///     to run.  If not it aborts the entire probe set.
    +340    ///   - When a probe finishes, its [`ProbeReport`] is yielded to the reportgen actor.
    +341    /// - Probes get aborted in several ways:
    +342    ///   - A running it can fail and abort the entire probe set if it deems the
    +343    ///     failure permanent.  Probes in a probe set are essentially retries.
    +344    ///   - Once there are [`ProbeReport`]s from enough nodes, all remaining probes are
    +345    ///     aborted.  That is, the main actor loop stops polling them.
    +346    fn spawn_probes_task(
    +347        &self,
    +348        if_state: IfStateDetails,
    +349        probes: &mut JoinSet<ProbeFinished>,
    +350    ) -> CancellationToken {
    +351        debug!(?if_state, "local interface details");
    +352        let plan = match self.last_report {
    +353            Some(ref report) => {
    +354                ProbePlan::with_last_report(&self.relay_map, report, &self.protocols)
    +355            }
    +356            None => ProbePlan::initial(&self.relay_map, &self.protocols),
    +357        };
    +358        trace!(%plan, "probe plan");
    +359
    +360        let token = CancellationToken::new();
    +361
    +362        for probe_set in plan.iter() {
    +363            let set_token = token.child_token();
    +364            let proto = probe_set.proto();
    +365            for (delay, relay_node) in probe_set.params() {
    +366                let probe_token = set_token.child_token();
    +367
    +368                let fut = probe_token.run_until_cancelled_owned(time::timeout(
    +369                    PROBES_TIMEOUT,
    +370                    proto.run(
    +371                        *delay,
    +372                        relay_node.clone(),
    +373                        #[cfg(not(wasm_browser))]
    +374                        self.socket_state.clone(),
    +375                        #[cfg(any(test, feature = "test-utils"))]
    +376                        self.insecure_skip_relay_cert_verify,
    +377                    ),
    +378                ));
    +379                probes.spawn(
    +380                    async move {
    +381                        let res = fut.await;
    +382                        let res = match res {
    +383                            Some(Ok(Ok(report))) => Ok(report),
    +384                            Some(Ok(Err(err))) => {
    +385                                warn!("probe failed: {:#}", err);
    +386                                Err(probes_error::ProbeFailureSnafu {}.into_error(err))
     387                            }
    -388                            None => Err(probes_error::CancelledSnafu.build()),
    -389                        };
    -390                        ProbeFinished::Regular(res)
    -391                    }
    -392                    .instrument(debug_span!(
    -393                        "run-probe",
    -394                        ?proto,
    -395                        ?delay,
    -396                        ?relay_node
    -397                    )),
    -398                );
    -399            }
    -400        }
    -401
    -402        token
    -403    }
    -404}
    -405
    -406/// The result of running a probe.
    -407#[derive(Debug, Clone)]
    -408pub(super) enum ProbeReport {
    -409    #[cfg(not(wasm_browser))]
    -410    QadIpv4(QadProbeReport),
    -411    #[cfg(not(wasm_browser))]
    -412    QadIpv6(QadProbeReport),
    -413    Https(HttpsProbeReport),
    -414}
    -415
    -416impl ProbeReport {
    -417    #[cfg(not(wasm_browser))]
    -418    pub(super) fn is_udp(&self) -> bool {
    -419        matches!(self, Self::QadIpv4(_) | Self::QadIpv6(_))
    -420    }
    -421
    -422    #[cfg(wasm_browser)]
    -423    pub(super) fn is_udp(&self) -> bool {
    -424        false
    -425    }
    -426}
    -427
    -428#[cfg(not(wasm_browser))]
    -429#[derive(Debug, Clone, PartialEq, Eq)]
    -430pub(super) struct QadProbeReport {
    -431    /// The relay node that was probed
    -432    pub(super) node: RelayUrl,
    -433    /// The latency to the relay node.
    -434    pub(super) latency: Duration,
    -435    /// The discovered public address.
    -436    pub(super) addr: SocketAddr,
    -437}
    -438
    -439#[derive(Debug, Clone)]
    -440pub(super) struct HttpsProbeReport {
    -441    /// The relay node that was probed
    -442    pub(super) node: RelayUrl,
    -443    /// The latency to the relay node.
    -444    pub(super) latency: Duration,
    -445}
    -446
    -447#[allow(missing_docs)]
    -448#[derive(Debug, Snafu)]
    -449#[snafu(module)]
    -450#[non_exhaustive]
    -451pub(super) enum ProbeError {
    -452    #[snafu(display("Client is gone"))]
    -453    ClientGone,
    -454    #[snafu(display("Probe is no longer useful"))]
    -455    NotUseful,
    -456    #[snafu(display("Failed to run HTTPS probe"))]
    -457    Https { source: MeasureHttpsLatencyError },
    -458}
    -459
    -460#[allow(missing_docs)]
    -461#[derive(Debug, Snafu)]
    -462#[snafu(module)]
    -463#[non_exhaustive]
    -464pub(super) enum QuicError {
    -465    #[snafu(display("No QUIC endpoint available"))]
    -466    NoEndpoint,
    -467    #[snafu(display("URL must have 'host' to use QUIC address discovery probes"))]
    -468    InvalidUrl,
    -469}
    -470
    -471/// Pieces needed to do QUIC address discovery.
    -472#[derive(derive_more::Debug, Clone)]
    -473pub struct QuicConfig {
    -474    /// A QUIC Endpoint
    -475    #[debug("quinn::Endpoint")]
    -476    pub ep: quinn::Endpoint,
    -477    /// A client config.
    -478    pub client_config: rustls::ClientConfig,
    -479    /// Enable ipv4 QUIC address discovery probes
    -480    pub ipv4: bool,
    -481    /// Enable ipv6 QUIC address discovery probes
    -482    pub ipv6: bool,
    -483}
    -484
    -485impl Probe {
    -486    /// Executes this particular [`Probe`], including using a delayed start if needed.
    -487    async fn run(
    -488        self,
    -489        delay: Duration,
    -490        relay_node: Arc<RelayNode>,
    -491        #[cfg(not(wasm_browser))] socket_state: SocketState,
    -492        #[cfg(any(test, feature = "test-utils"))] insecure_skip_relay_cert_verify: bool,
    -493    ) -> Result<ProbeReport, ProbeError> {
    -494        if !delay.is_zero() {
    -495            trace!("delaying probe");
    -496            time::sleep(delay).await;
    -497        }
    -498        debug!("starting probe");
    -499
    -500        match self {
    -501            Probe::Https => {
    -502                match run_https_probe(
    -503                    #[cfg(not(wasm_browser))]
    -504                    &socket_state.dns_resolver,
    -505                    relay_node.url.clone(),
    -506                    #[cfg(any(test, feature = "test-utils"))]
    -507                    insecure_skip_relay_cert_verify,
    -508                )
    -509                .await
    -510                {
    -511                    Ok(report) => Ok(ProbeReport::Https(report)),
    -512                    Err(err) => Err(probe_error::HttpsSnafu.into_error(err)),
    -513                }
    -514            }
    -515            #[cfg(not(wasm_browser))]
    -516            Probe::QadIpv4 | Probe::QadIpv6 => unreachable!("must not be used"),
    -517        }
    -518    }
    -519}
    -520
    -521#[cfg(not(wasm_browser))]
    -522pub(super) fn maybe_to_mapped_addr(
    -523    ip_mapped_addrs: Option<&IpMappedAddresses>,
    -524    addr: SocketAddr,
    -525) -> SocketAddr {
    -526    if let Some(ip_mapped_addrs) = ip_mapped_addrs {
    -527        return ip_mapped_addrs.get_or_register(addr).private_socket_addr();
    -528    }
    -529    addr
    -530}
    -531
    -532#[cfg(not(wasm_browser))]
    -533#[derive(Debug, Snafu)]
    -534#[snafu(module)]
    -535#[non_exhaustive]
    -536enum CaptivePortalError {
    -537    #[snafu(transparent)]
    -538    DnsLookup { source: StaggeredError<DnsError> },
    -539    #[snafu(display("Creating HTTP client failed"))]
    -540    CreateReqwestClient { source: reqwest::Error },
    -541    #[snafu(display("HTTP request failed"))]
    -542    HttpRequest { source: reqwest::Error },
    -543}
    -544
    -545/// Reports whether or not we think the system is behind a
    -546/// captive portal, detected by making a request to a URL that we know should
    -547/// return a "204 No Content" response and checking if that's what we get.
    -548///
    -549/// The boolean return is whether we think we have a captive portal.
    -550#[cfg(not(wasm_browser))]
    -551async fn check_captive_portal(
    -552    dns_resolver: &DnsResolver,
    -553    dm: &RelayMap,
    -554    preferred_relay: Option<RelayUrl>,
    -555) -> Result<bool, CaptivePortalError> {
    -556    // If we have a preferred relay node and we can use it for non-QAD requests, try that;
    -557    // otherwise, pick a random one suitable for non-STUN requests.
    -558
    -559    let preferred_relay = preferred_relay.and_then(|url| dm.get_node(&url).map(|_| url));
    -560
    -561    let url = match preferred_relay {
    -562        Some(url) => url,
    -563        None => {
    -564            let urls: Vec<_> = dm.nodes().map(|n| n.url.clone()).collect();
    -565            if urls.is_empty() {
    -566                debug!("No suitable relay node for captive portal check");
    -567                return Ok(false);
    -568            }
    -569
    -570            let i = (0..urls.len())
    -571                .choose(&mut rand::thread_rng())
    -572                .unwrap_or_default();
    -573            urls[i].clone()
    -574        }
    -575    };
    -576
    -577    let mut builder = reqwest::ClientBuilder::new().redirect(reqwest::redirect::Policy::none());
    -578
    -579    if let Some(Host::Domain(domain)) = url.host() {
    -580        // Use our own resolver rather than getaddrinfo
    -581        //
    -582        // Be careful, a non-zero port will override the port in the URI.
    -583        //
    -584        // Ideally we would try to resolve **both** IPv4 and IPv6 rather than purely race
    -585        // them.  But our resolver doesn't support that yet.
    -586        let addrs: Vec<_> = dns_resolver
    -587            .lookup_ipv4_ipv6_staggered(domain, DNS_TIMEOUT, DNS_STAGGERING_MS)
    -588            .await?
    -589            .map(|ipaddr| SocketAddr::new(ipaddr, 0))
    -590            .collect();
    -591        builder = builder.resolve_to_addrs(domain, &addrs);
    -592    }
    -593    let client = builder
    -594        .build()
    -595        .context(captive_portal_error::CreateReqwestClientSnafu)?;
    -596
    -597    // Note: the set of valid characters in a challenge and the total
    -598    // length is limited; see is_challenge_char in bin/iroh-relay for more
    -599    // details.
    -600
    -601    let host_name = url.host_str().unwrap_or_default();
    -602    let challenge = format!("ts_{}", host_name);
    -603    let portal_url = format!("http://{}/generate_204", host_name);
    -604    let res = client
    -605        .request(reqwest::Method::GET, portal_url)
    -606        .header("X-Tailscale-Challenge", &challenge)
    -607        .send()
    -608        .await
    -609        .context(captive_portal_error::HttpRequestSnafu)?;
    -610
    -611    let expected_response = format!("response {challenge}");
    -612    let is_valid_response = res
    -613        .headers()
    -614        .get("X-Tailscale-Response")
    -615        .map(|s| s.to_str().unwrap_or_default())
    -616        == Some(&expected_response);
    -617
    -618    debug!(
    -619        "check_captive_portal url={} status_code={} valid_response={}",
    -620        res.url(),
    -621        res.status(),
    -622        is_valid_response,
    -623    );
    -624    let has_captive = res.status() != 204 || !is_valid_response;
    -625
    -626    Ok(has_captive)
    -627}
    +388                            Some(Err(time::Elapsed { .. })) => {
    +389                                Err(probes_error::TimeoutSnafu.build())
    +390                            }
    +391                            None => Err(probes_error::CancelledSnafu.build()),
    +392                        };
    +393                        ProbeFinished::Regular(res)
    +394                    }
    +395                    .instrument(warn_span!(
    +396                        "run-probe",
    +397                        ?proto,
    +398                        ?delay,
    +399                        ?relay_node,
    +400                    )),
    +401                );
    +402            }
    +403        }
    +404
    +405        token
    +406    }
    +407}
    +408
    +409/// The result of running a probe.
    +410#[derive(Debug, Clone)]
    +411pub(super) enum ProbeReport {
    +412    #[cfg(not(wasm_browser))]
    +413    QadIpv4(QadProbeReport),
    +414    #[cfg(not(wasm_browser))]
    +415    QadIpv6(QadProbeReport),
    +416    Https(HttpsProbeReport),
    +417}
    +418
    +419impl ProbeReport {
    +420    #[cfg(not(wasm_browser))]
    +421    pub(super) fn is_udp(&self) -> bool {
    +422        matches!(self, Self::QadIpv4(_) | Self::QadIpv6(_))
    +423    }
    +424
    +425    #[cfg(wasm_browser)]
    +426    pub(super) fn is_udp(&self) -> bool {
    +427        false
    +428    }
    +429}
    +430
    +431#[cfg(not(wasm_browser))]
    +432#[derive(Debug, Clone, PartialEq, Eq)]
    +433pub(super) struct QadProbeReport {
    +434    /// The relay node that was probed
    +435    pub(super) node: RelayUrl,
    +436    /// The latency to the relay node.
    +437    pub(super) latency: Duration,
    +438    /// The discovered public address.
    +439    pub(super) addr: SocketAddr,
    +440}
    +441
    +442#[derive(Debug, Clone)]
    +443pub(super) struct HttpsProbeReport {
    +444    /// The relay node that was probed
    +445    pub(super) node: RelayUrl,
    +446    /// The latency to the relay node.
    +447    pub(super) latency: Duration,
    +448}
    +449
    +450#[allow(missing_docs)]
    +451#[derive(Debug, Snafu)]
    +452#[snafu(module)]
    +453#[non_exhaustive]
    +454pub(super) enum ProbeError {
    +455    #[snafu(display("Client is gone"))]
    +456    ClientGone,
    +457    #[snafu(display("Probe is no longer useful"))]
    +458    NotUseful,
    +459    #[snafu(display("Failed to run HTTPS probe"))]
    +460    Https { source: MeasureHttpsLatencyError },
    +461}
    +462
    +463#[allow(missing_docs)]
    +464#[derive(Debug, Snafu)]
    +465#[snafu(module)]
    +466#[non_exhaustive]
    +467pub(super) enum QuicError {
    +468    #[snafu(display("No QUIC endpoint available"))]
    +469    NoEndpoint,
    +470    #[snafu(display("URL must have 'host' to use QUIC address discovery probes"))]
    +471    InvalidUrl,
    +472}
    +473
    +474/// Pieces needed to do QUIC address discovery.
    +475#[derive(derive_more::Debug, Clone)]
    +476pub struct QuicConfig {
    +477    /// A QUIC Endpoint
    +478    #[debug("quinn::Endpoint")]
    +479    pub ep: quinn::Endpoint,
    +480    /// A client config.
    +481    pub client_config: rustls::ClientConfig,
    +482    /// Enable ipv4 QUIC address discovery probes
    +483    pub ipv4: bool,
    +484    /// Enable ipv6 QUIC address discovery probes
    +485    pub ipv6: bool,
    +486}
    +487
    +488impl Probe {
    +489    /// Executes this particular [`Probe`], including using a delayed start if needed.
    +490    async fn run(
    +491        self,
    +492        delay: Duration,
    +493        relay_node: Arc<RelayNode>,
    +494        #[cfg(not(wasm_browser))] socket_state: SocketState,
    +495        #[cfg(any(test, feature = "test-utils"))] insecure_skip_relay_cert_verify: bool,
    +496    ) -> Result<ProbeReport, ProbeError> {
    +497        if !delay.is_zero() {
    +498            trace!("delaying probe");
    +499            time::sleep(delay).await;
    +500        }
    +501        debug!("starting probe");
    +502
    +503        match self {
    +504            Probe::Https => {
    +505                match run_https_probe(
    +506                    #[cfg(not(wasm_browser))]
    +507                    &socket_state.dns_resolver,
    +508                    relay_node.url.clone(),
    +509                    #[cfg(any(test, feature = "test-utils"))]
    +510                    insecure_skip_relay_cert_verify,
    +511                )
    +512                .await
    +513                {
    +514                    Ok(report) => Ok(ProbeReport::Https(report)),
    +515                    Err(err) => Err(probe_error::HttpsSnafu.into_error(err)),
    +516                }
    +517            }
    +518            #[cfg(not(wasm_browser))]
    +519            Probe::QadIpv4 | Probe::QadIpv6 => unreachable!("must not be used"),
    +520        }
    +521    }
    +522}
    +523
    +524#[cfg(not(wasm_browser))]
    +525pub(super) fn maybe_to_mapped_addr(
    +526    ip_mapped_addrs: Option<&IpMappedAddresses>,
    +527    addr: SocketAddr,
    +528) -> SocketAddr {
    +529    if let Some(ip_mapped_addrs) = ip_mapped_addrs {
    +530        return ip_mapped_addrs.get_or_register(addr).private_socket_addr();
    +531    }
    +532    addr
    +533}
    +534
    +535#[cfg(not(wasm_browser))]
    +536#[derive(Debug, Snafu)]
    +537#[snafu(module)]
    +538#[non_exhaustive]
    +539enum CaptivePortalError {
    +540    #[snafu(transparent)]
    +541    DnsLookup { source: StaggeredError<DnsError> },
    +542    #[snafu(display("Creating HTTP client failed"))]
    +543    CreateReqwestClient { source: reqwest::Error },
    +544    #[snafu(display("HTTP request failed"))]
    +545    HttpRequest { source: reqwest::Error },
    +546}
    +547
    +548/// Reports whether or not we think the system is behind a
    +549/// captive portal, detected by making a request to a URL that we know should
    +550/// return a "204 No Content" response and checking if that's what we get.
    +551///
    +552/// The boolean return is whether we think we have a captive portal.
    +553#[cfg(not(wasm_browser))]
    +554async fn check_captive_portal(
    +555    dns_resolver: &DnsResolver,
    +556    dm: &RelayMap,
    +557    preferred_relay: Option<RelayUrl>,
    +558) -> Result<bool, CaptivePortalError> {
    +559    // If we have a preferred relay node and we can use it for non-QAD requests, try that;
    +560    // otherwise, pick a random one suitable for non-STUN requests.
    +561
    +562    use crate::util::reqwest_client_builder;
    +563
    +564    let preferred_relay = preferred_relay.and_then(|url| dm.get_node(&url).map(|_| url));
    +565
    +566    let url = match preferred_relay {
    +567        Some(url) => url,
    +568        None => {
    +569            let urls: Vec<_> = dm.nodes().map(|n| n.url.clone()).collect();
    +570            if urls.is_empty() {
    +571                debug!("No suitable relay node for captive portal check");
    +572                return Ok(false);
    +573            }
    +574
    +575            let i = (0..urls.len()).choose(&mut rand::rng()).unwrap_or_default();
    +576            urls[i].clone()
    +577        }
    +578    };
    +579
    +580    let mut builder = reqwest_client_builder().redirect(reqwest::redirect::Policy::none());
    +581
    +582    if let Some(Host::Domain(domain)) = url.host() {
    +583        // Use our own resolver rather than getaddrinfo
    +584        //
    +585        // Be careful, a non-zero port will override the port in the URI.
    +586        //
    +587        // Ideally we would try to resolve **both** IPv4 and IPv6 rather than purely race
    +588        // them.  But our resolver doesn't support that yet.
    +589        let addrs: Vec<_> = dns_resolver
    +590            .lookup_ipv4_ipv6_staggered(domain, DNS_TIMEOUT, DNS_STAGGERING_MS)
    +591            .await?
    +592            .map(|ipaddr| SocketAddr::new(ipaddr, 0))
    +593            .collect();
    +594        builder = builder.resolve_to_addrs(domain, &addrs);
    +595    }
    +596    let client = builder
    +597        .build()
    +598        .context(captive_portal_error::CreateReqwestClientSnafu)?;
    +599
    +600    // Note: the set of valid characters in a challenge and the total
    +601    // length is limited; see is_challenge_char in bin/iroh-relay for more
    +602    // details.
    +603
    +604    let host_name = url.host_str().unwrap_or_default();
    +605    let challenge = format!("ts_{host_name}");
    +606    let portal_url = format!("http://{host_name}/generate_204");
    +607    let res = client
    +608        .request(reqwest::Method::GET, portal_url)
    +609        .header("X-Iroh-Challenge", &challenge)
    +610        .send()
    +611        .await
    +612        .context(captive_portal_error::HttpRequestSnafu)?;
    +613
    +614    let expected_response = format!("response {challenge}");
    +615    let is_valid_response = res
    +616        .headers()
    +617        .get("X-Iroh-Response")
    +618        .map(|s| s.to_str().unwrap_or_default())
    +619        == Some(&expected_response);
    +620
    +621    debug!(
    +622        "check_captive_portal url={} status_code={} valid_response={}",
    +623        res.url(),
    +624        res.status(),
    +625        is_valid_response,
    +626    );
    +627    let has_captive = res.status() != 204 || !is_valid_response;
     628
    -629/// Returns the proper port based on the protocol of the probe.
    -630#[cfg(not(wasm_browser))]
    -631fn get_quic_port(relay_node: &RelayNode) -> Option<u16> {
    -632    if let Some(ref quic) = relay_node.quic {
    -633        if quic.port == 0 {
    -634            Some(DEFAULT_RELAY_QUIC_PORT)
    -635        } else {
    -636            Some(quic.port)
    -637        }
    -638    } else {
    -639        None
    -640    }
    -641}
    -642
    -643#[cfg(not(wasm_browser))]
    -644#[derive(Debug, Snafu)]
    -645#[snafu(module)]
    -646#[non_exhaustive]
    -647pub enum GetRelayAddrError {
    -648    #[snafu(display("No valid hostname in the relay URL"))]
    -649    InvalidHostname,
    -650    #[snafu(display("No suitable relay address found"))]
    -651    NoAddrFound,
    -652    #[snafu(display("DNS lookup failed"))]
    -653    DnsLookup { source: StaggeredError<DnsError> },
    -654    #[snafu(display("Relay node is not suitable for non-STUN probes"))]
    -655    UnsupportedRelayNode,
    -656    #[snafu(display("HTTPS probes are not implemented"))]
    -657    UnsupportedHttps,
    -658    #[snafu(display("No port available for this protocol"))]
    -659    MissingPort,
    -660}
    -661
    -662/// Returns the IP address to use to communicate to this relay node for quic.
    -663#[cfg(not(wasm_browser))]
    -664pub(super) async fn get_relay_addr_ipv4(
    -665    dns_resolver: &DnsResolver,
    -666    relay_node: &RelayNode,
    -667) -> Result<SocketAddrV4, GetRelayAddrError> {
    -668    let port = get_quic_port(relay_node).context(get_relay_addr_error::MissingPortSnafu)?;
    -669    relay_lookup_ipv4_staggered(dns_resolver, relay_node, port).await
    -670}
    -671
    -672#[cfg(not(wasm_browser))]
    -673pub(super) async fn get_relay_addr_ipv6(
    -674    dns_resolver: &DnsResolver,
    -675    relay_node: &RelayNode,
    -676) -> Result<SocketAddrV6, GetRelayAddrError> {
    -677    let port = get_quic_port(relay_node).context(get_relay_addr_error::MissingPortSnafu)?;
    -678    relay_lookup_ipv6_staggered(dns_resolver, relay_node, port).await
    -679}
    -680
    -681/// Do a staggared ipv4 DNS lookup based on [`RelayNode`]
    -682///
    -683/// `port` is combined with the resolved [`std::net::Ipv4Addr`] to return a [`SocketAddr`]
    -684#[cfg(not(wasm_browser))]
    -685async fn relay_lookup_ipv4_staggered(
    -686    dns_resolver: &DnsResolver,
    -687    relay: &RelayNode,
    -688    port: u16,
    -689) -> Result<SocketAddrV4, GetRelayAddrError> {
    -690    match relay.url.host() {
    -691        Some(url::Host::Domain(hostname)) => {
    -692            trace!(%hostname, "Performing DNS A lookup for relay addr");
    -693            match dns_resolver
    -694                .lookup_ipv4_staggered(hostname, DNS_TIMEOUT, DNS_STAGGERING_MS)
    -695                .await
    -696            {
    -697                Ok(mut addrs) => addrs
    -698                    .next()
    -699                    .map(|ip| ip.to_canonical())
    -700                    .map(|addr| match addr {
    -701                        IpAddr::V4(ip) => SocketAddrV4::new(ip, port),
    -702                        IpAddr::V6(_) => unreachable!("bad DNS lookup: {:?}", addr),
    -703                    })
    -704                    .ok_or(get_relay_addr_error::NoAddrFoundSnafu.build()),
    -705                Err(err) => Err(get_relay_addr_error::DnsLookupSnafu.into_error(err)),
    -706            }
    -707        }
    -708        Some(url::Host::Ipv4(addr)) => Ok(SocketAddrV4::new(addr, port)),
    -709        Some(url::Host::Ipv6(_addr)) => Err(get_relay_addr_error::NoAddrFoundSnafu.build()),
    -710        None => Err(get_relay_addr_error::InvalidHostnameSnafu.build()),
    -711    }
    -712}
    -713
    -714/// Do a staggared ipv6 DNS lookup based on [`RelayNode`]
    -715///
    -716/// `port` is combined with the resolved [`std::net::Ipv6Addr`] to return a [`SocketAddr`]
    -717#[cfg(not(wasm_browser))]
    -718async fn relay_lookup_ipv6_staggered(
    -719    dns_resolver: &DnsResolver,
    -720    relay: &RelayNode,
    -721    port: u16,
    -722) -> Result<SocketAddrV6, GetRelayAddrError> {
    -723    match relay.url.host() {
    -724        Some(url::Host::Domain(hostname)) => {
    -725            trace!(%hostname, "Performing DNS AAAA lookup for relay addr");
    -726            match dns_resolver
    -727                .lookup_ipv6_staggered(hostname, DNS_TIMEOUT, DNS_STAGGERING_MS)
    -728                .await
    -729            {
    -730                Ok(mut addrs) => addrs
    -731                    .next()
    -732                    .map(|addr| match addr {
    -733                        IpAddr::V4(_) => unreachable!("bad DNS lookup: {:?}", addr),
    -734                        IpAddr::V6(ip) => SocketAddrV6::new(ip, port, 0, 0),
    -735                    })
    -736                    .ok_or(get_relay_addr_error::NoAddrFoundSnafu.build()),
    -737                Err(err) => Err(get_relay_addr_error::DnsLookupSnafu.into_error(err)),
    -738            }
    -739        }
    -740        Some(url::Host::Ipv4(_addr)) => Err(get_relay_addr_error::NoAddrFoundSnafu.build()),
    -741        Some(url::Host::Ipv6(addr)) => Ok(SocketAddrV6::new(addr, port, 0, 0)),
    -742        None => Err(get_relay_addr_error::InvalidHostnameSnafu.build()),
    -743    }
    -744}
    -745
    -746#[derive(Debug, Snafu)]
    -747#[snafu(module)]
    -748#[non_exhaustive]
    -749pub enum MeasureHttpsLatencyError {
    -750    #[snafu(transparent)]
    -751    InvalidUrl { source: url::ParseError },
    -752    #[cfg(not(wasm_browser))]
    -753    #[snafu(transparent)]
    -754    DnsLookup { source: StaggeredError<DnsError> },
    -755    #[snafu(display("Creating HTTP client failed"))]
    -756    CreateReqwestClient { source: reqwest::Error },
    -757    #[snafu(display("HTTP request failed"))]
    -758    HttpRequest { source: reqwest::Error },
    -759    #[snafu(display("Error response from server {status}: {:?}", status.canonical_reason()))]
    -760    InvalidResponse { status: StatusCode },
    -761}
    -762
    -763/// Executes an HTTPS probe.
    -764///
    -765/// If `certs` is provided they will be added to the trusted root certificates, allowing the
    -766/// use of self-signed certificates for servers.  Currently this is used for testing.
    -767#[allow(clippy::unused_async)]
    -768async fn run_https_probe(
    -769    #[cfg(not(wasm_browser))] dns_resolver: &DnsResolver,
    -770    relay_node: RelayUrl,
    -771    #[cfg(any(test, feature = "test-utils"))] insecure_skip_relay_cert_verify: bool,
    -772) -> Result<HttpsProbeReport, MeasureHttpsLatencyError> {
    -773    trace!("HTTPS probe start");
    -774    let url = relay_node.join(RELAY_PROBE_PATH)?;
    -775
    -776    // This should also use same connection establishment as relay client itself, which
    -777    // needs to be more configurable so users can do more crazy things:
    -778    // https://github.com/n0-computer/iroh/issues/2901
    -779    let mut builder = reqwest::ClientBuilder::new();
    -780
    -781    #[cfg(not(wasm_browser))]
    -782    {
    -783        builder = builder.redirect(reqwest::redirect::Policy::none());
    -784    }
    -785
    -786    #[cfg(not(wasm_browser))]
    -787    if let Some(Host::Domain(domain)) = url.host() {
    -788        // Use our own resolver rather than getaddrinfo
    -789        //
    -790        // Be careful, a non-zero port will override the port in the URI.
    -791        //
    -792        // The relay Client uses `.lookup_ipv4_ipv6` to connect, so use the same function
    -793        // but staggered for reliability.  Ideally this tries to resolve **both** IPv4 and
    -794        // IPv6 though.  But our resolver does not have a function for that yet.
    -795        let addrs: Vec<_> = dns_resolver
    -796            .lookup_ipv4_ipv6_staggered(domain, DNS_TIMEOUT, DNS_STAGGERING_MS)
    -797            .await?
    -798            .map(|ipaddr| SocketAddr::new(ipaddr, 0))
    -799            .collect();
    -800        trace!(?addrs, "resolved addrs");
    -801        builder = builder.resolve_to_addrs(domain, &addrs);
    -802    }
    -803
    -804    #[cfg(all(not(wasm_browser), any(test, feature = "test-utils")))]
    -805    let builder = builder.danger_accept_invalid_certs(insecure_skip_relay_cert_verify);
    +629    Ok(has_captive)
    +630}
    +631
    +632/// Returns the proper port based on the protocol of the probe.
    +633#[cfg(not(wasm_browser))]
    +634fn get_quic_port(relay_node: &RelayNode) -> Option<u16> {
    +635    if let Some(ref quic) = relay_node.quic {
    +636        if quic.port == 0 {
    +637            Some(DEFAULT_RELAY_QUIC_PORT)
    +638        } else {
    +639            Some(quic.port)
    +640        }
    +641    } else {
    +642        None
    +643    }
    +644}
    +645
    +646#[cfg(not(wasm_browser))]
    +647#[derive(Debug, Snafu)]
    +648#[snafu(module)]
    +649#[non_exhaustive]
    +650pub enum GetRelayAddrError {
    +651    #[snafu(display("No valid hostname in the relay URL"))]
    +652    InvalidHostname,
    +653    #[snafu(display("No suitable relay address found"))]
    +654    NoAddrFound,
    +655    #[snafu(display("DNS lookup failed"))]
    +656    DnsLookup { source: StaggeredError<DnsError> },
    +657    #[snafu(display("Relay node is not suitable for non-STUN probes"))]
    +658    UnsupportedRelayNode,
    +659    #[snafu(display("HTTPS probes are not implemented"))]
    +660    UnsupportedHttps,
    +661    #[snafu(display("No port available for this protocol"))]
    +662    MissingPort,
    +663}
    +664
    +665/// Returns the IP address to use to communicate to this relay node for quic.
    +666#[cfg(not(wasm_browser))]
    +667pub(super) async fn get_relay_addr_ipv4(
    +668    dns_resolver: &DnsResolver,
    +669    relay_node: &RelayNode,
    +670) -> Result<SocketAddrV4, GetRelayAddrError> {
    +671    let port = get_quic_port(relay_node).context(get_relay_addr_error::MissingPortSnafu)?;
    +672    relay_lookup_ipv4_staggered(dns_resolver, relay_node, port).await
    +673}
    +674
    +675#[cfg(not(wasm_browser))]
    +676pub(super) async fn get_relay_addr_ipv6(
    +677    dns_resolver: &DnsResolver,
    +678    relay_node: &RelayNode,
    +679) -> Result<SocketAddrV6, GetRelayAddrError> {
    +680    let port = get_quic_port(relay_node).context(get_relay_addr_error::MissingPortSnafu)?;
    +681    relay_lookup_ipv6_staggered(dns_resolver, relay_node, port).await
    +682}
    +683
    +684/// Do a staggared ipv4 DNS lookup based on [`RelayNode`]
    +685///
    +686/// `port` is combined with the resolved [`std::net::Ipv4Addr`] to return a [`SocketAddr`]
    +687#[cfg(not(wasm_browser))]
    +688async fn relay_lookup_ipv4_staggered(
    +689    dns_resolver: &DnsResolver,
    +690    relay: &RelayNode,
    +691    port: u16,
    +692) -> Result<SocketAddrV4, GetRelayAddrError> {
    +693    match relay.url.host() {
    +694        Some(url::Host::Domain(hostname)) => {
    +695            trace!(%hostname, "Performing DNS A lookup for relay addr");
    +696            match dns_resolver
    +697                .lookup_ipv4_staggered(hostname, DNS_TIMEOUT, DNS_STAGGERING_MS)
    +698                .await
    +699            {
    +700                Ok(mut addrs) => addrs
    +701                    .next()
    +702                    .map(|ip| ip.to_canonical())
    +703                    .map(|addr| match addr {
    +704                        IpAddr::V4(ip) => SocketAddrV4::new(ip, port),
    +705                        IpAddr::V6(_) => unreachable!("bad DNS lookup: {:?}", addr),
    +706                    })
    +707                    .ok_or(get_relay_addr_error::NoAddrFoundSnafu.build()),
    +708                Err(err) => Err(get_relay_addr_error::DnsLookupSnafu.into_error(err)),
    +709            }
    +710        }
    +711        Some(url::Host::Ipv4(addr)) => Ok(SocketAddrV4::new(addr, port)),
    +712        Some(url::Host::Ipv6(_addr)) => Err(get_relay_addr_error::NoAddrFoundSnafu.build()),
    +713        None => Err(get_relay_addr_error::InvalidHostnameSnafu.build()),
    +714    }
    +715}
    +716
    +717/// Do a staggared ipv6 DNS lookup based on [`RelayNode`]
    +718///
    +719/// `port` is combined with the resolved [`std::net::Ipv6Addr`] to return a [`SocketAddr`]
    +720#[cfg(not(wasm_browser))]
    +721async fn relay_lookup_ipv6_staggered(
    +722    dns_resolver: &DnsResolver,
    +723    relay: &RelayNode,
    +724    port: u16,
    +725) -> Result<SocketAddrV6, GetRelayAddrError> {
    +726    match relay.url.host() {
    +727        Some(url::Host::Domain(hostname)) => {
    +728            trace!(%hostname, "Performing DNS AAAA lookup for relay addr");
    +729            match dns_resolver
    +730                .lookup_ipv6_staggered(hostname, DNS_TIMEOUT, DNS_STAGGERING_MS)
    +731                .await
    +732            {
    +733                Ok(mut addrs) => addrs
    +734                    .next()
    +735                    .map(|addr| match addr {
    +736                        IpAddr::V4(_) => unreachable!("bad DNS lookup: {:?}", addr),
    +737                        IpAddr::V6(ip) => SocketAddrV6::new(ip, port, 0, 0),
    +738                    })
    +739                    .ok_or(get_relay_addr_error::NoAddrFoundSnafu.build()),
    +740                Err(err) => Err(get_relay_addr_error::DnsLookupSnafu.into_error(err)),
    +741            }
    +742        }
    +743        Some(url::Host::Ipv4(_addr)) => Err(get_relay_addr_error::NoAddrFoundSnafu.build()),
    +744        Some(url::Host::Ipv6(addr)) => Ok(SocketAddrV6::new(addr, port, 0, 0)),
    +745        None => Err(get_relay_addr_error::InvalidHostnameSnafu.build()),
    +746    }
    +747}
    +748
    +749#[derive(Debug, Snafu)]
    +750#[snafu(module)]
    +751#[non_exhaustive]
    +752pub enum MeasureHttpsLatencyError {
    +753    #[snafu(transparent)]
    +754    InvalidUrl { source: url::ParseError },
    +755    #[cfg(not(wasm_browser))]
    +756    #[snafu(transparent)]
    +757    DnsLookup { source: StaggeredError<DnsError> },
    +758    #[snafu(display("Creating HTTP client failed"))]
    +759    CreateReqwestClient { source: reqwest::Error },
    +760    #[snafu(display("HTTP request failed"))]
    +761    HttpRequest { source: reqwest::Error },
    +762    #[snafu(display("Error response from server {status}: {:?}", status.canonical_reason()))]
    +763    InvalidResponse { status: StatusCode },
    +764}
    +765
    +766/// Executes an HTTPS probe.
    +767///
    +768/// If `certs` is provided they will be added to the trusted root certificates, allowing the
    +769/// use of self-signed certificates for servers.  Currently this is used for testing.
    +770#[allow(clippy::unused_async)]
    +771async fn run_https_probe(
    +772    #[cfg(not(wasm_browser))] dns_resolver: &DnsResolver,
    +773    relay_node: RelayUrl,
    +774    #[cfg(any(test, feature = "test-utils"))] insecure_skip_relay_cert_verify: bool,
    +775) -> Result<HttpsProbeReport, MeasureHttpsLatencyError> {
    +776    trace!("HTTPS probe start");
    +777    let url = relay_node.join(RELAY_PROBE_PATH)?;
    +778
    +779    // This should also use same connection establishment as relay client itself, which
    +780    // needs to be more configurable so users can do more crazy things:
    +781    // https://github.com/n0-computer/iroh/issues/2901
    +782    let mut builder = reqwest_client_builder();
    +783
    +784    #[cfg(not(wasm_browser))]
    +785    {
    +786        builder = builder.redirect(reqwest::redirect::Policy::none());
    +787    }
    +788
    +789    #[cfg(not(wasm_browser))]
    +790    if let Some(Host::Domain(domain)) = url.host() {
    +791        // Use our own resolver rather than getaddrinfo
    +792        //
    +793        // Be careful, a non-zero port will override the port in the URI.
    +794        //
    +795        // The relay Client uses `.lookup_ipv4_ipv6` to connect, so use the same function
    +796        // but staggered for reliability.  Ideally this tries to resolve **both** IPv4 and
    +797        // IPv6 though.  But our resolver does not have a function for that yet.
    +798        let addrs: Vec<_> = dns_resolver
    +799            .lookup_ipv4_ipv6_staggered(domain, DNS_TIMEOUT, DNS_STAGGERING_MS)
    +800            .await?
    +801            .map(|ipaddr| SocketAddr::new(ipaddr, 0))
    +802            .collect();
    +803        trace!(?addrs, "resolved addrs");
    +804        builder = builder.resolve_to_addrs(domain, &addrs);
    +805    }
     806
    -807    let client = builder
    -808        .build()
    -809        .context(measure_https_latency_error::CreateReqwestClientSnafu)?;
    -810
    -811    let start = Instant::now();
    -812    let response = client
    -813        .request(reqwest::Method::GET, url)
    -814        .send()
    -815        .await
    -816        .context(measure_https_latency_error::HttpRequestSnafu)?;
    -817    let latency = start.elapsed();
    -818    if response.status().is_success() {
    -819        // Drain the response body to be nice to the server, up to a limit.
    -820        const MAX_BODY_SIZE: usize = 8 << 10; // 8 KiB
    -821        let mut body_size = 0;
    -822        let mut stream = response.bytes_stream();
    -823        // ignore failing frames
    -824        while let Some(Ok(chunk)) = stream.next().await {
    -825            body_size += chunk.len();
    -826            if body_size >= MAX_BODY_SIZE {
    -827                break;
    -828            }
    -829        }
    -830
    -831        Ok(HttpsProbeReport {
    -832            node: relay_node,
    -833            latency,
    -834        })
    -835    } else {
    -836        Err(measure_https_latency_error::InvalidResponseSnafu {
    -837            status: response.status(),
    -838        }
    -839        .build())
    -840    }
    -841}
    -842
    -843#[cfg(test)]
    -844mod tests {
    -845    use std::net::Ipv4Addr;
    -846
    -847    use iroh_relay::dns::DnsResolver;
    -848    use n0_snafu::{Result, ResultExt};
    -849    use tracing_test::traced_test;
    -850
    -851    use super::{super::test_utils, *};
    -852
    -853    #[tokio::test]
    -854    async fn test_measure_https_latency() -> Result {
    -855        let (_server, relay) = test_utils::relay().await;
    -856        let dns_resolver = DnsResolver::new();
    -857        tracing::info!(relay_url = ?relay.url , "RELAY_URL");
    -858        let report = run_https_probe(&dns_resolver, relay.url, true).await?;
    -859
    -860        assert!(report.latency > Duration::ZERO);
    -861
    -862        Ok(())
    -863    }
    +807    #[cfg(all(not(wasm_browser), any(test, feature = "test-utils")))]
    +808    let builder = builder.danger_accept_invalid_certs(insecure_skip_relay_cert_verify);
    +809
    +810    let client = builder
    +811        .build()
    +812        .context(measure_https_latency_error::CreateReqwestClientSnafu)?;
    +813
    +814    let start = Instant::now();
    +815    let response = client
    +816        .request(reqwest::Method::GET, url)
    +817        .send()
    +818        .await
    +819        .context(measure_https_latency_error::HttpRequestSnafu)?;
    +820    let latency = start.elapsed();
    +821    if response.status().is_success() {
    +822        // Drain the response body to be nice to the server, up to a limit.
    +823        const MAX_BODY_SIZE: usize = 8 << 10; // 8 KiB
    +824        let mut body_size = 0;
    +825        let mut stream = response.bytes_stream();
    +826        // ignore failing frames
    +827        while let Some(Ok(chunk)) = stream.next().await {
    +828            body_size += chunk.len();
    +829            if body_size >= MAX_BODY_SIZE {
    +830                break;
    +831            }
    +832        }
    +833
    +834        Ok(HttpsProbeReport {
    +835            node: relay_node,
    +836            latency,
    +837        })
    +838    } else {
    +839        Err(measure_https_latency_error::InvalidResponseSnafu {
    +840            status: response.status(),
    +841        }
    +842        .build())
    +843    }
    +844}
    +845
    +846#[cfg(test)]
    +847mod tests {
    +848    use std::net::Ipv4Addr;
    +849
    +850    use iroh_relay::dns::DnsResolver;
    +851    use n0_snafu::{Result, ResultExt};
    +852    use tracing_test::traced_test;
    +853
    +854    use super::{super::test_utils, *};
    +855
    +856    #[tokio::test]
    +857    async fn test_measure_https_latency() -> Result {
    +858        let (_server, relay) = test_utils::relay().await;
    +859        let dns_resolver = DnsResolver::new();
    +860        tracing::info!(relay_url = ?relay.url , "RELAY_URL");
    +861        let report = run_https_probe(&dns_resolver, relay.url, true).await?;
    +862
    +863        assert!(report.latency > Duration::ZERO);
     864
    -865    #[tokio::test]
    -866    #[traced_test]
    -867    async fn test_qad_probe_v4() -> Result {
    -868        let (server, relay) = test_utils::relay().await;
    -869        let relay = Arc::new(relay);
    -870        let client_config = iroh_relay::client::make_dangerous_client_config();
    -871        let ep = quinn::Endpoint::client(SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 0)).e()?;
    -872        let client_addr = ep.local_addr().e()?;
    -873
    -874        let quic_client = iroh_relay::quic::QuicClient::new(ep.clone(), client_config);
    -875        let dns_resolver = DnsResolver::default();
    +865        Ok(())
    +866    }
    +867
    +868    #[tokio::test]
    +869    #[traced_test]
    +870    async fn test_qad_probe_v4() -> Result {
    +871        let (server, relay) = test_utils::relay().await;
    +872        let relay = Arc::new(relay);
    +873        let client_config = iroh_relay::client::make_dangerous_client_config();
    +874        let ep = quinn::Endpoint::client(SocketAddr::new(Ipv4Addr::LOCALHOST.into(), 0)).e()?;
    +875        let client_addr = ep.local_addr().e()?;
     876
    -877        let (report, conn) = super::super::run_probe_v4(None, relay, quic_client, dns_resolver)
    -878            .await
    -879            .unwrap();
    -880
    -881        assert_eq!(report.addr, client_addr);
    -882        drop(conn);
    -883        ep.wait_idle().await;
    -884        server.shutdown().await?;
    -885        Ok(())
    -886    }
    -887}
    \ No newline at end of file +877 let quic_client = iroh_relay::quic::QuicClient::new(ep.clone(), client_config); +878 let dns_resolver = DnsResolver::default(); +879 +880 let (report, conn) = super::super::run_probe_v4(None, relay, quic_client, dns_resolver) +881 .await +882 .unwrap(); +883 +884 assert_eq!(report.addr, client_addr); +885 drop(conn); +886 ep.wait_idle().await; +887 server.shutdown().await?; +888 Ok(()) +889 } +890}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/protocol.rs.html b/pr/3367/docs/src/iroh/protocol.rs.html index 9bb270c7d2..9fcb806f38 100644 --- a/pr/3367/docs/src/iroh/protocol.rs.html +++ b/pr/3367/docs/src/iroh/protocol.rs.html @@ -1,4 +1,4 @@ -protocol.rs - source

    iroh/
    protocol.rs

    1//! Tools for spawning an accept loop that routes incoming requests to the right protocol.
    +protocol.rs - source

    iroh/
    protocol.rs

    1//! Tools for spawning an accept loop that routes incoming requests to the right protocol.
     2//!
     3//! ## Example
     4//!
    @@ -32,665 +32,677 @@
     32//!     }
     33//! }
     34//! ```
    -35use std::{collections::BTreeMap, future::Future, pin::Pin, sync::Arc};
    -36
    -37use iroh_base::NodeId;
    -38use n0_future::{
    -39    join_all,
    -40    task::{self, AbortOnDropHandle, JoinSet},
    -41};
    -42use snafu::{Backtrace, Snafu};
    -43use tokio::sync::Mutex;
    -44use tokio_util::sync::CancellationToken;
    -45use tracing::{error, info_span, trace, warn, Instrument};
    -46
    -47use crate::{
    -48    endpoint::{Connecting, Connection, RemoteNodeIdError},
    -49    Endpoint,
    -50};
    -51
    -52/// The built router.
    -53///
    -54/// Construct this using [`Router::builder`].
    -55///
    -56/// When dropped, this will abort listening the tasks, so make sure to store it.
    +35use std::{
    +36    collections::BTreeMap,
    +37    future::Future,
    +38    pin::Pin,
    +39    sync::{Arc, Mutex},
    +40};
    +41
    +42use iroh_base::NodeId;
    +43use n0_future::{
    +44    join_all,
    +45    task::{self, AbortOnDropHandle, JoinSet},
    +46};
    +47use snafu::{Backtrace, Snafu};
    +48use tokio_util::sync::CancellationToken;
    +49use tracing::{Instrument, error, field::Empty, info_span, trace, warn};
    +50
    +51use crate::{
    +52    Endpoint,
    +53    endpoint::{Connecting, Connection, RemoteNodeIdError},
    +54};
    +55
    +56/// The built router.
     57///
    -58/// Even with this abort-on-drop behaviour, it's recommended to call and await
    -59/// [`Router::shutdown`] before ending the process.
    -60///
    -61/// As an example for graceful shutdown, e.g. for tests or CLI tools,
    -62/// wait for [`tokio::signal::ctrl_c()`]:
    -63///
    -64/// ```no_run
    -65/// # use std::sync::Arc;
    -66/// # use n0_snafu::ResultExt;
    -67/// # use iroh::{endpoint::Connecting, protocol::{ProtocolHandler, Router}, Endpoint, NodeAddr};
    -68/// #
    -69/// # async fn test_compile() -> n0_snafu::Result<()> {
    -70/// let endpoint = Endpoint::builder().discovery_n0().bind().await?;
    -71///
    -72/// let router = Router::builder(endpoint)
    -73///     // .accept(&ALPN, <something>)
    -74///     .spawn();
    +58/// Construct this using [`Router::builder`].
    +59///
    +60/// When dropped, this will abort listening the tasks, so make sure to store it.
    +61///
    +62/// Even with this abort-on-drop behaviour, it's recommended to call and await
    +63/// [`Router::shutdown`] before ending the process.
    +64///
    +65/// As an example for graceful shutdown, e.g. for tests or CLI tools,
    +66/// wait for [`tokio::signal::ctrl_c()`]:
    +67///
    +68/// ```no_run
    +69/// # use std::sync::Arc;
    +70/// # use n0_snafu::ResultExt;
    +71/// # use iroh::{endpoint::Connecting, protocol::{ProtocolHandler, Router}, Endpoint, NodeAddr};
    +72/// #
    +73/// # async fn test_compile() -> n0_snafu::Result<()> {
    +74/// let endpoint = Endpoint::builder().discovery_n0().bind().await?;
     75///
    -76/// // wait until the user wants to
    -77/// tokio::signal::ctrl_c().await.context("ctrl+c")?;
    -78/// router.shutdown().await.context("shutdown")?;
    -79/// # Ok(())
    -80/// # }
    -81/// ```
    -82#[derive(Clone, Debug)]
    -83pub struct Router {
    -84    endpoint: Endpoint,
    -85    // `Router` needs to be `Clone + Send`, and we need to `task.await` in its `shutdown()` impl.
    -86    task: Arc<Mutex<Option<AbortOnDropHandle<()>>>>,
    -87    cancel_token: CancellationToken,
    -88}
    -89
    -90/// Builder for creating a [`Router`] for accepting protocols.
    -91#[derive(Debug)]
    -92pub struct RouterBuilder {
    -93    endpoint: Endpoint,
    -94    protocols: ProtocolMap,
    -95}
    -96
    -97#[allow(missing_docs)]
    -98#[derive(Debug, Snafu)]
    -99#[non_exhaustive]
    -100pub enum AcceptError {
    -101    #[snafu(transparent)]
    -102    Connection {
    -103        source: crate::endpoint::ConnectionError,
    -104        backtrace: Option<Backtrace>,
    -105        #[snafu(implicit)]
    -106        span_trace: n0_snafu::SpanTrace,
    -107    },
    -108    #[snafu(transparent)]
    -109    MissingRemoteNodeId { source: RemoteNodeIdError },
    -110    #[snafu(display("Not allowed."))]
    -111    NotAllowed {},
    -112
    -113    #[snafu(transparent)]
    -114    User {
    -115        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    -116    },
    -117}
    -118
    -119impl AcceptError {
    -120    /// Creates a new user error from an arbitrary error type.
    -121    pub fn from_err<T: std::error::Error + Send + Sync + 'static>(value: T) -> Self {
    -122        Self::User {
    -123            source: Box::new(value),
    -124        }
    -125    }
    -126}
    -127
    -128impl From<std::io::Error> for AcceptError {
    -129    fn from(err: std::io::Error) -> Self {
    -130        Self::from_err(err)
    -131    }
    -132}
    -133
    -134impl From<quinn::ClosedStream> for AcceptError {
    -135    fn from(err: quinn::ClosedStream) -> Self {
    -136        Self::from_err(err)
    -137    }
    -138}
    -139
    -140/// Handler for incoming connections.
    -141///
    -142/// A router accepts connections for arbitrary ALPN protocols.
    -143///
    -144/// With this trait, you can handle incoming connections for any protocol.
    +76/// let router = Router::builder(endpoint)
    +77///     // .accept(&ALPN, <something>)
    +78///     .spawn();
    +79///
    +80/// // wait until the user wants to
    +81/// tokio::signal::ctrl_c().await.context("ctrl+c")?;
    +82/// router.shutdown().await.context("shutdown")?;
    +83/// # Ok(())
    +84/// # }
    +85/// ```
    +86#[derive(Clone, Debug)]
    +87pub struct Router {
    +88    endpoint: Endpoint,
    +89    // `Router` needs to be `Clone + Send`, and we need to `task.await` in its `shutdown()` impl.
    +90    task: Arc<Mutex<Option<AbortOnDropHandle<()>>>>,
    +91    cancel_token: CancellationToken,
    +92}
    +93
    +94/// Builder for creating a [`Router`] for accepting protocols.
    +95#[derive(Debug)]
    +96pub struct RouterBuilder {
    +97    endpoint: Endpoint,
    +98    protocols: ProtocolMap,
    +99}
    +100
    +101#[allow(missing_docs)]
    +102#[derive(Debug, Snafu)]
    +103#[non_exhaustive]
    +104pub enum AcceptError {
    +105    #[snafu(transparent)]
    +106    Connection {
    +107        source: crate::endpoint::ConnectionError,
    +108        backtrace: Option<Backtrace>,
    +109        #[snafu(implicit)]
    +110        span_trace: n0_snafu::SpanTrace,
    +111    },
    +112    #[snafu(transparent)]
    +113    MissingRemoteNodeId { source: RemoteNodeIdError },
    +114    #[snafu(display("Not allowed."))]
    +115    NotAllowed {},
    +116
    +117    #[snafu(transparent)]
    +118    User {
    +119        source: Box<dyn std::error::Error + Send + Sync + 'static>,
    +120    },
    +121}
    +122
    +123impl AcceptError {
    +124    /// Creates a new user error from an arbitrary error type.
    +125    pub fn from_err<T: std::error::Error + Send + Sync + 'static>(value: T) -> Self {
    +126        Self::User {
    +127            source: Box::new(value),
    +128        }
    +129    }
    +130}
    +131
    +132impl From<std::io::Error> for AcceptError {
    +133    fn from(err: std::io::Error) -> Self {
    +134        Self::from_err(err)
    +135    }
    +136}
    +137
    +138impl From<quinn::ClosedStream> for AcceptError {
    +139    fn from(err: quinn::ClosedStream) -> Self {
    +140        Self::from_err(err)
    +141    }
    +142}
    +143
    +144/// Handler for incoming connections.
     145///
    -146/// Implement this trait on a struct that should handle incoming connections.
    -147/// The protocol handler must then be registered on the node for an ALPN protocol with
    -148/// [`crate::protocol::RouterBuilder::accept`].
    +146/// A router accepts connections for arbitrary ALPN protocols.
    +147///
    +148/// With this trait, you can handle incoming connections for any protocol.
     149///
    -150/// See the [module documentation](crate::protocol) for an example.
    -151pub trait ProtocolHandler: Send + Sync + std::fmt::Debug + 'static {
    -152    /// Optional interception point to handle the `Connecting` state.
    -153    ///
    -154    /// Can be implemented as `async fn on_connecting(&self, connecting: Connecting) -> Result<Connection>`.
    -155    ///
    -156    /// This enables accepting 0-RTT data from clients, among other things.
    -157    fn on_connecting(
    -158        &self,
    -159        connecting: Connecting,
    -160    ) -> impl Future<Output = Result<Connection, AcceptError>> + Send {
    -161        async move {
    -162            let conn = connecting.await?;
    -163            Ok(conn)
    -164        }
    -165    }
    -166
    -167    /// Handle an incoming connection.
    -168    ///
    -169    /// Can be implemented as `async fn accept(&self, connection: Connection) -> Result<Connection>`.
    -170    ///
    -171    /// The returned future runs on a freshly spawned tokio task so it can be long-running.
    +150/// Implement this trait on a struct that should handle incoming connections.
    +151/// The protocol handler must then be registered on the node for an ALPN protocol with
    +152/// [`crate::protocol::RouterBuilder::accept`].
    +153///
    +154/// See the [module documentation](crate::protocol) for an example.
    +155pub trait ProtocolHandler: Send + Sync + std::fmt::Debug + 'static {
    +156    /// Optional interception point to handle the `Connecting` state.
    +157    ///
    +158    /// Can be implemented as `async fn on_connecting(&self, connecting: Connecting) -> Result<Connection>`.
    +159    ///
    +160    /// This enables accepting 0-RTT data from clients, among other things.
    +161    fn on_connecting(
    +162        &self,
    +163        connecting: Connecting,
    +164    ) -> impl Future<Output = Result<Connection, AcceptError>> + Send {
    +165        async move {
    +166            let conn = connecting.await?;
    +167            Ok(conn)
    +168        }
    +169    }
    +170
    +171    /// Handle an incoming connection.
     172    ///
    -173    /// When [`Router::shutdown`] is called, no further connections will be accepted, and
    -174    /// the futures returned by [`Self::accept`] will be aborted after the future returned
    -175    /// from [`ProtocolHandler::shutdown`] completes.
    -176    fn accept(
    -177        &self,
    -178        connection: Connection,
    -179    ) -> impl Future<Output = Result<(), AcceptError>> + Send;
    -180
    -181    /// Called when the router shuts down.
    -182    ///
    -183    /// Can be implemented as `async fn shutdown(&self)`.
    -184    ///
    -185    /// This is called from [`Router::shutdown`]. The returned future is awaited before
    -186    /// the router closes the endpoint.
    -187    fn shutdown(&self) -> impl Future<Output = ()> + Send {
    -188        async move {}
    -189    }
    -190}
    -191
    -192impl<T: ProtocolHandler> ProtocolHandler for Arc<T> {
    -193    async fn on_connecting(&self, conn: Connecting) -> Result<Connection, AcceptError> {
    -194        self.as_ref().on_connecting(conn).await
    -195    }
    -196
    -197    async fn accept(&self, conn: Connection) -> Result<(), AcceptError> {
    -198        self.as_ref().accept(conn).await
    +173    /// Can be implemented as `async fn accept(&self, connection: Connection) -> Result<Connection>`.
    +174    ///
    +175    /// The returned future runs on a freshly spawned tokio task so it can be long-running.
    +176    ///
    +177    /// When [`Router::shutdown`] is called, no further connections will be accepted, and
    +178    /// the futures returned by [`Self::accept`] will be aborted after the future returned
    +179    /// from [`ProtocolHandler::shutdown`] completes.
    +180    fn accept(
    +181        &self,
    +182        connection: Connection,
    +183    ) -> impl Future<Output = Result<(), AcceptError>> + Send;
    +184
    +185    /// Called when the router shuts down.
    +186    ///
    +187    /// Can be implemented as `async fn shutdown(&self)`.
    +188    ///
    +189    /// This is called from [`Router::shutdown`]. The returned future is awaited before
    +190    /// the router closes the endpoint.
    +191    fn shutdown(&self) -> impl Future<Output = ()> + Send {
    +192        async move {}
    +193    }
    +194}
    +195
    +196impl<T: ProtocolHandler> ProtocolHandler for Arc<T> {
    +197    async fn on_connecting(&self, conn: Connecting) -> Result<Connection, AcceptError> {
    +198        self.as_ref().on_connecting(conn).await
     199    }
     200
    -201    async fn shutdown(&self) {
    -202        self.as_ref().shutdown().await
    +201    async fn accept(&self, conn: Connection) -> Result<(), AcceptError> {
    +202        self.as_ref().accept(conn).await
     203    }
    -204}
    -205
    -206impl<T: ProtocolHandler> ProtocolHandler for Box<T> {
    -207    async fn on_connecting(&self, conn: Connecting) -> Result<Connection, AcceptError> {
    -208        self.as_ref().on_connecting(conn).await
    -209    }
    -210
    -211    async fn accept(&self, conn: Connection) -> Result<(), AcceptError> {
    -212        self.as_ref().accept(conn).await
    +204
    +205    async fn shutdown(&self) {
    +206        self.as_ref().shutdown().await
    +207    }
    +208}
    +209
    +210impl<T: ProtocolHandler> ProtocolHandler for Box<T> {
    +211    async fn on_connecting(&self, conn: Connecting) -> Result<Connection, AcceptError> {
    +212        self.as_ref().on_connecting(conn).await
     213    }
     214
    -215    async fn shutdown(&self) {
    -216        self.as_ref().shutdown().await
    +215    async fn accept(&self, conn: Connection) -> Result<(), AcceptError> {
    +216        self.as_ref().accept(conn).await
     217    }
    -218}
    -219
    -220impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler> {
    -221    fn from(value: T) -> Self {
    -222        Box::new(value)
    -223    }
    -224}
    -225
    -226/// A dyn-compatible version of [`ProtocolHandler`] that returns boxed futures.
    -227///
    -228/// Any type that implements [`ProtocolHandler`] automatically also implements [`DynProtocolHandler`].
    -229/// There is a also [`From`] impl to turn any type that implements [`ProtocolHandler`] into a
    -230/// `Box<dyn DynProtocolHandler>`.
    -231//
    -232// We are not using [`n0_future::boxed::BoxFuture] because we don't need a `'static` bound
    -233// on these futures.
    -234pub trait DynProtocolHandler: Send + Sync + std::fmt::Debug + 'static {
    -235    /// See [`ProtocolHandler::on_connecting`].
    -236    fn on_connecting(
    -237        &self,
    -238        connecting: Connecting,
    -239    ) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>> {
    -240        Box::pin(async move {
    -241            let conn = connecting.await?;
    -242            Ok(conn)
    -243        })
    -244    }
    -245
    -246    /// See [`ProtocolHandler::accept`].
    -247    fn accept(
    -248        &self,
    -249        connection: Connection,
    -250    ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>;
    -251
    -252    /// See [`ProtocolHandler::shutdown`].
    -253    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>> {
    -254        Box::pin(async move {})
    -255    }
    -256}
    -257
    -258impl<P: ProtocolHandler> DynProtocolHandler for P {
    -259    fn accept(
    -260        &self,
    -261        connection: Connection,
    -262    ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>> {
    -263        Box::pin(<Self as ProtocolHandler>::accept(self, connection))
    -264    }
    -265
    -266    fn on_connecting(
    -267        &self,
    -268        connecting: Connecting,
    -269    ) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>> {
    -270        Box::pin(<Self as ProtocolHandler>::on_connecting(self, connecting))
    -271    }
    -272
    -273    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>> {
    -274        Box::pin(<Self as ProtocolHandler>::shutdown(self))
    +218
    +219    async fn shutdown(&self) {
    +220        self.as_ref().shutdown().await
    +221    }
    +222}
    +223
    +224impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler> {
    +225    fn from(value: T) -> Self {
    +226        Box::new(value)
    +227    }
    +228}
    +229
    +230/// A dyn-compatible version of [`ProtocolHandler`] that returns boxed futures.
    +231///
    +232/// Any type that implements [`ProtocolHandler`] automatically also implements [`DynProtocolHandler`].
    +233/// There is a also [`From`] impl to turn any type that implements [`ProtocolHandler`] into a
    +234/// `Box<dyn DynProtocolHandler>`.
    +235//
    +236// We are not using [`n0_future::boxed::BoxFuture] because we don't need a `'static` bound
    +237// on these futures.
    +238pub trait DynProtocolHandler: Send + Sync + std::fmt::Debug + 'static {
    +239    /// See [`ProtocolHandler::on_connecting`].
    +240    fn on_connecting(
    +241        &self,
    +242        connecting: Connecting,
    +243    ) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>> {
    +244        Box::pin(async move {
    +245            let conn = connecting.await?;
    +246            Ok(conn)
    +247        })
    +248    }
    +249
    +250    /// See [`ProtocolHandler::accept`].
    +251    fn accept(
    +252        &self,
    +253        connection: Connection,
    +254    ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>>;
    +255
    +256    /// See [`ProtocolHandler::shutdown`].
    +257    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>> {
    +258        Box::pin(async move {})
    +259    }
    +260}
    +261
    +262impl<P: ProtocolHandler> DynProtocolHandler for P {
    +263    fn accept(
    +264        &self,
    +265        connection: Connection,
    +266    ) -> Pin<Box<dyn Future<Output = Result<(), AcceptError>> + Send + '_>> {
    +267        Box::pin(<Self as ProtocolHandler>::accept(self, connection))
    +268    }
    +269
    +270    fn on_connecting(
    +271        &self,
    +272        connecting: Connecting,
    +273    ) -> Pin<Box<dyn Future<Output = Result<Connection, AcceptError>> + Send + '_>> {
    +274        Box::pin(<Self as ProtocolHandler>::on_connecting(self, connecting))
     275    }
    -276}
    -277
    -278/// A typed map of protocol handlers, mapping them from ALPNs.
    -279#[derive(Debug, Default)]
    -280pub(crate) struct ProtocolMap(BTreeMap<Vec<u8>, Box<dyn DynProtocolHandler>>);
    +276
    +277    fn shutdown(&self) -> Pin<Box<dyn Future<Output = ()> + Send + '_>> {
    +278        Box::pin(<Self as ProtocolHandler>::shutdown(self))
    +279    }
    +280}
     281
    -282impl ProtocolMap {
    -283    /// Returns the registered protocol handler for an ALPN as a [`Arc<dyn ProtocolHandler>`].
    -284    pub(crate) fn get(&self, alpn: &[u8]) -> Option<&dyn DynProtocolHandler> {
    -285        self.0.get(alpn).map(|p| &**p)
    -286    }
    -287
    -288    /// Inserts a protocol handler.
    -289    pub(crate) fn insert(&mut self, alpn: Vec<u8>, handler: Box<dyn DynProtocolHandler>) {
    -290        self.0.insert(alpn, handler);
    -291    }
    -292
    -293    /// Returns an iterator of all registered ALPN protocol identifiers.
    -294    pub(crate) fn alpns(&self) -> impl Iterator<Item = &Vec<u8>> {
    -295        self.0.keys()
    -296    }
    -297
    -298    /// Shuts down all protocol handlers.
    -299    ///
    -300    /// Calls and awaits [`ProtocolHandler::shutdown`] for all registered handlers concurrently.
    -301    pub(crate) async fn shutdown(&self) {
    -302        let handlers = self.0.values().map(|p| p.shutdown());
    -303        join_all(handlers).await;
    -304    }
    -305}
    -306
    -307impl Router {
    -308    /// Creates a new [`Router`] using given [`Endpoint`].
    -309    pub fn builder(endpoint: Endpoint) -> RouterBuilder {
    -310        RouterBuilder::new(endpoint)
    -311    }
    -312
    -313    /// Returns the [`Endpoint`] stored in this router.
    -314    pub fn endpoint(&self) -> &Endpoint {
    -315        &self.endpoint
    -316    }
    -317
    -318    /// Checks if the router is already shutdown.
    -319    pub fn is_shutdown(&self) -> bool {
    -320        self.cancel_token.is_cancelled()
    -321    }
    -322
    -323    /// Shuts down the accept loop cleanly.
    -324    ///
    -325    /// When this function returns, all [`ProtocolHandler`]s will be shutdown and
    -326    /// `Endpoint::close` will have been called.
    -327    ///
    -328    /// If already shutdown, it returns `Ok`.
    -329    ///
    -330    /// If some [`ProtocolHandler`] panicked in the accept loop, this will propagate
    -331    /// that panic into the result here.
    -332    pub async fn shutdown(&self) -> Result<(), n0_future::task::JoinError> {
    -333        if self.is_shutdown() {
    -334            return Ok(());
    -335        }
    -336
    -337        // Trigger shutdown of the main run task by activating the cancel token.
    -338        self.cancel_token.cancel();
    -339
    -340        // Wait for the main task to terminate.
    -341        if let Some(task) = self.task.lock().await.take() {
    -342            task.await?;
    -343        }
    -344
    -345        Ok(())
    -346    }
    -347}
    -348
    -349impl RouterBuilder {
    -350    /// Creates a new router builder using given [`Endpoint`].
    -351    pub fn new(endpoint: Endpoint) -> Self {
    -352        Self {
    -353            endpoint,
    -354            protocols: ProtocolMap::default(),
    -355        }
    -356    }
    -357
    -358    /// Configures the router to accept the [`ProtocolHandler`] when receiving a connection
    -359    /// with this `alpn`.
    -360    ///
    -361    /// `handler` can either be a type that implements [`ProtocolHandler`] or a
    -362    /// [`Box<dyn DynProtocolHandler>`].
    -363    ///
    -364    /// [`Box<dyn DynProtocolHandler>`]: DynProtocolHandler
    -365    pub fn accept(
    -366        mut self,
    -367        alpn: impl AsRef<[u8]>,
    -368        handler: impl Into<Box<dyn DynProtocolHandler>>,
    -369    ) -> Self {
    -370        self.protocols
    -371            .insert(alpn.as_ref().to_vec(), handler.into());
    -372        self
    -373    }
    -374
    -375    /// Returns the [`Endpoint`] of the node.
    -376    pub fn endpoint(&self) -> &Endpoint {
    -377        &self.endpoint
    -378    }
    -379
    -380    /// Spawns an accept loop and returns a handle to it encapsulated as the [`Router`].
    -381    pub fn spawn(self) -> Router {
    -382        // Update the endpoint with our alpns.
    -383        let alpns = self
    -384            .protocols
    -385            .alpns()
    -386            .map(|alpn| alpn.to_vec())
    -387            .collect::<Vec<_>>();
    -388
    -389        let protocols = Arc::new(self.protocols);
    -390        self.endpoint.set_alpns(alpns);
    -391
    -392        let mut join_set = JoinSet::new();
    -393        let endpoint = self.endpoint.clone();
    -394
    -395        // Our own shutdown works with a cancellation token.
    -396        let cancel = CancellationToken::new();
    -397        let cancel_token = cancel.clone();
    +282/// A typed map of protocol handlers, mapping them from ALPNs.
    +283#[derive(Debug, Default)]
    +284pub(crate) struct ProtocolMap(BTreeMap<Vec<u8>, Box<dyn DynProtocolHandler>>);
    +285
    +286impl ProtocolMap {
    +287    /// Returns the registered protocol handler for an ALPN as a [`Arc<dyn ProtocolHandler>`].
    +288    pub(crate) fn get(&self, alpn: &[u8]) -> Option<&dyn DynProtocolHandler> {
    +289        self.0.get(alpn).map(|p| &**p)
    +290    }
    +291
    +292    /// Inserts a protocol handler.
    +293    pub(crate) fn insert(&mut self, alpn: Vec<u8>, handler: Box<dyn DynProtocolHandler>) {
    +294        self.0.insert(alpn, handler);
    +295    }
    +296
    +297    /// Returns an iterator of all registered ALPN protocol identifiers.
    +298    pub(crate) fn alpns(&self) -> impl Iterator<Item = &Vec<u8>> {
    +299        self.0.keys()
    +300    }
    +301
    +302    /// Shuts down all protocol handlers.
    +303    ///
    +304    /// Calls and awaits [`ProtocolHandler::shutdown`] for all registered handlers concurrently.
    +305    pub(crate) async fn shutdown(&self) {
    +306        let handlers = self.0.values().map(|p| p.shutdown());
    +307        join_all(handlers).await;
    +308    }
    +309}
    +310
    +311impl Router {
    +312    /// Creates a new [`Router`] using given [`Endpoint`].
    +313    pub fn builder(endpoint: Endpoint) -> RouterBuilder {
    +314        RouterBuilder::new(endpoint)
    +315    }
    +316
    +317    /// Returns the [`Endpoint`] stored in this router.
    +318    pub fn endpoint(&self) -> &Endpoint {
    +319        &self.endpoint
    +320    }
    +321
    +322    /// Checks if the router is already shutdown.
    +323    pub fn is_shutdown(&self) -> bool {
    +324        self.cancel_token.is_cancelled()
    +325    }
    +326
    +327    /// Shuts down the accept loop cleanly.
    +328    ///
    +329    /// When this function returns, all [`ProtocolHandler`]s will be shutdown and
    +330    /// `Endpoint::close` will have been called.
    +331    ///
    +332    /// If already shutdown, it returns `Ok`.
    +333    ///
    +334    /// If some [`ProtocolHandler`] panicked in the accept loop, this will propagate
    +335    /// that panic into the result here.
    +336    pub async fn shutdown(&self) -> Result<(), n0_future::task::JoinError> {
    +337        if self.is_shutdown() {
    +338            return Ok(());
    +339        }
    +340
    +341        // Trigger shutdown of the main run task by activating the cancel token.
    +342        self.cancel_token.cancel();
    +343
    +344        // Wait for the main task to terminate.
    +345
    +346        // MutexGuard is not held across await point
    +347        let task = self.task.lock().expect("poisoned").take();
    +348        if let Some(task) = task {
    +349            task.await?;
    +350        }
    +351
    +352        Ok(())
    +353    }
    +354}
    +355
    +356impl RouterBuilder {
    +357    /// Creates a new router builder using given [`Endpoint`].
    +358    pub fn new(endpoint: Endpoint) -> Self {
    +359        Self {
    +360            endpoint,
    +361            protocols: ProtocolMap::default(),
    +362        }
    +363    }
    +364
    +365    /// Configures the router to accept the [`ProtocolHandler`] when receiving a connection
    +366    /// with this `alpn`.
    +367    ///
    +368    /// `handler` can either be a type that implements [`ProtocolHandler`] or a
    +369    /// [`Box<dyn DynProtocolHandler>`].
    +370    ///
    +371    /// [`Box<dyn DynProtocolHandler>`]: DynProtocolHandler
    +372    pub fn accept(
    +373        mut self,
    +374        alpn: impl AsRef<[u8]>,
    +375        handler: impl Into<Box<dyn DynProtocolHandler>>,
    +376    ) -> Self {
    +377        self.protocols
    +378            .insert(alpn.as_ref().to_vec(), handler.into());
    +379        self
    +380    }
    +381
    +382    /// Returns the [`Endpoint`] of the node.
    +383    pub fn endpoint(&self) -> &Endpoint {
    +384        &self.endpoint
    +385    }
    +386
    +387    /// Spawns an accept loop and returns a handle to it encapsulated as the [`Router`].
    +388    pub fn spawn(self) -> Router {
    +389        // Update the endpoint with our alpns.
    +390        let alpns = self
    +391            .protocols
    +392            .alpns()
    +393            .map(|alpn| alpn.to_vec())
    +394            .collect::<Vec<_>>();
    +395
    +396        let protocols = Arc::new(self.protocols);
    +397        self.endpoint.set_alpns(alpns);
     398
    -399        let run_loop_fut = async move {
    -400            // Make sure to cancel the token, if this future ever exits.
    -401            let _cancel_guard = cancel_token.clone().drop_guard();
    -402            // We create a separate cancellation token to stop any `ProtocolHandler::accept` futures
    -403            // that are still running after `ProtocolHandler::shutdown` was called.
    -404            let handler_cancel_token = CancellationToken::new();
    +399        let mut join_set = JoinSet::new();
    +400        let endpoint = self.endpoint.clone();
    +401
    +402        // Our own shutdown works with a cancellation token.
    +403        let cancel = CancellationToken::new();
    +404        let cancel_token = cancel.clone();
     405
    -406            loop {
    -407                tokio::select! {
    -408                    biased;
    -409                    _ = cancel_token.cancelled() => {
    -410                        break;
    -411                    },
    -412                    // handle task terminations and quit on panics.
    -413                    Some(res) = join_set.join_next() => {
    -414                        match res {
    -415                            Err(outer) => {
    -416                                if outer.is_panic() {
    -417                                    error!("Task panicked: {outer:?}");
    -418                                    break;
    -419                                } else if outer.is_cancelled() {
    -420                                    trace!("Task cancelled: {outer:?}");
    -421                                } else {
    -422                                    error!("Task failed: {outer:?}");
    -423                                    break;
    -424                                }
    -425                            }
    -426                            Ok(Some(())) => {
    -427                                trace!("Task finished");
    -428                            }
    -429                            Ok(None) => {
    -430                                trace!("Task cancelled");
    -431                            }
    -432                        }
    -433                    },
    -434
    -435                    // handle incoming p2p connections.
    -436                    incoming = endpoint.accept() => {
    -437                        let Some(incoming) = incoming else {
    -438                            break; // Endpoint is closed.
    -439                        };
    -440
    -441                        let protocols = protocols.clone();
    -442                        let token = handler_cancel_token.child_token();
    -443                        join_set.spawn(async move {
    -444                            token.run_until_cancelled(handle_connection(incoming, protocols)).await
    -445                        }.instrument(info_span!("router.accept")));
    -446                    },
    -447                }
    -448            }
    -449
    -450            // We first shutdown the protocol handlers to give them a chance to close connections gracefully.
    -451            protocols.shutdown().await;
    -452            // We now cancel the remaining `ProtocolHandler::accept` futures.
    -453            handler_cancel_token.cancel();
    -454            // Now we close the endpoint. This will force-close all connections that are not yet closed.
    -455            endpoint.close().await;
    -456            // Finally, we abort the remaining accept tasks. This should be a noop because we already cancelled
    -457            // the futures above.
    -458            tracing::debug!("Shutting down remaining tasks");
    -459            join_set.abort_all();
    -460            while let Some(res) = join_set.join_next().await {
    -461                match res {
    -462                    Err(err) if err.is_panic() => error!("Task panicked: {err:?}"),
    -463                    _ => {}
    -464                }
    -465            }
    -466        };
    -467        let task = task::spawn(run_loop_fut);
    -468        let task = AbortOnDropHandle::new(task);
    -469
    -470        Router {
    -471            endpoint: self.endpoint,
    -472            task: Arc::new(Mutex::new(Some(task))),
    -473            cancel_token: cancel,
    -474        }
    -475    }
    -476}
    +406        let run_loop_fut = async move {
    +407            // Make sure to cancel the token, if this future ever exits.
    +408            let _cancel_guard = cancel_token.clone().drop_guard();
    +409            // We create a separate cancellation token to stop any `ProtocolHandler::accept` futures
    +410            // that are still running after `ProtocolHandler::shutdown` was called.
    +411            let handler_cancel_token = CancellationToken::new();
    +412
    +413            loop {
    +414                tokio::select! {
    +415                    biased;
    +416                    _ = cancel_token.cancelled() => {
    +417                        break;
    +418                    },
    +419                    // handle task terminations and quit on panics.
    +420                    Some(res) = join_set.join_next() => {
    +421                        match res {
    +422                            Err(outer) => {
    +423                                if outer.is_panic() {
    +424                                    error!("Task panicked: {outer:?}");
    +425                                    break;
    +426                                } else if outer.is_cancelled() {
    +427                                    trace!("Task cancelled: {outer:?}");
    +428                                } else {
    +429                                    error!("Task failed: {outer:?}");
    +430                                    break;
    +431                                }
    +432                            }
    +433                            Ok(Some(())) => {
    +434                                trace!("Task finished");
    +435                            }
    +436                            Ok(None) => {
    +437                                trace!("Task cancelled");
    +438                            }
    +439                        }
    +440                    },
    +441
    +442                    // handle incoming p2p connections.
    +443                    incoming = endpoint.accept() => {
    +444                        let Some(incoming) = incoming else {
    +445                            break; // Endpoint is closed.
    +446                        };
    +447
    +448                        let protocols = protocols.clone();
    +449                        let token = handler_cancel_token.child_token();
    +450                        let span = info_span!("router.accept", me=%endpoint.node_id().fmt_short(), remote=Empty, alpn=Empty);
    +451                        join_set.spawn(async move {
    +452                            token.run_until_cancelled(handle_connection(incoming, protocols)).await
    +453                        }.instrument(span));
    +454                    },
    +455                }
    +456            }
    +457
    +458            // We first shutdown the protocol handlers to give them a chance to close connections gracefully.
    +459            protocols.shutdown().await;
    +460            // We now cancel the remaining `ProtocolHandler::accept` futures.
    +461            handler_cancel_token.cancel();
    +462            // Now we close the endpoint. This will force-close all connections that are not yet closed.
    +463            endpoint.close().await;
    +464            // Finally, we abort the remaining accept tasks. This should be a noop because we already cancelled
    +465            // the futures above.
    +466            tracing::debug!("Shutting down remaining tasks");
    +467            join_set.abort_all();
    +468            while let Some(res) = join_set.join_next().await {
    +469                match res {
    +470                    Err(err) if err.is_panic() => error!("Task panicked: {err:?}"),
    +471                    _ => {}
    +472                }
    +473            }
    +474        };
    +475        let task = task::spawn(run_loop_fut.instrument(tracing::Span::current()));
    +476        let task = AbortOnDropHandle::new(task);
     477
    -478async fn handle_connection(incoming: crate::endpoint::Incoming, protocols: Arc<ProtocolMap>) {
    -479    let mut connecting = match incoming.accept() {
    -480        Ok(conn) => conn,
    -481        Err(err) => {
    -482            warn!("Ignoring connection: accepting failed: {err:#}");
    -483            return;
    -484        }
    -485    };
    -486    let alpn = match connecting.alpn().await {
    -487        Ok(alpn) => alpn,
    -488        Err(err) => {
    -489            warn!("Ignoring connection: invalid handshake: {err:#}");
    -490            return;
    -491        }
    -492    };
    -493    let Some(handler) = protocols.get(&alpn) else {
    -494        warn!("Ignoring connection: unsupported ALPN protocol");
    -495        return;
    -496    };
    -497    match handler.on_connecting(connecting).await {
    -498        Ok(connection) => {
    -499            if let Err(err) = handler.accept(connection).await {
    -500                warn!("Handling incoming connection ended with error: {err}");
    -501            }
    -502        }
    -503        Err(err) => {
    -504            warn!("Handling incoming connecting ended with error: {err}");
    -505        }
    -506    }
    -507}
    -508
    -509/// Wraps an existing protocol, limiting its access,
    -510/// based on the provided function.
    -511///
    -512/// Any refused connection will be closed with an error code of `0` and reason `not allowed`.
    -513#[derive(derive_more::Debug, Clone)]
    -514pub struct AccessLimit<P: ProtocolHandler + Clone> {
    -515    proto: P,
    -516    #[debug("limiter")]
    -517    limiter: Arc<dyn Fn(NodeId) -> bool + Send + Sync + 'static>,
    -518}
    -519
    -520impl<P: ProtocolHandler + Clone> AccessLimit<P> {
    -521    /// Create a new `AccessLimit`.
    -522    ///
    -523    /// The function should return `true` for nodes that are allowed to
    -524    /// connect, and `false` otherwise.
    -525    pub fn new<F>(proto: P, limiter: F) -> Self
    -526    where
    -527        F: Fn(NodeId) -> bool + Send + Sync + 'static,
    -528    {
    -529        Self {
    -530            proto,
    -531            limiter: Arc::new(limiter),
    -532        }
    -533    }
    -534}
    -535
    -536impl<P: ProtocolHandler + Clone> ProtocolHandler for AccessLimit<P> {
    -537    fn on_connecting(
    -538        &self,
    -539        conn: Connecting,
    -540    ) -> impl Future<Output = Result<Connection, AcceptError>> + Send {
    -541        self.proto.on_connecting(conn)
    -542    }
    -543
    -544    async fn accept(&self, conn: Connection) -> Result<(), AcceptError> {
    -545        let remote = conn.remote_node_id()?;
    -546        let is_allowed = (self.limiter)(remote);
    -547        if !is_allowed {
    -548            conn.close(0u32.into(), b"not allowed");
    -549            return Err(NotAllowedSnafu.build());
    -550        }
    -551        self.proto.accept(conn).await?;
    -552        Ok(())
    -553    }
    -554
    -555    fn shutdown(&self) -> impl Future<Output = ()> + Send {
    -556        self.proto.shutdown()
    -557    }
    -558}
    -559
    -560#[cfg(test)]
    -561mod tests {
    -562    use std::{sync::Mutex, time::Duration};
    -563
    -564    use n0_snafu::{Result, ResultExt};
    -565    use n0_watcher::Watcher;
    -566    use quinn::ApplicationClose;
    +478        Router {
    +479            endpoint: self.endpoint,
    +480            task: Arc::new(Mutex::new(Some(task))),
    +481            cancel_token: cancel,
    +482        }
    +483    }
    +484}
    +485
    +486async fn handle_connection(incoming: crate::endpoint::Incoming, protocols: Arc<ProtocolMap>) {
    +487    let mut connecting = match incoming.accept() {
    +488        Ok(conn) => conn,
    +489        Err(err) => {
    +490            warn!("Ignoring connection: accepting failed: {err:#}");
    +491            return;
    +492        }
    +493    };
    +494    let alpn = match connecting.alpn().await {
    +495        Ok(alpn) => alpn,
    +496        Err(err) => {
    +497            warn!("Ignoring connection: invalid handshake: {err:#}");
    +498            return;
    +499        }
    +500    };
    +501    tracing::Span::current().record("alpn", String::from_utf8_lossy(&alpn).to_string());
    +502    let Some(handler) = protocols.get(&alpn) else {
    +503        warn!("Ignoring connection: unsupported ALPN protocol");
    +504        return;
    +505    };
    +506    match handler.on_connecting(connecting).await {
    +507        Ok(connection) => {
    +508            if let Ok(remote) = connection.remote_node_id() {
    +509                tracing::Span::current()
    +510                    .record("remote", tracing::field::display(remote.fmt_short()));
    +511            };
    +512            if let Err(err) = handler.accept(connection).await {
    +513                warn!("Handling incoming connection ended with error: {err}");
    +514            }
    +515        }
    +516        Err(err) => {
    +517            warn!("Handling incoming connecting ended with error: {err}");
    +518        }
    +519    }
    +520}
    +521
    +522/// Wraps an existing protocol, limiting its access,
    +523/// based on the provided function.
    +524///
    +525/// Any refused connection will be closed with an error code of `0` and reason `not allowed`.
    +526#[derive(derive_more::Debug, Clone)]
    +527pub struct AccessLimit<P: ProtocolHandler + Clone> {
    +528    proto: P,
    +529    #[debug("limiter")]
    +530    limiter: Arc<dyn Fn(NodeId) -> bool + Send + Sync + 'static>,
    +531}
    +532
    +533impl<P: ProtocolHandler + Clone> AccessLimit<P> {
    +534    /// Create a new `AccessLimit`.
    +535    ///
    +536    /// The function should return `true` for nodes that are allowed to
    +537    /// connect, and `false` otherwise.
    +538    pub fn new<F>(proto: P, limiter: F) -> Self
    +539    where
    +540        F: Fn(NodeId) -> bool + Send + Sync + 'static,
    +541    {
    +542        Self {
    +543            proto,
    +544            limiter: Arc::new(limiter),
    +545        }
    +546    }
    +547}
    +548
    +549impl<P: ProtocolHandler + Clone> ProtocolHandler for AccessLimit<P> {
    +550    fn on_connecting(
    +551        &self,
    +552        conn: Connecting,
    +553    ) -> impl Future<Output = Result<Connection, AcceptError>> + Send {
    +554        self.proto.on_connecting(conn)
    +555    }
    +556
    +557    async fn accept(&self, conn: Connection) -> Result<(), AcceptError> {
    +558        let remote = conn.remote_node_id()?;
    +559        let is_allowed = (self.limiter)(remote);
    +560        if !is_allowed {
    +561            conn.close(0u32.into(), b"not allowed");
    +562            return Err(NotAllowedSnafu.build());
    +563        }
    +564        self.proto.accept(conn).await?;
    +565        Ok(())
    +566    }
     567
    -568    use super::*;
    -569    use crate::{endpoint::ConnectionError, RelayMode};
    -570
    -571    #[tokio::test]
    -572    async fn test_shutdown() -> Result {
    -573        let endpoint = Endpoint::builder().bind().await?;
    -574        let router = Router::builder(endpoint.clone()).spawn();
    -575
    -576        assert!(!router.is_shutdown());
    -577        assert!(!endpoint.is_closed());
    -578
    -579        router.shutdown().await.e()?;
    -580
    -581        assert!(router.is_shutdown());
    -582        assert!(endpoint.is_closed());
    -583
    -584        Ok(())
    -585    }
    -586
    -587    // The protocol definition:
    -588    #[derive(Debug, Clone)]
    -589    struct Echo;
    +568    fn shutdown(&self) -> impl Future<Output = ()> + Send {
    +569        self.proto.shutdown()
    +570    }
    +571}
    +572
    +573#[cfg(test)]
    +574mod tests {
    +575    use std::{sync::Mutex, time::Duration};
    +576
    +577    use n0_snafu::{Result, ResultExt};
    +578    use quinn::ApplicationClose;
    +579
    +580    use super::*;
    +581    use crate::{RelayMode, endpoint::ConnectionError};
    +582
    +583    #[tokio::test]
    +584    async fn test_shutdown() -> Result {
    +585        let endpoint = Endpoint::builder().bind().await?;
    +586        let router = Router::builder(endpoint.clone()).spawn();
    +587
    +588        assert!(!router.is_shutdown());
    +589        assert!(!endpoint.is_closed());
     590
    -591    const ECHO_ALPN: &[u8] = b"/iroh/echo/1";
    +591        router.shutdown().await.e()?;
     592
    -593    impl ProtocolHandler for Echo {
    -594        async fn accept(&self, connection: Connection) -> Result<(), AcceptError> {
    -595            println!("accepting echo");
    -596            let (mut send, mut recv) = connection.accept_bi().await?;
    -597
    -598            // Echo any bytes received back directly.
    -599            let _bytes_sent = tokio::io::copy(&mut recv, &mut send).await?;
    -600
    -601            send.finish()?;
    -602            connection.closed().await;
    -603
    -604            Ok(())
    -605        }
    -606    }
    -607
    -608    #[tokio::test]
    -609    async fn test_limiter() -> Result {
    -610        // tracing_subscriber::fmt::try_init().ok();
    -611        let e1 = Endpoint::builder()
    -612            .relay_mode(RelayMode::Disabled)
    -613            .bind()
    -614            .await?;
    -615        // deny all access
    -616        let proto = AccessLimit::new(Echo, |_node_id| false);
    -617        let r1 = Router::builder(e1.clone()).accept(ECHO_ALPN, proto).spawn();
    -618
    -619        let addr1 = r1.endpoint().node_addr().initialized().await?;
    -620        dbg!(&addr1);
    -621        let e2 = Endpoint::builder()
    -622            .relay_mode(RelayMode::Disabled)
    -623            .bind()
    -624            .await?;
    -625
    -626        println!("connecting");
    -627        let conn = e2.connect(addr1, ECHO_ALPN).await?;
    -628
    -629        let (_send, mut recv) = conn.open_bi().await.e()?;
    -630        let response = recv.read_to_end(1000).await.unwrap_err();
    -631        assert!(format!("{:#?}", response).contains("not allowed"));
    -632
    -633        r1.shutdown().await.e()?;
    -634        e2.close().await;
    -635
    -636        Ok(())
    -637    }
    -638
    -639    #[tokio::test]
    -640    async fn test_graceful_shutdown() -> Result {
    -641        #[derive(Debug, Clone, Default)]
    -642        struct TestProtocol {
    -643            connections: Arc<Mutex<Vec<Connection>>>,
    -644        }
    -645
    -646        const TEST_ALPN: &[u8] = b"/iroh/test/1";
    +593        assert!(router.is_shutdown());
    +594        assert!(endpoint.is_closed());
    +595
    +596        Ok(())
    +597    }
    +598
    +599    // The protocol definition:
    +600    #[derive(Debug, Clone)]
    +601    struct Echo;
    +602
    +603    const ECHO_ALPN: &[u8] = b"/iroh/echo/1";
    +604
    +605    impl ProtocolHandler for Echo {
    +606        async fn accept(&self, connection: Connection) -> Result<(), AcceptError> {
    +607            println!("accepting echo");
    +608            let (mut send, mut recv) = connection.accept_bi().await?;
    +609
    +610            // Echo any bytes received back directly.
    +611            let _bytes_sent = tokio::io::copy(&mut recv, &mut send).await?;
    +612
    +613            send.finish()?;
    +614            connection.closed().await;
    +615
    +616            Ok(())
    +617        }
    +618    }
    +619
    +620    #[tokio::test]
    +621    async fn test_limiter() -> Result {
    +622        // tracing_subscriber::fmt::try_init().ok();
    +623        let e1 = Endpoint::builder()
    +624            .relay_mode(RelayMode::Disabled)
    +625            .bind()
    +626            .await?;
    +627        // deny all access
    +628        let proto = AccessLimit::new(Echo, |_node_id| false);
    +629        let r1 = Router::builder(e1.clone()).accept(ECHO_ALPN, proto).spawn();
    +630
    +631        let addr1 = r1.endpoint().node_addr();
    +632        dbg!(&addr1);
    +633        let e2 = Endpoint::builder()
    +634            .relay_mode(RelayMode::Disabled)
    +635            .bind()
    +636            .await?;
    +637
    +638        println!("connecting");
    +639        let conn = e2.connect(addr1, ECHO_ALPN).await?;
    +640
    +641        let (_send, mut recv) = conn.open_bi().await.e()?;
    +642        let response = recv.read_to_end(1000).await.unwrap_err();
    +643        assert!(format!("{response:#?}").contains("not allowed"));
    +644
    +645        r1.shutdown().await.e()?;
    +646        e2.close().await;
     647
    -648        impl ProtocolHandler for TestProtocol {
    -649            async fn accept(&self, connection: Connection) -> Result<(), AcceptError> {
    -650                self.connections.lock().expect("poisoned").push(connection);
    -651                Ok(())
    -652            }
    -653
    -654            async fn shutdown(&self) {
    -655                tokio::time::sleep(Duration::from_millis(100)).await;
    -656                let mut connections = self.connections.lock().expect("poisoned");
    -657                for conn in connections.drain(..) {
    -658                    conn.close(42u32.into(), b"shutdown");
    -659                }
    -660            }
    -661        }
    -662
    -663        eprintln!("creating ep1");
    -664        let endpoint = Endpoint::builder()
    -665            .relay_mode(RelayMode::Disabled)
    -666            .bind()
    -667            .await?;
    -668        let router = Router::builder(endpoint)
    -669            .accept(TEST_ALPN, TestProtocol::default())
    -670            .spawn();
    -671        eprintln!("waiting for node addr");
    -672        let addr = router.endpoint().node_addr().initialized().await?;
    -673
    -674        eprintln!("creating ep2");
    -675        let endpoint2 = Endpoint::builder()
    -676            .relay_mode(RelayMode::Disabled)
    -677            .bind()
    -678            .await?;
    -679        eprintln!("connecting to {:?}", addr);
    -680        let conn = endpoint2.connect(addr, TEST_ALPN).await?;
    -681
    -682        eprintln!("starting shutdown");
    -683        router.shutdown().await.e()?;
    -684
    -685        eprintln!("waiting for closed conn");
    -686        let reason = conn.closed().await;
    -687        assert_eq!(
    -688            reason,
    -689            ConnectionError::ApplicationClosed(ApplicationClose {
    -690                error_code: 42u32.into(),
    -691                reason: b"shutdown".to_vec().into()
    -692            })
    -693        );
    -694        Ok(())
    -695    }
    -696}
    \ No newline at end of file +648 Ok(()) +649 } +650 +651 #[tokio::test] +652 async fn test_graceful_shutdown() -> Result { +653 #[derive(Debug, Clone, Default)] +654 struct TestProtocol { +655 connections: Arc<Mutex<Vec<Connection>>>, +656 } +657 +658 const TEST_ALPN: &[u8] = b"/iroh/test/1"; +659 +660 impl ProtocolHandler for TestProtocol { +661 async fn accept(&self, connection: Connection) -> Result<(), AcceptError> { +662 self.connections.lock().expect("poisoned").push(connection); +663 Ok(()) +664 } +665 +666 async fn shutdown(&self) { +667 tokio::time::sleep(Duration::from_millis(100)).await; +668 let mut connections = self.connections.lock().expect("poisoned"); +669 for conn in connections.drain(..) { +670 conn.close(42u32.into(), b"shutdown"); +671 } +672 } +673 } +674 +675 eprintln!("creating ep1"); +676 let endpoint = Endpoint::builder() +677 .relay_mode(RelayMode::Disabled) +678 .bind() +679 .await?; +680 let router = Router::builder(endpoint) +681 .accept(TEST_ALPN, TestProtocol::default()) +682 .spawn(); +683 eprintln!("waiting for node addr"); +684 let addr = router.endpoint().node_addr(); +685 +686 eprintln!("creating ep2"); +687 let endpoint2 = Endpoint::builder() +688 .relay_mode(RelayMode::Disabled) +689 .bind() +690 .await?; +691 eprintln!("connecting to {addr:?}"); +692 let conn = endpoint2.connect(addr, TEST_ALPN).await?; +693 +694 eprintln!("starting shutdown"); +695 router.shutdown().await.e()?; +696 +697 eprintln!("waiting for closed conn"); +698 let reason = conn.closed().await; +699 assert_eq!( +700 reason, +701 ConnectionError::ApplicationClosed(ApplicationClose { +702 error_code: 42u32.into(), +703 reason: b"shutdown".to_vec().into() +704 }) +705 ); +706 Ok(()) +707 } +708}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/test_utils.rs.html b/pr/3367/docs/src/iroh/test_utils.rs.html index dee0e9d5fc..4aeab5a36a 100644 --- a/pr/3367/docs/src/iroh/test_utils.rs.html +++ b/pr/3367/docs/src/iroh/test_utils.rs.html @@ -1,14 +1,14 @@ -test_utils.rs - source

    iroh/
    test_utils.rs

    1//! Internal utilities to support testing.
    +test_utils.rs - source

    iroh/
    test_utils.rs

    1//! Internal utilities to support testing.
     2use std::net::Ipv4Addr;
     3
     4pub use dns_and_pkarr_servers::DnsPkarrServer;
     5use iroh_base::RelayUrl;
     6use iroh_relay::{
    -7    server::{
    -8        AccessConfig, CertConfig, QuicConfig, RelayConfig, Server, ServerConfig, SpawnError,
    -9        TlsConfig,
    -10    },
    -11    RelayMap, RelayNode, RelayQuicConfig,
    +7    RelayMap, RelayNode, RelayQuicConfig,
    +8    server::{
    +9        AccessConfig, CertConfig, QuicConfig, RelayConfig, Server, ServerConfig, SpawnError,
    +10        TlsConfig,
    +11    },
     12};
     13use tokio::sync::oneshot;
     14
    @@ -88,7 +88,7 @@
     88
     89    use super::CleanupDropGuard;
     90    use crate::{
    -91        discovery::{dns::DnsDiscovery, pkarr::PkarrPublisher, ConcurrentDiscovery},
    +91        discovery::{ConcurrentDiscovery, dns::DnsDiscovery, pkarr::PkarrPublisher},
     92        dns::DnsResolver,
     93        test_utils::{
     94            dns_server::run_dns_server, pkarr_dns_state::State, pkarr_relay::run_pkarr_relay,
    @@ -169,7 +169,7 @@
     169    };
     170
     171    use hickory_resolver::proto::{
    -172        op::{header::MessageType, Message},
    +172        op::{Message, header::MessageType},
     173        serialize::binary::BinDecodable,
     174    };
     175    use n0_future::future::Boxed as BoxFuture;
    @@ -266,10 +266,10 @@
     266    };
     267
     268    use axum::{
    -269        extract::{Path, State},
    -270        response::IntoResponse,
    -271        routing::put,
    -272        Router,
    +269        Router,
    +270        extract::{Path, State},
    +271        response::IntoResponse,
    +272        routing::put,
     273    };
     274    use bytes::Bytes;
     275    use tokio::sync::oneshot;
    @@ -336,14 +336,14 @@
     336
     337pub(crate) mod pkarr_dns_state {
     338    use std::{
    -339        collections::{hash_map, HashMap},
    +339        collections::{HashMap, hash_map},
     340        future::Future,
     341        sync::{Arc, Mutex},
     342        time::Duration,
     343    };
     344
     345    use iroh_base::NodeId;
    -346    use iroh_relay::node_info::{NodeIdExt, NodeInfo, IROH_TXT_NAME};
    +346    use iroh_relay::node_info::{IROH_TXT_NAME, NodeIdExt, NodeInfo};
     347    use pkarr::SignedPacket;
     348    use tracing::debug;
     349
    @@ -497,7 +497,7 @@
     497        ttl: u32,
     498    ) -> impl Iterator<Item = hickory_resolver::proto::rr::Record> + '_ {
     499        use hickory_resolver::proto::rr;
    -500        let name = format!("{}.{}.{}", IROH_TXT_NAME, node_id.to_z32(), origin);
    +500        let name = format!("{IROH_TXT_NAME}.{}.{origin}", node_id.to_z32());
     501        let name = rr::Name::from_utf8(name).expect("invalid name");
     502        txt_strings.into_iter().map(move |s| {
     503            let txt = rr::rdata::TXT::new(vec![s]);
    diff --git a/pr/3367/docs/src/iroh/tls.rs.html b/pr/3367/docs/src/iroh/tls.rs.html
    index 674803df48..09fb081327 100644
    --- a/pr/3367/docs/src/iroh/tls.rs.html
    +++ b/pr/3367/docs/src/iroh/tls.rs.html
    @@ -1,4 +1,4 @@
    -tls.rs - source

    iroh/
    tls.rs

    1//! TLS configuration for iroh.
    +tls.rs - source

    iroh/
    tls.rs

    1//! TLS configuration for iroh.
     2//!
     3//! Currently there is one mechanisms available
     4//! - Raw Public Keys, using the TLS extension described in [RFC 7250]
    @@ -25,7 +25,7 @@
     25/// So 8 * 32 * (200 + 387) = 150.272 bytes, assuming pointers to certificates
     26/// are never aliased pointers (they're Arc'ed).
     27/// I think 150KB is an acceptable default upper limit for such a cache.
    -28const MAX_TLS_TICKETS: usize = 8 * 32;
    +28pub(crate) const DEFAULT_MAX_TLS_TICKETS: usize = 8 * 32;
     29
     30/// Configuration for TLS.
     31///
    @@ -44,7 +44,7 @@
     44}
     45
     46impl TlsConfig {
    -47    pub(crate) fn new(secret_key: SecretKey) -> Self {
    +47    pub(crate) fn new(secret_key: SecretKey, max_tls_tickets: usize) -> Self {
     48        let cert_resolver = Arc::new(
     49            AlwaysResolvesCert::new(&secret_key).expect("Client cert key DER is valid; qed"),
     50        );
    @@ -54,7 +54,7 @@
     54            server_verifier: Arc::new(verifier::ServerCertificateVerifier),
     55            client_verifier: Arc::new(verifier::ClientCertificateVerifier),
     56            session_store: Arc::new(rustls::client::ClientSessionMemoryCache::new(
    -57                MAX_TLS_TICKETS,
    +57                max_tls_tickets,
     58            )),
     59        }
     60    }
    diff --git a/pr/3367/docs/src/iroh/tls/name.rs.html b/pr/3367/docs/src/iroh/tls/name.rs.html
    index eb8cb638c3..111344faf9 100644
    --- a/pr/3367/docs/src/iroh/tls/name.rs.html
    +++ b/pr/3367/docs/src/iroh/tls/name.rs.html
    @@ -1,4 +1,4 @@
    -name.rs - source

    iroh/tls/
    name.rs

    1//! Implementation of encoding iroh NodeIds as domain names.
    +name.rs - source

    iroh/tls/
    name.rs

    1//! Implementation of encoding iroh NodeIds as domain names.
     2//!
     3//! We used to use a constant "localhost" for the TLS server name - however, that affects
     4//! 0-RTT and would put all of the TLS session tickets we receive into the same bucket in
    @@ -35,21 +35,23 @@
     35#[cfg(test)]
     36mod tests {
     37    use iroh_base::SecretKey;
    -38
    -39    #[test]
    -40    fn test_roundtrip() {
    -41        let key = SecretKey::generate(rand::rngs::OsRng);
    -42        let node_id = key.public();
    -43        println!("{}", super::encode(node_id));
    -44        assert_eq!(Some(node_id), super::decode(&super::encode(node_id)));
    -45    }
    -46
    -47    #[test]
    -48    fn test_snapshot() {
    -49        let key = SecretKey::from_bytes(&[0; 32]);
    -50        assert_eq!(
    -51            super::encode(key.public()),
    -52            "7dl2ff6emqi2qol3l382krodedij45bn3nh479hqo14a32qpr8kg.iroh.invalid",
    -53        );
    -54    }
    -55}
    \ No newline at end of file +38 use rand::SeedableRng; +39 +40 #[test] +41 fn test_roundtrip() { +42 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +43 let key = SecretKey::generate(&mut rng); +44 let node_id = key.public(); +45 println!("{}", super::encode(node_id)); +46 assert_eq!(Some(node_id), super::decode(&super::encode(node_id))); +47 } +48 +49 #[test] +50 fn test_snapshot() { +51 let key = SecretKey::from_bytes(&[0; 32]); +52 assert_eq!( +53 super::encode(key.public()), +54 "7dl2ff6emqi2qol3l382krodedij45bn3nh479hqo14a32qpr8kg.iroh.invalid", +55 ); +56 } +57}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh/tls/resolver.rs.html b/pr/3367/docs/src/iroh/tls/resolver.rs.html index e326b4bfbd..2791b52c2c 100644 --- a/pr/3367/docs/src/iroh/tls/resolver.rs.html +++ b/pr/3367/docs/src/iroh/tls/resolver.rs.html @@ -1,10 +1,10 @@ -resolver.rs - source

    iroh/tls/
    resolver.rs

    1use std::sync::Arc;
    +resolver.rs - source

    iroh/tls/
    resolver.rs

    1use std::sync::Arc;
     2
    -3use ed25519_dalek::pkcs8::{spki::der::pem::LineEnding, EncodePrivateKey};
    +3use ed25519_dalek::pkcs8::{EncodePrivateKey, spki::der::pem::LineEnding};
     4use iroh_base::SecretKey;
     5use nested_enum_utils::common_fields;
     6use snafu::Snafu;
    -7use webpki_types::{pem::PemObject, CertificateDer, PrivatePkcs8KeyDer};
    +7use webpki_types::{CertificateDer, PrivatePkcs8KeyDer, pem::PemObject};
     8
     9#[derive(Debug)]
     10pub(super) struct AlwaysResolvesCert {
    diff --git a/pr/3367/docs/src/iroh/tls/verifier.rs.html b/pr/3367/docs/src/iroh/tls/verifier.rs.html
    index 8ae6853662..1f7d580775 100644
    --- a/pr/3367/docs/src/iroh/tls/verifier.rs.html
    +++ b/pr/3367/docs/src/iroh/tls/verifier.rs.html
    @@ -1,4 +1,4 @@
    -verifier.rs - source

    iroh/tls/
    verifier.rs

    1//! TLS 1.3 certificates and handshakes handling.
    +verifier.rs - source

    iroh/tls/
    verifier.rs

    1//! TLS 1.3 certificates and handshakes handling.
     2//!
     3//! This module handles a verification of a client/server certificate chain
     4//! and signatures allegedly by the given certificates, or using raw public keys.
    @@ -6,12 +6,12 @@
     6use ed25519_dalek::pkcs8::EncodePublicKey;
     7use iroh_base::PublicKey;
     8use rustls::{
    -9    client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
    -10    crypto::{verify_tls13_signature_with_raw_key, WebPkiSupportedAlgorithms},
    -11    pki_types::CertificateDer as Certificate,
    -12    server::danger::{ClientCertVerified, ClientCertVerifier},
    -13    CertificateError, DigitallySignedStruct, DistinguishedName, SignatureScheme,
    -14    SupportedProtocolVersion,
    +9    CertificateError, DigitallySignedStruct, DistinguishedName, SignatureScheme,
    +10    SupportedProtocolVersion,
    +11    client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
    +12    crypto::{WebPkiSupportedAlgorithms, verify_tls13_signature_with_raw_key},
    +13    pki_types::CertificateDer as Certificate,
    +14    server::danger::{ClientCertVerified, ClientCertVerifier},
     15};
     16use webpki::ring as webpki_algs;
     17use webpki_types::SubjectPublicKeyInfoDer;
    diff --git a/pr/3367/docs/src/iroh/util.rs.html b/pr/3367/docs/src/iroh/util.rs.html
    index 66a119984b..75384ddc90 100644
    --- a/pr/3367/docs/src/iroh/util.rs.html
    +++ b/pr/3367/docs/src/iroh/util.rs.html
    @@ -1,4 +1,4 @@
    -util.rs - source

    iroh/
    util.rs

    1//! Utilities used in [`iroh`][`crate`]
    +util.rs - source

    iroh/
    util.rs

    1//! Utilities used in [`iroh`][`crate`]
     2
     3use std::{
     4    future::Future,
    @@ -69,24 +69,35 @@
     69    }
     70}
     71
    -72#[cfg(test)]
    -73mod tests {
    -74    use std::pin::pin;
    -75
    -76    use n0_future::time::Duration;
    -77
    -78    use super::*;
    -79
    -80    #[tokio::test]
    -81    async fn test_maybefuture_poll_after_use() {
    -82        let fut = async move { "hello" };
    -83        let mut maybe_fut = pin!(MaybeFuture::Some(fut));
    -84        let res = (&mut maybe_fut).await;
    -85
    -86        assert_eq!(res, "hello");
    -87
    -88        // Now poll again
    -89        let res = tokio::time::timeout(Duration::from_millis(10), maybe_fut).await;
    -90        assert!(res.is_err());
    -91    }
    -92}
    \ No newline at end of file +72/// Creates a reqwest client builder that always uses the rustls backend, unless we +73/// are in a browser context, where that is not supported. +74pub(crate) fn reqwest_client_builder() -> reqwest::ClientBuilder { +75 let mut builder = reqwest::Client::builder(); +76 #[cfg(not(wasm_browser))] +77 { +78 builder = builder.use_rustls_tls(); +79 } +80 builder +81} +82 +83#[cfg(test)] +84mod tests { +85 use std::pin::pin; +86 +87 use n0_future::time::Duration; +88 +89 use super::*; +90 +91 #[tokio::test] +92 async fn test_maybefuture_poll_after_use() { +93 let fut = async move { "hello" }; +94 let mut maybe_fut = pin!(MaybeFuture::Some(fut)); +95 let res = (&mut maybe_fut).await; +96 +97 assert_eq!(res, "hello"); +98 +99 // Now poll again +100 let res = tokio::time::timeout(Duration::from_millis(10), maybe_fut).await; +101 assert!(res.is_err()); +102 } +103}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_base/key.rs.html b/pr/3367/docs/src/iroh_base/key.rs.html index 0342a3b526..55bf82180a 100644 --- a/pr/3367/docs/src/iroh_base/key.rs.html +++ b/pr/3367/docs/src/iroh_base/key.rs.html @@ -1,406 +1,428 @@ -key.rs - source

    iroh_base/
    key.rs

    1//! Cryptographic key handling for `iroh`.
    +key.rs - source

    iroh_base/
    key.rs

    1//! Cryptographic key handling for `iroh`.
     2
     3use std::{
     4    borrow::Borrow,
     5    cmp::{Ord, PartialOrd},
     6    fmt::{Debug, Display},
     7    hash::Hash,
    -8    str::FromStr,
    -9};
    -10
    -11use curve25519_dalek::edwards::CompressedEdwardsY;
    -12pub use ed25519_dalek::{Signature, SignatureError};
    -13use ed25519_dalek::{SigningKey, VerifyingKey};
    -14use nested_enum_utils::common_fields;
    -15use rand_core::CryptoRngCore;
    -16use serde::{Deserialize, Serialize};
    -17use snafu::{Backtrace, Snafu};
    -18
    -19/// A public key.
    -20///
    -21/// The key itself is stored as the `CompressedEdwards` y coordinate of the public key
    -22/// It is verified to decompress into a valid key when created.
    -23#[derive(Clone, Copy, PartialEq, Eq)]
    -24#[repr(transparent)]
    -25pub struct PublicKey(CompressedEdwardsY);
    -26
    -27impl Borrow<[u8; 32]> for PublicKey {
    -28    fn borrow(&self) -> &[u8; 32] {
    -29        self.as_bytes()
    -30    }
    -31}
    -32
    -33impl PartialOrd for PublicKey {
    -34    fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
    -35        Some(self.cmp(other))
    -36    }
    -37}
    -38
    -39impl Ord for PublicKey {
    -40    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
    -41        self.0.as_bytes().cmp(other.0.as_bytes())
    -42    }
    -43}
    -44
    -45/// The identifier for a node in the (iroh) network.
    -46///
    -47/// Each node in iroh has a unique identifier created as a cryptographic key.  This can be
    -48/// used to globally identify a node.  Since it is also a cryptographic key it is also the
    -49/// mechanism by which all traffic is always encrypted for a specific node only.
    -50///
    -51/// This is equivalent to [`PublicKey`].  By convention we will (or should) use `PublicKey`
    -52/// as type name when performing cryptographic operations, but use `NodeId` when referencing
    -53/// a node.  E.g.:
    -54///
    -55/// - `encrypt(key: PublicKey)`
    -56/// - `send_to(node: NodeId)`
    -57pub type NodeId = PublicKey;
    -58
    -59impl Hash for PublicKey {
    -60    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
    -61        self.0.hash(state);
    -62    }
    -63}
    -64
    -65impl Serialize for PublicKey {
    -66    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    -67    where
    -68        S: serde::Serializer,
    -69    {
    -70        if serializer.is_human_readable() {
    -71            serializer.serialize_str(&self.to_string())
    -72        } else {
    -73            self.0.as_bytes().serialize(serializer)
    -74        }
    -75    }
    -76}
    -77
    -78impl<'de> Deserialize<'de> for PublicKey {
    -79    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    -80    where
    -81        D: serde::Deserializer<'de>,
    -82    {
    -83        if deserializer.is_human_readable() {
    -84            let s = String::deserialize(deserializer)?;
    -85            Self::from_str(&s).map_err(serde::de::Error::custom)
    -86        } else {
    -87            let data: [u8; 32] = serde::Deserialize::deserialize(deserializer)?;
    -88            Self::try_from(data.as_ref()).map_err(serde::de::Error::custom)
    -89        }
    -90    }
    -91}
    -92
    -93impl PublicKey {
    -94    /// Get this public key as a byte array.
    -95    pub fn as_bytes(&self) -> &[u8; 32] {
    -96        self.0.as_bytes()
    -97    }
    -98
    -99    /// Returns the [`VerifyingKey`] for this `PublicKey`.
    -100    pub fn public(&self) -> VerifyingKey {
    -101        VerifyingKey::from_bytes(self.0.as_bytes()).expect("already verified")
    -102    }
    -103
    -104    /// Construct a `PublicKey` from a slice of bytes.
    -105    ///
    -106    /// # Warning
    -107    ///
    -108    /// This will return a [`SignatureError`] if the bytes passed into this method do not represent
    -109    /// a valid `ed25519_dalek` curve point. Will never fail for bytes return from [`Self::as_bytes`].
    -110    /// See [`VerifyingKey::from_bytes`] for details.
    -111    pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError> {
    -112        let key = VerifyingKey::from_bytes(bytes)?;
    -113        let y = CompressedEdwardsY(key.to_bytes());
    -114        Ok(Self(y))
    -115    }
    -116
    -117    /// Verify a signature on a message with this secret key's public key.
    -118    ///
    -119    /// # Return
    -120    ///
    -121    /// Returns `Ok(())` if the signature is valid, and `Err` otherwise.
    -122    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), SignatureError> {
    -123        self.public().verify_strict(message, signature)
    +8    ops::Deref,
    +9    str::FromStr,
    +10};
    +11
    +12use curve25519_dalek::edwards::CompressedEdwardsY;
    +13pub use ed25519_dalek::{Signature, SignatureError};
    +14use ed25519_dalek::{SigningKey, VerifyingKey};
    +15use nested_enum_utils::common_fields;
    +16use rand_core::CryptoRng;
    +17use serde::{Deserialize, Serialize};
    +18use snafu::{Backtrace, Snafu};
    +19
    +20/// A public key.
    +21///
    +22/// The key itself is stored as the `CompressedEdwards` y coordinate of the public key
    +23/// It is verified to decompress into a valid key when created.
    +24#[derive(Clone, Copy, PartialEq, Eq)]
    +25#[repr(transparent)]
    +26pub struct PublicKey(CompressedEdwardsY);
    +27
    +28impl Borrow<[u8; 32]> for PublicKey {
    +29    fn borrow(&self) -> &[u8; 32] {
    +30        self.as_bytes()
    +31    }
    +32}
    +33
    +34impl Deref for PublicKey {
    +35    type Target = [u8; 32];
    +36
    +37    fn deref(&self) -> &Self::Target {
    +38        self.as_bytes()
    +39    }
    +40}
    +41
    +42impl PartialOrd for PublicKey {
    +43    fn partial_cmp(&self, other: &Self) -> Option<std::cmp::Ordering> {
    +44        Some(self.cmp(other))
    +45    }
    +46}
    +47
    +48impl Ord for PublicKey {
    +49    fn cmp(&self, other: &Self) -> std::cmp::Ordering {
    +50        self.0.as_bytes().cmp(other.0.as_bytes())
    +51    }
    +52}
    +53
    +54/// The identifier for a node in the (iroh) network.
    +55///
    +56/// Each node in iroh has a unique identifier created as a cryptographic key.  This can be
    +57/// used to globally identify a node.  Since it is also a cryptographic key it is also the
    +58/// mechanism by which all traffic is always encrypted for a specific node only.
    +59///
    +60/// This is equivalent to [`PublicKey`].  By convention we will (or should) use `PublicKey`
    +61/// as type name when performing cryptographic operations, but use `NodeId` when referencing
    +62/// a node.  E.g.:
    +63///
    +64/// - `encrypt(key: PublicKey)`
    +65/// - `send_to(node: NodeId)`
    +66pub type NodeId = PublicKey;
    +67
    +68impl Hash for PublicKey {
    +69    fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
    +70        self.0.hash(state);
    +71    }
    +72}
    +73
    +74impl Serialize for PublicKey {
    +75    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    +76    where
    +77        S: serde::Serializer,
    +78    {
    +79        if serializer.is_human_readable() {
    +80            serializer.serialize_str(&self.to_string())
    +81        } else {
    +82            self.0.as_bytes().serialize(serializer)
    +83        }
    +84    }
    +85}
    +86
    +87impl<'de> Deserialize<'de> for PublicKey {
    +88    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    +89    where
    +90        D: serde::Deserializer<'de>,
    +91    {
    +92        if deserializer.is_human_readable() {
    +93            let s = String::deserialize(deserializer)?;
    +94            Self::from_str(&s).map_err(serde::de::Error::custom)
    +95        } else {
    +96            let data: [u8; 32] = serde::Deserialize::deserialize(deserializer)?;
    +97            Self::try_from(data.as_ref()).map_err(serde::de::Error::custom)
    +98        }
    +99    }
    +100}
    +101
    +102impl PublicKey {
    +103    /// Get this public key as a byte array.
    +104    pub fn as_bytes(&self) -> &[u8; 32] {
    +105        self.0.as_bytes()
    +106    }
    +107
    +108    /// Returns the [`VerifyingKey`] for this `PublicKey`.
    +109    pub fn public(&self) -> VerifyingKey {
    +110        VerifyingKey::from_bytes(self.0.as_bytes()).expect("already verified")
    +111    }
    +112
    +113    /// Construct a `PublicKey` from a slice of bytes.
    +114    ///
    +115    /// # Warning
    +116    ///
    +117    /// This will return a [`SignatureError`] if the bytes passed into this method do not represent
    +118    /// a valid `ed25519_dalek` curve point. Will never fail for bytes return from [`Self::as_bytes`].
    +119    /// See [`VerifyingKey::from_bytes`] for details.
    +120    pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError> {
    +121        let key = VerifyingKey::from_bytes(bytes)?;
    +122        let y = CompressedEdwardsY(key.to_bytes());
    +123        Ok(Self(y))
     124    }
     125
    -126    /// Convert to a hex string limited to the first 5 bytes for a friendly string
    -127    /// representation of the key.
    -128    pub fn fmt_short(&self) -> String {
    -129        data_encoding::HEXLOWER.encode(&self.as_bytes()[..5])
    -130    }
    -131
    -132    /// The length of an ed25519 `PublicKey`, in bytes.
    -133    pub const LENGTH: usize = ed25519_dalek::PUBLIC_KEY_LENGTH;
    -134}
    -135
    -136impl TryFrom<&[u8]> for PublicKey {
    -137    type Error = SignatureError;
    -138
    -139    #[inline]
    -140    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error> {
    -141        let vk = VerifyingKey::try_from(bytes)?;
    -142        Ok(Self(CompressedEdwardsY(vk.to_bytes())))
    +126    /// Verify a signature on a message with this secret key's public key.
    +127    ///
    +128    /// # Return
    +129    ///
    +130    /// Returns `Ok(())` if the signature is valid, and `Err` otherwise.
    +131    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), SignatureError> {
    +132        self.public().verify_strict(message, signature)
    +133    }
    +134
    +135    /// Convert to a hex string limited to the first 5 bytes for a friendly string
    +136    /// representation of the key.
    +137    pub fn fmt_short(&self) -> impl Display + 'static {
    +138        PublicKeyShort(
    +139            self.0.as_bytes()[0..5]
    +140                .try_into()
    +141                .expect("slice with incorrect length"),
    +142        )
     143    }
    -144}
    -145
    -146impl TryFrom<&[u8; 32]> for PublicKey {
    -147    type Error = SignatureError;
    +144
    +145    /// The length of an ed25519 `PublicKey`, in bytes.
    +146    pub const LENGTH: usize = ed25519_dalek::PUBLIC_KEY_LENGTH;
    +147}
     148
    -149    #[inline]
    -150    fn try_from(bytes: &[u8; 32]) -> Result<Self, Self::Error> {
    -151        Self::from_bytes(bytes)
    -152    }
    -153}
    -154
    -155impl AsRef<[u8]> for PublicKey {
    -156    fn as_ref(&self) -> &[u8] {
    -157        self.as_bytes()
    -158    }
    -159}
    -160
    -161impl From<VerifyingKey> for PublicKey {
    -162    fn from(verifying_key: VerifyingKey) -> Self {
    -163        let key = verifying_key.to_bytes();
    -164        PublicKey(CompressedEdwardsY(key))
    -165    }
    -166}
    -167
    -168impl Debug for PublicKey {
    -169    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    -170        write!(
    -171            f,
    -172            "PublicKey({})",
    -173            data_encoding::HEXLOWER.encode(self.as_bytes())
    -174        )
    -175    }
    -176}
    -177
    -178impl Display for PublicKey {
    -179    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    -180        write!(f, "{}", data_encoding::HEXLOWER.encode(self.as_bytes()))
    -181    }
    -182}
    -183
    -184/// Error when deserialising a [`PublicKey`] or a [`SecretKey`].
    -185#[common_fields({
    -186    backtrace: Option<Backtrace>,
    -187    #[snafu(implicit)]
    -188    span_trace: n0_snafu::SpanTrace,
    -189})]
    -190#[derive(Snafu, Debug)]
    -191#[allow(missing_docs)]
    -192#[snafu(visibility(pub(crate)))]
    -193pub enum KeyParsingError {
    -194    /// Error when decoding.
    -195    #[snafu(transparent)]
    -196    Decode { source: data_encoding::DecodeError },
    -197    /// Error when decoding the public key.
    -198    #[snafu(transparent)]
    -199    Key {
    -200        source: ed25519_dalek::SignatureError,
    -201    },
    -202    /// The encoded information had the wrong length.
    -203    #[snafu(display("invalid length"))]
    -204    DecodeInvalidLength {},
    -205}
    -206
    -207/// Deserialises the [`PublicKey`] from it's base32 encoding.
    -208///
    -209/// [`Display`] is capable of serialising this format.
    -210impl FromStr for PublicKey {
    -211    type Err = KeyParsingError;
    -212
    -213    fn from_str(s: &str) -> Result<Self, Self::Err> {
    -214        let bytes = decode_base32_hex(s)?;
    -215
    -216        Ok(Self::from_bytes(&bytes)?)
    -217    }
    -218}
    -219
    -220/// A secret key.
    -221#[derive(Clone)]
    -222pub struct SecretKey {
    -223    secret: SigningKey,
    -224}
    -225
    -226impl Debug for SecretKey {
    -227    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    -228        write!(f, "SecretKey(..)")
    -229    }
    -230}
    -231
    -232impl FromStr for SecretKey {
    -233    type Err = KeyParsingError;
    -234
    -235    fn from_str(s: &str) -> Result<Self, Self::Err> {
    -236        let bytes = decode_base32_hex(s)?;
    -237        Ok(SecretKey::from(bytes))
    +149struct PublicKeyShort([u8; 5]);
    +150
    +151impl Display for PublicKeyShort {
    +152    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +153        data_encoding::HEXLOWER.encode_write(&self.0, f)
    +154    }
    +155}
    +156
    +157impl TryFrom<&[u8]> for PublicKey {
    +158    type Error = SignatureError;
    +159
    +160    #[inline]
    +161    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error> {
    +162        let vk = VerifyingKey::try_from(bytes)?;
    +163        Ok(Self(CompressedEdwardsY(vk.to_bytes())))
    +164    }
    +165}
    +166
    +167impl TryFrom<&[u8; 32]> for PublicKey {
    +168    type Error = SignatureError;
    +169
    +170    #[inline]
    +171    fn try_from(bytes: &[u8; 32]) -> Result<Self, Self::Error> {
    +172        Self::from_bytes(bytes)
    +173    }
    +174}
    +175
    +176impl AsRef<[u8]> for PublicKey {
    +177    fn as_ref(&self) -> &[u8] {
    +178        self.as_bytes()
    +179    }
    +180}
    +181
    +182impl From<VerifyingKey> for PublicKey {
    +183    fn from(verifying_key: VerifyingKey) -> Self {
    +184        let key = verifying_key.to_bytes();
    +185        PublicKey(CompressedEdwardsY(key))
    +186    }
    +187}
    +188
    +189impl Debug for PublicKey {
    +190    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +191        write!(
    +192            f,
    +193            "PublicKey({})",
    +194            data_encoding::HEXLOWER.encode(self.as_bytes())
    +195        )
    +196    }
    +197}
    +198
    +199impl Display for PublicKey {
    +200    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +201        write!(f, "{}", data_encoding::HEXLOWER.encode(self.as_bytes()))
    +202    }
    +203}
    +204
    +205/// Error when deserialising a [`PublicKey`] or a [`SecretKey`].
    +206#[common_fields({
    +207    backtrace: Option<Backtrace>,
    +208    #[snafu(implicit)]
    +209    span_trace: n0_snafu::SpanTrace,
    +210})]
    +211#[derive(Snafu, Debug)]
    +212#[allow(missing_docs)]
    +213#[snafu(visibility(pub(crate)))]
    +214pub enum KeyParsingError {
    +215    /// Error when decoding.
    +216    #[snafu(transparent)]
    +217    Decode { source: data_encoding::DecodeError },
    +218    /// Error when decoding the public key.
    +219    #[snafu(transparent)]
    +220    Key {
    +221        source: ed25519_dalek::SignatureError,
    +222    },
    +223    /// The encoded information had the wrong length.
    +224    #[snafu(display("invalid length"))]
    +225    DecodeInvalidLength {},
    +226}
    +227
    +228/// Deserialises the [`PublicKey`] from it's base32 encoding.
    +229///
    +230/// [`Display`] is capable of serialising this format.
    +231impl FromStr for PublicKey {
    +232    type Err = KeyParsingError;
    +233
    +234    fn from_str(s: &str) -> Result<Self, Self::Err> {
    +235        let bytes = decode_base32_hex(s)?;
    +236
    +237        Ok(Self::from_bytes(&bytes)?)
     238    }
     239}
     240
    -241impl Serialize for SecretKey {
    -242    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    -243    where
    -244        S: serde::Serializer,
    -245    {
    -246        self.secret.serialize(serializer)
    -247    }
    -248}
    -249
    -250impl<'de> Deserialize<'de> for SecretKey {
    -251    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    -252    where
    -253        D: serde::Deserializer<'de>,
    -254    {
    -255        let secret = SigningKey::deserialize(deserializer)?;
    -256        Ok(secret.into())
    -257    }
    -258}
    -259
    -260impl SecretKey {
    -261    /// The public key of this [`SecretKey`].
    -262    pub fn public(&self) -> PublicKey {
    -263        self.secret.verifying_key().into()
    -264    }
    -265
    -266    /// Generate a new [`SecretKey`] with a randomness generator.
    -267    ///
    -268    /// ```rust
    -269    /// // use the OsRng option for OS depedndent most secure RNG.
    -270    /// let mut rng = rand::rngs::OsRng;
    -271    /// let _key = iroh_base::SecretKey::generate(&mut rng);
    -272    /// ```
    -273    pub fn generate<R: CryptoRngCore>(mut csprng: R) -> Self {
    -274        let secret = SigningKey::generate(&mut csprng);
    -275
    -276        Self { secret }
    -277    }
    -278
    -279    /// Sign the given message and return a digital signature
    -280    pub fn sign(&self, msg: &[u8]) -> Signature {
    -281        use ed25519_dalek::Signer;
    -282
    -283        self.secret.sign(msg)
    -284    }
    -285
    -286    /// Convert this to the bytes representing the secret part.
    -287    /// The public part can always be recovered.
    -288    pub fn to_bytes(&self) -> [u8; 32] {
    -289        self.secret.to_bytes()
    -290    }
    -291
    -292    /// Create a secret key from its byte representation.
    -293    pub fn from_bytes(bytes: &[u8; 32]) -> Self {
    -294        let secret = SigningKey::from_bytes(bytes);
    -295        secret.into()
    -296    }
    -297
    -298    /// Returns the [`SigningKey`] for this `SecretKey`.
    -299    pub fn secret(&self) -> &SigningKey {
    -300        &self.secret
    -301    }
    -302}
    -303
    -304impl From<SigningKey> for SecretKey {
    -305    fn from(secret: SigningKey) -> Self {
    -306        SecretKey { secret }
    -307    }
    -308}
    -309
    -310impl From<[u8; 32]> for SecretKey {
    -311    fn from(value: [u8; 32]) -> Self {
    -312        Self::from_bytes(&value)
    -313    }
    -314}
    -315
    -316impl TryFrom<&[u8]> for SecretKey {
    -317    type Error = SignatureError;
    -318
    -319    #[inline]
    -320    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error> {
    -321        let secret = SigningKey::try_from(bytes)?;
    -322        Ok(secret.into())
    -323    }
    -324}
    -325
    -326fn decode_base32_hex(s: &str) -> Result<[u8; 32], KeyParsingError> {
    -327    let mut bytes = [0u8; 32];
    -328
    -329    let res = if s.len() == PublicKey::LENGTH * 2 {
    -330        // hex
    -331        data_encoding::HEXLOWER.decode_mut(s.as_bytes(), &mut bytes)
    -332    } else {
    -333        let input = s.to_ascii_uppercase();
    -334        let input = input.as_bytes();
    -335        if data_encoding::BASE32_NOPAD.decode_len(input.len())? != bytes.len() {
    -336            return Err(DecodeInvalidLengthSnafu.build());
    -337        }
    -338        data_encoding::BASE32_NOPAD.decode_mut(input, &mut bytes)
    -339    };
    -340    match res {
    -341        Ok(len) => {
    -342            if len != PublicKey::LENGTH {
    -343                return Err(DecodeInvalidLengthSnafu.build());
    -344            }
    -345        }
    -346        Err(partial) => return Err(partial.error.into()),
    -347    }
    -348    Ok(bytes)
    -349}
    -350
    -351#[cfg(test)]
    -352mod tests {
    -353    use data_encoding::HEXLOWER;
    -354
    -355    use super::*;
    -356
    -357    #[test]
    -358    fn test_public_key_postcard() {
    -359        let public_key =
    -360            PublicKey::from_str("ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6")
    -361                .unwrap();
    -362        let bytes = postcard::to_stdvec(&public_key).unwrap();
    -363        let expected = HEXLOWER
    -364            .decode(b"ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6")
    -365            .unwrap();
    -366        assert_eq!(bytes, expected);
    +241/// A secret key.
    +242#[derive(Clone)]
    +243pub struct SecretKey {
    +244    secret: SigningKey,
    +245}
    +246
    +247impl Debug for SecretKey {
    +248    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +249        write!(f, "SecretKey(..)")
    +250    }
    +251}
    +252
    +253impl FromStr for SecretKey {
    +254    type Err = KeyParsingError;
    +255
    +256    fn from_str(s: &str) -> Result<Self, Self::Err> {
    +257        let bytes = decode_base32_hex(s)?;
    +258        Ok(SecretKey::from(bytes))
    +259    }
    +260}
    +261
    +262impl Serialize for SecretKey {
    +263    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    +264    where
    +265        S: serde::Serializer,
    +266    {
    +267        self.secret.serialize(serializer)
    +268    }
    +269}
    +270
    +271impl<'de> Deserialize<'de> for SecretKey {
    +272    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    +273    where
    +274        D: serde::Deserializer<'de>,
    +275    {
    +276        let secret = SigningKey::deserialize(deserializer)?;
    +277        Ok(secret.into())
    +278    }
    +279}
    +280
    +281impl SecretKey {
    +282    /// The public key of this [`SecretKey`].
    +283    pub fn public(&self) -> PublicKey {
    +284        self.secret.verifying_key().into()
    +285    }
    +286
    +287    /// Generate a new [`SecretKey`] with a randomness generator.
    +288    ///
    +289    /// ```rust
    +290    /// // use the OsRng option for OS depedndent most secure RNG.
    +291    /// let _key = iroh_base::SecretKey::generate(&mut rand::rng());
    +292    /// ```
    +293    pub fn generate<R: CryptoRng + ?Sized>(csprng: &mut R) -> Self {
    +294        let secret = SigningKey::generate(csprng);
    +295
    +296        Self { secret }
    +297    }
    +298
    +299    /// Sign the given message and return a digital signature
    +300    pub fn sign(&self, msg: &[u8]) -> Signature {
    +301        use ed25519_dalek::Signer;
    +302
    +303        self.secret.sign(msg)
    +304    }
    +305
    +306    /// Convert this to the bytes representing the secret part.
    +307    /// The public part can always be recovered.
    +308    pub fn to_bytes(&self) -> [u8; 32] {
    +309        self.secret.to_bytes()
    +310    }
    +311
    +312    /// Create a secret key from its byte representation.
    +313    pub fn from_bytes(bytes: &[u8; 32]) -> Self {
    +314        let secret = SigningKey::from_bytes(bytes);
    +315        secret.into()
    +316    }
    +317
    +318    /// Returns the [`SigningKey`] for this `SecretKey`.
    +319    pub fn secret(&self) -> &SigningKey {
    +320        &self.secret
    +321    }
    +322}
    +323
    +324impl From<SigningKey> for SecretKey {
    +325    fn from(secret: SigningKey) -> Self {
    +326        SecretKey { secret }
    +327    }
    +328}
    +329
    +330impl From<[u8; 32]> for SecretKey {
    +331    fn from(value: [u8; 32]) -> Self {
    +332        Self::from_bytes(&value)
    +333    }
    +334}
    +335
    +336impl TryFrom<&[u8]> for SecretKey {
    +337    type Error = SignatureError;
    +338
    +339    #[inline]
    +340    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error> {
    +341        let secret = SigningKey::try_from(bytes)?;
    +342        Ok(secret.into())
    +343    }
    +344}
    +345
    +346fn decode_base32_hex(s: &str) -> Result<[u8; 32], KeyParsingError> {
    +347    let mut bytes = [0u8; 32];
    +348
    +349    let res = if s.len() == PublicKey::LENGTH * 2 {
    +350        // hex
    +351        data_encoding::HEXLOWER.decode_mut(s.as_bytes(), &mut bytes)
    +352    } else {
    +353        let input = s.to_ascii_uppercase();
    +354        let input = input.as_bytes();
    +355        if data_encoding::BASE32_NOPAD.decode_len(input.len())? != bytes.len() {
    +356            return Err(DecodeInvalidLengthSnafu.build());
    +357        }
    +358        data_encoding::BASE32_NOPAD.decode_mut(input, &mut bytes)
    +359    };
    +360    match res {
    +361        Ok(len) => {
    +362            if len != PublicKey::LENGTH {
    +363                return Err(DecodeInvalidLengthSnafu.build());
    +364            }
    +365        }
    +366        Err(partial) => return Err(partial.error.into()),
     367    }
    -368
    -369    #[test]
    -370    fn public_key_postcard() {
    -371        let key = PublicKey::from_bytes(&[0; 32]).unwrap();
    -372        let bytes = postcard::to_stdvec(&key).unwrap();
    -373        let key2: PublicKey = postcard::from_bytes(&bytes).unwrap();
    -374        assert_eq!(key, key2);
    -375    }
    -376
    -377    #[test]
    -378    fn public_key_json() {
    -379        let key = PublicKey::from_bytes(&[0; 32]).unwrap();
    -380        let bytes = serde_json::to_string(&key).unwrap();
    -381        let key2: PublicKey = serde_json::from_str(&bytes).unwrap();
    -382        assert_eq!(key, key2);
    -383    }
    -384
    -385    #[test]
    -386    fn test_from_str() {
    -387        let key = SecretKey::generate(&mut rand::thread_rng());
    -388        assert_eq!(
    -389            SecretKey::from_str(&HEXLOWER.encode(&key.to_bytes()))
    -390                .unwrap()
    -391                .to_bytes(),
    -392            key.to_bytes()
    -393        );
    -394
    -395        assert_eq!(
    -396            PublicKey::from_str(&key.public().to_string()).unwrap(),
    -397            key.public()
    -398        );
    -399    }
    -400
    -401    #[test]
    -402    fn test_regression_parse_node_id_panic() {
    -403        let not_a_node_id = "foobarbaz";
    -404        assert!(PublicKey::from_str(not_a_node_id).is_err());
    -405    }
    -406}
    \ No newline at end of file +368 Ok(bytes) +369} +370 +371#[cfg(test)] +372mod tests { +373 use data_encoding::HEXLOWER; +374 use rand::SeedableRng; +375 +376 use super::*; +377 +378 #[test] +379 fn test_public_key_postcard() { +380 let public_key = +381 PublicKey::from_str("ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6") +382 .unwrap(); +383 let bytes = postcard::to_stdvec(&public_key).unwrap(); +384 let expected = HEXLOWER +385 .decode(b"ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6") +386 .unwrap(); +387 assert_eq!(bytes, expected); +388 } +389 +390 #[test] +391 fn public_key_postcard() { +392 let key = PublicKey::from_bytes(&[0; 32]).unwrap(); +393 let bytes = postcard::to_stdvec(&key).unwrap(); +394 let key2: PublicKey = postcard::from_bytes(&bytes).unwrap(); +395 assert_eq!(key, key2); +396 } +397 +398 #[test] +399 fn public_key_json() { +400 let key = PublicKey::from_bytes(&[0; 32]).unwrap(); +401 let bytes = serde_json::to_string(&key).unwrap(); +402 let key2: PublicKey = serde_json::from_str(&bytes).unwrap(); +403 assert_eq!(key, key2); +404 } +405 +406 #[test] +407 fn test_from_str() { +408 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +409 let key = SecretKey::generate(&mut rng); +410 assert_eq!( +411 SecretKey::from_str(&HEXLOWER.encode(&key.to_bytes())) +412 .unwrap() +413 .to_bytes(), +414 key.to_bytes() +415 ); +416 +417 assert_eq!( +418 PublicKey::from_str(&key.public().to_string()).unwrap(), +419 key.public() +420 ); +421 } +422 +423 #[test] +424 fn test_regression_parse_node_id_panic() { +425 let not_a_node_id = "foobarbaz"; +426 assert!(PublicKey::from_str(not_a_node_id).is_err()); +427 } +428}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_base/lib.rs.html b/pr/3367/docs/src/iroh_base/lib.rs.html index 7b30e00b21..beae35b5af 100644 --- a/pr/3367/docs/src/iroh_base/lib.rs.html +++ b/pr/3367/docs/src/iroh_base/lib.rs.html @@ -1,5 +1,5 @@ -lib.rs - source

    iroh_base/
    lib.rs

    1//! Base types and utilities for Iroh
    -2#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))]
    +lib.rs - source

    iroh_base/
    lib.rs

    1//! Base types and utilities for Iroh
    +2#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
     3#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
     4#![cfg_attr(not(test), deny(clippy::unwrap_used))]
     5
    diff --git a/pr/3367/docs/src/iroh_base/node_addr.rs.html b/pr/3367/docs/src/iroh_base/node_addr.rs.html
    index dfc5c9c130..8a7ebc479f 100644
    --- a/pr/3367/docs/src/iroh_base/node_addr.rs.html
    +++ b/pr/3367/docs/src/iroh_base/node_addr.rs.html
    @@ -1,4 +1,4 @@
    -node_addr.rs - source

    iroh_base/
    node_addr.rs

    1//! Addressing for iroh nodes.
    +node_addr.rs - source

    iroh_base/
    node_addr.rs

    1//! Addressing for iroh nodes.
     2//!
     3//! This module contains some common addressing types for iroh.  A node is uniquely
     4//! identified by the [`NodeId`] but that does not make it addressable on the network layer.
    @@ -36,7 +36,7 @@
     36/// [discovery]: https://docs.rs/iroh/*/iroh/index.html#node-discovery
     37/// [home relay]: https://docs.rs/iroh/*/iroh/relay/index.html
     38/// [Relay server]: https://docs.rs/iroh/*/iroh/index.html#relay-servers
    -39#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
    +39#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
     40pub struct NodeAddr {
     41    /// The node's identifier.
     42    pub node_id: NodeId,
    diff --git a/pr/3367/docs/src/iroh_base/relay_url.rs.html b/pr/3367/docs/src/iroh_base/relay_url.rs.html
    index 4b345dcb19..493fd82f45 100644
    --- a/pr/3367/docs/src/iroh_base/relay_url.rs.html
    +++ b/pr/3367/docs/src/iroh_base/relay_url.rs.html
    @@ -1,4 +1,4 @@
    -relay_url.rs - source

    iroh_base/
    relay_url.rs

    1use std::{fmt, ops::Deref, str::FromStr, sync::Arc};
    +relay_url.rs - source

    iroh_base/
    relay_url.rs

    1use std::{fmt, ops::Deref, str::FromStr, sync::Arc};
     2
     3use serde::{Deserialize, Serialize};
     4use snafu::{Backtrace, ResultExt, Snafu};
    diff --git a/pr/3367/docs/src/iroh_base/ticket.rs.html b/pr/3367/docs/src/iroh_base/ticket.rs.html
    index d1a8a24823..de6c9cdec3 100644
    --- a/pr/3367/docs/src/iroh_base/ticket.rs.html
    +++ b/pr/3367/docs/src/iroh_base/ticket.rs.html
    @@ -1,4 +1,4 @@
    -ticket.rs - source

    iroh_base/
    ticket.rs

    1//! Tickets is a serializable object combining information required for an operation.
    +ticket.rs - source

    iroh_base/
    ticket.rs

    1//! Tickets is a serializable object combining information required for an operation.
     2//! Typically tickets contain all information required for an operation, e.g. an iroh blob
     3//! ticket would contain the hash of the data as well as information about how to reach the
     4//! provider.
    diff --git a/pr/3367/docs/src/iroh_base/ticket/node.rs.html b/pr/3367/docs/src/iroh_base/ticket/node.rs.html
    index 95a0aa35b5..5f2051bca2 100644
    --- a/pr/3367/docs/src/iroh_base/ticket/node.rs.html
    +++ b/pr/3367/docs/src/iroh_base/ticket/node.rs.html
    @@ -1,4 +1,4 @@
    -node.rs - source

    iroh_base/ticket/
    node.rs

    1//! Tickets for nodes.
    +node.rs - source

    iroh_base/ticket/
    node.rs

    1//! Tickets for nodes.
     2
     3use std::str::FromStr;
     4
    @@ -27,185 +27,188 @@
     27/// [`NodeId`]: crate::key::NodeId
     28/// [`Display`]: std::fmt::Display
     29/// [`FromStr`]: std::str::FromStr
    -30#[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)]
    -31#[display("{}", Ticket::serialize(self))]
    -32pub struct NodeTicket {
    -33    node: NodeAddr,
    -34}
    -35
    -36/// Wire format for [`NodeTicket`].
    -37#[derive(Serialize, Deserialize)]
    -38enum TicketWireFormat {
    -39    Variant0(Variant0NodeTicket),
    -40}
    -41
    -42// Legacy
    -43#[derive(Serialize, Deserialize)]
    -44struct Variant0NodeTicket {
    -45    node: Variant0NodeAddr,
    -46}
    -47
    -48impl Ticket for NodeTicket {
    -49    const KIND: &'static str = "node";
    -50
    -51    fn to_bytes(&self) -> Vec<u8> {
    -52        let data = TicketWireFormat::Variant0(Variant0NodeTicket {
    -53            node: Variant0NodeAddr {
    -54                node_id: self.node.node_id,
    -55                info: Variant0AddrInfo {
    -56                    relay_url: self.node.relay_url.clone(),
    -57                    direct_addresses: self.node.direct_addresses.clone(),
    -58                },
    -59            },
    -60        });
    -61        postcard::to_stdvec(&data).expect("postcard serialization failed")
    -62    }
    -63
    -64    fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError> {
    -65        let res: TicketWireFormat = postcard::from_bytes(bytes)?;
    -66        let TicketWireFormat::Variant0(Variant0NodeTicket { node }) = res;
    -67        Ok(Self {
    -68            node: NodeAddr {
    -69                node_id: node.node_id,
    -70                relay_url: node.info.relay_url,
    -71                direct_addresses: node.info.direct_addresses,
    -72            },
    -73        })
    -74    }
    -75}
    -76
    -77impl FromStr for NodeTicket {
    -78    type Err = ParseError;
    -79
    -80    fn from_str(s: &str) -> Result<Self, Self::Err> {
    -81        ticket::Ticket::deserialize(s)
    -82    }
    -83}
    -84
    -85impl NodeTicket {
    -86    /// Creates a new ticket.
    -87    pub fn new(node: NodeAddr) -> Self {
    -88        Self { node }
    -89    }
    -90
    -91    /// The [`NodeAddr`] of the provider for this ticket.
    -92    pub fn node_addr(&self) -> &NodeAddr {
    -93        &self.node
    -94    }
    -95}
    -96
    -97impl From<NodeAddr> for NodeTicket {
    -98    /// Creates a ticket from given addressing info.
    -99    fn from(addr: NodeAddr) -> Self {
    -100        Self { node: addr }
    -101    }
    -102}
    -103
    -104impl From<NodeTicket> for NodeAddr {
    -105    /// Returns the addressing info from given ticket.
    -106    fn from(ticket: NodeTicket) -> Self {
    -107        ticket.node
    -108    }
    -109}
    -110
    -111impl Serialize for NodeTicket {
    -112    fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> {
    -113        if serializer.is_human_readable() {
    -114            serializer.serialize_str(&self.to_string())
    -115        } else {
    -116            let NodeTicket { node } = self;
    -117            (node).serialize(serializer)
    -118        }
    -119    }
    -120}
    -121
    -122impl<'de> Deserialize<'de> for NodeTicket {
    -123    fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> {
    -124        if deserializer.is_human_readable() {
    -125            let s = String::deserialize(deserializer)?;
    -126            Self::from_str(&s).map_err(serde::de::Error::custom)
    -127        } else {
    -128            let peer = Deserialize::deserialize(deserializer)?;
    -129            Ok(Self::new(peer))
    -130        }
    -131    }
    -132}
    -133
    -134#[cfg(test)]
    -135mod tests {
    -136    use std::net::{Ipv4Addr, SocketAddr};
    -137
    -138    use data_encoding::HEXLOWER;
    -139
    -140    use super::*;
    -141    use crate::key::{PublicKey, SecretKey};
    -142
    -143    fn make_ticket() -> NodeTicket {
    -144        let peer = SecretKey::generate(&mut rand::thread_rng()).public();
    -145        let addr = SocketAddr::from((Ipv4Addr::LOCALHOST, 1234));
    -146        let relay_url = None;
    -147        NodeTicket {
    -148            node: NodeAddr::from_parts(peer, relay_url, [addr]),
    -149        }
    -150    }
    -151
    -152    #[test]
    -153    fn test_ticket_postcard() {
    -154        let ticket = make_ticket();
    -155        let bytes = postcard::to_stdvec(&ticket).unwrap();
    -156        let ticket2: NodeTicket = postcard::from_bytes(&bytes).unwrap();
    -157        assert_eq!(ticket2, ticket);
    -158    }
    -159
    -160    #[test]
    -161    fn test_ticket_json() {
    -162        let ticket = make_ticket();
    -163        let json = serde_json::to_string(&ticket).unwrap();
    -164        let ticket2: NodeTicket = serde_json::from_str(&json).unwrap();
    -165        assert_eq!(ticket2, ticket);
    -166    }
    -167
    -168    #[test]
    -169    fn test_ticket_base32() {
    -170        let node_id =
    -171            PublicKey::from_str("ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6")
    -172                .unwrap();
    -173
    -174        let ticket = NodeTicket {
    -175            node: NodeAddr::from_parts(
    -176                node_id,
    -177                Some("http://derp.me./".parse().unwrap()),
    -178                ["127.0.0.1:1024".parse().unwrap()],
    -179            ),
    -180        };
    -181        let base32 = data_encoding::BASE32_NOPAD
    -182            .decode(
    -183                ticket
    -184                    .to_string()
    -185                    .strip_prefix("node")
    -186                    .unwrap()
    -187                    .to_ascii_uppercase()
    -188                    .as_bytes(),
    -189            )
    -190            .unwrap();
    -191        let expected = [
    -192            // variant
    -193            "00",
    -194            // node id, 32 bytes, see above
    -195            "ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6",
    -196            // relay url present
    -197            "01",
    -198            // relay url, 16 bytes, see above
    -199            "10",
    -200            "687474703a2f2f646572702e6d652e2f",
    -201            // one direct address
    -202            "01",
    -203            // ipv4
    -204            "00",
    -205            // address, see above
    -206            "7f0000018008",
    -207        ];
    -208        let expected = HEXLOWER.decode(expected.concat().as_bytes()).unwrap();
    -209        assert_eq!(base32, expected);
    -210    }
    -211}
    \ No newline at end of file +30/// ['RelayUrl`]: crate::relay_url::RelayUrl +31
    #[derive(Debug, Clone, PartialEq, Eq, derive_more::Display)] +32#[display("{}", Ticket::serialize(self))] +33pub struct NodeTicket { +34 node: NodeAddr, +35} +36 +37/// Wire format for [`NodeTicket`]. +38#[derive(Serialize, Deserialize)] +39enum TicketWireFormat { +40 Variant0(Variant0NodeTicket), +41} +42 +43// Legacy +44#[derive(Serialize, Deserialize)] +45struct Variant0NodeTicket { +46 node: Variant0NodeAddr, +47} +48 +49impl Ticket for NodeTicket { +50 const KIND: &'static str = "node"; +51 +52 fn to_bytes(&self) -> Vec<u8> { +53 let data = TicketWireFormat::Variant0(Variant0NodeTicket { +54 node: Variant0NodeAddr { +55 node_id: self.node.node_id, +56 info: Variant0AddrInfo { +57 relay_url: self.node.relay_url.clone(), +58 direct_addresses: self.node.direct_addresses.clone(), +59 }, +60 }, +61 }); +62 postcard::to_stdvec(&data).expect("postcard serialization failed") +63 } +64 +65 fn from_bytes(bytes: &[u8]) -> Result<Self, ParseError> { +66 let res: TicketWireFormat = postcard::from_bytes(bytes)?; +67 let TicketWireFormat::Variant0(Variant0NodeTicket { node }) = res; +68 Ok(Self { +69 node: NodeAddr { +70 node_id: node.node_id, +71 relay_url: node.info.relay_url, +72 direct_addresses: node.info.direct_addresses, +73 }, +74 }) +75 } +76} +77 +78impl FromStr for NodeTicket { +79 type Err = ParseError; +80 +81 fn from_str(s: &str) -> Result<Self, Self::Err> { +82 ticket::Ticket::deserialize(s) +83 } +84} +85 +86impl NodeTicket { +87 /// Creates a new ticket. +88 pub fn new(node: NodeAddr) -> Self { +89 Self { node } +90 } +91 +92 /// The [`NodeAddr`] of the provider for this ticket. +93 pub fn node_addr(&self) -> &NodeAddr { +94 &self.node +95 } +96} +97 +98impl From<NodeAddr> for NodeTicket { +99 /// Creates a ticket from given addressing info. +100 fn from(addr: NodeAddr) -> Self { +101 Self { node: addr } +102 } +103} +104 +105impl From<NodeTicket> for NodeAddr { +106 /// Returns the addressing info from given ticket. +107 fn from(ticket: NodeTicket) -> Self { +108 ticket.node +109 } +110} +111 +112impl Serialize for NodeTicket { +113 fn serialize<S: serde::Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error> { +114 if serializer.is_human_readable() { +115 serializer.serialize_str(&self.to_string()) +116 } else { +117 let NodeTicket { node } = self; +118 (node).serialize(serializer) +119 } +120 } +121} +122 +123impl<'de> Deserialize<'de> for NodeTicket { +124 fn deserialize<D: serde::Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error> { +125 if deserializer.is_human_readable() { +126 let s = String::deserialize(deserializer)?; +127 Self::from_str(&s).map_err(serde::de::Error::custom) +128 } else { +129 let peer = Deserialize::deserialize(deserializer)?; +130 Ok(Self::new(peer)) +131 } +132 } +133} +134 +135#[cfg(test)] +136mod tests { +137 use std::net::{Ipv4Addr, SocketAddr}; +138 +139 use data_encoding::HEXLOWER; +140 use rand::SeedableRng; +141 +142 use super::*; +143 use crate::key::{PublicKey, SecretKey}; +144 +145 fn make_ticket() -> NodeTicket { +146 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +147 let peer = SecretKey::generate(&mut rng).public(); +148 let addr = SocketAddr::from((Ipv4Addr::LOCALHOST, 1234)); +149 let relay_url = None; +150 NodeTicket { +151 node: NodeAddr::from_parts(peer, relay_url, [addr]), +152 } +153 } +154 +155 #[test] +156 fn test_ticket_postcard() { +157 let ticket = make_ticket(); +158 let bytes = postcard::to_stdvec(&ticket).unwrap(); +159 let ticket2: NodeTicket = postcard::from_bytes(&bytes).unwrap(); +160 assert_eq!(ticket2, ticket); +161 } +162 +163 #[test] +164 fn test_ticket_json() { +165 let ticket = make_ticket(); +166 let json = serde_json::to_string(&ticket).unwrap(); +167 let ticket2: NodeTicket = serde_json::from_str(&json).unwrap(); +168 assert_eq!(ticket2, ticket); +169 } +170 +171 #[test] +172 fn test_ticket_base32() { +173 let node_id = +174 PublicKey::from_str("ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6") +175 .unwrap(); +176 +177 let ticket = NodeTicket { +178 node: NodeAddr::from_parts( +179 node_id, +180 Some("http://derp.me./".parse().unwrap()), +181 ["127.0.0.1:1024".parse().unwrap()], +182 ), +183 }; +184 let base32 = data_encoding::BASE32_NOPAD +185 .decode( +186 ticket +187 .to_string() +188 .strip_prefix("node") +189 .unwrap() +190 .to_ascii_uppercase() +191 .as_bytes(), +192 ) +193 .unwrap(); +194 let expected = [ +195 // variant +196 "00", +197 // node id, 32 bytes, see above +198 "ae58ff8833241ac82d6ff7611046ed67b5072d142c588d0063e942d9a75502b6", +199 // relay url present +200 "01", +201 // relay url, 16 bytes, see above +202 "10", +203 "687474703a2f2f646572702e6d652e2f", +204 // one direct address +205 "01", +206 // ipv4 +207 "00", +208 // address, see above +209 "7f0000018008", +210 ]; +211 let expected = HEXLOWER.decode(expected.concat().as_bytes()).unwrap(); +212 assert_eq!(base32, expected); +213 } +214}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_bench/iroh.rs.html b/pr/3367/docs/src/iroh_bench/iroh.rs.html index 51fff78d49..8c7c73a885 100644 --- a/pr/3367/docs/src/iroh_bench/iroh.rs.html +++ b/pr/3367/docs/src/iroh_bench/iroh.rs.html @@ -1,172 +1,172 @@ -iroh.rs - source

    iroh_bench/
    iroh.rs

    1use std::{
    +iroh.rs - source

    iroh_bench/
    iroh.rs

    1use std::{
     2    net::SocketAddr,
     3    time::{Duration, Instant},
     4};
     5
     6use bytes::Bytes;
     7use iroh::{
    -8    endpoint::{Connection, ConnectionError, RecvStream, SendStream, TransportConfig},
    -9    Endpoint, NodeAddr, RelayMode, RelayUrl,
    +8    Endpoint, NodeAddr, RelayMode, RelayUrl,
    +9    endpoint::{Connection, ConnectionError, RecvStream, SendStream, TransportConfig},
     10};
     11use n0_snafu::{Result, ResultExt};
    -12use n0_watcher::Watcher as _;
    -13use tracing::{trace, warn};
    -14
    -15use crate::{
    -16    client_handler, stats::TransferResult, ClientStats, ConnectionSelector, EndpointSelector, Opt,
    -17};
    -18
    -19pub const ALPN: &[u8] = b"n0/iroh-bench/0";
    -20
    -21/// Creates a server endpoint which runs on the given runtime
    -22pub fn server_endpoint(
    -23    rt: &tokio::runtime::Runtime,
    -24    relay_url: &Option<RelayUrl>,
    -25    opt: &Opt,
    -26) -> (NodeAddr, Endpoint) {
    -27    let _guard = rt.enter();
    -28    rt.block_on(async move {
    -29        let relay_mode = relay_url
    -30            .clone()
    -31            .map_or(RelayMode::Disabled, |url| RelayMode::Custom(url.into()));
    -32
    -33        #[allow(unused_mut)]
    -34        let mut builder = Endpoint::builder();
    -35        #[cfg(feature = "local-relay")]
    -36        {
    -37            builder = builder.insecure_skip_relay_cert_verify(relay_url.is_some());
    -38            let path_selection = match opt.only_relay {
    -39                true => iroh::endpoint::PathSelection::RelayOnly,
    -40                false => iroh::endpoint::PathSelection::default(),
    -41            };
    -42            builder = builder.path_selection(path_selection);
    -43        }
    -44        let ep = builder
    -45            .alpns(vec![ALPN.to_vec()])
    -46            .relay_mode(relay_mode)
    -47            .transport_config(transport_config(opt.max_streams, opt.initial_mtu))
    -48            .bind()
    -49            .await
    -50            .unwrap();
    -51
    -52        if relay_url.is_some() {
    -53            ep.home_relay().initialized().await.unwrap();
    -54        }
    -55
    -56        let addr = ep.bound_sockets();
    -57        let addr = SocketAddr::new("127.0.0.1".parse().unwrap(), addr[0].port());
    -58        let mut addr = NodeAddr::new(ep.node_id()).with_direct_addresses([addr]);
    -59        if let Some(relay_url) = relay_url {
    -60            addr = addr.with_relay_url(relay_url.clone());
    -61        }
    -62        (addr, ep)
    -63    })
    -64}
    -65
    -66/// Create and run a client
    -67pub async fn client(
    -68    server_addr: NodeAddr,
    -69    relay_url: Option<RelayUrl>,
    -70    opt: Opt,
    -71) -> Result<ClientStats> {
    -72    let client_start = std::time::Instant::now();
    -73    let (endpoint, connection) = connect_client(server_addr, relay_url, opt).await?;
    -74    let client_connect_time = client_start.elapsed();
    -75    let mut res = client_handler(
    -76        EndpointSelector::Iroh(endpoint),
    -77        ConnectionSelector::Iroh(connection),
    -78        opt,
    -79    )
    -80    .await?;
    -81    res.connect_time = client_connect_time;
    -82    Ok(res)
    -83}
    -84
    -85/// Create a client endpoint and client connection
    -86pub async fn connect_client(
    -87    server_addr: NodeAddr,
    -88    relay_url: Option<RelayUrl>,
    -89    opt: Opt,
    -90) -> Result<(Endpoint, Connection)> {
    -91    let relay_mode = relay_url
    -92        .clone()
    -93        .map_or(RelayMode::Disabled, |url| RelayMode::Custom(url.into()));
    -94    #[allow(unused_mut)]
    -95    let mut builder = Endpoint::builder();
    -96    #[cfg(feature = "local-relay")]
    -97    {
    -98        builder = builder.insecure_skip_relay_cert_verify(relay_url.is_some());
    -99        let path_selection = match opt.only_relay {
    -100            true => iroh::endpoint::PathSelection::RelayOnly,
    -101            false => iroh::endpoint::PathSelection::default(),
    -102        };
    -103        builder = builder.path_selection(path_selection);
    -104    }
    -105    let endpoint = builder
    -106        .alpns(vec![ALPN.to_vec()])
    -107        .relay_mode(relay_mode)
    -108        .transport_config(transport_config(opt.max_streams, opt.initial_mtu))
    -109        .bind()
    -110        .await
    -111        .unwrap();
    -112
    -113    if relay_url.is_some() {
    -114        endpoint.home_relay().initialized().await?;
    -115    }
    -116
    -117    // TODO: We don't support passing client transport config currently
    -118    // let mut client_config = quinn::ClientConfig::new(Arc::new(crypto));
    -119    // client_config.transport_config(Arc::new(transport_config(&opt)));
    -120
    -121    let connection = endpoint
    -122        .connect(server_addr, ALPN)
    -123        .await
    -124        .context("unable to connect")?;
    -125    trace!("connected");
    -126
    -127    Ok((endpoint, connection))
    -128}
    -129
    -130pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig {
    -131    // High stream windows are chosen because the amount of concurrent streams
    -132    // is configurable as a parameter.
    -133    let mut config = TransportConfig::default();
    -134    config.max_concurrent_uni_streams(max_streams.try_into().unwrap());
    -135    config.initial_mtu(initial_mtu);
    -136
    -137    // TODO: re-enable when we upgrade quinn version
    -138    // let mut acks = quinn::AckFrequencyConfig::default();
    -139    // acks.ack_eliciting_threshold(10u32.into());
    -140    // config.ack_frequency_config(Some(acks));
    -141
    -142    config
    -143}
    -144
    -145async fn drain_stream(
    -146    stream: &mut RecvStream,
    -147    read_unordered: bool,
    -148) -> Result<(usize, Duration, u64)> {
    -149    let mut read = 0;
    -150
    -151    let download_start = Instant::now();
    -152    let mut first_byte = true;
    -153    let mut ttfb = download_start.elapsed();
    -154
    -155    let mut num_chunks: u64 = 0;
    -156
    -157    if read_unordered {
    -158        while let Some(chunk) = stream.read_chunk(usize::MAX, false).await.e()? {
    -159            if first_byte {
    -160                ttfb = download_start.elapsed();
    -161                first_byte = false;
    -162            }
    -163            read += chunk.bytes.len();
    -164            num_chunks += 1;
    -165        }
    -166    } else {
    -167        // These are 32 buffers, for reading approximately 32kB at once
    -168        #[rustfmt::skip]
    -169        let mut bufs = [
    +12use tracing::{trace, warn};
    +13
    +14use crate::{
    +15    ClientStats, ConnectionSelector, EndpointSelector, Opt, client_handler, stats::TransferResult,
    +16};
    +17
    +18pub const ALPN: &[u8] = b"n0/iroh-bench/0";
    +19
    +20/// Creates a server endpoint which runs on the given runtime
    +21pub fn server_endpoint(
    +22    rt: &tokio::runtime::Runtime,
    +23    relay_url: &Option<RelayUrl>,
    +24    opt: &Opt,
    +25) -> (NodeAddr, Endpoint) {
    +26    let _guard = rt.enter();
    +27    rt.block_on(async move {
    +28        let relay_mode = relay_url
    +29            .clone()
    +30            .map_or(RelayMode::Disabled, |url| RelayMode::Custom(url.into()));
    +31
    +32        #[allow(unused_mut)]
    +33        let mut builder = Endpoint::builder();
    +34        #[cfg(feature = "local-relay")]
    +35        {
    +36            builder = builder.insecure_skip_relay_cert_verify(relay_url.is_some());
    +37            let path_selection = match opt.only_relay {
    +38                true => iroh::endpoint::PathSelection::RelayOnly,
    +39                false => iroh::endpoint::PathSelection::default(),
    +40            };
    +41            builder = builder.path_selection(path_selection);
    +42        }
    +43        let ep = builder
    +44            .alpns(vec![ALPN.to_vec()])
    +45            .relay_mode(relay_mode)
    +46            .transport_config(transport_config(opt.max_streams, opt.initial_mtu))
    +47            .bind()
    +48            .await
    +49            .unwrap();
    +50
    +51        if relay_url.is_some() {
    +52            ep.online().await;
    +53        }
    +54
    +55        let addr = ep.bound_sockets();
    +56        let addr = SocketAddr::new("127.0.0.1".parse().unwrap(), addr[0].port());
    +57        let mut addr = NodeAddr::new(ep.node_id()).with_direct_addresses([addr]);
    +58        if let Some(relay_url) = relay_url {
    +59            addr = addr.with_relay_url(relay_url.clone());
    +60        }
    +61        (addr, ep)
    +62    })
    +63}
    +64
    +65/// Create and run a client
    +66pub async fn client(
    +67    server_addr: NodeAddr,
    +68    relay_url: Option<RelayUrl>,
    +69    opt: Opt,
    +70) -> Result<ClientStats> {
    +71    let client_start = std::time::Instant::now();
    +72    let (endpoint, connection) = connect_client(server_addr, relay_url, opt).await?;
    +73    let client_connect_time = client_start.elapsed();
    +74    let mut res = client_handler(
    +75        EndpointSelector::Iroh(endpoint),
    +76        ConnectionSelector::Iroh(connection),
    +77        opt,
    +78    )
    +79    .await?;
    +80    res.connect_time = client_connect_time;
    +81    Ok(res)
    +82}
    +83
    +84/// Create a client endpoint and client connection
    +85pub async fn connect_client(
    +86    server_addr: NodeAddr,
    +87    relay_url: Option<RelayUrl>,
    +88    opt: Opt,
    +89) -> Result<(Endpoint, Connection)> {
    +90    let relay_mode = relay_url
    +91        .clone()
    +92        .map_or(RelayMode::Disabled, |url| RelayMode::Custom(url.into()));
    +93    #[allow(unused_mut)]
    +94    let mut builder = Endpoint::builder();
    +95    #[cfg(feature = "local-relay")]
    +96    {
    +97        builder = builder.insecure_skip_relay_cert_verify(relay_url.is_some());
    +98        let path_selection = match opt.only_relay {
    +99            true => iroh::endpoint::PathSelection::RelayOnly,
    +100            false => iroh::endpoint::PathSelection::default(),
    +101        };
    +102        builder = builder.path_selection(path_selection);
    +103    }
    +104    let endpoint = builder
    +105        .alpns(vec![ALPN.to_vec()])
    +106        .relay_mode(relay_mode)
    +107        .transport_config(transport_config(opt.max_streams, opt.initial_mtu))
    +108        .bind()
    +109        .await
    +110        .unwrap();
    +111
    +112    if relay_url.is_some() {
    +113        endpoint.online().await;
    +114    }
    +115
    +116    // TODO: We don't support passing client transport config currently
    +117    // let mut client_config = quinn::ClientConfig::new(Arc::new(crypto));
    +118    // client_config.transport_config(Arc::new(transport_config(&opt)));
    +119
    +120    let connection = endpoint
    +121        .connect(server_addr, ALPN)
    +122        .await
    +123        .context("unable to connect")?;
    +124    trace!("connected");
    +125
    +126    Ok((endpoint, connection))
    +127}
    +128
    +129pub fn transport_config(max_streams: usize, initial_mtu: u16) -> TransportConfig {
    +130    // High stream windows are chosen because the amount of concurrent streams
    +131    // is configurable as a parameter.
    +132    let mut config = TransportConfig::default();
    +133    config.max_concurrent_uni_streams(max_streams.try_into().unwrap());
    +134    config.initial_mtu(initial_mtu);
    +135
    +136    // TODO: re-enable when we upgrade quinn version
    +137    // let mut acks = quinn::AckFrequencyConfig::default();
    +138    // acks.ack_eliciting_threshold(10u32.into());
    +139    // config.ack_frequency_config(Some(acks));
    +140
    +141    config
    +142}
    +143
    +144async fn drain_stream(
    +145    stream: &mut RecvStream,
    +146    read_unordered: bool,
    +147) -> Result<(usize, Duration, u64)> {
    +148    let mut read = 0;
    +149
    +150    let download_start = Instant::now();
    +151    let mut first_byte = true;
    +152    let mut ttfb = download_start.elapsed();
    +153
    +154    let mut num_chunks: u64 = 0;
    +155
    +156    if read_unordered {
    +157        while let Some(chunk) = stream.read_chunk(usize::MAX, false).await.e()? {
    +158            if first_byte {
    +159                ttfb = download_start.elapsed();
    +160                first_byte = false;
    +161            }
    +162            read += chunk.bytes.len();
    +163            num_chunks += 1;
    +164        }
    +165    } else {
    +166        // These are 32 buffers, for reading approximately 32kB at once
    +167        #[rustfmt::skip]
    +168        let mut bufs = [
    +169            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
     170            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
     171            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
     172            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
    @@ -174,125 +174,124 @@
     174            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
     175            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
     176            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
    -177            Bytes::new(), Bytes::new(), Bytes::new(), Bytes::new(),
    -178        ];
    -179
    -180        while let Some(n) = stream.read_chunks(&mut bufs[..]).await.e()? {
    -181            if first_byte {
    -182                ttfb = download_start.elapsed();
    -183                first_byte = false;
    -184            }
    -185            read += bufs.iter().take(n).map(|buf| buf.len()).sum::<usize>();
    -186            num_chunks += 1;
    -187        }
    -188    }
    -189
    -190    Ok((read, ttfb, num_chunks))
    -191}
    -192
    -193async fn send_data_on_stream(stream: &mut SendStream, stream_size: u64) -> Result<()> {
    -194    const DATA: &[u8] = &[0xAB; 1024 * 1024];
    -195    let bytes_data = Bytes::from_static(DATA);
    -196
    -197    let full_chunks = stream_size / (DATA.len() as u64);
    -198    let remaining = (stream_size % (DATA.len() as u64)) as usize;
    -199
    -200    for _ in 0..full_chunks {
    -201        stream
    -202            .write_chunk(bytes_data.clone())
    -203            .await
    -204            .context("failed sending data")?;
    -205    }
    -206
    -207    if remaining != 0 {
    -208        stream
    -209            .write_chunk(bytes_data.slice(0..remaining))
    -210            .await
    -211            .context("failed sending data")?;
    -212    }
    -213
    -214    stream.finish().context("failed finishing stream")?;
    -215    stream
    -216        .stopped()
    -217        .await
    -218        .context("failed to wait for stream to be stopped")?;
    -219
    -220    Ok(())
    -221}
    -222
    -223pub async fn handle_client_stream(
    -224    connection: &Connection,
    -225    upload_size: u64,
    -226    read_unordered: bool,
    -227) -> Result<(TransferResult, TransferResult)> {
    -228    let start = Instant::now();
    -229
    -230    let (mut send_stream, mut recv_stream) = connection
    -231        .open_bi()
    -232        .await
    -233        .context("failed to open stream")?;
    -234
    -235    send_data_on_stream(&mut send_stream, upload_size).await?;
    -236
    -237    let upload_result = TransferResult::new(start.elapsed(), upload_size, Duration::default(), 0);
    -238
    -239    let start = Instant::now();
    -240    let (size, ttfb, num_chunks) = drain_stream(&mut recv_stream, read_unordered).await?;
    -241    let download_result = TransferResult::new(start.elapsed(), size as u64, ttfb, num_chunks);
    -242
    -243    Ok((upload_result, download_result))
    -244}
    -245
    -246/// Take the provided endpoint and run the server
    -247pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()> {
    -248    let mut server_tasks = Vec::new();
    -249
    -250    // Handle only the expected amount of clients
    -251    for _ in 0..opt.clients {
    -252        let incoming = endpoint.accept().await.unwrap();
    -253        let connecting = match incoming.accept() {
    -254            Ok(connecting) => connecting,
    -255            Err(err) => {
    -256                warn!("incoming connection failed: {err:#}");
    -257                // we can carry on in these cases:
    -258                // this can be caused by retransmitted datagrams
    -259                continue;
    -260            }
    -261        };
    -262        let connection = connecting.await.context("handshake failed")?;
    -263
    -264        server_tasks.push(tokio::spawn(async move {
    -265            loop {
    -266                let (mut send_stream, mut recv_stream) = match connection.accept_bi().await {
    -267                    Err(ConnectionError::ApplicationClosed(_)) => break,
    -268                    Err(e) => {
    -269                        eprintln!("accepting stream failed: {e:?}");
    -270                        break;
    -271                    }
    -272                    Ok(stream) => stream,
    -273                };
    -274                trace!("stream established");
    -275
    -276                tokio::spawn(async move {
    -277                    drain_stream(&mut recv_stream, opt.read_unordered).await?;
    -278                    send_data_on_stream(&mut send_stream, opt.download_size).await?;
    -279                    Ok::<_, n0_snafu::Error>(())
    -280                });
    -281            }
    -282
    -283            if opt.stats {
    -284                println!("\nServer connection stats:\n{:#?}", connection.stats());
    -285            }
    -286        }));
    -287    }
    -288
    -289    // Await all the tasks. We have to do this to prevent the runtime getting dropped
    -290    // and all server tasks to be cancelled
    -291    for handle in server_tasks {
    -292        if let Err(e) = handle.await {
    -293            eprintln!("Server task error: {e:?}");
    -294        };
    -295    }
    -296
    -297    Ok(())
    -298}
    \ No newline at end of file +177 ]; +178 +179 while let Some(n) = stream.read_chunks(&mut bufs[..]).await.e()? { +180 if first_byte { +181 ttfb = download_start.elapsed(); +182 first_byte = false; +183 } +184 read += bufs.iter().take(n).map(|buf| buf.len()).sum::<usize>(); +185 num_chunks += 1; +186 } +187 } +188 +189 Ok((read, ttfb, num_chunks)) +190} +191 +192async fn send_data_on_stream(stream: &mut SendStream, stream_size: u64) -> Result<()> { +193 const DATA: &[u8] = &[0xAB; 1024 * 1024]; +194 let bytes_data = Bytes::from_static(DATA); +195 +196 let full_chunks = stream_size / (DATA.len() as u64); +197 let remaining = (stream_size % (DATA.len() as u64)) as usize; +198 +199 for _ in 0..full_chunks { +200 stream +201 .write_chunk(bytes_data.clone()) +202 .await +203 .context("failed sending data")?; +204 } +205 +206 if remaining != 0 { +207 stream +208 .write_chunk(bytes_data.slice(0..remaining)) +209 .await +210 .context("failed sending data")?; +211 } +212 +213 stream.finish().context("failed finishing stream")?; +214 stream +215 .stopped() +216 .await +217 .context("failed to wait for stream to be stopped")?; +218 +219 Ok(()) +220} +221 +222pub async fn handle_client_stream( +223 connection: &Connection, +224 upload_size: u64, +225 read_unordered: bool, +226) -> Result<(TransferResult, TransferResult)> { +227 let start = Instant::now(); +228 +229 let (mut send_stream, mut recv_stream) = connection +230 .open_bi() +231 .await +232 .context("failed to open stream")?; +233 +234 send_data_on_stream(&mut send_stream, upload_size).await?; +235 +236 let upload_result = TransferResult::new(start.elapsed(), upload_size, Duration::default(), 0); +237 +238 let start = Instant::now(); +239 let (size, ttfb, num_chunks) = drain_stream(&mut recv_stream, read_unordered).await?; +240 let download_result = TransferResult::new(start.elapsed(), size as u64, ttfb, num_chunks); +241 +242 Ok((upload_result, download_result)) +243} +244 +245/// Take the provided endpoint and run the server +246pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()> { +247 let mut server_tasks = Vec::new(); +248 +249 // Handle only the expected amount of clients +250 for _ in 0..opt.clients { +251 let incoming = endpoint.accept().await.unwrap(); +252 let connecting = match incoming.accept() { +253 Ok(connecting) => connecting, +254 Err(err) => { +255 warn!("incoming connection failed: {err:#}"); +256 // we can carry on in these cases: +257 // this can be caused by retransmitted datagrams +258 continue; +259 } +260 }; +261 let connection = connecting.await.context("handshake failed")?; +262 +263 server_tasks.push(tokio::spawn(async move { +264 loop { +265 let (mut send_stream, mut recv_stream) = match connection.accept_bi().await { +266 Err(ConnectionError::ApplicationClosed(_)) => break, +267 Err(e) => { +268 eprintln!("accepting stream failed: {e:?}"); +269 break; +270 } +271 Ok(stream) => stream, +272 }; +273 trace!("stream established"); +274 +275 tokio::spawn(async move { +276 drain_stream(&mut recv_stream, opt.read_unordered).await?; +277 send_data_on_stream(&mut send_stream, opt.download_size).await?; +278 Ok::<_, n0_snafu::Error>(()) +279 }); +280 } +281 +282 if opt.stats { +283 println!("\nServer connection stats:\n{:#?}", connection.stats()); +284 } +285 })); +286 } +287 +288 // Await all the tasks. We have to do this to prevent the runtime getting dropped +289 // and all server tasks to be cancelled +290 for handle in server_tasks { +291 if let Err(e) = handle.await { +292 eprintln!("Server task error: {e:?}"); +293 }; +294 } +295 +296 Ok(()) +297}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_bench/lib.rs.html b/pr/3367/docs/src/iroh_bench/lib.rs.html index 593f19f91e..8b5af0f273 100644 --- a/pr/3367/docs/src/iroh_bench/lib.rs.html +++ b/pr/3367/docs/src/iroh_bench/lib.rs.html @@ -1,4 +1,4 @@ -lib.rs - source

    iroh_bench/
    lib.rs

    1use std::{
    +lib.rs - source

    iroh_bench/
    lib.rs

    1use std::{
     2    num::ParseIntError,
     3    str::FromStr,
     4    sync::{Arc, Mutex},
    diff --git a/pr/3367/docs/src/iroh_bench/quinn.rs.html b/pr/3367/docs/src/iroh_bench/quinn.rs.html
    index 9d6ad29422..ea393e9b8b 100644
    --- a/pr/3367/docs/src/iroh_bench/quinn.rs.html
    +++ b/pr/3367/docs/src/iroh_bench/quinn.rs.html
    @@ -1,4 +1,4 @@
    -quinn.rs - source

    iroh_bench/
    quinn.rs

    1use std::{
    +quinn.rs - source

    iroh_bench/
    quinn.rs

    1use std::{
     2    net::{IpAddr, Ipv4Addr, SocketAddr},
     3    sync::Arc,
     4    time::{Duration, Instant},
    @@ -7,16 +7,16 @@
     7use bytes::Bytes;
     8use n0_snafu::{Result, ResultExt};
     9use quinn::{
    -10    crypto::rustls::QuicClientConfig, Connection, Endpoint, RecvStream, SendStream, TransportConfig,
    +10    Connection, Endpoint, RecvStream, SendStream, TransportConfig, crypto::rustls::QuicClientConfig,
     11};
     12use rustls::{
    -13    pki_types::{CertificateDer, PrivateKeyDer},
    -14    RootCertStore,
    +13    RootCertStore,
    +14    pki_types::{CertificateDer, PrivateKeyDer},
     15};
     16use tracing::{trace, warn};
     17
     18use crate::{
    -19    client_handler, stats::TransferResult, ClientStats, ConnectionSelector, EndpointSelector, Opt,
    +19    ClientStats, ConnectionSelector, EndpointSelector, Opt, client_handler, stats::TransferResult,
     20};
     21
     22pub const ALPN: &[u8] = b"n0/quinn-bench/0";
    diff --git a/pr/3367/docs/src/iroh_bench/s2n.rs.html b/pr/3367/docs/src/iroh_bench/s2n.rs.html
    index f4f07bf178..f8200cc6dc 100644
    --- a/pr/3367/docs/src/iroh_bench/s2n.rs.html
    +++ b/pr/3367/docs/src/iroh_bench/s2n.rs.html
    @@ -1,4 +1,4 @@
    -s2n.rs - source

    iroh_bench/
    s2n.rs

    1use clap::Parser;
    +s2n.rs - source

    iroh_bench/
    s2n.rs

    1use clap::Parser;
     2
     3#[derive(Parser, Debug, Clone, Copy)]
     4#[clap(name = "s2n")]
    diff --git a/pr/3367/docs/src/iroh_bench/stats.rs.html b/pr/3367/docs/src/iroh_bench/stats.rs.html
    index 8c2ac06e6b..7ea41879e3 100644
    --- a/pr/3367/docs/src/iroh_bench/stats.rs.html
    +++ b/pr/3367/docs/src/iroh_bench/stats.rs.html
    @@ -1,4 +1,4 @@
    -stats.rs - source

    iroh_bench/
    stats.rs

    1use hdrhistogram::Histogram;
    +stats.rs - source

    iroh_bench/
    stats.rs

    1use hdrhistogram::Histogram;
     2use n0_future::time::Duration;
     3
     4#[derive(Default, Debug)]
    diff --git a/pr/3367/docs/src/iroh_dns_server/config.rs.html b/pr/3367/docs/src/iroh_dns_server/config.rs.html
    index 0f31b14208..2aef1cb158 100644
    --- a/pr/3367/docs/src/iroh_dns_server/config.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/config.rs.html
    @@ -1,4 +1,4 @@
    -config.rs - source

    iroh_dns_server/
    config.rs

    1//! Configuration for the server
    +config.rs - source

    iroh_dns_server/
    config.rs

    1//! Configuration for the server
     2
     3use std::{
     4    env,
    diff --git a/pr/3367/docs/src/iroh_dns_server/dns.rs.html b/pr/3367/docs/src/iroh_dns_server/dns.rs.html
    index 078ee00557..80de601bf4 100644
    --- a/pr/3367/docs/src/iroh_dns_server/dns.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/dns.rs.html
    @@ -1,4 +1,4 @@
    -dns.rs - source

    iroh_dns_server/
    dns.rs

    1//! Implementation of a DNS name server for iroh node announces
    +dns.rs - source

    iroh_dns_server/
    dns.rs

    1//! Implementation of a DNS name server for iroh node announces
     2
     3use std::{
     4    collections::BTreeMap,
    @@ -16,8 +16,8 @@
     16        self,
     17        op::ResponseCode,
     18        rr::{
    -19            rdata::{self},
    -20            LowerName, Name, RData, Record, RecordSet, RecordType, RrKey,
    +19            LowerName, Name, RData, Record, RecordSet, RecordType, RrKey,
    +20            rdata::{self},
     21        },
     22        serialize::{binary::BinEncoder, txt::RDataParser},
     23        xfer::Protocol,
    @@ -25,7 +25,7 @@
     25    server::{Request, RequestHandler, ResponseHandler, ResponseInfo},
     26    store::in_memory::InMemoryAuthority,
     27};
    -28use n0_snafu::{format_err, Result, ResultExt};
    +28use n0_snafu::{Result, ResultExt, format_err};
     29use serde::{Deserialize, Serialize};
     30use tokio::{
     31    net::{TcpListener, UdpSocket},
    @@ -270,7 +270,7 @@
     270    }
     271
     272    let static_authority = InMemoryAuthority::new(Name::root(), records, ZoneType::Primary, false)
    -273        .map_err(|e| format_err!("new authority: {}", e))?;
    +273        .map_err(|e| format_err!("new authority: {e}"))?;
     274
     275    Ok((static_authority, serial))
     276}
    diff --git a/pr/3367/docs/src/iroh_dns_server/dns/node_authority.rs.html b/pr/3367/docs/src/iroh_dns_server/dns/node_authority.rs.html
    index 72b6b69878..11485c6189 100644
    --- a/pr/3367/docs/src/iroh_dns_server/dns/node_authority.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/dns/node_authority.rs.html
    @@ -1,4 +1,4 @@
    -node_authority.rs - source

    iroh_dns_server/dns/
    node_authority.rs

    1use std::{fmt, sync::Arc};
    +node_authority.rs - source

    iroh_dns_server/dns/
    node_authority.rs

    1use std::{fmt, sync::Arc};
     2
     3use async_trait::async_trait;
     4use hickory_server::{
    @@ -19,7 +19,7 @@
     19
     20use crate::{
     21    store::ZoneStore,
    -22    util::{record_set_append_origin, PublicKeyBytes},
    +22    util::{PublicKeyBytes, record_set_append_origin},
     23};
     24
     25#[derive(derive_more::Debug)]
    diff --git a/pr/3367/docs/src/iroh_dns_server/http.rs.html b/pr/3367/docs/src/iroh_dns_server/http.rs.html
    index 8aae2b90df..aa380d8b0c 100644
    --- a/pr/3367/docs/src/iroh_dns_server/http.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/http.rs.html
    @@ -1,4 +1,4 @@
    -http.rs - source

    iroh_dns_server/
    http.rs

    1//! HTTP server part of iroh-dns-server
    +http.rs - source

    iroh_dns_server/
    http.rs

    1//! HTTP server part of iroh-dns-server
     2
     3use std::{
     4    net::{IpAddr, Ipv4Addr, SocketAddr},
    @@ -6,13 +6,13 @@
     6};
     7
     8use axum::{
    -9    extract::{ConnectInfo, Request, State},
    -10    handler::Handler,
    -11    http::Method,
    -12    middleware::{self, Next},
    -13    response::IntoResponse,
    -14    routing::get,
    -15    Router,
    +9    Router,
    +10    extract::{ConnectInfo, Request, State},
    +11    handler::Handler,
    +12    http::Method,
    +13    middleware::{self, Next},
    +14    response::IntoResponse,
    +15    routing::get,
     16};
     17use n0_snafu::{Result, ResultExt};
     18use serde::{Deserialize, Serialize};
    @@ -22,7 +22,7 @@
     22    cors::{self, CorsLayer},
     23    trace::TraceLayer,
     24};
    -25use tracing::{info, span, warn, Level};
    +25use tracing::{Level, info, span, warn};
     26
     27mod doh;
     28mod error;
    diff --git a/pr/3367/docs/src/iroh_dns_server/http/doh.rs.html b/pr/3367/docs/src/iroh_dns_server/http/doh.rs.html
    index 482a4263de..de326b34b2 100644
    --- a/pr/3367/docs/src/iroh_dns_server/http/doh.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/http/doh.rs.html
    @@ -1,20 +1,20 @@
    -doh.rs - source

    iroh_dns_server/http/
    doh.rs

    1//! DNS over HTTPS
    +doh.rs - source

    iroh_dns_server/http/
    doh.rs

    1//! DNS over HTTPS
     2
     3// This module is mostly copied from
     4// https://github.com/fission-codes/fission-server/blob/main/fission-server/src/routes/doh.rs
     5
     6use axum::{
    -7    extract::State,
    -8    response::{IntoResponse, Response},
    -9    Json,
    +7    Json,
    +8    extract::State,
    +9    response::{IntoResponse, Response},
     10};
     11use hickory_server::proto::{
     12    serialize::binary::BinDecodable,
     13    {self},
     14};
     15use http::{
    -16    header::{CACHE_CONTROL, CONTENT_TYPE},
    -17    HeaderValue, StatusCode,
    +16    HeaderValue, StatusCode,
    +17    header::{CACHE_CONTROL, CONTENT_TYPE},
     18};
     19use n0_snafu::ResultExt;
     20
    diff --git a/pr/3367/docs/src/iroh_dns_server/http/doh/extract.rs.html b/pr/3367/docs/src/iroh_dns_server/http/doh/extract.rs.html
    index 07cb98e94c..47c3820624 100644
    --- a/pr/3367/docs/src/iroh_dns_server/http/doh/extract.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/http/doh/extract.rs.html
    @@ -1,4 +1,4 @@
    -extract.rs - source

    iroh_dns_server/http/doh/
    extract.rs

    1//! Extractors for DNS-over-HTTPS requests
    +extract.rs - source

    iroh_dns_server/http/doh/
    extract.rs

    1//! Extractors for DNS-over-HTTPS requests
     2
     3// This module is mostly copied from
     4// https://github.com/fission-codes/fission-server/blob/394de877fad021260c69fdb1edd7bb4b2f98108c/fission-server/src/extract/doh.rs
    @@ -25,7 +25,7 @@
     25    },
     26    server::Request as DNSRequest,
     27};
    -28use http::{header, request::Parts, HeaderValue, StatusCode};
    +28use http::{HeaderValue, StatusCode, header, request::Parts};
     29use serde::Deserialize;
     30use tracing::info;
     31
    @@ -257,7 +257,7 @@
     257        }
     258        Err(err) => Err(AppError::new(
     259            StatusCode::BAD_REQUEST,
    -260            Some(format!("Invalid DNS message: {}", err)),
    +260            Some(format!("Invalid DNS message: {err}")),
     261        )),
     262    }
     263}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_dns_server/http/doh/response.rs.html b/pr/3367/docs/src/iroh_dns_server/http/doh/response.rs.html index 5f8c523310..bbfaadd8fc 100644 --- a/pr/3367/docs/src/iroh_dns_server/http/doh/response.rs.html +++ b/pr/3367/docs/src/iroh_dns_server/http/doh/response.rs.html @@ -1,4 +1,4 @@ -response.rs - source

    iroh_dns_server/http/doh/
    response.rs

    1//! DNS Response
    +response.rs - source

    iroh_dns_server/http/doh/
    response.rs

    1//! DNS Response
     2
     3// This module is mostly copied from
     4// https://github.com/fission-codes/fission-server/blob/394de877fad021260c69fdb1edd7bb4b2f98108c/fission-core/src/dns.rs
    diff --git a/pr/3367/docs/src/iroh_dns_server/http/error.rs.html b/pr/3367/docs/src/iroh_dns_server/http/error.rs.html
    index a380087cfb..d659fd42ef 100644
    --- a/pr/3367/docs/src/iroh_dns_server/http/error.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/http/error.rs.html
    @@ -1,8 +1,8 @@
    -error.rs - source

    iroh_dns_server/http/
    error.rs

    1use axum::{
    -2    extract::rejection::{ExtensionRejection, QueryRejection},
    -3    http::StatusCode,
    -4    response::IntoResponse,
    -5    Json,
    +error.rs - source

    iroh_dns_server/http/
    error.rs

    1use axum::{
    +2    Json,
    +3    extract::rejection::{ExtensionRejection, QueryRejection},
    +4    http::StatusCode,
    +5    response::IntoResponse,
     6};
     7use serde::{Deserialize, Serialize};
     8
    @@ -78,7 +78,7 @@
     78/// We could have used http_serde, but it encodes the status code as a NUMBER.
     79pub mod serde_status_code {
     80    use http::StatusCode;
    -81    use serde::{de::Unexpected, Deserialize, Deserializer, Serialize, Serializer};
    +81    use serde::{Deserialize, Deserializer, Serialize, Serializer, de::Unexpected};
     82
     83    /// Serialize [StatusCode]s.
     84    pub fn serialize<S: Serializer>(status: &StatusCode, ser: S) -> Result<S::Ok, S::Error> {
    diff --git a/pr/3367/docs/src/iroh_dns_server/http/pkarr.rs.html b/pr/3367/docs/src/iroh_dns_server/http/pkarr.rs.html
    index 1f37d02245..37e55a34be 100644
    --- a/pr/3367/docs/src/iroh_dns_server/http/pkarr.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/http/pkarr.rs.html
    @@ -1,9 +1,9 @@
    -pkarr.rs - source

    iroh_dns_server/http/
    pkarr.rs

    1use axum::{
    +pkarr.rs - source

    iroh_dns_server/http/
    pkarr.rs

    1use axum::{
     2    extract::{Path, State},
     3    response::IntoResponse,
     4};
     5use bytes::Bytes;
    -6use http::{header, StatusCode};
    +6use http::{StatusCode, header};
     7use tracing::info;
     8
     9use super::error::AppError;
    diff --git a/pr/3367/docs/src/iroh_dns_server/http/rate_limiting.rs.html b/pr/3367/docs/src/iroh_dns_server/http/rate_limiting.rs.html
    index c97413bc43..844ccf1899 100644
    --- a/pr/3367/docs/src/iroh_dns_server/http/rate_limiting.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/http/rate_limiting.rs.html
    @@ -1,11 +1,11 @@
    -rate_limiting.rs - source

    iroh_dns_server/http/
    rate_limiting.rs

    1use std::{sync::Arc, time::Duration};
    +rate_limiting.rs - source

    iroh_dns_server/http/
    rate_limiting.rs

    1use std::{sync::Arc, time::Duration};
     2
     3use governor::{clock::QuantaInstant, middleware::NoOpMiddleware};
     4use serde::{Deserialize, Serialize};
     5use tower_governor::{
    -6    governor::GovernorConfigBuilder,
    -7    key_extractor::{PeerIpKeyExtractor, SmartIpKeyExtractor},
    -8    GovernorLayer,
    +6    GovernorLayer,
    +7    governor::GovernorConfigBuilder,
    +8    key_extractor::{PeerIpKeyExtractor, SmartIpKeyExtractor},
     9};
     10
     11/// Config for http server rate limit.
    @@ -36,9 +36,9 @@
     36/// Create the default rate-limiting layer.
     37///
     38/// This spawns a background thread to clean up the rate limiting cache.
    -39pub fn create(
    +39pub fn create<RespBody>(
     40    rate_limit_config: &RateLimitConfig,
    -41) -> Option<GovernorLayer<PeerIpKeyExtractor, NoOpMiddleware<QuantaInstant>>> {
    +41) -> Option<GovernorLayer<PeerIpKeyExtractor, NoOpMiddleware<QuantaInstant>, RespBody>> {
     42    let use_smart_extractor = match rate_limit_config {
     43        RateLimitConfig::Disabled => {
     44            tracing::info!("Rate limiting disabled");
    @@ -71,13 +71,13 @@
     71    // The governor needs a background task for garbage collection (to clear expired records)
     72    let gc_interval = Duration::from_secs(60);
     73    let governor_limiter = governor_conf.limiter().clone();
    -74    std::thread::spawn(move || loop {
    -75        std::thread::sleep(gc_interval);
    -76        tracing::debug!("rate limiting storage size: {}", governor_limiter.len());
    -77        governor_limiter.retain_recent();
    -78    });
    -79
    -80    Some(GovernorLayer {
    -81        config: governor_conf,
    -82    })
    +74    std::thread::spawn(move || {
    +75        loop {
    +76            std::thread::sleep(gc_interval);
    +77            tracing::debug!("rate limiting storage size: {}", governor_limiter.len());
    +78            governor_limiter.retain_recent();
    +79        }
    +80    });
    +81
    +82    Some(GovernorLayer::new(governor_conf))
     83}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_dns_server/http/tls.rs.html b/pr/3367/docs/src/iroh_dns_server/http/tls.rs.html index bdfa64f0ad..37478ca5c4 100644 --- a/pr/3367/docs/src/iroh_dns_server/http/tls.rs.html +++ b/pr/3367/docs/src/iroh_dns_server/http/tls.rs.html @@ -1,4 +1,4 @@ -tls.rs - source

    iroh_dns_server/http/
    tls.rs

    1use std::{
    +tls.rs - source

    iroh_dns_server/http/
    tls.rs

    1use std::{
     2    borrow::Cow,
     3    io,
     4    path::{Path, PathBuf},
    @@ -9,14 +9,14 @@
     9    accept::Accept,
     10    tls_rustls::{RustlsAcceptor, RustlsConfig},
     11};
    -12use n0_future::{future::Boxed as BoxFuture, FutureExt};
    +12use n0_future::{FutureExt, future::Boxed as BoxFuture};
     13use n0_snafu::{Result, ResultExt};
     14use serde::{Deserialize, Serialize};
     15use snafu::whatever;
     16use tokio::io::{AsyncRead, AsyncWrite};
    -17use tokio_rustls_acme::{axum::AxumAcceptor, caches::DirCache, AcmeConfig};
    +17use tokio_rustls_acme::{AcmeConfig, axum::AxumAcceptor, caches::DirCache};
     18use tokio_stream::StreamExt;
    -19use tracing::{debug, error, info_span, Instrument};
    +19use tracing::{Instrument, debug, error, info_span};
     20
     21/// The mode how SSL certificates should be created.
     22#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, strum::Display)]
    @@ -75,9 +75,9 @@
     75
     76impl TlsAcceptor {
     77    async fn self_signed(domains: Vec<String>) -> Result<Self> {
    -78        let rcgen::CertifiedKey { cert, key_pair } =
    +78        let rcgen::CertifiedKey { cert, signing_key } =
     79            rcgen::generate_simple_self_signed(domains).e()?;
    -80        let config = RustlsConfig::from_der(vec![cert.der().to_vec()], key_pair.serialize_der())
    +80        let config = RustlsConfig::from_der(vec![cert.der().to_vec()], signing_key.serialize_der())
     81            .await
     82            .e()?;
     83        let acceptor = RustlsAcceptor::new(config);
    diff --git a/pr/3367/docs/src/iroh_dns_server/lib.rs.html b/pr/3367/docs/src/iroh_dns_server/lib.rs.html
    index e253e61bff..ecb523b183 100644
    --- a/pr/3367/docs/src/iroh_dns_server/lib.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/lib.rs.html
    @@ -1,4 +1,4 @@
    -lib.rs - source

    iroh_dns_server/
    lib.rs

    1//! A DNS server and pkarr relay
    +lib.rs - source

    iroh_dns_server/
    lib.rs

    1//! A DNS server and pkarr relay
     2
     3#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
     4
    @@ -22,250 +22,257 @@
     22    };
     23
     24    use iroh::{
    -25        discovery::pkarr::PkarrRelayClient, dns::DnsResolver, node_info::NodeInfo, RelayUrl,
    -26        SecretKey,
    +25        RelayUrl, SecretKey, discovery::pkarr::PkarrRelayClient, dns::DnsResolver,
    +26        node_info::NodeInfo,
     27    };
     28    use n0_snafu::{Result, ResultExt};
     29    use pkarr::{SignedPacket, Timestamp};
    -30    use tracing_test::traced_test;
    -31
    -32    use crate::{
    -33        config::BootstrapOption,
    -34        server::Server,
    -35        store::{PacketSource, ZoneStoreOptions},
    -36        util::PublicKeyBytes,
    -37        ZoneStore,
    -38    };
    -39
    -40    const DNS_TIMEOUT: Duration = Duration::from_secs(1);
    -41
    -42    #[tokio::test]
    -43    #[traced_test]
    -44    async fn pkarr_publish_dns_resolve() -> Result {
    -45        let (server, nameserver, http_url) = Server::spawn_for_tests().await?;
    -46        let pkarr_relay_url = {
    -47            let mut url = http_url.clone();
    -48            url.set_path("/pkarr");
    -49            url
    -50        };
    -51        let signed_packet = {
    -52            use pkarr::dns;
    -53            let keypair = pkarr::Keypair::random();
    -54            let mut packet = dns::Packet::new_reply(0);
    -55            // record at root
    -56            packet.answers.push(dns::ResourceRecord::new(
    -57                dns::Name::new("").e()?,
    -58                dns::CLASS::IN,
    -59                30,
    -60                dns::rdata::RData::TXT("hi0".try_into().unwrap()),
    -61            ));
    -62            // record at level one
    -63            packet.answers.push(dns::ResourceRecord::new(
    -64                dns::Name::new("_hello").e()?,
    -65                dns::CLASS::IN,
    -66                30,
    -67                dns::rdata::RData::TXT("hi1".try_into().unwrap()),
    -68            ));
    -69            // record at level two
    -70            packet.answers.push(dns::ResourceRecord::new(
    -71                dns::Name::new("_hello.world").e()?,
    -72                dns::CLASS::IN,
    -73                30,
    -74                dns::rdata::RData::TXT("hi2".try_into().unwrap()),
    -75            ));
    -76            // multiple records for same name
    -77            packet.answers.push(dns::ResourceRecord::new(
    -78                dns::Name::new("multiple").e()?,
    -79                dns::CLASS::IN,
    -80                30,
    -81                dns::rdata::RData::TXT("hi3".try_into().unwrap()),
    -82            ));
    -83            packet.answers.push(dns::ResourceRecord::new(
    -84                dns::Name::new("multiple").e()?,
    -85                dns::CLASS::IN,
    -86                30,
    -87                dns::rdata::RData::TXT("hi4".try_into().unwrap()),
    -88            ));
    -89            // record of type A
    -90            packet.answers.push(dns::ResourceRecord::new(
    -91                dns::Name::new("").e()?,
    -92                dns::CLASS::IN,
    -93                30,
    -94                dns::rdata::RData::A(Ipv4Addr::LOCALHOST.into()),
    -95            ));
    -96            // record of type AAAA
    -97            packet.answers.push(dns::ResourceRecord::new(
    -98                dns::Name::new("foo.bar.baz").e()?,
    -99                dns::CLASS::IN,
    -100                30,
    -101                dns::rdata::RData::AAAA(Ipv6Addr::LOCALHOST.into()),
    -102            ));
    -103            SignedPacket::new(&keypair, &packet.answers, Timestamp::now()).e()?
    -104        };
    -105        let pkarr_client = pkarr::Client::builder()
    -106            .no_default_network()
    -107            .relays(&[pkarr_relay_url])
    -108            .e()?
    -109            .build()
    -110            .e()?;
    -111        pkarr_client.publish(&signed_packet, None).await.e()?;
    -112
    -113        use hickory_server::proto::rr::Name;
    -114        let pubkey = signed_packet.public_key().to_z32();
    -115        let resolver = test_resolver(nameserver);
    -116
    -117        // resolve root record
    -118        let name = Name::from_utf8(format!("{pubkey}.")).e()?;
    -119        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    -120        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    -121        assert_eq!(records, vec!["hi0".to_string()]);
    -122
    -123        // resolve level one record
    -124        let name = Name::from_utf8(format!("_hello.{pubkey}.")).e()?;
    -125        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    -126        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    -127        assert_eq!(records, vec!["hi1".to_string()]);
    -128
    -129        // resolve level two record
    -130        let name = Name::from_utf8(format!("_hello.world.{pubkey}.")).e()?;
    -131        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    -132        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    -133        assert_eq!(records, vec!["hi2".to_string()]);
    -134
    -135        // resolve multiple records for same name
    -136        let name = Name::from_utf8(format!("multiple.{pubkey}.")).e()?;
    -137        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    -138        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    -139        assert_eq!(records, vec!["hi3".to_string(), "hi4".to_string()]);
    -140
    -141        // resolve A record
    -142        let name = Name::from_utf8(format!("{pubkey}.")).e()?;
    -143        let res = resolver.lookup_ipv4(name, DNS_TIMEOUT).await?;
    -144        let records = res.collect::<Vec<_>>();
    -145        assert_eq!(records, vec![Ipv4Addr::LOCALHOST]);
    -146
    -147        // resolve AAAA record
    -148        let name = Name::from_utf8(format!("foo.bar.baz.{pubkey}.")).e()?;
    -149        let res = resolver.lookup_ipv6(name, DNS_TIMEOUT).await?;
    -150        let records = res.collect::<Vec<_>>();
    -151        assert_eq!(records, vec![Ipv6Addr::LOCALHOST]);
    -152
    -153        server.shutdown().await?;
    -154        Ok(())
    -155    }
    -156
    -157    #[tokio::test]
    -158    #[traced_test]
    -159    async fn integration_smoke() -> Result {
    -160        let (server, nameserver, http_url) = Server::spawn_for_tests().await?;
    -161
    -162        let pkarr_relay = {
    -163            let mut url = http_url.clone();
    -164            url.set_path("/pkarr");
    -165            url
    -166        };
    -167
    -168        let origin = "irohdns.example.";
    -169
    -170        let secret_key = SecretKey::generate(rand::thread_rng());
    -171        let node_id = secret_key.public();
    -172        let pkarr = PkarrRelayClient::new(pkarr_relay);
    -173        let relay_url: RelayUrl = "https://relay.example.".parse()?;
    -174        let node_info = NodeInfo::new(node_id).with_relay_url(Some(relay_url.clone()));
    -175        let signed_packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    -176
    -177        pkarr.publish(&signed_packet).await?;
    -178
    -179        let resolver = test_resolver(nameserver);
    -180        let res = resolver.lookup_node_by_id(&node_id, origin).await?;
    +30    use rand::{CryptoRng, SeedableRng};
    +31    use tracing_test::traced_test;
    +32
    +33    use crate::{
    +34        ZoneStore,
    +35        config::BootstrapOption,
    +36        server::Server,
    +37        store::{PacketSource, ZoneStoreOptions},
    +38        util::PublicKeyBytes,
    +39    };
    +40
    +41    const DNS_TIMEOUT: Duration = Duration::from_secs(1);
    +42
    +43    #[tokio::test]
    +44    #[traced_test]
    +45    async fn pkarr_publish_dns_resolve() -> Result {
    +46        let (server, nameserver, http_url) = Server::spawn_for_tests().await?;
    +47        let pkarr_relay_url = {
    +48            let mut url = http_url.clone();
    +49            url.set_path("/pkarr");
    +50            url
    +51        };
    +52        let signed_packet = {
    +53            use pkarr::dns;
    +54            let keypair = pkarr::Keypair::random();
    +55            let mut packet = dns::Packet::new_reply(0);
    +56            // record at root
    +57            packet.answers.push(dns::ResourceRecord::new(
    +58                dns::Name::new("").e()?,
    +59                dns::CLASS::IN,
    +60                30,
    +61                dns::rdata::RData::TXT("hi0".try_into().unwrap()),
    +62            ));
    +63            // record at level one
    +64            packet.answers.push(dns::ResourceRecord::new(
    +65                dns::Name::new("_hello").e()?,
    +66                dns::CLASS::IN,
    +67                30,
    +68                dns::rdata::RData::TXT("hi1".try_into().unwrap()),
    +69            ));
    +70            // record at level two
    +71            packet.answers.push(dns::ResourceRecord::new(
    +72                dns::Name::new("_hello.world").e()?,
    +73                dns::CLASS::IN,
    +74                30,
    +75                dns::rdata::RData::TXT("hi2".try_into().unwrap()),
    +76            ));
    +77            // multiple records for same name
    +78            packet.answers.push(dns::ResourceRecord::new(
    +79                dns::Name::new("multiple").e()?,
    +80                dns::CLASS::IN,
    +81                30,
    +82                dns::rdata::RData::TXT("hi3".try_into().unwrap()),
    +83            ));
    +84            packet.answers.push(dns::ResourceRecord::new(
    +85                dns::Name::new("multiple").e()?,
    +86                dns::CLASS::IN,
    +87                30,
    +88                dns::rdata::RData::TXT("hi4".try_into().unwrap()),
    +89            ));
    +90            // record of type A
    +91            packet.answers.push(dns::ResourceRecord::new(
    +92                dns::Name::new("").e()?,
    +93                dns::CLASS::IN,
    +94                30,
    +95                dns::rdata::RData::A(Ipv4Addr::LOCALHOST.into()),
    +96            ));
    +97            // record of type AAAA
    +98            packet.answers.push(dns::ResourceRecord::new(
    +99                dns::Name::new("foo.bar.baz").e()?,
    +100                dns::CLASS::IN,
    +101                30,
    +102                dns::rdata::RData::AAAA(Ipv6Addr::LOCALHOST.into()),
    +103            ));
    +104            SignedPacket::new(&keypair, &packet.answers, Timestamp::now()).e()?
    +105        };
    +106        let pkarr_client = pkarr::Client::builder()
    +107            .no_default_network()
    +108            .relays(&[pkarr_relay_url])
    +109            .e()?
    +110            .build()
    +111            .e()?;
    +112        pkarr_client.publish(&signed_packet, None).await.e()?;
    +113
    +114        use hickory_server::proto::rr::Name;
    +115        let pubkey = signed_packet.public_key().to_z32();
    +116        let resolver = test_resolver(nameserver);
    +117
    +118        // resolve root record
    +119        let name = Name::from_utf8(format!("{pubkey}.")).e()?;
    +120        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    +121        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    +122        assert_eq!(records, vec!["hi0".to_string()]);
    +123
    +124        // resolve level one record
    +125        let name = Name::from_utf8(format!("_hello.{pubkey}.")).e()?;
    +126        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    +127        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    +128        assert_eq!(records, vec!["hi1".to_string()]);
    +129
    +130        // resolve level two record
    +131        let name = Name::from_utf8(format!("_hello.world.{pubkey}.")).e()?;
    +132        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    +133        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    +134        assert_eq!(records, vec!["hi2".to_string()]);
    +135
    +136        // resolve multiple records for same name
    +137        let name = Name::from_utf8(format!("multiple.{pubkey}.")).e()?;
    +138        let res = resolver.lookup_txt(name, DNS_TIMEOUT).await?;
    +139        let records = res.into_iter().map(|t| t.to_string()).collect::<Vec<_>>();
    +140        assert_eq!(records, vec!["hi3".to_string(), "hi4".to_string()]);
    +141
    +142        // resolve A record
    +143        let name = Name::from_utf8(format!("{pubkey}.")).e()?;
    +144        let res = resolver.lookup_ipv4(name, DNS_TIMEOUT).await?;
    +145        let records = res.collect::<Vec<_>>();
    +146        assert_eq!(records, vec![Ipv4Addr::LOCALHOST]);
    +147
    +148        // resolve AAAA record
    +149        let name = Name::from_utf8(format!("foo.bar.baz.{pubkey}.")).e()?;
    +150        let res = resolver.lookup_ipv6(name, DNS_TIMEOUT).await?;
    +151        let records = res.collect::<Vec<_>>();
    +152        assert_eq!(records, vec![Ipv6Addr::LOCALHOST]);
    +153
    +154        server.shutdown().await?;
    +155        Ok(())
    +156    }
    +157
    +158    #[tokio::test]
    +159    #[traced_test]
    +160    async fn integration_smoke() -> Result {
    +161        let (server, nameserver, http_url) = Server::spawn_for_tests().await?;
    +162
    +163        let pkarr_relay = {
    +164            let mut url = http_url.clone();
    +165            url.set_path("/pkarr");
    +166            url
    +167        };
    +168
    +169        let origin = "irohdns.example.";
    +170
    +171        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +172
    +173        let secret_key = SecretKey::generate(&mut rng);
    +174        let node_id = secret_key.public();
    +175        let pkarr = PkarrRelayClient::new(pkarr_relay);
    +176        let relay_url: RelayUrl = "https://relay.example.".parse()?;
    +177        let node_info = NodeInfo::new(node_id).with_relay_url(Some(relay_url.clone()));
    +178        let signed_packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    +179
    +180        pkarr.publish(&signed_packet).await?;
     181
    -182        assert_eq!(res.node_id, node_id);
    -183        assert_eq!(res.relay_url(), Some(&relay_url));
    +182        let resolver = test_resolver(nameserver);
    +183        let res = resolver.lookup_node_by_id(&node_id, origin).await?;
     184
    -185        server.shutdown().await?;
    -186        Ok(())
    -187    }
    -188
    -189    #[tokio::test]
    -190    #[traced_test]
    -191    async fn store_eviction() -> Result {
    -192        let options = ZoneStoreOptions {
    -193            eviction: Duration::from_millis(100),
    -194            eviction_interval: Duration::from_millis(100),
    -195            max_batch_time: Duration::from_millis(100),
    -196            ..Default::default()
    -197        };
    -198        let store = ZoneStore::in_memory(options, Default::default())?;
    -199
    -200        // create a signed packet
    -201        let signed_packet = random_signed_packet()?;
    -202        let key = PublicKeyBytes::from_signed_packet(&signed_packet);
    -203
    -204        store
    -205            .insert(signed_packet, PacketSource::PkarrPublish)
    -206            .await?;
    -207
    -208        tokio::time::sleep(Duration::from_secs(1)).await;
    -209        for _ in 0..10 {
    -210            let entry = store.get_signed_packet(&key).await?;
    -211            if entry.is_none() {
    -212                return Ok(());
    -213            }
    -214            tokio::time::sleep(Duration::from_secs(1)).await;
    -215        }
    -216        panic!("store did not evict packet");
    -217    }
    -218
    -219    #[tokio::test]
    -220    #[traced_test]
    -221    async fn integration_mainline() -> Result {
    -222        // run a mainline testnet
    -223        let testnet = pkarr::mainline::Testnet::new_async(5).await.e()?;
    -224        let bootstrap = testnet.bootstrap.clone();
    -225
    -226        // spawn our server with mainline support
    -227        let (server, nameserver, _http_url) =
    -228            Server::spawn_for_tests_with_options(Some(BootstrapOption::Custom(bootstrap)), None)
    -229                .await?;
    -230
    -231        let origin = "irohdns.example.";
    +185        assert_eq!(res.node_id, node_id);
    +186        assert_eq!(res.relay_url(), Some(&relay_url));
    +187
    +188        server.shutdown().await?;
    +189        Ok(())
    +190    }
    +191
    +192    #[tokio::test]
    +193    #[traced_test]
    +194    async fn store_eviction() -> Result {
    +195        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +196
    +197        let options = ZoneStoreOptions {
    +198            eviction: Duration::from_millis(100),
    +199            eviction_interval: Duration::from_millis(100),
    +200            max_batch_time: Duration::from_millis(100),
    +201            ..Default::default()
    +202        };
    +203        let store = ZoneStore::in_memory(options, Default::default())?;
    +204
    +205        // create a signed packet
    +206        let signed_packet = random_signed_packet(&mut rng)?;
    +207        let key = PublicKeyBytes::from_signed_packet(&signed_packet);
    +208
    +209        store
    +210            .insert(signed_packet, PacketSource::PkarrPublish)
    +211            .await?;
    +212
    +213        tokio::time::sleep(Duration::from_secs(1)).await;
    +214        for _ in 0..10 {
    +215            let entry = store.get_signed_packet(&key).await?;
    +216            if entry.is_none() {
    +217                return Ok(());
    +218            }
    +219            tokio::time::sleep(Duration::from_secs(1)).await;
    +220        }
    +221        panic!("store did not evict packet");
    +222    }
    +223
    +224    #[tokio::test]
    +225    #[traced_test]
    +226    async fn integration_mainline() -> Result {
    +227        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +228
    +229        // run a mainline testnet
    +230        let testnet = pkarr::mainline::Testnet::new_async(5).await.e()?;
    +231        let bootstrap = testnet.bootstrap.clone();
     232
    -233        // create a signed packet
    -234        let secret_key = SecretKey::generate(rand::thread_rng());
    -235        let node_id = secret_key.public();
    -236        let relay_url: RelayUrl = "https://relay.example.".parse()?;
    -237        let node_info = NodeInfo::new(node_id).with_relay_url(Some(relay_url.clone()));
    -238        let signed_packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    +233        // spawn our server with mainline support
    +234        let (server, nameserver, _http_url) =
    +235            Server::spawn_for_tests_with_options(Some(BootstrapOption::Custom(bootstrap)), None)
    +236                .await?;
    +237
    +238        let origin = "irohdns.example.";
     239
    -240        // publish the signed packet to our DHT
    -241        let pkarr = pkarr::Client::builder()
    -242            .no_default_network()
    -243            .dht(|builder| builder.bootstrap(&testnet.bootstrap))
    -244            .build()
    -245            .e()?;
    -246        pkarr.publish(&signed_packet, None).await.e()?;
    -247
    -248        // resolve via DNS from our server, which will lookup from our DHT
    -249        let resolver = test_resolver(nameserver);
    -250        let res = resolver.lookup_node_by_id(&node_id, origin).await?;
    -251
    -252        assert_eq!(res.node_id, node_id);
    -253        assert_eq!(res.relay_url(), Some(&relay_url));
    +240        // create a signed packet
    +241        let secret_key = SecretKey::generate(&mut rng);
    +242        let node_id = secret_key.public();
    +243        let relay_url: RelayUrl = "https://relay.example.".parse()?;
    +244        let node_info = NodeInfo::new(node_id).with_relay_url(Some(relay_url.clone()));
    +245        let signed_packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    +246
    +247        // publish the signed packet to our DHT
    +248        let pkarr = pkarr::Client::builder()
    +249            .no_default_network()
    +250            .dht(|builder| builder.bootstrap(&testnet.bootstrap))
    +251            .build()
    +252            .e()?;
    +253        pkarr.publish(&signed_packet, None).await.e()?;
     254
    -255        server.shutdown().await?;
    -256        Ok(())
    -257    }
    +255        // resolve via DNS from our server, which will lookup from our DHT
    +256        let resolver = test_resolver(nameserver);
    +257        let res = resolver.lookup_node_by_id(&node_id, origin).await?;
     258
    -259    fn test_resolver(nameserver: SocketAddr) -> DnsResolver {
    -260        DnsResolver::with_nameserver(nameserver)
    -261    }
    -262
    -263    fn random_signed_packet() -> Result<SignedPacket> {
    -264        let secret_key = SecretKey::generate(rand::thread_rng());
    -265        let node_id = secret_key.public();
    -266        let relay_url: RelayUrl = "https://relay.example.".parse()?;
    -267        let node_info = NodeInfo::new(node_id).with_relay_url(Some(relay_url.clone()));
    -268        let packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?;
    -269        Ok(packet)
    -270    }
    -271}
    \ No newline at end of file +259 assert_eq!(res.node_id, node_id); +260 assert_eq!(res.relay_url(), Some(&relay_url)); +261 +262 server.shutdown().await?; +263 Ok(()) +264 } +265 +266 fn test_resolver(nameserver: SocketAddr) -> DnsResolver { +267 DnsResolver::with_nameserver(nameserver) +268 } +269 +270 fn random_signed_packet<R: CryptoRng + ?Sized>(rng: &mut R) -> Result<SignedPacket> { +271 let secret_key = SecretKey::generate(rng); +272 let node_id = secret_key.public(); +273 let relay_url: RelayUrl = "https://relay.example.".parse()?; +274 let node_info = NodeInfo::new(node_id).with_relay_url(Some(relay_url.clone())); +275 let packet = node_info.to_pkarr_signed_packet(&secret_key, 30)?; +276 Ok(packet) +277 } +278}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_dns_server/metrics.rs.html b/pr/3367/docs/src/iroh_dns_server/metrics.rs.html index 3d8998ccc1..e39f0b847c 100644 --- a/pr/3367/docs/src/iroh_dns_server/metrics.rs.html +++ b/pr/3367/docs/src/iroh_dns_server/metrics.rs.html @@ -1,4 +1,4 @@ -metrics.rs - source

    iroh_dns_server/
    metrics.rs

    1//! Metrics support for the server
    +metrics.rs - source

    iroh_dns_server/
    metrics.rs

    1//! Metrics support for the server
     2
     3use iroh_metrics::{Counter, MetricsGroup};
     4
    diff --git a/pr/3367/docs/src/iroh_dns_server/server.rs.html b/pr/3367/docs/src/iroh_dns_server/server.rs.html
    index feb623061a..bbda7c9450 100644
    --- a/pr/3367/docs/src/iroh_dns_server/server.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/server.rs.html
    @@ -1,4 +1,4 @@
    -server.rs - source

    iroh_dns_server/
    server.rs

    1//! The main server which combines the DNS and HTTP(S) servers.
    +server.rs - source

    iroh_dns_server/
    server.rs

    1//! The main server which combines the DNS and HTTP(S) servers.
     2use std::sync::Arc;
     3
     4use iroh_metrics::service::start_metrics_server;
    diff --git a/pr/3367/docs/src/iroh_dns_server/state.rs.html b/pr/3367/docs/src/iroh_dns_server/state.rs.html
    index e8256a2113..861caf0dc6 100644
    --- a/pr/3367/docs/src/iroh_dns_server/state.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/state.rs.html
    @@ -1,4 +1,4 @@
    -state.rs - source

    iroh_dns_server/
    state.rs

    1//! Shared state and store for the iroh-dns-server
    +state.rs - source

    iroh_dns_server/
    state.rs

    1//! Shared state and store for the iroh-dns-server
     2
     3use std::sync::Arc;
     4
    diff --git a/pr/3367/docs/src/iroh_dns_server/store.rs.html b/pr/3367/docs/src/iroh_dns_server/store.rs.html
    index f8a84ce06b..33aa8bb1bd 100644
    --- a/pr/3367/docs/src/iroh_dns_server/store.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/store.rs.html
    @@ -1,4 +1,4 @@
    -store.rs - source

    iroh_dns_server/
    store.rs

    1//! Pkarr packet store used to resolve DNS queries.
    +store.rs - source

    iroh_dns_server/
    store.rs

    1//! Pkarr packet store used to resolve DNS queries.
     2
     3use std::{collections::BTreeMap, num::NonZeroUsize, path::Path, sync::Arc, time::Duration};
     4
    @@ -14,7 +14,7 @@
     14use crate::{
     15    config::BootstrapOption,
     16    metrics::Metrics,
    -17    util::{signed_packet_to_hickory_records_without_origin, PublicKeyBytes},
    +17    util::{PublicKeyBytes, signed_packet_to_hickory_records_without_origin},
     18};
     19
     20mod signed_packets;
    diff --git a/pr/3367/docs/src/iroh_dns_server/store/signed_packets.rs.html b/pr/3367/docs/src/iroh_dns_server/store/signed_packets.rs.html
    index 534e8959a1..6648adbf0d 100644
    --- a/pr/3367/docs/src/iroh_dns_server/store/signed_packets.rs.html
    +++ b/pr/3367/docs/src/iroh_dns_server/store/signed_packets.rs.html
    @@ -1,4 +1,4 @@
    -signed_packets.rs - source

    iroh_dns_server/store/
    signed_packets.rs

    1use std::{
    +signed_packets.rs - source

    iroh_dns_server/store/
    signed_packets.rs

    1use std::{
     2    future::Future,
     3    path::Path,
     4    result,
    @@ -6,10 +6,10 @@
     6    time::{Duration, SystemTime},
     7};
     8
    -9use n0_snafu::{format_err, Result, ResultExt};
    +9use n0_snafu::{Result, ResultExt, format_err};
     10use pkarr::{SignedPacket, Timestamp};
     11use redb::{
    -12    backends::InMemoryBackend, Database, MultimapTableDefinition, ReadableTable, TableDefinition,
    +12    Database, MultimapTableDefinition, ReadableTable, TableDefinition, backends::InMemoryBackend,
     13};
     14use tokio::sync::{mpsc, oneshot};
     15use tokio_util::sync::CancellationToken;
    @@ -151,7 +151,7 @@
     151                            Message::Upsert { packet, res } => {
     152                                let key = PublicKeyBytes::from_signed_packet(&packet);
     153                                trace!("upsert {}", key);
    -154                                let replaced = if let Some(existing) = get_packet(&tables.signed_packets, &key)? {
    +154                                let replaced = match get_packet(&tables.signed_packets, &key)? { Some(existing) => {
     155                                    if existing.more_recent_than(&packet) {
     156                                        res.send(false).ok();
     157                                        continue;
    @@ -160,9 +160,9 @@
     160                                        tables.update_time.remove(&existing.timestamp().to_bytes(), key.as_bytes()).e()?;
     161                                        true
     162                                    }
    -163                                } else {
    +163                                } _ => {
     164                                    false
    -165                                };
    +165                                }};
     166                                let value = packet.serialize();
     167                                tables.signed_packets
     168                                    .insert(key.as_bytes(), &value[..]).e()?;
    @@ -177,14 +177,14 @@
     177                            }
     178                            Message::Remove { key, res } => {
     179                                trace!("remove {}", key);
    -180                                let updated = if let Some(row) = tables.signed_packets.remove(key.as_bytes()).e()? {
    +180                                let updated = match tables.signed_packets.remove(key.as_bytes()).e()? { Some(row) => {
     181                                    let packet = SignedPacket::deserialize(row.value()).e()?;
     182                                    tables.update_time.remove(&packet.timestamp().to_bytes(), key.as_bytes()).e()?;
     183                                    self.metrics.store_packets_removed.inc();
     184                                    true
    -185                                } else {
    +185                                } _ => {
     186                                    false
    -187                                };
    +187                                }};
     188                                res.send(updated).ok();
     189                            }
     190                            Message::Snapshot { res } => {
    @@ -193,7 +193,7 @@
     193                            }
     194                            Message::CheckExpired { key, time } => {
     195                                trace!("check expired {} at {}", key, fmt_time(time));
    -196                                if let Some(packet) = get_packet(&tables.signed_packets, &key)? {
    +196                                match get_packet(&tables.signed_packets, &key)? { Some(packet) => {
     197                                    let expired = Timestamp::now() - expiry_us;
     198                                    if packet.timestamp() < expired {
     199                                        tables.update_time.remove(&time.to_bytes(), key.as_bytes()).e()?;
    @@ -204,10 +204,10 @@
     204                                        debug!("packet {key} is no longer expired, removing obsolete expiry entry");
     205                                        tables.update_time.remove(&time.to_bytes(), key.as_bytes()).e()?;
     206                                    }
    -207                                } else {
    +207                                } _ => {
     208                                    debug!("expired packet {key} not found, remove from expiry table");
     209                                    tables.update_time.remove(&time.to_bytes(), key.as_bytes()).e()?;
    -210                                }
    +210                                }}
     211                            }
     212                        }
     213                    }
    @@ -272,236 +272,243 @@
     272                )
     273            })?;
     274        }
    -275        let db = Database::builder()
    +275        let mut db = Database::builder()
     276            .create(path)
     277            .context("failed to open packet database")?;
    -278        Self::open(db, options, metrics)
    -279    }
    -280
    -281    pub fn in_memory(options: Options, metrics: Arc<Metrics>) -> Result<Self> {
    -282        info!("using in-memory packet database");
    -283        let db = Database::builder()
    -284            .create_with_backend(InMemoryBackend::new())
    -285            .e()?;
    -286        Self::open(db, options, metrics)
    -287    }
    -288
    -289    pub fn open(db: Database, options: Options, metrics: Arc<Metrics>) -> Result<Self> {
    -290        // create tables
    -291        let write_tx = db.begin_write().e()?;
    -292        let _ = Tables::new(&write_tx).e()?;
    -293        write_tx.commit().e()?;
    -294        let (send, recv) = mpsc::channel(1024);
    -295        let send2 = send.clone();
    -296        let cancel = CancellationToken::new();
    -297        let cancel2 = cancel.clone();
    -298        let cancel3 = cancel.clone();
    -299        let actor = Actor {
    -300            db,
    -301            recv: PeekableReceiver::new(recv),
    -302            cancel: cancel2,
    -303            options,
    -304            metrics,
    -305        };
    -306        // start an io thread and donate it to the tokio runtime so we can do blocking IO
    -307        // inside the thread despite being in a tokio runtime
    -308        let _write_thread = IoThread::new("packet-store-actor", move || actor.run())?;
    -309        let _evict_thread = IoThread::new("packet-store-evict", move || {
    -310            evict_task(send2, options, cancel3)
    -311        })?;
    -312        Ok(Self {
    -313            send,
    -314            cancel,
    -315            _write_thread,
    -316            _evict_thread,
    -317        })
    -318    }
    -319
    -320    pub async fn upsert(&self, packet: SignedPacket) -> Result<bool> {
    -321        let (tx, rx) = oneshot::channel();
    -322        self.send
    -323            .send(Message::Upsert { packet, res: tx })
    -324            .await
    -325            .e()?;
    -326        rx.await.e()
    -327    }
    -328
    -329    pub async fn get(&self, key: &PublicKeyBytes) -> Result<Option<SignedPacket>> {
    -330        let (tx, rx) = oneshot::channel();
    -331        self.send
    -332            .send(Message::Get { key: *key, res: tx })
    -333            .await
    -334            .e()?;
    -335        rx.await.e()
    -336    }
    -337
    -338    pub async fn remove(&self, key: &PublicKeyBytes) -> Result<bool> {
    -339        let (tx, rx) = oneshot::channel();
    -340        self.send
    -341            .send(Message::Remove { key: *key, res: tx })
    -342            .await
    -343            .e()?;
    -344        rx.await.e()
    -345    }
    -346}
    -347
    -348fn get_packet(
    -349    table: &impl ReadableTable<&'static SignedPacketsKey, &'static [u8]>,
    -350    key: &PublicKeyBytes,
    -351) -> Result<Option<SignedPacket>> {
    -352    let Some(row) = table.get(key.as_ref()).context("database fetch failed")? else {
    -353        return Ok(None);
    -354    };
    -355    match SignedPacket::deserialize(row.value()) {
    -356        Ok(packet) => Ok(Some(packet)),
    -357        Err(err) => {
    -358            // Prior to iroh-dns-server v0.35, we stored packets in the default `SignedPacket::as_bytes` serialization from pkarr v2,
    -359            // which did not include the `last_seen` timestamp added as a prefix in `SignedPacket::serialize` from pkarr v3.
    -360            // If decoding the packet as a serialized pkarr v3 packet fails, we assume it was stored with iroh-dns-server before v0.35,
    -361            // and prepend an empty timestamp.
    -362            let data = row.value();
    -363            let mut buf = Vec::with_capacity(data.len() + 8);
    -364            buf.extend(&[0u8; 8]);
    -365            buf.extend(data);
    -366            match SignedPacket::deserialize(&buf) {
    -367                Ok(packet) => Ok(Some(packet)),
    -368                Err(err2) => Err(format_err!("Failed to decode as pkarr v3: {err:#}. Also failed to decode as pkarr v2: {err2:#}"))
    -369            }
    -370        }
    -371    }
    -372}
    -373
    -374async fn evict_task(send: mpsc::Sender<Message>, options: Options, cancel: CancellationToken) {
    -375    let cancel2 = cancel.clone();
    -376    let _ = cancel2
    -377        .run_until_cancelled(async move {
    -378            info!("starting evict task");
    -379            if let Err(cause) = evict_task_inner(send, options).await {
    -380                error!("evict task failed: {:?}", cause);
    -381            }
    -382            // when we are done for whatever reason we want to shut down the actor
    -383            cancel.cancel();
    -384        })
    -385        .await;
    -386}
    -387
    -388/// Periodically check for expired packets and remove them.
    -389async fn evict_task_inner(send: mpsc::Sender<Message>, options: Options) -> Result<()> {
    -390    let expiry_us = options.eviction.as_micros() as u64;
    -391    loop {
    -392        let (tx, rx) = oneshot::channel();
    -393        let _ = send.send(Message::Snapshot { res: tx }).await.ok();
    -394        // if we can't get the snapshot we exit the loop, main actor dead
    -395        let snapshot = rx.await.context("failed to get snapshot")?;
    -396
    -397        let expired = Timestamp::now() - expiry_us;
    -398        trace!("evicting packets older than {}", fmt_time(expired));
    -399        // if getting the range fails we exit the loop and shut down
    -400        // if individual reads fail we log the error and limp on
    -401        for item in snapshot.update_time.range(..expired.to_bytes()).e()? {
    -402            let (time, keys) = match item {
    -403                Ok(v) => v,
    -404                Err(e) => {
    -405                    error!("failed to read update_time row {:?}", e);
    -406                    continue;
    -407                }
    -408            };
    -409            let time = Timestamp::from(time.value());
    -410            trace!("evicting expired packets at {}", fmt_time(time));
    -411            for item in keys {
    -412                let key = match item {
    -413                    Ok(v) => v,
    -414                    Err(e) => {
    -415                        error!(
    -416                            "failed to read update_time item at {}: {:?}",
    -417                            fmt_time(time),
    -418                            e
    -419                        );
    -420                        continue;
    -421                    }
    -422                };
    -423                let key = PublicKeyBytes::new(key.value());
    -424
    -425                debug!("evicting expired packet {} {}", fmt_time(time), key);
    -426                send.send(Message::CheckExpired { time, key }).await.e()?;
    -427            }
    -428        }
    -429        // sleep for the eviction interval so we don't constantly check
    -430        tokio::time::sleep(options.eviction_interval).await;
    -431    }
    -432}
    -433
    -434/// An io thread that drives a future to completion on the current tokio runtime
    -435///
    -436/// Inside the future, blocking IO can be done without blocking one of the tokio
    -437/// pool threads.
    -438#[derive(Debug)]
    -439struct IoThread {
    -440    handle: Option<std::thread::JoinHandle<()>>,
    -441}
    -442
    -443impl IoThread {
    -444    /// Spawn a new io thread.
    -445    ///
    -446    /// Calling this function requires that the current thread is running in a
    -447    /// tokio runtime. It is up to the caller to make sure the future exits,
    -448    /// e.g. by using a cancellation token. Otherwise, drop will block.
    -449    fn new<F, Fut>(name: &str, f: F) -> Result<Self>
    -450    where
    -451        F: FnOnce() -> Fut + Send + 'static,
    -452        Fut: Future<Output = ()>,
    -453    {
    -454        let rt = tokio::runtime::Handle::try_current().context("get tokio handle")?;
    -455        let handle = std::thread::Builder::new()
    -456            .name(name.into())
    -457            .spawn(move || rt.block_on(f()))
    -458            .context("failed to spawn thread")?;
    -459        Ok(Self {
    -460            handle: Some(handle),
    -461        })
    -462    }
    -463}
    -464
    -465impl Drop for IoThread {
    -466    fn drop(&mut self) {
    -467        if let Some(handle) = self.handle.take() {
    -468            let _ = handle.join();
    -469        }
    -470    }
    -471}
    -472
    -473/// A wrapper for a tokio mpsc receiver that allows peeking at the next message.
    -474#[derive(Debug)]
    -475pub(super) struct PeekableReceiver<T> {
    -476    msg: Option<T>,
    -477    recv: tokio::sync::mpsc::Receiver<T>,
    +278        match db.upgrade() {
    +279            Ok(true) => info!("Database was upgraded to redb v3 compatible format"),
    +280            Ok(false) => {}
    +281            Err(err) => warn!("Database upgrade to redb v3 compatible format failed: {err:#}"),
    +282        }
    +283        Self::open(db, options, metrics)
    +284    }
    +285
    +286    pub fn in_memory(options: Options, metrics: Arc<Metrics>) -> Result<Self> {
    +287        info!("using in-memory packet database");
    +288        let db = Database::builder()
    +289            .create_with_backend(InMemoryBackend::new())
    +290            .e()?;
    +291        Self::open(db, options, metrics)
    +292    }
    +293
    +294    pub fn open(db: Database, options: Options, metrics: Arc<Metrics>) -> Result<Self> {
    +295        // create tables
    +296        let write_tx = db.begin_write().e()?;
    +297        let _ = Tables::new(&write_tx).e()?;
    +298        write_tx.commit().e()?;
    +299        let (send, recv) = mpsc::channel(1024);
    +300        let send2 = send.clone();
    +301        let cancel = CancellationToken::new();
    +302        let cancel2 = cancel.clone();
    +303        let cancel3 = cancel.clone();
    +304        let actor = Actor {
    +305            db,
    +306            recv: PeekableReceiver::new(recv),
    +307            cancel: cancel2,
    +308            options,
    +309            metrics,
    +310        };
    +311        // start an io thread and donate it to the tokio runtime so we can do blocking IO
    +312        // inside the thread despite being in a tokio runtime
    +313        let _write_thread = IoThread::new("packet-store-actor", move || actor.run())?;
    +314        let _evict_thread = IoThread::new("packet-store-evict", move || {
    +315            evict_task(send2, options, cancel3)
    +316        })?;
    +317        Ok(Self {
    +318            send,
    +319            cancel,
    +320            _write_thread,
    +321            _evict_thread,
    +322        })
    +323    }
    +324
    +325    pub async fn upsert(&self, packet: SignedPacket) -> Result<bool> {
    +326        let (tx, rx) = oneshot::channel();
    +327        self.send
    +328            .send(Message::Upsert { packet, res: tx })
    +329            .await
    +330            .e()?;
    +331        rx.await.e()
    +332    }
    +333
    +334    pub async fn get(&self, key: &PublicKeyBytes) -> Result<Option<SignedPacket>> {
    +335        let (tx, rx) = oneshot::channel();
    +336        self.send
    +337            .send(Message::Get { key: *key, res: tx })
    +338            .await
    +339            .e()?;
    +340        rx.await.e()
    +341    }
    +342
    +343    pub async fn remove(&self, key: &PublicKeyBytes) -> Result<bool> {
    +344        let (tx, rx) = oneshot::channel();
    +345        self.send
    +346            .send(Message::Remove { key: *key, res: tx })
    +347            .await
    +348            .e()?;
    +349        rx.await.e()
    +350    }
    +351}
    +352
    +353fn get_packet(
    +354    table: &impl ReadableTable<&'static SignedPacketsKey, &'static [u8]>,
    +355    key: &PublicKeyBytes,
    +356) -> Result<Option<SignedPacket>> {
    +357    let Some(row) = table.get(key.as_ref()).context("database fetch failed")? else {
    +358        return Ok(None);
    +359    };
    +360    match SignedPacket::deserialize(row.value()) {
    +361        Ok(packet) => Ok(Some(packet)),
    +362        Err(err) => {
    +363            // Prior to iroh-dns-server v0.35, we stored packets in the default `SignedPacket::as_bytes` serialization from pkarr v2,
    +364            // which did not include the `last_seen` timestamp added as a prefix in `SignedPacket::serialize` from pkarr v3.
    +365            // If decoding the packet as a serialized pkarr v3 packet fails, we assume it was stored with iroh-dns-server before v0.35,
    +366            // and prepend an empty timestamp.
    +367            let data = row.value();
    +368            let mut buf = Vec::with_capacity(data.len() + 8);
    +369            buf.extend(&[0u8; 8]);
    +370            buf.extend(data);
    +371            match SignedPacket::deserialize(&buf) {
    +372                Ok(packet) => Ok(Some(packet)),
    +373                Err(err2) => Err(format_err!(
    +374                    "Failed to decode as pkarr v3: {err:#}. Also failed to decode as pkarr v2: {err2:#}"
    +375                )),
    +376            }
    +377        }
    +378    }
    +379}
    +380
    +381async fn evict_task(send: mpsc::Sender<Message>, options: Options, cancel: CancellationToken) {
    +382    let cancel2 = cancel.clone();
    +383    let _ = cancel2
    +384        .run_until_cancelled(async move {
    +385            info!("starting evict task");
    +386            if let Err(cause) = evict_task_inner(send, options).await {
    +387                error!("evict task failed: {:?}", cause);
    +388            }
    +389            // when we are done for whatever reason we want to shut down the actor
    +390            cancel.cancel();
    +391        })
    +392        .await;
    +393}
    +394
    +395/// Periodically check for expired packets and remove them.
    +396async fn evict_task_inner(send: mpsc::Sender<Message>, options: Options) -> Result<()> {
    +397    let expiry_us = options.eviction.as_micros() as u64;
    +398    loop {
    +399        let (tx, rx) = oneshot::channel();
    +400        let _ = send.send(Message::Snapshot { res: tx }).await.ok();
    +401        // if we can't get the snapshot we exit the loop, main actor dead
    +402        let snapshot = rx.await.context("failed to get snapshot")?;
    +403
    +404        let expired = Timestamp::now() - expiry_us;
    +405        trace!("evicting packets older than {}", fmt_time(expired));
    +406        // if getting the range fails we exit the loop and shut down
    +407        // if individual reads fail we log the error and limp on
    +408        for item in snapshot.update_time.range(..expired.to_bytes()).e()? {
    +409            let (time, keys) = match item {
    +410                Ok(v) => v,
    +411                Err(e) => {
    +412                    error!("failed to read update_time row {:?}", e);
    +413                    continue;
    +414                }
    +415            };
    +416            let time = Timestamp::from(time.value());
    +417            trace!("evicting expired packets at {}", fmt_time(time));
    +418            for item in keys {
    +419                let key = match item {
    +420                    Ok(v) => v,
    +421                    Err(e) => {
    +422                        error!(
    +423                            "failed to read update_time item at {}: {:?}",
    +424                            fmt_time(time),
    +425                            e
    +426                        );
    +427                        continue;
    +428                    }
    +429                };
    +430                let key = PublicKeyBytes::new(key.value());
    +431
    +432                debug!("evicting expired packet {} {}", fmt_time(time), key);
    +433                send.send(Message::CheckExpired { time, key }).await.e()?;
    +434            }
    +435        }
    +436        // sleep for the eviction interval so we don't constantly check
    +437        tokio::time::sleep(options.eviction_interval).await;
    +438    }
    +439}
    +440
    +441/// An io thread that drives a future to completion on the current tokio runtime
    +442///
    +443/// Inside the future, blocking IO can be done without blocking one of the tokio
    +444/// pool threads.
    +445#[derive(Debug)]
    +446struct IoThread {
    +447    handle: Option<std::thread::JoinHandle<()>>,
    +448}
    +449
    +450impl IoThread {
    +451    /// Spawn a new io thread.
    +452    ///
    +453    /// Calling this function requires that the current thread is running in a
    +454    /// tokio runtime. It is up to the caller to make sure the future exits,
    +455    /// e.g. by using a cancellation token. Otherwise, drop will block.
    +456    fn new<F, Fut>(name: &str, f: F) -> Result<Self>
    +457    where
    +458        F: FnOnce() -> Fut + Send + 'static,
    +459        Fut: Future<Output = ()>,
    +460    {
    +461        let rt = tokio::runtime::Handle::try_current().context("get tokio handle")?;
    +462        let handle = std::thread::Builder::new()
    +463            .name(name.into())
    +464            .spawn(move || rt.block_on(f()))
    +465            .context("failed to spawn thread")?;
    +466        Ok(Self {
    +467            handle: Some(handle),
    +468        })
    +469    }
    +470}
    +471
    +472impl Drop for IoThread {
    +473    fn drop(&mut self) {
    +474        if let Some(handle) = self.handle.take() {
    +475            let _ = handle.join();
    +476        }
    +477    }
     478}
     479
    -480#[allow(dead_code)]
    -481impl<T> PeekableReceiver<T> {
    -482    pub fn new(recv: tokio::sync::mpsc::Receiver<T>) -> Self {
    -483        Self { msg: None, recv }
    -484    }
    -485
    -486    /// Receive the next message.
    -487    ///
    -488    /// Will block if there are no messages.
    -489    /// Returns None only if there are no more messages (sender is dropped).
    -490    pub async fn recv(&mut self) -> Option<T> {
    -491        if let Some(msg) = self.msg.take() {
    -492            return Some(msg);
    -493        }
    -494        self.recv.recv().await
    -495    }
    -496
    -497    /// Push back a message. This will only work if there is room for it.
    -498    /// Otherwise, it will fail and return the message.
    -499    pub fn push_back(&mut self, msg: T) -> std::result::Result<(), T> {
    -500        if self.msg.is_none() {
    -501            self.msg = Some(msg);
    -502            Ok(())
    -503        } else {
    -504            Err(msg)
    -505        }
    -506    }
    -507}
    \ No newline at end of file +480/// A wrapper for a tokio mpsc receiver that allows peeking at the next message. +481#[derive(Debug)] +482pub(super) struct PeekableReceiver<T> { +483 msg: Option<T>, +484 recv: tokio::sync::mpsc::Receiver<T>, +485} +486 +487#[allow(dead_code)] +488impl<T> PeekableReceiver<T> { +489 pub fn new(recv: tokio::sync::mpsc::Receiver<T>) -> Self { +490 Self { msg: None, recv } +491 } +492 +493 /// Receive the next message. +494 /// +495 /// Will block if there are no messages. +496 /// Returns None only if there are no more messages (sender is dropped). +497 pub async fn recv(&mut self) -> Option<T> { +498 if let Some(msg) = self.msg.take() { +499 return Some(msg); +500 } +501 self.recv.recv().await +502 } +503 +504 /// Push back a message. This will only work if there is room for it. +505 /// Otherwise, it will fail and return the message. +506 pub fn push_back(&mut self, msg: T) -> std::result::Result<(), T> { +507 if self.msg.is_none() { +508 self.msg = Some(msg); +509 Ok(()) +510 } else { +511 Err(msg) +512 } +513 } +514}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_dns_server/util.rs.html b/pr/3367/docs/src/iroh_dns_server/util.rs.html index 261c0e6192..c13bddd2b8 100644 --- a/pr/3367/docs/src/iroh_dns_server/util.rs.html +++ b/pr/3367/docs/src/iroh_dns_server/util.rs.html @@ -1,6 +1,6 @@ -util.rs - source

    iroh_dns_server/
    util.rs

    1use core::fmt;
    +util.rs - source

    iroh_dns_server/
    util.rs

    1use core::fmt;
     2use std::{
    -3    collections::{btree_map, BTreeMap},
    +3    collections::{BTreeMap, btree_map},
     4    str::FromStr,
     5    sync::Arc,
     6};
    @@ -8,8 +8,8 @@
     8use hickory_server::proto::{
     9    op::Message,
     10    rr::{
    -11        domain::{IntoLabel, Label},
    -12        Name, Record, RecordSet, RecordType, RrKey,
    +11        Name, Record, RecordSet, RecordType, RrKey,
    +12        domain::{IntoLabel, Label},
     13    },
     14    serialize::binary::BinDecodable,
     15};
    diff --git a/pr/3367/docs/src/iroh_relay/client.rs.html b/pr/3367/docs/src/iroh_relay/client.rs.html
    index 01363191dc..9a29e2cfda 100644
    --- a/pr/3367/docs/src/iroh_relay/client.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/client.rs.html
    @@ -1,4 +1,4 @@
    -client.rs - source

    iroh_relay/
    client.rs

    1//! Exposes [`Client`], which allows to establish connections to a relay server.
    +client.rs - source

    iroh_relay/
    client.rs

    1//! Exposes [`Client`], which allows to establish connections to a relay server.
     2//!
     3//! Based on tailscale/derp/derphttp/derphttp_client.go
     4
    @@ -12,121 +12,121 @@
     12use conn::Conn;
     13use iroh_base::{RelayUrl, SecretKey};
     14use n0_future::{
    -15    split::{split, SplitSink, SplitStream},
    -16    time, Sink, Stream,
    -17};
    -18use nested_enum_utils::common_fields;
    -19use snafu::{Backtrace, Snafu};
    -20#[cfg(any(test, feature = "test-utils"))]
    -21use tracing::warn;
    -22use tracing::{debug, event, trace, Level};
    -23use url::Url;
    -24
    -25pub use self::conn::{ReceivedMessage, RecvError, SendError, SendMessage};
    -26#[cfg(not(wasm_browser))]
    -27use crate::dns::{DnsError, DnsResolver};
    -28use crate::{
    -29    http::{Protocol, RELAY_PATH},
    -30    protos::relay::SendError as SendRelayError,
    -31    KeyCache,
    -32};
    -33
    -34pub(crate) mod conn;
    -35#[cfg(not(wasm_browser))]
    -36pub(crate) mod streams;
    -37#[cfg(not(wasm_browser))]
    -38mod tls;
    +15    Sink, Stream,
    +16    split::{SplitSink, SplitStream, split},
    +17    time,
    +18};
    +19use nested_enum_utils::common_fields;
    +20use snafu::{Backtrace, Snafu};
    +21#[cfg(any(test, feature = "test-utils"))]
    +22use tracing::warn;
    +23use tracing::{Level, debug, event, trace};
    +24use url::Url;
    +25
    +26pub use self::conn::{RecvError, SendError};
    +27#[cfg(not(wasm_browser))]
    +28use crate::dns::{DnsError, DnsResolver};
    +29use crate::{
    +30    KeyCache,
    +31    http::RELAY_PATH,
    +32    protos::{
    +33        handshake,
    +34        relay::{ClientToRelayMsg, RelayToClientMsg},
    +35    },
    +36};
    +37
    +38pub(crate) mod conn;
     39#[cfg(not(wasm_browser))]
    -40mod util;
    -41
    -42/// Connection errors.
    -43///
    -44/// `ConnectError` contains `DialError`, errors that can occur while dialing the
    -45/// relay, as well as errors that occur while creating or maintaining a connection.
    -46#[common_fields({
    -47    backtrace: Option<Backtrace>,
    -48    #[snafu(implicit)]
    -49    span_trace: n0_snafu::SpanTrace,
    -50})]
    -51#[allow(missing_docs)]
    -52#[derive(Debug, Snafu)]
    -53#[non_exhaustive]
    -54pub enum ConnectError {
    -55    #[snafu(display("Invalid URL for websocket: {url}"))]
    -56    InvalidWebsocketUrl { url: Url },
    -57    #[snafu(display("Invalid relay URL: {url}"))]
    -58    InvalidRelayUrl { url: Url },
    -59    #[snafu(transparent)]
    -60    Websocket {
    -61        #[cfg(not(wasm_browser))]
    -62        source: tokio_websockets::Error,
    -63        #[cfg(wasm_browser)]
    -64        source: ws_stream_wasm::WsErr,
    -65    },
    -66    #[snafu(transparent)]
    -67    Handshake { source: SendRelayError },
    -68    #[snafu(transparent)]
    -69    Dial { source: DialError },
    -70    #[snafu(display("Unexpected status during upgrade: {code}"))]
    -71    UnexpectedUpgradeStatus { code: hyper::StatusCode },
    -72    #[snafu(display("Failed to upgrade response"))]
    -73    Upgrade { source: hyper::Error },
    -74    #[snafu(display("Invalid TLS servername"))]
    -75    InvalidTlsServername {},
    -76    #[snafu(display("No local address available"))]
    -77    NoLocalAddr {},
    -78    #[snafu(display("tls connection failed"))]
    -79    Tls { source: std::io::Error },
    -80    #[cfg(wasm_browser)]
    -81    #[snafu(display("The relay protocol is not available in browsers"))]
    -82    RelayProtoNotAvailable {},
    -83}
    -84
    -85/// Errors that can occur while dialing the relay server.
    -86#[common_fields({
    -87    backtrace: Option<Backtrace>,
    -88    #[snafu(implicit)]
    -89    span_trace: n0_snafu::SpanTrace,
    -90})]
    -91#[allow(missing_docs)]
    -92#[derive(Debug, Snafu)]
    -93#[non_exhaustive]
    -94pub enum DialError {
    -95    #[snafu(display("Invliad target port"))]
    -96    InvalidTargetPort {},
    -97    #[snafu(transparent)]
    -98    #[cfg(not(wasm_browser))]
    -99    Dns { source: DnsError },
    -100    #[snafu(transparent)]
    -101    Timeout { source: time::Elapsed },
    -102    #[snafu(transparent)]
    -103    Io { source: std::io::Error },
    -104    #[snafu(display("Invalid URL: {url}"))]
    -105    InvalidUrl { url: Url },
    -106    #[snafu(display("Failed proxy connection: {status}"))]
    -107    ProxyConnectInvalidStatus { status: hyper::StatusCode },
    -108    #[snafu(display("Invalid Proxy URL {proxy_url}"))]
    -109    ProxyInvalidUrl { proxy_url: Url },
    -110    #[snafu(display("failed to establish proxy connection"))]
    -111    ProxyConnect { source: hyper::Error },
    -112    #[snafu(display("Invalid proxy TLS servername: {proxy_hostname}"))]
    -113    ProxyInvalidTlsServername { proxy_hostname: String },
    -114    #[snafu(display("Invalid proxy target port"))]
    -115    ProxyInvalidTargetPort {},
    -116}
    -117
    -118/// Build a Client.
    -119#[derive(derive_more::Debug, Clone)]
    -120pub struct ClientBuilder {
    -121    /// Default is None
    -122    #[debug("address family selector callback")]
    -123    address_family_selector: Option<Arc<dyn Fn() -> bool + Send + Sync>>,
    -124    /// Default is false
    -125    is_prober: bool,
    -126    /// Server url.
    -127    url: RelayUrl,
    -128    /// Relay protocol
    -129    protocol: Protocol,
    +40pub(crate) mod streams;
    +41#[cfg(not(wasm_browser))]
    +42mod tls;
    +43#[cfg(not(wasm_browser))]
    +44mod util;
    +45
    +46/// Connection errors.
    +47///
    +48/// `ConnectError` contains `DialError`, errors that can occur while dialing the
    +49/// relay, as well as errors that occur while creating or maintaining a connection.
    +50#[common_fields({
    +51    backtrace: Option<Backtrace>,
    +52    #[snafu(implicit)]
    +53    span_trace: n0_snafu::SpanTrace,
    +54})]
    +55#[allow(missing_docs)]
    +56#[derive(Debug, Snafu)]
    +57#[non_exhaustive]
    +58pub enum ConnectError {
    +59    #[snafu(display("Invalid URL for websocket: {url}"))]
    +60    InvalidWebsocketUrl { url: Url },
    +61    #[snafu(display("Invalid relay URL: {url}"))]
    +62    InvalidRelayUrl { url: Url },
    +63    #[snafu(transparent)]
    +64    Websocket {
    +65        #[cfg(not(wasm_browser))]
    +66        source: tokio_websockets::Error,
    +67        #[cfg(wasm_browser)]
    +68        source: ws_stream_wasm::WsErr,
    +69    },
    +70    #[snafu(transparent)]
    +71    Handshake { source: handshake::Error },
    +72    #[snafu(transparent)]
    +73    Dial { source: DialError },
    +74    #[snafu(display("Unexpected status during upgrade: {code}"))]
    +75    UnexpectedUpgradeStatus { code: hyper::StatusCode },
    +76    #[snafu(display("Failed to upgrade response"))]
    +77    Upgrade { source: hyper::Error },
    +78    #[snafu(display("Invalid TLS servername"))]
    +79    InvalidTlsServername {},
    +80    #[snafu(display("No local address available"))]
    +81    NoLocalAddr {},
    +82    #[snafu(display("tls connection failed"))]
    +83    Tls { source: std::io::Error },
    +84    #[cfg(wasm_browser)]
    +85    #[snafu(display("The relay protocol is not available in browsers"))]
    +86    RelayProtoNotAvailable {},
    +87}
    +88
    +89/// Errors that can occur while dialing the relay server.
    +90#[common_fields({
    +91    backtrace: Option<Backtrace>,
    +92    #[snafu(implicit)]
    +93    span_trace: n0_snafu::SpanTrace,
    +94})]
    +95#[allow(missing_docs)]
    +96#[derive(Debug, Snafu)]
    +97#[non_exhaustive]
    +98pub enum DialError {
    +99    #[snafu(display("Invliad target port"))]
    +100    InvalidTargetPort {},
    +101    #[snafu(transparent)]
    +102    #[cfg(not(wasm_browser))]
    +103    Dns { source: DnsError },
    +104    #[snafu(transparent)]
    +105    Timeout { source: time::Elapsed },
    +106    #[snafu(transparent)]
    +107    Io { source: std::io::Error },
    +108    #[snafu(display("Invalid URL: {url}"))]
    +109    InvalidUrl { url: Url },
    +110    #[snafu(display("Failed proxy connection: {status}"))]
    +111    ProxyConnectInvalidStatus { status: hyper::StatusCode },
    +112    #[snafu(display("Invalid Proxy URL {proxy_url}"))]
    +113    ProxyInvalidUrl { proxy_url: Url },
    +114    #[snafu(display("failed to establish proxy connection"))]
    +115    ProxyConnect { source: hyper::Error },
    +116    #[snafu(display("Invalid proxy TLS servername: {proxy_hostname}"))]
    +117    ProxyInvalidTlsServername { proxy_hostname: String },
    +118    #[snafu(display("Invalid proxy target port"))]
    +119    ProxyInvalidTargetPort {},
    +120}
    +121
    +122/// Build a Client.
    +123#[derive(derive_more::Debug, Clone)]
    +124pub struct ClientBuilder {
    +125    /// Default is None
    +126    #[debug("address family selector callback")]
    +127    address_family_selector: Option<Arc<dyn Fn() -> bool + Send + Sync>>,
    +128    /// Server url.
    +129    url: RelayUrl,
     130    /// Allow self-signed certificates from relay servers
     131    #[cfg(any(test, feature = "test-utils"))]
     132    insecure_skip_cert_verify: bool,
    @@ -150,304 +150,378 @@
     150    ) -> Self {
     151        ClientBuilder {
     152            address_family_selector: None,
    -153            is_prober: false,
    -154            url: url.into(),
    -155
    -156            // Resolves to websockets in browsers and relay otherwise
    -157            protocol: Protocol::default(),
    -158
    -159            #[cfg(any(test, feature = "test-utils"))]
    -160            insecure_skip_cert_verify: false,
    -161
    -162            proxy_url: None,
    -163            secret_key,
    -164            #[cfg(not(wasm_browser))]
    -165            dns_resolver,
    -166            key_cache: KeyCache::new(128),
    -167        }
    -168    }
    -169
    -170    /// Sets whether to connect to the relay via websockets or not.
    -171    /// Set to use non-websocket, normal relaying by default.
    -172    pub fn protocol(mut self, protocol: Protocol) -> Self {
    -173        self.protocol = protocol;
    -174        self
    -175    }
    -176
    -177    /// Returns if we should prefer ipv6
    -178    /// it replaces the relayhttp.AddressFamilySelector we pass
    -179    /// It provides the hint as to whether in an IPv4-vs-IPv6 race that
    -180    /// IPv4 should be held back a bit to give IPv6 a better-than-50/50
    -181    /// chance of winning. We only return true when we believe IPv6 will
    -182    /// work anyway, so we don't artificially delay the connection speed.
    -183    pub fn address_family_selector<S>(mut self, selector: S) -> Self
    -184    where
    -185        S: Fn() -> bool + Send + Sync + 'static,
    -186    {
    -187        self.address_family_selector = Some(Arc::new(selector));
    -188        self
    -189    }
    -190
    -191    /// Indicates this client is a prober
    -192    pub fn is_prober(mut self, is: bool) -> Self {
    -193        self.is_prober = is;
    -194        self
    -195    }
    -196
    -197    /// Skip the verification of the relay server's SSL certificates.
    -198    ///
    -199    /// May only be used in tests.
    -200    #[cfg(any(test, feature = "test-utils"))]
    -201    pub fn insecure_skip_cert_verify(mut self, skip: bool) -> Self {
    -202        self.insecure_skip_cert_verify = skip;
    -203        self
    -204    }
    -205
    -206    /// Set an explicit proxy url to proxy all HTTP(S) traffic through.
    -207    pub fn proxy_url(mut self, url: Url) -> Self {
    -208        self.proxy_url.replace(url);
    -209        self
    -210    }
    +153            url: url.into(),
    +154
    +155            #[cfg(any(test, feature = "test-utils"))]
    +156            insecure_skip_cert_verify: false,
    +157
    +158            proxy_url: None,
    +159            secret_key,
    +160            #[cfg(not(wasm_browser))]
    +161            dns_resolver,
    +162            key_cache: KeyCache::new(128),
    +163        }
    +164    }
    +165
    +166    /// Returns if we should prefer ipv6
    +167    /// it replaces the relayhttp.AddressFamilySelector we pass
    +168    /// It provides the hint as to whether in an IPv4-vs-IPv6 race that
    +169    /// IPv4 should be held back a bit to give IPv6 a better-than-50/50
    +170    /// chance of winning. We only return true when we believe IPv6 will
    +171    /// work anyway, so we don't artificially delay the connection speed.
    +172    pub fn address_family_selector<S>(mut self, selector: S) -> Self
    +173    where
    +174        S: Fn() -> bool + Send + Sync + 'static,
    +175    {
    +176        self.address_family_selector = Some(Arc::new(selector));
    +177        self
    +178    }
    +179
    +180    /// Skip the verification of the relay server's SSL certificates.
    +181    ///
    +182    /// May only be used in tests.
    +183    #[cfg(any(test, feature = "test-utils"))]
    +184    pub fn insecure_skip_cert_verify(mut self, skip: bool) -> Self {
    +185        self.insecure_skip_cert_verify = skip;
    +186        self
    +187    }
    +188
    +189    /// Set an explicit proxy url to proxy all HTTP(S) traffic through.
    +190    pub fn proxy_url(mut self, url: Url) -> Self {
    +191        self.proxy_url.replace(url);
    +192        self
    +193    }
    +194
    +195    /// Set the capacity of the cache for public keys.
    +196    pub fn key_cache_capacity(mut self, capacity: usize) -> Self {
    +197        self.key_cache = KeyCache::new(capacity);
    +198        self
    +199    }
    +200
    +201    /// Establishes a new connection to the relay server.
    +202    #[cfg(not(wasm_browser))]
    +203    pub async fn connect(&self) -> Result<Client, ConnectError> {
    +204        use http::header::SEC_WEBSOCKET_PROTOCOL;
    +205        use tls::MaybeTlsStreamBuilder;
    +206
    +207        use crate::{
    +208            http::{CLIENT_AUTH_HEADER, RELAY_PROTOCOL_VERSION},
    +209            protos::{handshake::KeyMaterialClientAuth, relay::MAX_FRAME_SIZE},
    +210        };
     211
    -212    /// Set the capacity of the cache for public keys.
    -213    pub fn key_cache_capacity(mut self, capacity: usize) -> Self {
    -214        self.key_cache = KeyCache::new(capacity);
    -215        self
    -216    }
    -217
    -218    /// Establishes a new connection to the relay server.
    -219    pub async fn connect(&self) -> Result<Client, ConnectError> {
    -220        let (conn, local_addr) = match self.protocol {
    -221            #[cfg(wasm_browser)]
    -222            Protocol::Websocket => {
    -223                let conn = self.connect_ws().await?;
    -224                let local_addr = None;
    -225                (conn, local_addr)
    -226            }
    -227            #[cfg(not(wasm_browser))]
    -228            Protocol::Websocket => {
    -229                let (conn, local_addr) = self.connect_ws().await?;
    -230                (conn, Some(local_addr))
    -231            }
    -232            #[cfg(not(wasm_browser))]
    -233            Protocol::Relay => {
    -234                let (conn, local_addr) = self.connect_relay().await?;
    -235                (conn, Some(local_addr))
    -236            }
    -237            #[cfg(wasm_browser)]
    -238            Protocol::Relay => return Err(RelayProtoNotAvailableSnafu.build()),
    -239        };
    +212        let mut dial_url = (*self.url).clone();
    +213        dial_url.set_path(RELAY_PATH);
    +214        // The relay URL is exchanged with the http(s) scheme in tickets and similar.
    +215        // We need to use the ws:// or wss:// schemes when connecting with websockets, though.
    +216        dial_url
    +217            .set_scheme(match self.url.scheme() {
    +218                "http" => "ws",
    +219                "ws" => "ws",
    +220                _ => "wss",
    +221            })
    +222            .map_err(|_| {
    +223                InvalidWebsocketUrlSnafu {
    +224                    url: dial_url.clone(),
    +225                }
    +226                .build()
    +227            })?;
    +228
    +229        debug!(%dial_url, "Dialing relay by websocket");
    +230
    +231        #[allow(unused_mut)]
    +232        let mut builder = MaybeTlsStreamBuilder::new(dial_url.clone(), self.dns_resolver.clone())
    +233            .prefer_ipv6(self.prefer_ipv6())
    +234            .proxy_url(self.proxy_url.clone());
    +235
    +236        #[cfg(any(test, feature = "test-utils"))]
    +237        if self.insecure_skip_cert_verify {
    +238            builder = builder.insecure_skip_cert_verify(self.insecure_skip_cert_verify);
    +239        }
     240
    -241        event!(
    -242            target: "events.net.relay.connected",
    -243            Level::DEBUG,
    -244            url = %self.url,
    -245            protocol = ?self.protocol,
    -246        );
    -247
    -248        trace!("connect done");
    -249        Ok(Client { conn, local_addr })
    -250    }
    -251
    -252    #[cfg(wasm_browser)]
    -253    async fn connect_ws(&self) -> Result<Conn, ConnectError> {
    -254        let mut dial_url = (*self.url).clone();
    -255        dial_url.set_path(RELAY_PATH);
    -256        // The relay URL is exchanged with the http(s) scheme in tickets and similar.
    -257        // We need to use the ws:// or wss:// schemes when connecting with websockets, though.
    -258        dial_url
    -259            .set_scheme(match self.url.scheme() {
    -260                "http" => "ws",
    -261                "ws" => "ws",
    -262                _ => "wss",
    -263            })
    -264            .map_err(|_| {
    -265                InvalidWebsocketUrlSnafu {
    -266                    url: dial_url.clone(),
    -267                }
    -268                .build()
    -269            })?;
    -270
    -271        debug!(%dial_url, "Dialing relay by websocket");
    -272
    -273        let (_, ws_stream) = ws_stream_wasm::WsMeta::connect(dial_url.as_str(), None).await?;
    -274        let conn =
    -275            Conn::new_ws_browser(ws_stream, self.key_cache.clone(), &self.secret_key).await?;
    -276        Ok(conn)
    -277    }
    -278}
    -279
    -280/// A relay client.
    -281#[derive(Debug)]
    -282pub struct Client {
    -283    conn: Conn,
    -284    local_addr: Option<SocketAddr>,
    -285}
    -286
    -287impl Client {
    -288    /// Splits the client into a sink and a stream.
    -289    pub fn split(self) -> (ClientStream, ClientSink) {
    -290        let (sink, stream) = split(self.conn);
    -291        (
    -292            ClientStream {
    -293                stream,
    -294                local_addr: self.local_addr,
    -295            },
    -296            ClientSink { sink },
    -297        )
    -298    }
    -299}
    -300
    -301impl Stream for Client {
    -302    type Item = Result<ReceivedMessage, RecvError>;
    -303
    -304    fn poll_next(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Option<Self::Item>> {
    -305        Pin::new(&mut self.conn).poll_next(cx)
    -306    }
    -307}
    -308
    -309impl Sink<SendMessage> for Client {
    -310    type Error = SendError;
    -311
    -312    fn poll_ready(
    -313        mut self: Pin<&mut Self>,
    -314        cx: &mut task::Context<'_>,
    -315    ) -> Poll<Result<(), Self::Error>> {
    -316        <Conn as Sink<SendMessage>>::poll_ready(Pin::new(&mut self.conn), cx)
    -317    }
    -318
    -319    fn start_send(mut self: Pin<&mut Self>, item: SendMessage) -> Result<(), Self::Error> {
    -320        Pin::new(&mut self.conn).start_send(item)
    -321    }
    -322
    -323    fn poll_flush(
    -324        mut self: Pin<&mut Self>,
    -325        cx: &mut task::Context<'_>,
    -326    ) -> Poll<Result<(), Self::Error>> {
    -327        <Conn as Sink<SendMessage>>::poll_flush(Pin::new(&mut self.conn), cx)
    -328    }
    -329
    -330    fn poll_close(
    -331        mut self: Pin<&mut Self>,
    -332        cx: &mut task::Context<'_>,
    -333    ) -> Poll<Result<(), Self::Error>> {
    -334        <Conn as Sink<SendMessage>>::poll_close(Pin::new(&mut self.conn), cx)
    -335    }
    -336}
    -337
    -338/// The send half of a relay client.
    -339#[derive(Debug)]
    -340pub struct ClientSink {
    -341    sink: SplitSink<Conn, SendMessage>,
    -342}
    -343
    -344impl Sink<SendMessage> for ClientSink {
    -345    type Error = SendError;
    +241        let stream = builder.connect().await?;
    +242        let local_addr = stream
    +243            .as_ref()
    +244            .local_addr()
    +245            .map_err(|_| NoLocalAddrSnafu.build())?;
    +246        let mut builder = tokio_websockets::ClientBuilder::new()
    +247            .uri(dial_url.as_str())
    +248            .map_err(|_| {
    +249                InvalidRelayUrlSnafu {
    +250                    url: dial_url.clone(),
    +251                }
    +252                .build()
    +253            })?
    +254            .add_header(
    +255                SEC_WEBSOCKET_PROTOCOL,
    +256                http::HeaderValue::from_static(RELAY_PROTOCOL_VERSION),
    +257            )
    +258            .expect("valid header name and value")
    +259            .limits(tokio_websockets::Limits::default().max_payload_len(Some(MAX_FRAME_SIZE)))
    +260            // We turn off automatic flushing after a threshold (the default would be after 8KB).
    +261            // This means we need to flush manually, which we do by calling `Sink::send_all` or
    +262            // `Sink::send` (which calls `Sink::flush`) in the `ActiveRelayActor`.
    +263            .config(tokio_websockets::Config::default().flush_threshold(usize::MAX));
    +264        if let Some(client_auth) = KeyMaterialClientAuth::new(&self.secret_key, &stream) {
    +265            debug!("Using TLS key export for relay client authentication");
    +266            builder = builder
    +267                .add_header(CLIENT_AUTH_HEADER, client_auth.into_header_value())
    +268                .expect(
    +269                    "impossible: CLIENT_AUTH_HEADER isn't a disallowed header value for websockets",
    +270                );
    +271        }
    +272        let (conn, response) = builder.connect_on(stream).await?;
    +273
    +274        if response.status() != hyper::StatusCode::SWITCHING_PROTOCOLS {
    +275            UnexpectedUpgradeStatusSnafu {
    +276                code: response.status(),
    +277            }
    +278            .fail()?;
    +279        }
    +280
    +281        let conn = Conn::new(conn, self.key_cache.clone(), &self.secret_key).await?;
    +282
    +283        event!(
    +284            target: "events.net.relay.connected",
    +285            Level::DEBUG,
    +286            url = %self.url,
    +287        );
    +288
    +289        trace!("connect done");
    +290
    +291        Ok(Client {
    +292            conn,
    +293            local_addr: Some(local_addr),
    +294        })
    +295    }
    +296
    +297    /// Reports whether IPv4 dials should be slightly
    +298    /// delayed to give IPv6 a better chance of winning dial races.
    +299    /// Implementations should only return true if IPv6 is expected
    +300    /// to succeed. (otherwise delaying IPv4 will delay the connection
    +301    /// overall)
    +302    #[cfg(not(wasm_browser))]
    +303    fn prefer_ipv6(&self) -> bool {
    +304        match self.address_family_selector {
    +305            Some(ref selector) => selector(),
    +306            None => false,
    +307        }
    +308    }
    +309
    +310    /// Establishes a new connection to the relay server.
    +311    #[cfg(wasm_browser)]
    +312    pub async fn connect(&self) -> Result<Client, ConnectError> {
    +313        use crate::http::RELAY_PROTOCOL_VERSION;
    +314
    +315        let mut dial_url = (*self.url).clone();
    +316        dial_url.set_path(RELAY_PATH);
    +317        // The relay URL is exchanged with the http(s) scheme in tickets and similar.
    +318        // We need to use the ws:// or wss:// schemes when connecting with websockets, though.
    +319        dial_url
    +320            .set_scheme(match self.url.scheme() {
    +321                "http" => "ws",
    +322                "ws" => "ws",
    +323                _ => "wss",
    +324            })
    +325            .map_err(|_| {
    +326                InvalidWebsocketUrlSnafu {
    +327                    url: dial_url.clone(),
    +328                }
    +329                .build()
    +330            })?;
    +331
    +332        debug!(%dial_url, "Dialing relay by websocket");
    +333
    +334        let (_, ws_stream) =
    +335            ws_stream_wasm::WsMeta::connect(dial_url.as_str(), Some(vec![RELAY_PROTOCOL_VERSION]))
    +336                .await?;
    +337        let conn = Conn::new(ws_stream, self.key_cache.clone(), &self.secret_key).await?;
    +338
    +339        event!(
    +340            target: "events.net.relay.connected",
    +341            Level::DEBUG,
    +342            url = %self.url,
    +343        );
    +344
    +345        trace!("connect done");
     346
    -347    fn poll_ready(
    -348        mut self: Pin<&mut Self>,
    -349        cx: &mut task::Context<'_>,
    -350    ) -> Poll<Result<(), Self::Error>> {
    -351        Pin::new(&mut self.sink).poll_ready(cx)
    -352    }
    +347        Ok(Client {
    +348            conn,
    +349            local_addr: None,
    +350        })
    +351    }
    +352}
     353
    -354    fn start_send(mut self: Pin<&mut Self>, item: SendMessage) -> Result<(), Self::Error> {
    -355        Pin::new(&mut self.sink).start_send(item)
    -356    }
    -357
    -358    fn poll_flush(
    -359        mut self: Pin<&mut Self>,
    -360        cx: &mut task::Context<'_>,
    -361    ) -> Poll<Result<(), Self::Error>> {
    -362        Pin::new(&mut self.sink).poll_flush(cx)
    -363    }
    -364
    -365    fn poll_close(
    -366        mut self: Pin<&mut Self>,
    -367        cx: &mut task::Context<'_>,
    -368    ) -> Poll<Result<(), Self::Error>> {
    -369        Pin::new(&mut self.sink).poll_close(cx)
    -370    }
    -371}
    -372
    -373/// The receive half of a relay client.
    -374#[derive(Debug)]
    -375pub struct ClientStream {
    -376    stream: SplitStream<Conn>,
    -377    local_addr: Option<SocketAddr>,
    -378}
    -379
    -380impl ClientStream {
    -381    /// Returns the local address of the client.
    -382    pub fn local_addr(&self) -> Option<SocketAddr> {
    -383        self.local_addr
    -384    }
    -385}
    -386
    -387impl Stream for ClientStream {
    -388    type Item = Result<ReceivedMessage, RecvError>;
    -389
    -390    fn poll_next(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Option<Self::Item>> {
    -391        Pin::new(&mut self.stream).poll_next(cx)
    -392    }
    -393}
    -394
    -395#[cfg(any(test, feature = "test-utils"))]
    -396/// Creates a client config that trusts any servers without verifying their TLS certificate.
    -397///
    -398/// Should be used for testing local relay setups only.
    -399pub fn make_dangerous_client_config() -> rustls::ClientConfig {
    -400    warn!(
    -401        "Insecure config: SSL certificates from relay servers will be trusted without verification"
    -402    );
    -403    rustls::client::ClientConfig::builder_with_provider(Arc::new(
    -404        rustls::crypto::ring::default_provider(),
    -405    ))
    -406    .with_protocol_versions(&[&rustls::version::TLS13])
    -407    .expect("protocols supported by ring")
    -408    .dangerous()
    -409    .with_custom_certificate_verifier(Arc::new(NoCertVerifier))
    -410    .with_no_client_auth()
    -411}
    -412
    -413/// Used to allow self signed certificates in tests
    -414#[cfg(any(test, feature = "test-utils"))]
    -415#[derive(Debug)]
    -416struct NoCertVerifier;
    +354/// A relay client.
    +355#[derive(Debug)]
    +356pub struct Client {
    +357    conn: Conn,
    +358    local_addr: Option<SocketAddr>,
    +359}
    +360
    +361impl Client {
    +362    /// Splits the client into a sink and a stream.
    +363    pub fn split(self) -> (ClientStream, ClientSink) {
    +364        let (sink, stream) = split(self.conn);
    +365        (
    +366            ClientStream {
    +367                stream,
    +368                local_addr: self.local_addr,
    +369            },
    +370            ClientSink { sink },
    +371        )
    +372    }
    +373}
    +374
    +375impl Stream for Client {
    +376    type Item = Result<RelayToClientMsg, RecvError>;
    +377
    +378    fn poll_next(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Option<Self::Item>> {
    +379        Pin::new(&mut self.conn).poll_next(cx)
    +380    }
    +381}
    +382
    +383impl Sink<ClientToRelayMsg> for Client {
    +384    type Error = SendError;
    +385
    +386    fn poll_ready(
    +387        mut self: Pin<&mut Self>,
    +388        cx: &mut task::Context<'_>,
    +389    ) -> Poll<Result<(), Self::Error>> {
    +390        Pin::new(&mut self.conn).poll_ready(cx)
    +391    }
    +392
    +393    fn start_send(mut self: Pin<&mut Self>, item: ClientToRelayMsg) -> Result<(), Self::Error> {
    +394        Pin::new(&mut self.conn).start_send(item)
    +395    }
    +396
    +397    fn poll_flush(
    +398        mut self: Pin<&mut Self>,
    +399        cx: &mut task::Context<'_>,
    +400    ) -> Poll<Result<(), Self::Error>> {
    +401        Pin::new(&mut self.conn).poll_flush(cx)
    +402    }
    +403
    +404    fn poll_close(
    +405        mut self: Pin<&mut Self>,
    +406        cx: &mut task::Context<'_>,
    +407    ) -> Poll<Result<(), Self::Error>> {
    +408        Pin::new(&mut self.conn).poll_close(cx)
    +409    }
    +410}
    +411
    +412/// The send half of a relay client.
    +413#[derive(Debug)]
    +414pub struct ClientSink {
    +415    sink: SplitSink<Conn, ClientToRelayMsg>,
    +416}
     417
    -418#[cfg(any(test, feature = "test-utils"))]
    -419impl rustls::client::danger::ServerCertVerifier for NoCertVerifier {
    -420    fn verify_server_cert(
    -421        &self,
    -422        _end_entity: &rustls::pki_types::CertificateDer,
    -423        _intermediates: &[rustls::pki_types::CertificateDer],
    -424        _server_name: &rustls::pki_types::ServerName,
    -425        _ocsp_response: &[u8],
    -426        _now: rustls::pki_types::UnixTime,
    -427    ) -> Result<rustls::client::danger::ServerCertVerified, rustls::Error> {
    -428        Ok(rustls::client::danger::ServerCertVerified::assertion())
    -429    }
    -430    fn verify_tls12_signature(
    -431        &self,
    -432        _message: &[u8],
    -433        _cert: &rustls::pki_types::CertificateDer<'_>,
    -434        _dss: &rustls::DigitallySignedStruct,
    -435    ) -> Result<rustls::client::danger::HandshakeSignatureValid, rustls::Error> {
    -436        Ok(rustls::client::danger::HandshakeSignatureValid::assertion())
    +418impl Sink<ClientToRelayMsg> for ClientSink {
    +419    type Error = SendError;
    +420
    +421    fn poll_ready(
    +422        mut self: Pin<&mut Self>,
    +423        cx: &mut task::Context<'_>,
    +424    ) -> Poll<Result<(), Self::Error>> {
    +425        Pin::new(&mut self.sink).poll_ready(cx)
    +426    }
    +427
    +428    fn start_send(mut self: Pin<&mut Self>, item: ClientToRelayMsg) -> Result<(), Self::Error> {
    +429        Pin::new(&mut self.sink).start_send(item)
    +430    }
    +431
    +432    fn poll_flush(
    +433        mut self: Pin<&mut Self>,
    +434        cx: &mut task::Context<'_>,
    +435    ) -> Poll<Result<(), Self::Error>> {
    +436        Pin::new(&mut self.sink).poll_flush(cx)
     437    }
     438
    -439    fn verify_tls13_signature(
    -440        &self,
    -441        _message: &[u8],
    -442        _cert: &rustls::pki_types::CertificateDer<'_>,
    -443        _dss: &rustls::DigitallySignedStruct,
    -444    ) -> Result<rustls::client::danger::HandshakeSignatureValid, rustls::Error> {
    -445        Ok(rustls::client::danger::HandshakeSignatureValid::assertion())
    -446    }
    -447
    -448    fn supported_verify_schemes(&self) -> Vec<rustls::SignatureScheme> {
    -449        rustls::crypto::ring::default_provider()
    -450            .signature_verification_algorithms
    -451            .supported_schemes()
    -452    }
    -453}
    \ No newline at end of file +439 fn poll_close( +440 mut self: Pin<&mut Self>, +441 cx: &mut task::Context<'_>, +442 ) -> Poll<Result<(), Self::Error>> { +443 Pin::new(&mut self.sink).poll_close(cx) +444 } +445} +446 +447/// The receive half of a relay client. +448#[derive(Debug)] +449pub struct ClientStream { +450 stream: SplitStream<Conn>, +451 local_addr: Option<SocketAddr>, +452} +453 +454impl ClientStream { +455 /// Returns the local address of the client. +456 pub fn local_addr(&self) -> Option<SocketAddr> { +457 self.local_addr +458 } +459} +460 +461impl Stream for ClientStream { +462 type Item = Result<RelayToClientMsg, RecvError>; +463 +464 fn poll_next(mut self: Pin<&mut Self>, cx: &mut task::Context<'_>) -> Poll<Option<Self::Item>> { +465 Pin::new(&mut self.stream).poll_next(cx) +466 } +467} +468 +469#[cfg(any(test, feature = "test-utils"))] +470/// Creates a client config that trusts any servers without verifying their TLS certificate. +471/// +472/// Should be used for testing local relay setups only. +473pub fn make_dangerous_client_config() -> rustls::ClientConfig { +474 warn!( +475 "Insecure config: SSL certificates from relay servers will be trusted without verification" +476 ); +477 rustls::client::ClientConfig::builder_with_provider(Arc::new( +478 rustls::crypto::ring::default_provider(), +479 )) +480 .with_protocol_versions(&[&rustls::version::TLS13]) +481 .expect("protocols supported by ring") +482 .dangerous() +483 .with_custom_certificate_verifier(Arc::new(NoCertVerifier)) +484 .with_no_client_auth() +485} +486 +487/// Used to allow self signed certificates in tests +488#[cfg(any(test, feature = "test-utils"))] +489#[derive(Debug)] +490struct NoCertVerifier; +491 +492#[cfg(any(test, feature = "test-utils"))] +493impl rustls::client::danger::ServerCertVerifier for NoCertVerifier { +494 fn verify_server_cert( +495 &self, +496 _end_entity: &rustls::pki_types::CertificateDer, +497 _intermediates: &[rustls::pki_types::CertificateDer], +498 _server_name: &rustls::pki_types::ServerName, +499 _ocsp_response: &[u8], +500 _now: rustls::pki_types::UnixTime, +501 ) -> Result<rustls::client::danger::ServerCertVerified, rustls::Error> { +502 Ok(rustls::client::danger::ServerCertVerified::assertion()) +503 } +504 fn verify_tls12_signature( +505 &self, +506 _message: &[u8], +507 _cert: &rustls::pki_types::CertificateDer<'_>, +508 _dss: &rustls::DigitallySignedStruct, +509 ) -> Result<rustls::client::danger::HandshakeSignatureValid, rustls::Error> { +510 Ok(rustls::client::danger::HandshakeSignatureValid::assertion()) +511 } +512 +513 fn verify_tls13_signature( +514 &self, +515 _message: &[u8], +516 _cert: &rustls::pki_types::CertificateDer<'_>, +517 _dss: &rustls::DigitallySignedStruct, +518 ) -> Result<rustls::client::danger::HandshakeSignatureValid, rustls::Error> { +519 Ok(rustls::client::danger::HandshakeSignatureValid::assertion()) +520 } +521 +522 fn supported_verify_schemes(&self) -> Vec<rustls::SignatureScheme> { +523 rustls::crypto::ring::default_provider() +524 .signature_verification_algorithms +525 .supported_schemes() +526 } +527}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/client/conn.rs.html b/pr/3367/docs/src/iroh_relay/client/conn.rs.html index 008e95b734..e6bd08da29 100644 --- a/pr/3367/docs/src/iroh_relay/client/conn.rs.html +++ b/pr/3367/docs/src/iroh_relay/client/conn.rs.html @@ -1,482 +1,166 @@ -conn.rs - source

    iroh_relay/client/
    conn.rs

    1//! Manages client-side connections to the relay server.
    +conn.rs - source

    iroh_relay/client/
    conn.rs

    1//! Manages client-side connections to the relay server.
     2//!
     3//! based on tailscale/derp/derp_client.go
     4
     5use std::{
    -6    io,
    -7    pin::Pin,
    -8    str::Utf8Error,
    -9    task::{ready, Context, Poll},
    -10};
    -11
    -12use bytes::Bytes;
    -13use iroh_base::{NodeId, SecretKey};
    -14use n0_future::{time::Duration, Sink, Stream};
    -15use nested_enum_utils::common_fields;
    -16use snafu::{Backtrace, ResultExt, Snafu};
    +6    pin::Pin,
    +7    task::{Context, Poll, ready},
    +8};
    +9
    +10use iroh_base::SecretKey;
    +11use n0_future::{Sink, Stream};
    +12use nested_enum_utils::common_fields;
    +13use snafu::{Backtrace, Snafu};
    +14use tracing::debug;
    +15
    +16use super::KeyCache;
     17#[cfg(not(wasm_browser))]
    -18use tokio_util::codec::Framed;
    -19use tracing::debug;
    -20
    -21use super::KeyCache;
    -22use crate::protos::relay::{
    -23    ClientInfo, Frame, RecvError as RecvRelayError, SendError as SendRelayError, MAX_PACKET_SIZE,
    -24    PROTOCOL_VERSION,
    -25};
    -26#[cfg(not(wasm_browser))]
    -27use crate::{
    -28    client::streams::{MaybeTlsStream, MaybeTlsStreamChained, ProxyStream},
    -29    protos::relay::RelayCodec,
    -30};
    -31
    -32/// Error for sending messages to the relay server.
    -33#[common_fields({
    -34    backtrace: Option<Backtrace>,
    -35    #[snafu(implicit)]
    -36    span_trace: n0_snafu::SpanTrace,
    -37})]
    -38#[allow(missing_docs)]
    -39#[derive(Debug, Snafu)]
    -40#[non_exhaustive]
    -41pub enum SendError {
    -42    #[cfg(not(wasm_browser))]
    -43    #[snafu(transparent)]
    -44    RelayIo { source: io::Error },
    -45    #[snafu(transparent)]
    -46    WebsocketIo {
    -47        #[cfg(not(wasm_browser))]
    -48        source: tokio_websockets::Error,
    -49        #[cfg(wasm_browser)]
    -50        source: ws_stream_wasm::WsErr,
    -51    },
    -52    #[snafu(display("Exceeds max packet size ({MAX_PACKET_SIZE}): {size}"))]
    -53    ExceedsMaxPacketSize { size: usize },
    -54}
    -55
    -56/// Errors when receiving messages from the relay server.
    -57#[common_fields({
    -58    backtrace: Option<Backtrace>,
    -59    #[snafu(implicit)]
    -60    span_trace: n0_snafu::SpanTrace,
    -61})]
    -62#[allow(missing_docs)]
    -63#[derive(Debug, Snafu)]
    -64#[non_exhaustive]
    -65pub enum RecvError {
    -66    #[snafu(transparent)]
    -67    Io { source: io::Error },
    -68    #[snafu(transparent)]
    -69    ProtocolSend { source: SendRelayError },
    -70    #[snafu(transparent)]
    -71    ProtocolRecv { source: RecvRelayError },
    -72    #[snafu(transparent)]
    -73    Websocket {
    -74        #[cfg(not(wasm_browser))]
    -75        source: tokio_websockets::Error,
    -76        #[cfg(wasm_browser)]
    -77        source: ws_stream_wasm::WsErr,
    -78    },
    -79    #[snafu(display("invalid protocol message encoding"))]
    -80    InvalidProtocolMessageEncoding { source: Utf8Error },
    -81    #[snafu(display("Unexpected frame received: {frame_type}"))]
    -82    UnexpectedFrame {
    -83        frame_type: crate::protos::relay::FrameType,
    -84    },
    -85}
    -86
    -87/// A connection to a relay server.
    -88///
    -89/// This holds a connection to a relay server.  It is:
    -90///
    -91/// - A [`Stream`] for [`ReceivedMessage`] to receive from the server.
    -92/// - A [`Sink`] for [`SendMessage`] to send to the server.
    -93/// - A [`Sink`] for [`Frame`] to send to the server.
    -94///
    -95/// The [`Frame`] sink is a more internal interface, it allows performing the handshake.
    -96/// The [`SendMessage`] and [`ReceivedMessage`] are safer wrappers enforcing some protocol
    -97/// invariants.
    -98#[derive(derive_more::Debug)]
    -99pub(crate) enum Conn {
    -100    #[cfg(not(wasm_browser))]
    -101    Relay {
    -102        #[debug("Framed<MaybeTlsStreamChained, RelayCodec>")]
    -103        conn: Framed<MaybeTlsStreamChained, RelayCodec>,
    -104    },
    -105    #[cfg(not(wasm_browser))]
    -106    Ws {
    -107        #[debug("WebSocketStream<MaybeTlsStream<ProxyStream>>")]
    -108        conn: tokio_websockets::WebSocketStream<MaybeTlsStream<ProxyStream>>,
    -109        key_cache: KeyCache,
    -110    },
    -111    #[cfg(wasm_browser)]
    -112    WsBrowser {
    -113        #[debug("WebSocketStream")]
    -114        conn: ws_stream_wasm::WsStream,
    -115        key_cache: KeyCache,
    -116    },
    -117}
    -118
    -119impl Conn {
    -120    /// Constructs a new websocket connection, including the initial server handshake.
    -121    #[cfg(wasm_browser)]
    -122    pub(crate) async fn new_ws_browser(
    -123        conn: ws_stream_wasm::WsStream,
    -124        key_cache: KeyCache,
    -125        secret_key: &SecretKey,
    -126    ) -> Result<Self, SendRelayError> {
    -127        let mut conn = Self::WsBrowser { conn, key_cache };
    -128
    -129        // exchange information with the server
    -130        server_handshake(&mut conn, secret_key).await?;
    -131
    -132        Ok(conn)
    -133    }
    -134
    -135    /// Constructs a new websocket connection, including the initial server handshake.
    -136    #[cfg(not(wasm_browser))]
    -137    pub(crate) async fn new_relay(
    -138        conn: MaybeTlsStreamChained,
    -139        key_cache: KeyCache,
    -140        secret_key: &SecretKey,
    -141    ) -> Result<Self, SendRelayError> {
    -142        let conn = Framed::new(conn, RelayCodec::new(key_cache));
    -143
    -144        let mut conn = Self::Relay { conn };
    -145
    -146        // exchange information with the server
    -147        server_handshake(&mut conn, secret_key).await?;
    -148
    -149        Ok(conn)
    -150    }
    -151
    -152    #[cfg(not(wasm_browser))]
    -153    pub(crate) async fn new_ws(
    -154        conn: tokio_websockets::WebSocketStream<MaybeTlsStream<ProxyStream>>,
    -155        key_cache: KeyCache,
    -156        secret_key: &SecretKey,
    -157    ) -> Result<Self, SendRelayError> {
    -158        let mut conn = Self::Ws { conn, key_cache };
    -159
    -160        // exchange information with the server
    -161        server_handshake(&mut conn, secret_key).await?;
    +18use crate::client::streams::{MaybeTlsStream, ProxyStream};
    +19use crate::{
    +20    MAX_PACKET_SIZE,
    +21    protos::{
    +22        handshake,
    +23        relay::{ClientToRelayMsg, Error as ProtoError, RelayToClientMsg},
    +24        streams::WsBytesFramed,
    +25    },
    +26};
    +27
    +28/// Error for sending messages to the relay server.
    +29#[common_fields({
    +30    backtrace: Option<Backtrace>,
    +31    #[snafu(implicit)]
    +32    span_trace: n0_snafu::SpanTrace,
    +33})]
    +34#[allow(missing_docs)]
    +35#[derive(Debug, Snafu)]
    +36#[non_exhaustive]
    +37pub enum SendError {
    +38    #[snafu(transparent)]
    +39    StreamError {
    +40        #[cfg(not(wasm_browser))]
    +41        source: tokio_websockets::Error,
    +42        #[cfg(wasm_browser)]
    +43        source: ws_stream_wasm::WsErr,
    +44    },
    +45    #[snafu(display("Exceeds max packet size ({MAX_PACKET_SIZE}): {size}"))]
    +46    ExceedsMaxPacketSize { size: usize },
    +47    #[snafu(display("Attempted to send empty packet"))]
    +48    EmptyPacket {},
    +49}
    +50
    +51/// Errors when receiving messages from the relay server.
    +52#[common_fields({
    +53    backtrace: Option<Backtrace>,
    +54    #[snafu(implicit)]
    +55    span_trace: n0_snafu::SpanTrace,
    +56})]
    +57#[allow(missing_docs)]
    +58#[derive(Debug, Snafu)]
    +59#[non_exhaustive]
    +60pub enum RecvError {
    +61    #[snafu(transparent)]
    +62    Protocol { source: ProtoError },
    +63    #[snafu(transparent)]
    +64    StreamError {
    +65        #[cfg(not(wasm_browser))]
    +66        source: tokio_websockets::Error,
    +67        #[cfg(wasm_browser)]
    +68        source: ws_stream_wasm::WsErr,
    +69    },
    +70}
    +71
    +72/// A connection to a relay server.
    +73///
    +74/// This holds a connection to a relay server.  It is:
    +75///
    +76/// - A [`Stream`] for [`RelayToClientMsg`] to receive from the server.
    +77/// - A [`Sink`] for [`ClientToRelayMsg`] to send to the server.
    +78#[derive(derive_more::Debug)]
    +79pub(crate) struct Conn {
    +80    #[cfg(not(wasm_browser))]
    +81    #[debug("tokio_websockets::WebSocketStream")]
    +82    pub(crate) conn: WsBytesFramed<MaybeTlsStream<ProxyStream>>,
    +83    #[cfg(wasm_browser)]
    +84    #[debug("ws_stream_wasm::WsStream")]
    +85    pub(crate) conn: WsBytesFramed,
    +86    pub(crate) key_cache: KeyCache,
    +87}
    +88
    +89impl Conn {
    +90    /// Constructs a new websocket connection, including the initial server handshake.
    +91    pub(crate) async fn new(
    +92        #[cfg(not(wasm_browser))] io: tokio_websockets::WebSocketStream<
    +93            MaybeTlsStream<ProxyStream>,
    +94        >,
    +95        #[cfg(wasm_browser)] io: ws_stream_wasm::WsStream,
    +96        key_cache: KeyCache,
    +97        secret_key: &SecretKey,
    +98    ) -> Result<Self, handshake::Error> {
    +99        let mut conn = WsBytesFramed { io };
    +100
    +101        // exchange information with the server
    +102        debug!("server_handshake: started");
    +103        handshake::clientside(&mut conn, secret_key).await?;
    +104        debug!("server_handshake: done");
    +105
    +106        Ok(Self { conn, key_cache })
    +107    }
    +108
    +109    #[cfg(all(test, feature = "server"))]
    +110    pub(crate) fn test(io: tokio::io::DuplexStream) -> Self {
    +111        use crate::protos::relay::MAX_FRAME_SIZE;
    +112        Self {
    +113            conn: WsBytesFramed {
    +114                io: tokio_websockets::ClientBuilder::new()
    +115                    .limits(
    +116                        tokio_websockets::Limits::default().max_payload_len(Some(MAX_FRAME_SIZE)),
    +117                    )
    +118                    .take_over(MaybeTlsStream::Test(io)),
    +119            },
    +120            key_cache: KeyCache::test(),
    +121        }
    +122    }
    +123}
    +124
    +125impl Stream for Conn {
    +126    type Item = Result<RelayToClientMsg, RecvError>;
    +127
    +128    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    +129        match ready!(Pin::new(&mut self.conn).poll_next(cx)) {
    +130            Some(Ok(msg)) => {
    +131                let message = RelayToClientMsg::from_bytes(msg, &self.key_cache);
    +132                Poll::Ready(Some(message.map_err(Into::into)))
    +133            }
    +134            Some(Err(e)) => Poll::Ready(Some(Err(e.into()))),
    +135            None => Poll::Ready(None),
    +136        }
    +137    }
    +138}
    +139
    +140impl Sink<ClientToRelayMsg> for Conn {
    +141    type Error = SendError;
    +142
    +143    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +144        Pin::new(&mut self.conn).poll_ready(cx).map_err(Into::into)
    +145    }
    +146
    +147    fn start_send(mut self: Pin<&mut Self>, frame: ClientToRelayMsg) -> Result<(), Self::Error> {
    +148        let size = frame.encoded_len();
    +149        snafu::ensure!(size <= MAX_PACKET_SIZE, ExceedsMaxPacketSizeSnafu { size });
    +150        if let ClientToRelayMsg::Datagrams { datagrams, .. } = &frame {
    +151            snafu::ensure!(!datagrams.contents.is_empty(), EmptyPacketSnafu);
    +152        }
    +153
    +154        Pin::new(&mut self.conn)
    +155            .start_send(frame.to_bytes().freeze())
    +156            .map_err(Into::into)
    +157    }
    +158
    +159    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +160        Pin::new(&mut self.conn).poll_flush(cx).map_err(Into::into)
    +161    }
     162
    -163        Ok(conn)
    -164    }
    -165}
    -166
    -167/// Sends the server handshake message.
    -168async fn server_handshake(writer: &mut Conn, secret_key: &SecretKey) -> Result<(), SendRelayError> {
    -169    debug!("server_handshake: started");
    -170    let client_info = ClientInfo {
    -171        version: PROTOCOL_VERSION,
    -172    };
    -173    debug!("server_handshake: sending client_key: {:?}", &client_info);
    -174    crate::protos::relay::send_client_key(&mut *writer, secret_key, &client_info).await?;
    -175
    -176    debug!("server_handshake: done");
    -177    Ok(())
    -178}
    -179
    -180impl Stream for Conn {
    -181    type Item = Result<ReceivedMessage, RecvError>;
    -182
    -183    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    -184        match *self {
    -185            #[cfg(not(wasm_browser))]
    -186            Self::Relay { ref mut conn } => match ready!(Pin::new(conn).poll_next(cx)) {
    -187                Some(Ok(frame)) => {
    -188                    let message = ReceivedMessage::try_from(frame);
    -189                    Poll::Ready(Some(message))
    -190                }
    -191                Some(Err(err)) => Poll::Ready(Some(Err(err.into()))),
    -192                None => Poll::Ready(None),
    -193            },
    -194            #[cfg(not(wasm_browser))]
    -195            Self::Ws {
    -196                ref mut conn,
    -197                ref key_cache,
    -198            } => match ready!(Pin::new(conn).poll_next(cx)) {
    -199                Some(Ok(msg)) => {
    -200                    if msg.is_close() {
    -201                        // Indicate the stream is done when we receive a close message.
    -202                        // Note: We don't have to poll the stream to completion for it to close gracefully.
    -203                        return Poll::Ready(None);
    -204                    }
    -205                    if !msg.is_binary() {
    -206                        tracing::warn!(
    -207                            ?msg,
    -208                            "Got websocket message of unsupported type, skipping."
    -209                        );
    -210                        return Poll::Pending;
    -211                    }
    -212                    let frame = Frame::decode_from_ws_msg(msg.into_payload().into(), key_cache)?;
    -213                    let message = ReceivedMessage::try_from(frame);
    -214                    Poll::Ready(Some(message))
    -215                }
    -216                Some(Err(e)) => Poll::Ready(Some(Err(e.into()))),
    -217                None => Poll::Ready(None),
    -218            },
    -219            #[cfg(wasm_browser)]
    -220            Self::WsBrowser {
    -221                ref mut conn,
    -222                ref key_cache,
    -223            } => match ready!(Pin::new(conn).poll_next(cx)) {
    -224                Some(ws_stream_wasm::WsMessage::Binary(vec)) => {
    -225                    let frame = Frame::decode_from_ws_msg(Bytes::from(vec), key_cache)?;
    -226                    Poll::Ready(Some(ReceivedMessage::try_from(frame)))
    -227                }
    -228                Some(msg) => {
    -229                    tracing::warn!(?msg, "Got websocket message of unsupported type, skipping.");
    -230                    Poll::Pending
    -231                }
    -232                None => Poll::Ready(None),
    -233            },
    -234        }
    -235    }
    -236}
    -237
    -238impl Sink<Frame> for Conn {
    -239    type Error = SendError;
    -240
    -241    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -242        match *self {
    -243            #[cfg(not(wasm_browser))]
    -244            Self::Relay { ref mut conn } => Pin::new(conn).poll_ready(cx).map_err(Into::into),
    -245            #[cfg(not(wasm_browser))]
    -246            Self::Ws { ref mut conn, .. } => Pin::new(conn).poll_ready(cx).map_err(Into::into),
    -247            #[cfg(wasm_browser)]
    -248            Self::WsBrowser { ref mut conn, .. } => {
    -249                Pin::new(conn).poll_ready(cx).map_err(Into::into)
    -250            }
    -251        }
    -252    }
    -253
    -254    fn start_send(mut self: Pin<&mut Self>, frame: Frame) -> Result<(), Self::Error> {
    -255        if let Frame::SendPacket { dst_key: _, packet } = &frame {
    -256            if packet.len() > MAX_PACKET_SIZE {
    -257                return Err(ExceedsMaxPacketSizeSnafu { size: packet.len() }.build());
    -258            }
    -259        }
    -260        match *self {
    -261            #[cfg(not(wasm_browser))]
    -262            Self::Relay { ref mut conn } => Pin::new(conn).start_send(frame).map_err(Into::into),
    -263            #[cfg(not(wasm_browser))]
    -264            Self::Ws { ref mut conn, .. } => Pin::new(conn)
    -265                .start_send(tokio_websockets::Message::binary(
    -266                    tokio_websockets::Payload::from(frame.encode_for_ws_msg()),
    -267                ))
    -268                .map_err(Into::into),
    -269            #[cfg(wasm_browser)]
    -270            Self::WsBrowser { ref mut conn, .. } => Pin::new(conn)
    -271                .start_send(ws_stream_wasm::WsMessage::Binary(frame.encode_for_ws_msg()))
    -272                .map_err(Into::into),
    -273        }
    -274    }
    -275
    -276    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -277        match *self {
    -278            #[cfg(not(wasm_browser))]
    -279            Self::Relay { ref mut conn } => Pin::new(conn).poll_flush(cx).map_err(Into::into),
    -280            #[cfg(not(wasm_browser))]
    -281            Self::Ws { ref mut conn, .. } => Pin::new(conn).poll_flush(cx).map_err(Into::into),
    -282            #[cfg(wasm_browser)]
    -283            Self::WsBrowser { ref mut conn, .. } => {
    -284                Pin::new(conn).poll_flush(cx).map_err(Into::into)
    -285            }
    -286        }
    -287    }
    -288
    -289    fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -290        match *self {
    -291            #[cfg(not(wasm_browser))]
    -292            Self::Relay { ref mut conn } => Pin::new(conn).poll_close(cx).map_err(Into::into),
    -293            #[cfg(not(wasm_browser))]
    -294            Self::Ws { ref mut conn, .. } => Pin::new(conn).poll_flush(cx).map_err(Into::into),
    -295            #[cfg(wasm_browser)]
    -296            Self::WsBrowser { ref mut conn, .. } => {
    -297                Pin::new(conn).poll_close(cx).map_err(Into::into)
    -298            }
    -299        }
    -300    }
    -301}
    -302
    -303impl Sink<SendMessage> for Conn {
    -304    type Error = SendError;
    -305
    -306    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -307        match *self {
    -308            #[cfg(not(wasm_browser))]
    -309            Self::Relay { ref mut conn } => Pin::new(conn).poll_ready(cx).map_err(Into::into),
    -310            #[cfg(not(wasm_browser))]
    -311            Self::Ws { ref mut conn, .. } => Pin::new(conn).poll_ready(cx).map_err(Into::into),
    -312            #[cfg(wasm_browser)]
    -313            Self::WsBrowser { ref mut conn, .. } => {
    -314                Pin::new(conn).poll_ready(cx).map_err(Into::into)
    -315            }
    -316        }
    -317    }
    -318
    -319    fn start_send(mut self: Pin<&mut Self>, item: SendMessage) -> Result<(), Self::Error> {
    -320        if let SendMessage::SendPacket(_, bytes) = &item {
    -321            let size = bytes.len();
    -322            snafu::ensure!(size <= MAX_PACKET_SIZE, ExceedsMaxPacketSizeSnafu { size });
    -323        }
    -324        let frame = Frame::from(item);
    -325        match *self {
    -326            #[cfg(not(wasm_browser))]
    -327            Self::Relay { ref mut conn } => Pin::new(conn).start_send(frame).map_err(Into::into),
    -328            #[cfg(not(wasm_browser))]
    -329            Self::Ws { ref mut conn, .. } => Pin::new(conn)
    -330                .start_send(tokio_websockets::Message::binary(
    -331                    tokio_websockets::Payload::from(frame.encode_for_ws_msg()),
    -332                ))
    -333                .map_err(Into::into),
    -334            #[cfg(wasm_browser)]
    -335            Self::WsBrowser { ref mut conn, .. } => Pin::new(conn)
    -336                .start_send(ws_stream_wasm::WsMessage::Binary(frame.encode_for_ws_msg()))
    -337                .map_err(Into::into),
    -338        }
    -339    }
    -340
    -341    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -342        match *self {
    -343            #[cfg(not(wasm_browser))]
    -344            Self::Relay { ref mut conn } => Pin::new(conn).poll_flush(cx).map_err(Into::into),
    -345            #[cfg(not(wasm_browser))]
    -346            Self::Ws { ref mut conn, .. } => Pin::new(conn).poll_flush(cx).map_err(Into::into),
    -347            #[cfg(wasm_browser)]
    -348            Self::WsBrowser { ref mut conn, .. } => {
    -349                Pin::new(conn).poll_flush(cx).map_err(Into::into)
    -350            }
    -351        }
    -352    }
    -353
    -354    fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -355        match *self {
    -356            #[cfg(not(wasm_browser))]
    -357            Self::Relay { ref mut conn } => Pin::new(conn).poll_close(cx).map_err(Into::into),
    -358            #[cfg(not(wasm_browser))]
    -359            Self::Ws { ref mut conn, .. } => Pin::new(conn).poll_close(cx).map_err(Into::into),
    -360            #[cfg(wasm_browser)]
    -361            Self::WsBrowser { ref mut conn, .. } => {
    -362                Pin::new(conn).poll_close(cx).map_err(Into::into)
    -363            }
    -364        }
    -365    }
    -366}
    -367
    -368/// The messages received from a framed relay stream.
    -369///
    -370/// This is a type-validated version of the `Frame`s on the `RelayCodec`.
    -371#[derive(derive_more::Debug, Clone)]
    -372pub enum ReceivedMessage {
    -373    /// Represents an incoming packet.
    -374    ReceivedPacket {
    -375        /// The [`NodeId`] of the packet sender.
    -376        remote_node_id: NodeId,
    -377        /// The received packet bytes.
    -378        #[debug(skip)]
    -379        data: Bytes, // TODO: ref
    -380    },
    -381    /// Indicates that the client identified by the underlying public key had previously sent you a
    -382    /// packet but has now disconnected from the server.
    -383    NodeGone(NodeId),
    -384    /// Request from a client or server to reply to the
    -385    /// other side with a [`ReceivedMessage::Pong`] with the given payload.
    -386    Ping([u8; 8]),
    -387    /// Reply to a [`ReceivedMessage::Ping`] from a client or server
    -388    /// with the payload sent previously in the ping.
    -389    Pong([u8; 8]),
    -390    /// A one-way empty message from server to client, just to
    -391    /// keep the connection alive. It's like a [`ReceivedMessage::Ping`], but doesn't solicit
    -392    /// a reply from the client.
    -393    KeepAlive,
    -394    /// A one-way message from server to client, declaring the connection health state.
    -395    Health {
    -396        /// If set, is a description of why the connection is unhealthy.
    -397        ///
    -398        /// If `None` means the connection is healthy again.
    -399        ///
    -400        /// The default condition is healthy, so the server doesn't broadcast a [`ReceivedMessage::Health`]
    -401        /// until a problem exists.
    -402        problem: Option<String>,
    -403    },
    -404    /// A one-way message from server to client, advertising that the server is restarting.
    -405    ServerRestarting {
    -406        /// An advisory duration that the client should wait before attempting to reconnect.
    -407        /// It might be zero. It exists for the server to smear out the reconnects.
    -408        reconnect_in: Duration,
    -409        /// An advisory duration for how long the client should attempt to reconnect
    -410        /// before giving up and proceeding with its normal connection failure logic. The interval
    -411        /// between retries is undefined for now. A server should not send a TryFor duration more
    -412        /// than a few seconds.
    -413        try_for: Duration,
    -414    },
    -415}
    -416
    -417impl TryFrom<Frame> for ReceivedMessage {
    -418    type Error = RecvError;
    -419
    -420    fn try_from(frame: Frame) -> std::result::Result<Self, Self::Error> {
    -421        match frame {
    -422            Frame::KeepAlive => {
    -423                // A one-way keep-alive message that doesn't require an ack.
    -424                // This predated FrameType::Ping/FrameType::Pong.
    -425                Ok(ReceivedMessage::KeepAlive)
    -426            }
    -427            Frame::NodeGone { node_id } => Ok(ReceivedMessage::NodeGone(node_id)),
    -428            Frame::RecvPacket { src_key, content } => {
    -429                let packet = ReceivedMessage::ReceivedPacket {
    -430                    remote_node_id: src_key,
    -431                    data: content,
    -432                };
    -433                Ok(packet)
    -434            }
    -435            Frame::Ping { data } => Ok(ReceivedMessage::Ping(data)),
    -436            Frame::Pong { data } => Ok(ReceivedMessage::Pong(data)),
    -437            Frame::Health { problem } => {
    -438                let problem = std::str::from_utf8(&problem)
    -439                    .context(InvalidProtocolMessageEncodingSnafu)?
    -440                    .to_owned();
    -441                let problem = Some(problem);
    -442                Ok(ReceivedMessage::Health { problem })
    -443            }
    -444            Frame::Restarting {
    -445                reconnect_in,
    -446                try_for,
    -447            } => {
    -448                let reconnect_in = Duration::from_millis(reconnect_in as u64);
    -449                let try_for = Duration::from_millis(try_for as u64);
    -450                Ok(ReceivedMessage::ServerRestarting {
    -451                    reconnect_in,
    -452                    try_for,
    -453                })
    -454            }
    -455            _ => Err(UnexpectedFrameSnafu {
    -456                frame_type: frame.typ(),
    -457            }
    -458            .build()),
    -459        }
    -460    }
    -461}
    -462
    -463/// Messages we can send to a relay server.
    -464#[derive(Debug)]
    -465pub enum SendMessage {
    -466    /// Send a packet of data to the [`NodeId`].
    -467    SendPacket(NodeId, Bytes),
    -468    /// Sends a ping message to the connected relay server.
    -469    Ping([u8; 8]),
    -470    /// Sends a pong message to the connected relay server.
    -471    Pong([u8; 8]),
    -472}
    -473
    -474impl From<SendMessage> for Frame {
    -475    fn from(source: SendMessage) -> Self {
    -476        match source {
    -477            SendMessage::SendPacket(dst_key, packet) => Frame::SendPacket { dst_key, packet },
    -478            SendMessage::Ping(data) => Frame::Ping { data },
    -479            SendMessage::Pong(data) => Frame::Pong { data },
    -480        }
    -481    }
    -482}
    \ No newline at end of file +163 fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { +164 Pin::new(&mut self.conn).poll_close(cx).map_err(Into::into) +165 } +166}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/client/streams.rs.html b/pr/3367/docs/src/iroh_relay/client/streams.rs.html index 857ab97b6a..50959d740b 100644 --- a/pr/3367/docs/src/iroh_relay/client/streams.rs.html +++ b/pr/3367/docs/src/iroh_relay/client/streams.rs.html @@ -1,132 +1,132 @@ -streams.rs - source

    iroh_relay/client/
    streams.rs

    1use std::{
    +streams.rs - source

    iroh_relay/client/
    streams.rs

    1use std::{
     2    net::SocketAddr,
     3    pin::Pin,
     4    task::{Context, Poll},
     5};
     6
     7use bytes::Bytes;
    -8use hyper::upgrade::{Parts, Upgraded};
    -9use hyper_util::rt::TokioIo;
    -10use tokio::{
    -11    io::{AsyncRead, AsyncWrite},
    -12    net::TcpStream,
    -13};
    -14
    -15use super::util;
    -16
    -17#[allow(clippy::large_enum_variant)]
    -18pub enum MaybeTlsStreamChained {
    -19    Raw(util::Chain<std::io::Cursor<Bytes>, ProxyStream>),
    -20    Tls(util::Chain<std::io::Cursor<Bytes>, tokio_rustls::client::TlsStream<ProxyStream>>),
    -21    #[cfg(all(test, feature = "server"))]
    -22    Mem(tokio::io::DuplexStream),
    -23}
    -24
    -25impl AsyncRead for MaybeTlsStreamChained {
    -26    fn poll_read(
    -27        mut self: Pin<&mut Self>,
    -28        cx: &mut Context<'_>,
    -29        buf: &mut tokio::io::ReadBuf<'_>,
    -30    ) -> Poll<std::io::Result<()>> {
    -31        match &mut *self {
    -32            Self::Raw(stream) => Pin::new(stream).poll_read(cx, buf),
    -33            Self::Tls(stream) => Pin::new(stream).poll_read(cx, buf),
    -34            #[cfg(all(test, feature = "server"))]
    -35            Self::Mem(stream) => Pin::new(stream).poll_read(cx, buf),
    -36        }
    -37    }
    -38}
    -39
    -40impl AsyncWrite for MaybeTlsStreamChained {
    -41    fn poll_write(
    -42        mut self: Pin<&mut Self>,
    -43        cx: &mut Context<'_>,
    -44        buf: &[u8],
    -45    ) -> Poll<Result<usize, std::io::Error>> {
    -46        match &mut *self {
    -47            Self::Raw(stream) => Pin::new(stream.get_mut().1).poll_write(cx, buf),
    -48            Self::Tls(stream) => Pin::new(stream.get_mut().1).poll_write(cx, buf),
    -49            #[cfg(all(test, feature = "server"))]
    -50            Self::Mem(stream) => Pin::new(stream).poll_write(cx, buf),
    -51        }
    -52    }
    -53
    -54    fn poll_flush(
    -55        mut self: Pin<&mut Self>,
    -56        cx: &mut Context<'_>,
    -57    ) -> Poll<Result<(), std::io::Error>> {
    -58        match &mut *self {
    -59            Self::Raw(stream) => Pin::new(stream.get_mut().1).poll_flush(cx),
    -60            Self::Tls(stream) => Pin::new(stream.get_mut().1).poll_flush(cx),
    -61            #[cfg(all(test, feature = "server"))]
    -62            Self::Mem(stream) => Pin::new(stream).poll_flush(cx),
    -63        }
    -64    }
    -65
    -66    fn poll_shutdown(
    -67        mut self: Pin<&mut Self>,
    -68        cx: &mut Context<'_>,
    -69    ) -> Poll<Result<(), std::io::Error>> {
    -70        match &mut *self {
    -71            Self::Raw(stream) => Pin::new(stream.get_mut().1).poll_shutdown(cx),
    -72            Self::Tls(stream) => Pin::new(stream.get_mut().1).poll_shutdown(cx),
    -73            #[cfg(all(test, feature = "server"))]
    -74            Self::Mem(stream) => Pin::new(stream).poll_shutdown(cx),
    -75        }
    -76    }
    -77
    -78    fn poll_write_vectored(
    -79        mut self: Pin<&mut Self>,
    -80        cx: &mut Context<'_>,
    -81        bufs: &[std::io::IoSlice<'_>],
    -82    ) -> Poll<Result<usize, std::io::Error>> {
    -83        match &mut *self {
    -84            Self::Raw(stream) => Pin::new(stream.get_mut().1).poll_write_vectored(cx, bufs),
    -85            Self::Tls(stream) => Pin::new(stream.get_mut().1).poll_write_vectored(cx, bufs),
    -86            #[cfg(all(test, feature = "server"))]
    -87            Self::Mem(stream) => Pin::new(stream).poll_write_vectored(cx, bufs),
    -88        }
    -89    }
    -90}
    -91
    -92pub fn downcast_upgrade(upgraded: Upgraded) -> Option<MaybeTlsStreamChained> {
    -93    match upgraded.downcast::<TokioIo<MaybeTlsStream<ProxyStream>>>() {
    -94        Ok(Parts { read_buf, io, .. }) => {
    -95            // Prepend data to the reader to avoid data loss
    -96            let read_buf = std::io::Cursor::new(read_buf);
    -97            match io.into_inner() {
    -98                MaybeTlsStream::Raw(conn) => {
    -99                    Some(MaybeTlsStreamChained::Raw(util::chain(read_buf, conn)))
    -100                }
    -101                MaybeTlsStream::Tls(conn) => {
    -102                    Some(MaybeTlsStreamChained::Tls(util::chain(read_buf, conn)))
    -103                }
    -104            }
    -105        }
    -106        Err(upgraded) => {
    -107            if let Ok(Parts { read_buf, io, .. }) =
    -108                upgraded.downcast::<TokioIo<tokio_rustls::client::TlsStream<ProxyStream>>>()
    -109            {
    -110                let conn = io.into_inner();
    +8use tokio::{
    +9    io::{AsyncRead, AsyncWrite},
    +10    net::TcpStream,
    +11};
    +12
    +13use super::util;
    +14use crate::ExportKeyingMaterial;
    +15
    +16#[derive(Debug)]
    +17#[allow(clippy::large_enum_variant)]
    +18pub enum ProxyStream {
    +19    Raw(TcpStream),
    +20    Proxied(util::Chain<std::io::Cursor<Bytes>, MaybeTlsStream<TcpStream>>),
    +21}
    +22
    +23impl AsyncRead for ProxyStream {
    +24    fn poll_read(
    +25        mut self: Pin<&mut Self>,
    +26        cx: &mut Context<'_>,
    +27        buf: &mut tokio::io::ReadBuf<'_>,
    +28    ) -> Poll<std::io::Result<()>> {
    +29        match &mut *self {
    +30            Self::Raw(stream) => Pin::new(stream).poll_read(cx, buf),
    +31            Self::Proxied(stream) => Pin::new(stream).poll_read(cx, buf),
    +32        }
    +33    }
    +34}
    +35
    +36impl AsyncWrite for ProxyStream {
    +37    fn poll_write(
    +38        mut self: Pin<&mut Self>,
    +39        cx: &mut Context<'_>,
    +40        buf: &[u8],
    +41    ) -> Poll<Result<usize, std::io::Error>> {
    +42        match &mut *self {
    +43            Self::Raw(stream) => Pin::new(stream).poll_write(cx, buf),
    +44            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_write(cx, buf),
    +45        }
    +46    }
    +47
    +48    fn poll_flush(
    +49        mut self: Pin<&mut Self>,
    +50        cx: &mut Context<'_>,
    +51    ) -> Poll<Result<(), std::io::Error>> {
    +52        match &mut *self {
    +53            Self::Raw(stream) => Pin::new(stream).poll_flush(cx),
    +54            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_flush(cx),
    +55        }
    +56    }
    +57
    +58    fn poll_shutdown(
    +59        mut self: Pin<&mut Self>,
    +60        cx: &mut Context<'_>,
    +61    ) -> Poll<Result<(), std::io::Error>> {
    +62        match &mut *self {
    +63            Self::Raw(stream) => Pin::new(stream).poll_shutdown(cx),
    +64            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_shutdown(cx),
    +65        }
    +66    }
    +67
    +68    fn poll_write_vectored(
    +69        mut self: Pin<&mut Self>,
    +70        cx: &mut Context<'_>,
    +71        bufs: &[std::io::IoSlice<'_>],
    +72    ) -> Poll<Result<usize, std::io::Error>> {
    +73        match &mut *self {
    +74            Self::Raw(stream) => Pin::new(stream).poll_write_vectored(cx, bufs),
    +75            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_write_vectored(cx, bufs),
    +76        }
    +77    }
    +78
    +79    fn is_write_vectored(&self) -> bool {
    +80        match self {
    +81            ProxyStream::Raw(stream) => stream.is_write_vectored(),
    +82            ProxyStream::Proxied(stream) => stream.get_ref().1.is_write_vectored(),
    +83        }
    +84    }
    +85}
    +86
    +87impl ProxyStream {
    +88    pub fn local_addr(&self) -> std::io::Result<SocketAddr> {
    +89        match self {
    +90            Self::Raw(s) => s.local_addr(),
    +91            Self::Proxied(s) => s.get_ref().1.as_ref().local_addr(),
    +92        }
    +93    }
    +94
    +95    pub fn peer_addr(&self) -> std::io::Result<SocketAddr> {
    +96        match self {
    +97            Self::Raw(s) => s.peer_addr(),
    +98            Self::Proxied(s) => s.get_ref().1.as_ref().peer_addr(),
    +99        }
    +100    }
    +101}
    +102
    +103#[derive(Debug)]
    +104#[allow(clippy::large_enum_variant)]
    +105pub enum MaybeTlsStream<IO> {
    +106    Raw(IO),
    +107    Tls(tokio_rustls::client::TlsStream<IO>),
    +108    #[cfg(all(test, feature = "server"))]
    +109    Test(tokio::io::DuplexStream),
    +110}
     111
    -112                // Prepend data to the reader to avoid data loss
    -113                let conn = util::chain(std::io::Cursor::new(read_buf), conn);
    -114                return Some(MaybeTlsStreamChained::Tls(conn));
    -115            }
    -116
    -117            None
    -118        }
    -119    }
    -120}
    -121
    -122#[derive(Debug)]
    -123#[allow(clippy::large_enum_variant)]
    -124pub enum ProxyStream {
    -125    Raw(TcpStream),
    -126    Proxied(util::Chain<std::io::Cursor<Bytes>, MaybeTlsStream<TcpStream>>),
    +112impl<IO> ExportKeyingMaterial for MaybeTlsStream<IO> {
    +113    fn export_keying_material<T: AsMut<[u8]>>(
    +114        &self,
    +115        output: T,
    +116        label: &[u8],
    +117        context: Option<&[u8]>,
    +118    ) -> Option<T> {
    +119        let Self::Tls(tls) = self else {
    +120            return None;
    +121        };
    +122        tls.get_ref()
    +123            .1
    +124            .export_keying_material(output, label, context)
    +125            .ok()
    +126    }
     127}
     128
    -129impl AsyncRead for ProxyStream {
    +129impl<IO: AsyncRead + AsyncWrite + Unpin> AsyncRead for MaybeTlsStream<IO> {
     130    fn poll_read(
     131        mut self: Pin<&mut Self>,
     132        cx: &mut Context<'_>,
    @@ -134,154 +134,81 @@
     134    ) -> Poll<std::io::Result<()>> {
     135        match &mut *self {
     136            Self::Raw(stream) => Pin::new(stream).poll_read(cx, buf),
    -137            Self::Proxied(stream) => Pin::new(stream).poll_read(cx, buf),
    -138        }
    -139    }
    -140}
    -141
    -142impl AsyncWrite for ProxyStream {
    -143    fn poll_write(
    -144        mut self: Pin<&mut Self>,
    -145        cx: &mut Context<'_>,
    -146        buf: &[u8],
    -147    ) -> Poll<Result<usize, std::io::Error>> {
    -148        match &mut *self {
    -149            Self::Raw(stream) => Pin::new(stream).poll_write(cx, buf),
    -150            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_write(cx, buf),
    -151        }
    -152    }
    -153
    -154    fn poll_flush(
    -155        mut self: Pin<&mut Self>,
    -156        cx: &mut Context<'_>,
    -157    ) -> Poll<Result<(), std::io::Error>> {
    -158        match &mut *self {
    -159            Self::Raw(stream) => Pin::new(stream).poll_flush(cx),
    -160            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_flush(cx),
    -161        }
    -162    }
    -163
    -164    fn poll_shutdown(
    -165        mut self: Pin<&mut Self>,
    -166        cx: &mut Context<'_>,
    -167    ) -> Poll<Result<(), std::io::Error>> {
    -168        match &mut *self {
    -169            Self::Raw(stream) => Pin::new(stream).poll_shutdown(cx),
    -170            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_shutdown(cx),
    -171        }
    -172    }
    -173    fn poll_write_vectored(
    -174        mut self: Pin<&mut Self>,
    -175        cx: &mut Context<'_>,
    -176        bufs: &[std::io::IoSlice<'_>],
    -177    ) -> Poll<Result<usize, std::io::Error>> {
    -178        match &mut *self {
    -179            Self::Raw(stream) => Pin::new(stream).poll_write_vectored(cx, bufs),
    -180            Self::Proxied(stream) => Pin::new(stream.get_mut().1).poll_write_vectored(cx, bufs),
    -181        }
    -182    }
    -183}
    -184
    -185impl ProxyStream {
    -186    pub fn local_addr(&self) -> std::io::Result<SocketAddr> {
    -187        match self {
    -188            Self::Raw(s) => s.local_addr(),
    -189            Self::Proxied(s) => s.get_ref().1.local_addr(),
    -190        }
    -191    }
    -192
    -193    pub fn peer_addr(&self) -> std::io::Result<SocketAddr> {
    -194        match self {
    -195            Self::Raw(s) => s.peer_addr(),
    -196            Self::Proxied(s) => s.get_ref().1.peer_addr(),
    -197        }
    -198    }
    -199}
    -200
    -201#[derive(Debug)]
    -202#[allow(clippy::large_enum_variant)]
    -203pub enum MaybeTlsStream<IO> {
    -204    Raw(IO),
    -205    Tls(tokio_rustls::client::TlsStream<IO>),
    -206}
    -207
    -208impl<IO: AsyncRead + AsyncWrite + Unpin> AsyncRead for MaybeTlsStream<IO> {
    -209    fn poll_read(
    -210        mut self: Pin<&mut Self>,
    -211        cx: &mut Context<'_>,
    -212        buf: &mut tokio::io::ReadBuf<'_>,
    -213    ) -> Poll<std::io::Result<()>> {
    -214        match &mut *self {
    -215            Self::Raw(stream) => Pin::new(stream).poll_read(cx, buf),
    -216            Self::Tls(stream) => Pin::new(stream).poll_read(cx, buf),
    -217        }
    -218    }
    -219}
    -220
    -221impl<IO: AsyncRead + AsyncWrite + Unpin> AsyncWrite for MaybeTlsStream<IO> {
    -222    fn poll_write(
    -223        mut self: Pin<&mut Self>,
    -224        cx: &mut Context<'_>,
    -225        buf: &[u8],
    -226    ) -> Poll<Result<usize, std::io::Error>> {
    -227        match &mut *self {
    -228            Self::Raw(stream) => Pin::new(stream).poll_write(cx, buf),
    -229            Self::Tls(stream) => Pin::new(stream).poll_write(cx, buf),
    -230        }
    -231    }
    -232
    -233    fn poll_flush(
    -234        mut self: Pin<&mut Self>,
    -235        cx: &mut Context<'_>,
    -236    ) -> Poll<Result<(), std::io::Error>> {
    -237        match &mut *self {
    -238            Self::Raw(stream) => Pin::new(stream).poll_flush(cx),
    -239            Self::Tls(stream) => Pin::new(stream).poll_flush(cx),
    -240        }
    -241    }
    -242
    -243    fn poll_shutdown(
    -244        mut self: Pin<&mut Self>,
    -245        cx: &mut Context<'_>,
    -246    ) -> Poll<Result<(), std::io::Error>> {
    -247        match &mut *self {
    -248            Self::Raw(stream) => Pin::new(stream).poll_shutdown(cx),
    -249            Self::Tls(stream) => Pin::new(stream).poll_shutdown(cx),
    -250        }
    -251    }
    -252    fn poll_write_vectored(
    -253        mut self: Pin<&mut Self>,
    -254        cx: &mut Context<'_>,
    -255        bufs: &[std::io::IoSlice<'_>],
    -256    ) -> Poll<Result<usize, std::io::Error>> {
    -257        match &mut *self {
    -258            Self::Raw(stream) => Pin::new(stream).poll_write_vectored(cx, bufs),
    -259            Self::Tls(stream) => Pin::new(stream).poll_write_vectored(cx, bufs),
    -260        }
    -261    }
    -262}
    -263
    -264impl MaybeTlsStream<TcpStream> {
    -265    pub fn local_addr(&self) -> std::io::Result<SocketAddr> {
    -266        match self {
    -267            Self::Raw(s) => s.local_addr(),
    -268            Self::Tls(s) => s.get_ref().0.local_addr(),
    -269        }
    -270    }
    -271
    -272    pub fn peer_addr(&self) -> std::io::Result<SocketAddr> {
    -273        match self {
    -274            Self::Raw(s) => s.peer_addr(),
    -275            Self::Tls(s) => s.get_ref().0.peer_addr(),
    -276        }
    -277    }
    -278}
    -279
    -280impl<IO> AsRef<IO> for MaybeTlsStream<IO> {
    -281    fn as_ref(&self) -> &IO {
    -282        match self {
    -283            Self::Raw(s) => s,
    -284            Self::Tls(s) => s.get_ref().0,
    -285        }
    -286    }
    -287}
    \ No newline at end of file +137 Self::Tls(stream) => Pin::new(stream).poll_read(cx, buf), +138 #[cfg(all(test, feature = "server"))] +139 Self::Test(stream) => Pin::new(stream).poll_read(cx, buf), +140 } +141 } +142} +143 +144impl<IO: AsyncRead + AsyncWrite + Unpin> AsyncWrite for MaybeTlsStream<IO> { +145 fn poll_write( +146 mut self: Pin<&mut Self>, +147 cx: &mut Context<'_>, +148 buf: &[u8], +149 ) -> Poll<Result<usize, std::io::Error>> { +150 match &mut *self { +151 Self::Raw(stream) => Pin::new(stream).poll_write(cx, buf), +152 Self::Tls(stream) => Pin::new(stream).poll_write(cx, buf), +153 #[cfg(all(test, feature = "server"))] +154 Self::Test(stream) => Pin::new(stream).poll_write(cx, buf), +155 } +156 } +157 +158 fn poll_flush( +159 mut self: Pin<&mut Self>, +160 cx: &mut Context<'_>, +161 ) -> Poll<Result<(), std::io::Error>> { +162 match &mut *self { +163 Self::Raw(stream) => Pin::new(stream).poll_flush(cx), +164 Self::Tls(stream) => Pin::new(stream).poll_flush(cx), +165 #[cfg(all(test, feature = "server"))] +166 Self::Test(stream) => Pin::new(stream).poll_flush(cx), +167 } +168 } +169 +170 fn poll_shutdown( +171 mut self: Pin<&mut Self>, +172 cx: &mut Context<'_>, +173 ) -> Poll<Result<(), std::io::Error>> { +174 match &mut *self { +175 Self::Raw(stream) => Pin::new(stream).poll_shutdown(cx), +176 Self::Tls(stream) => Pin::new(stream).poll_shutdown(cx), +177 #[cfg(all(test, feature = "server"))] +178 Self::Test(stream) => Pin::new(stream).poll_shutdown(cx), +179 } +180 } +181 +182 fn poll_write_vectored( +183 mut self: Pin<&mut Self>, +184 cx: &mut Context<'_>, +185 bufs: &[std::io::IoSlice<'_>], +186 ) -> Poll<Result<usize, std::io::Error>> { +187 match &mut *self { +188 Self::Raw(stream) => Pin::new(stream).poll_write_vectored(cx, bufs), +189 Self::Tls(stream) => Pin::new(stream).poll_write_vectored(cx, bufs), +190 #[cfg(all(test, feature = "server"))] +191 Self::Test(stream) => Pin::new(stream).poll_write_vectored(cx, bufs), +192 } +193 } +194 +195 fn is_write_vectored(&self) -> bool { +196 match self { +197 Self::Raw(stream) => stream.is_write_vectored(), +198 Self::Tls(stream) => stream.is_write_vectored(), +199 #[cfg(all(test, feature = "server"))] +200 Self::Test(stream) => stream.is_write_vectored(), +201 } +202 } +203} +204 +205impl<IO> AsRef<IO> for MaybeTlsStream<IO> { +206 fn as_ref(&self) -> &IO { +207 match self { +208 Self::Raw(s) => s, +209 Self::Tls(s) => s.get_ref().0, +210 #[cfg(all(test, feature = "server"))] +211 Self::Test(_) => unimplemented!("can't grab underlying IO in MaybeTlsStream::Test"), +212 } +213 } +214}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/client/tls.rs.html b/pr/3367/docs/src/iroh_relay/client/tls.rs.html index 0d42792665..5bff589ce6 100644 --- a/pr/3367/docs/src/iroh_relay/client/tls.rs.html +++ b/pr/3367/docs/src/iroh_relay/client/tls.rs.html @@ -1,494 +1,280 @@ -tls.rs - source

    iroh_relay/client/
    tls.rs

    1//! Functionality related to lower-level tls-based connection establishment.
    +tls.rs - source

    iroh_relay/client/
    tls.rs

    1//! Functionality related to lower-level tls-based connection establishment.
     2//!
    -3//! Primarily to support [`ClientBuilder::connect_relay`].
    +3//! Primarily to support [`ClientBuilder::connect`].
     4//!
     5//! This doesn't work in the browser - thus separated into its own file.
    -6//!
    -7//! `connect_relay` uses a custom HTTP upgrade header value (see [`HTTP_UPGRADE_PROTOCOL`]),
    -8//! as opposed to [`WEBSOCKET_UPGRADE_PROTOCOL`].
    -9//!
    -10//! `connect_ws` however reuses websockets for framing.
    -11//!
    -12//! [`HTTP_UPGRADE_PROTOCOL`]: crate::http::HTTP_UPGRADE_PROTOCOL
    -13//! [`WEBSOCKET_UPGRADE_PROTOCOL`]: crate::http::WEBSOCKET_UPGRADE_PROTOCOL
    -14
    -15// Based on tailscale/derp/derphttp/derphttp_client.go
    -16
    -17use bytes::Bytes;
    -18use data_encoding::BASE64URL;
    -19use http_body_util::Empty;
    -20use hyper::{
    -21    body::Incoming,
    -22    header::{HOST, UPGRADE},
    -23    upgrade::Parts,
    -24    Request,
    -25};
    -26use n0_future::{task, time};
    -27use rustls::client::Resumption;
    -28use snafu::{OptionExt, ResultExt};
    -29use tokio::io::{AsyncRead, AsyncWrite};
    -30use tracing::{error, info_span, Instrument};
    -31
    -32use super::{
    -33    streams::{downcast_upgrade, MaybeTlsStream, ProxyStream},
    -34    *,
    -35};
    -36use crate::defaults::timeouts::*;
    -37
    -38#[derive(Debug, Clone)]
    -39pub struct MaybeTlsStreamBuilder {
    -40    url: Url,
    -41    dns_resolver: DnsResolver,
    -42    proxy_url: Option<Url>,
    -43    prefer_ipv6: bool,
    -44    #[cfg(any(test, feature = "test-utils"))]
    -45    insecure_skip_cert_verify: bool,
    -46}
    -47
    -48impl MaybeTlsStreamBuilder {
    -49    pub fn new(url: Url, dns_resolver: DnsResolver) -> Self {
    -50        Self {
    -51            url,
    -52            dns_resolver,
    -53            proxy_url: None,
    -54            prefer_ipv6: false,
    -55            #[cfg(any(test, feature = "test-utils"))]
    -56            insecure_skip_cert_verify: false,
    -57        }
    -58    }
    -59
    -60    pub fn proxy_url(mut self, proxy_url: Option<Url>) -> Self {
    -61        self.proxy_url = proxy_url;
    -62        self
    -63    }
    -64
    -65    pub fn prefer_ipv6(mut self, prefer: bool) -> Self {
    -66        self.prefer_ipv6 = prefer;
    -67        self
    -68    }
    -69
    -70    #[cfg(any(test, feature = "test-utils"))]
    -71    pub fn insecure_skip_cert_verify(mut self, skip: bool) -> Self {
    -72        self.insecure_skip_cert_verify = skip;
    -73        self
    -74    }
    -75
    -76    pub async fn connect(self) -> Result<MaybeTlsStream<ProxyStream>, ConnectError> {
    -77        let roots = rustls::RootCertStore {
    -78            roots: webpki_roots::TLS_SERVER_ROOTS.to_vec(),
    -79        };
    -80        let mut config = rustls::client::ClientConfig::builder_with_provider(Arc::new(
    -81            rustls::crypto::ring::default_provider(),
    -82        ))
    -83        .with_safe_default_protocol_versions()
    -84        .expect("protocols supported by ring")
    -85        .with_root_certificates(roots)
    -86        .with_no_client_auth();
    -87        #[cfg(any(test, feature = "test-utils"))]
    -88        if self.insecure_skip_cert_verify {
    -89            warn!("Insecure config: SSL certificates from relay servers not verified");
    -90            config
    -91                .dangerous()
    -92                .set_certificate_verifier(Arc::new(NoCertVerifier));
    -93        }
    -94        config.resumption = Resumption::default();
    -95        let tls_connector: tokio_rustls::TlsConnector = Arc::new(config).into();
    +6
    +7// Based on tailscale/derp/derphttp/derphttp_client.go
    +8
    +9use bytes::Bytes;
    +10use data_encoding::BASE64URL;
    +11use http_body_util::Empty;
    +12use hyper::{Request, upgrade::Parts};
    +13use n0_future::{task, time};
    +14use rustls::client::Resumption;
    +15use snafu::{OptionExt, ResultExt};
    +16use tracing::error;
    +17
    +18use super::{
    +19    streams::{MaybeTlsStream, ProxyStream},
    +20    *,
    +21};
    +22use crate::defaults::timeouts::*;
    +23
    +24#[derive(Debug, Clone)]
    +25pub struct MaybeTlsStreamBuilder {
    +26    url: Url,
    +27    dns_resolver: DnsResolver,
    +28    proxy_url: Option<Url>,
    +29    prefer_ipv6: bool,
    +30    #[cfg(any(test, feature = "test-utils"))]
    +31    insecure_skip_cert_verify: bool,
    +32}
    +33
    +34impl MaybeTlsStreamBuilder {
    +35    pub fn new(url: Url, dns_resolver: DnsResolver) -> Self {
    +36        Self {
    +37            url,
    +38            dns_resolver,
    +39            proxy_url: None,
    +40            prefer_ipv6: false,
    +41            #[cfg(any(test, feature = "test-utils"))]
    +42            insecure_skip_cert_verify: false,
    +43        }
    +44    }
    +45
    +46    pub fn proxy_url(mut self, proxy_url: Option<Url>) -> Self {
    +47        self.proxy_url = proxy_url;
    +48        self
    +49    }
    +50
    +51    pub fn prefer_ipv6(mut self, prefer: bool) -> Self {
    +52        self.prefer_ipv6 = prefer;
    +53        self
    +54    }
    +55
    +56    #[cfg(any(test, feature = "test-utils"))]
    +57    pub fn insecure_skip_cert_verify(mut self, skip: bool) -> Self {
    +58        self.insecure_skip_cert_verify = skip;
    +59        self
    +60    }
    +61
    +62    pub async fn connect(self) -> Result<MaybeTlsStream<ProxyStream>, ConnectError> {
    +63        let roots = rustls::RootCertStore {
    +64            roots: webpki_roots::TLS_SERVER_ROOTS.to_vec(),
    +65        };
    +66        let mut config = rustls::client::ClientConfig::builder_with_provider(Arc::new(
    +67            rustls::crypto::ring::default_provider(),
    +68        ))
    +69        .with_safe_default_protocol_versions()
    +70        .expect("protocols supported by ring")
    +71        .with_root_certificates(roots)
    +72        .with_no_client_auth();
    +73        #[cfg(any(test, feature = "test-utils"))]
    +74        if self.insecure_skip_cert_verify {
    +75            warn!("Insecure config: SSL certificates from relay servers not verified");
    +76            config
    +77                .dangerous()
    +78                .set_certificate_verifier(Arc::new(NoCertVerifier));
    +79        }
    +80        config.resumption = Resumption::default();
    +81        let tls_connector: tokio_rustls::TlsConnector = Arc::new(config).into();
    +82
    +83        let tcp_stream = self.dial_url(&tls_connector).await?;
    +84
    +85        let local_addr = tcp_stream
    +86            .local_addr()
    +87            .map_err(|_| NoLocalAddrSnafu.build())?;
    +88
    +89        debug!(server_addr = ?tcp_stream.peer_addr(), %local_addr, "TCP stream connected");
    +90
    +91        if self.use_tls() {
    +92            debug!("Starting TLS handshake");
    +93            let hostname = self
    +94                .tls_servername()
    +95                .ok_or_else(|| InvalidTlsServernameSnafu.build())?;
     96
    -97        let tcp_stream = self.dial_url(&tls_connector).await?;
    -98
    -99        let local_addr = tcp_stream
    -100            .local_addr()
    -101            .map_err(|_| NoLocalAddrSnafu.build())?;
    -102
    -103        debug!(server_addr = ?tcp_stream.peer_addr(), %local_addr, "TCP stream connected");
    -104
    -105        if self.use_tls() {
    -106            debug!("Starting TLS handshake");
    -107            let hostname = self
    -108                .tls_servername()
    -109                .ok_or_else(|| InvalidTlsServernameSnafu.build())?;
    -110
    -111            let hostname = hostname.to_owned();
    -112            let tls_stream = tls_connector
    -113                .connect(hostname, tcp_stream)
    -114                .await
    -115                .context(TlsSnafu)?;
    -116            debug!("tls_connector connect success");
    -117            Ok(MaybeTlsStream::Tls(tls_stream))
    -118        } else {
    -119            debug!("Starting handshake");
    -120            Ok(MaybeTlsStream::Raw(tcp_stream))
    -121        }
    -122    }
    -123
    -124    fn use_tls(&self) -> bool {
    -125        // only disable tls if we are explicitly dialing a http url
    -126        #[allow(clippy::match_like_matches_macro)]
    -127        match self.url.scheme() {
    -128            "http" => false,
    -129            "ws" => false,
    -130            _ => true,
    -131        }
    -132    }
    -133
    -134    fn tls_servername(&self) -> Option<rustls::pki_types::ServerName<'_>> {
    -135        let host_str = self.url.host_str()?;
    -136        let servername = rustls::pki_types::ServerName::try_from(host_str).ok()?;
    -137        Some(servername)
    -138    }
    -139
    -140    async fn dial_url(
    -141        &self,
    -142        tls_connector: &tokio_rustls::TlsConnector,
    -143    ) -> Result<ProxyStream, DialError> {
    -144        if let Some(ref proxy) = self.proxy_url {
    -145            let stream = self.dial_url_proxy(proxy.clone(), tls_connector).await?;
    -146            Ok(ProxyStream::Proxied(stream))
    -147        } else {
    -148            let stream = self.dial_url_direct().await?;
    -149            Ok(ProxyStream::Raw(stream))
    -150        }
    -151    }
    -152
    -153    async fn dial_url_direct(&self) -> Result<tokio::net::TcpStream, DialError> {
    -154        use tokio::net::TcpStream;
    -155        debug!(%self.url, "dial url");
    -156        let dst_ip = self
    -157            .dns_resolver
    -158            .resolve_host(&self.url, self.prefer_ipv6, DNS_TIMEOUT)
    -159            .await?;
    -160
    -161        let port = url_port(&self.url).context(InvalidTargetPortSnafu)?;
    -162        let addr = SocketAddr::new(dst_ip, port);
    -163
    -164        debug!("connecting to {}", addr);
    -165        let tcp_stream = time::timeout(
    -166            DIAL_NODE_TIMEOUT,
    -167            async move { TcpStream::connect(addr).await },
    -168        )
    -169        .await??;
    -170
    -171        tcp_stream.set_nodelay(true)?;
    -172
    -173        Ok(tcp_stream)
    -174    }
    -175
    -176    async fn dial_url_proxy(
    -177        &self,
    -178        proxy_url: Url,
    -179        tls_connector: &tokio_rustls::TlsConnector,
    -180    ) -> Result<util::Chain<std::io::Cursor<Bytes>, MaybeTlsStream<tokio::net::TcpStream>>, DialError>
    -181    {
    -182        use hyper_util::rt::TokioIo;
    -183        use tokio::net::TcpStream;
    -184        debug!(%self.url, %proxy_url, "dial url via proxy");
    -185
    -186        // Resolve proxy DNS
    -187        let proxy_ip = self
    -188            .dns_resolver
    -189            .resolve_host(&proxy_url, self.prefer_ipv6, DNS_TIMEOUT)
    -190            .await?;
    -191
    -192        let proxy_port = url_port(&proxy_url).context(ProxyInvalidTargetPortSnafu)?;
    -193        let proxy_addr = SocketAddr::new(proxy_ip, proxy_port);
    -194
    -195        debug!(%proxy_addr, "connecting to proxy");
    -196
    -197        let tcp_stream = time::timeout(DIAL_NODE_TIMEOUT, async move {
    -198            TcpStream::connect(proxy_addr).await
    -199        })
    -200        .await??;
    -201
    -202        tcp_stream.set_nodelay(true)?;
    -203
    -204        // Setup TLS if necessary
    -205        let io = if proxy_url.scheme() == "http" {
    -206            MaybeTlsStream::Raw(tcp_stream)
    -207        } else {
    -208            let hostname = proxy_url.host_str().context(ProxyInvalidUrlSnafu {
    -209                proxy_url: proxy_url.clone(),
    -210            })?;
    -211            let hostname =
    -212                rustls::pki_types::ServerName::try_from(hostname.to_string()).map_err(|_| {
    -213                    ProxyInvalidTlsServernameSnafu {
    -214                        proxy_hostname: hostname.to_string(),
    -215                    }
    -216                    .build()
    -217                })?;
    -218            let tls_stream = tls_connector.connect(hostname, tcp_stream).await?;
    -219            MaybeTlsStream::Tls(tls_stream)
    -220        };
    -221        let io = TokioIo::new(io);
    -222
    -223        let target_host = self.url.host_str().context(InvalidUrlSnafu {
    -224            url: self.url.clone(),
    -225        })?;
    -226
    -227        let port = url_port(&self.url).context(InvalidTargetPortSnafu)?;
    -228
    -229        // Establish Proxy Tunnel
    -230        let mut req_builder = Request::builder()
    -231            .uri(format!("{}:{}", target_host, port))
    -232            .method("CONNECT")
    -233            .header("Host", target_host)
    -234            .header("Proxy-Connection", "Keep-Alive");
    -235        if !proxy_url.username().is_empty() {
    -236            // Passthrough authorization
    -237            // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization
    -238            debug!(
    -239                "setting proxy-authorization: username={}",
    -240                proxy_url.username()
    -241            );
    -242            let to_encode = format!(
    -243                "{}:{}",
    -244                proxy_url.username(),
    -245                proxy_url.password().unwrap_or_default()
    -246            );
    -247            let encoded = BASE64URL.encode(to_encode.as_bytes());
    -248            req_builder = req_builder.header("Proxy-Authorization", format!("Basic {}", encoded));
    -249        }
    -250        let req = req_builder
    -251            .body(Empty::<Bytes>::new())
    -252            .expect("fixed config");
    -253
    -254        debug!("Sending proxy request: {:?}", req);
    -255
    -256        let (mut sender, conn) = hyper::client::conn::http1::handshake(io)
    -257            .await
    -258            .context(ProxyConnectSnafu)?;
    -259        task::spawn(async move {
    -260            if let Err(err) = conn.with_upgrades().await {
    -261                error!("Proxy connection failed: {:?}", err);
    -262            }
    -263        });
    -264
    -265        let res = sender.send_request(req).await.context(ProxyConnectSnafu)?;
    -266        if !res.status().is_success() {
    -267            return Err(ProxyConnectInvalidStatusSnafu {
    -268                status: res.status(),
    -269            }
    -270            .build());
    -271        }
    -272
    -273        let upgraded = hyper::upgrade::on(res).await.context(ProxyConnectSnafu)?;
    -274        let Parts { io, read_buf, .. } = upgraded
    -275            .downcast::<TokioIo<MaybeTlsStream<tokio::net::TcpStream>>>()
    -276            .expect("only this upgrade used");
    -277
    -278        let res = util::chain(std::io::Cursor::new(read_buf), io.into_inner());
    -279
    -280        Ok(res)
    -281    }
    -282}
    -283
    -284impl ClientBuilder {
    -285    /// Connects to configured relay using HTTP(S) with an upgrade header
    -286    /// set to [`HTTP_UPGRADE_PROTOCOL`].
    -287    ///
    -288    /// [`HTTP_UPGRADE_PROTOCOL`]: crate::http::HTTP_UPGRADE_PROTOCOL
    -289    pub(super) async fn connect_relay(&self) -> Result<(Conn, SocketAddr), ConnectError> {
    -290        #[allow(unused_mut)]
    -291        let mut builder =
    -292            MaybeTlsStreamBuilder::new(self.url.clone().into(), self.dns_resolver.clone())
    -293                .prefer_ipv6(self.prefer_ipv6())
    -294                .proxy_url(self.proxy_url.clone());
    -295
    -296        #[cfg(any(test, feature = "test-utils"))]
    -297        if self.insecure_skip_cert_verify {
    -298            builder = builder.insecure_skip_cert_verify(self.insecure_skip_cert_verify);
    -299        }
    -300
    -301        let stream = builder.connect().await?;
    -302        let local_addr = stream
    -303            .as_ref()
    -304            .local_addr()
    -305            .map_err(|_| NoLocalAddrSnafu.build())?;
    -306        let response = self.http_upgrade_relay(stream).await?;
    -307
    -308        if response.status() != hyper::StatusCode::SWITCHING_PROTOCOLS {
    -309            UnexpectedUpgradeStatusSnafu {
    -310                code: response.status(),
    -311            }
    -312            .fail()?;
    -313        }
    -314
    -315        debug!("starting upgrade");
    -316        let upgraded = hyper::upgrade::on(response).await.context(UpgradeSnafu)?;
    -317
    -318        debug!("connection upgraded");
    -319        let conn = downcast_upgrade(upgraded).expect("must use TcpStream or client::TlsStream");
    -320
    -321        let conn = Conn::new_relay(conn, self.key_cache.clone(), &self.secret_key).await?;
    -322
    -323        Ok((conn, local_addr))
    -324    }
    -325
    -326    pub(super) async fn connect_ws(&self) -> Result<(Conn, SocketAddr), ConnectError> {
    -327        let mut dial_url = (*self.url).clone();
    -328        dial_url.set_path(RELAY_PATH);
    -329        // The relay URL is exchanged with the http(s) scheme in tickets and similar.
    -330        // We need to use the ws:// or wss:// schemes when connecting with websockets, though.
    -331        dial_url
    -332            .set_scheme(match self.url.scheme() {
    -333                "http" => "ws",
    -334                "ws" => "ws",
    -335                _ => "wss",
    -336            })
    -337            .map_err(|_| {
    -338                InvalidWebsocketUrlSnafu {
    -339                    url: dial_url.clone(),
    -340                }
    -341                .build()
    -342            })?;
    -343
    -344        debug!(%dial_url, "Dialing relay by websocket");
    -345
    -346        #[allow(unused_mut)]
    -347        let mut builder = MaybeTlsStreamBuilder::new(dial_url.clone(), self.dns_resolver.clone())
    -348            .prefer_ipv6(self.prefer_ipv6())
    -349            .proxy_url(self.proxy_url.clone());
    -350
    -351        #[cfg(any(test, feature = "test-utils"))]
    -352        if self.insecure_skip_cert_verify {
    -353            builder = builder.insecure_skip_cert_verify(self.insecure_skip_cert_verify);
    -354        }
    -355
    -356        let stream = builder.connect().await?;
    -357        let local_addr = stream
    -358            .as_ref()
    -359            .local_addr()
    -360            .map_err(|_| NoLocalAddrSnafu.build())?;
    -361        let (conn, response) = tokio_websockets::ClientBuilder::new()
    -362            .uri(dial_url.as_str())
    -363            .map_err(|_| {
    -364                InvalidRelayUrlSnafu {
    -365                    url: dial_url.clone(),
    -366                }
    -367                .build()
    -368            })?
    -369            .connect_on(stream)
    -370            .await?;
    -371
    -372        if response.status() != hyper::StatusCode::SWITCHING_PROTOCOLS {
    -373            UnexpectedUpgradeStatusSnafu {
    -374                code: response.status(),
    -375            }
    -376            .fail()?;
    -377        }
    -378
    -379        let conn = Conn::new_ws(conn, self.key_cache.clone(), &self.secret_key).await?;
    -380
    -381        Ok((conn, local_addr))
    -382    }
    -383
    -384    /// Sends the HTTP upgrade request to the relay server.
    -385    async fn http_upgrade_relay<T>(&self, io: T) -> Result<hyper::Response<Incoming>, ConnectError>
    -386    where
    -387        T: AsyncRead + AsyncWrite + Send + Unpin + 'static,
    -388    {
    -389        use hyper_util::rt::TokioIo;
    -390        let host_header_value =
    -391            host_header_value(self.url.clone()).context(InvalidRelayUrlSnafu {
    -392                url: Url::from(self.url.clone()),
    -393            })?;
    -394
    -395        let io = TokioIo::new(io);
    -396        let (mut request_sender, connection) = hyper::client::conn::http1::Builder::new()
    -397            .handshake(io)
    -398            .await
    -399            .context(UpgradeSnafu)?;
    -400        task::spawn(
    -401            // This task drives the HTTP exchange, completes once connection is upgraded.
    -402            async move {
    -403                debug!("HTTP upgrade driver started");
    -404                if let Err(err) = connection.with_upgrades().await {
    -405                    error!("HTTP upgrade error: {err:#}");
    -406                }
    -407                debug!("HTTP upgrade driver finished");
    -408            }
    -409            .instrument(info_span!("http-driver")),
    -410        );
    -411        debug!("Sending upgrade request");
    -412        let req = Request::builder()
    -413            .uri(RELAY_PATH)
    -414            .header(UPGRADE, Protocol::Relay.upgrade_header())
    -415            // https://datatracker.ietf.org/doc/html/rfc2616#section-14.23
    -416            // > A client MUST include a Host header field in all HTTP/1.1 request messages.
    -417            // This header value helps reverse proxies identify how to forward requests.
    -418            .header(HOST, host_header_value)
    -419            .body(http_body_util::Empty::<hyper::body::Bytes>::new())
    -420            .expect("fixed config");
    -421        request_sender.send_request(req).await.context(UpgradeSnafu)
    -422    }
    -423
    -424    /// Reports whether IPv4 dials should be slightly
    -425    /// delayed to give IPv6 a better chance of winning dial races.
    -426    /// Implementations should only return true if IPv6 is expected
    -427    /// to succeed. (otherwise delaying IPv4 will delay the connection
    -428    /// overall)
    -429    fn prefer_ipv6(&self) -> bool {
    -430        match self.address_family_selector {
    -431            Some(ref selector) => selector(),
    -432            None => false,
    -433        }
    -434    }
    -435}
    -436
    -437/// Returns none if no valid url host was found.
    -438fn host_header_value(relay_url: RelayUrl) -> Option<String> {
    -439    // grab the host, turns e.g. https://example.com:8080/xyz -> example.com.
    -440    let relay_url_host = relay_url.host_str()?;
    -441
    -442    // strip the trailing dot, if present: example.com. -> example.com
    -443    let relay_url_host = relay_url_host.strip_suffix('.').unwrap_or(relay_url_host);
    -444    // build the host header value (reserve up to 6 chars for the ":" and port digits):
    -445    let mut host_header_value = String::with_capacity(relay_url_host.len() + 6);
    -446    host_header_value += relay_url_host;
    -447    if let Some(port) = relay_url.port() {
    -448        host_header_value += ":";
    -449        host_header_value += &port.to_string();
    -450    }
    -451    Some(host_header_value)
    -452}
    -453
    -454fn url_port(url: &Url) -> Option<u16> {
    -455    if let Some(port) = url.port() {
    -456        return Some(port);
    -457    }
    -458
    -459    match url.scheme() {
    -460        "http" | "ws" => Some(80),
    -461        "https" | "wss" => Some(443),
    -462        _ => None,
    -463    }
    -464}
    -465
    -466#[cfg(test)]
    -467mod tests {
    -468    use std::str::FromStr;
    -469
    -470    use n0_snafu::Result;
    -471    use tracing_test::traced_test;
    -472
    -473    use super::*;
    -474
    -475    #[test]
    -476    #[traced_test]
    -477    fn test_host_header_value() -> Result {
    -478        let cases = [
    -479            (
    -480                "https://euw1-1.relay.iroh.network.",
    -481                "euw1-1.relay.iroh.network",
    -482            ),
    -483            ("http://localhost:8080", "localhost:8080"),
    -484        ];
    -485
    -486        for (url, expected_host) in cases {
    -487            let relay_url = RelayUrl::from_str(url)?;
    -488            let host = host_header_value(relay_url).unwrap();
    -489            assert_eq!(host, expected_host);
    -490        }
    -491
    -492        Ok(())
    -493    }
    -494}
    \ No newline at end of file +97 let hostname = hostname.to_owned(); +98 let tls_stream = tls_connector +99 .connect(hostname, tcp_stream) +100 .await +101 .context(TlsSnafu)?; +102 debug!("tls_connector connect success"); +103 Ok(MaybeTlsStream::Tls(tls_stream)) +104 } else { +105 debug!("Starting handshake"); +106 Ok(MaybeTlsStream::Raw(tcp_stream)) +107 } +108 } +109 +110 fn use_tls(&self) -> bool { +111 // only disable tls if we are explicitly dialing a http url +112 #[allow(clippy::match_like_matches_macro)] +113 match self.url.scheme() { +114 "http" => false, +115 "ws" => false, +116 _ => true, +117 } +118 } +119 +120 fn tls_servername(&self) -> Option<rustls::pki_types::ServerName<'_>> { +121 let host_str = self.url.host_str()?; +122 let servername = rustls::pki_types::ServerName::try_from(host_str).ok()?; +123 Some(servername) +124 } +125 +126 async fn dial_url( +127 &self, +128 tls_connector: &tokio_rustls::TlsConnector, +129 ) -> Result<ProxyStream, DialError> { +130 if let Some(ref proxy) = self.proxy_url { +131 let stream = self.dial_url_proxy(proxy.clone(), tls_connector).await?; +132 Ok(ProxyStream::Proxied(stream)) +133 } else { +134 let stream = self.dial_url_direct().await?; +135 Ok(ProxyStream::Raw(stream)) +136 } +137 } +138 +139 async fn dial_url_direct(&self) -> Result<tokio::net::TcpStream, DialError> { +140 use tokio::net::TcpStream; +141 debug!(%self.url, "dial url"); +142 let dst_ip = self +143 .dns_resolver +144 .resolve_host(&self.url, self.prefer_ipv6, DNS_TIMEOUT) +145 .await?; +146 +147 let port = url_port(&self.url).context(InvalidTargetPortSnafu)?; +148 let addr = SocketAddr::new(dst_ip, port); +149 +150 debug!("connecting to {}", addr); +151 let tcp_stream = time::timeout( +152 DIAL_NODE_TIMEOUT, +153 async move { TcpStream::connect(addr).await }, +154 ) +155 .await??; +156 +157 tcp_stream.set_nodelay(true)?; +158 +159 Ok(tcp_stream) +160 } +161 +162 async fn dial_url_proxy( +163 &self, +164 proxy_url: Url, +165 tls_connector: &tokio_rustls::TlsConnector, +166 ) -> Result<util::Chain<std::io::Cursor<Bytes>, MaybeTlsStream<tokio::net::TcpStream>>, DialError> +167 { +168 use hyper_util::rt::TokioIo; +169 use tokio::net::TcpStream; +170 debug!(%self.url, %proxy_url, "dial url via proxy"); +171 +172 // Resolve proxy DNS +173 let proxy_ip = self +174 .dns_resolver +175 .resolve_host(&proxy_url, self.prefer_ipv6, DNS_TIMEOUT) +176 .await?; +177 +178 let proxy_port = url_port(&proxy_url).context(ProxyInvalidTargetPortSnafu)?; +179 let proxy_addr = SocketAddr::new(proxy_ip, proxy_port); +180 +181 debug!(%proxy_addr, "connecting to proxy"); +182 +183 let tcp_stream = time::timeout(DIAL_NODE_TIMEOUT, async move { +184 TcpStream::connect(proxy_addr).await +185 }) +186 .await??; +187 +188 tcp_stream.set_nodelay(true)?; +189 +190 // Setup TLS if necessary +191 let io = if proxy_url.scheme() == "http" { +192 MaybeTlsStream::Raw(tcp_stream) +193 } else { +194 let hostname = proxy_url.host_str().context(ProxyInvalidUrlSnafu { +195 proxy_url: proxy_url.clone(), +196 })?; +197 let hostname = +198 rustls::pki_types::ServerName::try_from(hostname.to_string()).map_err(|_| { +199 ProxyInvalidTlsServernameSnafu { +200 proxy_hostname: hostname.to_string(), +201 } +202 .build() +203 })?; +204 let tls_stream = tls_connector.connect(hostname, tcp_stream).await?; +205 MaybeTlsStream::Tls(tls_stream) +206 }; +207 let io = TokioIo::new(io); +208 +209 let target_host = self.url.host_str().context(InvalidUrlSnafu { +210 url: self.url.clone(), +211 })?; +212 +213 let port = url_port(&self.url).context(InvalidTargetPortSnafu)?; +214 +215 // Establish Proxy Tunnel +216 let mut req_builder = Request::builder() +217 .uri(format!("{target_host}:{port}")) +218 .method("CONNECT") +219 .header("Host", target_host) +220 .header("Proxy-Connection", "Keep-Alive"); +221 if !proxy_url.username().is_empty() { +222 // Passthrough authorization +223 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authorization +224 debug!( +225 "setting proxy-authorization: username={}", +226 proxy_url.username() +227 ); +228 let to_encode = format!( +229 "{}:{}", +230 proxy_url.username(), +231 proxy_url.password().unwrap_or_default() +232 ); +233 let encoded = BASE64URL.encode(to_encode.as_bytes()); +234 req_builder = req_builder.header("Proxy-Authorization", format!("Basic {encoded}")); +235 } +236 let req = req_builder +237 .body(Empty::<Bytes>::new()) +238 .expect("fixed config"); +239 +240 debug!("Sending proxy request: {:?}", req); +241 +242 let (mut sender, conn) = hyper::client::conn::http1::handshake(io) +243 .await +244 .context(ProxyConnectSnafu)?; +245 task::spawn(async move { +246 if let Err(err) = conn.with_upgrades().await { +247 error!("Proxy connection failed: {:?}", err); +248 } +249 }); +250 +251 let res = sender.send_request(req).await.context(ProxyConnectSnafu)?; +252 if !res.status().is_success() { +253 return Err(ProxyConnectInvalidStatusSnafu { +254 status: res.status(), +255 } +256 .build()); +257 } +258 +259 let upgraded = hyper::upgrade::on(res).await.context(ProxyConnectSnafu)?; +260 let Parts { io, read_buf, .. } = upgraded +261 .downcast::<TokioIo<MaybeTlsStream<tokio::net::TcpStream>>>() +262 .expect("only this upgrade used"); +263 +264 let res = util::chain(std::io::Cursor::new(read_buf), io.into_inner()); +265 +266 Ok(res) +267 } +268} +269 +270fn url_port(url: &Url) -> Option<u16> { +271 if let Some(port) = url.port() { +272 return Some(port); +273 } +274 +275 match url.scheme() { +276 "http" | "ws" => Some(80), +277 "https" | "wss" => Some(443), +278 _ => None, +279 } +280}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/client/util.rs.html b/pr/3367/docs/src/iroh_relay/client/util.rs.html index cded4a048a..125e47795b 100644 --- a/pr/3367/docs/src/iroh_relay/client/util.rs.html +++ b/pr/3367/docs/src/iroh_relay/client/util.rs.html @@ -1,11 +1,11 @@ -util.rs - source

    iroh_relay/client/
    util.rs

    1//! IO utility to chain `AsyncRead`s together.
    +util.rs - source

    iroh_relay/client/
    util.rs

    1//! IO utility to chain `AsyncRead`s together.
     2
     3// Based on tokios chain implementation, that doesn't make the concrete type public.
     4
     5use std::{
     6    fmt, io,
     7    pin::Pin,
    -8    task::{ready, Context, Poll},
    +8    task::{Context, Poll, ready},
     9};
     10
     11use pin_project::pin_project;
    diff --git a/pr/3367/docs/src/iroh_relay/defaults.rs.html b/pr/3367/docs/src/iroh_relay/defaults.rs.html
    index 62ef37a93c..6897e4345e 100644
    --- a/pr/3367/docs/src/iroh_relay/defaults.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/defaults.rs.html
    @@ -1,4 +1,4 @@
    -defaults.rs - source

    iroh_relay/
    defaults.rs

    1//! Default values used in the relay.
    +defaults.rs - source

    iroh_relay/
    defaults.rs

    1//! Default values used in the relay.
     2
     3/// The default QUIC port used by the Relay server to accept QUIC connections
     4/// for QUIC address discovery
    diff --git a/pr/3367/docs/src/iroh_relay/dns.rs.html b/pr/3367/docs/src/iroh_relay/dns.rs.html
    index ad228c7eeb..36690ce6ff 100644
    --- a/pr/3367/docs/src/iroh_relay/dns.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/dns.rs.html
    @@ -1,551 +1,912 @@
    -dns.rs - source

    iroh_relay/
    dns.rs

    1//! DNS resolver
    +dns.rs - source

    iroh_relay/
    dns.rs

    1//! DNS resolver
     2
     3use std::{
     4    fmt,
     5    future::Future,
    -6    net::{IpAddr, Ipv6Addr, SocketAddr},
    +6    net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
     7    sync::Arc,
     8};
     9
    -10use hickory_resolver::{name_server::TokioConnectionProvider, TokioResolver};
    -11use iroh_base::NodeId;
    -12use n0_future::{
    -13    time::{self, Duration},
    -14    StreamExt,
    -15};
    -16use nested_enum_utils::common_fields;
    -17use snafu::{Backtrace, GenerateImplicitData, OptionExt, Snafu};
    -18use tokio::sync::RwLock;
    -19use url::Url;
    -20
    -21use crate::{
    -22    defaults::timeouts::DNS_TIMEOUT,
    -23    node_info::{LookupError, NodeInfo},
    -24};
    -25
    -26/// The n0 testing DNS node origin, for production.
    -27pub const N0_DNS_NODE_ORIGIN_PROD: &str = "dns.iroh.link";
    -28/// The n0 testing DNS node origin, for testing.
    -29pub const N0_DNS_NODE_ORIGIN_STAGING: &str = "staging-dns.iroh.link";
    -30
    -31/// Potential errors related to dns.
    -32#[common_fields({
    -33    backtrace: Option<Backtrace>,
    -34    #[snafu(implicit)]
    -35    span_trace: n0_snafu::SpanTrace,
    -36})]
    -37#[allow(missing_docs)]
    -38#[derive(Debug, Snafu)]
    -39#[non_exhaustive]
    -40#[snafu(visibility(pub(crate)))]
    -41pub enum DnsError {
    -42    #[snafu(transparent)]
    -43    Timeout { source: tokio::time::error::Elapsed },
    -44    #[snafu(display("No response"))]
    -45    NoResponse {},
    -46    #[snafu(display("Resolve failed ipv4: {ipv4}, ipv6 {ipv6}"))]
    -47    ResolveBoth {
    -48        ipv4: Box<DnsError>,
    -49        ipv6: Box<DnsError>,
    -50    },
    -51    #[snafu(display("missing host"))]
    -52    MissingHost {},
    -53    #[snafu(transparent)]
    -54    Resolve {
    -55        source: hickory_resolver::ResolveError,
    -56    },
    -57    #[snafu(display("invalid DNS response: not a query for _iroh.z32encodedpubkey"))]
    -58    InvalidResponse {},
    +10use hickory_resolver::{
    +11    TokioResolver,
    +12    config::{ResolverConfig, ResolverOpts},
    +13    name_server::TokioConnectionProvider,
    +14};
    +15use iroh_base::NodeId;
    +16use n0_future::{
    +17    StreamExt,
    +18    boxed::BoxFuture,
    +19    time::{self, Duration},
    +20};
    +21use nested_enum_utils::common_fields;
    +22use snafu::{Backtrace, GenerateImplicitData, OptionExt, ResultExt, Snafu};
    +23use tokio::sync::RwLock;
    +24use tracing::debug;
    +25use url::Url;
    +26
    +27use crate::{
    +28    defaults::timeouts::DNS_TIMEOUT,
    +29    node_info::{self, NodeInfo, ParseError},
    +30};
    +31
    +32/// The n0 testing DNS node origin, for production.
    +33pub const N0_DNS_NODE_ORIGIN_PROD: &str = "dns.iroh.link";
    +34/// The n0 testing DNS node origin, for testing.
    +35pub const N0_DNS_NODE_ORIGIN_STAGING: &str = "staging-dns.iroh.link";
    +36
    +37/// Percent of total delay to jitter. 20 means +/- 20% of delay.
    +38const MAX_JITTER_PERCENT: u64 = 20;
    +39
    +40/// Trait for DNS resolvers used in iroh.
    +41pub trait Resolver: fmt::Debug + Send + Sync + 'static {
    +42    /// Looks up an IPv4 address.
    +43    fn lookup_ipv4(&self, host: String) -> BoxFuture<Result<BoxIter<Ipv4Addr>, DnsError>>;
    +44
    +45    /// Looks up an IPv6 address.
    +46    fn lookup_ipv6(&self, host: String) -> BoxFuture<Result<BoxIter<Ipv6Addr>, DnsError>>;
    +47
    +48    /// Looks up TXT records.
    +49    fn lookup_txt(&self, host: String) -> BoxFuture<Result<BoxIter<TxtRecordData>, DnsError>>;
    +50
    +51    /// Clears the internal cache.
    +52    fn clear_cache(&self);
    +53
    +54    /// Completely resets the DNS resolver.
    +55    ///
    +56    /// This is called when the host's network changes majorly. Implementations should rebind all sockets
    +57    /// and refresh the nameserver configuration if read from the host system.
    +58    fn reset(&mut self);
     59}
     60
    -61/// Error returned when an input value is too long for [`crate::node_info::UserData`].
    -62#[allow(missing_docs)]
    -63#[derive(Debug, Snafu)]
    -64#[snafu(module)]
    -65#[snafu(display("no calls succeeded: [{}]", errors.iter().map(|e| e.to_string()).collect::<Vec<_>>().join("")))]
    -66pub struct StaggeredError<E: std::fmt::Debug + std::fmt::Display> {
    -67    backtrace: Option<Backtrace>,
    -68    #[snafu(implicit)]
    -69    span_trace: n0_snafu::SpanTrace,
    -70    errors: Vec<E>,
    -71}
    -72
    -73impl<E: std::fmt::Debug + std::fmt::Display> StaggeredError<E> {
    -74    pub(crate) fn new(errors: Vec<E>) -> Self {
    -75        Self {
    -76            errors,
    -77            backtrace: GenerateImplicitData::generate(),
    -78            span_trace: n0_snafu::SpanTrace::generate(),
    -79        }
    -80    }
    -81}
    -82
    -83/// The DNS resolver used throughout `iroh`.
    -84#[derive(Debug, Clone)]
    -85pub struct DnsResolver {
    -86    resolver: Arc<RwLock<TokioResolver>>,
    -87    nameserver: Option<SocketAddr>,
    -88}
    -89
    -90impl DnsResolver {
    -91    /// Create a new DNS resolver with sensible cross-platform defaults.
    -92    ///
    -93    /// We first try to read the system's resolver from `/etc/resolv.conf`.
    -94    /// This does not work at least on some Androids, therefore we fallback
    -95    /// to the default `ResolverConfig` which uses eg. to google's `8.8.8.8` or `8.8.4.4`.
    -96    pub fn new() -> Self {
    -97        let resolver = Self::new_inner();
    -98        Self {
    -99            resolver: Arc::new(RwLock::new(resolver)),
    -100            nameserver: None,
    -101        }
    -102    }
    -103
    -104    fn new_inner() -> TokioResolver {
    -105        let (system_config, mut options) =
    -106            hickory_resolver::system_conf::read_system_conf().unwrap_or_default();
    -107
    -108        // Copy all of the system config, but strip the bad windows nameservers.  Unfortunately
    -109        // there is no easy way to do this.
    -110        let mut config = hickory_resolver::config::ResolverConfig::new();
    -111        if let Some(name) = system_config.domain() {
    -112            config.set_domain(name.clone());
    -113        }
    -114        for name in system_config.search() {
    -115            config.add_search(name.clone());
    -116        }
    -117        for nameserver_cfg in system_config.name_servers() {
    -118            if !WINDOWS_BAD_SITE_LOCAL_DNS_SERVERS.contains(&nameserver_cfg.socket_addr.ip()) {
    -119                config.add_name_server(nameserver_cfg.clone());
    -120            }
    -121        }
    -122
    -123        // see [`DnsResolver::lookup_ipv4_ipv6`] for info on why we avoid `LookupIpStrategy::Ipv4AndIpv6`
    -124        options.ip_strategy = hickory_resolver::config::LookupIpStrategy::Ipv4thenIpv6;
    -125
    -126        let mut builder =
    -127            TokioResolver::builder_with_config(config, TokioConnectionProvider::default());
    -128        *builder.options_mut() = options;
    -129        builder.build()
    -130    }
    -131
    -132    /// Create a new DNS resolver configured with a single UDP DNS nameserver.
    -133    pub fn with_nameserver(nameserver: SocketAddr) -> Self {
    -134        let resolver = Self::with_nameserver_inner(nameserver);
    -135        Self {
    -136            resolver: Arc::new(RwLock::new(resolver)),
    -137            nameserver: Some(nameserver),
    -138        }
    -139    }
    -140
    -141    fn with_nameserver_inner(nameserver: SocketAddr) -> TokioResolver {
    -142        let mut config = hickory_resolver::config::ResolverConfig::new();
    -143        let nameserver_config = hickory_resolver::config::NameServerConfig::new(
    -144            nameserver,
    -145            hickory_resolver::proto::xfer::Protocol::Udp,
    -146        );
    -147        config.add_name_server(nameserver_config);
    -148
    -149        let builder =
    -150            TokioResolver::builder_with_config(config, TokioConnectionProvider::default());
    -151        builder.build()
    -152    }
    -153
    -154    /// Removes all entries from the cache.
    -155    pub async fn clear_cache(&self) {
    -156        self.resolver.read().await.clear_cache();
    -157    }
    -158
    -159    /// Recreate the inner resolver
    -160    pub async fn reset(&self) {
    -161        let mut this = self.resolver.write().await;
    -162        let resolver = if let Some(nameserver) = self.nameserver {
    -163            Self::with_nameserver_inner(nameserver)
    -164        } else {
    -165            Self::new_inner()
    -166        };
    -167
    -168        *this = resolver;
    -169    }
    -170
    -171    /// Lookup a TXT record.
    -172    pub async fn lookup_txt(
    -173        &self,
    -174        host: impl ToString,
    -175        timeout: Duration,
    -176    ) -> Result<TxtLookup, DnsError> {
    -177        let host = host.to_string();
    -178        let this = self.resolver.read().await;
    -179        let res = time::timeout(timeout, this.txt_lookup(host)).await??;
    -180        Ok(TxtLookup(res))
    -181    }
    -182
    -183    /// Perform an ipv4 lookup with a timeout.
    -184    pub async fn lookup_ipv4(
    -185        &self,
    -186        host: impl ToString,
    -187        timeout: Duration,
    -188    ) -> Result<impl Iterator<Item = IpAddr>, DnsError> {
    -189        let host = host.to_string();
    -190        let this = self.resolver.read().await;
    -191        let addrs = time::timeout(timeout, this.ipv4_lookup(host)).await??;
    -192        Ok(addrs.into_iter().map(|ip| IpAddr::V4(ip.0)))
    -193    }
    -194
    -195    /// Perform an ipv6 lookup with a timeout.
    -196    pub async fn lookup_ipv6(
    -197        &self,
    -198        host: impl ToString,
    -199        timeout: Duration,
    -200    ) -> Result<impl Iterator<Item = IpAddr>, DnsError> {
    -201        let host = host.to_string();
    -202        let this = self.resolver.read().await;
    -203        let addrs = time::timeout(timeout, this.ipv6_lookup(host)).await??;
    -204        Ok(addrs.into_iter().map(|ip| IpAddr::V6(ip.0)))
    -205    }
    -206
    -207    /// Resolve IPv4 and IPv6 in parallel with a timeout.
    -208    ///
    -209    /// `LookupIpStrategy::Ipv4AndIpv6` will wait for ipv6 resolution timeout, even if it is
    -210    /// not usable on the stack, so we manually query both lookups concurrently and time them out
    -211    /// individually.
    -212    pub async fn lookup_ipv4_ipv6(
    -213        &self,
    -214        host: impl ToString,
    -215        timeout: Duration,
    -216    ) -> Result<impl Iterator<Item = IpAddr>, DnsError> {
    -217        let host = host.to_string();
    -218        let res = tokio::join!(
    -219            self.lookup_ipv4(host.clone(), timeout),
    -220            self.lookup_ipv6(host, timeout)
    -221        );
    -222
    -223        match res {
    -224            (Ok(ipv4), Ok(ipv6)) => Ok(LookupIter::Both(ipv4.chain(ipv6))),
    -225            (Ok(ipv4), Err(_)) => Ok(LookupIter::Ipv4(ipv4)),
    -226            (Err(_), Ok(ipv6)) => Ok(LookupIter::Ipv6(ipv6)),
    -227            (Err(ipv4_err), Err(ipv6_err)) => Err(ResolveBothSnafu {
    -228                ipv4: Box::new(ipv4_err),
    -229                ipv6: Box::new(ipv6_err),
    -230            }
    -231            .build()),
    -232        }
    -233    }
    -234
    -235    /// Resolve a hostname from a URL to an IP address.
    -236    pub async fn resolve_host(
    -237        &self,
    -238        url: &Url,
    -239        prefer_ipv6: bool,
    -240        timeout: Duration,
    -241    ) -> Result<IpAddr, DnsError> {
    -242        let host = url.host().context(MissingHostSnafu)?;
    -243        match host {
    -244            url::Host::Domain(domain) => {
    -245                // Need to do a DNS lookup
    -246                let lookup = tokio::join!(
    -247                    self.lookup_ipv4(domain, timeout),
    -248                    self.lookup_ipv6(domain, timeout)
    -249                );
    -250                let (v4, v6) = match lookup {
    -251                    (Err(ipv4_err), Err(ipv6_err)) => {
    -252                        return Err(ResolveBothSnafu {
    -253                            ipv4: Box::new(ipv4_err),
    -254                            ipv6: Box::new(ipv6_err),
    -255                        }
    -256                        .build());
    -257                    }
    -258                    (Err(_), Ok(mut v6)) => (None, v6.next()),
    -259                    (Ok(mut v4), Err(_)) => (v4.next(), None),
    -260                    (Ok(mut v4), Ok(mut v6)) => (v4.next(), v6.next()),
    -261                };
    -262                if prefer_ipv6 {
    -263                    v6.or(v4).context(NoResponseSnafu)
    -264                } else {
    -265                    v4.or(v6).context(NoResponseSnafu)
    -266                }
    -267            }
    -268            url::Host::Ipv4(ip) => Ok(IpAddr::V4(ip)),
    -269            url::Host::Ipv6(ip) => Ok(IpAddr::V6(ip)),
    -270        }
    -271    }
    -272
    -273    /// Perform an ipv4 lookup with a timeout in a staggered fashion.
    -274    ///
    -275    /// From the moment this function is called, each lookup is scheduled after the delays in
    -276    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    -277    /// at T+0ms, T+200ms and T+300ms. The `timeout` is applied to each call individually. The
    -278    /// result of the first successful call is returned, or a summary of all errors otherwise.
    -279    pub async fn lookup_ipv4_staggered(
    -280        &self,
    -281        host: impl ToString,
    -282        timeout: Duration,
    -283        delays_ms: &[u64],
    -284    ) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>> {
    -285        let host = host.to_string();
    -286        let f = || self.lookup_ipv4(host.clone(), timeout);
    -287        stagger_call(f, delays_ms).await
    -288    }
    -289
    -290    /// Perform an ipv6 lookup with a timeout in a staggered fashion.
    -291    ///
    -292    /// From the moment this function is called, each lookup is scheduled after the delays in
    -293    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    -294    /// at T+0ms, T+200ms and T+300ms. The `timeout` is applied to each call individually. The
    -295    /// result of the first successful call is returned, or a summary of all errors otherwise.
    -296    pub async fn lookup_ipv6_staggered(
    -297        &self,
    -298        host: impl ToString,
    -299        timeout: Duration,
    -300        delays_ms: &[u64],
    -301    ) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>> {
    -302        let host = host.to_string();
    -303        let f = || self.lookup_ipv6(host.clone(), timeout);
    -304        stagger_call(f, delays_ms).await
    -305    }
    -306
    -307    /// Race an ipv4 and ipv6 lookup with a timeout in a staggered fashion.
    -308    ///
    -309    /// From the moment this function is called, each lookup is scheduled after the delays in
    -310    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    -311    /// at T+0ms, T+200ms and T+300ms. The `timeout` is applied as stated in
    -312    /// [`Self::lookup_ipv4_ipv6`]. The result of the first successful call is returned, or a
    -313    /// summary of all errors otherwise.
    -314    pub async fn lookup_ipv4_ipv6_staggered(
    -315        &self,
    -316        host: impl ToString,
    -317        timeout: Duration,
    -318        delays_ms: &[u64],
    -319    ) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>> {
    -320        let host = host.to_string();
    -321        let f = || self.lookup_ipv4_ipv6(host.clone(), timeout);
    -322        stagger_call(f, delays_ms).await
    -323    }
    -324
    -325    /// Looks up node info by [`NodeId`] and origin domain name.
    -326    ///
    -327    /// To lookup nodes that published their node info to the DNS servers run by n0,
    -328    /// pass [`N0_DNS_NODE_ORIGIN_PROD`] as `origin`.
    -329    pub async fn lookup_node_by_id(
    -330        &self,
    -331        node_id: &NodeId,
    -332        origin: &str,
    -333    ) -> Result<NodeInfo, LookupError> {
    -334        let attrs = crate::node_info::TxtAttrs::<crate::node_info::IrohAttr>::lookup_by_id(
    -335            self, node_id, origin,
    -336        )
    -337        .await?;
    -338        let info = attrs.into();
    -339        Ok(info)
    -340    }
    -341
    -342    /// Looks up node info by DNS name.
    -343    pub async fn lookup_node_by_domain_name(&self, name: &str) -> Result<NodeInfo, LookupError> {
    -344        let attrs =
    -345            crate::node_info::TxtAttrs::<crate::node_info::IrohAttr>::lookup_by_name(self, name)
    -346                .await?;
    -347        let info = attrs.into();
    -348        Ok(info)
    -349    }
    -350
    -351    /// Looks up node info by DNS name in a staggered fashion.
    -352    ///
    -353    /// From the moment this function is called, each lookup is scheduled after the delays in
    -354    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    -355    /// at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
    -356    /// summary of all errors otherwise.
    -357    pub async fn lookup_node_by_domain_name_staggered(
    -358        &self,
    -359        name: &str,
    -360        delays_ms: &[u64],
    -361    ) -> Result<NodeInfo, StaggeredError<LookupError>> {
    -362        let f = || self.lookup_node_by_domain_name(name);
    -363        stagger_call(f, delays_ms).await
    -364    }
    -365
    -366    /// Looks up node info by [`NodeId`] and origin domain name.
    -367    ///
    -368    /// From the moment this function is called, each lookup is scheduled after the delays in
    -369    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    -370    /// at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
    -371    /// summary of all errors otherwise.
    -372    pub async fn lookup_node_by_id_staggered(
    -373        &self,
    -374        node_id: &NodeId,
    -375        origin: &str,
    -376        delays_ms: &[u64],
    -377    ) -> Result<NodeInfo, StaggeredError<LookupError>> {
    -378        let f = || self.lookup_node_by_id(node_id, origin);
    -379        stagger_call(f, delays_ms).await
    -380    }
    -381}
    -382
    -383impl Default for DnsResolver {
    -384    fn default() -> Self {
    -385        Self::new()
    -386    }
    -387}
    -388
    -389impl From<TokioResolver> for DnsResolver {
    -390    fn from(resolver: TokioResolver) -> Self {
    -391        DnsResolver {
    -392            resolver: Arc::new(RwLock::new(resolver)),
    -393            nameserver: None,
    -394        }
    -395    }
    -396}
    -397
    -398impl reqwest::dns::Resolve for DnsResolver {
    -399    fn resolve(&self, name: reqwest::dns::Name) -> reqwest::dns::Resolving {
    -400        let this = self.clone();
    -401        let name = name.as_str().to_string();
    -402        Box::pin(async move {
    -403            let res = this.lookup_ipv4_ipv6(name, DNS_TIMEOUT).await;
    -404            match res {
    -405                Ok(addrs) => {
    -406                    let addrs: reqwest::dns::Addrs =
    -407                        Box::new(addrs.map(|addr| SocketAddr::new(addr, 0)));
    -408                    Ok(addrs)
    -409                }
    -410                Err(err) => {
    -411                    let err: Box<dyn std::error::Error + Send + Sync> = Box::new(err);
    -412                    Err(err)
    -413                }
    -414            }
    -415        })
    -416    }
    -417}
    -418
    -419/// TXT records returned from [`DnsResolver::lookup_txt`]
    -420#[derive(Debug, Clone)]
    -421pub struct TxtLookup(pub(crate) hickory_resolver::lookup::TxtLookup);
    -422
    -423impl From<hickory_resolver::lookup::TxtLookup> for TxtLookup {
    -424    fn from(value: hickory_resolver::lookup::TxtLookup) -> Self {
    -425        Self(value)
    -426    }
    -427}
    -428
    -429impl IntoIterator for TxtLookup {
    -430    type Item = TXT;
    -431
    -432    type IntoIter = Box<dyn Iterator<Item = TXT>>;
    -433
    -434    fn into_iter(self) -> Self::IntoIter {
    -435        Box::new(self.0.into_iter().map(TXT))
    -436    }
    -437}
    -438
    -439/// Record data for a TXT record
    -440#[derive(Debug, Clone)]
    -441pub struct TXT(hickory_resolver::proto::rr::rdata::TXT);
    -442
    -443impl TXT {
    -444    /// Returns the raw character strings of this TXT record.
    -445    pub fn txt_data(&self) -> &[Box<[u8]>] {
    -446        self.0.txt_data()
    -447    }
    -448}
    -449
    -450impl fmt::Display for TXT {
    -451    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    -452        write!(f, "{}", self.0)
    -453    }
    -454}
    -455
    -456/// Deprecated IPv6 site-local anycast addresses still configured by windows.
    -457///
    -458/// Windows still configures these site-local addresses as soon even as an IPv6 loopback
    -459/// interface is configured.  We do not want to use these DNS servers, the chances of them
    -460/// being usable are almost always close to zero, while the chance of DNS configuration
    -461/// **only** relying on these servers and not also being configured normally are also almost
    -462/// zero.  The chance of the DNS resolver accidentally trying one of these and taking a
    -463/// bunch of timeouts to figure out they're no good are on the other hand very high.
    -464const WINDOWS_BAD_SITE_LOCAL_DNS_SERVERS: [IpAddr; 3] = [
    -465    IpAddr::V6(Ipv6Addr::new(0xfec0, 0, 0, 0xffff, 0, 0, 0, 1)),
    -466    IpAddr::V6(Ipv6Addr::new(0xfec0, 0, 0, 0xffff, 0, 0, 0, 2)),
    -467    IpAddr::V6(Ipv6Addr::new(0xfec0, 0, 0, 0xffff, 0, 0, 0, 3)),
    -468];
    -469
    -470/// Helper enum to give a unified type to the iterators of [`DnsResolver::lookup_ipv4_ipv6`].
    -471enum LookupIter<A, B> {
    -472    Ipv4(A),
    -473    Ipv6(B),
    -474    Both(std::iter::Chain<A, B>),
    -475}
    -476
    -477impl<A: Iterator<Item = IpAddr>, B: Iterator<Item = IpAddr>> Iterator for LookupIter<A, B> {
    -478    type Item = IpAddr;
    -479
    -480    fn next(&mut self) -> Option<Self::Item> {
    -481        match self {
    -482            LookupIter::Ipv4(iter) => iter.next(),
    -483            LookupIter::Ipv6(iter) => iter.next(),
    -484            LookupIter::Both(iter) => iter.next(),
    -485        }
    -486    }
    -487}
    -488
    -489/// Staggers calls to the future F with the given delays.
    -490///
    -491/// The first call is performed immediately. The first call to succeed generates an Ok result
    -492/// ignoring any previous error. If all calls fail, an error summarizing all errors is returned.
    -493async fn stagger_call<
    -494    T,
    -495    E: std::fmt::Debug + std::fmt::Display,
    -496    F: Fn() -> Fut,
    -497    Fut: Future<Output = Result<T, E>>,
    -498>(
    -499    f: F,
    -500    delays_ms: &[u64],
    -501) -> Result<T, StaggeredError<E>> {
    -502    let mut calls = n0_future::FuturesUnorderedBounded::new(delays_ms.len() + 1);
    -503    // NOTE: we add the 0 delay here to have a uniform set of futures. This is more performant than
    -504    // using alternatives that allow futures of different types.
    -505    for delay in std::iter::once(&0u64).chain(delays_ms) {
    -506        let delay = Duration::from_millis(*delay);
    -507        let fut = f();
    -508        let staggered_fut = async move {
    -509            time::sleep(delay).await;
    -510            fut.await
    -511        };
    -512        calls.push(staggered_fut)
    -513    }
    -514
    -515    let mut errors = vec![];
    -516    while let Some(call_result) = calls.next().await {
    -517        match call_result {
    -518            Ok(t) => return Ok(t),
    -519            Err(e) => errors.push(e),
    -520        }
    -521    }
    -522
    -523    Err(StaggeredError::new(errors))
    -524}
    -525
    -526#[cfg(test)]
    -527pub(crate) mod tests {
    -528    use std::sync::atomic::AtomicUsize;
    -529
    -530    use tracing_test::traced_test;
    -531
    -532    use super::*;
    +61/// Boxed iterator alias.
    +62pub type BoxIter<T> = Box<dyn Iterator<Item = T> + Send + 'static>;
    +63
    +64/// Potential errors related to dns.
    +65#[common_fields({
    +66    backtrace: Option<Backtrace>,
    +67    #[snafu(implicit)]
    +68    span_trace: n0_snafu::SpanTrace,
    +69})]
    +70#[allow(missing_docs)]
    +71#[derive(Debug, Snafu)]
    +72#[non_exhaustive]
    +73#[snafu(visibility(pub(crate)))]
    +74pub enum DnsError {
    +75    #[snafu(transparent)]
    +76    Timeout { source: tokio::time::error::Elapsed },
    +77    #[snafu(display("No response"))]
    +78    NoResponse {},
    +79    #[snafu(display("Resolve failed ipv4: {ipv4}, ipv6 {ipv6}"))]
    +80    ResolveBoth {
    +81        ipv4: Box<DnsError>,
    +82        ipv6: Box<DnsError>,
    +83    },
    +84    #[snafu(display("missing host"))]
    +85    MissingHost {},
    +86    #[snafu(transparent)]
    +87    Resolve {
    +88        source: hickory_resolver::ResolveError,
    +89    },
    +90    #[snafu(display("invalid DNS response: not a query for _iroh.z32encodedpubkey"))]
    +91    InvalidResponse {},
    +92}
    +93
    +94#[cfg(not(wasm_browser))]
    +95#[common_fields({
    +96    backtrace: Option<Backtrace>,
    +97    #[snafu(implicit)]
    +98    span_trace: n0_snafu::SpanTrace,
    +99})]
    +100#[allow(missing_docs)]
    +101#[derive(Debug, Snafu)]
    +102#[non_exhaustive]
    +103#[snafu(visibility(pub(crate)))]
    +104pub enum LookupError {
    +105    #[snafu(display("Malformed txt from lookup"))]
    +106    ParseError {
    +107        #[snafu(source(from(ParseError, Box::new)))]
    +108        source: Box<ParseError>,
    +109    },
    +110    #[snafu(display("Failed to resolve TXT record"))]
    +111    LookupFailed {
    +112        #[snafu(source(from(DnsError, Box::new)))]
    +113        source: Box<DnsError>,
    +114    },
    +115}
    +116
    +117/// Error returned when an input value is too long for [`crate::node_info::UserData`].
    +118#[allow(missing_docs)]
    +119#[derive(Debug, Snafu)]
    +120#[snafu(module)]
    +121#[snafu(display("no calls succeeded: [{}]", errors.iter().map(|e| e.to_string()).collect::<Vec<_>>().join("")))]
    +122pub struct StaggeredError<E: std::fmt::Debug + std::fmt::Display> {
    +123    backtrace: Option<Backtrace>,
    +124    #[snafu(implicit)]
    +125    span_trace: n0_snafu::SpanTrace,
    +126    errors: Vec<E>,
    +127}
    +128
    +129impl<E: std::fmt::Debug + std::fmt::Display> StaggeredError<E> {
    +130    pub(crate) fn new(errors: Vec<E>) -> Self {
    +131        Self {
    +132            errors,
    +133            backtrace: GenerateImplicitData::generate(),
    +134            span_trace: n0_snafu::SpanTrace::generate(),
    +135        }
    +136    }
    +137}
    +138
    +139/// Builder for [`DnsResolver`].
    +140#[derive(Debug, Clone, Default)]
    +141pub struct Builder {
    +142    use_system_defaults: bool,
    +143    nameservers: Vec<(SocketAddr, DnsProtocol)>,
    +144}
    +145
    +146/// Protocols over which DNS records can be resolved.
    +147#[derive(Debug, Default, Copy, Clone, Eq, PartialEq)]
    +148#[non_exhaustive]
    +149pub enum DnsProtocol {
    +150    /// DNS over UDP
    +151    ///
    +152    /// This is the classic DNS protocol and supported by most DNS servers.
    +153    #[default]
    +154    Udp,
    +155    /// DNS over TCP
    +156    ///
    +157    /// This is specified in the original DNS RFCs, but is not supported by all DNS servers.
    +158    Tcp,
    +159    /// DNS over TLS
    +160    ///
    +161    /// Performs DNS lookups over TLS-encrypted TCP connections, as defined in [RFC 7858].
    +162    ///
    +163    /// [RFC 7858]: https://www.rfc-editor.org/rfc/rfc7858.html
    +164    Tls,
    +165    /// DNS over HTTPS
    +166    ///
    +167    /// Performs DNS lookups over HTTPS, as defined in [RFC 8484].
    +168    ///
    +169    /// [RFC 8484]: https://www.rfc-editor.org/rfc/rfc8484.html
    +170    Https,
    +171}
    +172
    +173impl DnsProtocol {
    +174    fn to_hickory(self) -> hickory_resolver::proto::xfer::Protocol {
    +175        use hickory_resolver::proto::xfer::Protocol;
    +176        match self {
    +177            DnsProtocol::Udp => Protocol::Udp,
    +178            DnsProtocol::Tcp => Protocol::Tcp,
    +179            DnsProtocol::Tls => Protocol::Tls,
    +180            DnsProtocol::Https => Protocol::Https,
    +181        }
    +182    }
    +183}
    +184
    +185impl Builder {
    +186    /// Makes the builder respect the host system's DNS configuration.
    +187    ///
    +188    /// We first try to read the system's resolver from `/etc/resolv.conf`.
    +189    /// This does not work at least on some Androids, therefore we fallback
    +190    /// to a default config which uses Google's `8.8.8.8` or `8.8.4.4`.
    +191    pub fn with_system_defaults(mut self) -> Self {
    +192        self.use_system_defaults = true;
    +193        self
    +194    }
    +195
    +196    /// Adds a single nameserver.
    +197    pub fn with_nameserver(mut self, addr: SocketAddr, protocol: DnsProtocol) -> Self {
    +198        self.nameservers.push((addr, protocol));
    +199        self
    +200    }
    +201
    +202    /// Adds a list of nameservers.
    +203    pub fn with_nameservers(
    +204        mut self,
    +205        nameservers: impl IntoIterator<Item = (SocketAddr, DnsProtocol)>,
    +206    ) -> Self {
    +207        self.nameservers.extend(nameservers);
    +208        self
    +209    }
    +210
    +211    /// Builds the DNS resolver.
    +212    pub fn build(self) -> DnsResolver {
    +213        let resolver = HickoryResolver::new(self);
    +214        DnsResolver(DnsResolverInner::Hickory(Arc::new(RwLock::new(resolver))))
    +215    }
    +216}
    +217
    +218/// The DNS resolver used throughout `iroh`.
    +219#[derive(Debug, Clone)]
    +220pub struct DnsResolver(DnsResolverInner);
    +221
    +222impl DnsResolver {
    +223    /// Creates a new DNS resolver with sensible cross-platform defaults.
    +224    ///
    +225    /// We first try to read the system's resolver from `/etc/resolv.conf`.
    +226    /// This does not work at least on some Androids, therefore we fallback
    +227    /// to the default `ResolverConfig` which uses eg. to google's `8.8.8.8` or `8.8.4.4`.
    +228    pub fn new() -> Self {
    +229        Builder::default().with_system_defaults().build()
    +230    }
    +231
    +232    /// Creates a new DNS resolver configured with a single UDP DNS nameserver.
    +233    pub fn with_nameserver(nameserver: SocketAddr) -> Self {
    +234        Builder::default()
    +235            .with_nameserver(nameserver, DnsProtocol::Udp)
    +236            .build()
    +237    }
    +238
    +239    /// Creates a builder to construct a DNS resolver with custom options.
    +240    pub fn builder() -> Builder {
    +241        Builder::default()
    +242    }
    +243
    +244    /// Creates a new [`DnsResolver`] from a struct that implements [`Resolver`].
    +245    ///
    +246    /// If you need more customization for DNS resolving than the [`Builder`] allows, you can
    +247    /// implement the [`Resolver`] trait on a struct and implement DNS resolution
    +248    /// however you see fit.
    +249    pub fn custom(resolver: impl Resolver) -> Self {
    +250        Self(DnsResolverInner::Custom(Arc::new(RwLock::new(resolver))))
    +251    }
    +252
    +253    /// Removes all entries from the cache.
    +254    pub async fn clear_cache(&self) {
    +255        self.0.clear_cache().await
    +256    }
    +257
    +258    /// Recreates the inner resolver.
    +259    pub async fn reset(&self) {
    +260        self.0.reset().await
    +261    }
    +262
    +263    /// Looks up a TXT record.
    +264    pub async fn lookup_txt<T: ToString>(
    +265        &self,
    +266        host: T,
    +267        timeout: Duration,
    +268    ) -> Result<impl Iterator<Item = TxtRecordData>, DnsError> {
    +269        let host = host.to_string();
    +270        let res = time::timeout(timeout, self.0.lookup_txt(host)).await??;
    +271        Ok(res)
    +272    }
    +273
    +274    /// Performs an IPv4 lookup with a timeout.
    +275    pub async fn lookup_ipv4<T: ToString>(
    +276        &self,
    +277        host: T,
    +278        timeout: Duration,
    +279    ) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError> {
    +280        let host = host.to_string();
    +281        let addrs = time::timeout(timeout, self.0.lookup_ipv4(host)).await??;
    +282        Ok(addrs.into_iter().map(IpAddr::V4))
    +283    }
    +284
    +285    /// Performs an IPv6 lookup with a timeout.
    +286    pub async fn lookup_ipv6<T: ToString>(
    +287        &self,
    +288        host: T,
    +289        timeout: Duration,
    +290    ) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError> {
    +291        let host = host.to_string();
    +292        let addrs = time::timeout(timeout, self.0.lookup_ipv6(host)).await??;
    +293        Ok(addrs.into_iter().map(IpAddr::V6))
    +294    }
    +295
    +296    /// Resolves IPv4 and IPv6 in parallel with a timeout.
    +297    ///
    +298    /// `LookupIpStrategy::Ipv4AndIpv6` will wait for ipv6 resolution timeout, even if it is
    +299    /// not usable on the stack, so we manually query both lookups concurrently and time them out
    +300    /// individually.
    +301    pub async fn lookup_ipv4_ipv6<T: ToString>(
    +302        &self,
    +303        host: T,
    +304        timeout: Duration,
    +305    ) -> Result<impl Iterator<Item = IpAddr> + use<T>, DnsError> {
    +306        let host = host.to_string();
    +307        let res = tokio::join!(
    +308            self.lookup_ipv4(host.clone(), timeout),
    +309            self.lookup_ipv6(host, timeout)
    +310        );
    +311
    +312        match res {
    +313            (Ok(ipv4), Ok(ipv6)) => Ok(LookupIter::Both(ipv4.chain(ipv6))),
    +314            (Ok(ipv4), Err(_)) => Ok(LookupIter::Ipv4(ipv4)),
    +315            (Err(_), Ok(ipv6)) => Ok(LookupIter::Ipv6(ipv6)),
    +316            (Err(ipv4_err), Err(ipv6_err)) => Err(ResolveBothSnafu {
    +317                ipv4: Box::new(ipv4_err),
    +318                ipv6: Box::new(ipv6_err),
    +319            }
    +320            .build()),
    +321        }
    +322    }
    +323
    +324    /// Resolves a hostname from a URL to an IP address.
    +325    pub async fn resolve_host(
    +326        &self,
    +327        url: &Url,
    +328        prefer_ipv6: bool,
    +329        timeout: Duration,
    +330    ) -> Result<IpAddr, DnsError> {
    +331        let host = url.host().context(MissingHostSnafu)?;
    +332        match host {
    +333            url::Host::Domain(domain) => {
    +334                // Need to do a DNS lookup
    +335                let lookup = tokio::join!(
    +336                    self.lookup_ipv4(domain, timeout),
    +337                    self.lookup_ipv6(domain, timeout)
    +338                );
    +339                let (v4, v6) = match lookup {
    +340                    (Err(ipv4_err), Err(ipv6_err)) => {
    +341                        return Err(ResolveBothSnafu {
    +342                            ipv4: Box::new(ipv4_err),
    +343                            ipv6: Box::new(ipv6_err),
    +344                        }
    +345                        .build());
    +346                    }
    +347                    (Err(_), Ok(mut v6)) => (None, v6.next()),
    +348                    (Ok(mut v4), Err(_)) => (v4.next(), None),
    +349                    (Ok(mut v4), Ok(mut v6)) => (v4.next(), v6.next()),
    +350                };
    +351                if prefer_ipv6 {
    +352                    v6.or(v4).context(NoResponseSnafu)
    +353                } else {
    +354                    v4.or(v6).context(NoResponseSnafu)
    +355                }
    +356            }
    +357            url::Host::Ipv4(ip) => Ok(IpAddr::V4(ip)),
    +358            url::Host::Ipv6(ip) => Ok(IpAddr::V6(ip)),
    +359        }
    +360    }
    +361
    +362    /// Performs an IPv4 lookup with a timeout in a staggered fashion.
    +363    ///
    +364    /// From the moment this function is called, each lookup is scheduled after the delays in
    +365    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    +366    /// at T+0ms, T+200ms and T+300ms. The `timeout` is applied to each call individually. The
    +367    /// result of the first successful call is returned, or a summary of all errors otherwise.
    +368    pub async fn lookup_ipv4_staggered(
    +369        &self,
    +370        host: impl ToString,
    +371        timeout: Duration,
    +372        delays_ms: &[u64],
    +373    ) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>> {
    +374        let host = host.to_string();
    +375        let f = || self.lookup_ipv4(host.clone(), timeout);
    +376        stagger_call(f, delays_ms).await
    +377    }
    +378
    +379    /// Performs an IPv6 lookup with a timeout in a staggered fashion.
    +380    ///
    +381    /// From the moment this function is called, each lookup is scheduled after the delays in
    +382    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    +383    /// at T+0ms, T+200ms and T+300ms. The `timeout` is applied to each call individually. The
    +384    /// result of the first successful call is returned, or a summary of all errors otherwise.
    +385    pub async fn lookup_ipv6_staggered(
    +386        &self,
    +387        host: impl ToString,
    +388        timeout: Duration,
    +389        delays_ms: &[u64],
    +390    ) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>> {
    +391        let host = host.to_string();
    +392        let f = || self.lookup_ipv6(host.clone(), timeout);
    +393        stagger_call(f, delays_ms).await
    +394    }
    +395
    +396    /// Races an IPv4 and IPv6 lookup with a timeout in a staggered fashion.
    +397    ///
    +398    /// From the moment this function is called, each lookup is scheduled after the delays in
    +399    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    +400    /// at T+0ms, T+200ms and T+300ms. The `timeout` is applied as stated in
    +401    /// [`Self::lookup_ipv4_ipv6`]. The result of the first successful call is returned, or a
    +402    /// summary of all errors otherwise.
    +403    pub async fn lookup_ipv4_ipv6_staggered(
    +404        &self,
    +405        host: impl ToString,
    +406        timeout: Duration,
    +407        delays_ms: &[u64],
    +408    ) -> Result<impl Iterator<Item = IpAddr>, StaggeredError<DnsError>> {
    +409        let host = host.to_string();
    +410        let f = || self.lookup_ipv4_ipv6(host.clone(), timeout);
    +411        stagger_call(f, delays_ms).await
    +412    }
    +413
    +414    /// Looks up node info by [`NodeId`] and origin domain name.
    +415    ///
    +416    /// To lookup nodes that published their node info to the DNS servers run by n0,
    +417    /// pass [`N0_DNS_NODE_ORIGIN_PROD`] as `origin`.
    +418    pub async fn lookup_node_by_id(
    +419        &self,
    +420        node_id: &NodeId,
    +421        origin: &str,
    +422    ) -> Result<NodeInfo, LookupError> {
    +423        let name = node_info::node_domain(node_id, origin);
    +424        let name = node_info::ensure_iroh_txt_label(name);
    +425        let lookup = self
    +426            .lookup_txt(name.clone(), DNS_TIMEOUT)
    +427            .await
    +428            .context(LookupFailedSnafu)?;
    +429        let info = NodeInfo::from_txt_lookup(name, lookup).context(ParseSnafu)?;
    +430        Ok(info)
    +431    }
    +432
    +433    /// Looks up node info by DNS name.
    +434    pub async fn lookup_node_by_domain_name(&self, name: &str) -> Result<NodeInfo, LookupError> {
    +435        let name = node_info::ensure_iroh_txt_label(name.to_string());
    +436        let lookup = self
    +437            .lookup_txt(name.clone(), DNS_TIMEOUT)
    +438            .await
    +439            .context(LookupFailedSnafu)?;
    +440        let info = NodeInfo::from_txt_lookup(name, lookup).context(ParseSnafu)?;
    +441        Ok(info)
    +442    }
    +443
    +444    /// Looks up node info by DNS name in a staggered fashion.
    +445    ///
    +446    /// From the moment this function is called, each lookup is scheduled after the delays in
    +447    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    +448    /// at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
    +449    /// summary of all errors otherwise.
    +450    pub async fn lookup_node_by_domain_name_staggered(
    +451        &self,
    +452        name: &str,
    +453        delays_ms: &[u64],
    +454    ) -> Result<NodeInfo, StaggeredError<LookupError>> {
    +455        let f = || self.lookup_node_by_domain_name(name);
    +456        stagger_call(f, delays_ms).await
    +457    }
    +458
    +459    /// Looks up node info by [`NodeId`] and origin domain name.
    +460    ///
    +461    /// From the moment this function is called, each lookup is scheduled after the delays in
    +462    /// `delays_ms` with the first call being done immediately. `[200ms, 300ms]` results in calls
    +463    /// at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
    +464    /// summary of all errors otherwise.
    +465    pub async fn lookup_node_by_id_staggered(
    +466        &self,
    +467        node_id: &NodeId,
    +468        origin: &str,
    +469        delays_ms: &[u64],
    +470    ) -> Result<NodeInfo, StaggeredError<LookupError>> {
    +471        let f = || self.lookup_node_by_id(node_id, origin);
    +472        stagger_call(f, delays_ms).await
    +473    }
    +474}
    +475
    +476impl Default for DnsResolver {
    +477    fn default() -> Self {
    +478        Self::new()
    +479    }
    +480}
    +481
    +482impl reqwest::dns::Resolve for DnsResolver {
    +483    fn resolve(&self, name: reqwest::dns::Name) -> reqwest::dns::Resolving {
    +484        let this = self.clone();
    +485        let name = name.as_str().to_string();
    +486        Box::pin(async move {
    +487            let res = this.lookup_ipv4_ipv6(name, DNS_TIMEOUT).await;
    +488            match res {
    +489                Ok(addrs) => {
    +490                    let addrs: reqwest::dns::Addrs =
    +491                        Box::new(addrs.map(|addr| SocketAddr::new(addr, 0)));
    +492                    Ok(addrs)
    +493                }
    +494                Err(err) => {
    +495                    let err: Box<dyn std::error::Error + Send + Sync> = Box::new(err);
    +496                    Err(err)
    +497                }
    +498            }
    +499        })
    +500    }
    +501}
    +502
    +503/// Wrapper enum that contains either a hickory resolver or a custom resolver.
    +504///
    +505/// We do this to save the cost of boxing the futures and iterators when using
    +506/// default hickory resolver.
    +507#[derive(Debug, Clone)]
    +508enum DnsResolverInner {
    +509    Hickory(Arc<RwLock<HickoryResolver>>),
    +510    Custom(Arc<RwLock<dyn Resolver>>),
    +511}
    +512
    +513impl DnsResolverInner {
    +514    async fn lookup_ipv4(
    +515        &self,
    +516        host: String,
    +517    ) -> Result<impl Iterator<Item = Ipv4Addr> + use<>, DnsError> {
    +518        Ok(match self {
    +519            Self::Hickory(resolver) => Either::Left(resolver.read().await.lookup_ipv4(host).await?),
    +520            Self::Custom(resolver) => Either::Right(resolver.read().await.lookup_ipv4(host).await?),
    +521        })
    +522    }
    +523
    +524    async fn lookup_ipv6(
    +525        &self,
    +526        host: String,
    +527    ) -> Result<impl Iterator<Item = Ipv6Addr> + use<>, DnsError> {
    +528        Ok(match self {
    +529            Self::Hickory(resolver) => Either::Left(resolver.read().await.lookup_ipv6(host).await?),
    +530            Self::Custom(resolver) => Either::Right(resolver.read().await.lookup_ipv6(host).await?),
    +531        })
    +532    }
     533
    -534    #[tokio::test]
    -535    #[traced_test]
    -536    async fn stagger_basic() {
    -537        const CALL_RESULTS: &[Result<u8, u8>] = &[Err(2), Ok(3), Ok(5), Ok(7)];
    -538        static DONE_CALL: AtomicUsize = AtomicUsize::new(0);
    -539        let f = || {
    -540            let r_pos = DONE_CALL.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
    -541            async move {
    -542                tracing::info!(r_pos, "call");
    -543                CALL_RESULTS[r_pos].map_err(|_| InvalidResponseSnafu.build())
    -544            }
    -545        };
    -546
    -547        let delays = [1000, 15];
    -548        let result = stagger_call(f, &delays).await.unwrap();
    -549        assert_eq!(result, 5)
    -550    }
    -551}
    \ No newline at end of file +534 async fn lookup_txt( +535 &self, +536 host: String, +537 ) -> Result<impl Iterator<Item = TxtRecordData> + use<>, DnsError> { +538 Ok(match self { +539 Self::Hickory(resolver) => Either::Left(resolver.read().await.lookup_txt(host).await?), +540 Self::Custom(resolver) => Either::Right(resolver.read().await.lookup_txt(host).await?), +541 }) +542 } +543 +544 async fn clear_cache(&self) { +545 match self { +546 Self::Hickory(resolver) => resolver.read().await.clear_cache(), +547 Self::Custom(resolver) => resolver.read().await.clear_cache(), +548 } +549 } +550 +551 async fn reset(&self) { +552 match self { +553 Self::Hickory(resolver) => resolver.write().await.reset(), +554 Self::Custom(resolver) => resolver.write().await.reset(), +555 } +556 } +557} +558 +559#[derive(Debug)] +560struct HickoryResolver { +561 resolver: TokioResolver, +562 builder: Builder, +563} +564 +565impl HickoryResolver { +566 fn new(builder: Builder) -> Self { +567 let resolver = Self::build_resolver(&builder); +568 Self { resolver, builder } +569 } +570 +571 fn build_resolver(builder: &Builder) -> TokioResolver { +572 let (mut config, mut options) = if builder.use_system_defaults { +573 match Self::system_config() { +574 Ok((config, options)) => (config, options), +575 Err(error) => { +576 debug!(%error, "Failed to read the system's DNS config, using fallback DNS servers."); +577 (ResolverConfig::google(), ResolverOpts::default()) +578 } +579 } +580 } else { +581 (ResolverConfig::new(), ResolverOpts::default()) +582 }; +583 +584 for (addr, proto) in builder.nameservers.iter() { +585 let nameserver = +586 hickory_resolver::config::NameServerConfig::new(*addr, proto.to_hickory()); +587 config.add_name_server(nameserver); +588 } +589 +590 // see [`DnsResolver::lookup_ipv4_ipv6`] for info on why we avoid `LookupIpStrategy::Ipv4AndIpv6` +591 options.ip_strategy = hickory_resolver::config::LookupIpStrategy::Ipv4thenIpv6; +592 +593 let mut hickory_builder = +594 TokioResolver::builder_with_config(config, TokioConnectionProvider::default()); +595 *hickory_builder.options_mut() = options; +596 hickory_builder.build() +597 } +598 +599 fn system_config() -> Result<(ResolverConfig, ResolverOpts), hickory_resolver::ResolveError> { +600 let (system_config, options) = hickory_resolver::system_conf::read_system_conf()?; +601 +602 // Copy all of the system config, but strip the bad windows nameservers. Unfortunately +603 // there is no easy way to do this. +604 let mut config = hickory_resolver::config::ResolverConfig::new(); +605 if let Some(name) = system_config.domain() { +606 config.set_domain(name.clone()); +607 } +608 for name in system_config.search() { +609 config.add_search(name.clone()); +610 } +611 for nameserver_cfg in system_config.name_servers() { +612 if !WINDOWS_BAD_SITE_LOCAL_DNS_SERVERS.contains(&nameserver_cfg.socket_addr.ip()) { +613 config.add_name_server(nameserver_cfg.clone()); +614 } +615 } +616 Ok((config, options)) +617 } +618 +619 async fn lookup_ipv4( +620 &self, +621 host: String, +622 ) -> Result<impl Iterator<Item = Ipv4Addr> + use<>, DnsError> { +623 Ok(self +624 .resolver +625 .ipv4_lookup(host) +626 .await? +627 .into_iter() +628 .map(Ipv4Addr::from)) +629 } +630 +631 /// Looks up an IPv6 address. +632 async fn lookup_ipv6( +633 &self, +634 host: String, +635 ) -> Result<impl Iterator<Item = Ipv6Addr> + use<>, DnsError> { +636 Ok(self +637 .resolver +638 .ipv6_lookup(host) +639 .await? +640 .into_iter() +641 .map(Ipv6Addr::from)) +642 } +643 +644 /// Looks up TXT records. +645 async fn lookup_txt( +646 &self, +647 host: String, +648 ) -> Result<impl Iterator<Item = TxtRecordData> + use<>, DnsError> { +649 Ok(self +650 .resolver +651 .txt_lookup(host) +652 .await? +653 .into_iter() +654 .map(|txt| TxtRecordData::from_iter(txt.iter().cloned()))) +655 } +656 +657 /// Clears the internal cache. +658 fn clear_cache(&self) { +659 self.resolver.clear_cache() +660 } +661 +662 fn reset(&mut self) { +663 self.resolver = Self::build_resolver(&self.builder); +664 } +665} +666 +667/// Record data for a TXT record. +668/// +669/// This contains a list of character strings, as defined in [RFC 1035 Section 3.3.14]. +670/// +671/// [`TxtRecordData`] implements [`fmt::Display`], so you can call [`ToString::to_string`] to +672/// convert the record data into a string. This will parse each character string with +673/// [`String::from_utf8_lossy`] and then concatenate all strings without a separator. +674/// +675/// If you want to process each character string individually, use [`Self::iter`]. +676/// +677/// [RFC 1035 Section 3.3.14]: https://datatracker.ietf.org/doc/html/rfc1035#section-3.3.14 +678#[derive(Debug, Clone)] +679pub struct TxtRecordData(Box<[Box<[u8]>]>); +680 +681impl TxtRecordData { +682 /// Returns an iterator over the character strings contained in this TXT record. +683 pub fn iter(&self) -> impl Iterator<Item = &[u8]> { +684 self.0.iter().map(|x| x.as_ref()) +685 } +686} +687 +688impl fmt::Display for TxtRecordData { +689 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { +690 for s in self.iter() { +691 write!(f, "{}", &String::from_utf8_lossy(s))? +692 } +693 Ok(()) +694 } +695} +696 +697impl FromIterator<Box<[u8]>> for TxtRecordData { +698 fn from_iter<T: IntoIterator<Item = Box<[u8]>>>(iter: T) -> Self { +699 Self(iter.into_iter().collect()) +700 } +701} +702 +703impl From<Vec<Box<[u8]>>> for TxtRecordData { +704 fn from(value: Vec<Box<[u8]>>) -> Self { +705 Self(value.into_boxed_slice()) +706 } +707} +708 +709/// Helper enum to give a unified type to either of two iterators +710enum Either<A, B> { +711 Left(A), +712 Right(B), +713} +714 +715impl<T, A: Iterator<Item = T>, B: Iterator<Item = T>> Iterator for Either<A, B> { +716 type Item = T; +717 +718 fn next(&mut self) -> Option<Self::Item> { +719 match self { +720 Either::Left(iter) => iter.next(), +721 Either::Right(iter) => iter.next(), +722 } +723 } +724} +725 +726/// Deprecated IPv6 site-local anycast addresses still configured by windows. +727/// +728/// Windows still configures these site-local addresses as soon even as an IPv6 loopback +729/// interface is configured. We do not want to use these DNS servers, the chances of them +730/// being usable are almost always close to zero, while the chance of DNS configuration +731/// **only** relying on these servers and not also being configured normally are also almost +732/// zero. The chance of the DNS resolver accidentally trying one of these and taking a +733/// bunch of timeouts to figure out they're no good are on the other hand very high. +734const WINDOWS_BAD_SITE_LOCAL_DNS_SERVERS: [IpAddr; 3] = [ +735 IpAddr::V6(Ipv6Addr::new(0xfec0, 0, 0, 0xffff, 0, 0, 0, 1)), +736 IpAddr::V6(Ipv6Addr::new(0xfec0, 0, 0, 0xffff, 0, 0, 0, 2)), +737 IpAddr::V6(Ipv6Addr::new(0xfec0, 0, 0, 0xffff, 0, 0, 0, 3)), +738]; +739 +740/// Helper enum to give a unified type to the iterators of [`DnsResolver::lookup_ipv4_ipv6`]. +741enum LookupIter<A, B> { +742 Ipv4(A), +743 Ipv6(B), +744 Both(std::iter::Chain<A, B>), +745} +746 +747impl<A: Iterator<Item = IpAddr>, B: Iterator<Item = IpAddr>> Iterator for LookupIter<A, B> { +748 type Item = IpAddr; +749 +750 fn next(&mut self) -> Option<Self::Item> { +751 match self { +752 LookupIter::Ipv4(iter) => iter.next(), +753 LookupIter::Ipv6(iter) => iter.next(), +754 LookupIter::Both(iter) => iter.next(), +755 } +756 } +757} +758 +759/// Staggers calls to the future F with the given delays. +760/// +761/// The first call is performed immediately. The first call to succeed generates an Ok result +762/// ignoring any previous error. If all calls fail, an error summarizing all errors is returned. +763async fn stagger_call< +764 T, +765 E: std::fmt::Debug + std::fmt::Display, +766 F: Fn() -> Fut, +767 Fut: Future<Output = Result<T, E>>, +768>( +769 f: F, +770 delays_ms: &[u64], +771) -> Result<T, StaggeredError<E>> { +772 let mut calls = n0_future::FuturesUnorderedBounded::new(delays_ms.len() + 1); +773 // NOTE: we add the 0 delay here to have a uniform set of futures. This is more performant than +774 // using alternatives that allow futures of different types. +775 for delay in std::iter::once(&0u64).chain(delays_ms) { +776 let delay = add_jitter(delay); +777 let fut = f(); +778 let staggered_fut = async move { +779 time::sleep(delay).await; +780 fut.await +781 }; +782 calls.push(staggered_fut) +783 } +784 +785 let mut errors = vec![]; +786 while let Some(call_result) = calls.next().await { +787 match call_result { +788 Ok(t) => return Ok(t), +789 Err(e) => errors.push(e), +790 } +791 } +792 +793 Err(StaggeredError::new(errors)) +794} +795 +796fn add_jitter(delay: &u64) -> Duration { +797 // If delay is 0, return 0 immediately. +798 if *delay == 0 { +799 return Duration::ZERO; +800 } +801 +802 // Calculate jitter as a random value in the range of +/- MAX_JITTER_PERCENT of the delay. +803 let max_jitter = delay.saturating_mul(MAX_JITTER_PERCENT * 2) / 100; +804 let jitter = rand::random::<u64>() % max_jitter; +805 +806 Duration::from_millis(delay.saturating_sub(max_jitter / 2).saturating_add(jitter)) +807} +808 +809#[cfg(test)] +810pub(crate) mod tests { +811 use std::sync::atomic::AtomicUsize; +812 +813 use tracing_test::traced_test; +814 +815 use super::*; +816 +817 #[tokio::test] +818 #[traced_test] +819 async fn stagger_basic() { +820 const CALL_RESULTS: &[Result<u8, u8>] = &[Err(2), Ok(3), Ok(5), Ok(7)]; +821 static DONE_CALL: AtomicUsize = AtomicUsize::new(0); +822 let f = || { +823 let r_pos = DONE_CALL.fetch_add(1, std::sync::atomic::Ordering::Relaxed); +824 async move { +825 tracing::info!(r_pos, "call"); +826 CALL_RESULTS[r_pos].map_err(|_| InvalidResponseSnafu.build()) +827 } +828 }; +829 +830 let delays = [1000, 15]; +831 let result = stagger_call(f, &delays).await.unwrap(); +832 assert_eq!(result, 5) +833 } +834 +835 #[test] +836 #[traced_test] +837 fn jitter_test_zero() { +838 let jittered_delay = add_jitter(&0); +839 assert_eq!(jittered_delay, Duration::from_secs(0)); +840 } +841 +842 //Sanity checks that I did the math right +843 #[test] +844 #[traced_test] +845 fn jitter_test_nonzero_lower_bound() { +846 let delay: u64 = 300; +847 for _ in 0..100 { +848 assert!(add_jitter(&delay) >= Duration::from_millis(delay * 8 / 10)); +849 } +850 } +851 +852 #[test] +853 #[traced_test] +854 fn jitter_test_nonzero_upper_bound() { +855 let delay: u64 = 300; +856 for _ in 0..100 { +857 assert!(add_jitter(&delay) < Duration::from_millis(delay * 12 / 10)); +858 } +859 } +860 +861 #[tokio::test] +862 #[traced_test] +863 async fn custom_resolver() { +864 #[derive(Debug)] +865 struct MyResolver; +866 impl Resolver for MyResolver { +867 fn lookup_ipv4(&self, host: String) -> BoxFuture<Result<BoxIter<Ipv4Addr>, DnsError>> { +868 Box::pin(async move { +869 let addr = if host == "foo.example" { +870 Ipv4Addr::new(1, 1, 1, 1) +871 } else { +872 return Err(NoResponseSnafu.build()); +873 }; +874 let iter: BoxIter<Ipv4Addr> = Box::new(vec![addr].into_iter()); +875 Ok(iter) +876 }) +877 } +878 +879 fn lookup_ipv6(&self, _host: String) -> BoxFuture<Result<BoxIter<Ipv6Addr>, DnsError>> { +880 todo!() +881 } +882 +883 fn lookup_txt( +884 &self, +885 _host: String, +886 ) -> BoxFuture<Result<BoxIter<TxtRecordData>, DnsError>> { +887 todo!() +888 } +889 +890 fn clear_cache(&self) { +891 todo!() +892 } +893 +894 fn reset(&mut self) { +895 todo!() +896 } +897 } +898 +899 let resolver = DnsResolver::custom(MyResolver); +900 let mut iter = resolver +901 .lookup_ipv4("foo.example", Duration::from_secs(1)) +902 .await +903 .expect("not to fail"); +904 let addr = iter.next().expect("one result"); +905 assert_eq!(addr, "1.1.1.1".parse::<IpAddr>().unwrap()); +906 +907 let res = resolver +908 .lookup_ipv4("bar.example", Duration::from_secs(1)) +909 .await; +910 assert!(matches!(res, Err(DnsError::NoResponse { .. }))) +911 } +912}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/http.rs.html b/pr/3367/docs/src/iroh_relay/http.rs.html index a42083bba3..bbb2f8425c 100644 --- a/pr/3367/docs/src/iroh_relay/http.rs.html +++ b/pr/3367/docs/src/iroh_relay/http.rs.html @@ -1,58 +1,22 @@ -http.rs - source

    iroh_relay/
    http.rs

    1//! HTTP-specific constants for the relay server and client.
    +http.rs - source

    iroh_relay/
    http.rs

    1//! HTTP-specific constants for the relay server and client.
     2
    -3pub(crate) const HTTP_UPGRADE_PROTOCOL: &str = "iroh derp http";
    -4pub(crate) const WEBSOCKET_UPGRADE_PROTOCOL: &str = "websocket";
    -5#[cfg(feature = "server")] // only used in the server for now
    -6pub(crate) const SUPPORTED_WEBSOCKET_VERSION: &str = "13";
    -7
    -8/// The HTTP path under which the relay accepts relaying connections
    -9/// (over websockets and a custom upgrade protocol).
    -10pub const RELAY_PATH: &str = "/relay";
    -11/// The HTTP path under which the relay allows doing latency queries for testing.
    -12pub const RELAY_PROBE_PATH: &str = "/ping";
    -13/// The legacy HTTP path under which the relay used to accept relaying connections.
    -14/// We keep this for backwards compatibility.
    -15#[cfg(feature = "server")] // legacy paths only used on server-side for backwards compat
    -16pub(crate) const LEGACY_RELAY_PATH: &str = "/derp";
    -17
    -18/// The HTTP upgrade protocol used for relaying.
    -19#[derive(Debug, Copy, Clone, PartialEq, Eq)]
    -20pub enum Protocol {
    -21    /// Relays over the custom relaying protocol with a custom HTTP upgrade header.
    -22    Relay,
    -23    /// Relays over websockets.
    -24    ///
    -25    /// Originally introduced to support browser connections.
    -26    Websocket,
    -27}
    -28
    -29impl Default for Protocol {
    -30    fn default() -> Self {
    -31        #[cfg(not(wasm_browser))]
    -32        return Self::Relay;
    -33        #[cfg(wasm_browser)]
    -34        return Self::Websocket;
    -35    }
    -36}
    -37
    -38impl Protocol {
    -39    /// The HTTP upgrade header used or expected.
    -40    pub const fn upgrade_header(&self) -> &'static str {
    -41        match self {
    -42            Protocol::Relay => HTTP_UPGRADE_PROTOCOL,
    -43            Protocol::Websocket => WEBSOCKET_UPGRADE_PROTOCOL,
    -44        }
    -45    }
    -46
    -47    /// Tries to match the value of an HTTP upgrade header to figure out which protocol should be initiated.
    -48    pub fn parse_header(header: &http::HeaderValue) -> Option<Self> {
    -49        let header_bytes = header.as_bytes();
    -50        if header_bytes == Protocol::Relay.upgrade_header().as_bytes() {
    -51            Some(Protocol::Relay)
    -52        } else if header_bytes == Protocol::Websocket.upgrade_header().as_bytes() {
    -53            Some(Protocol::Websocket)
    -54        } else {
    -55            None
    -56        }
    -57    }
    -58}
    \ No newline at end of file +3
    use http::HeaderName; +4 +5#[cfg(feature = "server")] +6pub(crate) const WEBSOCKET_UPGRADE_PROTOCOL: &str = "websocket"; +7#[cfg(feature = "server")] // only used in the server for now +8pub(crate) const SUPPORTED_WEBSOCKET_VERSION: &str = "13"; +9 +10/// The HTTP path under which the relay accepts relaying connections +11/// (over websockets and a custom upgrade protocol). +12pub const RELAY_PATH: &str = "/relay"; +13/// The HTTP path under which the relay allows doing latency queries for testing. +14pub const RELAY_PROBE_PATH: &str = "/ping"; +15 +16/// The websocket sub-protocol version that we currently support. +17/// +18/// This is sent as the websocket sub-protocol header `Sec-Websocket-Protocol` from +19/// the client and answered from the server. +20pub const RELAY_PROTOCOL_VERSION: &str = "iroh-relay-v1"; +21/// The HTTP header name for relay client authentication +22pub const CLIENT_AUTH_HEADER: HeaderName = HeaderName::from_static("x-iroh-relay-client-auth-v1");
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/key_cache.rs.html b/pr/3367/docs/src/iroh_relay/key_cache.rs.html index 1166b592fd..2b2c9d8ad7 100644 --- a/pr/3367/docs/src/iroh_relay/key_cache.rs.html +++ b/pr/3367/docs/src/iroh_relay/key_cache.rs.html @@ -1,4 +1,4 @@ -key_cache.rs - source

    iroh_relay/
    key_cache.rs

    1use std::{
    +key_cache.rs - source

    iroh_relay/
    key_cache.rs

    1use std::{
     2    num::NonZeroUsize,
     3    sync::{Arc, Mutex},
     4};
    @@ -26,7 +26,7 @@
     26
     27impl KeyCache {
     28    /// Key cache to be used in tests.
    -29    #[cfg(test)]
    +29    #[cfg(all(test, feature = "server"))]
     30    pub fn test() -> Self {
     31        Self::Disabled
     32    }
    diff --git a/pr/3367/docs/src/iroh_relay/lib.rs.html b/pr/3367/docs/src/iroh_relay/lib.rs.html
    index bf234f233b..08c522f449 100644
    --- a/pr/3367/docs/src/iroh_relay/lib.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/lib.rs.html
    @@ -1,4 +1,4 @@
    -lib.rs - source

    iroh_relay/
    lib.rs

    1//! Iroh's relay is a feature within [iroh](https://github.com/n0-computer/iroh), a peer-to-peer
    +lib.rs - source

    iroh_relay/
    lib.rs

    1//! Iroh's relay is a feature within [iroh](https://github.com/n0-computer/iroh), a peer-to-peer
     2//! networking system designed to facilitate direct, encrypted connections between devices. Iroh
     3//! aims to simplify decentralized communication by automatically handling connections through
     4//! "relays" when direct connections aren't immediately possible. The relay server helps establish
    @@ -26,7 +26,7 @@
     26//!   QAD support and expose metrics.
     27// Based on tailscale/derp/derp.go
     28
    -29#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))]
    +29#![cfg_attr(iroh_docsrs, feature(doc_cfg))]
     30#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
     31#![cfg_attr(not(test), deny(clippy::unwrap_used))]
     32
    @@ -53,4 +53,32 @@
     53pub use self::{
     54    ping_tracker::PingTracker,
     55    relay_map::{RelayMap, RelayNode, RelayQuicConfig},
    -56};
    \ No newline at end of file +56}; +57 +58/// This trait allows anything that ends up potentially +59/// wrapping a TLS stream use the underlying [`export_keying_material`] +60/// function. +61/// +62/// [`export_keying_material`]: rustls::ConnectionCommon::export_keying_material +63pub(crate) trait ExportKeyingMaterial { +64 /// If this type ends up wrapping a TLS stream, then this tries +65 /// to export keying material by calling the underlying [`export_keying_material`] +66 /// function. +67 /// +68 /// However unlike that function, this returns `Option`, in case the +69 /// underlying stream might not be wrapping TLS, e.g. as in the case of +70 /// [`MaybeTlsStream`]. +71 /// +72 /// For more information on what this function does, see the +73 /// [`export_keying_material`] documentation. +74 /// +75 /// [`export_keying_material`]: rustls::ConnectionCommon::export_keying_material +76 /// [`MaybeTlsStream`]: crate::client::streams::MaybeTlsStream +77 #[cfg_attr(wasm_browser, allow(unused))] +78 fn export_keying_material<T: AsMut<[u8]>>( +79 &self, +80 output: T, +81 label: &[u8], +82 context: Option<&[u8]>, +83 ) -> Option<T>; +84}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/node_info.rs.html b/pr/3367/docs/src/iroh_relay/node_info.rs.html index 632cd3374d..9b28aabd4b 100644 --- a/pr/3367/docs/src/iroh_relay/node_info.rs.html +++ b/pr/3367/docs/src/iroh_relay/node_info.rs.html @@ -1,4 +1,4 @@ -node_info.rs - source

    iroh_relay/
    node_info.rs

    1//! Support for handling DNS resource records for dialing by [`NodeId`].
    +node_info.rs - source

    iroh_relay/
    node_info.rs

    1//! Support for handling DNS resource records for dialing by [`NodeId`].
     2//!
     3//! Dialing by [`NodeId`] is supported by iroh nodes publishing [Pkarr] records to DNS
     4//! servers or the Mainline DHT.  This module supports creating and parsing these records.
    @@ -40,826 +40,728 @@
     40    str::{FromStr, Utf8Error},
     41};
     42
    -43#[cfg(not(wasm_browser))]
    -44use hickory_resolver::{proto::ProtoError, Name};
    -45use iroh_base::{NodeAddr, NodeId, RelayUrl, SecretKey, SignatureError};
    -46use nested_enum_utils::common_fields;
    -47use snafu::{Backtrace, ResultExt, Snafu};
    -48#[cfg(not(wasm_browser))]
    -49use tracing::warn;
    -50use url::Url;
    -51
    -52#[cfg(not(wasm_browser))]
    -53use crate::{
    -54    defaults::timeouts::DNS_TIMEOUT,
    -55    dns::{DnsError, DnsResolver},
    -56};
    -57
    -58/// The DNS name for the iroh TXT record.
    -59pub const IROH_TXT_NAME: &str = "_iroh";
    -60
    -61#[common_fields({
    -62    backtrace: Option<Backtrace>,
    -63    #[snafu(implicit)]
    -64    span_trace: n0_snafu::SpanTrace,
    -65})]
    -66#[allow(missing_docs)]
    -67#[derive(Debug, Snafu)]
    -68#[non_exhaustive]
    -69#[snafu(visibility(pub(crate)))]
    -70pub enum EncodingError {
    -71    #[snafu(transparent)]
    -72    FailedBuildingPacket {
    -73        source: pkarr::errors::SignedPacketBuildError,
    -74    },
    -75    #[snafu(display("invalid TXT entry"))]
    -76    InvalidTxtEntry { source: pkarr::dns::SimpleDnsError },
    -77}
    -78
    -79#[common_fields({
    -80    backtrace: Option<Backtrace>,
    -81    #[snafu(implicit)]
    -82    span_trace: n0_snafu::SpanTrace,
    -83})]
    -84#[allow(missing_docs)]
    -85#[derive(Debug, Snafu)]
    -86#[non_exhaustive]
    -87#[snafu(visibility(pub(crate)))]
    -88pub enum DecodingError {
    -89    #[snafu(display("node id was not encoded in valid z32"))]
    -90    InvalidEncodingZ32 { source: z32::Z32Error },
    -91    #[snafu(display("length must be 32 bytes, but got {len} byte(s)"))]
    -92    InvalidLength { len: usize },
    -93    #[snafu(display("node id is not a valid public key"))]
    -94    InvalidSignature { source: SignatureError },
    -95}
    -96
    -97/// Extension methods for [`NodeId`] to encode to and decode from [`z32`],
    -98/// which is the encoding used in [`pkarr`] domain names.
    -99pub trait NodeIdExt {
    -100    /// Encodes a [`NodeId`] in [`z-base-32`] encoding.
    -101    ///
    -102    /// [z-base-32]: https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
    -103    fn to_z32(&self) -> String;
    -104
    -105    /// Parses a [`NodeId`] from [`z-base-32`] encoding.
    -106    ///
    -107    /// [z-base-32]: https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
    -108    fn from_z32(s: &str) -> Result<NodeId, DecodingError>;
    -109}
    -110
    -111impl NodeIdExt for NodeId {
    -112    fn to_z32(&self) -> String {
    -113        z32::encode(self.as_bytes())
    -114    }
    +43use iroh_base::{NodeAddr, NodeId, RelayUrl, SecretKey, SignatureError};
    +44use nested_enum_utils::common_fields;
    +45use snafu::{Backtrace, ResultExt, Snafu};
    +46use url::Url;
    +47
    +48/// The DNS name for the iroh TXT record.
    +49pub const IROH_TXT_NAME: &str = "_iroh";
    +50
    +51#[common_fields({
    +52    backtrace: Option<Backtrace>,
    +53    #[snafu(implicit)]
    +54    span_trace: n0_snafu::SpanTrace,
    +55})]
    +56#[allow(missing_docs)]
    +57#[derive(Debug, Snafu)]
    +58#[non_exhaustive]
    +59#[snafu(visibility(pub(crate)))]
    +60pub enum EncodingError {
    +61    #[snafu(transparent)]
    +62    FailedBuildingPacket {
    +63        source: pkarr::errors::SignedPacketBuildError,
    +64    },
    +65    #[snafu(display("invalid TXT entry"))]
    +66    InvalidTxtEntry { source: pkarr::dns::SimpleDnsError },
    +67}
    +68
    +69#[common_fields({
    +70    backtrace: Option<Backtrace>,
    +71    #[snafu(implicit)]
    +72    span_trace: n0_snafu::SpanTrace,
    +73})]
    +74#[allow(missing_docs)]
    +75#[derive(Debug, Snafu)]
    +76#[non_exhaustive]
    +77#[snafu(visibility(pub(crate)))]
    +78pub enum DecodingError {
    +79    #[snafu(display("node id was not encoded in valid z32"))]
    +80    InvalidEncodingZ32 { source: z32::Z32Error },
    +81    #[snafu(display("length must be 32 bytes, but got {len} byte(s)"))]
    +82    InvalidLength { len: usize },
    +83    #[snafu(display("node id is not a valid public key"))]
    +84    InvalidSignature { source: SignatureError },
    +85}
    +86
    +87/// Extension methods for [`NodeId`] to encode to and decode from [`z32`],
    +88/// which is the encoding used in [`pkarr`] domain names.
    +89pub trait NodeIdExt {
    +90    /// Encodes a [`NodeId`] in [`z-base-32`] encoding.
    +91    ///
    +92    /// [`z-base-32`]: https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
    +93    fn to_z32(&self) -> String;
    +94
    +95    /// Parses a [`NodeId`] from [`z-base-32`] encoding.
    +96    ///
    +97    /// [`z-base-32`]: https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt
    +98    fn from_z32(s: &str) -> Result<NodeId, DecodingError>;
    +99}
    +100
    +101impl NodeIdExt for NodeId {
    +102    fn to_z32(&self) -> String {
    +103        z32::encode(self.as_bytes())
    +104    }
    +105
    +106    fn from_z32(s: &str) -> Result<NodeId, DecodingError> {
    +107        let bytes = z32::decode(s.as_bytes()).context(InvalidEncodingZ32Snafu)?;
    +108        let bytes: &[u8; 32] = &bytes
    +109            .try_into()
    +110            .map_err(|_| InvalidLengthSnafu { len: s.len() }.build())?;
    +111        let node_id = NodeId::from_bytes(bytes).context(InvalidSignatureSnafu)?;
    +112        Ok(node_id)
    +113    }
    +114}
     115
    -116    fn from_z32(s: &str) -> Result<NodeId, DecodingError> {
    -117        let bytes = z32::decode(s.as_bytes()).context(InvalidEncodingZ32Snafu)?;
    -118        let bytes: &[u8; 32] = &bytes
    -119            .try_into()
    -120            .map_err(|_| InvalidLengthSnafu { len: s.len() }.build())?;
    -121        let node_id = NodeId::from_bytes(bytes).context(InvalidSignatureSnafu)?;
    -122        Ok(node_id)
    -123    }
    -124}
    -125
    -126/// Data about a node that may be published to and resolved from discovery services.
    -127///
    -128/// This includes an optional [`RelayUrl`], a set of direct addresses, and the optional
    -129/// [`UserData`], a string that can be set by applications and is not parsed or used by iroh
    -130/// itself.
    -131///
    -132/// This struct does not include the node's [`NodeId`], only the data *about* a certain
    -133/// node. See [`NodeInfo`] for a struct that contains a [`NodeId`] with associated [`NodeData`].
    -134#[derive(Debug, Clone, Default, Eq, PartialEq)]
    -135pub struct NodeData {
    -136    /// URL of the home relay of this node.
    -137    relay_url: Option<RelayUrl>,
    -138    /// Direct addresses where this node can be reached.
    -139    direct_addresses: BTreeSet<SocketAddr>,
    -140    /// Optional user-defined [`UserData`] for this node.
    -141    user_data: Option<UserData>,
    -142}
    +116/// Data about a node that may be published to and resolved from discovery services.
    +117///
    +118/// This includes an optional [`RelayUrl`], a set of direct addresses, and the optional
    +119/// [`UserData`], a string that can be set by applications and is not parsed or used by iroh
    +120/// itself.
    +121///
    +122/// This struct does not include the node's [`NodeId`], only the data *about* a certain
    +123/// node. See [`NodeInfo`] for a struct that contains a [`NodeId`] with associated [`NodeData`].
    +124#[derive(Debug, Clone, Default, Eq, PartialEq)]
    +125pub struct NodeData {
    +126    /// URL of the home relay of this node.
    +127    relay_url: Option<RelayUrl>,
    +128    /// Direct addresses where this node can be reached.
    +129    direct_addresses: BTreeSet<SocketAddr>,
    +130    /// Optional user-defined [`UserData`] for this node.
    +131    user_data: Option<UserData>,
    +132}
    +133
    +134impl NodeData {
    +135    /// Creates a new [`NodeData`] with a relay URL and a set of direct addresses.
    +136    pub fn new(relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>) -> Self {
    +137        Self {
    +138            relay_url,
    +139            direct_addresses,
    +140            user_data: None,
    +141        }
    +142    }
     143
    -144impl NodeData {
    -145    /// Creates a new [`NodeData`] with a relay URL and a set of direct addresses.
    -146    pub fn new(relay_url: Option<RelayUrl>, direct_addresses: BTreeSet<SocketAddr>) -> Self {
    -147        Self {
    -148            relay_url,
    -149            direct_addresses,
    -150            user_data: None,
    -151        }
    -152    }
    -153
    -154    /// Sets the relay URL and returns the updated node data.
    -155    pub fn with_relay_url(mut self, relay_url: Option<RelayUrl>) -> Self {
    -156        self.relay_url = relay_url;
    -157        self
    -158    }
    -159
    -160    /// Sets the direct addresses and returns the updated node data.
    -161    pub fn with_direct_addresses(mut self, direct_addresses: BTreeSet<SocketAddr>) -> Self {
    -162        self.direct_addresses = direct_addresses;
    -163        self
    -164    }
    -165
    -166    /// Sets the user-defined data and returns the updated node data.
    -167    pub fn with_user_data(mut self, user_data: Option<UserData>) -> Self {
    -168        self.user_data = user_data;
    -169        self
    -170    }
    +144    /// Sets the relay URL and returns the updated node data.
    +145    pub fn with_relay_url(mut self, relay_url: Option<RelayUrl>) -> Self {
    +146        self.relay_url = relay_url;
    +147        self
    +148    }
    +149
    +150    /// Sets the direct addresses and returns the updated node data.
    +151    pub fn with_direct_addresses(mut self, direct_addresses: BTreeSet<SocketAddr>) -> Self {
    +152        self.direct_addresses = direct_addresses;
    +153        self
    +154    }
    +155
    +156    /// Sets the user-defined data and returns the updated node data.
    +157    pub fn with_user_data(mut self, user_data: Option<UserData>) -> Self {
    +158        self.user_data = user_data;
    +159        self
    +160    }
    +161
    +162    /// Returns the relay URL of the node.
    +163    pub fn relay_url(&self) -> Option<&RelayUrl> {
    +164        self.relay_url.as_ref()
    +165    }
    +166
    +167    /// Returns the optional user-defined data of the node.
    +168    pub fn user_data(&self) -> Option<&UserData> {
    +169        self.user_data.as_ref()
    +170    }
     171
    -172    /// Returns the relay URL of the node.
    -173    pub fn relay_url(&self) -> Option<&RelayUrl> {
    -174        self.relay_url.as_ref()
    +172    /// Returns the direct addresses of the node.
    +173    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr> {
    +174        &self.direct_addresses
     175    }
     176
    -177    /// Returns the optional user-defined data of the node.
    -178    pub fn user_data(&self) -> Option<&UserData> {
    -179        self.user_data.as_ref()
    +177    /// Removes all direct addresses from the node data.
    +178    pub fn clear_direct_addresses(&mut self) {
    +179        self.direct_addresses = Default::default();
     180    }
     181
    -182    /// Returns the direct addresses of the node.
    -183    pub fn direct_addresses(&self) -> &BTreeSet<SocketAddr> {
    -184        &self.direct_addresses
    +182    /// Adds direct addresses to the node data.
    +183    pub fn add_direct_addresses(&mut self, addrs: impl IntoIterator<Item = SocketAddr>) {
    +184        self.direct_addresses.extend(addrs)
     185    }
     186
    -187    /// Removes all direct addresses from the node data.
    -188    pub fn clear_direct_addresses(&mut self) {
    -189        self.direct_addresses = Default::default();
    +187    /// Sets the relay URL of the node data.
    +188    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>) {
    +189        self.relay_url = relay_url
     190    }
     191
    -192    /// Adds direct addresses to the node data.
    -193    pub fn add_direct_addresses(&mut self, addrs: impl IntoIterator<Item = SocketAddr>) {
    -194        self.direct_addresses.extend(addrs)
    +192    /// Sets the user-defined data of the node data.
    +193    pub fn set_user_data(&mut self, user_data: Option<UserData>) {
    +194        self.user_data = user_data;
     195    }
    -196
    -197    /// Sets the relay URL of the node data.
    -198    pub fn set_relay_url(&mut self, relay_url: Option<RelayUrl>) {
    -199        self.relay_url = relay_url
    -200    }
    -201
    -202    /// Sets the user-defined data of the node data.
    -203    pub fn set_user_data(&mut self, user_data: Option<UserData>) {
    -204        self.user_data = user_data;
    +196}
    +197
    +198impl From<NodeAddr> for NodeData {
    +199    fn from(node_addr: NodeAddr) -> Self {
    +200        Self {
    +201            relay_url: node_addr.relay_url,
    +202            direct_addresses: node_addr.direct_addresses,
    +203            user_data: None,
    +204        }
     205    }
     206}
     207
    -208impl From<NodeAddr> for NodeData {
    -209    fn from(node_addr: NodeAddr) -> Self {
    -210        Self {
    -211            relay_url: node_addr.relay_url,
    -212            direct_addresses: node_addr.direct_addresses,
    -213            user_data: None,
    -214        }
    -215    }
    -216}
    -217
    -218// User-defined data that can be published and resolved through node discovery.
    -219///
    -220/// Under the hood this is a UTF-8 String is no longer than [`UserData::MAX_LENGTH`] bytes.
    -221///
    -222/// Iroh does not keep track of or examine the user-defined data.
    -223///
    -224/// `UserData` implements [`FromStr`] and [`TryFrom<String>`], so you can
    -225/// convert `&str` and `String` into `UserData` easily.
    -226#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
    -227pub struct UserData(String);
    -228
    -229impl UserData {
    -230    /// The max byte length allowed for user-defined data.
    -231    ///
    -232    /// In DNS discovery services, the user-defined data is stored in a TXT record character string,
    -233    /// which has a max length of 255 bytes. We need to subtract the `user-data=` prefix,
    -234    /// which leaves 245 bytes for the actual user-defined data.
    -235    pub const MAX_LENGTH: usize = 245;
    -236}
    -237
    -238/// Error returned when an input value is too long for [`UserData`].
    -239#[allow(missing_docs)]
    -240#[derive(Debug, Snafu)]
    -241pub struct MaxLengthExceededError {
    -242    backtrace: Option<Backtrace>,
    -243    #[snafu(implicit)]
    -244    span_trace: n0_snafu::SpanTrace,
    -245}
    -246
    -247impl TryFrom<String> for UserData {
    -248    type Error = MaxLengthExceededError;
    -249
    -250    fn try_from(value: String) -> Result<Self, Self::Error> {
    -251        snafu::ensure!(value.len() <= Self::MAX_LENGTH, MaxLengthExceededSnafu);
    -252        Ok(Self(value))
    -253    }
    -254}
    -255
    -256impl FromStr for UserData {
    -257    type Err = MaxLengthExceededError;
    -258
    -259    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
    -260        snafu::ensure!(s.len() <= Self::MAX_LENGTH, MaxLengthExceededSnafu);
    -261        Ok(Self(s.to_string()))
    -262    }
    -263}
    -264
    -265impl fmt::Display for UserData {
    -266    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    -267        write!(f, "{}", self.0)
    -268    }
    -269}
    -270
    -271impl AsRef<str> for UserData {
    -272    fn as_ref(&self) -> &str {
    -273        &self.0
    -274    }
    -275}
    -276
    -277/// Information about a node that may be published to and resolved from discovery services.
    -278///
    -279/// This struct couples a [`NodeId`] with its associated [`NodeData`].
    -280#[derive(derive_more::Debug, Clone, Eq, PartialEq)]
    -281pub struct NodeInfo {
    -282    /// The [`NodeId`] of the node this is about.
    -283    pub node_id: NodeId,
    -284    /// The information published about the node.
    -285    pub data: NodeData,
    -286}
    -287
    -288impl From<TxtAttrs<IrohAttr>> for NodeInfo {
    -289    fn from(attrs: TxtAttrs<IrohAttr>) -> Self {
    -290        (&attrs).into()
    -291    }
    -292}
    -293
    -294impl From<&TxtAttrs<IrohAttr>> for NodeInfo {
    -295    fn from(attrs: &TxtAttrs<IrohAttr>) -> Self {
    -296        let node_id = attrs.node_id();
    -297        let attrs = attrs.attrs();
    -298        let relay_url = attrs
    -299            .get(&IrohAttr::Relay)
    -300            .into_iter()
    -301            .flatten()
    -302            .next()
    -303            .and_then(|s| Url::parse(s).ok());
    -304        let direct_addresses = attrs
    -305            .get(&IrohAttr::Addr)
    -306            .into_iter()
    -307            .flatten()
    -308            .filter_map(|s| SocketAddr::from_str(s).ok())
    -309            .collect();
    -310        let user_data = attrs
    -311            .get(&IrohAttr::UserData)
    -312            .into_iter()
    -313            .flatten()
    -314            .next()
    -315            .and_then(|s| UserData::from_str(s).ok());
    -316        let data = NodeData {
    -317            relay_url: relay_url.map(Into::into),
    -318            direct_addresses,
    -319            user_data,
    -320        };
    -321        Self { node_id, data }
    -322    }
    -323}
    -324
    -325impl From<NodeInfo> for NodeAddr {
    -326    fn from(value: NodeInfo) -> Self {
    -327        value.into_node_addr()
    -328    }
    -329}
    -330
    -331impl From<NodeAddr> for NodeInfo {
    -332    fn from(addr: NodeAddr) -> Self {
    -333        Self::new(addr.node_id)
    -334            .with_relay_url(addr.relay_url)
    -335            .with_direct_addresses(addr.direct_addresses)
    -336    }
    -337}
    -338
    -339impl NodeInfo {
    -340    /// Creates a new [`NodeInfo`] with an empty [`NodeData`].
    -341    pub fn new(node_id: NodeId) -> Self {
    -342        Self::from_parts(node_id, Default::default())
    -343    }
    -344
    -345    /// Creates a new [`NodeInfo`] from its parts.
    -346    pub fn from_parts(node_id: NodeId, data: NodeData) -> Self {
    -347        Self { node_id, data }
    -348    }
    -349
    -350    /// Sets the relay URL and returns the updated node info.
    -351    pub fn with_relay_url(mut self, relay_url: Option<RelayUrl>) -> Self {
    -352        self.data = self.data.with_relay_url(relay_url);
    -353        self
    -354    }
    -355
    -356    /// Sets the direct addresses and returns the updated node info.
    -357    pub fn with_direct_addresses(mut self, direct_addresses: BTreeSet<SocketAddr>) -> Self {
    -358        self.data = self.data.with_direct_addresses(direct_addresses);
    -359        self
    -360    }
    -361
    -362    /// Sets the user-defined data and returns the updated node info.
    -363    pub fn with_user_data(mut self, user_data: Option<UserData>) -> Self {
    -364        self.data = self.data.with_user_data(user_data);
    -365        self
    -366    }
    -367
    -368    /// Converts into a [`NodeAddr`] by cloning the needed fields.
    -369    pub fn to_node_addr(&self) -> NodeAddr {
    -370        NodeAddr {
    -371            node_id: self.node_id,
    -372            relay_url: self.data.relay_url.clone(),
    -373            direct_addresses: self.data.direct_addresses.clone(),
    -374        }
    -375    }
    -376
    -377    /// Converts into a [`NodeAddr`] without cloning.
    -378    pub fn into_node_addr(self) -> NodeAddr {
    -379        NodeAddr {
    -380            node_id: self.node_id,
    -381            relay_url: self.data.relay_url,
    -382            direct_addresses: self.data.direct_addresses,
    -383        }
    -384    }
    -385
    -386    fn to_attrs(&self) -> TxtAttrs<IrohAttr> {
    -387        self.into()
    +208// User-defined data that can be published and resolved through node discovery.
    +209///
    +210/// Under the hood this is a UTF-8 String is no longer than [`UserData::MAX_LENGTH`] bytes.
    +211///
    +212/// Iroh does not keep track of or examine the user-defined data.
    +213///
    +214/// `UserData` implements [`FromStr`] and [`TryFrom<String>`], so you can
    +215/// convert `&str` and `String` into `UserData` easily.
    +216#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
    +217pub struct UserData(String);
    +218
    +219impl UserData {
    +220    /// The max byte length allowed for user-defined data.
    +221    ///
    +222    /// In DNS discovery services, the user-defined data is stored in a TXT record character string,
    +223    /// which has a max length of 255 bytes. We need to subtract the `user-data=` prefix,
    +224    /// which leaves 245 bytes for the actual user-defined data.
    +225    pub const MAX_LENGTH: usize = 245;
    +226}
    +227
    +228/// Error returned when an input value is too long for [`UserData`].
    +229#[allow(missing_docs)]
    +230#[derive(Debug, Snafu)]
    +231pub struct MaxLengthExceededError {
    +232    backtrace: Option<Backtrace>,
    +233    #[snafu(implicit)]
    +234    span_trace: n0_snafu::SpanTrace,
    +235}
    +236
    +237impl TryFrom<String> for UserData {
    +238    type Error = MaxLengthExceededError;
    +239
    +240    fn try_from(value: String) -> Result<Self, Self::Error> {
    +241        snafu::ensure!(value.len() <= Self::MAX_LENGTH, MaxLengthExceededSnafu);
    +242        Ok(Self(value))
    +243    }
    +244}
    +245
    +246impl FromStr for UserData {
    +247    type Err = MaxLengthExceededError;
    +248
    +249    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
    +250        snafu::ensure!(s.len() <= Self::MAX_LENGTH, MaxLengthExceededSnafu);
    +251        Ok(Self(s.to_string()))
    +252    }
    +253}
    +254
    +255impl fmt::Display for UserData {
    +256    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
    +257        write!(f, "{}", self.0)
    +258    }
    +259}
    +260
    +261impl AsRef<str> for UserData {
    +262    fn as_ref(&self) -> &str {
    +263        &self.0
    +264    }
    +265}
    +266
    +267/// Information about a node that may be published to and resolved from discovery services.
    +268///
    +269/// This struct couples a [`NodeId`] with its associated [`NodeData`].
    +270#[derive(derive_more::Debug, Clone, Eq, PartialEq)]
    +271pub struct NodeInfo {
    +272    /// The [`NodeId`] of the node this is about.
    +273    pub node_id: NodeId,
    +274    /// The information published about the node.
    +275    pub data: NodeData,
    +276}
    +277
    +278impl From<TxtAttrs<IrohAttr>> for NodeInfo {
    +279    fn from(attrs: TxtAttrs<IrohAttr>) -> Self {
    +280        (&attrs).into()
    +281    }
    +282}
    +283
    +284impl From<&TxtAttrs<IrohAttr>> for NodeInfo {
    +285    fn from(attrs: &TxtAttrs<IrohAttr>) -> Self {
    +286        let node_id = attrs.node_id();
    +287        let attrs = attrs.attrs();
    +288        let relay_url = attrs
    +289            .get(&IrohAttr::Relay)
    +290            .into_iter()
    +291            .flatten()
    +292            .next()
    +293            .and_then(|s| Url::parse(s).ok());
    +294        let direct_addresses = attrs
    +295            .get(&IrohAttr::Addr)
    +296            .into_iter()
    +297            .flatten()
    +298            .filter_map(|s| SocketAddr::from_str(s).ok())
    +299            .collect();
    +300        let user_data = attrs
    +301            .get(&IrohAttr::UserData)
    +302            .into_iter()
    +303            .flatten()
    +304            .next()
    +305            .and_then(|s| UserData::from_str(s).ok());
    +306        let data = NodeData {
    +307            relay_url: relay_url.map(Into::into),
    +308            direct_addresses,
    +309            user_data,
    +310        };
    +311        Self { node_id, data }
    +312    }
    +313}
    +314
    +315impl From<NodeInfo> for NodeAddr {
    +316    fn from(value: NodeInfo) -> Self {
    +317        value.into_node_addr()
    +318    }
    +319}
    +320
    +321impl From<NodeAddr> for NodeInfo {
    +322    fn from(addr: NodeAddr) -> Self {
    +323        Self::new(addr.node_id)
    +324            .with_relay_url(addr.relay_url)
    +325            .with_direct_addresses(addr.direct_addresses)
    +326    }
    +327}
    +328
    +329impl NodeInfo {
    +330    /// Creates a new [`NodeInfo`] with an empty [`NodeData`].
    +331    pub fn new(node_id: NodeId) -> Self {
    +332        Self::from_parts(node_id, Default::default())
    +333    }
    +334
    +335    /// Creates a new [`NodeInfo`] from its parts.
    +336    pub fn from_parts(node_id: NodeId, data: NodeData) -> Self {
    +337        Self { node_id, data }
    +338    }
    +339
    +340    /// Sets the relay URL and returns the updated node info.
    +341    pub fn with_relay_url(mut self, relay_url: Option<RelayUrl>) -> Self {
    +342        self.data = self.data.with_relay_url(relay_url);
    +343        self
    +344    }
    +345
    +346    /// Sets the direct addresses and returns the updated node info.
    +347    pub fn with_direct_addresses(mut self, direct_addresses: BTreeSet<SocketAddr>) -> Self {
    +348        self.data = self.data.with_direct_addresses(direct_addresses);
    +349        self
    +350    }
    +351
    +352    /// Sets the user-defined data and returns the updated node info.
    +353    pub fn with_user_data(mut self, user_data: Option<UserData>) -> Self {
    +354        self.data = self.data.with_user_data(user_data);
    +355        self
    +356    }
    +357
    +358    /// Converts into a [`NodeAddr`] by cloning the needed fields.
    +359    pub fn to_node_addr(&self) -> NodeAddr {
    +360        NodeAddr {
    +361            node_id: self.node_id,
    +362            relay_url: self.data.relay_url.clone(),
    +363            direct_addresses: self.data.direct_addresses.clone(),
    +364        }
    +365    }
    +366
    +367    /// Converts into a [`NodeAddr`] without cloning.
    +368    pub fn into_node_addr(self) -> NodeAddr {
    +369        NodeAddr {
    +370            node_id: self.node_id,
    +371            relay_url: self.data.relay_url,
    +372            direct_addresses: self.data.direct_addresses,
    +373        }
    +374    }
    +375
    +376    fn to_attrs(&self) -> TxtAttrs<IrohAttr> {
    +377        self.into()
    +378    }
    +379
    +380    #[cfg(not(wasm_browser))]
    +381    /// Parses a [`NodeInfo`] from DNS TXT lookup.
    +382    pub fn from_txt_lookup(
    +383        domain_name: String,
    +384        lookup: impl Iterator<Item = crate::dns::TxtRecordData>,
    +385    ) -> Result<Self, ParseError> {
    +386        let attrs = TxtAttrs::from_txt_lookup(domain_name, lookup)?;
    +387        Ok(Self::from(attrs))
     388    }
     389
    -390    #[cfg(not(wasm_browser))]
    -391    /// Parses a [`NodeInfo`] from a TXT records lookup.
    -392    pub fn from_txt_lookup(lookup: crate::dns::TxtLookup) -> Result<Self, ParseError> {
    -393        let attrs = TxtAttrs::from_txt_lookup(lookup)?;
    -394        Ok(attrs.into())
    -395    }
    -396
    -397    /// Parses a [`NodeInfo`] from a [`pkarr::SignedPacket`].
    -398    pub fn from_pkarr_signed_packet(packet: &pkarr::SignedPacket) -> Result<Self, ParseError> {
    -399        let attrs = TxtAttrs::from_pkarr_signed_packet(packet)?;
    -400        Ok(attrs.into())
    -401    }
    -402
    -403    /// Creates a [`pkarr::SignedPacket`].
    -404    ///
    -405    /// This constructs a DNS packet and signs it with a [`SecretKey`].
    -406    pub fn to_pkarr_signed_packet(
    -407        &self,
    -408        secret_key: &SecretKey,
    -409        ttl: u32,
    -410    ) -> Result<pkarr::SignedPacket, EncodingError> {
    -411        self.to_attrs().to_pkarr_signed_packet(secret_key, ttl)
    -412    }
    -413
    -414    /// Converts into a list of `{key}={value}` strings.
    -415    pub fn to_txt_strings(&self) -> Vec<String> {
    -416        self.to_attrs().to_txt_strings().collect()
    -417    }
    -418}
    -419
    -420#[cfg(not(wasm_browser))]
    -421#[common_fields({
    -422    backtrace: Option<Backtrace>,
    -423    #[snafu(implicit)]
    -424    span_trace: n0_snafu::SpanTrace,
    -425})]
    -426#[allow(missing_docs)]
    -427#[derive(Debug, Snafu)]
    -428#[non_exhaustive]
    -429#[snafu(visibility(pub(crate)))]
    -430pub enum LookupError {
    -431    #[snafu(display("Malformed txt from lookup"))]
    -432    ParseError {
    -433        #[snafu(source(from(ParseError, Box::new)))]
    -434        source: Box<ParseError>,
    -435    },
    -436    #[snafu(display("Failed to resolve TXT record"))]
    -437    LookupFailed {
    -438        #[snafu(source(from(DnsError, Box::new)))]
    -439        source: Box<DnsError>,
    -440    },
    -441    #[cfg(not(wasm_browser))]
    -442    #[snafu(display("Name is not a valid TXT label"))]
    -443    InvalidLabel { source: ProtoError },
    -444}
    -445
    -446#[common_fields({
    -447    backtrace: Option<Backtrace>,
    -448    #[snafu(implicit)]
    -449    span_trace: n0_snafu::SpanTrace,
    -450})]
    -451#[allow(missing_docs)]
    -452#[derive(Debug, Snafu)]
    -453#[non_exhaustive]
    -454#[snafu(visibility(pub(crate)))]
    -455pub enum ParseError {
    -456    #[snafu(display("Expected format `key=value`, received `{s}`"))]
    -457    UnexpectedFormat { s: String },
    -458    #[snafu(display("Could not convert key to Attr"))]
    -459    AttrFromString { key: String },
    -460    #[snafu(display("Expected 2 labels, received {num_labels}"))]
    -461    NumLabels { num_labels: usize },
    -462    #[snafu(display("Could not parse labels"))]
    -463    Utf8 { source: Utf8Error },
    -464    #[snafu(display("Record is not an `iroh` record, expected `_iroh`, got `{label}`"))]
    -465    NotAnIrohRecord { label: String },
    -466    #[snafu(transparent)]
    -467    DecodingError {
    -468        #[snafu(source(from(DecodingError, Box::new)))]
    -469        source: Box<DecodingError>,
    -470    },
    -471}
    -472
    -473impl std::ops::Deref for NodeInfo {
    -474    type Target = NodeData;
    -475    fn deref(&self) -> &Self::Target {
    -476        &self.data
    -477    }
    -478}
    -479
    -480impl std::ops::DerefMut for NodeInfo {
    -481    fn deref_mut(&mut self) -> &mut Self::Target {
    -482        &mut self.data
    -483    }
    -484}
    -485
    -486/// Parses a [`NodeId`] from iroh DNS name.
    -487///
    -488/// Takes a [`hickory_resolver::proto::rr::Name`] DNS name and expects the first label to be
    -489/// [`IROH_TXT_NAME`] and the second label to be a z32 encoded [`NodeId`]. Ignores
    -490/// subsequent labels.
    -491#[cfg(not(wasm_browser))]
    -492fn node_id_from_hickory_name(
    -493    name: &hickory_resolver::proto::rr::Name,
    -494) -> Result<NodeId, ParseError> {
    -495    if name.num_labels() < 2 {
    -496        return Err(NumLabelsSnafu {
    -497            num_labels: name.num_labels(),
    -498        }
    -499        .build());
    -500    }
    -501    let mut labels = name.iter();
    -502    let label =
    -503        std::str::from_utf8(labels.next().expect("num_labels checked")).context(Utf8Snafu)?;
    -504    if label != IROH_TXT_NAME {
    -505        return Err(NotAnIrohRecordSnafu { label }.build());
    -506    }
    -507    let label =
    -508        std::str::from_utf8(labels.next().expect("num_labels checked")).context(Utf8Snafu)?;
    -509    let node_id = NodeId::from_z32(label)?;
    -510    Ok(node_id)
    -511}
    -512
    -513/// The attributes supported by iroh for [`IROH_TXT_NAME`] DNS resource records.
    -514///
    -515/// The resource record uses the lower-case names.
    -516#[derive(
    -517    Debug, strum::Display, strum::AsRefStr, strum::EnumString, Hash, Eq, PartialEq, Ord, PartialOrd,
    -518)]
    -519#[strum(serialize_all = "kebab-case")]
    -520pub(crate) enum IrohAttr {
    -521    /// URL of home relay.
    -522    Relay,
    -523    /// Direct address.
    -524    Addr,
    -525    /// User-defined data
    -526    UserData,
    -527}
    -528
    -529/// Attributes parsed from [`IROH_TXT_NAME`] TXT records.
    -530///
    -531/// This struct is generic over the key type. When using with [`String`], this will parse
    -532/// all attributes. Can also be used with an enum, if it implements [`FromStr`] and
    -533/// [`Display`].
    -534#[derive(Debug)]
    -535pub(crate) struct TxtAttrs<T> {
    -536    node_id: NodeId,
    -537    attrs: BTreeMap<T, Vec<String>>,
    -538}
    -539
    -540impl From<&NodeInfo> for TxtAttrs<IrohAttr> {
    -541    fn from(info: &NodeInfo) -> Self {
    -542        let mut attrs = vec![];
    -543        if let Some(relay_url) = &info.data.relay_url {
    -544            attrs.push((IrohAttr::Relay, relay_url.to_string()));
    -545        }
    -546        for addr in &info.data.direct_addresses {
    -547            attrs.push((IrohAttr::Addr, addr.to_string()));
    -548        }
    -549        if let Some(user_data) = &info.data.user_data {
    -550            attrs.push((IrohAttr::UserData, user_data.to_string()));
    -551        }
    -552        Self::from_parts(info.node_id, attrs.into_iter())
    -553    }
    -554}
    -555
    -556impl<T: FromStr + Display + Hash + Ord> TxtAttrs<T> {
    -557    /// Creates [`TxtAttrs`] from a node id and an iterator of key-value pairs.
    -558    pub(crate) fn from_parts(node_id: NodeId, pairs: impl Iterator<Item = (T, String)>) -> Self {
    -559        let mut attrs: BTreeMap<T, Vec<String>> = BTreeMap::new();
    -560        for (k, v) in pairs {
    -561            attrs.entry(k).or_default().push(v);
    -562        }
    -563        Self { attrs, node_id }
    -564    }
    -565
    -566    /// Creates [`TxtAttrs`] from a node id and an iterator of "{key}={value}" strings.
    -567    pub(crate) fn from_strings(
    -568        node_id: NodeId,
    -569        strings: impl Iterator<Item = String>,
    -570    ) -> Result<Self, ParseError> {
    -571        let mut attrs: BTreeMap<T, Vec<String>> = BTreeMap::new();
    -572        for s in strings {
    -573            let mut parts = s.split('=');
    -574            let (Some(key), Some(value)) = (parts.next(), parts.next()) else {
    -575                return Err(UnexpectedFormatSnafu { s }.build());
    -576            };
    -577            let attr = T::from_str(key).map_err(|_| AttrFromStringSnafu { key }.build())?;
    -578            attrs.entry(attr).or_default().push(value.to_string());
    -579        }
    -580        Ok(Self { attrs, node_id })
    -581    }
    -582
    -583    #[cfg(not(wasm_browser))]
    -584    async fn lookup(resolver: &DnsResolver, name: Name) -> Result<Self, LookupError> {
    -585        let name = ensure_iroh_txt_label(name)?;
    -586        let lookup = resolver
    -587            .lookup_txt(name, DNS_TIMEOUT)
    -588            .await
    -589            .context(LookupFailedSnafu)?;
    -590        let attrs = Self::from_txt_lookup(lookup).context(ParseSnafu)?;
    -591        Ok(attrs)
    -592    }
    -593
    -594    /// Looks up attributes by [`NodeId`] and origin domain.
    -595    #[cfg(not(wasm_browser))]
    -596    pub(crate) async fn lookup_by_id(
    -597        resolver: &DnsResolver,
    -598        node_id: &NodeId,
    -599        origin: &str,
    -600    ) -> Result<Self, LookupError> {
    -601        let name = node_domain(node_id, origin)?;
    -602        TxtAttrs::lookup(resolver, name).await
    -603    }
    -604
    -605    /// Looks up attributes by DNS name.
    -606    #[cfg(not(wasm_browser))]
    -607    pub(crate) async fn lookup_by_name(
    -608        resolver: &DnsResolver,
    -609        name: &str,
    -610    ) -> Result<Self, LookupError> {
    -611        let name = Name::from_str(name).context(InvalidLabelSnafu)?;
    -612        TxtAttrs::lookup(resolver, name).await
    -613    }
    -614
    -615    /// Returns the parsed attributes.
    -616    pub(crate) fn attrs(&self) -> &BTreeMap<T, Vec<String>> {
    -617        &self.attrs
    +390    /// Parses a [`NodeInfo`] from a [`pkarr::SignedPacket`].
    +391    pub fn from_pkarr_signed_packet(packet: &pkarr::SignedPacket) -> Result<Self, ParseError> {
    +392        let attrs = TxtAttrs::from_pkarr_signed_packet(packet)?;
    +393        Ok(attrs.into())
    +394    }
    +395
    +396    /// Creates a [`pkarr::SignedPacket`].
    +397    ///
    +398    /// This constructs a DNS packet and signs it with a [`SecretKey`].
    +399    pub fn to_pkarr_signed_packet(
    +400        &self,
    +401        secret_key: &SecretKey,
    +402        ttl: u32,
    +403    ) -> Result<pkarr::SignedPacket, EncodingError> {
    +404        self.to_attrs().to_pkarr_signed_packet(secret_key, ttl)
    +405    }
    +406
    +407    /// Converts into a list of `{key}={value}` strings.
    +408    pub fn to_txt_strings(&self) -> Vec<String> {
    +409        self.to_attrs().to_txt_strings().collect()
    +410    }
    +411}
    +412
    +413#[common_fields({
    +414    backtrace: Option<Backtrace>,
    +415    #[snafu(implicit)]
    +416    span_trace: n0_snafu::SpanTrace,
    +417})]
    +418#[allow(missing_docs)]
    +419#[derive(Debug, Snafu)]
    +420#[non_exhaustive]
    +421#[snafu(visibility(pub(crate)))]
    +422pub enum ParseError {
    +423    #[snafu(display("Expected format `key=value`, received `{s}`"))]
    +424    UnexpectedFormat { s: String },
    +425    #[snafu(display("Could not convert key to Attr"))]
    +426    AttrFromString { key: String },
    +427    #[snafu(display("Expected 2 labels, received {num_labels}"))]
    +428    NumLabels { num_labels: usize },
    +429    #[snafu(display("Could not parse labels"))]
    +430    Utf8 { source: Utf8Error },
    +431    #[snafu(display("Record is not an `iroh` record, expected `_iroh`, got `{label}`"))]
    +432    NotAnIrohRecord { label: String },
    +433    #[snafu(transparent)]
    +434    DecodingError {
    +435        #[snafu(source(from(DecodingError, Box::new)))]
    +436        source: Box<DecodingError>,
    +437    },
    +438}
    +439
    +440impl std::ops::Deref for NodeInfo {
    +441    type Target = NodeData;
    +442    fn deref(&self) -> &Self::Target {
    +443        &self.data
    +444    }
    +445}
    +446
    +447impl std::ops::DerefMut for NodeInfo {
    +448    fn deref_mut(&mut self) -> &mut Self::Target {
    +449        &mut self.data
    +450    }
    +451}
    +452
    +453/// Parses a [`NodeId`] from iroh DNS name.
    +454///
    +455/// Takes a [`hickory_resolver::proto::rr::Name`] DNS name and expects the first label to be
    +456/// [`IROH_TXT_NAME`] and the second label to be a z32 encoded [`NodeId`]. Ignores
    +457/// subsequent labels.
    +458#[cfg(not(wasm_browser))]
    +459fn node_id_from_txt_name(name: &str) -> Result<NodeId, ParseError> {
    +460    let num_labels = name.split(".").count();
    +461    if num_labels < 2 {
    +462        return Err(NumLabelsSnafu { num_labels }.build());
    +463    }
    +464    let mut labels = name.split(".");
    +465    let label = labels.next().expect("checked above");
    +466    if label != IROH_TXT_NAME {
    +467        return Err(NotAnIrohRecordSnafu { label }.build());
    +468    }
    +469    let label = labels.next().expect("checked above");
    +470    let node_id = NodeId::from_z32(label)?;
    +471    Ok(node_id)
    +472}
    +473
    +474/// The attributes supported by iroh for [`IROH_TXT_NAME`] DNS resource records.
    +475///
    +476/// The resource record uses the lower-case names.
    +477#[derive(
    +478    Debug, strum::Display, strum::AsRefStr, strum::EnumString, Hash, Eq, PartialEq, Ord, PartialOrd,
    +479)]
    +480#[strum(serialize_all = "kebab-case")]
    +481pub(crate) enum IrohAttr {
    +482    /// URL of home relay.
    +483    Relay,
    +484    /// Direct address.
    +485    Addr,
    +486    /// User-defined data
    +487    UserData,
    +488}
    +489
    +490/// Attributes parsed from [`IROH_TXT_NAME`] TXT records.
    +491///
    +492/// This struct is generic over the key type. When using with [`String`], this will parse
    +493/// all attributes. Can also be used with an enum, if it implements [`FromStr`] and
    +494/// [`Display`].
    +495#[derive(Debug)]
    +496pub(crate) struct TxtAttrs<T> {
    +497    node_id: NodeId,
    +498    attrs: BTreeMap<T, Vec<String>>,
    +499}
    +500
    +501impl From<&NodeInfo> for TxtAttrs<IrohAttr> {
    +502    fn from(info: &NodeInfo) -> Self {
    +503        let mut attrs = vec![];
    +504        if let Some(relay_url) = &info.data.relay_url {
    +505            attrs.push((IrohAttr::Relay, relay_url.to_string()));
    +506        }
    +507        for addr in &info.data.direct_addresses {
    +508            attrs.push((IrohAttr::Addr, addr.to_string()));
    +509        }
    +510        if let Some(user_data) = &info.data.user_data {
    +511            attrs.push((IrohAttr::UserData, user_data.to_string()));
    +512        }
    +513        Self::from_parts(info.node_id, attrs.into_iter())
    +514    }
    +515}
    +516
    +517impl<T: FromStr + Display + Hash + Ord> TxtAttrs<T> {
    +518    /// Creates [`TxtAttrs`] from a node id and an iterator of key-value pairs.
    +519    pub(crate) fn from_parts(node_id: NodeId, pairs: impl Iterator<Item = (T, String)>) -> Self {
    +520        let mut attrs: BTreeMap<T, Vec<String>> = BTreeMap::new();
    +521        for (k, v) in pairs {
    +522            attrs.entry(k).or_default().push(v);
    +523        }
    +524        Self { attrs, node_id }
    +525    }
    +526
    +527    /// Creates [`TxtAttrs`] from a node id and an iterator of "{key}={value}" strings.
    +528    pub(crate) fn from_strings(
    +529        node_id: NodeId,
    +530        strings: impl Iterator<Item = String>,
    +531    ) -> Result<Self, ParseError> {
    +532        let mut attrs: BTreeMap<T, Vec<String>> = BTreeMap::new();
    +533        for s in strings {
    +534            let mut parts = s.split('=');
    +535            let (Some(key), Some(value)) = (parts.next(), parts.next()) else {
    +536                return Err(UnexpectedFormatSnafu { s }.build());
    +537            };
    +538            let attr = T::from_str(key).map_err(|_| AttrFromStringSnafu { key }.build())?;
    +539            attrs.entry(attr).or_default().push(value.to_string());
    +540        }
    +541        Ok(Self { attrs, node_id })
    +542    }
    +543
    +544    /// Returns the parsed attributes.
    +545    pub(crate) fn attrs(&self) -> &BTreeMap<T, Vec<String>> {
    +546        &self.attrs
    +547    }
    +548
    +549    /// Returns the node id.
    +550    pub(crate) fn node_id(&self) -> NodeId {
    +551        self.node_id
    +552    }
    +553
    +554    /// Parses a [`pkarr::SignedPacket`].
    +555    pub(crate) fn from_pkarr_signed_packet(
    +556        packet: &pkarr::SignedPacket,
    +557    ) -> Result<Self, ParseError> {
    +558        use pkarr::dns::{
    +559            rdata::RData,
    +560            {self},
    +561        };
    +562        let pubkey = packet.public_key();
    +563        let pubkey_z32 = pubkey.to_z32();
    +564        let node_id = NodeId::from(*pubkey.verifying_key());
    +565        let zone = dns::Name::new(&pubkey_z32).expect("z32 encoding is valid");
    +566        let txt_data = packet
    +567            .all_resource_records()
    +568            .filter_map(|rr| match &rr.rdata {
    +569                RData::TXT(txt) => match rr.name.without(&zone) {
    +570                    Some(name) if name.to_string() == IROH_TXT_NAME => Some(txt),
    +571                    Some(_) | None => None,
    +572                },
    +573                _ => None,
    +574            });
    +575
    +576        let txt_strs = txt_data.filter_map(|s| String::try_from(s.clone()).ok());
    +577        Self::from_strings(node_id, txt_strs)
    +578    }
    +579
    +580    /// Parses a TXT records lookup.
    +581    #[cfg(not(wasm_browser))]
    +582    pub(crate) fn from_txt_lookup(
    +583        name: String,
    +584        lookup: impl Iterator<Item = crate::dns::TxtRecordData>,
    +585    ) -> Result<Self, ParseError> {
    +586        let queried_node_id = node_id_from_txt_name(&name)?;
    +587
    +588        let strings = lookup.map(|record| record.to_string());
    +589        Self::from_strings(queried_node_id, strings)
    +590    }
    +591
    +592    fn to_txt_strings(&self) -> impl Iterator<Item = String> + '_ {
    +593        self.attrs
    +594            .iter()
    +595            .flat_map(move |(k, vs)| vs.iter().map(move |v| format!("{k}={v}")))
    +596    }
    +597
    +598    /// Creates a [`pkarr::SignedPacket`]
    +599    ///
    +600    /// This constructs a DNS packet and signs it with a [`SecretKey`].
    +601    pub(crate) fn to_pkarr_signed_packet(
    +602        &self,
    +603        secret_key: &SecretKey,
    +604        ttl: u32,
    +605    ) -> Result<pkarr::SignedPacket, EncodingError> {
    +606        use pkarr::dns::{self, rdata};
    +607        let keypair = pkarr::Keypair::from_secret_key(&secret_key.to_bytes());
    +608        let name = dns::Name::new(IROH_TXT_NAME).expect("constant");
    +609
    +610        let mut builder = pkarr::SignedPacket::builder();
    +611        for s in self.to_txt_strings() {
    +612            let mut txt = rdata::TXT::new();
    +613            txt.add_string(&s).context(InvalidTxtEntrySnafu)?;
    +614            builder = builder.txt(name.clone(), txt.into_owned(), ttl);
    +615        }
    +616        let signed_packet = builder.build(&keypair)?;
    +617        Ok(signed_packet)
     618    }
    -619
    -620    /// Returns the node id.
    -621    pub(crate) fn node_id(&self) -> NodeId {
    -622        self.node_id
    -623    }
    -624
    -625    /// Parses a [`pkarr::SignedPacket`].
    -626    pub(crate) fn from_pkarr_signed_packet(
    -627        packet: &pkarr::SignedPacket,
    -628    ) -> Result<Self, ParseError> {
    -629        use pkarr::dns::{
    -630            rdata::RData,
    -631            {self},
    -632        };
    -633        let pubkey = packet.public_key();
    -634        let pubkey_z32 = pubkey.to_z32();
    -635        let node_id = NodeId::from(*pubkey.verifying_key());
    -636        let zone = dns::Name::new(&pubkey_z32).expect("z32 encoding is valid");
    -637        let txt_data = packet
    -638            .all_resource_records()
    -639            .filter_map(|rr| match &rr.rdata {
    -640                RData::TXT(txt) => match rr.name.without(&zone) {
    -641                    Some(name) if name.to_string() == IROH_TXT_NAME => Some(txt),
    -642                    Some(_) | None => None,
    -643                },
    -644                _ => None,
    -645            });
    -646
    -647        let txt_strs = txt_data.filter_map(|s| String::try_from(s.clone()).ok());
    -648        Self::from_strings(node_id, txt_strs)
    -649    }
    -650
    -651    /// Parses a TXT records lookup.
    -652    #[cfg(not(wasm_browser))]
    -653    pub(crate) fn from_txt_lookup(lookup: crate::dns::TxtLookup) -> Result<Self, ParseError> {
    -654        let queried_node_id = node_id_from_hickory_name(lookup.0.query().name())?;
    -655
    -656        let strings = lookup.0.as_lookup().record_iter().filter_map(|record| {
    -657            match node_id_from_hickory_name(record.name()) {
    -658                // Filter out only TXT record answers that match the node_id we searched for.
    -659                Ok(n) if n == queried_node_id => match record.data().as_txt() {
    -660                    Some(txt) => Some(txt.to_string()),
    -661                    None => {
    -662                        warn!(
    -663                            ?queried_node_id,
    -664                            data = ?record.data(),
    -665                            "unexpected record type for DNS discovery query"
    -666                        );
    -667                        None
    -668                    }
    -669                },
    -670                Ok(answered_node_id) => {
    -671                    warn!(
    -672                        ?queried_node_id,
    -673                        ?answered_node_id,
    -674                        "unexpected node ID answered for DNS query"
    -675                    );
    -676                    None
    -677                }
    -678                Err(e) => {
    -679                    warn!(
    -680                        ?queried_node_id,
    -681                        name = ?record.name(),
    -682                        err = ?e,
    -683                        "unexpected answer record name for DNS query"
    -684                    );
    -685                    None
    -686                }
    -687            }
    -688        });
    -689
    -690        Self::from_strings(queried_node_id, strings)
    -691    }
    -692
    -693    fn to_txt_strings(&self) -> impl Iterator<Item = String> + '_ {
    -694        self.attrs
    -695            .iter()
    -696            .flat_map(move |(k, vs)| vs.iter().map(move |v| format!("{k}={v}")))
    -697    }
    -698
    -699    /// Creates a [`pkarr::SignedPacket`]
    -700    ///
    -701    /// This constructs a DNS packet and signs it with a [`SecretKey`].
    -702    pub(crate) fn to_pkarr_signed_packet(
    -703        &self,
    -704        secret_key: &SecretKey,
    -705        ttl: u32,
    -706    ) -> Result<pkarr::SignedPacket, EncodingError> {
    -707        use pkarr::dns::{self, rdata};
    -708        let keypair = pkarr::Keypair::from_secret_key(&secret_key.to_bytes());
    -709        let name = dns::Name::new(IROH_TXT_NAME).expect("constant");
    -710
    -711        let mut builder = pkarr::SignedPacket::builder();
    -712        for s in self.to_txt_strings() {
    -713            let mut txt = rdata::TXT::new();
    -714            txt.add_string(&s).context(InvalidTxtEntrySnafu)?;
    -715            builder = builder.txt(name.clone(), txt.into_owned(), ttl);
    -716        }
    -717        let signed_packet = builder.build(&keypair)?;
    -718        Ok(signed_packet)
    -719    }
    -720}
    -721
    -722#[cfg(not(wasm_browser))]
    -723fn ensure_iroh_txt_label(name: Name) -> Result<Name, LookupError> {
    -724    if name.iter().next() == Some(IROH_TXT_NAME.as_bytes()) {
    -725        Ok(name)
    -726    } else {
    -727        Name::parse(IROH_TXT_NAME, Some(&name)).context(InvalidLabelSnafu)
    -728    }
    -729}
    -730
    -731#[cfg(not(wasm_browser))]
    -732fn node_domain(node_id: &NodeId, origin: &str) -> Result<Name, LookupError> {
    -733    let domain = format!("{}.{}", NodeId::to_z32(node_id), origin);
    -734    let domain = Name::from_str(&domain).context(InvalidLabelSnafu)?;
    -735    Ok(domain)
    -736}
    -737
    -738#[cfg(test)]
    -739mod tests {
    -740    use std::{collections::BTreeSet, str::FromStr, sync::Arc};
    -741
    -742    use hickory_resolver::{
    -743        lookup::Lookup,
    -744        proto::{
    -745            op::Query,
    -746            rr::{
    -747                rdata::{A, TXT},
    -748                RData, Record, RecordType,
    -749            },
    -750        },
    -751        Name,
    -752    };
    -753    use iroh_base::{NodeId, SecretKey};
    -754    use n0_snafu::{Result, ResultExt};
    -755
    -756    use super::{NodeData, NodeIdExt, NodeInfo};
    -757
    -758    #[test]
    -759    fn txt_attr_roundtrip() {
    -760        let node_data = NodeData::new(
    -761            Some("https://example.com".parse().unwrap()),
    -762            ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(),
    -763        )
    -764        .with_user_data(Some("foobar".parse().unwrap()));
    -765        let node_id = "vpnk377obfvzlipnsfbqba7ywkkenc4xlpmovt5tsfujoa75zqia"
    -766            .parse()
    -767            .unwrap();
    -768        let expected = NodeInfo::from_parts(node_id, node_data);
    -769        let attrs = expected.to_attrs();
    -770        let actual = NodeInfo::from(&attrs);
    -771        assert_eq!(expected, actual);
    -772    }
    -773
    -774    #[test]
    -775    fn signed_packet_roundtrip() {
    -776        let secret_key =
    -777            SecretKey::from_str("vpnk377obfvzlipnsfbqba7ywkkenc4xlpmovt5tsfujoa75zqia").unwrap();
    -778        let node_data = NodeData::new(
    -779            Some("https://example.com".parse().unwrap()),
    -780            ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(),
    -781        )
    -782        .with_user_data(Some("foobar".parse().unwrap()));
    -783        let expected = NodeInfo::from_parts(secret_key.public(), node_data);
    -784        let packet = expected.to_pkarr_signed_packet(&secret_key, 30).unwrap();
    -785        let actual = NodeInfo::from_pkarr_signed_packet(&packet).unwrap();
    -786        assert_eq!(expected, actual);
    -787    }
    -788
    -789    /// There used to be a bug where uploading a NodeAddr with more than only exactly
    -790    /// one relay URL or one publicly reachable IP addr would prevent connection
    -791    /// establishment.
    -792    ///
    -793    /// The reason was that only the first address was parsed (e.g. 192.168.96.145 in
    -794    /// this example), which could be a local, unreachable address.
    -795    #[test]
    -796    fn test_from_hickory_lookup() -> Result {
    -797        let name = Name::from_utf8(
    -798            "_iroh.dgjpkxyn3zyrk3zfads5duwdgbqpkwbjxfj4yt7rezidr3fijccy.dns.iroh.link.",
    -799        )
    -800        .context("dns name")?;
    -801        let query = Query::query(name.clone(), RecordType::TXT);
    -802        let records = [
    -803            Record::from_rdata(
    -804                name.clone(),
    -805                30,
    -806                RData::TXT(TXT::new(vec!["addr=192.168.96.145:60165".to_string()])),
    -807            ),
    -808            Record::from_rdata(
    -809                name.clone(),
    -810                30,
    -811                RData::TXT(TXT::new(vec!["addr=213.208.157.87:60165".to_string()])),
    -812            ),
    -813            // Test a record with mismatching record type (A instead of TXT). It should be filtered out.
    -814            Record::from_rdata(name.clone(), 30, RData::A(A::new(127, 0, 0, 1))),
    -815            // Test a record with a mismatching name
    -816            Record::from_rdata(
    -817                Name::from_utf8(format!(
    -818                    "_iroh.{}.dns.iroh.link.",
    -819                    NodeId::from_str(
    -820                        // Another NodeId
    -821                        "a55f26132e5e43de834d534332f66a20d480c3e50a13a312a071adea6569981e"
    -822                    )?
    -823                    .to_z32()
    -824                ))
    -825                .context("name")?,
    -826                30,
    -827                RData::TXT(TXT::new(vec![
    -828                    "relay=https://euw1-1.relay.iroh.network./".to_string()
    -829                ])),
    -830            ),
    -831            // Test a record with a completely different name
    -832            Record::from_rdata(
    -833                Name::from_utf8("dns.iroh.link.").context("name")?,
    -834                30,
    -835                RData::TXT(TXT::new(vec![
    -836                    "relay=https://euw1-1.relay.iroh.network./".to_string()
    -837                ])),
    -838            ),
    -839            Record::from_rdata(
    -840                name.clone(),
    -841                30,
    -842                RData::TXT(TXT::new(vec![
    -843                    "relay=https://euw1-1.relay.iroh.network./".to_string()
    -844                ])),
    -845            ),
    -846        ];
    -847        let lookup = Lookup::new_with_max_ttl(query, Arc::new(records));
    -848        let lookup = hickory_resolver::lookup::TxtLookup::from(lookup);
    -849
    -850        let node_info = NodeInfo::from_txt_lookup(lookup.into())?;
    -851
    -852        let expected_node_info = NodeInfo::new(NodeId::from_str(
    -853            "1992d53c02cdc04566e5c0edb1ce83305cd550297953a047a445ea3264b54b18",
    -854        )?)
    -855        .with_relay_url(Some("https://euw1-1.relay.iroh.network./".parse()?))
    -856        .with_direct_addresses(BTreeSet::from([
    -857            "192.168.96.145:60165".parse().unwrap(),
    -858            "213.208.157.87:60165".parse().unwrap(),
    -859        ]));
    -860
    -861        assert_eq!(node_info, expected_node_info);
    -862
    -863        Ok(())
    -864    }
    -865}
    \ No newline at end of file +619} +620 +621#[cfg(not(wasm_browser))] +622pub(crate) fn ensure_iroh_txt_label(name: String) -> String { +623 let mut parts = name.split("."); +624 if parts.next() == Some(IROH_TXT_NAME) { +625 name +626 } else { +627 format!("{IROH_TXT_NAME}.{name}") +628 } +629} +630 +631#[cfg(not(wasm_browser))] +632pub(crate) fn node_domain(node_id: &NodeId, origin: &str) -> String { +633 format!("{}.{}", NodeId::to_z32(node_id), origin) +634} +635 +636#[cfg(test)] +637mod tests { +638 use std::{collections::BTreeSet, str::FromStr, sync::Arc}; +639 +640 use hickory_resolver::{ +641 Name, +642 lookup::Lookup, +643 proto::{ +644 op::Query, +645 rr::{ +646 RData, Record, RecordType, +647 rdata::{A, TXT}, +648 }, +649 }, +650 }; +651 use iroh_base::{NodeId, SecretKey}; +652 use n0_snafu::{Result, ResultExt}; +653 +654 use super::{NodeData, NodeIdExt, NodeInfo}; +655 use crate::dns::TxtRecordData; +656 +657 #[test] +658 fn txt_attr_roundtrip() { +659 let node_data = NodeData::new( +660 Some("https://example.com".parse().unwrap()), +661 ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), +662 ) +663 .with_user_data(Some("foobar".parse().unwrap())); +664 let node_id = "vpnk377obfvzlipnsfbqba7ywkkenc4xlpmovt5tsfujoa75zqia" +665 .parse() +666 .unwrap(); +667 let expected = NodeInfo::from_parts(node_id, node_data); +668 let attrs = expected.to_attrs(); +669 let actual = NodeInfo::from(&attrs); +670 assert_eq!(expected, actual); +671 } +672 +673 #[test] +674 fn signed_packet_roundtrip() { +675 let secret_key = +676 SecretKey::from_str("vpnk377obfvzlipnsfbqba7ywkkenc4xlpmovt5tsfujoa75zqia").unwrap(); +677 let node_data = NodeData::new( +678 Some("https://example.com".parse().unwrap()), +679 ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), +680 ) +681 .with_user_data(Some("foobar".parse().unwrap())); +682 let expected = NodeInfo::from_parts(secret_key.public(), node_data); +683 let packet = expected.to_pkarr_signed_packet(&secret_key, 30).unwrap(); +684 let actual = NodeInfo::from_pkarr_signed_packet(&packet).unwrap(); +685 assert_eq!(expected, actual); +686 } +687 +688 /// There used to be a bug where uploading a NodeAddr with more than only exactly +689 /// one relay URL or one publicly reachable IP addr would prevent connection +690 /// establishment. +691 /// +692 /// The reason was that only the first address was parsed (e.g. 192.168.96.145 in +693 /// this example), which could be a local, unreachable address. +694 #[test] +695 fn test_from_hickory_lookup() -> Result { +696 let name = Name::from_utf8( +697 "_iroh.dgjpkxyn3zyrk3zfads5duwdgbqpkwbjxfj4yt7rezidr3fijccy.dns.iroh.link.", +698 ) +699 .context("dns name")?; +700 let query = Query::query(name.clone(), RecordType::TXT); +701 let records = [ +702 Record::from_rdata( +703 name.clone(), +704 30, +705 RData::TXT(TXT::new(vec!["addr=192.168.96.145:60165".to_string()])), +706 ), +707 Record::from_rdata( +708 name.clone(), +709 30, +710 RData::TXT(TXT::new(vec!["addr=213.208.157.87:60165".to_string()])), +711 ), +712 // Test a record with mismatching record type (A instead of TXT). It should be filtered out. +713 Record::from_rdata(name.clone(), 30, RData::A(A::new(127, 0, 0, 1))), +714 // Test a record with a mismatching name +715 Record::from_rdata( +716 Name::from_utf8(format!( +717 "_iroh.{}.dns.iroh.link.", +718 NodeId::from_str( +719 // Another NodeId +720 "a55f26132e5e43de834d534332f66a20d480c3e50a13a312a071adea6569981e" +721 )? +722 .to_z32() +723 )) +724 .context("name")?, +725 30, +726 RData::TXT(TXT::new(vec![ +727 "relay=https://euw1-1.relay.iroh.network./".to_string(), +728 ])), +729 ), +730 // Test a record with a completely different name +731 Record::from_rdata( +732 Name::from_utf8("dns.iroh.link.").context("name")?, +733 30, +734 RData::TXT(TXT::new(vec![ +735 "relay=https://euw1-1.relay.iroh.network./".to_string(), +736 ])), +737 ), +738 Record::from_rdata( +739 name.clone(), +740 30, +741 RData::TXT(TXT::new(vec![ +742 "relay=https://euw1-1.relay.iroh.network./".to_string(), +743 ])), +744 ), +745 ]; +746 let lookup = Lookup::new_with_max_ttl(query, Arc::new(records)); +747 let lookup = hickory_resolver::lookup::TxtLookup::from(lookup); +748 let lookup = lookup +749 .into_iter() +750 .map(|txt| TxtRecordData::from_iter(txt.iter().cloned())); +751 +752 let node_info = NodeInfo::from_txt_lookup(name.to_string(), lookup)?; +753 +754 let expected_node_info = NodeInfo::new(NodeId::from_str( +755 "1992d53c02cdc04566e5c0edb1ce83305cd550297953a047a445ea3264b54b18", +756 )?) +757 .with_relay_url(Some("https://euw1-1.relay.iroh.network./".parse()?)) +758 .with_direct_addresses(BTreeSet::from([ +759 "192.168.96.145:60165".parse().unwrap(), +760 "213.208.157.87:60165".parse().unwrap(), +761 ])); +762 +763 assert_eq!(node_info, expected_node_info); +764 +765 Ok(()) +766 } +767}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/ping_tracker.rs.html b/pr/3367/docs/src/iroh_relay/ping_tracker.rs.html index e795227cd8..4c339abb62 100644 --- a/pr/3367/docs/src/iroh_relay/ping_tracker.rs.html +++ b/pr/3367/docs/src/iroh_relay/ping_tracker.rs.html @@ -1,4 +1,4 @@ -ping_tracker.rs - source

    iroh_relay/
    ping_tracker.rs

    1use n0_future::time::{self, Duration, Instant};
    +ping_tracker.rs - source

    iroh_relay/
    ping_tracker.rs

    1use n0_future::time::{self, Duration, Instant};
     2use tracing::debug;
     3
     4/// Maximum time for a ping response in the relay protocol.
    diff --git a/pr/3367/docs/src/iroh_relay/protos.rs.html b/pr/3367/docs/src/iroh_relay/protos.rs.html
    index 47c0c928ab..74ea4937b4 100644
    --- a/pr/3367/docs/src/iroh_relay/protos.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/protos.rs.html
    @@ -1,4 +1,7 @@
    -protos.rs - source

    iroh_relay/
    protos.rs

    1//! Protocols used by the iroh-relay
    +protos.rs - source

    iroh_relay/
    protos.rs

    1//! Protocols used by the iroh-relay
     2
    -3pub mod disco;
    -4pub mod relay;
    \ No newline at end of file +3
    pub mod common; +4pub mod disco; +5pub mod handshake; +6pub mod relay; +7pub mod streams;
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/protos/common.rs.html b/pr/3367/docs/src/iroh_relay/protos/common.rs.html new file mode 100644 index 0000000000..7a1716c3c6 --- /dev/null +++ b/pr/3367/docs/src/iroh_relay/protos/common.rs.html @@ -0,0 +1,111 @@ +common.rs - source

    iroh_relay/protos/
    common.rs

    1//! Common types between the [`super::handshake`] and [`super::relay`] protocols.
    +2//!
    +3//! Hosts the [`FrameType`] enum to make sure we're not accidentally reusing frame type
    +4//! integers for different frames.
    +5
    +6use bytes::{Buf, BufMut};
    +7use nested_enum_utils::common_fields;
    +8use quinn_proto::{VarInt, coding::Codec};
    +9use snafu::{Backtrace, OptionExt, Snafu};
    +10
    +11/// Possible frame types during handshaking
    +12#[repr(u32)]
    +13#[derive(
    +14    Copy, Clone, PartialEq, Eq, Debug, num_enum::IntoPrimitive, num_enum::TryFromPrimitive,
    +15)]
    +16// needs to be pub due to being exposed in error types
    +17pub enum FrameType {
    +18    /// The server frame type for the challenge response
    +19    ServerChallenge = 0,
    +20    /// The client frame type for the authentication frame
    +21    ClientAuth = 1,
    +22    /// The server frame type for authentication confirmation
    +23    ServerConfirmsAuth = 2,
    +24    /// The server frame type for authentication denial
    +25    ServerDeniesAuth = 3,
    +26    /// 32B dest pub key + ECN bytes + one datagram's content
    +27    ClientToRelayDatagram = 4,
    +28    /// 32B dest pub key + ECN byte + segment size u16 + datagrams contents
    +29    ClientToRelayDatagramBatch = 5,
    +30    /// 32B src pub key + ECN bytes + one datagram's content
    +31    RelayToClientDatagram = 6,
    +32    /// 32B src pub key + ECN byte + segment size u16 + datagrams contents
    +33    RelayToClientDatagramBatch = 7,
    +34    /// Sent from server to client to signal that a previous sender is no longer connected.
    +35    ///
    +36    /// That is, if A sent to B, and then if A disconnects, the server sends `FrameType::PeerGone`
    +37    /// to B so B can forget that a reverse path exists on that connection to get back to A
    +38    ///
    +39    /// 32B pub key of peer that's gone
    +40    NodeGone = 8,
    +41    /// Messages with these frames will be ignored.
    +42    /// 8 byte ping payload, to be echoed back in FrameType::Pong
    +43    Ping = 9,
    +44    /// 8 byte payload, the contents of ping being replied to
    +45    Pong = 10,
    +46    /// Sent from server to client to tell the client if their connection is unhealthy somehow.
    +47    /// Contains only UTF-8 bytes.
    +48    Health = 11,
    +49
    +50    /// Sent from server to client for the server to declare that it's restarting.
    +51    /// Payload is two big endian u32 durations in milliseconds: when to reconnect,
    +52    /// and how long to try total.
    +53    Restarting = 12,
    +54}
    +55
    +56#[common_fields({
    +57    backtrace: Option<Backtrace>,
    +58    #[snafu(implicit)]
    +59    span_trace: n0_snafu::SpanTrace,
    +60})]
    +61#[allow(missing_docs)]
    +62#[derive(Debug, Snafu)]
    +63#[non_exhaustive]
    +64pub enum FrameTypeError {
    +65    #[snafu(display("not enough bytes to parse frame type"))]
    +66    UnexpectedEnd {},
    +67    #[snafu(display("frame type unknown"))]
    +68    UnknownFrameType { tag: VarInt },
    +69}
    +70
    +71impl FrameType {
    +72    /// Writes the frame type to the buffer (as a QUIC-encoded varint).
    +73    pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O {
    +74        VarInt::from(*self).encode(&mut dst);
    +75        dst
    +76    }
    +77
    +78    /// Returns the amount of bytes that [`Self::write_to`] would write.
    +79    pub(crate) fn encoded_len(&self) -> usize {
    +80        // Copied implementation from `VarInt::size`
    +81        let x: u32 = (*self).into();
    +82        if x < 2u32.pow(6) {
    +83            1 // this will pretty much always be the case
    +84        } else if x < 2u32.pow(14) {
    +85            2
    +86        } else if x < 2u32.pow(30) {
    +87            4
    +88        } else {
    +89            unreachable!("Impossible FrameType primitive representation")
    +90        }
    +91    }
    +92
    +93    /// Parses the frame type (as a QUIC-encoded varint) from the first couple of bytes given
    +94    /// and returns the frame type and the rest.
    +95    pub(crate) fn from_bytes(buf: &mut impl Buf) -> Result<Self, FrameTypeError> {
    +96        let tag = VarInt::decode(buf).ok().context(UnexpectedEndSnafu)?;
    +97        let tag_u32 = u32::try_from(u64::from(tag))
    +98            .ok()
    +99            .context(UnknownFrameTypeSnafu { tag })?;
    +100        let frame_type = FrameType::try_from(tag_u32)
    +101            .ok()
    +102            .context(UnknownFrameTypeSnafu { tag })?;
    +103        Ok(frame_type)
    +104    }
    +105}
    +106
    +107impl From<FrameType> for VarInt {
    +108    fn from(value: FrameType) -> Self {
    +109        (value as u32).into()
    +110    }
    +111}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/protos/disco.rs.html b/pr/3367/docs/src/iroh_relay/protos/disco.rs.html index fe819ed0ec..e0f93af39e 100644 --- a/pr/3367/docs/src/iroh_relay/protos/disco.rs.html +++ b/pr/3367/docs/src/iroh_relay/protos/disco.rs.html @@ -1,4 +1,4 @@ -disco.rs - source

    iroh_relay/protos/
    disco.rs

    1//! This module exports [`looks_like_disco_wrapper`] as the only disco-related relay
    +disco.rs - source

    iroh_relay/protos/
    disco.rs

    1//! This module exports [`looks_like_disco_wrapper`] as the only disco-related relay
     2//! functionality.
     3//!
     4//! Despite the relay not being able to read disco messages by design, it does attempt to
    diff --git a/pr/3367/docs/src/iroh_relay/protos/handshake.rs.html b/pr/3367/docs/src/iroh_relay/protos/handshake.rs.html
    new file mode 100644
    index 0000000000..7b8a1c34d5
    --- /dev/null
    +++ b/pr/3367/docs/src/iroh_relay/protos/handshake.rs.html
    @@ -0,0 +1,823 @@
    +handshake.rs - source

    iroh_relay/protos/
    handshake.rs

    1//! Implements the handshake protocol that authenticates and authorizes clients connecting to the relays.
    +2//!
    +3//! The purpose of the handshake is to
    +4//! 1. Inform the relay of the client's NodeId
    +5//! 2. Check that the connecting client owns the secret key for its NodeId ("is authentic"/"authentication")
    +6//! 3. Possibly check that the client has access to this relay, if the relay requires authorization.
    +7//!
    +8//! Additional complexity comes from the fact that there's two ways that clients can authenticate with
    +9//! relays.
    +10//!
    +11//! One way is via an explicitly sent challenge:
    +12//!
    +13//! 1. Once a websocket connection is opened, a client receives a challenge (the `ServerChallenge` frame)
    +14//! 2. The client sends back what is essentially a signature of that challenge with their secret key
    +15//!    that matches the NodeId they have, as well as the NodeId (the `ClientAuth` frame)
    +16//!
    +17//! The second way is very similar to the [Concealed HTTP Auth RFC], and involves send a header that
    +18//! contains a signature of some shared keying material extracted from TLS ([RFC 5705]).
    +19//!
    +20//! The second way can save a full round trip, because the challenge doesn't have to be sent to the client
    +21//! first, however, it won't always work, as it relies on the keying material extraction feature of TLS,
    +22//! which is not available in browsers (but might be in the future?) and might break when there's an
    +23//! HTTPS proxy that doesn't properly deal with this TLS feature.
    +24//!
    +25//! [Concealed HTTP Auth RFC]: https://datatracker.ietf.org/doc/rfc9729/
    +26//! [RFC 5705]: https://datatracker.ietf.org/doc/html/rfc5705
    +27use bytes::{BufMut, Bytes, BytesMut};
    +28use data_encoding::BASE32HEX_NOPAD as HEX;
    +29#[cfg(not(wasm_browser))]
    +30use http::HeaderValue;
    +31#[cfg(feature = "server")]
    +32use iroh_base::Signature;
    +33use iroh_base::{PublicKey, SecretKey};
    +34use n0_future::{SinkExt, TryStreamExt};
    +35use nested_enum_utils::common_fields;
    +36#[cfg(feature = "server")]
    +37use rand::CryptoRng;
    +38use snafu::{Backtrace, ResultExt, Snafu};
    +39use tracing::trace;
    +40
    +41use super::{
    +42    common::{FrameType, FrameTypeError},
    +43    streams::BytesStreamSink,
    +44};
    +45use crate::ExportKeyingMaterial;
    +46
    +47/// Domain separation string for the [`ServerChallenge`] signature
    +48const DOMAIN_SEP_CHALLENGE: &str = "iroh-relay handshake v1 challenge signature";
    +49
    +50/// Domain separation label for [`KeyMaterialClientAuth`]'s use of [`ExportKeyingMaterial`]
    +51#[cfg(not(wasm_browser))]
    +52const DOMAIN_SEP_TLS_EXPORT_LABEL: &[u8] = b"iroh-relay handshake v1";
    +53
    +54/// Authentication message from the client.
    +55#[derive(derive_more::Debug, serde::Serialize, serde::Deserialize)]
    +56#[cfg_attr(wasm_browser, allow(unused))]
    +57pub(crate) struct KeyMaterialClientAuth {
    +58    /// The client's public key
    +59    pub(crate) public_key: PublicKey,
    +60    /// A signature of (a hash of) extracted key material.
    +61    #[serde(with = "serde_bytes")]
    +62    #[debug("{}", HEX.encode(signature))]
    +63    pub(crate) signature: [u8; 64],
    +64    /// Part of the extracted key material.
    +65    ///
    +66    /// Allows making sure we have the same underlying key material.
    +67    #[debug("{}", HEX.encode(key_material_suffix))]
    +68    pub(crate) key_material_suffix: [u8; 16],
    +69}
    +70
    +71/// A challenge for the client to sign with their secret key for NodeId authentication.
    +72#[derive(derive_more::Debug, serde::Serialize, serde::Deserialize)]
    +73pub(crate) struct ServerChallenge {
    +74    /// The challenge to sign.
    +75    /// Must be randomly generated with an RNG that is safe to use for crypto.
    +76    #[debug("{}", HEX.encode(challenge))]
    +77    pub(crate) challenge: [u8; 16],
    +78}
    +79
    +80/// Authentication message from the client.
    +81///
    +82/// Used when authentication via [`KeyMaterialClientAuth`] didn't work.
    +83#[derive(derive_more::Debug, serde::Serialize, serde::Deserialize)]
    +84pub(crate) struct ClientAuth {
    +85    /// The client's public key, a.k.a. the `NodeId`
    +86    pub(crate) public_key: PublicKey,
    +87    /// A signature of (a hash of) the [`ServerChallenge`].
    +88    ///
    +89    /// This is what provides the authentication.
    +90    #[serde(with = "serde_bytes")]
    +91    #[debug("{}", HEX.encode(signature))]
    +92    pub(crate) signature: [u8; 64],
    +93}
    +94
    +95/// Confirmation of successful connection.
    +96#[derive(derive_more::Debug, serde::Serialize, serde::Deserialize)]
    +97pub(crate) struct ServerConfirmsAuth;
    +98
    +99/// Denial of connection. The client couldn't be verified as authentic.
    +100#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
    +101pub(crate) struct ServerDeniesAuth {
    +102    reason: String,
    +103}
    +104
    +105/// Trait for getting the frame type tag for a frame.
    +106///
    +107/// Used only in the handshake, as the frame we expect next
    +108/// is fairly stateful.
    +109/// Not used in the send/recv protocol, as any frame is
    +110/// allowed to happen at any time there.
    +111trait Frame {
    +112    /// The frame type this frame is identified by and prefixed with
    +113    const TAG: FrameType;
    +114}
    +115
    +116impl<T: Frame> Frame for &T {
    +117    const TAG: FrameType = T::TAG;
    +118}
    +119
    +120impl Frame for ServerChallenge {
    +121    const TAG: FrameType = FrameType::ServerChallenge;
    +122}
    +123
    +124impl Frame for ClientAuth {
    +125    const TAG: FrameType = FrameType::ClientAuth;
    +126}
    +127
    +128impl Frame for ServerConfirmsAuth {
    +129    const TAG: FrameType = FrameType::ServerConfirmsAuth;
    +130}
    +131
    +132impl Frame for ServerDeniesAuth {
    +133    const TAG: FrameType = FrameType::ServerDeniesAuth;
    +134}
    +135
    +136#[common_fields({
    +137    backtrace: Option<Backtrace>,
    +138    #[snafu(implicit)]
    +139    span_trace: n0_snafu::SpanTrace,
    +140})]
    +141#[allow(missing_docs)]
    +142#[derive(Debug, Snafu)]
    +143#[non_exhaustive]
    +144pub enum Error {
    +145    #[snafu(transparent)]
    +146    Websocket {
    +147        #[cfg(not(wasm_browser))]
    +148        source: tokio_websockets::Error,
    +149        #[cfg(wasm_browser)]
    +150        source: ws_stream_wasm::WsErr,
    +151    },
    +152    #[snafu(display("Handshake stream ended prematurely"))]
    +153    UnexpectedEnd {},
    +154    #[snafu(transparent)]
    +155    FrameTypeError { source: FrameTypeError },
    +156    #[snafu(display("The relay denied our authentication ({reason})"))]
    +157    ServerDeniedAuth { reason: String },
    +158    #[snafu(display("Unexpected tag, got {frame_type:?}, but expected one of {expected_types:?}"))]
    +159    UnexpectedFrameType {
    +160        frame_type: FrameType,
    +161        expected_types: Vec<FrameType>,
    +162    },
    +163    #[snafu(display("Handshake failed while deserializing {frame_type:?} frame"))]
    +164    DeserializationError {
    +165        frame_type: FrameType,
    +166        source: postcard::Error,
    +167    },
    +168    #[cfg(feature = "server")]
    +169    /// Failed to deserialize client auth header
    +170    ClientAuthHeaderInvalid { value: HeaderValue },
    +171}
    +172
    +173#[cfg(feature = "server")]
    +174#[derive(Debug, Snafu)]
    +175pub(crate) enum VerificationError {
    +176    #[snafu(display("Couldn't export TLS keying material on our end"))]
    +177    NoKeyingMaterial,
    +178    #[snafu(display(
    +179        "Client didn't extract the same keying material, the suffix mismatched: expected {expected:X?} but got {actual:X?}"
    +180    ))]
    +181    MismatchedSuffix {
    +182        expected: [u8; 16],
    +183        actual: [u8; 16],
    +184    },
    +185    #[snafu(display(
    +186        "Client signature {signature:X?} for message {message:X?} invalid for public key {public_key}"
    +187    ))]
    +188    SignatureInvalid {
    +189        source: iroh_base::SignatureError,
    +190        message: Vec<u8>,
    +191        signature: [u8; 64],
    +192        public_key: PublicKey,
    +193    },
    +194}
    +195
    +196impl ServerChallenge {
    +197    /// Generates a new challenge.
    +198    #[cfg(feature = "server")]
    +199    pub(crate) fn new<R: CryptoRng + ?Sized>(rng: &mut R) -> Self {
    +200        let mut challenge = [0u8; 16];
    +201        rng.fill_bytes(&mut challenge);
    +202        Self { challenge }
    +203    }
    +204
    +205    /// The actual message bytes to sign (and verify against) for this challenge.
    +206    fn message_to_sign(&self) -> [u8; 32] {
    +207        // We're signing a key instead of the direct challenge.
    +208        // This gives us domain separation protecting from multiple possible attacks,
    +209        // but especially this one:
    +210        // Assume a malicious relay. If the protocol required the client to sign the
    +211        // challenge directly, this would allow the relay to obtain an arbitrary 16-byte
    +212        // signature, if it maliciously choses the challenge instead of generating it
    +213        // randomly.
    +214        // Deriving a key to sign instead mitigates this attack.
    +215        blake3::derive_key(DOMAIN_SEP_CHALLENGE, &self.challenge)
    +216    }
    +217}
    +218
    +219impl ClientAuth {
    +220    /// Generates a signature for the given challenge from the server.
    +221    pub(crate) fn new(secret_key: &SecretKey, challenge: &ServerChallenge) -> Self {
    +222        Self {
    +223            public_key: secret_key.public(),
    +224            signature: secret_key.sign(&challenge.message_to_sign()).to_bytes(),
    +225        }
    +226    }
    +227
    +228    /// Verifies this client's authentication given the challenge this was sent in response to.
    +229    #[cfg(feature = "server")]
    +230    pub(crate) fn verify(&self, challenge: &ServerChallenge) -> Result<(), Box<VerificationError>> {
    +231        let message = challenge.message_to_sign();
    +232        self.public_key
    +233            .verify(&message, &Signature::from_bytes(&self.signature))
    +234            .with_context(|_| SignatureInvalidSnafu {
    +235                message: message.to_vec(),
    +236                signature: self.signature,
    +237                public_key: self.public_key,
    +238            })
    +239            .map_err(Box::new)
    +240    }
    +241}
    +242
    +243#[cfg(not(wasm_browser))]
    +244impl KeyMaterialClientAuth {
    +245    /// Generates a client's authentication, similar to [`ClientAuth`], but by using TLS keying material
    +246    /// instead of a received challenge.
    +247    pub(crate) fn new(secret_key: &SecretKey, io: &impl ExportKeyingMaterial) -> Option<Self> {
    +248        let public_key = secret_key.public();
    +249        let key_material = io.export_keying_material(
    +250            [0u8; 32],
    +251            DOMAIN_SEP_TLS_EXPORT_LABEL,
    +252            Some(secret_key.public().as_bytes()),
    +253        )?;
    +254        // We split the export and only sign the first 16 bytes, and
    +255        // pass through the last 16 bytes. See also the note in [Self::verify].
    +256        let (message, suffix) = key_material.split_at(16);
    +257        Some(Self {
    +258            public_key,
    +259            signature: secret_key.sign(message).to_bytes(),
    +260            key_material_suffix: suffix.try_into().expect("hardcoded length"),
    +261        })
    +262    }
    +263
    +264    /// Generate the base64url-nopad-encoded header value.
    +265    pub(crate) fn into_header_value(self) -> HeaderValue {
    +266        HeaderValue::from_str(
    +267            &data_encoding::BASE64URL_NOPAD
    +268                .encode(&postcard::to_allocvec(&self).expect("encoding never fails")),
    +269        )
    +270        .expect("BASE64URL_NOPAD encoding contained invisible ascii characters")
    +271    }
    +272
    +273    /// Verifies this client auth on the server side using the same key material.
    +274    ///
    +275    /// This might return false for a couple of reasons:
    +276    /// 1. The exported keying material might not be the same between both ends of the TLS session
    +277    ///    (e.g. there's an HTTPS proxy in between that doesn't think/care about the TLS keying material exporter).
    +278    ///    This situation is detected when the key material suffix mismatches.
    +279    /// 2. The signature itself doesn't verify.
    +280    #[cfg(feature = "server")]
    +281    pub(crate) fn verify(
    +282        &self,
    +283        io: &impl ExportKeyingMaterial,
    +284    ) -> Result<(), Box<VerificationError>> {
    +285        use snafu::OptionExt;
    +286
    +287        let key_material = io
    +288            .export_keying_material(
    +289                [0u8; 32],
    +290                DOMAIN_SEP_TLS_EXPORT_LABEL,
    +291                Some(self.public_key.as_bytes()),
    +292            )
    +293            .context(NoKeyingMaterialSnafu)?;
    +294        // We split the export and only sign the first 16 bytes, and
    +295        // pass through the last 16 bytes.
    +296        // Passing on the suffix helps the verifying end figure out what
    +297        // went wrong: If there's a suffix mismatch, then the exported keying
    +298        // material on both ends wasn't the same - so perhaps there was a
    +299        // TLS proxy in between or similar.
    +300        // If the suffix does match, but the signature doesn't verify, then
    +301        // there must be something wrong with the client's secret key or signature.
    +302        let (message, suffix) = key_material.split_at(16);
    +303        let suffix: [u8; 16] = suffix.try_into().expect("hardcoded length");
    +304        snafu::ensure!(
    +305            suffix == self.key_material_suffix,
    +306            MismatchedSuffixSnafu {
    +307                expected: self.key_material_suffix,
    +308                actual: suffix
    +309            }
    +310        );
    +311        // NOTE: We don't blake3-hash here as we do it in [`ServerChallenge::message_to_sign`],
    +312        // because we already have a domain separation string and keyed hashing step in
    +313        // the TLS export keying material above.
    +314        self.public_key
    +315            .verify(message, &Signature::from_bytes(&self.signature))
    +316            .with_context(|_| SignatureInvalidSnafu {
    +317                message: message.to_vec(),
    +318                public_key: self.public_key,
    +319                signature: self.signature,
    +320            })
    +321            .map_err(Box::new)
    +322    }
    +323}
    +324
    +325/// Runs the client side of the handshake protocol.
    +326///
    +327/// See the module docs for details on the protocol.
    +328/// This is already after having potentially transferred a [`KeyMaterialClientAuth`],
    +329/// but before having received a response for whether that worked or not.
    +330///
    +331/// This requires access to the client's secret key to sign a challenge.
    +332pub(crate) async fn clientside(
    +333    io: &mut (impl BytesStreamSink + ExportKeyingMaterial),
    +334    secret_key: &SecretKey,
    +335) -> Result<ServerConfirmsAuth, Error> {
    +336    let (tag, frame) = read_frame(io, &[ServerChallenge::TAG, ServerConfirmsAuth::TAG]).await?;
    +337
    +338    let (tag, frame) = if tag == ServerChallenge::TAG {
    +339        let challenge: ServerChallenge = deserialize_frame(frame)?;
    +340
    +341        let client_info = ClientAuth::new(secret_key, &challenge);
    +342        write_frame(io, client_info).await?;
    +343
    +344        read_frame(io, &[ServerConfirmsAuth::TAG, ServerDeniesAuth::TAG]).await?
    +345    } else {
    +346        (tag, frame)
    +347    };
    +348
    +349    match tag {
    +350        FrameType::ServerConfirmsAuth => {
    +351            let confirmation: ServerConfirmsAuth = deserialize_frame(frame)?;
    +352            Ok(confirmation)
    +353        }
    +354        FrameType::ServerDeniesAuth => {
    +355            let denial: ServerDeniesAuth = deserialize_frame(frame)?;
    +356            Err(ServerDeniedAuthSnafu {
    +357                reason: denial.reason,
    +358            }
    +359            .build())
    +360        }
    +361        _ => unreachable!(),
    +362    }
    +363}
    +364
    +365/// This represents successful authentication for the client with the `client_key` public key
    +366/// via the authentication [`Mechanism`] `mechanism`.
    +367///
    +368/// You must call [`SuccessfulAuthentication::authorize_if`] to finish the protocol.
    +369#[cfg(feature = "server")]
    +370#[derive(Debug)]
    +371#[must_use = "the protocol is not finished unless `authorize_if` is called"]
    +372pub(crate) struct SuccessfulAuthentication {
    +373    pub(crate) client_key: PublicKey,
    +374    pub(crate) mechanism: Mechanism,
    +375}
    +376
    +377/// The mechanism that was used for authentication.
    +378#[cfg(feature = "server")]
    +379#[derive(Debug, Clone, Copy, PartialEq, Eq)]
    +380pub(crate) enum Mechanism {
    +381    /// Authentication was performed by verifying a signature of a challenge we sent
    +382    SignedChallenge,
    +383    /// Authentication was performed by verifying a signature of shared extracted TLS keying material
    +384    SignedKeyMaterial,
    +385}
    +386
    +387/// Runs the server side of the handshaking protocol.
    +388///
    +389/// See the module documentation for an overview of the handshaking protocol.
    +390///
    +391/// This takes `rng` to generate cryptographic randomness for the authentication challenge.
    +392///
    +393/// This also takes the `client_auth_header`, if present, to perform authentication without
    +394/// requiring sending a challenge, saving a round-trip, if possible.
    +395///
    +396/// If this fails, the protocol falls back to doing a normal extra round trip with a challenge.
    +397///
    +398/// The return value [`SuccessfulAuthentication`] still needs to be resolved by calling
    +399/// [`SuccessfulAuthentication::authorize_if`] to finish the whole authorization protocol
    +400/// (otherwise the client won't be notified about auth success or failure).
    +401#[cfg(feature = "server")]
    +402pub(crate) async fn serverside(
    +403    io: &mut (impl BytesStreamSink + ExportKeyingMaterial),
    +404    client_auth_header: Option<HeaderValue>,
    +405) -> Result<SuccessfulAuthentication, Error> {
    +406    if let Some(client_auth_header) = client_auth_header {
    +407        let client_auth_bytes = data_encoding::BASE64URL_NOPAD
    +408            .decode(client_auth_header.as_ref())
    +409            .map_err(|_| {
    +410                ClientAuthHeaderInvalidSnafu {
    +411                    value: client_auth_header.clone(),
    +412                }
    +413                .build()
    +414            })?;
    +415
    +416        let client_auth: KeyMaterialClientAuth =
    +417            postcard::from_bytes(&client_auth_bytes).map_err(|_| {
    +418                ClientAuthHeaderInvalidSnafu {
    +419                    value: client_auth_header.clone(),
    +420                }
    +421                .build()
    +422            })?;
    +423
    +424        if client_auth.verify(io).is_ok() {
    +425            trace!(?client_auth.public_key, "authentication succeeded via keying material");
    +426            return Ok(SuccessfulAuthentication {
    +427                client_key: client_auth.public_key,
    +428                mechanism: Mechanism::SignedKeyMaterial,
    +429            });
    +430        }
    +431        // Verification not succeeding is part of normal operation: The TLS exporter isn't required to match.
    +432        // We'll fall back to verification that takes another round trip more time.
    +433    }
    +434
    +435    let challenge = ServerChallenge::new(&mut rand::rng());
    +436    write_frame(io, &challenge).await?;
    +437
    +438    let (_, frame) = read_frame(io, &[ClientAuth::TAG]).await?;
    +439    let client_auth: ClientAuth = deserialize_frame(frame)?;
    +440
    +441    if let Err(err) = client_auth.verify(&challenge) {
    +442        trace!(?client_auth.public_key, ?err, "authentication failed");
    +443        let denial = ServerDeniesAuth {
    +444            reason: "signature invalid".into(),
    +445        };
    +446        write_frame(io, denial.clone()).await?;
    +447        ServerDeniedAuthSnafu {
    +448            reason: denial.reason,
    +449        }
    +450        .fail()
    +451    } else {
    +452        trace!(?client_auth.public_key, "authentication succeeded via challenge");
    +453        Ok(SuccessfulAuthentication {
    +454            client_key: client_auth.public_key,
    +455            mechanism: Mechanism::SignedChallenge,
    +456        })
    +457    }
    +458}
    +459
    +460#[cfg(feature = "server")]
    +461impl SuccessfulAuthentication {
    +462    pub async fn authorize_if(
    +463        self,
    +464        is_authorized: bool,
    +465        io: &mut (impl BytesStreamSink + ExportKeyingMaterial),
    +466    ) -> Result<PublicKey, Error> {
    +467        if is_authorized {
    +468            trace!("authorizing client");
    +469            write_frame(io, ServerConfirmsAuth).await?;
    +470            Ok(self.client_key)
    +471        } else {
    +472            trace!("denying client auth");
    +473            let denial = ServerDeniesAuth {
    +474                reason: "not authorized".into(),
    +475            };
    +476            write_frame(io, denial.clone()).await?;
    +477            ServerDeniedAuthSnafu {
    +478                reason: denial.reason,
    +479            }
    +480            .fail()
    +481        }
    +482    }
    +483}
    +484
    +485async fn write_frame<F: serde::Serialize + Frame>(
    +486    io: &mut impl BytesStreamSink,
    +487    frame: F,
    +488) -> Result<(), Error> {
    +489    let mut bytes = BytesMut::new();
    +490    trace!(frame_type = ?F::TAG, "Writing frame");
    +491    F::TAG.write_to(&mut bytes);
    +492    let bytes = postcard::to_io(&frame, bytes.writer())
    +493        .expect("serialization failed") // buffer can't become "full" without being a critical failure, datastructures shouldn't ever fail serialization
    +494        .into_inner()
    +495        .freeze();
    +496    io.send(bytes).await?;
    +497    io.flush().await?;
    +498    Ok(())
    +499}
    +500
    +501async fn read_frame(
    +502    io: &mut impl BytesStreamSink,
    +503    expected_types: &[FrameType],
    +504) -> Result<(FrameType, Bytes), Error> {
    +505    let mut payload = io
    +506        .try_next()
    +507        .await?
    +508        .ok_or_else(|| UnexpectedEndSnafu.build())?;
    +509
    +510    let frame_type = FrameType::from_bytes(&mut payload)?;
    +511    trace!(?frame_type, "Reading frame");
    +512    snafu::ensure!(
    +513        expected_types.contains(&frame_type),
    +514        UnexpectedFrameTypeSnafu {
    +515            frame_type,
    +516            expected_types: expected_types.to_vec()
    +517        }
    +518    );
    +519
    +520    Ok((frame_type, payload))
    +521}
    +522
    +523fn deserialize_frame<F: Frame + serde::de::DeserializeOwned>(frame: Bytes) -> Result<F, Error> {
    +524    postcard::from_bytes(&frame).context(DeserializationSnafu { frame_type: F::TAG })
    +525}
    +526
    +527#[cfg(all(test, feature = "server"))]
    +528mod tests {
    +529    use bytes::BytesMut;
    +530    use iroh_base::{PublicKey, SecretKey};
    +531    use n0_future::{Sink, SinkExt, Stream, TryStreamExt};
    +532    use n0_snafu::{Result, ResultExt};
    +533    use rand::SeedableRng;
    +534    use tokio_util::codec::{Framed, LengthDelimitedCodec};
    +535    use tracing::{Instrument, info_span};
    +536    use tracing_test::traced_test;
    +537
    +538    use super::{
    +539        ClientAuth, KeyMaterialClientAuth, Mechanism, ServerChallenge, ServerConfirmsAuth,
    +540    };
    +541    use crate::ExportKeyingMaterial;
    +542
    +543    struct TestKeyingMaterial<IO> {
    +544        shared_secret: Option<u64>,
    +545        inner: IO,
    +546    }
    +547
    +548    trait WithTlsSharedSecret: Sized {
    +549        fn with_shared_secret(self, shared_secret: Option<u64>) -> TestKeyingMaterial<Self>;
    +550    }
    +551
    +552    impl<T: Sized> WithTlsSharedSecret for T {
    +553        fn with_shared_secret(self, shared_secret: Option<u64>) -> TestKeyingMaterial<Self> {
    +554            TestKeyingMaterial {
    +555                shared_secret,
    +556                inner: self,
    +557            }
    +558        }
    +559    }
    +560
    +561    impl<IO> ExportKeyingMaterial for TestKeyingMaterial<IO> {
    +562        fn export_keying_material<T: AsMut<[u8]>>(
    +563            &self,
    +564            mut output: T,
    +565            label: &[u8],
    +566            context: Option<&[u8]>,
    +567        ) -> Option<T> {
    +568            // we simulate something like exporting keying material using blake3
    +569
    +570            let label_key = blake3::hash(label);
    +571            let context_key = blake3::keyed_hash(label_key.as_bytes(), context.unwrap_or(&[]));
    +572            let mut hasher = blake3::Hasher::new_keyed(context_key.as_bytes());
    +573            hasher.update(&self.shared_secret?.to_le_bytes());
    +574            hasher.finalize_xof().fill(output.as_mut());
    +575
    +576            Some(output)
    +577        }
    +578    }
    +579
    +580    impl<V, IO: Stream<Item = V> + Unpin> Stream for TestKeyingMaterial<IO> {
    +581        type Item = V;
    +582
    +583        fn poll_next(
    +584            mut self: std::pin::Pin<&mut Self>,
    +585            cx: &mut std::task::Context<'_>,
    +586        ) -> std::task::Poll<Option<Self::Item>> {
    +587            std::pin::Pin::new(&mut self.inner).poll_next(cx)
    +588        }
    +589    }
    +590
    +591    impl<V, E, IO: Sink<V, Error = E> + Unpin> Sink<V> for TestKeyingMaterial<IO> {
    +592        type Error = E;
    +593
    +594        fn poll_ready(
    +595            mut self: std::pin::Pin<&mut Self>,
    +596            cx: &mut std::task::Context<'_>,
    +597        ) -> std::task::Poll<Result<(), Self::Error>> {
    +598            std::pin::Pin::new(&mut self.inner).poll_ready(cx)
    +599        }
    +600
    +601        fn start_send(mut self: std::pin::Pin<&mut Self>, item: V) -> Result<(), Self::Error> {
    +602            std::pin::Pin::new(&mut self.inner).start_send(item)
    +603        }
    +604
    +605        fn poll_flush(
    +606            mut self: std::pin::Pin<&mut Self>,
    +607            cx: &mut std::task::Context<'_>,
    +608        ) -> std::task::Poll<Result<(), Self::Error>> {
    +609            std::pin::Pin::new(&mut self.inner).poll_flush(cx)
    +610        }
    +611
    +612        fn poll_close(
    +613            mut self: std::pin::Pin<&mut Self>,
    +614            cx: &mut std::task::Context<'_>,
    +615        ) -> std::task::Poll<Result<(), Self::Error>> {
    +616            std::pin::Pin::new(&mut self.inner).poll_close(cx)
    +617        }
    +618    }
    +619
    +620    async fn simulate_handshake(
    +621        secret_key: &SecretKey,
    +622        client_shared_secret: Option<u64>,
    +623        server_shared_secret: Option<u64>,
    +624        restricted_to: Option<PublicKey>,
    +625    ) -> (Result<ServerConfirmsAuth>, Result<(PublicKey, Mechanism)>) {
    +626        let (client, server) = tokio::io::duplex(1024);
    +627
    +628        let mut client_io = Framed::new(client, LengthDelimitedCodec::new())
    +629            .map_ok(BytesMut::freeze)
    +630            .map_err(tokio_websockets::Error::Io)
    +631            .sink_map_err(tokio_websockets::Error::Io)
    +632            .with_shared_secret(client_shared_secret);
    +633        let mut server_io = Framed::new(server, LengthDelimitedCodec::new())
    +634            .map_ok(BytesMut::freeze)
    +635            .map_err(tokio_websockets::Error::Io)
    +636            .sink_map_err(tokio_websockets::Error::Io)
    +637            .with_shared_secret(server_shared_secret);
    +638
    +639        let client_auth_header = KeyMaterialClientAuth::new(secret_key, &client_io)
    +640            .map(KeyMaterialClientAuth::into_header_value);
    +641
    +642        n0_future::future::zip(
    +643            async {
    +644                super::clientside(&mut client_io, secret_key)
    +645                    .await
    +646                    .context("clientside")
    +647            }
    +648            .instrument(info_span!("clientside")),
    +649            async {
    +650                let auth_n = super::serverside(&mut server_io, client_auth_header)
    +651                    .await
    +652                    .context("serverside")?;
    +653                let mechanism = auth_n.mechanism;
    +654                let is_authorized = restricted_to.is_none_or(|key| key == auth_n.client_key);
    +655                let key = auth_n.authorize_if(is_authorized, &mut server_io).await?;
    +656                Ok((key, mechanism))
    +657            }
    +658            .instrument(info_span!("serverside")),
    +659        )
    +660        .await
    +661    }
    +662
    +663    #[tokio::test]
    +664    #[traced_test]
    +665    async fn test_handshake_via_shared_secrets() -> Result {
    +666        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +667
    +668        let secret_key = SecretKey::generate(&mut rng);
    +669        let (client, server) = simulate_handshake(&secret_key, Some(42), Some(42), None).await;
    +670        client?;
    +671        let (public_key, auth) = server?;
    +672        assert_eq!(public_key, secret_key.public());
    +673        assert_eq!(auth, Mechanism::SignedKeyMaterial); // it got verified via shared key material
    +674        Ok(())
    +675    }
    +676
    +677    #[tokio::test]
    +678    #[traced_test]
    +679    async fn test_handshake_via_challenge() -> Result {
    +680        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +681
    +682        let secret_key = SecretKey::generate(&mut rng);
    +683        let (client, server) = simulate_handshake(&secret_key, None, None, None).await;
    +684        client?;
    +685        let (public_key, auth) = server?;
    +686        assert_eq!(public_key, secret_key.public());
    +687        assert_eq!(auth, Mechanism::SignedChallenge);
    +688        Ok(())
    +689    }
    +690
    +691    #[tokio::test]
    +692    #[traced_test]
    +693    async fn test_handshake_mismatching_shared_secrets() -> Result {
    +694        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +695
    +696        let secret_key = SecretKey::generate(&mut rng);
    +697        // mismatching shared secrets *might* happen with HTTPS proxies that don't also middle-man the shared secret
    +698        let (client, server) = simulate_handshake(&secret_key, Some(10), Some(99), None).await;
    +699        client?;
    +700        let (public_key, auth) = server?;
    +701        assert_eq!(public_key, secret_key.public());
    +702        assert_eq!(auth, Mechanism::SignedChallenge);
    +703        Ok(())
    +704    }
    +705
    +706    #[tokio::test]
    +707    #[traced_test]
    +708    async fn test_handshake_challenge_fallback() -> Result {
    +709        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +710        let secret_key = SecretKey::generate(&mut rng);
    +711        // clients might not have access to shared secrets
    +712        let (client, server) = simulate_handshake(&secret_key, None, Some(99), None).await;
    +713        client?;
    +714        let (public_key, auth) = server?;
    +715        assert_eq!(public_key, secret_key.public());
    +716        assert_eq!(auth, Mechanism::SignedChallenge);
    +717        Ok(())
    +718    }
    +719
    +720    #[tokio::test]
    +721    #[traced_test]
    +722    async fn test_handshake_with_auth_positive() -> Result {
    +723        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +724        let secret_key = SecretKey::generate(&mut rng);
    +725        let public_key = secret_key.public();
    +726        let (client, server) = simulate_handshake(&secret_key, None, None, Some(public_key)).await;
    +727        client?;
    +728        let (public_key, _) = server?;
    +729        assert_eq!(public_key, secret_key.public());
    +730        Ok(())
    +731    }
    +732
    +733    #[tokio::test]
    +734    #[traced_test]
    +735    async fn test_handshake_with_auth_negative() -> Result {
    +736        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +737        let secret_key = SecretKey::generate(&mut rng);
    +738        let public_key = secret_key.public();
    +739        let wrong_secret_key = SecretKey::generate(&mut rng);
    +740        let (client, server) =
    +741            simulate_handshake(&wrong_secret_key, None, None, Some(public_key)).await;
    +742        assert!(client.is_err());
    +743        assert!(server.is_err());
    +744        Ok(())
    +745    }
    +746
    +747    #[tokio::test]
    +748    #[traced_test]
    +749    async fn test_handshake_via_shared_secret_with_auth_negative() -> Result {
    +750        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +751        let secret_key = SecretKey::generate(&mut rng);
    +752        let public_key = secret_key.public();
    +753        let wrong_secret_key = SecretKey::generate(&mut rng);
    +754        let (client, server) =
    +755            simulate_handshake(&wrong_secret_key, Some(42), Some(42), Some(public_key)).await;
    +756        assert!(client.is_err());
    +757        assert!(server.is_err());
    +758        Ok(())
    +759    }
    +760
    +761    #[test]
    +762    fn test_client_auth_roundtrip() -> Result {
    +763        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +764        let secret_key = SecretKey::generate(&mut rng);
    +765        let challenge = ServerChallenge::new(&mut rng);
    +766        let client_auth = ClientAuth::new(&secret_key, &challenge);
    +767
    +768        let bytes = postcard::to_allocvec(&client_auth).e()?;
    +769        let decoded: ClientAuth = postcard::from_bytes(&bytes).e()?;
    +770
    +771        assert_eq!(client_auth.public_key, decoded.public_key);
    +772        assert_eq!(client_auth.signature, decoded.signature);
    +773
    +774        Ok(())
    +775    }
    +776
    +777    #[test]
    +778    fn test_km_client_auth_roundtrip() -> Result {
    +779        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +780        let secret_key = SecretKey::generate(&mut rng);
    +781        let client_auth = KeyMaterialClientAuth::new(
    +782            &secret_key,
    +783            &TestKeyingMaterial {
    +784                inner: (),
    +785                shared_secret: Some(42),
    +786            },
    +787        )
    +788        .e()?;
    +789
    +790        let bytes = postcard::to_allocvec(&client_auth).e()?;
    +791        let decoded: KeyMaterialClientAuth = postcard::from_bytes(&bytes).e()?;
    +792
    +793        assert_eq!(client_auth.public_key, decoded.public_key);
    +794        assert_eq!(client_auth.signature, decoded.signature);
    +795
    +796        Ok(())
    +797    }
    +798
    +799    #[test]
    +800    fn test_challenge_verification() -> Result {
    +801        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +802        let secret_key = SecretKey::generate(&mut rng);
    +803        let challenge = ServerChallenge::new(&mut rng);
    +804        let client_auth = ClientAuth::new(&secret_key, &challenge);
    +805        assert!(client_auth.verify(&challenge).is_ok());
    +806
    +807        Ok(())
    +808    }
    +809
    +810    #[test]
    +811    fn test_key_material_verification() -> Result {
    +812        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +813        let secret_key = SecretKey::generate(&mut rng);
    +814        let io = TestKeyingMaterial {
    +815            inner: (),
    +816            shared_secret: Some(42),
    +817        };
    +818        let client_auth = KeyMaterialClientAuth::new(&secret_key, &io).e()?;
    +819        assert!(client_auth.verify(&io).is_ok());
    +820
    +821        Ok(())
    +822    }
    +823}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/protos/relay.rs.html b/pr/3367/docs/src/iroh_relay/protos/relay.rs.html index 6e047353d9..c60b690a6a 100644 --- a/pr/3367/docs/src/iroh_relay/protos/relay.rs.html +++ b/pr/3367/docs/src/iroh_relay/protos/relay.rs.html @@ -1,952 +1,791 @@ -relay.rs - source

    iroh_relay/protos/
    relay.rs

    1//! This module implements the relaying protocol used by the `server` and `client`.
    +relay.rs - source

    iroh_relay/protos/
    relay.rs

    1//! This module implements the send/recv relaying protocol.
     2//!
     3//! Protocol flow:
    -4//!
    -5//! Login:
    -6//!  * client connects
    -7//!  * -> client sends `FrameType::ClientInfo`
    -8//!
    -9//!  Steady state:
    -10//!  * server occasionally sends `FrameType::KeepAlive` (or `FrameType::Ping`)
    -11//!  * client responds to any `FrameType::Ping` with a `FrameType::Pong`
    -12//!  * clients sends `FrameType::SendPacket`
    -13//!  * server then sends `FrameType::RecvPacket` to recipient
    -14
    -15use bytes::{BufMut, Bytes};
    -16use iroh_base::{PublicKey, SecretKey, Signature, SignatureError};
    -17#[cfg(feature = "server")]
    -18use n0_future::time::Duration;
    -19use n0_future::{time, Sink, SinkExt};
    -20#[cfg(any(test, feature = "server"))]
    -21use n0_future::{Stream, StreamExt};
    -22use nested_enum_utils::common_fields;
    -23use postcard::experimental::max_size::MaxSize;
    -24use serde::{Deserialize, Serialize};
    -25use snafu::{Backtrace, Snafu};
    -26
    -27use crate::{client::conn::SendError as ConnSendError, KeyCache};
    -28
    -29/// The maximum size of a packet sent over relay.
    -30/// (This only includes the data bytes visible to magicsock, not
    -31/// including its on-wire framing overhead)
    -32pub const MAX_PACKET_SIZE: usize = 64 * 1024;
    -33
    -34/// The maximum frame size.
    -35///
    -36/// This is also the minimum burst size that a rate-limiter has to accept.
    -37#[cfg(not(wasm_browser))]
    -38const MAX_FRAME_SIZE: usize = 1024 * 1024;
    -39
    -40/// The Relay magic number, sent in the FrameType::ClientInfo frame upon initial connection.
    -41const MAGIC: &str = "RELAY🔑";
    +4//!  * server occasionally sends [`FrameType::Ping`]
    +5//!  * client responds to any [`FrameType::Ping`] with a [`FrameType::Pong`]
    +6//!  * clients sends [`FrameType::ClientToRelayDatagram`] or [`FrameType::ClientToRelayDatagramBatch`]
    +7//!  * server then sends [`FrameType::RelayToClientDatagram`] or [`FrameType::RelayToClientDatagramBatch`] to recipient
    +8//!  * server sends [`FrameType::NodeGone`] when the other client disconnects
    +9
    +10use std::num::NonZeroU16;
    +11
    +12use bytes::{Buf, BufMut, Bytes, BytesMut};
    +13use iroh_base::{NodeId, SignatureError};
    +14use n0_future::time::Duration;
    +15use nested_enum_utils::common_fields;
    +16use snafu::{Backtrace, ResultExt, Snafu};
    +17
    +18use super::common::{FrameType, FrameTypeError};
    +19use crate::KeyCache;
    +20
    +21/// The maximum size of a packet sent over relay.
    +22/// (This only includes the data bytes visible to magicsock, not
    +23/// including its on-wire framing overhead)
    +24pub const MAX_PACKET_SIZE: usize = 64 * 1024;
    +25
    +26/// The maximum frame size.
    +27///
    +28/// This is also the minimum burst size that a rate-limiter has to accept.
    +29#[cfg(not(wasm_browser))]
    +30pub(crate) const MAX_FRAME_SIZE: usize = 1024 * 1024;
    +31
    +32/// Interval in which we ping the relay server to ensure the connection is alive.
    +33///
    +34/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some
    +35/// chance of recovering.
    +36#[cfg(feature = "server")]
    +37pub(crate) const PING_INTERVAL: Duration = Duration::from_secs(15);
    +38
    +39/// The number of packets buffered for sending per client
    +40#[cfg(feature = "server")]
    +41pub(crate) const PER_CLIENT_SEND_QUEUE_DEPTH: usize = 512;
     42
    -43/// Interval in which we ping the relay server to ensure the connection is alive.
    -44///
    -45/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some
    -46/// chance of recovering.
    -47#[cfg(feature = "server")]
    -48pub(crate) const PING_INTERVAL: Duration = Duration::from_secs(15);
    -49
    -50/// The number of packets buffered for sending per client
    -51#[cfg(feature = "server")]
    -52pub(crate) const PER_CLIENT_SEND_QUEUE_DEPTH: usize = 512; //32;
    -53
    -54/// ProtocolVersion is bumped whenever there's a wire-incompatible change.
    -55///  - version 1 (zero on wire): consistent box headers, in use by employee dev nodes a bit
    -56///  - version 2: received packets have src addrs in FrameType::RecvPacket at beginning.
    -57///
    -58/// NOTE: we are technically running a modified version of the protocol.
    -59/// `FrameType::PeerPresent`, `FrameType::WatchConn`, `FrameType::ClosePeer`, have been removed.
    -60/// The server will error on that connection if a client sends one of these frames.
    -61/// We have split with the DERP protocol significantly starting with our relay protocol 3
    -62/// `FrameType::PeerPresent`, `FrameType::WatchConn`, `FrameType::ClosePeer`, `FrameType::ServerKey`, and `FrameType::ServerInfo` have been removed.
    -63/// The server will error on that connection if a client sends one of these frames.
    -64/// This materially affects the handshake protocol, and so relay nodes on version 3 will be unable to communicate
    -65/// with nodes running earlier protocol versions.
    -66pub(crate) const PROTOCOL_VERSION: usize = 3;
    -67
    -68/// Indicates this IS the client's home node
    -69const PREFERRED: u8 = 1u8;
    -70/// Indicates this IS NOT the client's home node
    -71const NOT_PREFERRED: u8 = 0u8;
    +43/// Protocol send errors.
    +44#[common_fields({
    +45    backtrace: Option<Backtrace>,
    +46    #[snafu(implicit)]
    +47    span_trace: n0_snafu::SpanTrace,
    +48})]
    +49#[allow(missing_docs)]
    +50#[derive(Debug, Snafu)]
    +51#[non_exhaustive]
    +52pub enum Error {
    +53    #[snafu(display("unexpected frame: got {got:?}, expected {expected:?}"))]
    +54    UnexpectedFrame { got: FrameType, expected: FrameType },
    +55    #[snafu(display("Frame is too large, has {frame_len} bytes"))]
    +56    FrameTooLarge { frame_len: usize },
    +57    #[snafu(transparent)]
    +58    SerDe { source: postcard::Error },
    +59    #[snafu(transparent)]
    +60    FrameTypeError { source: FrameTypeError },
    +61    #[snafu(display("Invalid public key"))]
    +62    InvalidPublicKey { source: SignatureError },
    +63    #[snafu(display("Invalid frame encoding"))]
    +64    InvalidFrame {},
    +65    #[snafu(display("Invalid frame type: {frame_type:?}"))]
    +66    InvalidFrameType { frame_type: FrameType },
    +67    #[snafu(display("Invalid protocol message encoding"))]
    +68    InvalidProtocolMessageEncoding { source: std::str::Utf8Error },
    +69    #[snafu(display("Too few bytes"))]
    +70    TooSmall {},
    +71}
     72
    -73/// The one byte frame type at the beginning of the frame
    -74/// header. The second field is a big-endian u32 describing the
    -75/// length of the remaining frame (not including the initial 5 bytes)
    -76#[derive(Debug, PartialEq, Eq, num_enum::IntoPrimitive, num_enum::FromPrimitive, Clone, Copy)]
    -77#[repr(u8)]
    -78pub enum FrameType {
    -79    /// magic + 32b pub key + 24B nonce + bytes
    -80    ClientInfo = 2,
    -81    /// 32B dest pub key + packet bytes
    -82    SendPacket = 4,
    -83    /// v0/1 packet bytes, v2: 32B src pub key + packet bytes
    -84    RecvPacket = 5,
    -85    /// no payload, no-op (to be replaced with ping/pong)
    -86    KeepAlive = 6,
    -87    /// 1 byte payload: 0x01 or 0x00 for whether this is client's home node
    -88    NotePreferred = 7,
    -89    /// Sent from server to client to signal that a previous sender is no longer connected.
    -90    ///
    -91    /// That is, if A sent to B, and then if A disconnects, the server sends `FrameType::PeerGone`
    -92    /// to B so B can forget that a reverse path exists on that connection to get back to A
    -93    ///
    -94    /// 32B pub key of peer that's gone
    -95    PeerGone = 8,
    -96    /// Frames 9-11 concern meshing, which we have eliminated from our version of the protocol.
    -97    /// Messages with these frames will be ignored.
    -98    /// 8 byte ping payload, to be echoed back in FrameType::Pong
    -99    Ping = 12,
    -100    /// 8 byte payload, the contents of ping being replied to
    -101    Pong = 13,
    -102    /// Sent from server to client to tell the client if their connection is
    -103    /// unhealthy somehow.
    -104    ///
    -105    /// Currently this is used to indicate that the connection was closed because of authentication issues.
    -106    Health = 14,
    -107
    -108    /// Sent from server to client for the server to declare that it's restarting.
    -109    /// Payload is two big endian u32 durations in milliseconds: when to reconnect,
    -110    /// and how long to try total.
    -111    ///
    -112    /// Handled on the `[relay::Client]`, but currently never sent on the `[relay::Server]`
    -113    Restarting = 15,
    -114    /// Unknown frame type
    -115    #[num_enum(default)]
    -116    Unknown = 255,
    -117}
    -118
    -119impl std::fmt::Display for FrameType {
    -120    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    -121        write!(f, "{self:?}")
    -122    }
    -123}
    -124
    -125#[derive(Debug, Serialize, Deserialize, MaxSize, PartialEq, Eq)]
    -126pub(crate) struct ClientInfo {
    -127    /// The relay protocol version that the client was built with.
    -128    pub(crate) version: usize,
    -129}
    -130
    -131/// Protocol send errors.
    -132#[common_fields({
    -133    backtrace: Option<Backtrace>,
    -134    #[snafu(implicit)]
    -135    span_trace: n0_snafu::SpanTrace,
    -136})]
    -137#[allow(missing_docs)]
    -138#[derive(Debug, Snafu)]
    -139#[non_exhaustive]
    -140pub enum SendError {
    -141    #[snafu(transparent)]
    -142    Io { source: std::io::Error },
    -143    #[snafu(transparent)]
    -144    Timeout { source: time::Elapsed },
    -145    #[snafu(transparent)]
    -146    ConnSend { source: ConnSendError },
    -147    #[snafu(transparent)]
    -148    SerDe { source: postcard::Error },
    -149}
    -150
    -151/// Protocol send errors.
    -152#[common_fields({
    -153    backtrace: Option<Backtrace>,
    -154    #[snafu(implicit)]
    -155    span_trace: n0_snafu::SpanTrace,
    -156})]
    -157#[allow(missing_docs)]
    -158#[derive(Debug, Snafu)]
    -159#[non_exhaustive]
    -160pub enum RecvError {
    -161    #[snafu(transparent)]
    -162    Io { source: std::io::Error },
    -163    #[snafu(display("unexpected frame: got {got}, expected {expected}"))]
    -164    UnexpectedFrame { got: FrameType, expected: FrameType },
    -165    #[snafu(display("Frame is too large, has {frame_len} bytes"))]
    -166    FrameTooLarge { frame_len: usize },
    -167    #[snafu(transparent)]
    -168    Timeout { source: time::Elapsed },
    -169    #[snafu(transparent)]
    -170    SerDe { source: postcard::Error },
    -171    #[snafu(transparent)]
    -172    InvalidSignature { source: SignatureError },
    -173    #[snafu(display("Invalid frame encoding"))]
    -174    InvalidFrame {},
    -175    #[snafu(display("Invalid frame type: {frame_type}"))]
    -176    InvalidFrameType { frame_type: FrameType },
    -177    #[snafu(display("Too few bytes"))]
    -178    TooSmall {},
    -179}
    -180
    -181/// Writes complete frame, errors if it is unable to write within the given `timeout`.
    -182/// Ignores the timeout if `None`
    -183///
    -184/// Does not flush.
    -185#[cfg(feature = "server")]
    -186pub(crate) async fn write_frame<S: Sink<Frame, Error = std::io::Error> + Unpin>(
    -187    mut writer: S,
    -188    frame: Frame,
    -189    timeout: Option<Duration>,
    -190) -> Result<(), SendError> {
    -191    if let Some(duration) = timeout {
    -192        tokio::time::timeout(duration, writer.send(frame)).await??;
    -193    } else {
    -194        writer.send(frame).await?;
    -195    }
    -196
    -197    Ok(())
    -198}
    -199
    -200/// Writes a `FrameType::ClientInfo`, including the client's [`PublicKey`],
    -201/// and the client's [`ClientInfo`], sealed using the server's [`PublicKey`].
    -202///
    -203/// Flushes after writing.
    -204pub(crate) async fn send_client_key<S: Sink<Frame, Error = ConnSendError> + Unpin>(
    -205    mut writer: S,
    -206    client_secret_key: &SecretKey,
    -207    client_info: &ClientInfo,
    -208) -> Result<(), SendError> {
    -209    let msg = postcard::to_stdvec(client_info)?;
    -210    let signature = client_secret_key.sign(&msg);
    -211
    -212    writer
    -213        .send(Frame::ClientInfo {
    -214            client_public_key: client_secret_key.public(),
    -215            message: msg.into(),
    -216            signature,
    -217        })
    -218        .await?;
    -219    writer.flush().await?;
    -220    Ok(())
    -221}
    -222
    -223/// Reads the `FrameType::ClientInfo` frame from the client (its proof of identity)
    -224/// upon it's initial connection.
    -225#[cfg(any(test, feature = "server"))]
    -226pub(crate) async fn recv_client_key<E, S: Stream<Item = Result<Frame, E>> + Unpin>(
    -227    stream: S,
    -228) -> Result<(PublicKey, ClientInfo), E>
    -229where
    -230    E: From<RecvError>,
    -231{
    -232    // the client is untrusted at this point, limit the input size even smaller than our usual
    -233    // maximum frame size, and give a timeout
    -234
    -235    // TODO: variable recv size: 256 * 1024
    -236    let buf = tokio::time::timeout(
    -237        std::time::Duration::from_secs(10),
    -238        recv_frame(FrameType::ClientInfo, stream),
    -239    )
    -240    .await
    -241    .map_err(RecvError::from)??;
    -242
    -243    if let Frame::ClientInfo {
    -244        client_public_key,
    -245        message,
    -246        signature,
    -247    } = buf
    -248    {
    -249        client_public_key
    -250            .verify(&message, &signature)
    -251            .map_err(RecvError::from)?;
    -252
    -253        let info: ClientInfo = postcard::from_bytes(&message).map_err(RecvError::from)?;
    -254        Ok((client_public_key, info))
    -255    } else {
    -256        Err(UnexpectedFrameSnafu {
    -257            got: buf.typ(),
    -258            expected: FrameType::ClientInfo,
    -259        }
    -260        .build()
    -261        .into())
    -262    }
    -263}
    +73/// The messages that a relay sends to clients or the clients receive from the relay.
    +74#[derive(Debug, Clone, PartialEq, Eq)]
    +75pub enum RelayToClientMsg {
    +76    /// Represents datagrams sent from relays (originally sent to them by another client).
    +77    Datagrams {
    +78        /// The [`NodeId`] of the original sender.
    +79        remote_node_id: NodeId,
    +80        /// The datagrams and related metadata.
    +81        datagrams: Datagrams,
    +82    },
    +83    /// Indicates that the client identified by the underlying public key had previously sent you a
    +84    /// packet but has now disconnected from the relay.
    +85    NodeGone(NodeId),
    +86    /// A one-way message from relay to client, declaring the connection health state.
    +87    Health {
    +88        /// If set, is a description of why the connection is unhealthy.
    +89        ///
    +90        /// If `None` means the connection is healthy again.
    +91        ///
    +92        /// The default condition is healthy, so the relay doesn't broadcast a [`RelayToClientMsg::Health`]
    +93        /// until a problem exists.
    +94        problem: String,
    +95    },
    +96    /// A one-way message from relay to client, advertising that the relay is restarting.
    +97    Restarting {
    +98        /// An advisory duration that the client should wait before attempting to reconnect.
    +99        /// It might be zero. It exists for the relay to smear out the reconnects.
    +100        reconnect_in: Duration,
    +101        /// An advisory duration for how long the client should attempt to reconnect
    +102        /// before giving up and proceeding with its normal connection failure logic. The interval
    +103        /// between retries is undefined for now. A relay should not send a `try_for` duration more
    +104        /// than a few seconds.
    +105        try_for: Duration,
    +106    },
    +107    /// Request from the relay to reply to the
    +108    /// other side with a [`ClientToRelayMsg::Pong`] with the given payload.
    +109    Ping([u8; 8]),
    +110    /// Reply to a [`ClientToRelayMsg::Ping`] from a client
    +111    /// with the payload sent previously in the ping.
    +112    Pong([u8; 8]),
    +113}
    +114
    +115/// Messages that clients send to relays.
    +116#[derive(Debug, Clone, PartialEq, Eq)]
    +117pub enum ClientToRelayMsg {
    +118    /// Request from the client to the server to reply to the
    +119    /// other side with a [`RelayToClientMsg::Pong`] with the given payload.
    +120    Ping([u8; 8]),
    +121    /// Reply to a [`RelayToClientMsg::Ping`] from a server
    +122    /// with the payload sent previously in the ping.
    +123    Pong([u8; 8]),
    +124    /// Request from the client to relay datagrams to given remote node.
    +125    Datagrams {
    +126        /// The remote node to relay to.
    +127        dst_node_id: NodeId,
    +128        /// The datagrams and related metadata to relay.
    +129        datagrams: Datagrams,
    +130    },
    +131}
    +132
    +133/// One or multiple datagrams being transferred via the relay.
    +134///
    +135/// This type is modeled after [`quinn_proto::Transmit`]
    +136/// (or even more similarly `quinn_udp::Transmit`, but we don't depend on that library here).
    +137#[derive(derive_more::Debug, Clone, PartialEq, Eq)]
    +138pub struct Datagrams {
    +139    /// Explicit congestion notification bits
    +140    pub ecn: Option<quinn_proto::EcnCodepoint>,
    +141    /// The segment size if this transmission contains multiple datagrams.
    +142    /// This is `None` if the transmit only contains a single datagram
    +143    pub segment_size: Option<NonZeroU16>,
    +144    /// The contents of the datagram(s)
    +145    #[debug(skip)]
    +146    pub contents: Bytes,
    +147}
    +148
    +149impl<T: AsRef<[u8]>> From<T> for Datagrams {
    +150    fn from(bytes: T) -> Self {
    +151        Self {
    +152            ecn: None,
    +153            segment_size: None,
    +154            contents: Bytes::copy_from_slice(bytes.as_ref()),
    +155        }
    +156    }
    +157}
    +158
    +159impl Datagrams {
    +160    /// Splits the current datagram into at maximum `num_segments` segments, returning
    +161    /// the batch with at most `num_segments` and leaving only the rest in `self`.
    +162    ///
    +163    /// Calling this on a datagram batch that only contains a single datagram (`segment_size == None`)
    +164    /// will result in returning essentially a clone of `self`, while making `self` empty afterwards.
    +165    ///
    +166    /// Calling this on a datagram batch with e.g. 15 datagrams with `num_segments == 10` will
    +167    /// result in returning a datagram batch that contains the first 10 datagrams and leave `self`
    +168    /// containing the remaining 5 datagrams.
    +169    ///
    +170    /// Calling this on a datagram batch with less than `num_segments` datagrams will result in
    +171    /// making `self` empty and returning essentially a clone of `self`.
    +172    pub fn take_segments(&mut self, num_segments: usize) -> Datagrams {
    +173        let Some(segment_size) = self.segment_size else {
    +174            let contents = std::mem::take(&mut self.contents);
    +175            return Datagrams {
    +176                ecn: self.ecn,
    +177                segment_size: None,
    +178                contents,
    +179            };
    +180        };
    +181
    +182        let usize_segment_size = usize::from(u16::from(segment_size));
    +183        let max_content_len = num_segments * usize_segment_size;
    +184        let contents = self
    +185            .contents
    +186            .split_to(std::cmp::min(max_content_len, self.contents.len()));
    +187
    +188        let is_datagram_batch = num_segments > 1 && usize_segment_size < contents.len();
    +189
    +190        // If this left our batch with only one more datagram, then remove the segment size
    +191        // to uphold the invariant that single-datagram batches don't have a segment size set.
    +192        if self.contents.len() <= usize_segment_size {
    +193            self.segment_size = None;
    +194        }
    +195
    +196        Datagrams {
    +197            ecn: self.ecn,
    +198            segment_size: is_datagram_batch.then_some(segment_size),
    +199            contents,
    +200        }
    +201    }
    +202
    +203    fn write_to<O: BufMut>(&self, mut dst: O) -> O {
    +204        let ecn = self.ecn.map_or(0, |ecn| ecn as u8);
    +205        dst.put_u8(ecn);
    +206        if let Some(segment_size) = self.segment_size {
    +207            dst.put_u16(segment_size.into());
    +208        }
    +209        dst.put(self.contents.as_ref());
    +210        dst
    +211    }
    +212
    +213    fn encoded_len(&self) -> usize {
    +214        1 // ECN byte
    +215        + self.segment_size.map_or(0, |_| 2) // segment size, when None, then a packed representation is assumed
    +216        + self.contents.len()
    +217    }
    +218
    +219    #[allow(clippy::len_zero)]
    +220    fn from_bytes(mut bytes: Bytes, is_batch: bool) -> Result<Self, Error> {
    +221        if is_batch {
    +222            // 1 bytes ECN, 2 bytes segment size
    +223            snafu::ensure!(bytes.len() >= 3, InvalidFrameSnafu);
    +224        } else {
    +225            snafu::ensure!(bytes.len() >= 1, InvalidFrameSnafu);
    +226        }
    +227
    +228        let ecn_byte = bytes.get_u8();
    +229        let ecn = quinn_proto::EcnCodepoint::from_bits(ecn_byte);
    +230
    +231        let segment_size = if is_batch {
    +232            let segment_size = bytes.get_u16(); // length checked above
    +233            NonZeroU16::new(segment_size)
    +234        } else {
    +235            None
    +236        };
    +237
    +238        Ok(Self {
    +239            ecn,
    +240            segment_size,
    +241            contents: bytes,
    +242        })
    +243    }
    +244}
    +245
    +246impl RelayToClientMsg {
    +247    /// Returns this frame's corresponding frame type.
    +248    pub fn typ(&self) -> FrameType {
    +249        match self {
    +250            Self::Datagrams { datagrams, .. } => {
    +251                if datagrams.segment_size.is_some() {
    +252                    FrameType::RelayToClientDatagramBatch
    +253                } else {
    +254                    FrameType::RelayToClientDatagram
    +255                }
    +256            }
    +257            Self::NodeGone { .. } => FrameType::NodeGone,
    +258            Self::Ping { .. } => FrameType::Ping,
    +259            Self::Pong { .. } => FrameType::Pong,
    +260            Self::Health { .. } => FrameType::Health,
    +261            Self::Restarting { .. } => FrameType::Restarting,
    +262        }
    +263    }
     264
    -265/// The protocol for the relay server.
    -266///
    -267/// This is a framed protocol, using [`tokio_util::codec`] to turn the streams of bytes into
    -268/// [`Frame`]s.
    -269#[cfg(not(wasm_browser))]
    -270#[derive(Debug, Clone)]
    -271pub(crate) struct RelayCodec {
    -272    cache: KeyCache,
    -273}
    -274
    -275#[cfg(not(wasm_browser))]
    -276impl RelayCodec {
    -277    #[cfg(test)]
    -278    pub fn test() -> Self {
    -279        Self {
    -280            cache: KeyCache::test(),
    -281        }
    -282    }
    -283
    -284    pub(crate) fn new(cache: KeyCache) -> Self {
    -285        Self { cache }
    -286    }
    -287}
    -288
    -289/// The frames in the [`RelayCodec`].
    -290#[derive(Debug, Clone, PartialEq, Eq)]
    -291pub(crate) enum Frame {
    -292    ClientInfo {
    -293        client_public_key: PublicKey,
    -294        message: Bytes,
    -295        signature: Signature,
    -296    },
    -297    SendPacket {
    -298        dst_key: PublicKey,
    -299        packet: Bytes,
    -300    },
    -301    RecvPacket {
    -302        src_key: PublicKey,
    -303        content: Bytes,
    -304    },
    -305    KeepAlive,
    -306    NotePreferred {
    -307        preferred: bool,
    -308    },
    -309    NodeGone {
    -310        node_id: PublicKey,
    -311    },
    -312    Ping {
    -313        data: [u8; 8],
    -314    },
    -315    Pong {
    -316        data: [u8; 8],
    -317    },
    -318    Health {
    -319        problem: Bytes,
    -320    },
    -321    Restarting {
    -322        reconnect_in: u32,
    -323        try_for: u32,
    -324    },
    -325}
    -326
    -327impl Frame {
    -328    pub(crate) fn typ(&self) -> FrameType {
    -329        match self {
    -330            Frame::ClientInfo { .. } => FrameType::ClientInfo,
    -331            Frame::SendPacket { .. } => FrameType::SendPacket,
    -332            Frame::RecvPacket { .. } => FrameType::RecvPacket,
    -333            Frame::KeepAlive => FrameType::KeepAlive,
    -334            Frame::NotePreferred { .. } => FrameType::NotePreferred,
    -335            Frame::NodeGone { .. } => FrameType::PeerGone,
    -336            Frame::Ping { .. } => FrameType::Ping,
    -337            Frame::Pong { .. } => FrameType::Pong,
    -338            Frame::Health { .. } => FrameType::Health,
    -339            Frame::Restarting { .. } => FrameType::Restarting,
    -340        }
    -341    }
    -342
    -343    /// Serialized length (without the frame header)
    -344    #[cfg(not(wasm_browser))] // Not needed with websocket framing - thus not needed in browsers
    -345    pub(crate) fn len(&self) -> usize {
    -346        match self {
    -347            Frame::ClientInfo {
    -348                client_public_key: _,
    -349                message,
    -350                signature: _,
    -351            } => MAGIC.len() + PublicKey::LENGTH + message.len() + Signature::BYTE_SIZE,
    -352            Frame::SendPacket { dst_key: _, packet } => PublicKey::LENGTH + packet.len(),
    -353            Frame::RecvPacket {
    -354                src_key: _,
    -355                content,
    -356            } => PublicKey::LENGTH + content.len(),
    -357            Frame::KeepAlive => 0,
    -358            Frame::NotePreferred { .. } => 1,
    -359            Frame::NodeGone { .. } => PublicKey::LENGTH,
    -360            Frame::Ping { .. } => 8,
    -361            Frame::Pong { .. } => 8,
    -362            Frame::Health { problem } => problem.len(),
    -363            Frame::Restarting { .. } => 4 + 4,
    -364        }
    -365    }
    -366
    -367    /// Serialized length with frame header.
    -368    #[cfg(feature = "server")]
    -369    pub(crate) fn len_with_header(&self) -> usize {
    -370        self.len() + HEADER_LEN
    -371    }
    -372
    -373    /// Tries to decode a frame received over websockets.
    -374    ///
    -375    /// Specifically, bytes received from a binary websocket message frame.
    -376    #[allow(clippy::result_large_err)]
    -377    pub(crate) fn decode_from_ws_msg(bytes: Bytes, cache: &KeyCache) -> Result<Self, RecvError> {
    -378        if bytes.is_empty() {
    -379            return Err(TooSmallSnafu.build());
    -380        }
    -381        let typ = FrameType::from(bytes[0]);
    -382        let frame = Self::from_bytes(typ, bytes.slice(1..), cache)?;
    -383        Ok(frame)
    -384    }
    -385
    -386    /// Encodes this frame for sending over websockets.
    -387    ///
    -388    /// Specifically meant for being put into a binary websocket message frame.
    -389    pub(crate) fn encode_for_ws_msg(self) -> Vec<u8> {
    -390        let mut bytes = Vec::new();
    -391        bytes.put_u8(self.typ().into());
    -392        self.write_to(&mut bytes);
    -393        bytes
    -394    }
    -395
    -396    /// Writes it self to the given buffer.
    -397    fn write_to(&self, dst: &mut impl BufMut) {
    -398        match self {
    -399            Frame::ClientInfo {
    -400                client_public_key,
    -401                message,
    -402                signature,
    -403            } => {
    -404                dst.put(MAGIC.as_bytes());
    -405                dst.put(client_public_key.as_ref());
    -406                dst.put(&signature.to_bytes()[..]);
    -407                dst.put(&message[..]);
    -408            }
    -409            Frame::SendPacket { dst_key, packet } => {
    -410                dst.put(dst_key.as_ref());
    -411                dst.put(packet.as_ref());
    -412            }
    -413            Frame::RecvPacket { src_key, content } => {
    -414                dst.put(src_key.as_ref());
    -415                dst.put(content.as_ref());
    -416            }
    -417            Frame::KeepAlive => {}
    -418            Frame::NotePreferred { preferred } => {
    -419                if *preferred {
    -420                    dst.put_u8(PREFERRED);
    -421                } else {
    -422                    dst.put_u8(NOT_PREFERRED);
    -423                }
    -424            }
    -425            Frame::NodeGone { node_id: peer } => {
    -426                dst.put(peer.as_ref());
    -427            }
    -428            Frame::Ping { data } => {
    -429                dst.put(&data[..]);
    -430            }
    -431            Frame::Pong { data } => {
    -432                dst.put(&data[..]);
    -433            }
    -434            Frame::Health { problem } => {
    -435                dst.put(problem.as_ref());
    +265    #[cfg(feature = "server")]
    +266    pub(crate) fn to_bytes(&self) -> BytesMut {
    +267        self.write_to(BytesMut::with_capacity(self.encoded_len()))
    +268    }
    +269
    +270    /// Encodes this frame for sending over websockets.
    +271    ///
    +272    /// Specifically meant for being put into a binary websocket message frame.
    +273    #[cfg(feature = "server")]
    +274    pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O {
    +275        dst = self.typ().write_to(dst);
    +276        match self {
    +277            Self::Datagrams {
    +278                remote_node_id,
    +279                datagrams,
    +280            } => {
    +281                dst.put(remote_node_id.as_ref());
    +282                dst = datagrams.write_to(dst);
    +283            }
    +284            Self::NodeGone(node_id) => {
    +285                dst.put(node_id.as_ref());
    +286            }
    +287            Self::Ping(data) => {
    +288                dst.put(&data[..]);
    +289            }
    +290            Self::Pong(data) => {
    +291                dst.put(&data[..]);
    +292            }
    +293            Self::Health { problem } => {
    +294                dst.put(problem.as_ref());
    +295            }
    +296            Self::Restarting {
    +297                reconnect_in,
    +298                try_for,
    +299            } => {
    +300                dst.put_u32(reconnect_in.as_millis() as u32);
    +301                dst.put_u32(try_for.as_millis() as u32);
    +302            }
    +303        }
    +304        dst
    +305    }
    +306
    +307    #[cfg(feature = "server")]
    +308    pub(crate) fn encoded_len(&self) -> usize {
    +309        let payload_len = match self {
    +310            Self::Datagrams { datagrams, .. } => {
    +311                32 // nodeid
    +312                + datagrams.encoded_len()
    +313            }
    +314            Self::NodeGone(_) => 32,
    +315            Self::Ping(_) | Self::Pong(_) => 8,
    +316            Self::Health { problem } => problem.len(),
    +317            Self::Restarting { .. } => {
    +318                4 // u32
    +319                + 4 // u32
    +320            }
    +321        };
    +322        self.typ().encoded_len() + payload_len
    +323    }
    +324
    +325    /// Tries to decode a frame received over websockets.
    +326    ///
    +327    /// Specifically, bytes received from a binary websocket message frame.
    +328    #[allow(clippy::result_large_err)]
    +329    pub(crate) fn from_bytes(mut content: Bytes, cache: &KeyCache) -> Result<Self, Error> {
    +330        let frame_type = FrameType::from_bytes(&mut content)?;
    +331        let frame_len = content.len();
    +332        snafu::ensure!(
    +333            frame_len <= MAX_PACKET_SIZE,
    +334            FrameTooLargeSnafu { frame_len }
    +335        );
    +336
    +337        let res = match frame_type {
    +338            FrameType::RelayToClientDatagram | FrameType::RelayToClientDatagramBatch => {
    +339                snafu::ensure!(content.len() >= NodeId::LENGTH, InvalidFrameSnafu);
    +340
    +341                let remote_node_id = cache
    +342                    .key_from_slice(&content[..NodeId::LENGTH])
    +343                    .context(InvalidPublicKeySnafu)?;
    +344                let datagrams = Datagrams::from_bytes(
    +345                    content.slice(NodeId::LENGTH..),
    +346                    frame_type == FrameType::RelayToClientDatagramBatch,
    +347                )?;
    +348                Self::Datagrams {
    +349                    remote_node_id,
    +350                    datagrams,
    +351                }
    +352            }
    +353            FrameType::NodeGone => {
    +354                snafu::ensure!(content.len() == NodeId::LENGTH, InvalidFrameSnafu);
    +355                let node_id = cache
    +356                    .key_from_slice(content.as_ref())
    +357                    .context(InvalidPublicKeySnafu)?;
    +358                Self::NodeGone(node_id)
    +359            }
    +360            FrameType::Ping => {
    +361                snafu::ensure!(content.len() == 8, InvalidFrameSnafu);
    +362                let mut data = [0u8; 8];
    +363                data.copy_from_slice(&content[..8]);
    +364                Self::Ping(data)
    +365            }
    +366            FrameType::Pong => {
    +367                snafu::ensure!(content.len() == 8, InvalidFrameSnafu);
    +368                let mut data = [0u8; 8];
    +369                data.copy_from_slice(&content[..8]);
    +370                Self::Pong(data)
    +371            }
    +372            FrameType::Health => {
    +373                let problem = std::str::from_utf8(&content)
    +374                    .context(InvalidProtocolMessageEncodingSnafu)?
    +375                    .to_owned();
    +376                Self::Health { problem }
    +377            }
    +378            FrameType::Restarting => {
    +379                snafu::ensure!(content.len() == 4 + 4, InvalidFrameSnafu);
    +380                let reconnect_in = u32::from_be_bytes(
    +381                    content[..4]
    +382                        .try_into()
    +383                        .map_err(|_| InvalidFrameSnafu.build())?,
    +384                );
    +385                let try_for = u32::from_be_bytes(
    +386                    content[4..]
    +387                        .try_into()
    +388                        .map_err(|_| InvalidFrameSnafu.build())?,
    +389                );
    +390                let reconnect_in = Duration::from_millis(reconnect_in as u64);
    +391                let try_for = Duration::from_millis(try_for as u64);
    +392                Self::Restarting {
    +393                    reconnect_in,
    +394                    try_for,
    +395                }
    +396            }
    +397            _ => {
    +398                return Err(InvalidFrameTypeSnafu { frame_type }.build());
    +399            }
    +400        };
    +401        Ok(res)
    +402    }
    +403}
    +404
    +405impl ClientToRelayMsg {
    +406    pub(crate) fn typ(&self) -> FrameType {
    +407        match self {
    +408            Self::Datagrams { datagrams, .. } => {
    +409                if datagrams.segment_size.is_some() {
    +410                    FrameType::ClientToRelayDatagramBatch
    +411                } else {
    +412                    FrameType::ClientToRelayDatagram
    +413                }
    +414            }
    +415            Self::Ping { .. } => FrameType::Ping,
    +416            Self::Pong { .. } => FrameType::Pong,
    +417        }
    +418    }
    +419
    +420    pub(crate) fn to_bytes(&self) -> BytesMut {
    +421        self.write_to(BytesMut::with_capacity(self.encoded_len()))
    +422    }
    +423
    +424    /// Encodes this frame for sending over websockets.
    +425    ///
    +426    /// Specifically meant for being put into a binary websocket message frame.
    +427    pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O {
    +428        dst = self.typ().write_to(dst);
    +429        match self {
    +430            Self::Datagrams {
    +431                dst_node_id,
    +432                datagrams,
    +433            } => {
    +434                dst.put(dst_node_id.as_ref());
    +435                dst = datagrams.write_to(dst);
     436            }
    -437            Frame::Restarting {
    -438                reconnect_in,
    -439                try_for,
    -440            } => {
    -441                dst.put_u32(*reconnect_in);
    -442                dst.put_u32(*try_for);
    -443            }
    -444        }
    +437            Self::Ping(data) => {
    +438                dst.put(&data[..]);
    +439            }
    +440            Self::Pong(data) => {
    +441                dst.put(&data[..]);
    +442            }
    +443        }
    +444        dst
     445    }
     446
    -447    #[allow(clippy::result_large_err)]
    -448    fn from_bytes(
    -449        frame_type: FrameType,
    -450        content: Bytes,
    -451        cache: &KeyCache,
    -452    ) -> Result<Self, RecvError> {
    -453        let res = match frame_type {
    -454            FrameType::ClientInfo => {
    -455                if content.len() < PublicKey::LENGTH + Signature::BYTE_SIZE + MAGIC.len() {
    -456                    return Err(InvalidFrameSnafu.build());
    -457                }
    -458                if &content[..MAGIC.len()] != MAGIC.as_bytes() {
    -459                    return Err(InvalidFrameSnafu.build());
    -460                }
    -461
    -462                let start = MAGIC.len();
    -463                let client_public_key =
    -464                    cache.key_from_slice(&content[start..start + PublicKey::LENGTH])?;
    -465                let start = start + PublicKey::LENGTH;
    -466                let signature =
    -467                    Signature::from_slice(&content[start..start + Signature::BYTE_SIZE])?;
    -468                let start = start + Signature::BYTE_SIZE;
    -469                let message = content.slice(start..);
    -470                Self::ClientInfo {
    -471                    client_public_key,
    -472                    message,
    -473                    signature,
    -474                }
    -475            }
    -476            FrameType::SendPacket => {
    -477                if content.len() < PublicKey::LENGTH {
    -478                    return Err(InvalidFrameSnafu.build());
    -479                }
    -480                let frame_len = content.len() - PublicKey::LENGTH;
    -481                if frame_len > MAX_PACKET_SIZE {
    -482                    return Err(FrameTooLargeSnafu { frame_len }.build());
    +447    pub(crate) fn encoded_len(&self) -> usize {
    +448        let payload_len = match self {
    +449            Self::Ping(_) | Self::Pong(_) => 8,
    +450            Self::Datagrams { datagrams, .. } => {
    +451                32 // node id
    +452                + datagrams.encoded_len()
    +453            }
    +454        };
    +455        self.typ().encoded_len() + payload_len
    +456    }
    +457
    +458    /// Tries to decode a frame received over websockets.
    +459    ///
    +460    /// Specifically, bytes received from a binary websocket message frame.
    +461    #[allow(clippy::result_large_err)]
    +462    #[cfg(feature = "server")]
    +463    pub(crate) fn from_bytes(mut content: Bytes, cache: &KeyCache) -> Result<Self, Error> {
    +464        let frame_type = FrameType::from_bytes(&mut content)?;
    +465        let frame_len = content.len();
    +466        snafu::ensure!(
    +467            frame_len <= MAX_PACKET_SIZE,
    +468            FrameTooLargeSnafu { frame_len }
    +469        );
    +470
    +471        let res = match frame_type {
    +472            FrameType::ClientToRelayDatagram | FrameType::ClientToRelayDatagramBatch => {
    +473                let dst_node_id = cache
    +474                    .key_from_slice(&content[..NodeId::LENGTH])
    +475                    .context(InvalidPublicKeySnafu)?;
    +476                let datagrams = Datagrams::from_bytes(
    +477                    content.slice(NodeId::LENGTH..),
    +478                    frame_type == FrameType::ClientToRelayDatagramBatch,
    +479                )?;
    +480                Self::Datagrams {
    +481                    dst_node_id,
    +482                    datagrams,
     483                }
    -484
    -485                let dst_key = cache.key_from_slice(&content[..PublicKey::LENGTH])?;
    -486                let packet = content.slice(PublicKey::LENGTH..);
    -487                Self::SendPacket { dst_key, packet }
    -488            }
    -489            FrameType::RecvPacket => {
    -490                if content.len() < PublicKey::LENGTH {
    -491                    return Err(InvalidFrameSnafu.build());
    -492                }
    -493
    -494                let frame_len = content.len() - PublicKey::LENGTH;
    -495                if frame_len > MAX_PACKET_SIZE {
    -496                    return Err(FrameTooLargeSnafu { frame_len }.build());
    -497                }
    -498
    -499                let src_key = cache.key_from_slice(&content[..PublicKey::LENGTH])?;
    -500                let content = content.slice(PublicKey::LENGTH..);
    -501                Self::RecvPacket { src_key, content }
    -502            }
    -503            FrameType::KeepAlive => {
    -504                if !content.is_empty() {
    -505                    return Err(InvalidFrameSnafu.build());
    -506                }
    -507                Self::KeepAlive
    -508            }
    -509            FrameType::NotePreferred => {
    -510                if content.len() != 1 {
    -511                    return Err(InvalidFrameSnafu.build());
    -512                }
    -513                let preferred = match content[0] {
    -514                    PREFERRED => true,
    -515                    NOT_PREFERRED => false,
    -516                    _ => return Err(InvalidFrameSnafu.build()),
    -517                };
    -518                Self::NotePreferred { preferred }
    -519            }
    -520            FrameType::PeerGone => {
    -521                if content.len() != PublicKey::LENGTH {
    -522                    return Err(InvalidFrameSnafu.build());
    -523                }
    -524                let peer = cache.key_from_slice(&content[..32])?;
    -525                Self::NodeGone { node_id: peer }
    -526            }
    -527            FrameType::Ping => {
    -528                if content.len() != 8 {
    -529                    return Err(InvalidFrameSnafu.build());
    -530                }
    -531                let mut data = [0u8; 8];
    -532                data.copy_from_slice(&content[..8]);
    -533                Self::Ping { data }
    -534            }
    -535            FrameType::Pong => {
    -536                if content.len() != 8 {
    -537                    return Err(InvalidFrameSnafu.build());
    -538                }
    -539                let mut data = [0u8; 8];
    -540                data.copy_from_slice(&content[..8]);
    -541                Self::Pong { data }
    -542            }
    -543            FrameType::Health => Self::Health { problem: content },
    -544            FrameType::Restarting => {
    -545                if content.len() != 4 + 4 {
    -546                    return Err(InvalidFrameSnafu.build());
    -547                }
    -548                let reconnect_in = u32::from_be_bytes(
    -549                    content[..4]
    -550                        .try_into()
    -551                        .map_err(|_| InvalidFrameSnafu.build())?,
    -552                );
    -553                let try_for = u32::from_be_bytes(
    -554                    content[4..]
    -555                        .try_into()
    -556                        .map_err(|_| InvalidFrameSnafu.build())?,
    -557                );
    -558                Self::Restarting {
    -559                    reconnect_in,
    -560                    try_for,
    -561                }
    -562            }
    -563            _ => {
    -564                return Err(InvalidFrameTypeSnafu { frame_type }.build());
    -565            }
    -566        };
    -567        Ok(res)
    -568    }
    -569}
    -570
    -571// No need for framing when using websockets, thus this is cfg-ed out for browsers:
    -572#[cfg(not(wasm_browser))]
    -573// rustc doesn't figure out that the trait impls mean it's not unused
    -574#[cfg_attr(not(wasm_browser), allow(unused))]
    -575pub use framing::*;
    -576
    -577#[cfg(not(wasm_browser))]
    -578mod framing {
    -579    use bytes::{Buf, BytesMut};
    -580    use tokio_util::codec::{Decoder, Encoder};
    -581
    -582    use super::*;
    -583
    -584    pub(super) const HEADER_LEN: usize = 5;
    -585
    -586    impl Decoder for RelayCodec {
    -587        type Item = Frame;
    -588        type Error = RecvError;
    -589
    -590        fn decode(&mut self, src: &mut BytesMut) -> Result<Option<Self::Item>, Self::Error> {
    -591            // Need at least 5 bytes
    -592            if src.len() < HEADER_LEN {
    -593                return Ok(None);
    -594            }
    -595
    -596            // Can't use the `Buf::get_*` APIs, as that advances the buffer.
    -597            let Some(frame_type) = src.first().map(|b| FrameType::from(*b)) else {
    -598                return Ok(None); // Not enough bytes
    -599            };
    -600            let Some(frame_len) = src
    -601                .get(1..5)
    -602                .and_then(|s| TryInto::<[u8; 4]>::try_into(s).ok())
    -603                .map(u32::from_be_bytes)
    -604                .map(|l| l as usize)
    -605            else {
    -606                return Ok(None); // Not enough bytes
    -607            };
    -608
    -609            if frame_len > MAX_FRAME_SIZE {
    -610                return Err(FrameTooLargeSnafu { frame_len }.build());
    -611            }
    -612
    -613            if src.len() < HEADER_LEN + frame_len {
    -614                // Optimization: prereserve the buffer space
    -615                src.reserve(HEADER_LEN + frame_len - src.len());
    -616
    -617                return Ok(None);
    -618            }
    -619
    -620            // advance the header
    -621            src.advance(HEADER_LEN);
    -622
    -623            let content = src.split_to(frame_len).freeze();
    -624            let frame = Frame::from_bytes(frame_type, content, &self.cache)?;
    -625
    -626            Ok(Some(frame))
    -627        }
    -628    }
    -629
    -630    impl Encoder<Frame> for RelayCodec {
    -631        type Error = std::io::Error;
    -632
    -633        fn encode(&mut self, frame: Frame, dst: &mut BytesMut) -> Result<(), Self::Error> {
    -634            let frame_len: usize = frame.len();
    -635            if frame_len > MAX_FRAME_SIZE {
    -636                return Err(std::io::Error::new(
    -637                    std::io::ErrorKind::InvalidData,
    -638                    format!("Frame of length {} is too large.", frame_len),
    -639                ));
    -640            }
    -641
    -642            let frame_len_u32 = u32::try_from(frame_len).expect("just checked");
    -643
    -644            dst.reserve(HEADER_LEN + frame_len);
    -645            dst.put_u8(frame.typ().into());
    -646            dst.put_u32(frame_len_u32);
    -647            frame.write_to(dst);
    -648
    -649            Ok(())
    -650        }
    -651    }
    -652}
    -653
    -654/// Receives the next frame and matches the frame type. If the correct type is found returns the content,
    -655/// otherwise an error.
    -656#[cfg(any(test, feature = "server"))]
    -657pub(crate) async fn recv_frame<E, S: Stream<Item = Result<Frame, E>> + Unpin>(
    -658    frame_type: FrameType,
    -659    mut stream: S,
    -660) -> Result<Frame, E>
    -661where
    -662    RecvError: Into<E>,
    -663{
    -664    match stream.next().await {
    -665        Some(Ok(frame)) => {
    -666            if frame_type != frame.typ() {
    -667                return Err(UnexpectedFrameSnafu {
    -668                    got: frame.typ(),
    -669                    expected: frame_type,
    -670                }
    -671                .build()
    -672                .into());
    -673            }
    -674            Ok(frame)
    -675        }
    -676        Some(Err(err)) => Err(err),
    -677        None => Err(RecvError::from(std::io::Error::new(
    -678            std::io::ErrorKind::UnexpectedEof,
    -679            "expected frame".to_string(),
    -680        ))
    -681        .into()),
    -682    }
    -683}
    +484            }
    +485            FrameType::Ping => {
    +486                snafu::ensure!(content.len() == 8, InvalidFrameSnafu);
    +487                let mut data = [0u8; 8];
    +488                data.copy_from_slice(&content[..8]);
    +489                Self::Ping(data)
    +490            }
    +491            FrameType::Pong => {
    +492                snafu::ensure!(content.len() == 8, InvalidFrameSnafu);
    +493                let mut data = [0u8; 8];
    +494                data.copy_from_slice(&content[..8]);
    +495                Self::Pong(data)
    +496            }
    +497            _ => {
    +498                return Err(InvalidFrameTypeSnafu { frame_type }.build());
    +499            }
    +500        };
    +501        Ok(res)
    +502    }
    +503}
    +504
    +505#[cfg(test)]
    +506#[cfg(feature = "server")]
    +507mod tests {
    +508    use data_encoding::HEXLOWER;
    +509    use iroh_base::SecretKey;
    +510    use n0_snafu::Result;
    +511
    +512    use super::*;
    +513
    +514    fn check_expected_bytes(frames: Vec<(Vec<u8>, &str)>) {
    +515        for (bytes, expected_hex) in frames {
    +516            let stripped: Vec<u8> = expected_hex
    +517                .chars()
    +518                .filter_map(|s| {
    +519                    if s.is_ascii_whitespace() {
    +520                        None
    +521                    } else {
    +522                        Some(s as u8)
    +523                    }
    +524                })
    +525                .collect();
    +526            let expected_bytes = HEXLOWER.decode(&stripped).unwrap();
    +527            assert_eq!(HEXLOWER.encode(&bytes), HEXLOWER.encode(&expected_bytes));
    +528        }
    +529    }
    +530
    +531    #[test]
    +532    fn test_server_client_frames_snapshot() -> Result {
    +533        let client_key = SecretKey::from_bytes(&[42u8; 32]);
    +534
    +535        check_expected_bytes(vec![
    +536            (
    +537                RelayToClientMsg::Health {
    +538                    problem: "Hello? Yes this is dog.".into(),
    +539                }
    +540                .write_to(Vec::new()),
    +541                "0b 48 65 6c 6c 6f 3f 20 59 65 73 20 74 68 69 73
    +542                20 69 73 20 64 6f 67 2e",
    +543            ),
    +544            (
    +545                RelayToClientMsg::NodeGone(client_key.public()).write_to(Vec::new()),
    +546                "08 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e
    +547                a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d
    +548                61",
    +549            ),
    +550            (
    +551                RelayToClientMsg::Ping([42u8; 8]).write_to(Vec::new()),
    +552                "09 2a 2a 2a 2a 2a 2a 2a 2a",
    +553            ),
    +554            (
    +555                RelayToClientMsg::Pong([42u8; 8]).write_to(Vec::new()),
    +556                "0a 2a 2a 2a 2a 2a 2a 2a 2a",
    +557            ),
    +558            (
    +559                RelayToClientMsg::Datagrams {
    +560                    remote_node_id: client_key.public(),
    +561                    datagrams: Datagrams {
    +562                        ecn: Some(quinn::EcnCodepoint::Ce),
    +563                        segment_size: NonZeroU16::new(6),
    +564                        contents: "Hello World!".into(),
    +565                    },
    +566                }
    +567                .write_to(Vec::new()),
    +568                // frame type
    +569                // public key first 16 bytes
    +570                // public key second 16 bytes
    +571                // ECN byte
    +572                // segment size
    +573                // hello world contents bytes
    +574                "07
    +575                19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e a7
    +576                89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d 61
    +577                03
    +578                00 06
    +579                48 65 6c 6c 6f 20 57 6f 72 6c 64 21",
    +580            ),
    +581            (
    +582                RelayToClientMsg::Datagrams {
    +583                    remote_node_id: client_key.public(),
    +584                    datagrams: Datagrams {
    +585                        ecn: Some(quinn::EcnCodepoint::Ce),
    +586                        segment_size: None,
    +587                        contents: "Hello World!".into(),
    +588                    },
    +589                }
    +590                .write_to(Vec::new()),
    +591                // frame type
    +592                // public key first 16 bytes
    +593                // public key second 16 bytes
    +594                // ECN byte
    +595                // hello world contents bytes
    +596                "06
    +597                19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e a7
    +598                89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d 61
    +599                03
    +600                48 65 6c 6c 6f 20 57 6f 72 6c 64 21",
    +601            ),
    +602            (
    +603                RelayToClientMsg::Restarting {
    +604                    reconnect_in: Duration::from_millis(10),
    +605                    try_for: Duration::from_millis(20),
    +606                }
    +607                .write_to(Vec::new()),
    +608                "0c 00 00 00 0a 00 00 00 14",
    +609            ),
    +610        ]);
    +611
    +612        Ok(())
    +613    }
    +614
    +615    #[test]
    +616    fn test_client_server_frames_snapshot() -> Result {
    +617        let client_key = SecretKey::from_bytes(&[42u8; 32]);
    +618
    +619        check_expected_bytes(vec![
    +620            (
    +621                ClientToRelayMsg::Ping([42u8; 8]).write_to(Vec::new()),
    +622                "09 2a 2a 2a 2a 2a 2a 2a 2a",
    +623            ),
    +624            (
    +625                ClientToRelayMsg::Pong([42u8; 8]).write_to(Vec::new()),
    +626                "0a 2a 2a 2a 2a 2a 2a 2a 2a",
    +627            ),
    +628            (
    +629                ClientToRelayMsg::Datagrams {
    +630                    dst_node_id: client_key.public(),
    +631                    datagrams: Datagrams {
    +632                        ecn: Some(quinn::EcnCodepoint::Ce),
    +633                        segment_size: NonZeroU16::new(6),
    +634                        contents: "Hello World!".into(),
    +635                    },
    +636                }
    +637                .write_to(Vec::new()),
    +638                // frame type
    +639                // public key first 16 bytes
    +640                // public key second 16 bytes
    +641                // ECN byte
    +642                // Segment size
    +643                // hello world contents
    +644                "05
    +645                19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e a7
    +646                89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d 61
    +647                03
    +648                00 06
    +649                48 65 6c 6c 6f 20 57 6f 72 6c 64 21",
    +650            ),
    +651            (
    +652                ClientToRelayMsg::Datagrams {
    +653                    dst_node_id: client_key.public(),
    +654                    datagrams: Datagrams {
    +655                        ecn: Some(quinn::EcnCodepoint::Ce),
    +656                        segment_size: None,
    +657                        contents: "Hello World!".into(),
    +658                    },
    +659                }
    +660                .write_to(Vec::new()),
    +661                // frame type
    +662                // public key first 16 bytes
    +663                // public key second 16 bytes
    +664                // ECN byte
    +665                // hello world contents
    +666                "04
    +667                19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e a7
    +668                89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d 61
    +669                03
    +670                48 65 6c 6c 6f 20 57 6f 72 6c 64 21",
    +671            ),
    +672        ]);
    +673
    +674        Ok(())
    +675    }
    +676}
    +677
    +678#[cfg(all(test, feature = "server"))]
    +679mod proptests {
    +680    use iroh_base::SecretKey;
    +681    use proptest::prelude::*;
    +682
    +683    use super::*;
     684
    -685#[cfg(test)]
    -686mod tests {
    -687    use data_encoding::HEXLOWER;
    -688    use n0_snafu::{Result, ResultExt};
    -689    use tokio_util::codec::{FramedRead, FramedWrite};
    -690
    -691    use super::*;
    +685    fn secret_key() -> impl Strategy<Value = SecretKey> {
    +686        prop::array::uniform32(any::<u8>()).prop_map(SecretKey::from)
    +687    }
    +688
    +689    fn key() -> impl Strategy<Value = NodeId> {
    +690        secret_key().prop_map(|key| key.public())
    +691    }
     692
    -693    #[tokio::test]
    -694    #[cfg(feature = "server")]
    -695    async fn test_basic_read_write() -> Result {
    -696        let (reader, writer) = tokio::io::duplex(1024);
    -697        let mut reader = FramedRead::new(reader, RelayCodec::test());
    -698        let mut writer = FramedWrite::new(writer, RelayCodec::test());
    -699
    -700        let expect_buf = b"hello world!";
    -701        let expected_frame = Frame::Health {
    -702            problem: expect_buf.to_vec().into(),
    -703        };
    -704        write_frame(&mut writer, expected_frame.clone(), None).await?;
    -705        writer.flush().await.context("flush")?;
    -706        println!("{:?}", reader);
    -707        let buf = recv_frame(FrameType::Health, &mut reader).await?;
    -708        assert_eq!(expect_buf.len(), buf.len());
    -709        assert_eq!(expected_frame, buf);
    -710
    -711        Ok(())
    -712    }
    -713
    -714    #[tokio::test]
    -715    async fn test_send_recv_client_key() -> Result {
    -716        let (reader, writer) = tokio::io::duplex(1024);
    -717        let mut reader = FramedRead::new(reader, RelayCodec::test());
    -718        let mut writer =
    -719            FramedWrite::new(writer, RelayCodec::test()).sink_map_err(ConnSendError::from);
    -720
    -721        let client_key = SecretKey::generate(rand::thread_rng());
    -722        let client_info = ClientInfo {
    -723            version: PROTOCOL_VERSION,
    -724        };
    -725        println!("client_key pub {:?}", client_key.public());
    -726        send_client_key(&mut writer, &client_key, &client_info).await?;
    -727        let (client_pub_key, got_client_info) = recv_client_key(&mut reader).await?;
    -728        assert_eq!(client_key.public(), client_pub_key);
    -729        assert_eq!(client_info, got_client_info);
    -730        Ok(())
    -731    }
    -732
    -733    #[test]
    -734    fn test_frame_snapshot() -> Result {
    -735        let client_key = SecretKey::from_bytes(&[42u8; 32]);
    -736        let client_info = ClientInfo {
    -737            version: PROTOCOL_VERSION,
    -738        };
    -739        let message = postcard::to_stdvec(&client_info).context("encode")?;
    -740        let signature = client_key.sign(&message);
    -741
    -742        let frames = vec![
    -743            (
    -744                Frame::ClientInfo {
    -745                    client_public_key: client_key.public(),
    -746                    message: Bytes::from(message),
    -747                    signature,
    -748                },
    -749                "02 52 45 4c 41 59 f0 9f 94 91 19 7f 6b 23 e1 6c
    -750                85 32 c6 ab c8 38 fa cd 5e a7 89 be 0c 76 b2 92
    -751                03 34 03 9b fa 8b 3d 36 8d 61 88 e7 7b 22 f2 92
    -752                ab 37 43 5d a8 de 0b c8 cb 84 e2 88 f4 e7 3b 35
    -753                82 a5 27 31 e9 ff 98 65 46 5c 87 e0 5e 8d 42 7d
    -754                f4 22 bb 6e 85 e1 c0 5f 6f 74 98 37 ba a4 a5 c7
    -755                eb a3 23 0d 77 56 99 10 43 0e 03",
    -756            ),
    -757            (
    -758                Frame::Health {
    -759                    problem: "Hello? Yes this is dog.".into(),
    -760                },
    -761                "0e 48 65 6c 6c 6f 3f 20 59 65 73 20 74 68 69 73
    -762                20 69 73 20 64 6f 67 2e",
    -763            ),
    -764            (Frame::KeepAlive, "06"),
    -765            (Frame::NotePreferred { preferred: true }, "07 01"),
    -766            (
    -767                Frame::NodeGone {
    -768                    node_id: client_key.public(),
    -769                },
    -770                "08 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e
    -771                a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d
    -772                61",
    -773            ),
    -774            (
    -775                Frame::Ping { data: [42u8; 8] },
    -776                "0c 2a 2a 2a 2a 2a 2a 2a 2a",
    -777            ),
    -778            (
    -779                Frame::Pong { data: [42u8; 8] },
    -780                "0d 2a 2a 2a 2a 2a 2a 2a 2a",
    -781            ),
    -782            (
    -783                Frame::RecvPacket {
    -784                    src_key: client_key.public(),
    -785                    content: "Hello World!".into(),
    -786                },
    -787                "05 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e
    -788                a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d
    -789                61 48 65 6c 6c 6f 20 57 6f 72 6c 64 21",
    -790            ),
    -791            (
    -792                Frame::SendPacket {
    -793                    dst_key: client_key.public(),
    -794                    packet: "Goodbye!".into(),
    -795                },
    -796                "04 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e
    -797                a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d
    -798                61 47 6f 6f 64 62 79 65 21",
    -799            ),
    -800            (
    -801                Frame::Restarting {
    -802                    reconnect_in: 10,
    -803                    try_for: 20,
    -804                },
    -805                "0f 00 00 00 0a 00 00 00 14",
    -806            ),
    -807        ];
    -808
    -809        for (frame, expected_hex) in frames {
    -810            let bytes = frame.encode_for_ws_msg();
    -811            let stripped: Vec<u8> = expected_hex
    -812                .chars()
    -813                .filter_map(|s| {
    -814                    if s.is_ascii_whitespace() {
    -815                        None
    -816                    } else {
    -817                        Some(s as u8)
    -818                    }
    -819                })
    -820                .collect();
    -821            let expected_bytes = HEXLOWER.decode(&stripped).unwrap();
    -822            assert_eq!(bytes, expected_bytes);
    -823        }
    -824
    -825        Ok(())
    -826    }
    -827}
    -828
    -829#[cfg(test)]
    -830mod proptests {
    -831    use bytes::BytesMut;
    -832    use proptest::prelude::*;
    -833    use tokio_util::codec::{Decoder, Encoder};
    -834
    -835    use super::*;
    -836
    -837    fn secret_key() -> impl Strategy<Value = SecretKey> {
    -838        prop::array::uniform32(any::<u8>()).prop_map(SecretKey::from)
    -839    }
    -840
    -841    fn key() -> impl Strategy<Value = PublicKey> {
    -842        secret_key().prop_map(|key| key.public())
    -843    }
    -844
    -845    /// Generates random data, up to the maximum packet size minus the given number of bytes
    -846    fn data(consumed: usize) -> impl Strategy<Value = Bytes> {
    -847        let len = MAX_PACKET_SIZE - consumed;
    -848        prop::collection::vec(any::<u8>(), 0..len).prop_map(Bytes::from)
    -849    }
    -850
    -851    /// Generates a random valid frame
    -852    fn frame() -> impl Strategy<Value = Frame> {
    -853        let client_info = (secret_key()).prop_map(|secret_key| {
    -854            let info = ClientInfo {
    -855                version: PROTOCOL_VERSION,
    -856            };
    -857            let msg = postcard::to_stdvec(&info).expect("using default ClientInfo");
    -858            let signature = secret_key.sign(&msg);
    -859            Frame::ClientInfo {
    -860                client_public_key: secret_key.public(),
    -861                message: msg.into(),
    -862                signature,
    -863            }
    -864        });
    -865        let send_packet =
    -866            (key(), data(32)).prop_map(|(dst_key, packet)| Frame::SendPacket { dst_key, packet });
    -867        let recv_packet =
    -868            (key(), data(32)).prop_map(|(src_key, content)| Frame::RecvPacket { src_key, content });
    -869        let keep_alive = Just(Frame::KeepAlive);
    -870        let note_preferred = any::<bool>().prop_map(|preferred| Frame::NotePreferred { preferred });
    -871        let peer_gone = key().prop_map(|peer| Frame::NodeGone { node_id: peer });
    -872        let ping = prop::array::uniform8(any::<u8>()).prop_map(|data| Frame::Ping { data });
    -873        let pong = prop::array::uniform8(any::<u8>()).prop_map(|data| Frame::Pong { data });
    -874        let health = data(0).prop_map(|problem| Frame::Health { problem });
    -875        let restarting =
    -876            (any::<u32>(), any::<u32>()).prop_map(|(reconnect_in, try_for)| Frame::Restarting {
    -877                reconnect_in,
    -878                try_for,
    -879            });
    -880        prop_oneof![
    -881            client_info,
    -882            send_packet,
    -883            recv_packet,
    -884            keep_alive,
    -885            note_preferred,
    -886            peer_gone,
    -887            ping,
    -888            pong,
    -889            health,
    -890            restarting,
    -891        ]
    -892    }
    -893
    -894    fn inject_error(buf: &mut BytesMut) {
    -895        fn is_fixed_size(tpe: FrameType) -> bool {
    -896            match tpe {
    -897                FrameType::KeepAlive
    -898                | FrameType::NotePreferred
    -899                | FrameType::Ping
    -900                | FrameType::Pong
    -901                | FrameType::Restarting
    -902                | FrameType::PeerGone => true,
    -903                FrameType::ClientInfo
    -904                | FrameType::Health
    -905                | FrameType::SendPacket
    -906                | FrameType::RecvPacket
    -907                | FrameType::Unknown => false,
    -908            }
    -909        }
    -910        let tpe: FrameType = buf[0].into();
    -911        let mut len = u32::from_be_bytes(buf[1..5].try_into().unwrap()) as usize;
    -912        if is_fixed_size(tpe) {
    -913            buf.put_u8(0);
    -914            len += 1;
    -915        } else {
    -916            buf.resize(MAX_FRAME_SIZE + 1, 0);
    -917            len = MAX_FRAME_SIZE + 1;
    -918        }
    -919        buf[1..5].copy_from_slice(&u32::to_be_bytes(len as u32));
    -920    }
    -921
    -922    proptest! {
    -923
    -924        // Test that we can roundtrip a frame to bytes
    -925        #[test]
    -926        fn frame_roundtrip(frame in frame()) {
    -927            let mut buf = BytesMut::new();
    -928            let mut codec = RelayCodec::test();
    -929            codec.encode(frame.clone(), &mut buf).unwrap();
    -930            let decoded = codec.decode(&mut buf).unwrap().unwrap();
    -931            prop_assert_eq!(frame, decoded);
    -932        }
    -933
    -934        #[test]
    -935        fn frame_ws_roundtrip(frame in frame()) {
    -936            let encoded = frame.clone().encode_for_ws_msg();
    -937            let decoded = Frame::decode_from_ws_msg(Bytes::from(encoded), &KeyCache::test()).unwrap();
    -938            prop_assert_eq!(frame, decoded);
    -939        }
    -940
    -941        // Test that typical invalid frames will result in an error
    -942        #[test]
    -943        fn broken_frame_handling(frame in frame()) {
    -944            let mut buf = BytesMut::new();
    -945            let mut codec = RelayCodec::test();
    -946            codec.encode(frame.clone(), &mut buf).unwrap();
    -947            inject_error(&mut buf);
    -948            let decoded = codec.decode(&mut buf);
    -949            prop_assert!(decoded.is_err(), "{:?}", decoded);
    -950        }
    -951    }
    -952}
    \ No newline at end of file +693 fn ecn() -> impl Strategy<Value = Option<quinn_proto::EcnCodepoint>> { +694 (0..=3).prop_map(|n| match n { +695 1 => Some(quinn_proto::EcnCodepoint::Ce), +696 2 => Some(quinn_proto::EcnCodepoint::Ect0), +697 3 => Some(quinn_proto::EcnCodepoint::Ect1), +698 _ => None, +699 }) +700 } +701 +702 fn datagrams() -> impl Strategy<Value = Datagrams> { +703 // The max payload size (conservatively, since with segment_size = 0 we'd have slightly more space) +704 const MAX_PAYLOAD_SIZE: usize = MAX_PACKET_SIZE - NodeId::LENGTH - 1 /* ECN bytes */ - 2 /* segment size */; +705 ( +706 ecn(), +707 prop::option::of(MAX_PAYLOAD_SIZE / 20..MAX_PAYLOAD_SIZE), +708 prop::collection::vec(any::<u8>(), 0..MAX_PAYLOAD_SIZE), +709 ) +710 .prop_map(|(ecn, segment_size, data)| Datagrams { +711 ecn, +712 segment_size: segment_size +713 .map(|ss| std::cmp::min(data.len(), ss) as u16) +714 .and_then(NonZeroU16::new), +715 contents: Bytes::from(data), +716 }) +717 } +718 +719 /// Generates a random valid frame +720 fn server_client_frame() -> impl Strategy<Value = RelayToClientMsg> { +721 let recv_packet = (key(), datagrams()).prop_map(|(remote_node_id, datagrams)| { +722 RelayToClientMsg::Datagrams { +723 remote_node_id, +724 datagrams, +725 } +726 }); +727 let node_gone = key().prop_map(RelayToClientMsg::NodeGone); +728 let ping = prop::array::uniform8(any::<u8>()).prop_map(RelayToClientMsg::Ping); +729 let pong = prop::array::uniform8(any::<u8>()).prop_map(RelayToClientMsg::Pong); +730 let health = ".{0,65536}" +731 .prop_filter("exceeds MAX_PACKET_SIZE", |s| { +732 s.len() < MAX_PACKET_SIZE // a single unicode character can match a regex "." but take up multiple bytes +733 }) +734 .prop_map(|problem| RelayToClientMsg::Health { problem }); +735 let restarting = (any::<u32>(), any::<u32>()).prop_map(|(reconnect_in, try_for)| { +736 RelayToClientMsg::Restarting { +737 reconnect_in: Duration::from_millis(reconnect_in.into()), +738 try_for: Duration::from_millis(try_for.into()), +739 } +740 }); +741 prop_oneof![recv_packet, node_gone, ping, pong, health, restarting] +742 } +743 +744 fn client_server_frame() -> impl Strategy<Value = ClientToRelayMsg> { +745 let send_packet = +746 (key(), datagrams()).prop_map(|(dst_node_id, datagrams)| ClientToRelayMsg::Datagrams { +747 dst_node_id, +748 datagrams, +749 }); +750 let ping = prop::array::uniform8(any::<u8>()).prop_map(ClientToRelayMsg::Ping); +751 let pong = prop::array::uniform8(any::<u8>()).prop_map(ClientToRelayMsg::Pong); +752 prop_oneof![send_packet, ping, pong] +753 } +754 +755 proptest! { +756 #[test] +757 fn server_client_frame_roundtrip(frame in server_client_frame()) { +758 let encoded = frame.to_bytes().freeze(); +759 let decoded = RelayToClientMsg::from_bytes(encoded, &KeyCache::test()).unwrap(); +760 prop_assert_eq!(frame, decoded); +761 } +762 +763 #[test] +764 fn client_server_frame_roundtrip(frame in client_server_frame()) { +765 let encoded = frame.to_bytes().freeze(); +766 let decoded = ClientToRelayMsg::from_bytes(encoded, &KeyCache::test()).unwrap(); +767 prop_assert_eq!(frame, decoded); +768 } +769 +770 #[test] +771 fn server_client_frame_encoded_len(frame in server_client_frame()) { +772 let claimed_encoded_len = frame.encoded_len(); +773 let actual_encoded_len = frame.to_bytes().len(); +774 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); +775 } +776 +777 #[test] +778 fn client_server_frame_encoded_len(frame in client_server_frame()) { +779 let claimed_encoded_len = frame.encoded_len(); +780 let actual_encoded_len = frame.to_bytes().len(); +781 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); +782 } +783 +784 #[test] +785 fn datagrams_encoded_len(datagrams in datagrams()) { +786 let claimed_encoded_len = datagrams.encoded_len(); +787 let actual_encoded_len = datagrams.write_to(Vec::new()).len(); +788 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); +789 } +790 } +791}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/protos/streams.rs.html b/pr/3367/docs/src/iroh_relay/protos/streams.rs.html new file mode 100644 index 0000000000..ad4fa8c170 --- /dev/null +++ b/pr/3367/docs/src/iroh_relay/protos/streams.rs.html @@ -0,0 +1,166 @@ +streams.rs - source

    iroh_relay/protos/
    streams.rs

    1//! Implements logic for abstracting over a websocket stream that allows sending only [`Bytes`]-based
    +2//! messages.
    +3use std::{
    +4    pin::Pin,
    +5    task::{Context, Poll},
    +6};
    +7
    +8use bytes::Bytes;
    +9use n0_future::{Sink, Stream, ready};
    +10#[cfg(not(wasm_browser))]
    +11use tokio::io::{AsyncRead, AsyncWrite};
    +12use tracing::warn;
    +13
    +14use crate::ExportKeyingMaterial;
    +15
    +16#[cfg(not(wasm_browser))]
    +17#[derive(derive_more::Debug)]
    +18pub(crate) struct WsBytesFramed<T> {
    +19    #[debug("WebSocketStream<T>")]
    +20    pub(crate) io: tokio_websockets::WebSocketStream<T>,
    +21}
    +22
    +23#[cfg(wasm_browser)]
    +24#[derive(derive_more::Debug)]
    +25pub(crate) struct WsBytesFramed {
    +26    #[debug("WebSocketStream")]
    +27    pub(crate) io: ws_stream_wasm::WsStream,
    +28}
    +29
    +30#[cfg(not(wasm_browser))]
    +31pub(crate) type StreamError = tokio_websockets::Error;
    +32
    +33#[cfg(wasm_browser)]
    +34pub(crate) type StreamError = ws_stream_wasm::WsErr;
    +35
    +36/// Shorthand for a type that implements both a websocket-based stream & sink for [`Bytes`].
    +37pub(crate) trait BytesStreamSink:
    +38    Stream<Item = Result<Bytes, StreamError>> + Sink<Bytes, Error = StreamError> + Unpin
    +39{
    +40}
    +41
    +42impl<T> BytesStreamSink for T where
    +43    T: Stream<Item = Result<Bytes, StreamError>> + Sink<Bytes, Error = StreamError> + Unpin
    +44{
    +45}
    +46
    +47#[cfg(not(wasm_browser))]
    +48impl<IO: ExportKeyingMaterial + AsyncRead + AsyncWrite + Unpin> ExportKeyingMaterial
    +49    for WsBytesFramed<IO>
    +50{
    +51    fn export_keying_material<T: AsMut<[u8]>>(
    +52        &self,
    +53        output: T,
    +54        label: &[u8],
    +55        context: Option<&[u8]>,
    +56    ) -> Option<T> {
    +57        self.io
    +58            .get_ref()
    +59            .export_keying_material(output, label, context)
    +60    }
    +61}
    +62
    +63#[cfg(wasm_browser)]
    +64impl ExportKeyingMaterial for WsBytesFramed {
    +65    fn export_keying_material<T: AsMut<[u8]>>(
    +66        &self,
    +67        _output: T,
    +68        _label: &[u8],
    +69        _context: Option<&[u8]>,
    +70    ) -> Option<T> {
    +71        None
    +72    }
    +73}
    +74
    +75#[cfg(not(wasm_browser))]
    +76impl<T: AsyncRead + AsyncWrite + Unpin> Stream for WsBytesFramed<T> {
    +77    type Item = Result<Bytes, StreamError>;
    +78
    +79    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    +80        loop {
    +81            match ready!(Pin::new(&mut self.io).poll_next(cx)) {
    +82                None => return Poll::Ready(None),
    +83                Some(Err(e)) => return Poll::Ready(Some(Err(e))),
    +84                Some(Ok(msg)) => {
    +85                    if msg.is_close() {
    +86                        // Indicate the stream is done when we receive a close message.
    +87                        // Note: We don't have to poll the stream to completion for it to close gracefully.
    +88                        return Poll::Ready(None);
    +89                    }
    +90                    if msg.is_ping() || msg.is_pong() {
    +91                        continue; // Responding appropriately to these is done inside of tokio_websockets/browser impls
    +92                    }
    +93                    if !msg.is_binary() {
    +94                        warn!(?msg, "Got websocket message of unsupported type, skipping.");
    +95                        continue;
    +96                    }
    +97                    return Poll::Ready(Some(Ok(msg.into_payload().into())));
    +98                }
    +99            }
    +100        }
    +101    }
    +102}
    +103
    +104#[cfg(wasm_browser)]
    +105impl Stream for WsBytesFramed {
    +106    type Item = Result<Bytes, StreamError>;
    +107
    +108    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    +109        loop {
    +110            match ready!(Pin::new(&mut self.io).poll_next(cx)) {
    +111                None => return Poll::Ready(None),
    +112                Some(ws_stream_wasm::WsMessage::Binary(msg)) => {
    +113                    return Poll::Ready(Some(Ok(msg.into())));
    +114                }
    +115                Some(msg) => {
    +116                    warn!(?msg, "Got websocket message of unsupported type, skipping.");
    +117                    continue;
    +118                }
    +119            }
    +120        }
    +121    }
    +122}
    +123
    +124#[cfg(not(wasm_browser))]
    +125impl<T: AsyncRead + AsyncWrite + Unpin> Sink<Bytes> for WsBytesFramed<T> {
    +126    type Error = StreamError;
    +127
    +128    fn start_send(mut self: Pin<&mut Self>, bytes: Bytes) -> Result<(), Self::Error> {
    +129        let msg = tokio_websockets::Message::binary(tokio_websockets::Payload::from(bytes));
    +130        Pin::new(&mut self.io).start_send(msg)
    +131    }
    +132
    +133    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +134        Pin::new(&mut self.io).poll_ready(cx).map_err(Into::into)
    +135    }
    +136
    +137    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +138        Pin::new(&mut self.io).poll_flush(cx).map_err(Into::into)
    +139    }
    +140
    +141    fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +142        Pin::new(&mut self.io).poll_close(cx).map_err(Into::into)
    +143    }
    +144}
    +145
    +146#[cfg(wasm_browser)]
    +147impl Sink<Bytes> for WsBytesFramed {
    +148    type Error = StreamError;
    +149
    +150    fn start_send(mut self: Pin<&mut Self>, bytes: Bytes) -> Result<(), Self::Error> {
    +151        let msg = ws_stream_wasm::WsMessage::Binary(Vec::from(bytes));
    +152        Pin::new(&mut self.io).start_send(msg).map_err(Into::into)
    +153    }
    +154
    +155    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +156        Pin::new(&mut self.io).poll_ready(cx).map_err(Into::into)
    +157    }
    +158
    +159    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +160        Pin::new(&mut self.io).poll_flush(cx).map_err(Into::into)
    +161    }
    +162
    +163    fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +164        Pin::new(&mut self.io).poll_close(cx).map_err(Into::into)
    +165    }
    +166}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/quic.rs.html b/pr/3367/docs/src/iroh_relay/quic.rs.html index bc1a7b4526..8b7aa754b0 100644 --- a/pr/3367/docs/src/iroh_relay/quic.rs.html +++ b/pr/3367/docs/src/iroh_relay/quic.rs.html @@ -1,10 +1,10 @@ -quic.rs - source

    iroh_relay/
    quic.rs

    1//! Create a QUIC server that accepts connections
    +quic.rs - source

    iroh_relay/
    quic.rs

    1//! Create a QUIC server that accepts connections
     2//! for QUIC address discovery.
     3use std::{net::SocketAddr, sync::Arc};
     4
     5use n0_future::time::Duration;
     6use nested_enum_utils::common_fields;
    -7use quinn::{crypto::rustls::QuicClientConfig, VarInt};
    +7use quinn::{VarInt, crypto::rustls::QuicClientConfig};
     8use snafu::{Backtrace, Snafu};
     9use tokio::sync::watch;
     10
    @@ -18,13 +18,13 @@
     18#[cfg(feature = "server")]
     19pub(crate) mod server {
     20    use quinn::{
    -21        crypto::rustls::{NoInitialCipherSuite, QuicServerConfig},
    -22        ApplicationClose, ConnectionError,
    +21        ApplicationClose, ConnectionError,
    +22        crypto::rustls::{NoInitialCipherSuite, QuicServerConfig},
     23    };
     24    use snafu::ResultExt;
     25    use tokio::task::JoinSet;
     26    use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle};
    -27    use tracing::{debug, info, info_span, Instrument};
    +27    use tracing::{Instrument, debug, info, info_span};
     28
     29    use super::*;
     30    pub use crate::server::QuicConfig;
    @@ -297,7 +297,7 @@
     297    /// and estimated latency of the connection.
     298    ///
     299    /// Consumes and gracefully closes the connection.
    -300    #[cfg(test)]
    +300    #[cfg(all(test, feature = "server"))]
     301    async fn get_addr_and_latency(
     302        &self,
     303        server_addr: SocketAddr,
    @@ -364,18 +364,18 @@
     364    };
     365    use n0_snafu::{Error, Result, ResultExt};
     366    use quinn::crypto::rustls::QuicServerConfig;
    -367    use tracing::{debug, info, info_span, Instrument};
    +367    use tracing::{Instrument, debug, info, info_span};
     368    use tracing_test::traced_test;
     369    use webpki_types::PrivatePkcs8KeyDer;
     370
    -371    use super::{
    -372        server::{QuicConfig, QuicServer},
    -373        *,
    -374    };
    -375
    -376    #[tokio::test]
    -377    #[traced_test]
    -378    async fn quic_endpoint_basic() -> Result {
    +371    use super::*;
    +372
    +373    #[tokio::test]
    +374    #[traced_test]
    +375    #[cfg(feature = "test-utils")]
    +376    async fn quic_endpoint_basic() -> Result {
    +377        use super::server::{QuicConfig, QuicServer};
    +378
     379        let host: Ipv4Addr = "127.0.0.1".parse().unwrap();
     380        // create a server config with self signed certificates
     381        let (_, server_config) = super::super::server::testing::self_signed_tls_certs_and_config();
    @@ -472,7 +472,7 @@
     472        // Create a QAD server with a self-signed cert, all manually.
     473        let cert =
     474            rcgen::generate_simple_self_signed(vec!["localhost".into()]).context("self signed")?;
    -475        let key = PrivatePkcs8KeyDer::from(cert.key_pair.serialize_der());
    +475        let key = PrivatePkcs8KeyDer::from(cert.signing_key.serialize_der());
     476        let mut server_crypto = rustls::ServerConfig::builder()
     477            .with_no_client_auth()
     478            .with_single_cert(vec![cert.cert.into()], key.into())
    diff --git a/pr/3367/docs/src/iroh_relay/relay_map.rs.html b/pr/3367/docs/src/iroh_relay/relay_map.rs.html
    index 4005097c2d..89b3727315 100644
    --- a/pr/3367/docs/src/iroh_relay/relay_map.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/relay_map.rs.html
    @@ -1,4 +1,4 @@
    -relay_map.rs - source

    iroh_relay/
    relay_map.rs

    1//! based on tailscale/tailcfg/derpmap.go
    +relay_map.rs - source

    iroh_relay/
    relay_map.rs

    1//! based on tailscale/tailcfg/derpmap.go
     2
     3use std::{collections::BTreeMap, fmt, sync::Arc};
     4
    diff --git a/pr/3367/docs/src/iroh_relay/server.rs.html b/pr/3367/docs/src/iroh_relay/server.rs.html
    index 0e026588bc..880bf1e345 100644
    --- a/pr/3367/docs/src/iroh_relay/server.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/server.rs.html
    @@ -1,4 +1,4 @@
    -server.rs - source

    iroh_relay/
    server.rs

    1//! A fully-fledged iroh-relay server over HTTP or HTTPS.
    +server.rs - source

    iroh_relay/
    server.rs

    1//! A fully-fledged iroh-relay server over HTTP or HTTPS.
     2//!
     3//! This module provides an API to run a full fledged iroh-relay server.  It is primarily
     4//! used by the `iroh-relay` binary in this crate.  It can be used to run a relay server in
    @@ -19,14 +19,14 @@
     19
     20use derive_more::Debug;
     21use http::{
    -22    header::InvalidHeaderValue, response::Builder as ResponseBuilder, HeaderMap, Method, Request,
    -23    Response, StatusCode,
    +22    HeaderMap, HeaderValue, Method, Request, Response, StatusCode, header::InvalidHeaderValue,
    +23    response::Builder as ResponseBuilder,
     24};
     25use hyper::body::Incoming;
     26use iroh_base::NodeId;
     27#[cfg(feature = "test-utils")]
     28use iroh_base::RelayUrl;
    -29use n0_future::{future::Boxed, StreamExt};
    +29use n0_future::{StreamExt, future::Boxed};
     30use nested_enum_utils::common_fields;
     31use snafu::{Backtrace, ResultExt, Snafu};
     32use tokio::{
    @@ -34,7 +34,7 @@
     34    task::{JoinError, JoinSet},
     35};
     36use tokio_util::task::AbortOnDropHandle;
    -37use tracing::{debug, error, info, info_span, instrument, Instrument};
    +37use tracing::{Instrument, debug, error, info, info_span, instrument};
     38
     39use crate::{
     40    defaults::DEFAULT_KEY_CACHE_CAPACITY,
    @@ -53,1143 +53,1028 @@
     53
     54pub use self::{
     55    metrics::{Metrics, RelayMetrics},
    -56    resolver::{ReloadingResolver, DEFAULT_CERT_RELOAD_INTERVAL},
    +56    resolver::{DEFAULT_CERT_RELOAD_INTERVAL, ReloadingResolver},
     57};
     58
    -59const NO_CONTENT_CHALLENGE_HEADER: &str = "X-Tailscale-Challenge";
    -60const NO_CONTENT_RESPONSE_HEADER: &str = "X-Tailscale-Response";
    -61const NOTFOUND: &[u8] = b"Not Found";
    -62const ROBOTS_TXT: &[u8] = b"User-agent: *\nDisallow: /\n";
    -63const INDEX: &[u8] = br#"<html><body>
    -64<h1>Iroh Relay</h1>
    -65<p>
    -66  This is an <a href="https://iroh.computer/">Iroh</a> Relay server.
    -67</p>
    -68"#;
    -69const TLS_HEADERS: [(&str, &str); 2] = [
    -70    (
    -71        "Strict-Transport-Security",
    -72        "max-age=63072000; includeSubDomains",
    -73    ),
    -74    (
    -75        "Content-Security-Policy",
    -76        "default-src 'none'; frame-ancestors 'none'; form-action 'none'; base-uri 'self'; block-all-mixed-content; plugin-types 'none'",
    -77    ),
    -78];
    -79
    -80type BytesBody = http_body_util::Full<hyper::body::Bytes>;
    -81type HyperError = Box<dyn std::error::Error + Send + Sync>;
    -82type HyperResult<T> = std::result::Result<T, HyperError>;
    -83
    -84/// Creates a new [`BytesBody`] with no content.
    -85fn body_empty() -> BytesBody {
    -86    http_body_util::Full::new(hyper::body::Bytes::new())
    -87}
    -88
    -89/// Configuration for the full Relay.
    -90///
    -91/// Be aware the generic parameters are for when using the Let's Encrypt TLS configuration.
    -92/// If not used dummy ones need to be provided, e.g. `ServerConfig::<(), ()>::default()`.
    -93#[derive(Debug, Default)]
    -94pub struct ServerConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    -95    /// Configuration for the Relay server, disabled if `None`.
    -96    pub relay: Option<RelayConfig<EC, EA>>,
    -97    /// Configuration for the QUIC server, disabled if `None`.
    -98    pub quic: Option<QuicConfig>,
    -99    /// Socket to serve metrics on.
    -100    #[cfg(feature = "metrics")]
    -101    pub metrics_addr: Option<SocketAddr>,
    -102}
    -103
    -104/// Configuration for the Relay HTTP and HTTPS server.
    -105///
    -106/// This includes the HTTP services hosted by the Relay server, the Relay `/relay` HTTP
    -107/// endpoint is only one of the services served.
    -108#[derive(Debug)]
    -109pub struct RelayConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    -110    /// The socket address on which the Relay HTTP server should bind.
    -111    ///
    -112    /// Normally you'd choose port `80`.  The bind address for the HTTPS server is
    -113    /// configured in [`RelayConfig::tls`].
    +59// TODO: remove before 1.0
    +60const NO_CONTENT_CHALLENGE_HEADER_LEGACY: &str = "X-Tailscale-Challenge";
    +61const NO_CONTENT_CHALLENGE_HEADER: &str = "X-Iroh-Challenge";
    +62const NO_CONTENT_RESPONSE_HEADER_LEGACY: &str = "X-Tailscale-Response";
    +63const NO_CONTENT_RESPONSE_HEADER: &str = "X-Iroh-Response";
    +64const NOTFOUND: &[u8] = b"Not Found";
    +65const ROBOTS_TXT: &[u8] = b"User-agent: *\nDisallow: /\n";
    +66const INDEX: &[u8] = br#"<html><body>
    +67<h1>Iroh Relay</h1>
    +68<p>
    +69  This is an <a href="https://iroh.computer/">Iroh</a> Relay server.
    +70</p>
    +71"#;
    +72const TLS_HEADERS: [(&str, &str); 2] = [
    +73    (
    +74        "Strict-Transport-Security",
    +75        "max-age=63072000; includeSubDomains",
    +76    ),
    +77    (
    +78        "Content-Security-Policy",
    +79        "default-src 'none'; frame-ancestors 'none'; form-action 'none'; base-uri 'self'; block-all-mixed-content; plugin-types 'none'",
    +80    ),
    +81];
    +82
    +83type BytesBody = http_body_util::Full<hyper::body::Bytes>;
    +84type HyperError = Box<dyn std::error::Error + Send + Sync>;
    +85type HyperResult<T> = std::result::Result<T, HyperError>;
    +86
    +87/// Creates a new [`BytesBody`] with no content.
    +88fn body_empty() -> BytesBody {
    +89    http_body_util::Full::new(hyper::body::Bytes::new())
    +90}
    +91
    +92/// Configuration for the full Relay.
    +93///
    +94/// Be aware the generic parameters are for when using the Let's Encrypt TLS configuration.
    +95/// If not used dummy ones need to be provided, e.g. `ServerConfig::<(), ()>::default()`.
    +96#[derive(Debug, Default)]
    +97pub struct ServerConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    +98    /// Configuration for the Relay server, disabled if `None`.
    +99    pub relay: Option<RelayConfig<EC, EA>>,
    +100    /// Configuration for the QUIC server, disabled if `None`.
    +101    pub quic: Option<QuicConfig>,
    +102    /// Socket to serve metrics on.
    +103    #[cfg(feature = "metrics")]
    +104    pub metrics_addr: Option<SocketAddr>,
    +105}
    +106
    +107/// Configuration for the Relay HTTP and HTTPS server.
    +108///
    +109/// This includes the HTTP services hosted by the Relay server, the Relay `/relay` HTTP
    +110/// endpoint is only one of the services served.
    +111#[derive(Debug)]
    +112pub struct RelayConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    +113    /// The socket address on which the Relay HTTP server should bind.
     114    ///
    -115    /// If [`RelayConfig::tls`] is `None` then this serves all the HTTP services without
    -116    /// TLS.
    -117    pub http_bind_addr: SocketAddr,
    -118    /// TLS configuration for the HTTPS server.
    -119    ///
    -120    /// If *None* all the HTTP services that would be served here are served from
    -121    /// [`RelayConfig::http_bind_addr`].
    -122    pub tls: Option<TlsConfig<EC, EA>>,
    -123    /// Rate limits.
    -124    pub limits: Limits,
    -125    /// Key cache capacity.
    -126    pub key_cache_capacity: Option<usize>,
    -127    /// Access configuration.
    -128    pub access: AccessConfig,
    -129}
    -130
    -131/// Controls which nodes are allowed to use the relay.
    -132#[derive(derive_more::Debug)]
    -133pub enum AccessConfig {
    -134    /// Everyone
    -135    Everyone,
    -136    /// Only nodes for which the function returns `Access::Allow`.
    -137    #[debug("restricted")]
    -138    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
    -139}
    -140
    -141impl AccessConfig {
    -142    /// Is this node allowed?
    -143    pub async fn is_allowed(&self, node: NodeId) -> bool {
    -144        match self {
    -145            Self::Everyone => true,
    -146            Self::Restricted(check) => {
    -147                let res = check(node).await;
    -148                matches!(res, Access::Allow)
    -149            }
    -150        }
    -151    }
    -152}
    -153
    -154/// Access restriction for a node.
    -155#[derive(Debug, Copy, Clone, PartialEq, Eq)]
    -156pub enum Access {
    -157    /// Access is allowed.
    -158    Allow,
    -159    /// Access is denied.
    -160    Deny,
    -161}
    -162
    -163/// Configuration for the QUIC server.
    -164#[derive(Debug)]
    -165pub struct QuicConfig {
    -166    /// The socket address on which the QUIC server should bind.
    -167    ///
    -168    /// Normally you'd chose port `7842`, see [`crate::defaults::DEFAULT_RELAY_QUIC_PORT`].
    -169    pub bind_addr: SocketAddr,
    -170    /// The TLS server configuration for the QUIC server.
    -171    ///
    -172    /// If this [`rustls::ServerConfig`] does not support TLS 1.3, the QUIC server will fail
    -173    /// to spawn.
    -174    pub server_config: rustls::ServerConfig,
    -175}
    -176
    -177/// TLS configuration for Relay server.
    -178///
    -179/// Normally the Relay server accepts connections on both HTTPS and HTTP.
    -180#[derive(Debug)]
    -181pub struct TlsConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    -182    /// The socket address on which to serve the HTTPS server.
    -183    ///
    -184    /// Since the captive portal probe has to run over plain text HTTP and TLS is used for
    -185    /// the main relay server this has to be on a different port.  When TLS is not enabled
    -186    /// this is served on the [`RelayConfig::http_bind_addr`] socket address.
    -187    ///
    -188    /// Normally you'd choose port `80`.
    -189    pub https_bind_addr: SocketAddr,
    -190    /// The socket address on which to server the QUIC server is QUIC is enabled.
    -191    pub quic_bind_addr: SocketAddr,
    -192    /// Mode for getting a cert.
    -193    pub cert: CertConfig<EC, EA>,
    -194    /// The server configuration.
    -195    pub server_config: rustls::ServerConfig,
    -196}
    -197
    -198/// Rate limits.
    -199// TODO: accept_conn_limit and accept_conn_burst are not currently implemented.
    -200#[derive(Debug, Default)]
    -201pub struct Limits {
    -202    /// Rate limit for accepting new connection. Unlimited if not set.
    -203    pub accept_conn_limit: Option<f64>,
    -204    /// Burst limit for accepting new connection. Unlimited if not set.
    -205    pub accept_conn_burst: Option<usize>,
    -206    /// Rate limits for incoming traffic from a client connection.
    -207    pub client_rx: Option<ClientRateLimit>,
    -208}
    -209
    -210/// Per-client rate limit configuration.
    -211#[derive(Debug, Copy, Clone)]
    -212pub struct ClientRateLimit {
    -213    /// Max number of bytes per second to read from the client connection.
    -214    pub bytes_per_second: NonZeroU32,
    -215    /// Max number of bytes to read in a single burst.
    -216    pub max_burst_bytes: Option<NonZeroU32>,
    -217}
    -218
    -219/// TLS certificate configuration.
    -220#[derive(derive_more::Debug)]
    -221pub enum CertConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    -222    /// Use Let's Encrypt.
    -223    LetsEncrypt {
    -224        /// State for Let's Encrypt certificates.
    -225        #[debug("AcmeConfig")]
    -226        state: tokio_rustls_acme::AcmeState<EC, EA>,
    -227    },
    -228    /// Use a static TLS key and certificate chain.
    -229    Manual {
    -230        /// The TLS certificate chain.
    -231        certs: Vec<rustls::pki_types::CertificateDer<'static>>,
    -232    },
    -233    /// Use a TLS key and certificate chain that can be reloaded.
    -234    Reloading,
    -235}
    -236
    -237/// A running Relay + QAD server.
    -238///
    -239/// This is a full Relay server, including QAD, Relay and various associated HTTP services.
    -240///
    -241/// Dropping this will stop the server.
    -242#[derive(Debug)]
    -243pub struct Server {
    -244    /// The address of the HTTP server, if configured.
    -245    http_addr: Option<SocketAddr>,
    -246    /// The address of the HTTPS server, if the relay server is using TLS.
    -247    ///
    -248    /// If the Relay server is not using TLS then it is served from the
    -249    /// [`Server::http_addr`].
    -250    https_addr: Option<SocketAddr>,
    -251    /// The address of the QUIC server, if configured.
    -252    quic_addr: Option<SocketAddr>,
    -253    /// Handle to the relay server.
    -254    relay_handle: Option<http_server::ServerHandle>,
    -255    /// Handle to the quic server.
    -256    quic_handle: Option<QuicServerHandle>,
    -257    /// The main task running the server.
    -258    supervisor: AbortOnDropHandle<Result<(), SupervisorError>>,
    -259    /// The certificate for the server.
    -260    ///
    -261    /// If the server has manual certificates configured the certificate chain will be
    -262    /// available here, this can be used by a client to authenticate the server.
    -263    certificates: Option<Vec<rustls::pki_types::CertificateDer<'static>>>,
    -264    metrics: RelayMetrics,
    -265}
    -266
    -267/// Server spawn errors
    -268#[common_fields({
    -269    backtrace: Option<Backtrace>,
    -270    #[snafu(implicit)]
    -271    span_trace: n0_snafu::SpanTrace,
    -272})]
    -273#[allow(missing_docs)]
    -274#[derive(Debug, Snafu)]
    -275#[non_exhaustive]
    -276pub enum SpawnError {
    -277    #[snafu(display("Unable to get local address"))]
    -278    LocalAddr { source: std::io::Error },
    -279    #[snafu(display("Failed to bind QAD listener"))]
    -280    QuicSpawn { source: QuicSpawnError },
    -281    #[snafu(display("Failed to parse TLS header"))]
    -282    TlsHeaderParse { source: InvalidHeaderValue },
    -283    #[snafu(display("Failed to bind TcpListener"))]
    -284    BindTlsListener { source: std::io::Error },
    -285    #[snafu(display("No local address"))]
    -286    NoLocalAddr { source: std::io::Error },
    -287    #[snafu(display("Failed to bind server socket to {addr}"))]
    -288    BindTcpListener { addr: SocketAddr },
    -289}
    -290
    -291/// Server task errors
    -292#[common_fields({
    -293    backtrace: Option<snafu::Backtrace>,
    -294    #[snafu(implicit)]
    -295    span_trace: n0_snafu::SpanTrace,
    -296})]
    -297#[allow(missing_docs)]
    -298#[derive(Debug, Snafu)]
    -299#[non_exhaustive]
    -300pub enum SupervisorError {
    -301    #[snafu(display("Error starting metrics server"))]
    -302    Metrics { source: std::io::Error },
    -303    #[snafu(display("Acme event stream finished"))]
    -304    AcmeEventStreamFinished {},
    -305    #[snafu(transparent)]
    -306    JoinError { source: JoinError },
    -307    #[snafu(display("No relay services are enabled"))]
    -308    NoRelayServicesEnabled {},
    -309    #[snafu(display("Task cancelled"))]
    -310    TaskCancelled {},
    -311}
    -312
    -313impl Server {
    -314    /// Starts the server.
    -315    pub async fn spawn<EC, EA>(config: ServerConfig<EC, EA>) -> Result<Self, SpawnError>
    -316    where
    -317        EC: fmt::Debug + 'static,
    -318        EA: fmt::Debug + 'static,
    -319    {
    -320        let mut tasks = JoinSet::new();
    -321
    -322        let metrics = RelayMetrics::default();
    -323
    -324        #[cfg(feature = "metrics")]
    -325        if let Some(addr) = config.metrics_addr {
    -326            debug!("Starting metrics server");
    -327            let mut registry = iroh_metrics::Registry::default();
    -328            registry.register_all(&metrics);
    -329            tasks.spawn(
    -330                async move {
    -331                    iroh_metrics::service::start_metrics_server(addr, Arc::new(registry))
    -332                        .await
    -333                        .context(MetricsSnafu)
    -334                }
    -335                .instrument(info_span!("metrics-server")),
    -336            );
    -337        }
    -338
    -339        // Start the Relay server, but first clone the certs out.
    -340        let certificates = config.relay.as_ref().and_then(|relay| {
    -341            relay.tls.as_ref().and_then(|tls| match tls.cert {
    -342                CertConfig::LetsEncrypt { .. } => None,
    -343                CertConfig::Manual { ref certs, .. } => Some(certs.clone()),
    -344                CertConfig::Reloading => None,
    -345            })
    -346        });
    -347
    -348        let quic_server = match config.quic {
    -349            Some(quic_config) => {
    -350                debug!("Starting QUIC server {}", quic_config.bind_addr);
    -351                Some(QuicServer::spawn(quic_config).context(QuicSpawnSnafu)?)
    -352            }
    -353            None => None,
    -354        };
    -355        let quic_addr = quic_server.as_ref().map(|srv| srv.bind_addr());
    -356        let quic_handle = quic_server.as_ref().map(|srv| srv.handle());
    -357
    -358        let (relay_server, http_addr) = match config.relay {
    -359            Some(relay_config) => {
    -360                debug!("Starting Relay server");
    -361                let mut headers = HeaderMap::new();
    -362                for (name, value) in TLS_HEADERS.iter() {
    -363                    headers.insert(*name, value.parse().context(TlsHeaderParseSnafu)?);
    -364                }
    -365                let relay_bind_addr = match relay_config.tls {
    -366                    Some(ref tls) => tls.https_bind_addr,
    -367                    None => relay_config.http_bind_addr,
    -368                };
    -369                let key_cache_capacity = relay_config
    -370                    .key_cache_capacity
    -371                    .unwrap_or(DEFAULT_KEY_CACHE_CAPACITY);
    -372                let mut builder = http_server::ServerBuilder::new(relay_bind_addr)
    -373                    .metrics(metrics.server.clone())
    -374                    .headers(headers)
    -375                    .key_cache_capacity(key_cache_capacity)
    -376                    .access(relay_config.access)
    -377                    .request_handler(Method::GET, "/", Box::new(root_handler))
    -378                    .request_handler(Method::GET, "/index.html", Box::new(root_handler))
    -379                    .request_handler(Method::GET, RELAY_PROBE_PATH, Box::new(probe_handler))
    -380                    .request_handler(Method::GET, "/robots.txt", Box::new(robots_handler));
    -381                if let Some(cfg) = relay_config.limits.client_rx {
    -382                    builder = builder.client_rx_ratelimit(cfg);
    -383                }
    -384                let http_addr = match relay_config.tls {
    -385                    Some(tls_config) => {
    -386                        let server_tls_config = match tls_config.cert {
    -387                            CertConfig::LetsEncrypt { mut state } => {
    -388                                let acceptor =
    -389                                    http_server::TlsAcceptor::LetsEncrypt(state.acceptor());
    -390                                tasks.spawn(
    -391                                    async move {
    -392                                        while let Some(event) = state.next().await {
    -393                                            match event {
    -394                                                Ok(ok) => debug!("acme event: {ok:?}"),
    -395                                                Err(err) => error!("error: {err:?}"),
    -396                                            }
    -397                                        }
    -398                                        Err(AcmeEventStreamFinishedSnafu.build())
    -399                                    }
    -400                                    .instrument(info_span!("acme")),
    -401                                );
    -402                                Some(http_server::TlsConfig {
    -403                                    config: Arc::new(tls_config.server_config),
    -404                                    acceptor,
    -405                                })
    -406                            }
    -407                            CertConfig::Manual { .. } | CertConfig::Reloading => {
    -408                                let server_config = Arc::new(tls_config.server_config);
    -409                                let acceptor =
    -410                                    tokio_rustls::TlsAcceptor::from(server_config.clone());
    -411                                let acceptor = http_server::TlsAcceptor::Manual(acceptor);
    -412                                Some(http_server::TlsConfig {
    -413                                    config: server_config,
    -414                                    acceptor,
    -415                                })
    -416                            }
    -417                        };
    -418                        builder = builder.tls_config(server_tls_config);
    -419
    -420                        // Some services always need to be served over HTTP without TLS.  Run
    -421                        // these standalone.
    -422                        let http_listener = TcpListener::bind(&relay_config.http_bind_addr)
    -423                            .await
    -424                            .context(BindTlsListenerSnafu)?;
    -425                        let http_addr = http_listener.local_addr().context(NoLocalAddrSnafu)?;
    -426                        tasks.spawn(
    -427                            async move {
    -428                                run_captive_portal_service(http_listener).await;
    -429                                Ok(())
    -430                            }
    -431                            .instrument(info_span!("http-service", addr = %http_addr)),
    -432                        );
    -433                        Some(http_addr)
    -434                    }
    -435                    None => {
    -436                        // If running Relay without TLS add the plain HTTP server directly
    -437                        // to the Relay server.
    -438                        builder = builder.request_handler(
    -439                            Method::GET,
    -440                            "/generate_204",
    -441                            Box::new(serve_no_content_handler),
    -442                        );
    -443                        None
    -444                    }
    -445                };
    -446                let relay_server = builder.spawn().await?;
    -447                (Some(relay_server), http_addr)
    -448            }
    -449            None => (None, None),
    -450        };
    -451        // If http_addr is Some then relay_server is serving HTTPS.  If http_addr is None
    -452        // relay_server is serving HTTP, including the /generate_204 service.
    -453        let relay_addr = relay_server.as_ref().map(|srv| srv.addr());
    -454        let relay_handle = relay_server.as_ref().map(|srv| srv.handle());
    -455        let task = tokio::spawn(relay_supervisor(tasks, relay_server, quic_server));
    -456
    -457        Ok(Self {
    -458            http_addr: http_addr.or(relay_addr),
    -459            https_addr: http_addr.and(relay_addr),
    -460            quic_addr,
    -461            relay_handle,
    -462            quic_handle,
    -463            supervisor: AbortOnDropHandle::new(task),
    -464            certificates,
    -465            metrics,
    -466        })
    -467    }
    -468
    -469    /// Requests graceful shutdown.
    -470    ///
    -471    /// Returns once all server tasks have stopped.
    -472    pub async fn shutdown(self) -> Result<(), SupervisorError> {
    -473        // Only the Relay server and QUIC server need shutting down, the supervisor will abort the tasks in
    -474        // the JoinSet when the server terminates.
    -475        if let Some(handle) = self.relay_handle {
    -476            handle.shutdown();
    -477        }
    -478        if let Some(handle) = self.quic_handle {
    +115    /// Normally you'd choose port `80`.  The bind address for the HTTPS server is
    +116    /// configured in [`RelayConfig::tls`].
    +117    ///
    +118    /// If [`RelayConfig::tls`] is `None` then this serves all the HTTP services without
    +119    /// TLS.
    +120    pub http_bind_addr: SocketAddr,
    +121    /// TLS configuration for the HTTPS server.
    +122    ///
    +123    /// If *None* all the HTTP services that would be served here are served from
    +124    /// [`RelayConfig::http_bind_addr`].
    +125    pub tls: Option<TlsConfig<EC, EA>>,
    +126    /// Rate limits.
    +127    pub limits: Limits,
    +128    /// Key cache capacity.
    +129    pub key_cache_capacity: Option<usize>,
    +130    /// Access configuration.
    +131    pub access: AccessConfig,
    +132}
    +133
    +134/// Controls which nodes are allowed to use the relay.
    +135#[derive(derive_more::Debug)]
    +136pub enum AccessConfig {
    +137    /// Everyone
    +138    Everyone,
    +139    /// Only nodes for which the function returns `Access::Allow`.
    +140    #[debug("restricted")]
    +141    Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
    +142}
    +143
    +144impl AccessConfig {
    +145    /// Is this node allowed?
    +146    pub async fn is_allowed(&self, node: NodeId) -> bool {
    +147        match self {
    +148            Self::Everyone => true,
    +149            Self::Restricted(check) => {
    +150                let res = check(node).await;
    +151                matches!(res, Access::Allow)
    +152            }
    +153        }
    +154    }
    +155}
    +156
    +157/// Access restriction for a node.
    +158#[derive(Debug, Copy, Clone, PartialEq, Eq)]
    +159pub enum Access {
    +160    /// Access is allowed.
    +161    Allow,
    +162    /// Access is denied.
    +163    Deny,
    +164}
    +165
    +166/// Configuration for the QUIC server.
    +167#[derive(Debug)]
    +168pub struct QuicConfig {
    +169    /// The socket address on which the QUIC server should bind.
    +170    ///
    +171    /// Normally you'd chose port `7842`, see [`crate::defaults::DEFAULT_RELAY_QUIC_PORT`].
    +172    pub bind_addr: SocketAddr,
    +173    /// The TLS server configuration for the QUIC server.
    +174    ///
    +175    /// If this [`rustls::ServerConfig`] does not support TLS 1.3, the QUIC server will fail
    +176    /// to spawn.
    +177    pub server_config: rustls::ServerConfig,
    +178}
    +179
    +180/// TLS configuration for Relay server.
    +181///
    +182/// Normally the Relay server accepts connections on both HTTPS and HTTP.
    +183#[derive(Debug)]
    +184pub struct TlsConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    +185    /// The socket address on which to serve the HTTPS server.
    +186    ///
    +187    /// Since the captive portal probe has to run over plain text HTTP and TLS is used for
    +188    /// the main relay server this has to be on a different port.  When TLS is not enabled
    +189    /// this is served on the [`RelayConfig::http_bind_addr`] socket address.
    +190    ///
    +191    /// Normally you'd choose port `80`.
    +192    pub https_bind_addr: SocketAddr,
    +193    /// The socket address on which to server the QUIC server is QUIC is enabled.
    +194    pub quic_bind_addr: SocketAddr,
    +195    /// Mode for getting a cert.
    +196    pub cert: CertConfig<EC, EA>,
    +197    /// The server configuration.
    +198    pub server_config: rustls::ServerConfig,
    +199}
    +200
    +201/// Rate limits.
    +202// TODO: accept_conn_limit and accept_conn_burst are not currently implemented.
    +203#[derive(Debug, Default)]
    +204pub struct Limits {
    +205    /// Rate limit for accepting new connection. Unlimited if not set.
    +206    pub accept_conn_limit: Option<f64>,
    +207    /// Burst limit for accepting new connection. Unlimited if not set.
    +208    pub accept_conn_burst: Option<usize>,
    +209    /// Rate limits for incoming traffic from a client connection.
    +210    pub client_rx: Option<ClientRateLimit>,
    +211}
    +212
    +213/// Per-client rate limit configuration.
    +214#[derive(Debug, Copy, Clone)]
    +215pub struct ClientRateLimit {
    +216    /// Max number of bytes per second to read from the client connection.
    +217    pub bytes_per_second: NonZeroU32,
    +218    /// Max number of bytes to read in a single burst.
    +219    pub max_burst_bytes: Option<NonZeroU32>,
    +220}
    +221
    +222/// TLS certificate configuration.
    +223#[derive(derive_more::Debug)]
    +224pub enum CertConfig<EC: fmt::Debug, EA: fmt::Debug = EC> {
    +225    /// Use Let's Encrypt.
    +226    LetsEncrypt {
    +227        /// State for Let's Encrypt certificates.
    +228        #[debug("AcmeConfig")]
    +229        state: tokio_rustls_acme::AcmeState<EC, EA>,
    +230    },
    +231    /// Use a static TLS key and certificate chain.
    +232    Manual {
    +233        /// The TLS certificate chain.
    +234        certs: Vec<rustls::pki_types::CertificateDer<'static>>,
    +235    },
    +236    /// Use a TLS key and certificate chain that can be reloaded.
    +237    Reloading,
    +238}
    +239
    +240/// A running Relay + QAD server.
    +241///
    +242/// This is a full Relay server, including QAD, Relay and various associated HTTP services.
    +243///
    +244/// Dropping this will stop the server.
    +245#[derive(Debug)]
    +246pub struct Server {
    +247    /// The address of the HTTP server, if configured.
    +248    http_addr: Option<SocketAddr>,
    +249    /// The address of the HTTPS server, if the relay server is using TLS.
    +250    ///
    +251    /// If the Relay server is not using TLS then it is served from the
    +252    /// [`Server::http_addr`].
    +253    https_addr: Option<SocketAddr>,
    +254    /// The address of the QUIC server, if configured.
    +255    quic_addr: Option<SocketAddr>,
    +256    /// Handle to the relay server.
    +257    relay_handle: Option<http_server::ServerHandle>,
    +258    /// Handle to the quic server.
    +259    quic_handle: Option<QuicServerHandle>,
    +260    /// The main task running the server.
    +261    supervisor: AbortOnDropHandle<Result<(), SupervisorError>>,
    +262    /// The certificate for the server.
    +263    ///
    +264    /// If the server has manual certificates configured the certificate chain will be
    +265    /// available here, this can be used by a client to authenticate the server.
    +266    certificates: Option<Vec<rustls::pki_types::CertificateDer<'static>>>,
    +267    metrics: RelayMetrics,
    +268}
    +269
    +270/// Server spawn errors
    +271#[common_fields({
    +272    backtrace: Option<Backtrace>,
    +273    #[snafu(implicit)]
    +274    span_trace: n0_snafu::SpanTrace,
    +275})]
    +276#[allow(missing_docs)]
    +277#[derive(Debug, Snafu)]
    +278#[non_exhaustive]
    +279pub enum SpawnError {
    +280    #[snafu(display("Unable to get local address"))]
    +281    LocalAddr { source: std::io::Error },
    +282    #[snafu(display("Failed to bind QAD listener"))]
    +283    QuicSpawn { source: QuicSpawnError },
    +284    #[snafu(display("Failed to parse TLS header"))]
    +285    TlsHeaderParse { source: InvalidHeaderValue },
    +286    #[snafu(display("Failed to bind TcpListener"))]
    +287    BindTlsListener { source: std::io::Error },
    +288    #[snafu(display("No local address"))]
    +289    NoLocalAddr { source: std::io::Error },
    +290    #[snafu(display("Failed to bind server socket to {addr}"))]
    +291    BindTcpListener { addr: SocketAddr },
    +292}
    +293
    +294/// Server task errors
    +295#[common_fields({
    +296    backtrace: Option<snafu::Backtrace>,
    +297    #[snafu(implicit)]
    +298    span_trace: n0_snafu::SpanTrace,
    +299})]
    +300#[allow(missing_docs)]
    +301#[derive(Debug, Snafu)]
    +302#[non_exhaustive]
    +303pub enum SupervisorError {
    +304    #[snafu(display("Error starting metrics server"))]
    +305    Metrics { source: std::io::Error },
    +306    #[snafu(display("Acme event stream finished"))]
    +307    AcmeEventStreamFinished {},
    +308    #[snafu(transparent)]
    +309    JoinError { source: JoinError },
    +310    #[snafu(display("No relay services are enabled"))]
    +311    NoRelayServicesEnabled {},
    +312    #[snafu(display("Task cancelled"))]
    +313    TaskCancelled {},
    +314}
    +315
    +316impl Server {
    +317    /// Starts the server.
    +318    pub async fn spawn<EC, EA>(config: ServerConfig<EC, EA>) -> Result<Self, SpawnError>
    +319    where
    +320        EC: fmt::Debug + 'static,
    +321        EA: fmt::Debug + 'static,
    +322    {
    +323        let mut tasks = JoinSet::new();
    +324
    +325        let metrics = RelayMetrics::default();
    +326
    +327        #[cfg(feature = "metrics")]
    +328        if let Some(addr) = config.metrics_addr {
    +329            debug!("Starting metrics server");
    +330            let mut registry = iroh_metrics::Registry::default();
    +331            registry.register_all(&metrics);
    +332            tasks.spawn(
    +333                async move {
    +334                    iroh_metrics::service::start_metrics_server(addr, Arc::new(registry))
    +335                        .await
    +336                        .context(MetricsSnafu)
    +337                }
    +338                .instrument(info_span!("metrics-server")),
    +339            );
    +340        }
    +341
    +342        // Start the Relay server, but first clone the certs out.
    +343        let certificates = config.relay.as_ref().and_then(|relay| {
    +344            relay.tls.as_ref().and_then(|tls| match tls.cert {
    +345                CertConfig::LetsEncrypt { .. } => None,
    +346                CertConfig::Manual { ref certs, .. } => Some(certs.clone()),
    +347                CertConfig::Reloading => None,
    +348            })
    +349        });
    +350
    +351        let quic_server = match config.quic {
    +352            Some(quic_config) => {
    +353                debug!("Starting QUIC server {}", quic_config.bind_addr);
    +354                Some(QuicServer::spawn(quic_config).context(QuicSpawnSnafu)?)
    +355            }
    +356            None => None,
    +357        };
    +358        let quic_addr = quic_server.as_ref().map(|srv| srv.bind_addr());
    +359        let quic_handle = quic_server.as_ref().map(|srv| srv.handle());
    +360
    +361        let (relay_server, http_addr) = match config.relay {
    +362            Some(relay_config) => {
    +363                debug!("Starting Relay server");
    +364                let mut headers = HeaderMap::new();
    +365                for (name, value) in TLS_HEADERS.iter() {
    +366                    headers.insert(*name, value.parse().context(TlsHeaderParseSnafu)?);
    +367                }
    +368                let relay_bind_addr = match relay_config.tls {
    +369                    Some(ref tls) => tls.https_bind_addr,
    +370                    None => relay_config.http_bind_addr,
    +371                };
    +372                let key_cache_capacity = relay_config
    +373                    .key_cache_capacity
    +374                    .unwrap_or(DEFAULT_KEY_CACHE_CAPACITY);
    +375                let mut builder = http_server::ServerBuilder::new(relay_bind_addr)
    +376                    .metrics(metrics.server.clone())
    +377                    .headers(headers)
    +378                    .key_cache_capacity(key_cache_capacity)
    +379                    .access(relay_config.access)
    +380                    .request_handler(Method::GET, "/", Box::new(root_handler))
    +381                    .request_handler(Method::GET, "/index.html", Box::new(root_handler))
    +382                    .request_handler(Method::GET, RELAY_PROBE_PATH, Box::new(probe_handler))
    +383                    .request_handler(Method::GET, "/robots.txt", Box::new(robots_handler));
    +384                if let Some(cfg) = relay_config.limits.client_rx {
    +385                    builder = builder.client_rx_ratelimit(cfg);
    +386                }
    +387                let http_addr = match relay_config.tls {
    +388                    Some(tls_config) => {
    +389                        let server_tls_config = match tls_config.cert {
    +390                            CertConfig::LetsEncrypt { mut state } => {
    +391                                let acceptor =
    +392                                    http_server::TlsAcceptor::LetsEncrypt(state.acceptor());
    +393                                tasks.spawn(
    +394                                    async move {
    +395                                        while let Some(event) = state.next().await {
    +396                                            match event {
    +397                                                Ok(ok) => debug!("acme event: {ok:?}"),
    +398                                                Err(err) => error!("error: {err:?}"),
    +399                                            }
    +400                                        }
    +401                                        Err(AcmeEventStreamFinishedSnafu.build())
    +402                                    }
    +403                                    .instrument(info_span!("acme")),
    +404                                );
    +405                                Some(http_server::TlsConfig {
    +406                                    config: Arc::new(tls_config.server_config),
    +407                                    acceptor,
    +408                                })
    +409                            }
    +410                            CertConfig::Manual { .. } | CertConfig::Reloading => {
    +411                                let server_config = Arc::new(tls_config.server_config);
    +412                                let acceptor =
    +413                                    tokio_rustls::TlsAcceptor::from(server_config.clone());
    +414                                let acceptor = http_server::TlsAcceptor::Manual(acceptor);
    +415                                Some(http_server::TlsConfig {
    +416                                    config: server_config,
    +417                                    acceptor,
    +418                                })
    +419                            }
    +420                        };
    +421                        builder = builder.tls_config(server_tls_config);
    +422
    +423                        // Some services always need to be served over HTTP without TLS.  Run
    +424                        // these standalone.
    +425                        let http_listener = TcpListener::bind(&relay_config.http_bind_addr)
    +426                            .await
    +427                            .context(BindTlsListenerSnafu)?;
    +428                        let http_addr = http_listener.local_addr().context(NoLocalAddrSnafu)?;
    +429                        tasks.spawn(
    +430                            async move {
    +431                                run_captive_portal_service(http_listener).await;
    +432                                Ok(())
    +433                            }
    +434                            .instrument(info_span!("http-service", addr = %http_addr)),
    +435                        );
    +436                        Some(http_addr)
    +437                    }
    +438                    None => {
    +439                        // If running Relay without TLS add the plain HTTP server directly
    +440                        // to the Relay server.
    +441                        builder = builder.request_handler(
    +442                            Method::GET,
    +443                            "/generate_204",
    +444                            Box::new(serve_no_content_handler),
    +445                        );
    +446                        None
    +447                    }
    +448                };
    +449                let relay_server = builder.spawn().await?;
    +450                (Some(relay_server), http_addr)
    +451            }
    +452            None => (None, None),
    +453        };
    +454        // If http_addr is Some then relay_server is serving HTTPS.  If http_addr is None
    +455        // relay_server is serving HTTP, including the /generate_204 service.
    +456        let relay_addr = relay_server.as_ref().map(|srv| srv.addr());
    +457        let relay_handle = relay_server.as_ref().map(|srv| srv.handle());
    +458        let task = tokio::spawn(relay_supervisor(tasks, relay_server, quic_server));
    +459
    +460        Ok(Self {
    +461            http_addr: http_addr.or(relay_addr),
    +462            https_addr: http_addr.and(relay_addr),
    +463            quic_addr,
    +464            relay_handle,
    +465            quic_handle,
    +466            supervisor: AbortOnDropHandle::new(task),
    +467            certificates,
    +468            metrics,
    +469        })
    +470    }
    +471
    +472    /// Requests graceful shutdown.
    +473    ///
    +474    /// Returns once all server tasks have stopped.
    +475    pub async fn shutdown(self) -> Result<(), SupervisorError> {
    +476        // Only the Relay server and QUIC server need shutting down, the supervisor will abort the tasks in
    +477        // the JoinSet when the server terminates.
    +478        if let Some(handle) = self.relay_handle {
     479            handle.shutdown();
     480        }
    -481        self.supervisor.await?
    -482    }
    -483
    -484    /// Returns the handle for the task.
    -485    ///
    -486    /// This allows waiting for the server's supervisor task to finish.  Can be useful in
    -487    /// case there is an error in the server before it is shut down.
    -488    pub fn task_handle(&mut self) -> &mut AbortOnDropHandle<Result<(), SupervisorError>> {
    -489        &mut self.supervisor
    -490    }
    -491
    -492    /// The socket address the HTTPS server is listening on.
    -493    pub fn https_addr(&self) -> Option<SocketAddr> {
    -494        self.https_addr
    -495    }
    -496
    -497    /// The socket address the HTTP server is listening on.
    -498    pub fn http_addr(&self) -> Option<SocketAddr> {
    -499        self.http_addr
    -500    }
    -501
    -502    /// The socket address the QUIC server is listening on.
    -503    pub fn quic_addr(&self) -> Option<SocketAddr> {
    -504        self.quic_addr
    -505    }
    -506
    -507    /// The certificates chain if configured with manual TLS certificates.
    -508    pub fn certificates(&self) -> Option<Vec<rustls::pki_types::CertificateDer<'static>>> {
    -509        self.certificates.clone()
    -510    }
    -511
    -512    /// Get the server's https [`RelayUrl`].
    -513    ///
    -514    /// This uses [`Self::https_addr`] so it's mostly useful for local development.
    -515    #[cfg(feature = "test-utils")]
    -516    pub fn https_url(&self) -> Option<RelayUrl> {
    -517        self.https_addr.map(|addr| {
    -518            url::Url::parse(&format!("https://{addr}"))
    -519                .expect("valid url")
    -520                .into()
    -521        })
    -522    }
    -523
    -524    /// Get the server's http [`RelayUrl`].
    -525    ///
    -526    /// This uses [`Self::http_addr`] so it's mostly useful for local development.
    -527    #[cfg(feature = "test-utils")]
    -528    pub fn http_url(&self) -> Option<RelayUrl> {
    -529        self.http_addr.map(|addr| {
    -530            url::Url::parse(&format!("http://{addr}"))
    -531                .expect("valid url")
    -532                .into()
    -533        })
    -534    }
    -535
    -536    /// Returns the metrics collected in the relay server.
    -537    pub fn metrics(&self) -> &RelayMetrics {
    -538        &self.metrics
    -539    }
    -540}
    -541
    -542/// Supervisor for the relay server tasks.
    -543///
    -544/// As soon as one of the tasks exits, all other tasks are stopped and the server stops.
    -545/// The supervisor finishes once all tasks are finished.
    -546#[instrument(skip_all)]
    -547async fn relay_supervisor(
    -548    mut tasks: JoinSet<Result<(), SupervisorError>>,
    -549    mut relay_http_server: Option<http_server::Server>,
    -550    mut quic_server: Option<QuicServer>,
    -551) -> Result<(), SupervisorError> {
    -552    let quic_enabled = quic_server.is_some();
    -553    let mut quic_fut = match quic_server {
    -554        Some(ref mut server) => n0_future::Either::Left(server.task_handle()),
    -555        None => n0_future::Either::Right(n0_future::future::pending()),
    -556    };
    -557    let relay_enabled = relay_http_server.is_some();
    -558    let mut relay_fut = match relay_http_server {
    -559        Some(ref mut server) => n0_future::Either::Left(server.task_handle()),
    -560        None => n0_future::Either::Right(n0_future::future::pending()),
    -561    };
    -562    let res = tokio::select! {
    -563        biased;
    -564        Some(ret) = tasks.join_next() => ret,
    -565        ret = &mut quic_fut, if quic_enabled => ret.map(Ok),
    -566        ret = &mut relay_fut, if relay_enabled => ret.map(Ok),
    -567        else => Ok(Err(NoRelayServicesEnabledSnafu.build())),
    -568    };
    -569    let ret = match res {
    -570        Ok(Ok(())) => {
    -571            debug!("Task exited");
    -572            Ok(())
    -573        }
    -574        Ok(Err(err)) => {
    -575            error!(%err, "Task failed");
    -576            Err(err)
    -577        }
    -578        Err(err) => {
    -579            if let Ok(panic) = err.try_into_panic() {
    -580                error!("Task panicked");
    -581                std::panic::resume_unwind(panic);
    -582            }
    -583            debug!("Task cancelled");
    -584            Err(TaskCancelledSnafu.build())
    -585        }
    -586    };
    -587
    -588    // Ensure the HTTP server terminated, there is no harm in calling this after it is
    -589    // already shut down.
    -590    if let Some(server) = relay_http_server {
    -591        server.shutdown();
    -592    }
    -593
    -594    // Ensure the QUIC server is closed
    -595    if let Some(server) = quic_server {
    -596        server.shutdown().await;
    -597    }
    -598
    -599    // Stop all remaining tasks
    -600    tasks.shutdown().await;
    +481        if let Some(handle) = self.quic_handle {
    +482            handle.shutdown();
    +483        }
    +484        self.supervisor.await?
    +485    }
    +486
    +487    /// Returns the handle for the task.
    +488    ///
    +489    /// This allows waiting for the server's supervisor task to finish.  Can be useful in
    +490    /// case there is an error in the server before it is shut down.
    +491    pub fn task_handle(&mut self) -> &mut AbortOnDropHandle<Result<(), SupervisorError>> {
    +492        &mut self.supervisor
    +493    }
    +494
    +495    /// The socket address the HTTPS server is listening on.
    +496    pub fn https_addr(&self) -> Option<SocketAddr> {
    +497        self.https_addr
    +498    }
    +499
    +500    /// The socket address the HTTP server is listening on.
    +501    pub fn http_addr(&self) -> Option<SocketAddr> {
    +502        self.http_addr
    +503    }
    +504
    +505    /// The socket address the QUIC server is listening on.
    +506    pub fn quic_addr(&self) -> Option<SocketAddr> {
    +507        self.quic_addr
    +508    }
    +509
    +510    /// The certificates chain if configured with manual TLS certificates.
    +511    pub fn certificates(&self) -> Option<Vec<rustls::pki_types::CertificateDer<'static>>> {
    +512        self.certificates.clone()
    +513    }
    +514
    +515    /// Get the server's https [`RelayUrl`].
    +516    ///
    +517    /// This uses [`Self::https_addr`] so it's mostly useful for local development.
    +518    #[cfg(feature = "test-utils")]
    +519    pub fn https_url(&self) -> Option<RelayUrl> {
    +520        self.https_addr.map(|addr| {
    +521            url::Url::parse(&format!("https://{addr}"))
    +522                .expect("valid url")
    +523                .into()
    +524        })
    +525    }
    +526
    +527    /// Get the server's http [`RelayUrl`].
    +528    ///
    +529    /// This uses [`Self::http_addr`] so it's mostly useful for local development.
    +530    #[cfg(feature = "test-utils")]
    +531    pub fn http_url(&self) -> Option<RelayUrl> {
    +532        self.http_addr.map(|addr| {
    +533            url::Url::parse(&format!("http://{addr}"))
    +534                .expect("valid url")
    +535                .into()
    +536        })
    +537    }
    +538
    +539    /// Returns the metrics collected in the relay server.
    +540    pub fn metrics(&self) -> &RelayMetrics {
    +541        &self.metrics
    +542    }
    +543}
    +544
    +545/// Supervisor for the relay server tasks.
    +546///
    +547/// As soon as one of the tasks exits, all other tasks are stopped and the server stops.
    +548/// The supervisor finishes once all tasks are finished.
    +549#[instrument(skip_all)]
    +550async fn relay_supervisor(
    +551    mut tasks: JoinSet<Result<(), SupervisorError>>,
    +552    mut relay_http_server: Option<http_server::Server>,
    +553    mut quic_server: Option<QuicServer>,
    +554) -> Result<(), SupervisorError> {
    +555    let quic_enabled = quic_server.is_some();
    +556    let mut quic_fut = match quic_server {
    +557        Some(ref mut server) => n0_future::Either::Left(server.task_handle()),
    +558        None => n0_future::Either::Right(n0_future::future::pending()),
    +559    };
    +560    let relay_enabled = relay_http_server.is_some();
    +561    let mut relay_fut = match relay_http_server {
    +562        Some(ref mut server) => n0_future::Either::Left(server.task_handle()),
    +563        None => n0_future::Either::Right(n0_future::future::pending()),
    +564    };
    +565    let res = tokio::select! {
    +566        biased;
    +567        Some(ret) = tasks.join_next() => ret,
    +568        ret = &mut quic_fut, if quic_enabled => ret.map(Ok),
    +569        ret = &mut relay_fut, if relay_enabled => ret.map(Ok),
    +570        else => Ok(Err(NoRelayServicesEnabledSnafu.build())),
    +571    };
    +572    let ret = match res {
    +573        Ok(Ok(())) => {
    +574            debug!("Task exited");
    +575            Ok(())
    +576        }
    +577        Ok(Err(err)) => {
    +578            error!(%err, "Task failed");
    +579            Err(err)
    +580        }
    +581        Err(err) => {
    +582            if let Ok(panic) = err.try_into_panic() {
    +583                error!("Task panicked");
    +584                std::panic::resume_unwind(panic);
    +585            }
    +586            debug!("Task cancelled");
    +587            Err(TaskCancelledSnafu.build())
    +588        }
    +589    };
    +590
    +591    // Ensure the HTTP server terminated, there is no harm in calling this after it is
    +592    // already shut down.
    +593    if let Some(server) = relay_http_server {
    +594        server.shutdown();
    +595    }
    +596
    +597    // Ensure the QUIC server is closed
    +598    if let Some(server) = quic_server {
    +599        server.shutdown().await;
    +600    }
     601
    -602    ret
    -603}
    +602    // Stop all remaining tasks
    +603    tasks.shutdown().await;
     604
    -605fn root_handler(
    -606    _r: Request<Incoming>,
    -607    response: ResponseBuilder,
    -608) -> HyperResult<Response<BytesBody>> {
    -609    response
    -610        .status(StatusCode::OK)
    -611        .header("Content-Type", "text/html; charset=utf-8")
    -612        .body(INDEX.into())
    -613        .map_err(|err| Box::new(err) as HyperError)
    -614}
    -615
    -616/// HTTP latency queries
    -617fn probe_handler(
    -618    _r: Request<Incoming>,
    -619    response: ResponseBuilder,
    -620) -> HyperResult<Response<BytesBody>> {
    -621    response
    -622        .status(StatusCode::OK)
    -623        .header("Access-Control-Allow-Origin", "*")
    -624        .body(body_empty())
    -625        .map_err(|err| Box::new(err) as HyperError)
    -626}
    -627
    -628fn robots_handler(
    -629    _r: Request<Incoming>,
    -630    response: ResponseBuilder,
    -631) -> HyperResult<Response<BytesBody>> {
    -632    response
    -633        .status(StatusCode::OK)
    -634        .body(ROBOTS_TXT.into())
    -635        .map_err(|err| Box::new(err) as HyperError)
    -636}
    -637
    -638/// For captive portal detection.
    -639fn serve_no_content_handler<B: hyper::body::Body>(
    -640    r: Request<B>,
    -641    mut response: ResponseBuilder,
    -642) -> HyperResult<Response<BytesBody>> {
    -643    if let Some(challenge) = r.headers().get(NO_CONTENT_CHALLENGE_HEADER) {
    -644        if !challenge.is_empty()
    -645            && challenge.len() < 64
    -646            && challenge
    -647                .as_bytes()
    -648                .iter()
    -649                .all(|c| is_challenge_char(*c as char))
    -650        {
    -651            response = response.header(
    -652                NO_CONTENT_RESPONSE_HEADER,
    -653                format!("response {}", challenge.to_str()?),
    -654            );
    -655        }
    -656    }
    -657
    -658    response
    -659        .status(StatusCode::NO_CONTENT)
    -660        .body(body_empty())
    -661        .map_err(|err| Box::new(err) as HyperError)
    -662}
    -663
    -664fn is_challenge_char(c: char) -> bool {
    -665    // Semi-randomly chosen as a limited set of valid characters
    -666    c.is_ascii_lowercase()
    -667        || c.is_ascii_uppercase()
    -668        || c.is_ascii_digit()
    -669        || c == '.'
    -670        || c == '-'
    -671        || c == '_'
    -672}
    +605    ret
    +606}
    +607
    +608fn root_handler(
    +609    _r: Request<Incoming>,
    +610    response: ResponseBuilder,
    +611) -> HyperResult<Response<BytesBody>> {
    +612    response
    +613        .status(StatusCode::OK)
    +614        .header("Content-Type", "text/html; charset=utf-8")
    +615        .body(INDEX.into())
    +616        .map_err(|err| Box::new(err) as HyperError)
    +617}
    +618
    +619/// HTTP latency queries
    +620fn probe_handler(
    +621    _r: Request<Incoming>,
    +622    response: ResponseBuilder,
    +623) -> HyperResult<Response<BytesBody>> {
    +624    response
    +625        .status(StatusCode::OK)
    +626        .header("Access-Control-Allow-Origin", "*")
    +627        .body(body_empty())
    +628        .map_err(|err| Box::new(err) as HyperError)
    +629}
    +630
    +631fn robots_handler(
    +632    _r: Request<Incoming>,
    +633    response: ResponseBuilder,
    +634) -> HyperResult<Response<BytesBody>> {
    +635    response
    +636        .status(StatusCode::OK)
    +637        .body(ROBOTS_TXT.into())
    +638        .map_err(|err| Box::new(err) as HyperError)
    +639}
    +640
    +641/// For captive portal detection.
    +642fn serve_no_content_handler<B: hyper::body::Body>(
    +643    r: Request<B>,
    +644    mut response: ResponseBuilder,
    +645) -> HyperResult<Response<BytesBody>> {
    +646    let check = |c: &HeaderValue| {
    +647        !c.is_empty() && c.len() < 64 && c.as_bytes().iter().all(|c| is_challenge_char(*c as char))
    +648    };
    +649
    +650    if let Some(challenge) = r.headers().get(NO_CONTENT_CHALLENGE_HEADER) {
    +651        if check(challenge) {
    +652            response = response.header(
    +653                NO_CONTENT_RESPONSE_HEADER,
    +654                format!("response {}", challenge.to_str()?),
    +655            );
    +656        }
    +657    }
    +658
    +659    if let Some(challenge) = r.headers().get(NO_CONTENT_CHALLENGE_HEADER_LEGACY) {
    +660        if check(challenge) {
    +661            response = response.header(
    +662                NO_CONTENT_RESPONSE_HEADER_LEGACY,
    +663                format!("response {}", challenge.to_str()?),
    +664            );
    +665        }
    +666    }
    +667
    +668    response
    +669        .status(StatusCode::NO_CONTENT)
    +670        .body(body_empty())
    +671        .map_err(|err| Box::new(err) as HyperError)
    +672}
     673
    -674/// This is a future that never returns, drop it to cancel/abort.
    -675async fn run_captive_portal_service(http_listener: TcpListener) {
    -676    info!("serving");
    -677
    -678    // If this future is cancelled, this is dropped and all tasks are aborted.
    -679    let mut tasks = JoinSet::new();
    -680
    -681    loop {
    -682        tokio::select! {
    -683            biased;
    -684
    -685            Some(res) = tasks.join_next() => {
    -686                if let Err(err) = res {
    -687                    if err.is_panic() {
    -688                        panic!("task panicked: {:#?}", err);
    -689                    }
    -690                }
    -691            }
    -692
    -693            res = http_listener.accept() => {
    -694                match res {
    -695                    Ok((stream, peer_addr)) => {
    -696                        debug!(%peer_addr, "Connection opened",);
    -697                        let handler = CaptivePortalService;
    -698
    -699                        tasks.spawn(async move {
    -700                            let stream = crate::server::streams::MaybeTlsStream::Plain(stream);
    -701                            let stream = hyper_util::rt::TokioIo::new(stream);
    -702                            if let Err(err) = hyper::server::conn::http1::Builder::new()
    -703                                .serve_connection(stream, handler)
    -704                                .with_upgrades()
    -705                                .await
    -706                            {
    -707                                error!("Failed to serve connection: {err:?}");
    -708                            }
    -709                        });
    -710                    }
    -711                    Err(err) => {
    -712                        error!(
    -713                            "[CaptivePortalService] failed to accept connection: {:#?}",
    -714                            err
    -715                        );
    -716                    }
    -717                }
    -718            }
    -719        }
    -720    }
    -721}
    -722
    -723#[derive(Clone)]
    -724struct CaptivePortalService;
    -725
    -726impl hyper::service::Service<Request<Incoming>> for CaptivePortalService {
    -727    type Response = Response<BytesBody>;
    -728    type Error = HyperError;
    -729    type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
    -730
    -731    fn call(&self, req: Request<Incoming>) -> Self::Future {
    -732        match (req.method(), req.uri().path()) {
    -733            // Captive Portal checker
    -734            (&Method::GET, "/generate_204") => {
    -735                Box::pin(async move { serve_no_content_handler(req, Response::builder()) })
    -736            }
    -737            _ => {
    -738                // Return 404 not found response.
    -739                let r = Response::builder()
    -740                    .status(StatusCode::NOT_FOUND)
    -741                    .body(NOTFOUND.into())
    -742                    .map_err(|err| Box::new(err) as HyperError);
    -743                Box::pin(async move { r })
    -744            }
    -745        }
    -746    }
    -747}
    -748
    -749#[cfg(test)]
    -750mod tests {
    -751    use std::{net::Ipv4Addr, time::Duration};
    -752
    -753    use bytes::Bytes;
    -754    use http::{header::UPGRADE, StatusCode};
    -755    use iroh_base::{NodeId, RelayUrl, SecretKey};
    -756    use n0_future::{FutureExt, SinkExt, StreamExt};
    -757    use n0_snafu::{Result, ResultExt};
    -758    use tracing::{info, instrument};
    -759    use tracing_test::traced_test;
    -760
    -761    use super::{
    -762        Access, AccessConfig, RelayConfig, Server, ServerConfig, SpawnError,
    -763        NO_CONTENT_CHALLENGE_HEADER, NO_CONTENT_RESPONSE_HEADER,
    -764    };
    -765    use crate::{
    -766        client::{conn::ReceivedMessage, ClientBuilder, SendMessage},
    -767        dns::DnsResolver,
    -768        http::{Protocol, HTTP_UPGRADE_PROTOCOL},
    -769    };
    +674fn is_challenge_char(c: char) -> bool {
    +675    // Semi-randomly chosen as a limited set of valid characters
    +676    c.is_ascii_lowercase()
    +677        || c.is_ascii_uppercase()
    +678        || c.is_ascii_digit()
    +679        || c == '.'
    +680        || c == '-'
    +681        || c == '_'
    +682}
    +683
    +684/// This is a future that never returns, drop it to cancel/abort.
    +685async fn run_captive_portal_service(http_listener: TcpListener) {
    +686    info!("serving");
    +687
    +688    // If this future is cancelled, this is dropped and all tasks are aborted.
    +689    let mut tasks = JoinSet::new();
    +690
    +691    loop {
    +692        tokio::select! {
    +693            biased;
    +694
    +695            Some(res) = tasks.join_next() => {
    +696                if let Err(err) = res {
    +697                    if err.is_panic() {
    +698                        panic!("task panicked: {err:#?}");
    +699                    }
    +700                }
    +701            }
    +702
    +703            res = http_listener.accept() => {
    +704                match res {
    +705                    Ok((stream, peer_addr)) => {
    +706                        debug!(%peer_addr, "Connection opened",);
    +707                        let handler = CaptivePortalService;
    +708
    +709                        tasks.spawn(async move {
    +710                            let stream = crate::server::streams::MaybeTlsStream::Plain(stream);
    +711                            let stream = hyper_util::rt::TokioIo::new(stream);
    +712                            if let Err(err) = hyper::server::conn::http1::Builder::new()
    +713                                .serve_connection(stream, handler)
    +714                                .with_upgrades()
    +715                                .await
    +716                            {
    +717                                error!("Failed to serve connection: {err:?}");
    +718                            }
    +719                        });
    +720                    }
    +721                    Err(err) => {
    +722                        error!(
    +723                            "[CaptivePortalService] failed to accept connection: {:#?}",
    +724                            err
    +725                        );
    +726                    }
    +727                }
    +728            }
    +729        }
    +730    }
    +731}
    +732
    +733#[derive(Clone)]
    +734struct CaptivePortalService;
    +735
    +736impl hyper::service::Service<Request<Incoming>> for CaptivePortalService {
    +737    type Response = Response<BytesBody>;
    +738    type Error = HyperError;
    +739    type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
    +740
    +741    fn call(&self, req: Request<Incoming>) -> Self::Future {
    +742        match (req.method(), req.uri().path()) {
    +743            // Captive Portal checker
    +744            (&Method::GET, "/generate_204") => {
    +745                Box::pin(async move { serve_no_content_handler(req, Response::builder()) })
    +746            }
    +747            _ => {
    +748                // Return 404 not found response.
    +749                let r = Response::builder()
    +750                    .status(StatusCode::NOT_FOUND)
    +751                    .body(NOTFOUND.into())
    +752                    .map_err(|err| Box::new(err) as HyperError);
    +753                Box::pin(async move { r })
    +754            }
    +755        }
    +756    }
    +757}
    +758
    +759#[cfg(test)]
    +760mod tests {
    +761    use std::{net::Ipv4Addr, time::Duration};
    +762
    +763    use http::StatusCode;
    +764    use iroh_base::{NodeId, RelayUrl, SecretKey};
    +765    use n0_future::{FutureExt, SinkExt, StreamExt};
    +766    use n0_snafu::Result;
    +767    use rand::SeedableRng;
    +768    use tracing::{info, instrument};
    +769    use tracing_test::traced_test;
     770
    -771    async fn spawn_local_relay() -> std::result::Result<Server, SpawnError> {
    -772        Server::spawn(ServerConfig::<(), ()> {
    -773            relay: Some(RelayConfig::<(), ()> {
    -774                http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(),
    -775                tls: None,
    -776                limits: Default::default(),
    -777                key_cache_capacity: Some(1024),
    -778                access: AccessConfig::Everyone,
    -779            }),
    -780            quic: None,
    -781            metrics_addr: None,
    -782        })
    -783        .await
    -784    }
    -785
    -786    #[instrument]
    -787    async fn try_send_recv(
    -788        client_a: &mut crate::client::Client,
    -789        client_b: &mut crate::client::Client,
    -790        b_key: NodeId,
    -791        msg: Bytes,
    -792    ) -> Result<ReceivedMessage> {
    -793        // try resend 10 times
    -794        for _ in 0..10 {
    -795            client_a
    -796                .send(SendMessage::SendPacket(b_key, msg.clone()))
    -797                .await?;
    -798            let Ok(res) = tokio::time::timeout(Duration::from_millis(500), client_b.next()).await
    -799            else {
    -800                continue;
    -801            };
    -802            let res = res.expect("stream finished")?;
    -803            return Ok(res);
    -804        }
    -805        panic!("failed to send and recv message");
    -806    }
    -807
    -808    fn dns_resolver() -> DnsResolver {
    -809        DnsResolver::new()
    -810    }
    -811
    -812    #[tokio::test]
    -813    #[traced_test]
    -814    async fn test_no_services() {
    -815        let mut server = Server::spawn(ServerConfig::<(), ()>::default())
    -816            .await
    -817            .unwrap();
    -818        let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle())
    -819            .await
    -820            .expect("timeout, server not finished")
    -821            .expect("server task JoinError");
    -822        assert!(res.is_err());
    -823    }
    -824
    -825    #[tokio::test]
    -826    #[traced_test]
    -827    async fn test_conflicting_bind() {
    -828        let mut server = Server::spawn(ServerConfig::<(), ()> {
    -829            relay: Some(RelayConfig {
    -830                http_bind_addr: (Ipv4Addr::LOCALHOST, 1234).into(),
    -831                tls: None,
    -832                limits: Default::default(),
    -833                key_cache_capacity: Some(1024),
    -834                access: AccessConfig::Everyone,
    -835            }),
    -836            quic: None,
    -837            metrics_addr: Some((Ipv4Addr::LOCALHOST, 1234).into()),
    -838        })
    -839        .await
    -840        .unwrap();
    -841        let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle())
    -842            .await
    -843            .expect("timeout, server not finished")
    -844            .expect("server task JoinError");
    -845        assert!(res.is_err()); // AddrInUse
    -846    }
    -847
    -848    #[tokio::test]
    -849    #[traced_test]
    -850    async fn test_root_handler() {
    -851        let server = spawn_local_relay().await.unwrap();
    -852        let url = format!("http://{}", server.http_addr().unwrap());
    -853
    -854        let response = reqwest::get(&url).await.unwrap();
    -855        assert_eq!(response.status(), 200);
    -856        let body = response.text().await.unwrap();
    -857        assert!(body.contains("iroh.computer"));
    -858    }
    -859
    -860    #[tokio::test]
    -861    #[traced_test]
    -862    async fn test_captive_portal_service() {
    -863        let server = spawn_local_relay().await.unwrap();
    -864        let url = format!("http://{}/generate_204", server.http_addr().unwrap());
    -865        let challenge = "123az__.";
    -866
    -867        let client = reqwest::Client::new();
    -868        let response = client
    -869            .get(&url)
    -870            .header(NO_CONTENT_CHALLENGE_HEADER, challenge)
    -871            .send()
    -872            .await
    -873            .unwrap();
    -874        assert_eq!(response.status(), StatusCode::NO_CONTENT);
    -875        let header = response.headers().get(NO_CONTENT_RESPONSE_HEADER).unwrap();
    -876        assert_eq!(header.to_str().unwrap(), format!("response {challenge}"));
    -877        let body = response.text().await.unwrap();
    -878        assert!(body.is_empty());
    -879    }
    -880
    -881    #[tokio::test]
    -882    #[traced_test]
    -883    async fn test_relay_client_legacy_route() {
    -884        let server = spawn_local_relay().await.unwrap();
    -885        // We're testing the legacy endpoint at `/derp`
    -886        let endpoint_url = format!("http://{}/derp", server.http_addr().unwrap());
    -887
    -888        let client = reqwest::Client::new();
    -889        let result = client
    -890            .get(endpoint_url)
    -891            .header(UPGRADE, HTTP_UPGRADE_PROTOCOL)
    -892            .send()
    -893            .await
    -894            .unwrap();
    -895
    -896        assert_eq!(result.status(), StatusCode::SWITCHING_PROTOCOLS);
    -897    }
    -898
    -899    #[tokio::test]
    -900    #[traced_test]
    -901    async fn test_relay_clients_both_relay() -> Result<()> {
    -902        let server = spawn_local_relay().await.unwrap();
    -903        let relay_url = format!("http://{}", server.http_addr().unwrap());
    -904        let relay_url: RelayUrl = relay_url.parse().unwrap();
    -905
    -906        // set up client a
    -907        let a_secret_key = SecretKey::generate(rand::thread_rng());
    -908        let a_key = a_secret_key.public();
    -909        let resolver = dns_resolver();
    -910        let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone())
    -911            .connect()
    -912            .await?;
    -913
    -914        // set up client b
    -915        let b_secret_key = SecretKey::generate(rand::thread_rng());
    -916        let b_key = b_secret_key.public();
    -917        let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone())
    -918            .connect()
    -919            .await?;
    -920
    -921        // send message from a to b
    -922        let msg = Bytes::from("hello, b");
    -923        let res = try_send_recv(&mut client_a, &mut client_b, b_key, msg.clone()).await?;
    -924        if let ReceivedMessage::ReceivedPacket {
    -925            remote_node_id,
    -926            data,
    -927        } = res
    -928        {
    -929            assert_eq!(a_key, remote_node_id);
    -930            assert_eq!(msg, data);
    -931        } else {
    -932            panic!("client_b received unexpected message {res:?}");
    -933        }
    -934
    -935        // send message from b to a
    -936        let msg = Bytes::from("howdy, a");
    -937        let res = try_send_recv(&mut client_b, &mut client_a, a_key, msg.clone()).await?;
    -938        if let ReceivedMessage::ReceivedPacket {
    -939            remote_node_id,
    -940            data,
    -941        } = res
    -942        {
    -943            assert_eq!(b_key, remote_node_id);
    -944            assert_eq!(msg, data);
    -945        } else {
    -946            panic!("client_a received unexpected message {res:?}");
    -947        }
    -948        Ok(())
    -949    }
    -950
    -951    #[tokio::test]
    -952    #[traced_test]
    -953    async fn test_relay_clients_both_websockets() -> Result<()> {
    -954        let server = spawn_local_relay().await?;
    +771    use super::{
    +772        Access, AccessConfig, NO_CONTENT_CHALLENGE_HEADER, NO_CONTENT_RESPONSE_HEADER, RelayConfig,
    +773        Server, ServerConfig, SpawnError,
    +774    };
    +775    use crate::{
    +776        client::{ClientBuilder, ConnectError},
    +777        dns::DnsResolver,
    +778        protos::{
    +779            handshake,
    +780            relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg},
    +781        },
    +782    };
    +783
    +784    async fn spawn_local_relay() -> std::result::Result<Server, SpawnError> {
    +785        Server::spawn(ServerConfig::<(), ()> {
    +786            relay: Some(RelayConfig::<(), ()> {
    +787                http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(),
    +788                tls: None,
    +789                limits: Default::default(),
    +790                key_cache_capacity: Some(1024),
    +791                access: AccessConfig::Everyone,
    +792            }),
    +793            quic: None,
    +794            metrics_addr: None,
    +795        })
    +796        .await
    +797    }
    +798
    +799    #[instrument]
    +800    async fn try_send_recv(
    +801        client_a: &mut crate::client::Client,
    +802        client_b: &mut crate::client::Client,
    +803        b_key: NodeId,
    +804        msg: Datagrams,
    +805    ) -> Result<RelayToClientMsg> {
    +806        // try resend 10 times
    +807        for _ in 0..10 {
    +808            client_a
    +809                .send(ClientToRelayMsg::Datagrams {
    +810                    dst_node_id: b_key,
    +811                    datagrams: msg.clone(),
    +812                })
    +813                .await?;
    +814            let Ok(res) = tokio::time::timeout(Duration::from_millis(500), client_b.next()).await
    +815            else {
    +816                continue;
    +817            };
    +818            let res = res.expect("stream finished")?;
    +819            return Ok(res);
    +820        }
    +821        panic!("failed to send and recv message");
    +822    }
    +823
    +824    fn dns_resolver() -> DnsResolver {
    +825        DnsResolver::new()
    +826    }
    +827
    +828    #[tokio::test]
    +829    #[traced_test]
    +830    async fn test_no_services() {
    +831        let mut server = Server::spawn(ServerConfig::<(), ()>::default())
    +832            .await
    +833            .unwrap();
    +834        let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle())
    +835            .await
    +836            .expect("timeout, server not finished")
    +837            .expect("server task JoinError");
    +838        assert!(res.is_err());
    +839    }
    +840
    +841    #[tokio::test]
    +842    #[traced_test]
    +843    async fn test_conflicting_bind() {
    +844        let mut server = Server::spawn(ServerConfig::<(), ()> {
    +845            relay: Some(RelayConfig {
    +846                http_bind_addr: (Ipv4Addr::LOCALHOST, 1234).into(),
    +847                tls: None,
    +848                limits: Default::default(),
    +849                key_cache_capacity: Some(1024),
    +850                access: AccessConfig::Everyone,
    +851            }),
    +852            quic: None,
    +853            metrics_addr: Some((Ipv4Addr::LOCALHOST, 1234).into()),
    +854        })
    +855        .await
    +856        .unwrap();
    +857        let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle())
    +858            .await
    +859            .expect("timeout, server not finished")
    +860            .expect("server task JoinError");
    +861        assert!(res.is_err()); // AddrInUse
    +862    }
    +863
    +864    #[tokio::test]
    +865    #[traced_test]
    +866    async fn test_root_handler() {
    +867        let server = spawn_local_relay().await.unwrap();
    +868        let url = format!("http://{}", server.http_addr().unwrap());
    +869
    +870        let client = reqwest::Client::builder().use_rustls_tls().build().unwrap();
    +871        let response = client.get(&url).send().await.unwrap();
    +872        assert_eq!(response.status(), 200);
    +873        let body = response.text().await.unwrap();
    +874        assert!(body.contains("iroh.computer"));
    +875    }
    +876
    +877    #[tokio::test]
    +878    #[traced_test]
    +879    async fn test_captive_portal_service() {
    +880        let server = spawn_local_relay().await.unwrap();
    +881        let url = format!("http://{}/generate_204", server.http_addr().unwrap());
    +882        let challenge = "123az__.";
    +883
    +884        let client = reqwest::Client::builder().use_rustls_tls().build().unwrap();
    +885        let response = client
    +886            .get(&url)
    +887            .header(NO_CONTENT_CHALLENGE_HEADER, challenge)
    +888            .send()
    +889            .await
    +890            .unwrap();
    +891        assert_eq!(response.status(), StatusCode::NO_CONTENT);
    +892        let header = response.headers().get(NO_CONTENT_RESPONSE_HEADER).unwrap();
    +893        assert_eq!(header.to_str().unwrap(), format!("response {challenge}"));
    +894        let body = response.text().await.unwrap();
    +895        assert!(body.is_empty());
    +896    }
    +897
    +898    #[tokio::test]
    +899    #[traced_test]
    +900    async fn test_relay_clients() -> Result<()> {
    +901        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +902        let server = spawn_local_relay().await?;
    +903
    +904        let relay_url = format!("http://{}", server.http_addr().unwrap());
    +905        let relay_url: RelayUrl = relay_url.parse()?;
    +906
    +907        // set up client a
    +908        let a_secret_key = SecretKey::generate(&mut rng);
    +909        let a_key = a_secret_key.public();
    +910        let resolver = dns_resolver();
    +911        info!("client a build & connect");
    +912        let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone())
    +913            .connect()
    +914            .await?;
    +915
    +916        // set up client b
    +917        let b_secret_key = SecretKey::generate(&mut rng);
    +918        let b_key = b_secret_key.public();
    +919        info!("client b build & connect");
    +920        let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone())
    +921            .connect()
    +922            .await?;
    +923
    +924        info!("sending a -> b");
    +925
    +926        // send message from a to b
    +927        let msg = Datagrams::from("hello, b");
    +928        let res = try_send_recv(&mut client_a, &mut client_b, b_key, msg.clone()).await?;
    +929        let RelayToClientMsg::Datagrams {
    +930            remote_node_id,
    +931            datagrams,
    +932        } = res
    +933        else {
    +934            panic!("client_b received unexpected message {res:?}");
    +935        };
    +936
    +937        assert_eq!(a_key, remote_node_id);
    +938        assert_eq!(msg, datagrams);
    +939
    +940        info!("sending b -> a");
    +941        // send message from b to a
    +942        let msg = Datagrams::from("howdy, a");
    +943        let res = try_send_recv(&mut client_b, &mut client_a, a_key, msg.clone()).await?;
    +944
    +945        let RelayToClientMsg::Datagrams {
    +946            remote_node_id,
    +947            datagrams,
    +948        } = res
    +949        else {
    +950            panic!("client_a received unexpected message {res:?}");
    +951        };
    +952
    +953        assert_eq!(b_key, remote_node_id);
    +954        assert_eq!(msg, datagrams);
     955
    -956        let relay_url = format!("http://{}", server.http_addr().unwrap());
    -957        let relay_url: RelayUrl = relay_url.parse()?;
    +956        Ok(())
    +957    }
     958
    -959        // set up client a
    -960        let a_secret_key = SecretKey::generate(rand::thread_rng());
    -961        let a_key = a_secret_key.public();
    -962        let resolver = dns_resolver();
    -963        info!("client a build & connect");
    -964        let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone())
    -965            .protocol(Protocol::Websocket)
    -966            .connect()
    -967            .await?;
    +959    #[tokio::test]
    +960    #[traced_test]
    +961    async fn test_relay_access_control() -> Result<()> {
    +962        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +963        let current_span = tracing::info_span!("this is a test");
    +964        let _guard = current_span.enter();
    +965
    +966        let a_secret_key = SecretKey::generate(&mut rng);
    +967        let a_key = a_secret_key.public();
     968
    -969        // set up client b
    -970        let b_secret_key = SecretKey::generate(rand::thread_rng());
    -971        let b_key = b_secret_key.public();
    -972        info!("client b build & connect");
    -973        let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone())
    -974            .protocol(Protocol::Websocket) // another websocket client
    -975            .connect()
    -976            .await?;
    -977
    -978        info!("sending a -> b");
    -979
    -980        // send message from a to b
    -981        let msg = Bytes::from("hello, b");
    -982        let res = try_send_recv(&mut client_a, &mut client_b, b_key, msg.clone()).await?;
    -983        let ReceivedMessage::ReceivedPacket {
    -984            remote_node_id,
    -985            data,
    -986        } = res
    -987        else {
    -988            panic!("client_b received unexpected message {res:?}");
    -989        };
    -990
    -991        assert_eq!(a_key, remote_node_id);
    -992        assert_eq!(msg, data);
    -993
    -994        info!("sending b -> a");
    -995        // send message from b to a
    -996        let msg = Bytes::from("howdy, a");
    -997        let res = try_send_recv(&mut client_b, &mut client_a, a_key, msg.clone()).await?;
    -998
    -999        let ReceivedMessage::ReceivedPacket {
    -1000            remote_node_id,
    -1001            data,
    -1002        } = res
    -1003        else {
    -1004            panic!("client_a received unexpected message {res:?}");
    -1005        };
    -1006
    -1007        assert_eq!(b_key, remote_node_id);
    -1008        assert_eq!(msg, data);
    -1009
    -1010        Ok(())
    -1011    }
    -1012
    -1013    #[tokio::test]
    -1014    #[traced_test]
    -1015    async fn test_relay_clients_websocket_and_relay() -> Result<()> {
    -1016        let server = spawn_local_relay().await.unwrap();
    -1017
    -1018        let relay_url = format!("http://{}", server.http_addr().unwrap());
    -1019        let relay_url: RelayUrl = relay_url.parse().unwrap();
    +969        let server = Server::spawn(ServerConfig::<(), ()> {
    +970            relay: Some(RelayConfig::<(), ()> {
    +971                http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(),
    +972                tls: None,
    +973                limits: Default::default(),
    +974                key_cache_capacity: Some(1024),
    +975                access: AccessConfig::Restricted(Box::new(move |node_id| {
    +976                    async move {
    +977                        info!("checking {}", node_id);
    +978                        // reject node a
    +979                        if node_id == a_key {
    +980                            Access::Deny
    +981                        } else {
    +982                            Access::Allow
    +983                        }
    +984                    }
    +985                    .boxed()
    +986                })),
    +987            }),
    +988            quic: None,
    +989            metrics_addr: None,
    +990        })
    +991        .await?;
    +992
    +993        let relay_url = format!("http://{}", server.http_addr().unwrap());
    +994        let relay_url: RelayUrl = relay_url.parse()?;
    +995
    +996        // set up client a
    +997        let resolver = dns_resolver();
    +998        let result = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver)
    +999            .connect()
    +1000            .await;
    +1001
    +1002        assert!(
    +1003            matches!(result, Err(ConnectError::Handshake { source: handshake::Error::ServerDeniedAuth { reason, .. }, .. }) if reason == "not authorized")
    +1004        );
    +1005
    +1006        // test that another client has access
    +1007
    +1008        // set up client b
    +1009        let b_secret_key = SecretKey::generate(&mut rng);
    +1010        let b_key = b_secret_key.public();
    +1011
    +1012        let resolver = dns_resolver();
    +1013        let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver)
    +1014            .connect()
    +1015            .await?;
    +1016
    +1017        // set up client c
    +1018        let c_secret_key = SecretKey::generate(&mut rng);
    +1019        let c_key = c_secret_key.public();
     1020
    -1021        // set up client a
    -1022        let a_secret_key = SecretKey::generate(rand::thread_rng());
    -1023        let a_key = a_secret_key.public();
    -1024        let resolver = dns_resolver();
    -1025        let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver)
    -1026            .connect()
    -1027            .await?;
    -1028
    -1029        // set up client b
    -1030        let b_secret_key = SecretKey::generate(rand::thread_rng());
    -1031        let b_key = b_secret_key.public();
    -1032        let resolver = dns_resolver();
    -1033        let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver)
    -1034            .protocol(Protocol::Websocket) // Use websockets
    -1035            .connect()
    -1036            .await?;
    -1037
    -1038        // send message from a to b
    -1039        let msg = Bytes::from("hello, b");
    -1040        let res = try_send_recv(&mut client_a, &mut client_b, b_key, msg.clone()).await?;
    -1041
    -1042        if let ReceivedMessage::ReceivedPacket {
    -1043            remote_node_id,
    -1044            data,
    -1045        } = res
    -1046        {
    -1047            assert_eq!(a_key, remote_node_id);
    -1048            assert_eq!(msg, data);
    -1049        } else {
    -1050            panic!("client_b received unexpected message {res:?}");
    -1051        }
    -1052
    -1053        // send message from b to a
    -1054        let msg = Bytes::from("howdy, a");
    -1055        let res = try_send_recv(&mut client_b, &mut client_a, a_key, msg.clone()).await?;
    -1056        if let ReceivedMessage::ReceivedPacket {
    -1057            remote_node_id,
    -1058            data,
    -1059        } = res
    -1060        {
    -1061            assert_eq!(b_key, remote_node_id);
    -1062            assert_eq!(msg, data);
    -1063        } else {
    -1064            panic!("client_a received unexpected message {res:?}");
    -1065        }
    -1066        Ok(())
    -1067    }
    -1068
    -1069    #[tokio::test]
    -1070    #[traced_test]
    -1071    async fn test_relay_access_control() -> Result<()> {
    -1072        let current_span = tracing::info_span!("this is a test");
    -1073        let _guard = current_span.enter();
    -1074
    -1075        let a_secret_key = SecretKey::generate(rand::thread_rng());
    -1076        let a_key = a_secret_key.public();
    -1077
    -1078        let server = Server::spawn(ServerConfig::<(), ()> {
    -1079            relay: Some(RelayConfig::<(), ()> {
    -1080                http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(),
    -1081                tls: None,
    -1082                limits: Default::default(),
    -1083                key_cache_capacity: Some(1024),
    -1084                access: AccessConfig::Restricted(Box::new(move |node_id| {
    -1085                    async move {
    -1086                        info!("checking {}", node_id);
    -1087                        // reject node a
    -1088                        if node_id == a_key {
    -1089                            Access::Deny
    -1090                        } else {
    -1091                            Access::Allow
    -1092                        }
    -1093                    }
    -1094                    .boxed()
    -1095                })),
    -1096            }),
    -1097            quic: None,
    -1098            metrics_addr: None,
    -1099        })
    -1100        .await?;
    -1101
    -1102        let relay_url = format!("http://{}", server.http_addr().unwrap());
    -1103        let relay_url: RelayUrl = relay_url.parse()?;
    -1104
    -1105        // set up client a
    -1106        let resolver = dns_resolver();
    -1107        let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver)
    -1108            .connect()
    -1109            .await?;
    -1110
    -1111        // the next message should be the rejection of the connection
    -1112        tokio::time::timeout(Duration::from_millis(500), async move {
    -1113            match client_a.next().await.unwrap().unwrap() {
    -1114                ReceivedMessage::Health { problem } => {
    -1115                    assert_eq!(problem, Some("not authenticated".to_string()));
    -1116                }
    -1117                msg => {
    -1118                    panic!("other msg: {:?}", msg);
    -1119                }
    -1120            }
    -1121        })
    -1122        .await
    -1123        .context("timeout")?;
    -1124
    -1125        // test that another client has access
    -1126
    -1127        // set up client b
    -1128        let b_secret_key = SecretKey::generate(rand::thread_rng());
    -1129        let b_key = b_secret_key.public();
    -1130
    -1131        let resolver = dns_resolver();
    -1132        let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver)
    -1133            .connect()
    -1134            .await?;
    -1135
    -1136        // set up client c
    -1137        let c_secret_key = SecretKey::generate(rand::thread_rng());
    -1138        let c_key = c_secret_key.public();
    -1139
    -1140        let resolver = dns_resolver();
    -1141        let mut client_c = ClientBuilder::new(relay_url.clone(), c_secret_key, resolver)
    -1142            .connect()
    -1143            .await?;
    -1144
    -1145        // send message from b to c
    -1146        let msg = Bytes::from("hello, c");
    -1147        let res = try_send_recv(&mut client_b, &mut client_c, c_key, msg.clone()).await?;
    -1148
    -1149        if let ReceivedMessage::ReceivedPacket {
    -1150            remote_node_id,
    -1151            data,
    -1152        } = res
    -1153        {
    -1154            assert_eq!(b_key, remote_node_id);
    -1155            assert_eq!(msg, data);
    -1156        } else {
    -1157            panic!("client_c received unexpected message {res:?}");
    -1158        }
    -1159
    -1160        Ok(())
    -1161    }
    -1162
    -1163    #[tokio::test]
    -1164    #[traced_test]
    -1165    async fn test_relay_clients_full() -> Result<()> {
    -1166        let server = spawn_local_relay().await.unwrap();
    -1167        let relay_url = format!("http://{}", server.http_addr().unwrap());
    -1168        let relay_url: RelayUrl = relay_url.parse().unwrap();
    -1169
    -1170        // set up client a
    -1171        let a_secret_key = SecretKey::generate(rand::thread_rng());
    -1172        let resolver = dns_resolver();
    -1173        let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone())
    -1174            .connect()
    -1175            .await?;
    -1176
    -1177        // set up client b
    -1178        let b_secret_key = SecretKey::generate(rand::thread_rng());
    -1179        let b_key = b_secret_key.public();
    -1180        let _client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone())
    -1181            .connect()
    -1182            .await?;
    -1183
    -1184        // send messages from a to b, without b receiving anything.
    -1185        // we should still keep succeeding to send, even if the packet won't be forwarded
    -1186        // by the relay server because the server's send queue for b fills up.
    -1187        let msg = Bytes::from("hello, b");
    -1188        for _i in 0..1000 {
    -1189            client_a
    -1190                .send(SendMessage::SendPacket(b_key, msg.clone()))
    -1191                .await?;
    -1192        }
    -1193        Ok(())
    -1194    }
    -1195}
    \ No newline at end of file +1021 let resolver = dns_resolver(); +1022 let mut client_c = ClientBuilder::new(relay_url.clone(), c_secret_key, resolver) +1023 .connect() +1024 .await?; +1025 +1026 // send message from b to c +1027 let msg = Datagrams::from("hello, c"); +1028 let res = try_send_recv(&mut client_b, &mut client_c, c_key, msg.clone()).await?; +1029 +1030 if let RelayToClientMsg::Datagrams { +1031 remote_node_id, +1032 datagrams, +1033 } = res +1034 { +1035 assert_eq!(b_key, remote_node_id); +1036 assert_eq!(msg, datagrams); +1037 } else { +1038 panic!("client_c received unexpected message {res:?}"); +1039 } +1040 +1041 Ok(()) +1042 } +1043 +1044 #[tokio::test] +1045 #[traced_test] +1046 async fn test_relay_clients_full() -> Result<()> { +1047 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +1048 let server = spawn_local_relay().await.unwrap(); +1049 let relay_url = format!("http://{}", server.http_addr().unwrap()); +1050 let relay_url: RelayUrl = relay_url.parse().unwrap(); +1051 +1052 // set up client a +1053 let a_secret_key = SecretKey::generate(&mut rng); +1054 let resolver = dns_resolver(); +1055 let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone()) +1056 .connect() +1057 .await?; +1058 +1059 // set up client b +1060 let b_secret_key = SecretKey::generate(&mut rng); +1061 let b_key = b_secret_key.public(); +1062 let _client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone()) +1063 .connect() +1064 .await?; +1065 +1066 // send messages from a to b, without b receiving anything. +1067 // we should still keep succeeding to send, even if the packet won't be forwarded +1068 // by the relay server because the server's send queue for b fills up. +1069 let msg = Datagrams::from("hello, b"); +1070 for _i in 0..1000 { +1071 client_a +1072 .send(ClientToRelayMsg::Datagrams { +1073 dst_node_id: b_key, +1074 datagrams: msg.clone(), +1075 }) +1076 .await?; +1077 } +1078 Ok(()) +1079 } +1080}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/server/client.rs.html b/pr/3367/docs/src/iroh_relay/server/client.rs.html index bdca3159c9..6cad6503fd 100644 --- a/pr/3367/docs/src/iroh_relay/server/client.rs.html +++ b/pr/3367/docs/src/iroh_relay/server/client.rs.html @@ -1,948 +1,780 @@ -client.rs - source

    iroh_relay/server/
    client.rs

    1//! The server-side representation of an ongoing client relaying connection.
    +client.rs - source

    iroh_relay/server/
    client.rs

    1//! The server-side representation of an ongoing client relaying connection.
     2
    -3use std::{
    -4    collections::HashSet, future::Future, num::NonZeroU32, pin::Pin, sync::Arc, task::Poll,
    -5    time::Duration,
    -6};
    -7
    -8use bytes::Bytes;
    -9use iroh_base::NodeId;
    -10use n0_future::{FutureExt, Sink, SinkExt, Stream, StreamExt};
    -11use nested_enum_utils::common_fields;
    -12use rand::Rng;
    -13use snafu::{Backtrace, GenerateImplicitData, Snafu};
    -14use time::{Date, OffsetDateTime};
    -15use tokio::{
    -16    sync::mpsc::{self, error::TrySendError},
    -17    time::MissedTickBehavior,
    -18};
    -19use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle};
    -20use tracing::{debug, error, instrument, trace, warn, Instrument};
    -21
    -22use crate::{
    -23    protos::{
    -24        disco,
    -25        relay::{write_frame, Frame, SendError as SendRelayError, PING_INTERVAL},
    -26    },
    -27    server::{
    -28        clients::Clients,
    -29        metrics::Metrics,
    -30        streams::{RelayedStream, StreamError},
    -31        ClientRateLimit,
    -32    },
    -33    PingTracker,
    -34};
    -35
    -36/// A request to write a dataframe to a Client
    -37#[derive(Debug, Clone)]
    -38pub(super) struct Packet {
    -39    /// The sender of the packet
    -40    src: NodeId,
    -41    /// The data packet bytes.
    -42    data: Bytes,
    -43}
    -44
    -45/// Configuration for a [`Client`].
    -46#[derive(Debug)]
    -47pub(super) struct Config {
    -48    pub(super) node_id: NodeId,
    -49    pub(super) stream: RelayedStream,
    -50    pub(super) write_timeout: Duration,
    -51    pub(super) channel_capacity: usize,
    -52    pub(super) rate_limit: Option<ClientRateLimit>,
    -53}
    -54
    -55/// The [`Server`] side representation of a [`Client`]'s connection.
    -56///
    -57/// [`Server`]: crate::server::Server
    -58/// [`Client`]: crate::client::Client
    -59#[derive(Debug)]
    -60pub(super) struct Client {
    -61    /// Identity of the connected peer.
    -62    node_id: NodeId,
    -63    /// Connection identifier.
    -64    connection_id: u64,
    -65    /// Used to close the connection loop.
    -66    done: CancellationToken,
    -67    /// Actor handle.
    -68    handle: AbortOnDropHandle<()>,
    -69    /// Queue of packets intended for the client.
    -70    send_queue: mpsc::Sender<Packet>,
    -71    /// Queue of disco packets intended for the client.
    -72    disco_send_queue: mpsc::Sender<Packet>,
    -73    /// Channel to notify the client that a previous sender has disconnected.
    -74    peer_gone: mpsc::Sender<NodeId>,
    -75}
    -76
    -77impl Client {
    -78    /// Creates a client from a connection & starts a read and write loop to handle io to and from
    -79    /// the client
    -80    /// Call [`Client::shutdown`] to close the read and write loops before dropping the [`Client`]
    -81    pub(super) fn new(
    -82        config: Config,
    -83        connection_id: u64,
    -84        clients: &Clients,
    -85        metrics: Arc<Metrics>,
    -86    ) -> Client {
    -87        let Config {
    -88            node_id,
    -89            stream: io,
    -90            write_timeout,
    -91            channel_capacity,
    -92            rate_limit,
    -93        } = config;
    -94
    -95        let stream = match rate_limit {
    -96            Some(cfg) => {
    -97                let mut quota = governor::Quota::per_second(cfg.bytes_per_second);
    -98                if let Some(max_burst) = cfg.max_burst_bytes {
    -99                    quota = quota.allow_burst(max_burst);
    -100                }
    -101                let limiter = governor::RateLimiter::direct(quota);
    -102                RateLimitedRelayedStream::new(io, limiter, metrics.clone())
    -103            }
    -104            None => RateLimitedRelayedStream::unlimited(io, metrics.clone()),
    -105        };
    -106
    -107        let done = CancellationToken::new();
    -108        let (send_queue_s, send_queue_r) = mpsc::channel(channel_capacity);
    -109
    -110        let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(channel_capacity);
    -111        let (peer_gone_s, peer_gone_r) = mpsc::channel(channel_capacity);
    -112
    -113        let actor = Actor {
    -114            stream,
    -115            timeout: write_timeout,
    -116            send_queue: send_queue_r,
    -117            disco_send_queue: disco_send_queue_r,
    -118            node_gone: peer_gone_r,
    -119            node_id,
    -120            connection_id,
    -121            clients: clients.clone(),
    -122            client_counter: ClientCounter::default(),
    -123            ping_tracker: PingTracker::default(),
    -124            metrics,
    -125        };
    +3use std::{collections::HashSet, sync::Arc, time::Duration};
    +4
    +5use iroh_base::NodeId;
    +6use n0_future::{SinkExt, StreamExt};
    +7use nested_enum_utils::common_fields;
    +8use rand::Rng;
    +9use snafu::{Backtrace, GenerateImplicitData, Snafu};
    +10use time::{Date, OffsetDateTime};
    +11use tokio::{
    +12    sync::mpsc::{self, error::TrySendError},
    +13    time::MissedTickBehavior,
    +14};
    +15use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle};
    +16use tracing::{Instrument, debug, trace, warn};
    +17
    +18use crate::{
    +19    PingTracker,
    +20    protos::{
    +21        disco,
    +22        relay::{ClientToRelayMsg, Datagrams, PING_INTERVAL, RelayToClientMsg},
    +23    },
    +24    server::{
    +25        clients::Clients,
    +26        metrics::Metrics,
    +27        streams::{RecvError as RelayRecvError, RelayedStream, SendError as RelaySendError},
    +28    },
    +29};
    +30
    +31/// A request to write a dataframe to a Client
    +32#[derive(Debug, Clone)]
    +33pub(super) struct Packet {
    +34    /// The sender of the packet
    +35    src: NodeId,
    +36    /// The data packet bytes.
    +37    data: Datagrams,
    +38}
    +39
    +40/// Configuration for a [`Client`].
    +41#[derive(Debug)]
    +42pub(super) struct Config {
    +43    pub(super) node_id: NodeId,
    +44    pub(super) stream: RelayedStream,
    +45    pub(super) write_timeout: Duration,
    +46    pub(super) channel_capacity: usize,
    +47}
    +48
    +49/// The [`Server`] side representation of a [`Client`]'s connection.
    +50///
    +51/// [`Server`]: crate::server::Server
    +52/// [`Client`]: crate::client::Client
    +53#[derive(Debug)]
    +54pub(super) struct Client {
    +55    /// Identity of the connected peer.
    +56    node_id: NodeId,
    +57    /// Connection identifier.
    +58    connection_id: u64,
    +59    /// Used to close the connection loop.
    +60    done: CancellationToken,
    +61    /// Actor handle.
    +62    handle: AbortOnDropHandle<()>,
    +63    /// Queue of packets intended for the client.
    +64    send_queue: mpsc::Sender<Packet>,
    +65    /// Queue of disco packets intended for the client.
    +66    disco_send_queue: mpsc::Sender<Packet>,
    +67    /// Channel to notify the client that a previous sender has disconnected.
    +68    peer_gone: mpsc::Sender<NodeId>,
    +69}
    +70
    +71impl Client {
    +72    /// Creates a client from a connection & starts a read and write loop to handle io to and from
    +73    /// the client
    +74    /// Call [`Client::shutdown`] to close the read and write loops before dropping the [`Client`]
    +75    pub(super) fn new(
    +76        config: Config,
    +77        connection_id: u64,
    +78        clients: &Clients,
    +79        metrics: Arc<Metrics>,
    +80    ) -> Client {
    +81        let Config {
    +82            node_id,
    +83            stream,
    +84            write_timeout,
    +85            channel_capacity,
    +86        } = config;
    +87
    +88        let done = CancellationToken::new();
    +89        let (send_queue_s, send_queue_r) = mpsc::channel(channel_capacity);
    +90
    +91        let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(channel_capacity);
    +92        let (peer_gone_s, peer_gone_r) = mpsc::channel(channel_capacity);
    +93
    +94        let actor = Actor {
    +95            stream,
    +96            timeout: write_timeout,
    +97            send_queue: send_queue_r,
    +98            disco_send_queue: disco_send_queue_r,
    +99            node_gone: peer_gone_r,
    +100            node_id,
    +101            connection_id,
    +102            clients: clients.clone(),
    +103            client_counter: ClientCounter::default(),
    +104            ping_tracker: PingTracker::default(),
    +105            metrics,
    +106        };
    +107
    +108        // start io loop
    +109        let io_done = done.clone();
    +110        let handle = tokio::task::spawn(actor.run(io_done).instrument(tracing::info_span!(
    +111            "client-connection-actor",
    +112            remote_node = %node_id.fmt_short(),
    +113            connection_id = connection_id
    +114        )));
    +115
    +116        Client {
    +117            node_id,
    +118            connection_id,
    +119            handle: AbortOnDropHandle::new(handle),
    +120            done,
    +121            send_queue: send_queue_s,
    +122            disco_send_queue: disco_send_queue_s,
    +123            peer_gone: peer_gone_s,
    +124        }
    +125    }
     126
    -127        // start io loop
    -128        let io_done = done.clone();
    -129        let handle = tokio::task::spawn(actor.run(io_done).instrument(tracing::info_span!(
    -130            "client connection actor",
    -131            remote_node = %node_id.fmt_short(),
    -132            connection_id = connection_id
    -133        )));
    -134
    -135        Client {
    -136            node_id,
    -137            connection_id,
    -138            handle: AbortOnDropHandle::new(handle),
    -139            done,
    -140            send_queue: send_queue_s,
    -141            disco_send_queue: disco_send_queue_s,
    -142            peer_gone: peer_gone_s,
    -143        }
    -144    }
    -145
    -146    pub(super) fn connection_id(&self) -> u64 {
    -147        self.connection_id
    -148    }
    -149
    -150    /// Shutdown the reader and writer loops and closes the connection.
    -151    ///
    -152    /// Any shutdown errors will be logged as warnings.
    -153    pub(super) async fn shutdown(self) {
    -154        self.start_shutdown();
    -155        if let Err(e) = self.handle.await {
    -156            warn!(
    -157                remote_node = %self.node_id.fmt_short(),
    -158                "error closing actor loop: {e:#?}",
    -159            );
    -160        };
    -161    }
    -162
    -163    /// Starts the process of shutdown.
    -164    pub(super) fn start_shutdown(&self) {
    -165        self.done.cancel();
    -166    }
    -167
    -168    pub(super) fn try_send_packet(
    -169        &self,
    -170        src: NodeId,
    -171        data: Bytes,
    -172    ) -> Result<(), TrySendError<Packet>> {
    -173        self.send_queue.try_send(Packet { src, data })
    -174    }
    -175
    -176    pub(super) fn try_send_disco_packet(
    -177        &self,
    -178        src: NodeId,
    -179        data: Bytes,
    -180    ) -> Result<(), TrySendError<Packet>> {
    -181        self.disco_send_queue.try_send(Packet { src, data })
    -182    }
    -183
    -184    pub(super) fn try_send_peer_gone(&self, key: NodeId) -> Result<(), TrySendError<NodeId>> {
    -185        self.peer_gone.try_send(key)
    -186    }
    -187}
    -188
    -189/// Handle frame error
    -190#[common_fields({
    -191    backtrace: Option<Backtrace>,
    -192})]
    -193#[allow(missing_docs)]
    -194#[derive(Debug, Snafu)]
    -195#[non_exhaustive]
    -196pub enum HandleFrameError {
    -197    #[snafu(transparent)]
    -198    ForwardPacket { source: ForwardPacketError },
    -199    #[snafu(transparent)]
    -200    Streams { source: StreamError },
    -201    #[snafu(display("Stream terminated"))]
    -202    StreamTerminated {
    -203        #[snafu(implicit)]
    -204        span_trace: n0_snafu::SpanTrace,
    -205    },
    -206    #[snafu(transparent)]
    -207    Relay { source: SendRelayError },
    -208    #[snafu(display("Server issue: {problem:?}"))]
    -209    Health {
    -210        problem: Bytes,
    -211        #[snafu(implicit)]
    -212        span_trace: n0_snafu::SpanTrace,
    -213    },
    -214}
    -215
    -216/// Run error
    -217#[common_fields({
    -218    backtrace: Option<Backtrace>,
    -219})]
    -220#[allow(missing_docs)]
    -221#[derive(Debug, Snafu)]
    -222#[non_exhaustive]
    -223pub enum RunError {
    -224    #[snafu(transparent)]
    -225    ForwardPacket { source: ForwardPacketError },
    -226    #[snafu(display("Flush"))]
    -227    Flush {
    -228        #[snafu(implicit)]
    -229        span_trace: n0_snafu::SpanTrace,
    -230    },
    -231    #[snafu(transparent)]
    -232    HandleFrame { source: HandleFrameError },
    -233    #[snafu(display("Server.disco_send_queue dropped"))]
    -234    DiscoSendQueuePacketDrop {
    -235        #[snafu(implicit)]
    -236        span_trace: n0_snafu::SpanTrace,
    -237    },
    -238    #[snafu(display("Failed to send disco packet"))]
    -239    DiscoPacketSend {
    -240        source: SendRelayError,
    -241        #[snafu(implicit)]
    -242        span_trace: n0_snafu::SpanTrace,
    -243    },
    -244    #[snafu(display("Server.send_queue dropped"))]
    -245    SendQueuePacketDrop {
    -246        #[snafu(implicit)]
    -247        span_trace: n0_snafu::SpanTrace,
    -248    },
    -249    #[snafu(display("Failed to send packet"))]
    -250    PacketSend {
    -251        source: SendRelayError,
    -252        #[snafu(implicit)]
    -253        span_trace: n0_snafu::SpanTrace,
    -254    },
    -255    #[snafu(display("Server.node_gone dropped"))]
    -256    NodeGoneDrop {
    -257        #[snafu(implicit)]
    -258        span_trace: n0_snafu::SpanTrace,
    -259    },
    -260    #[snafu(display("NodeGone write frame failed"))]
    -261    NodeGoneWriteFrame {
    -262        source: SendRelayError,
    -263        #[snafu(implicit)]
    -264        span_trace: n0_snafu::SpanTrace,
    -265    },
    -266    #[snafu(display("Keep alive write frame failed"))]
    -267    KeepAliveWriteFrame {
    -268        source: SendRelayError,
    -269        #[snafu(implicit)]
    -270        span_trace: n0_snafu::SpanTrace,
    -271    },
    -272    #[snafu(display("Tick flush"))]
    -273    TickFlush {
    -274        #[snafu(implicit)]
    -275        span_trace: n0_snafu::SpanTrace,
    -276    },
    -277}
    -278
    -279/// Manages all the reads and writes to this client. It periodically sends a `KEEP_ALIVE`
    -280/// message to the client to keep the connection alive.
    -281///
    -282/// Call `run` to manage the input and output to and from the connection and the server.
    -283/// Once it hits its first write error or error receiving off a channel,
    -284/// it errors on return.
    -285/// If writes do not complete in the given `timeout`, it will also error.
    -286///
    -287/// On the "write" side, the [`Actor`] can send the client:
    -288///  - a KEEP_ALIVE frame
    -289///  - a PEER_GONE frame to inform the client that a peer they have previously sent messages to
    -290///    is gone from the network
    -291///  - packets from other peers
    -292///
    -293/// On the "read" side, it can:
    -294///     - receive a ping and write a pong back
    -295///     to speak to the node ID associated with that client.
    -296#[derive(Debug)]
    -297struct Actor {
    -298    /// IO Stream to talk to the client
    -299    stream: RateLimitedRelayedStream,
    -300    /// Maximum time we wait to complete a write to the client
    -301    timeout: Duration,
    -302    /// Packets queued to send to the client
    -303    send_queue: mpsc::Receiver<Packet>,
    -304    /// Important packets queued to send to the client
    -305    disco_send_queue: mpsc::Receiver<Packet>,
    -306    /// Notify the client that a previous sender has disconnected
    -307    node_gone: mpsc::Receiver<NodeId>,
    -308    /// [`NodeId`] of this client
    -309    node_id: NodeId,
    -310    /// Connection identifier.
    -311    connection_id: u64,
    -312    /// Reference to the other connected clients.
    -313    clients: Clients,
    -314    /// Statistics about the connected clients
    -315    client_counter: ClientCounter,
    -316    ping_tracker: PingTracker,
    -317    metrics: Arc<Metrics>,
    -318}
    -319
    -320impl Actor {
    -321    async fn run(mut self, done: CancellationToken) {
    -322        // Note the accept and disconnects metrics must be in a pair.  Technically the
    -323        // connection is accepted long before this in the HTTP server, but it is clearer to
    -324        // handle the metric here.
    -325        self.metrics.accepts.inc();
    -326        if self.client_counter.update(self.node_id) {
    -327            self.metrics.unique_client_keys.inc();
    -328        }
    -329        match self.run_inner(done).await {
    -330            Err(e) => {
    -331                warn!("actor errored {e:#?}, exiting");
    -332            }
    -333            Ok(()) => {
    -334                debug!("actor finished, exiting");
    -335            }
    -336        }
    -337
    -338        self.clients.unregister(self.connection_id, self.node_id);
    -339        self.metrics.disconnects.inc();
    -340    }
    +127    pub(super) fn connection_id(&self) -> u64 {
    +128        self.connection_id
    +129    }
    +130
    +131    /// Shutdown the reader and writer loops and closes the connection.
    +132    ///
    +133    /// Any shutdown errors will be logged as warnings.
    +134    pub(super) async fn shutdown(self) {
    +135        self.start_shutdown();
    +136        if let Err(e) = self.handle.await {
    +137            warn!(
    +138                remote_node = %self.node_id.fmt_short(),
    +139                "error closing actor loop: {e:#?}",
    +140            );
    +141        };
    +142    }
    +143
    +144    /// Starts the process of shutdown.
    +145    pub(super) fn start_shutdown(&self) {
    +146        self.done.cancel();
    +147    }
    +148
    +149    pub(super) fn try_send_packet(
    +150        &self,
    +151        src: NodeId,
    +152        data: Datagrams,
    +153    ) -> Result<(), TrySendError<Packet>> {
    +154        self.send_queue.try_send(Packet { src, data })
    +155    }
    +156
    +157    pub(super) fn try_send_disco_packet(
    +158        &self,
    +159        src: NodeId,
    +160        data: Datagrams,
    +161    ) -> Result<(), TrySendError<Packet>> {
    +162        self.disco_send_queue.try_send(Packet { src, data })
    +163    }
    +164
    +165    pub(super) fn try_send_peer_gone(&self, key: NodeId) -> Result<(), TrySendError<NodeId>> {
    +166        self.peer_gone.try_send(key)
    +167    }
    +168}
    +169
    +170/// Error for [`Actor::handle_frame`]
    +171#[common_fields({
    +172    backtrace: Option<Backtrace>,
    +173})]
    +174#[allow(missing_docs)]
    +175#[derive(Debug, Snafu)]
    +176#[non_exhaustive]
    +177pub enum HandleFrameError {
    +178    #[snafu(transparent)]
    +179    ForwardPacket { source: ForwardPacketError },
    +180    #[snafu(display("Stream terminated"))]
    +181    StreamTerminated {},
    +182    #[snafu(transparent)]
    +183    Recv { source: RelayRecvError },
    +184    #[snafu(transparent)]
    +185    Send { source: WriteFrameError },
    +186}
    +187
    +188/// Error for [`Actor::write_frame`]
    +189#[common_fields({
    +190    backtrace: Option<Backtrace>,
    +191})]
    +192#[allow(missing_docs)]
    +193#[derive(Debug, Snafu)]
    +194#[non_exhaustive]
    +195pub enum WriteFrameError {
    +196    #[snafu(transparent)]
    +197    Stream { source: RelaySendError },
    +198    #[snafu(transparent)]
    +199    Timeout { source: tokio::time::error::Elapsed },
    +200}
    +201
    +202/// Run error
    +203#[common_fields({
    +204    backtrace: Option<Backtrace>,
    +205})]
    +206#[allow(missing_docs)]
    +207#[derive(Debug, Snafu)]
    +208#[non_exhaustive]
    +209pub enum RunError {
    +210    #[snafu(transparent)]
    +211    ForwardPacket { source: ForwardPacketError },
    +212    #[snafu(display("Flush"))]
    +213    Flush {
    +214        #[snafu(implicit)]
    +215        span_trace: n0_snafu::SpanTrace,
    +216    },
    +217    #[snafu(transparent)]
    +218    HandleFrame { source: HandleFrameError },
    +219    #[snafu(display("Server.disco_send_queue dropped"))]
    +220    DiscoSendQueuePacketDrop {
    +221        #[snafu(implicit)]
    +222        span_trace: n0_snafu::SpanTrace,
    +223    },
    +224    #[snafu(display("Failed to send disco packet"))]
    +225    DiscoPacketSend {
    +226        source: WriteFrameError,
    +227        #[snafu(implicit)]
    +228        span_trace: n0_snafu::SpanTrace,
    +229    },
    +230    #[snafu(display("Server.send_queue dropped"))]
    +231    SendQueuePacketDrop {
    +232        #[snafu(implicit)]
    +233        span_trace: n0_snafu::SpanTrace,
    +234    },
    +235    #[snafu(display("Failed to send packet"))]
    +236    PacketSend {
    +237        source: WriteFrameError,
    +238        #[snafu(implicit)]
    +239        span_trace: n0_snafu::SpanTrace,
    +240    },
    +241    #[snafu(display("Server.node_gone dropped"))]
    +242    NodeGoneDrop {
    +243        #[snafu(implicit)]
    +244        span_trace: n0_snafu::SpanTrace,
    +245    },
    +246    #[snafu(display("NodeGone write frame failed"))]
    +247    NodeGoneWriteFrame {
    +248        source: WriteFrameError,
    +249        #[snafu(implicit)]
    +250        span_trace: n0_snafu::SpanTrace,
    +251    },
    +252    #[snafu(display("Keep alive write frame failed"))]
    +253    KeepAliveWriteFrame {
    +254        source: WriteFrameError,
    +255        #[snafu(implicit)]
    +256        span_trace: n0_snafu::SpanTrace,
    +257    },
    +258    #[snafu(display("Tick flush"))]
    +259    TickFlush {
    +260        #[snafu(implicit)]
    +261        span_trace: n0_snafu::SpanTrace,
    +262    },
    +263}
    +264
    +265/// Manages all the reads and writes to this client. It periodically sends a `KEEP_ALIVE`
    +266/// message to the client to keep the connection alive.
    +267///
    +268/// Call `run` to manage the input and output to and from the connection and the server.
    +269/// Once it hits its first write error or error receiving off a channel,
    +270/// it errors on return.
    +271/// If writes do not complete in the given `timeout`, it will also error.
    +272///
    +273/// On the "write" side, the [`Actor`] can send the client:
    +274///  - a KEEP_ALIVE frame
    +275///  - a PEER_GONE frame to inform the client that a peer they have previously sent messages to
    +276///    is gone from the network
    +277///  - packets from other peers
    +278///
    +279/// On the "read" side, it can:
    +280///     - receive a ping and write a pong back
    +281///     to speak to the node ID associated with that client.
    +282#[derive(Debug)]
    +283struct Actor {
    +284    /// IO Stream to talk to the client
    +285    stream: RelayedStream,
    +286    /// Maximum time we wait to complete a write to the client
    +287    timeout: Duration,
    +288    /// Packets queued to send to the client
    +289    send_queue: mpsc::Receiver<Packet>,
    +290    /// Important packets queued to send to the client
    +291    disco_send_queue: mpsc::Receiver<Packet>,
    +292    /// Notify the client that a previous sender has disconnected
    +293    node_gone: mpsc::Receiver<NodeId>,
    +294    /// [`NodeId`] of this client
    +295    node_id: NodeId,
    +296    /// Connection identifier.
    +297    connection_id: u64,
    +298    /// Reference to the other connected clients.
    +299    clients: Clients,
    +300    /// Statistics about the connected clients
    +301    client_counter: ClientCounter,
    +302    ping_tracker: PingTracker,
    +303    metrics: Arc<Metrics>,
    +304}
    +305
    +306impl Actor {
    +307    async fn run(mut self, done: CancellationToken) {
    +308        // Note the accept and disconnects metrics must be in a pair.  Technically the
    +309        // connection is accepted long before this in the HTTP server, but it is clearer to
    +310        // handle the metric here.
    +311        self.metrics.accepts.inc();
    +312        if self.client_counter.update(self.node_id) {
    +313            self.metrics.unique_client_keys.inc();
    +314        }
    +315        match self.run_inner(done).await {
    +316            Err(e) => {
    +317                warn!("actor errored {e:#}, exiting");
    +318            }
    +319            Ok(()) => {
    +320                debug!("actor finished, exiting");
    +321            }
    +322        }
    +323
    +324        self.clients.unregister(self.connection_id, self.node_id);
    +325        self.metrics.disconnects.inc();
    +326    }
    +327
    +328    async fn run_inner(&mut self, done: CancellationToken) -> Result<(), RunError> {
    +329        use snafu::ResultExt;
    +330
    +331        // Add some jitter to ping pong interactions, to avoid all pings being sent at the same time
    +332        let next_interval = || {
    +333            let random_secs = rand::rng().random_range(1..=5);
    +334            Duration::from_secs(random_secs) + PING_INTERVAL
    +335        };
    +336
    +337        let mut ping_interval = tokio::time::interval(next_interval());
    +338        // ticks immediately
    +339        ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
    +340        ping_interval.tick().await;
     341
    -342    async fn run_inner(&mut self, done: CancellationToken) -> Result<(), RunError> {
    -343        use snafu::ResultExt;
    -344
    -345        // Add some jitter to ping pong interactions, to avoid all pings being sent at the same time
    -346        let next_interval = || {
    -347            let random_secs = rand::rngs::OsRng.gen_range(1..=5);
    -348            Duration::from_secs(random_secs) + PING_INTERVAL
    -349        };
    -350
    -351        let mut ping_interval = tokio::time::interval(next_interval());
    -352        // ticks immediately
    -353        ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
    -354        ping_interval.tick().await;
    -355
    -356        loop {
    -357            tokio::select! {
    -358                biased;
    -359
    -360                _ = done.cancelled() => {
    -361                    trace!("actor loop cancelled, exiting");
    -362                    // final flush
    -363                    self.stream.flush().await.map_err(|_| FlushSnafu.build())?;
    -364                    break;
    -365                }
    -366                maybe_frame = self.stream.next() => {
    -367                    self.handle_frame(maybe_frame).await?;
    -368                    // reset the ping interval, we just received a message
    -369                    ping_interval.reset();
    -370                }
    -371                // First priority, disco packets
    -372                packet = self.disco_send_queue.recv() => {
    -373                    let packet = packet.ok_or(DiscoSendQueuePacketDropSnafu.build())?;
    -374                    self.send_disco_packet(packet).await.context(DiscoPacketSendSnafu)?;
    -375                }
    -376                // Second priority, sending regular packets
    -377                packet = self.send_queue.recv() => {
    -378                    let packet = packet.ok_or(SendQueuePacketDropSnafu.build())?;
    -379                    self.send_packet(packet).await.context(PacketSendSnafu)?;
    -380                }
    -381                // Last priority, sending left nodes
    -382                node_id = self.node_gone.recv() => {
    -383                    let node_id = node_id.ok_or(NodeGoneDropSnafu.build())?;
    -384                    trace!("node_id gone: {:?}", node_id);
    -385                    self.write_frame(Frame::NodeGone { node_id }).await.context(NodeGoneWriteFrameSnafu)?;
    -386                }
    -387                _ = self.ping_tracker.timeout() => {
    -388                    trace!("pong timed out");
    -389                    break;
    -390                }
    -391                _ = ping_interval.tick() => {
    -392                    trace!("keep alive ping");
    -393                    // new interval
    -394                    ping_interval.reset_after(next_interval());
    -395                    let data = self.ping_tracker.new_ping();
    -396                    self.write_frame(Frame::Ping { data }).await.context(KeepAliveWriteFrameSnafu)?;
    -397                }
    -398            }
    -399
    -400            self.stream
    -401                .flush()
    -402                .await
    -403                .map_err(|_| TickFlushSnafu.build())?;
    -404        }
    -405        Ok(())
    -406    }
    -407
    -408    /// Writes the given frame to the connection.
    -409    ///
    -410    /// Errors if the send does not happen within the `timeout` duration
    -411    async fn write_frame(&mut self, frame: Frame) -> Result<(), SendRelayError> {
    -412        write_frame(&mut self.stream, frame, Some(self.timeout)).await
    -413    }
    -414
    -415    /// Writes contents to the client in a `RECV_PACKET` frame.
    -416    ///
    -417    /// Errors if the send does not happen within the `timeout` duration
    -418    /// Does not flush.
    -419    async fn send_raw(&mut self, packet: Packet) -> Result<(), SendRelayError> {
    -420        let src_key = packet.src;
    -421        let content = packet.data;
    -422
    -423        if let Ok(len) = content.len().try_into() {
    -424            self.metrics.bytes_sent.inc_by(len);
    -425        }
    -426        self.write_frame(Frame::RecvPacket { src_key, content })
    -427            .await
    -428    }
    -429
    -430    async fn send_packet(&mut self, packet: Packet) -> Result<(), SendRelayError> {
    -431        trace!("send packet");
    -432        match self.send_raw(packet).await {
    -433            Ok(()) => {
    -434                self.metrics.send_packets_sent.inc();
    -435                Ok(())
    -436            }
    -437            Err(err) => {
    -438                self.metrics.send_packets_dropped.inc();
    -439                Err(err)
    +342        loop {
    +343            tokio::select! {
    +344                biased;
    +345
    +346                _ = done.cancelled() => {
    +347                    trace!("actor loop cancelled, exiting");
    +348                    // final flush
    +349                    self.stream.flush().await.map_err(|_| FlushSnafu.build())?;
    +350                    break;
    +351                }
    +352                maybe_frame = self.stream.next() => {
    +353                    self.handle_frame(maybe_frame).await?;
    +354                    // reset the ping interval, we just received a message
    +355                    ping_interval.reset();
    +356                }
    +357                // First priority, disco packets
    +358                packet = self.disco_send_queue.recv() => {
    +359                    let packet = packet.ok_or(DiscoSendQueuePacketDropSnafu.build())?;
    +360                    self.send_disco_packet(packet).await.context(DiscoPacketSendSnafu)?;
    +361                }
    +362                // Second priority, sending regular packets
    +363                packet = self.send_queue.recv() => {
    +364                    let packet = packet.ok_or(SendQueuePacketDropSnafu.build())?;
    +365                    self.send_packet(packet).await.context(PacketSendSnafu)?;
    +366                }
    +367                // Last priority, sending left nodes
    +368                node_id = self.node_gone.recv() => {
    +369                    let node_id = node_id.ok_or(NodeGoneDropSnafu.build())?;
    +370                    trace!("node_id gone: {:?}", node_id);
    +371                    self.write_frame(RelayToClientMsg::NodeGone(node_id)).await.context(NodeGoneWriteFrameSnafu)?;
    +372                }
    +373                _ = self.ping_tracker.timeout() => {
    +374                    trace!("pong timed out");
    +375                    break;
    +376                }
    +377                _ = ping_interval.tick() => {
    +378                    trace!("keep alive ping");
    +379                    // new interval
    +380                    ping_interval.reset_after(next_interval());
    +381                    let data = self.ping_tracker.new_ping();
    +382                    self.write_frame(RelayToClientMsg::Ping(data)).await.context(KeepAliveWriteFrameSnafu)?;
    +383                }
    +384            }
    +385
    +386            self.stream
    +387                .flush()
    +388                .await
    +389                .map_err(|_| TickFlushSnafu.build())?;
    +390        }
    +391        Ok(())
    +392    }
    +393
    +394    /// Writes the given frame to the connection.
    +395    ///
    +396    /// Errors if the send does not happen within the `timeout` duration
    +397    async fn write_frame(&mut self, frame: RelayToClientMsg) -> Result<(), WriteFrameError> {
    +398        tokio::time::timeout(self.timeout, self.stream.send(frame)).await??;
    +399        Ok(())
    +400    }
    +401
    +402    /// Writes contents to the client in a `RECV_PACKET` frame.
    +403    ///
    +404    /// Errors if the send does not happen within the `timeout` duration
    +405    /// Does not flush.
    +406    async fn send_raw(&mut self, packet: Packet) -> Result<(), WriteFrameError> {
    +407        let remote_node_id = packet.src;
    +408        let datagrams = packet.data;
    +409
    +410        if let Ok(len) = datagrams.contents.len().try_into() {
    +411            self.metrics.bytes_sent.inc_by(len);
    +412        }
    +413        self.write_frame(RelayToClientMsg::Datagrams {
    +414            remote_node_id,
    +415            datagrams,
    +416        })
    +417        .await
    +418    }
    +419
    +420    async fn send_packet(&mut self, packet: Packet) -> Result<(), WriteFrameError> {
    +421        trace!("send packet");
    +422        match self.send_raw(packet).await {
    +423            Ok(()) => {
    +424                self.metrics.send_packets_sent.inc();
    +425                Ok(())
    +426            }
    +427            Err(err) => {
    +428                self.metrics.send_packets_dropped.inc();
    +429                Err(err)
    +430            }
    +431        }
    +432    }
    +433
    +434    async fn send_disco_packet(&mut self, packet: Packet) -> Result<(), WriteFrameError> {
    +435        trace!("send disco packet");
    +436        match self.send_raw(packet).await {
    +437            Ok(()) => {
    +438                self.metrics.disco_packets_sent.inc();
    +439                Ok(())
     440            }
    -441        }
    -442    }
    -443
    -444    async fn send_disco_packet(&mut self, packet: Packet) -> Result<(), SendRelayError> {
    -445        trace!("send disco packet");
    -446        match self.send_raw(packet).await {
    -447            Ok(()) => {
    -448                self.metrics.disco_packets_sent.inc();
    -449                Ok(())
    -450            }
    -451            Err(err) => {
    -452                self.metrics.disco_packets_dropped.inc();
    -453                Err(err)
    -454            }
    -455        }
    -456    }
    -457
    -458    /// Handles frame read results.
    -459    async fn handle_frame(
    -460        &mut self,
    -461        maybe_frame: Option<Result<Frame, StreamError>>,
    -462    ) -> Result<(), HandleFrameError> {
    -463        trace!(?maybe_frame, "handle incoming frame");
    -464        let frame = match maybe_frame {
    -465            Some(frame) => frame?,
    -466            None => return Err(StreamTerminatedSnafu.build()),
    -467        };
    -468
    -469        match frame {
    -470            Frame::SendPacket { dst_key, packet } => {
    -471                let packet_len = packet.len();
    -472                if let Err(err @ ForwardPacketError { .. }) =
    -473                    self.handle_frame_send_packet(dst_key, packet)
    -474                {
    -475                    warn!("failed to handle send packet frame: {err:#}");
    -476                }
    -477                self.metrics.bytes_recv.inc_by(packet_len as u64);
    -478            }
    -479            Frame::Ping { data } => {
    -480                self.metrics.got_ping.inc();
    -481                // TODO: add rate limiter
    -482                self.write_frame(Frame::Pong { data }).await?;
    -483                self.metrics.sent_pong.inc();
    -484            }
    -485            Frame::Pong { data } => {
    -486                self.ping_tracker.pong_received(data);
    -487            }
    -488            Frame::Health { problem } => return Err(HealthSnafu { problem }.build()),
    -489            _ => {
    -490                self.metrics.unknown_frames.inc();
    -491            }
    -492        }
    -493        Ok(())
    -494    }
    -495
    -496    fn handle_frame_send_packet(&self, dst: NodeId, data: Bytes) -> Result<(), ForwardPacketError> {
    -497        if disco::looks_like_disco_wrapper(&data) {
    -498            self.metrics.disco_packets_recv.inc();
    -499            self.clients
    -500                .send_disco_packet(dst, data, self.node_id, &self.metrics)?;
    -501        } else {
    -502            self.metrics.send_packets_recv.inc();
    -503            self.clients
    -504                .send_packet(dst, data, self.node_id, &self.metrics)?;
    -505        }
    -506        Ok(())
    -507    }
    -508}
    -509
    -510#[derive(Debug)]
    -511pub(crate) enum PacketScope {
    -512    Disco,
    -513    Data,
    -514}
    -515
    -516#[derive(Debug)]
    -517pub(crate) enum SendError {
    -518    Full,
    -519    Closed,
    -520}
    -521
    -522#[derive(Debug, Snafu)]
    -523#[snafu(display("failed to forward {scope:?} packet: {reason:?}"))]
    -524pub(crate) struct ForwardPacketError {
    -525    scope: PacketScope,
    -526    reason: SendError,
    -527    backtrace: Option<snafu::Backtrace>,
    -528}
    -529
    -530impl ForwardPacketError {
    -531    pub(crate) fn new(scope: PacketScope, reason: SendError) -> Self {
    -532        Self {
    -533            scope,
    -534            reason,
    -535            backtrace: GenerateImplicitData::generate(),
    -536        }
    -537    }
    +441            Err(err) => {
    +442                self.metrics.disco_packets_dropped.inc();
    +443                Err(err)
    +444            }
    +445        }
    +446    }
    +447
    +448    /// Handles frame read results.
    +449    async fn handle_frame(
    +450        &mut self,
    +451        maybe_frame: Option<Result<ClientToRelayMsg, RelayRecvError>>,
    +452    ) -> Result<(), HandleFrameError> {
    +453        trace!(?maybe_frame, "handle incoming frame");
    +454        let frame = match maybe_frame {
    +455            Some(frame) => frame?,
    +456            None => return Err(StreamTerminatedSnafu.build()),
    +457        };
    +458
    +459        match frame {
    +460            ClientToRelayMsg::Datagrams {
    +461                dst_node_id: dst_key,
    +462                datagrams,
    +463            } => {
    +464                let packet_len = datagrams.contents.len();
    +465                if let Err(err @ ForwardPacketError { .. }) =
    +466                    self.handle_frame_send_packet(dst_key, datagrams)
    +467                {
    +468                    warn!("failed to handle send packet frame: {err:#}");
    +469                }
    +470                self.metrics.bytes_recv.inc_by(packet_len as u64);
    +471            }
    +472            ClientToRelayMsg::Ping(data) => {
    +473                self.metrics.got_ping.inc();
    +474                // TODO: add rate limiter
    +475                self.write_frame(RelayToClientMsg::Pong(data)).await?;
    +476                self.metrics.sent_pong.inc();
    +477            }
    +478            ClientToRelayMsg::Pong(data) => {
    +479                self.ping_tracker.pong_received(data);
    +480            }
    +481        }
    +482        Ok(())
    +483    }
    +484
    +485    fn handle_frame_send_packet(
    +486        &self,
    +487        dst: NodeId,
    +488        data: Datagrams,
    +489    ) -> Result<(), ForwardPacketError> {
    +490        if disco::looks_like_disco_wrapper(&data.contents) {
    +491            self.metrics.disco_packets_recv.inc();
    +492            self.clients
    +493                .send_disco_packet(dst, data, self.node_id, &self.metrics)?;
    +494        } else {
    +495            self.metrics.send_packets_recv.inc();
    +496            self.clients
    +497                .send_packet(dst, data, self.node_id, &self.metrics)?;
    +498        }
    +499        Ok(())
    +500    }
    +501}
    +502
    +503#[derive(Debug)]
    +504pub(crate) enum PacketScope {
    +505    Disco,
    +506    Data,
    +507}
    +508
    +509#[derive(Debug)]
    +510pub(crate) enum SendError {
    +511    Full,
    +512    Closed,
    +513}
    +514
    +515#[derive(Debug, Snafu)]
    +516#[snafu(display("failed to forward {scope:?} packet: {reason:?}"))]
    +517pub(crate) struct ForwardPacketError {
    +518    scope: PacketScope,
    +519    reason: SendError,
    +520    backtrace: Option<snafu::Backtrace>,
    +521}
    +522
    +523impl ForwardPacketError {
    +524    pub(crate) fn new(scope: PacketScope, reason: SendError) -> Self {
    +525        Self {
    +526            scope,
    +527            reason,
    +528            backtrace: GenerateImplicitData::generate(),
    +529        }
    +530    }
    +531}
    +532
    +533/// Tracks how many unique nodes have been seen during the last day.
    +534#[derive(Debug)]
    +535struct ClientCounter {
    +536    clients: HashSet<NodeId>,
    +537    last_clear_date: Date,
     538}
     539
    -540/// Rate limiter for reading from a [`RelayedStream`].
    -541///
    -542/// The writes to the sink are not rate limited.
    -543///
    -544/// This potentially buffers one frame if the rate limiter does not allows this frame.
    -545/// While the frame is buffered the undernlying stream is no longer polled.
    -546#[derive(Debug)]
    -547struct RateLimitedRelayedStream {
    -548    inner: RelayedStream,
    -549    limiter: Option<Arc<governor::DefaultDirectRateLimiter>>,
    -550    state: State,
    -551    /// Keeps track if this stream was ever rate-limited.
    -552    limited_once: bool,
    -553    metrics: Arc<Metrics>,
    -554}
    -555
    -556#[derive(derive_more::Debug)]
    -557enum State {
    -558    #[debug("Blocked")]
    -559    Blocked {
    -560        /// Future which will complete when the item can be yielded.
    -561        delay: Pin<Box<dyn Future<Output = ()> + Send + Sync>>,
    -562        /// Item to yield when the `delay` future completes.
    -563        item: Result<Frame, StreamError>,
    -564    },
    -565    Ready,
    -566}
    -567
    -568impl RateLimitedRelayedStream {
    -569    fn new(
    -570        inner: RelayedStream,
    -571        limiter: governor::DefaultDirectRateLimiter,
    -572        metrics: Arc<Metrics>,
    -573    ) -> Self {
    -574        Self {
    -575            inner,
    -576            limiter: Some(Arc::new(limiter)),
    -577            state: State::Ready,
    -578            limited_once: false,
    -579            metrics,
    -580        }
    -581    }
    -582
    -583    fn unlimited(inner: RelayedStream, metrics: Arc<Metrics>) -> Self {
    -584        Self {
    -585            inner,
    -586            limiter: None,
    -587            state: State::Ready,
    -588            limited_once: false,
    -589            metrics,
    -590        }
    -591    }
    -592}
    -593
    -594impl RateLimitedRelayedStream {
    -595    /// Records metrics about being rate-limited.
    -596    fn record_rate_limited(&mut self) {
    -597        // TODO: add a label for the frame type.
    -598        self.metrics.frames_rx_ratelimited_total.inc();
    -599        if !self.limited_once {
    -600            self.metrics.conns_rx_ratelimited_total.inc();
    -601            self.limited_once = true;
    -602        }
    -603    }
    -604}
    -605
    -606impl Stream for RateLimitedRelayedStream {
    -607    type Item = Result<Frame, StreamError>;
    +540impl Default for ClientCounter {
    +541    fn default() -> Self {
    +542        Self {
    +543            clients: HashSet::new(),
    +544            last_clear_date: OffsetDateTime::now_utc().date(),
    +545        }
    +546    }
    +547}
    +548
    +549impl ClientCounter {
    +550    fn check_and_clear(&mut self) {
    +551        let today = OffsetDateTime::now_utc().date();
    +552        if today != self.last_clear_date {
    +553            self.clients.clear();
    +554            self.last_clear_date = today;
    +555        }
    +556    }
    +557
    +558    /// Marks this node as seen, returns whether it is new today or not.
    +559    fn update(&mut self, client: NodeId) -> bool {
    +560        self.check_and_clear();
    +561        self.clients.insert(client)
    +562    }
    +563}
    +564
    +565#[cfg(test)]
    +566mod tests {
    +567    use iroh_base::SecretKey;
    +568    use n0_future::Stream;
    +569    use n0_snafu::{Result, ResultExt};
    +570    use rand::SeedableRng;
    +571    use tracing::info;
    +572    use tracing_test::traced_test;
    +573
    +574    use super::*;
    +575    use crate::{client::conn::Conn, protos::common::FrameType};
    +576
    +577    async fn recv_frame<
    +578        E: snafu::Error + Sync + Send + 'static,
    +579        S: Stream<Item = Result<RelayToClientMsg, E>> + Unpin,
    +580    >(
    +581        frame_type: FrameType,
    +582        mut stream: S,
    +583    ) -> Result<RelayToClientMsg> {
    +584        match stream.next().await {
    +585            Some(Ok(frame)) => {
    +586                if frame_type != frame.typ() {
    +587                    snafu::whatever!(
    +588                        "Unexpected frame, got {:?}, but expected {:?}",
    +589                        frame.typ(),
    +590                        frame_type
    +591                    );
    +592                }
    +593                Ok(frame)
    +594            }
    +595            Some(Err(err)) => Err(err).e(),
    +596            None => snafu::whatever!("Unexpected EOF, expected frame {frame_type:?}"),
    +597        }
    +598    }
    +599
    +600    #[tokio::test]
    +601    #[traced_test]
    +602    async fn test_client_actor_basic() -> Result {
    +603        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +604
    +605        let (send_queue_s, send_queue_r) = mpsc::channel(10);
    +606        let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(10);
    +607        let (peer_gone_s, peer_gone_r) = mpsc::channel(10);
     608
    -609    #[instrument(name = "rate_limited_relayed_stream", skip_all)]
    -610    fn poll_next(
    -611        mut self: Pin<&mut Self>,
    -612        cx: &mut std::task::Context<'_>,
    -613    ) -> Poll<Option<Self::Item>> {
    -614        let Some(ref limiter) = self.limiter else {
    -615            // If there is no rate-limiter directly poll the inner.
    -616            return Pin::new(&mut self.inner).poll_next(cx);
    -617        };
    -618        let limiter = limiter.clone();
    -619        loop {
    -620            match &mut self.state {
    -621                State::Ready => {
    -622                    // Poll inner for a new item.
    -623                    match Pin::new(&mut self.inner).poll_next(cx) {
    -624                        Poll::Ready(Some(item)) => {
    -625                            match &item {
    -626                                Ok(frame) => {
    -627                                    // How many bytes does this frame consume?
    -628                                    let Ok(frame_len) =
    -629                                        TryInto::<u32>::try_into(frame.len_with_header())
    -630                                            .and_then(TryInto::<NonZeroU32>::try_into)
    -631                                    else {
    -632                                        error!("frame len not NonZeroU32, is MAX_FRAME_SIZE too large?");
    -633                                        // Let this frame through so to not completely break.
    -634                                        return Poll::Ready(Some(item));
    -635                                    };
    -636
    -637                                    match limiter.check_n(frame_len) {
    -638                                        Ok(Ok(_)) => return Poll::Ready(Some(item)),
    -639                                        Ok(Err(_)) => {
    -640                                            // Item is rate-limited.
    -641                                            self.record_rate_limited();
    -642                                            let delay = Box::pin({
    -643                                                let limiter = limiter.clone();
    -644                                                async move {
    -645                                                    limiter.until_n_ready(frame_len).await.ok();
    -646                                                }
    -647                                            });
    -648                                            self.state = State::Blocked { delay, item };
    -649                                            continue;
    -650                                        }
    -651                                        Err(_insufficient_capacity) => {
    -652                                            error!(
    -653                                                "frame larger than bucket capacity: \
    -654                                                 configuration error: \
    -655                                                 max_burst_bytes < MAX_FRAME_SIZE?"
    -656                                            );
    -657                                            // Let this frame through so to not completely break.
    -658                                            return Poll::Ready(Some(item));
    -659                                        }
    -660                                    }
    -661                                }
    -662                                Err(_) => {
    -663                                    // Yielding errors is not rate-limited.
    -664                                    return Poll::Ready(Some(item));
    -665                                }
    -666                            }
    -667                        }
    -668                        Poll::Ready(None) => return Poll::Ready(None),
    -669                        Poll::Pending => return Poll::Pending,
    -670                    }
    -671                }
    -672                State::Blocked { delay, .. } => {
    -673                    match delay.poll(cx) {
    -674                        Poll::Ready(_) => {
    -675                            match std::mem::replace(&mut self.state, State::Ready) {
    -676                                State::Ready => unreachable!(),
    -677                                State::Blocked { item, .. } => {
    -678                                    // Yield the item directly, rate-limit has already been
    -679                                    // accounted for by awaiting the future.
    -680                                    return Poll::Ready(Some(item));
    -681                                }
    -682                            }
    -683                        }
    -684                        Poll::Pending => return Poll::Pending,
    -685                    }
    -686                }
    -687            }
    -688        }
    -689    }
    -690}
    -691
    -692impl Sink<Frame> for RateLimitedRelayedStream {
    -693    type Error = std::io::Error;
    -694
    -695    fn poll_ready(
    -696        mut self: Pin<&mut Self>,
    -697        cx: &mut std::task::Context<'_>,
    -698    ) -> Poll<std::result::Result<(), Self::Error>> {
    -699        Pin::new(&mut self.inner).poll_ready(cx)
    -700    }
    -701
    -702    fn start_send(mut self: Pin<&mut Self>, item: Frame) -> std::result::Result<(), Self::Error> {
    -703        Pin::new(&mut self.inner).start_send(item)
    -704    }
    -705
    -706    fn poll_flush(
    -707        mut self: Pin<&mut Self>,
    -708        cx: &mut std::task::Context<'_>,
    -709    ) -> Poll<std::result::Result<(), Self::Error>> {
    -710        Pin::new(&mut self.inner).poll_flush(cx)
    -711    }
    -712
    -713    fn poll_close(
    -714        mut self: Pin<&mut Self>,
    -715        cx: &mut std::task::Context<'_>,
    -716    ) -> Poll<std::result::Result<(), Self::Error>> {
    -717        Pin::new(&mut self.inner).poll_close(cx)
    -718    }
    -719}
    -720
    -721/// Tracks how many unique nodes have been seen during the last day.
    -722#[derive(Debug)]
    -723struct ClientCounter {
    -724    clients: HashSet<NodeId>,
    -725    last_clear_date: Date,
    -726}
    -727
    -728impl Default for ClientCounter {
    -729    fn default() -> Self {
    -730        Self {
    -731            clients: HashSet::new(),
    -732            last_clear_date: OffsetDateTime::now_utc().date(),
    -733        }
    -734    }
    -735}
    +609        let node_id = SecretKey::generate(&mut rng).public();
    +610        let (io, io_rw) = tokio::io::duplex(1024);
    +611        let mut io_rw = Conn::test(io_rw);
    +612        let stream = RelayedStream::test(io);
    +613
    +614        let clients = Clients::default();
    +615        let metrics = Arc::new(Metrics::default());
    +616        let actor = Actor {
    +617            stream,
    +618            timeout: Duration::from_secs(1),
    +619            send_queue: send_queue_r,
    +620            disco_send_queue: disco_send_queue_r,
    +621            node_gone: peer_gone_r,
    +622            connection_id: 0,
    +623            node_id,
    +624            clients: clients.clone(),
    +625            client_counter: ClientCounter::default(),
    +626            ping_tracker: PingTracker::default(),
    +627            metrics,
    +628        };
    +629
    +630        let done = CancellationToken::new();
    +631        let io_done = done.clone();
    +632        let handle = tokio::task::spawn(async move { actor.run(io_done).await });
    +633
    +634        // Write tests
    +635        println!("-- write");
    +636        let data = b"hello world!";
    +637
    +638        // send packet
    +639        println!("  send packet");
    +640        let packet = Packet {
    +641            src: node_id,
    +642            data: Datagrams::from(&data[..]),
    +643        };
    +644        send_queue_s.send(packet.clone()).await.context("send")?;
    +645        let frame = recv_frame(FrameType::RelayToClientDatagram, &mut io_rw)
    +646            .await
    +647            .e()?;
    +648        assert_eq!(
    +649            frame,
    +650            RelayToClientMsg::Datagrams {
    +651                remote_node_id: node_id,
    +652                datagrams: data.to_vec().into()
    +653            }
    +654        );
    +655
    +656        // send disco packet
    +657        println!("  send disco packet");
    +658        disco_send_queue_s
    +659            .send(packet.clone())
    +660            .await
    +661            .context("send")?;
    +662        let frame = recv_frame(FrameType::RelayToClientDatagram, &mut io_rw)
    +663            .await
    +664            .e()?;
    +665        assert_eq!(
    +666            frame,
    +667            RelayToClientMsg::Datagrams {
    +668                remote_node_id: node_id,
    +669                datagrams: data.to_vec().into()
    +670            }
    +671        );
    +672
    +673        // send peer_gone
    +674        println!("send peer gone");
    +675        peer_gone_s.send(node_id).await.context("send")?;
    +676        let frame = recv_frame(FrameType::NodeGone, &mut io_rw).await.e()?;
    +677        assert_eq!(frame, RelayToClientMsg::NodeGone(node_id));
    +678
    +679        // Read tests
    +680        println!("--read");
    +681
    +682        // send ping, expect pong
    +683        let data = b"pingpong";
    +684        io_rw.send(ClientToRelayMsg::Ping(*data)).await?;
    +685
    +686        // recv pong
    +687        println!(" recv pong");
    +688        let frame = recv_frame(FrameType::Pong, &mut io_rw).await?;
    +689        assert_eq!(frame, RelayToClientMsg::Pong(*data));
    +690
    +691        let target = SecretKey::generate(&mut rng).public();
    +692
    +693        // send packet
    +694        println!("  send packet");
    +695        let data = b"hello world!";
    +696        io_rw
    +697            .send(ClientToRelayMsg::Datagrams {
    +698                dst_node_id: target,
    +699                datagrams: Datagrams::from(data),
    +700            })
    +701            .await
    +702            .context("send")?;
    +703
    +704        // send disco packet
    +705        println!("  send disco packet");
    +706        // starts with `MAGIC` & key, then data
    +707        let mut disco_data = disco::MAGIC.as_bytes().to_vec();
    +708        disco_data.extend_from_slice(target.as_bytes());
    +709        disco_data.extend_from_slice(data);
    +710        io_rw
    +711            .send(ClientToRelayMsg::Datagrams {
    +712                dst_node_id: target,
    +713                datagrams: disco_data.clone().into(),
    +714            })
    +715            .await
    +716            .context("send")?;
    +717
    +718        done.cancel();
    +719        handle.await.context("join")?;
    +720        Ok(())
    +721    }
    +722
    +723    #[tokio::test(start_paused = true)]
    +724    #[traced_test]
    +725    async fn test_rate_limit() -> Result {
    +726        const LIMIT: u32 = 50;
    +727        const MAX_FRAMES: u32 = 100;
    +728
    +729        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +730
    +731        // Build the rate limited stream.
    +732        let (io_read, io_write) = tokio::io::duplex((LIMIT * MAX_FRAMES) as _);
    +733        let mut frame_writer = Conn::test(io_write);
    +734        // Rate limiter allowing LIMIT bytes/s
    +735        let mut stream = RelayedStream::test_limited(io_read, LIMIT / 10, LIMIT)?;
     736
    -737impl ClientCounter {
    -738    fn check_and_clear(&mut self) {
    -739        let today = OffsetDateTime::now_utc().date();
    -740        if today != self.last_clear_date {
    -741            self.clients.clear();
    -742            self.last_clear_date = today;
    -743        }
    -744    }
    -745
    -746    /// Marks this node as seen, returns whether it is new today or not.
    -747    fn update(&mut self, client: NodeId) -> bool {
    -748        self.check_and_clear();
    -749        self.clients.insert(client)
    -750    }
    -751}
    -752
    -753#[cfg(test)]
    -754mod tests {
    -755    use bytes::Bytes;
    -756    use iroh_base::SecretKey;
    -757    use n0_snafu::{Result, ResultExt};
    -758    use tokio_util::codec::Framed;
    -759    use tracing::info;
    -760    use tracing_test::traced_test;
    -761
    -762    use super::*;
    -763    use crate::{
    -764        protos::relay::{recv_frame, FrameType, RelayCodec},
    -765        server::streams::MaybeTlsStream,
    -766    };
    -767
    -768    #[tokio::test]
    -769    #[traced_test]
    -770    async fn test_client_actor_basic() -> Result {
    -771        let (send_queue_s, send_queue_r) = mpsc::channel(10);
    -772        let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(10);
    -773        let (peer_gone_s, peer_gone_r) = mpsc::channel(10);
    -774
    -775        let node_id = SecretKey::generate(rand::thread_rng()).public();
    -776        let (io, io_rw) = tokio::io::duplex(1024);
    -777        let mut io_rw = Framed::new(io_rw, RelayCodec::test());
    -778        let stream =
    -779            RelayedStream::Relay(Framed::new(MaybeTlsStream::Test(io), RelayCodec::test()));
    -780
    -781        let clients = Clients::default();
    -782        let metrics = Arc::new(Metrics::default());
    -783        let actor = Actor {
    -784            stream: RateLimitedRelayedStream::unlimited(stream, metrics.clone()),
    -785            timeout: Duration::from_secs(1),
    -786            send_queue: send_queue_r,
    -787            disco_send_queue: disco_send_queue_r,
    -788            node_gone: peer_gone_r,
    -789            connection_id: 0,
    -790            node_id,
    -791            clients: clients.clone(),
    -792            client_counter: ClientCounter::default(),
    -793            ping_tracker: PingTracker::default(),
    -794            metrics,
    -795        };
    -796
    -797        let done = CancellationToken::new();
    -798        let io_done = done.clone();
    -799        let handle = tokio::task::spawn(async move { actor.run(io_done).await });
    -800
    -801        // Write tests
    -802        println!("-- write");
    -803        let data = b"hello world!";
    -804
    -805        // send packet
    -806        println!("  send packet");
    -807        let packet = Packet {
    -808            src: node_id,
    -809            data: Bytes::from(&data[..]),
    -810        };
    -811        send_queue_s.send(packet.clone()).await.context("send")?;
    -812        let frame = recv_frame(FrameType::RecvPacket, &mut io_rw).await?;
    -813        assert_eq!(
    -814            frame,
    -815            Frame::RecvPacket {
    -816                src_key: node_id,
    -817                content: data.to_vec().into()
    -818            }
    -819        );
    -820
    -821        // send disco packet
    -822        println!("  send disco packet");
    -823        disco_send_queue_s
    -824            .send(packet.clone())
    -825            .await
    -826            .context("send")?;
    -827        let frame = recv_frame(FrameType::RecvPacket, &mut io_rw).await?;
    -828        assert_eq!(
    -829            frame,
    -830            Frame::RecvPacket {
    -831                src_key: node_id,
    -832                content: data.to_vec().into()
    -833            }
    -834        );
    -835
    -836        // send peer_gone
    -837        println!("send peer gone");
    -838        peer_gone_s.send(node_id).await.context("send")?;
    -839        let frame = recv_frame(FrameType::PeerGone, &mut io_rw).await?;
    -840        assert_eq!(frame, Frame::NodeGone { node_id });
    -841
    -842        // Read tests
    -843        println!("--read");
    -844
    -845        // send ping, expect pong
    -846        let data = b"pingpong";
    -847        write_frame(&mut io_rw, Frame::Ping { data: *data }, None).await?;
    -848
    -849        // recv pong
    -850        println!(" recv pong");
    -851        let frame = recv_frame(FrameType::Pong, &mut io_rw).await?;
    -852        assert_eq!(frame, Frame::Pong { data: *data });
    -853
    -854        let target = SecretKey::generate(rand::thread_rng()).public();
    -855
    -856        // send packet
    -857        println!("  send packet");
    -858        let data = b"hello world!";
    -859        io_rw
    -860            .send(Frame::SendPacket {
    -861                dst_key: target,
    -862                packet: Bytes::from_static(data),
    -863            })
    -864            .await
    -865            .context("send")?;
    -866
    -867        // send disco packet
    -868        println!("  send disco packet");
    -869        // starts with `MAGIC` & key, then data
    -870        let mut disco_data = disco::MAGIC.as_bytes().to_vec();
    -871        disco_data.extend_from_slice(target.as_bytes());
    -872        disco_data.extend_from_slice(data);
    -873        io_rw
    -874            .send(Frame::SendPacket {
    -875                dst_key: target,
    -876                packet: disco_data.clone().into(),
    -877            })
    -878            .await
    -879            .context("send")?;
    -880
    -881        done.cancel();
    -882        handle.await.context("join")?;
    -883        Ok(())
    -884    }
    -885
    -886    #[tokio::test]
    -887    #[traced_test]
    -888    async fn test_rate_limit() -> Result {
    -889        const LIMIT: u32 = 50;
    -890        const MAX_FRAMES: u32 = 100;
    -891
    -892        // Rate limiter allowing LIMIT bytes/s
    -893        let quota = governor::Quota::per_second(NonZeroU32::try_from(LIMIT).unwrap());
    -894        let limiter = governor::RateLimiter::direct(quota);
    -895
    -896        // Build the rate limited stream.
    -897        let (io_read, io_write) = tokio::io::duplex((LIMIT * MAX_FRAMES) as _);
    -898        let mut frame_writer = Framed::new(io_write, RelayCodec::test());
    -899        let stream = RelayedStream::Relay(Framed::new(
    -900            MaybeTlsStream::Test(io_read),
    -901            RelayCodec::test(),
    -902        ));
    -903        let mut stream = RateLimitedRelayedStream::new(stream, limiter, Default::default());
    -904
    -905        // Prepare a frame to send, assert its size.
    -906        let data = Bytes::from_static(b"hello world!!");
    -907        let target = SecretKey::generate(rand::thread_rng()).public();
    -908        let frame = Frame::SendPacket {
    -909            dst_key: target,
    -910            packet: data.clone(),
    -911        };
    -912        let frame_len = frame.len_with_header();
    -913        assert_eq!(frame_len, LIMIT as usize);
    -914
    -915        // Send a frame, it should arrive.
    -916        info!("-- send packet");
    -917        frame_writer.send(frame.clone()).await.context("send")?;
    -918        frame_writer.flush().await.context("flush")?;
    -919        let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next())
    -920            .await
    -921            .expect("timeout")
    -922            .expect("option")
    -923            .expect("ok");
    -924        assert_eq!(recv_frame, frame);
    -925
    -926        // Next frame does not arrive.
    -927        info!("-- send packet");
    -928        frame_writer.send(frame.clone()).await.context("send")?;
    -929        frame_writer.flush().await.context("flush")?;
    -930        let res = tokio::time::timeout(Duration::from_millis(100), stream.next()).await;
    -931        assert!(res.is_err(), "expecting a timeout");
    -932        info!("-- timeout happened");
    -933
    -934        // Wait long enough.
    -935        info!("-- sleep");
    -936        tokio::time::sleep(Duration::from_secs(1)).await;
    -937
    -938        // Frame arrives.
    -939        let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next())
    -940            .await
    -941            .expect("timeout")
    -942            .expect("option")
    -943            .expect("ok");
    -944        assert_eq!(recv_frame, frame);
    -945
    -946        Ok(())
    -947    }
    -948}
    \ No newline at end of file +737 // Prepare a frame to send, assert its size. +738 let data = Datagrams::from(b"hello world!!!!!"); +739 let target = SecretKey::generate(&mut rng).public(); +740 let frame = ClientToRelayMsg::Datagrams { +741 dst_node_id: target, +742 datagrams: data.clone(), +743 }; +744 let frame_len = frame.to_bytes().len(); +745 assert_eq!(frame_len, LIMIT as usize); +746 +747 // Send a frame, it should arrive. +748 info!("-- send packet"); +749 frame_writer.send(frame.clone()).await.context("send")?; +750 frame_writer.flush().await.context("flush")?; +751 let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next()) +752 .await +753 .expect("timeout") +754 .expect("option") +755 .expect("ok"); +756 assert_eq!(recv_frame, frame); +757 +758 // Next frame does not arrive. +759 info!("-- send packet"); +760 frame_writer.send(frame.clone()).await.context("send")?; +761 frame_writer.flush().await.context("flush")?; +762 let res = tokio::time::timeout(Duration::from_millis(100), stream.next()).await; +763 assert!(res.is_err(), "expecting a timeout"); +764 info!("-- timeout happened"); +765 +766 // Wait long enough. +767 info!("-- sleep"); +768 tokio::time::sleep(Duration::from_secs(1)).await; +769 +770 // Frame arrives. +771 let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next()) +772 .await +773 .expect("timeout") +774 .expect("option") +775 .expect("ok"); +776 assert_eq!(recv_frame, frame); +777 +778 Ok(()) +779 } +780}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/server/clients.rs.html b/pr/3367/docs/src/iroh_relay/server/clients.rs.html index 865b78d964..d14b0c8fd0 100644 --- a/pr/3367/docs/src/iroh_relay/server/clients.rs.html +++ b/pr/3367/docs/src/iroh_relay/server/clients.rs.html @@ -1,280 +1,301 @@ -clients.rs - source

    iroh_relay/server/
    clients.rs

    1//! The "Server" side of the client. Uses the `ClientConnManager`.
    +clients.rs - source

    iroh_relay/server/
    clients.rs

    1//! The "Server" side of the client. Uses the `ClientConnManager`.
     2// Based on tailscale/derp/derp_server.go
     3
     4use std::{
     5    collections::HashSet,
     6    sync::{
    -7        atomic::{AtomicU64, Ordering},
    -8        Arc,
    +7        Arc,
    +8        atomic::{AtomicU64, Ordering},
     9    },
     10};
     11
    -12use bytes::Bytes;
    -13use dashmap::DashMap;
    -14use iroh_base::NodeId;
    -15use tokio::sync::mpsc::error::TrySendError;
    -16use tracing::{debug, trace};
    -17
    -18use super::client::{Client, Config, ForwardPacketError};
    -19use crate::server::{
    -20    client::{PacketScope, SendError},
    -21    metrics::Metrics,
    -22};
    -23
    -24/// Manages the connections to all currently connected clients.
    -25#[derive(Debug, Default, Clone)]
    -26pub(super) struct Clients(Arc<Inner>);
    -27
    -28#[derive(Debug, Default)]
    -29struct Inner {
    -30    /// The list of all currently connected clients.
    -31    clients: DashMap<NodeId, Client>,
    -32    /// Map of which client has sent where
    -33    sent_to: DashMap<NodeId, HashSet<NodeId>>,
    -34    /// Connection ID Counter
    -35    next_connection_id: AtomicU64,
    -36}
    -37
    -38impl Clients {
    -39    pub async fn shutdown(&self) {
    -40        let keys: Vec<_> = self.0.clients.iter().map(|x| *x.key()).collect();
    -41        trace!("shutting down {} clients", keys.len());
    -42        let clients = keys.into_iter().filter_map(|k| self.0.clients.remove(&k));
    -43
    -44        n0_future::join_all(clients.map(|(_, client)| async move { client.shutdown().await }))
    -45            .await;
    -46    }
    -47
    -48    /// Builds the client handler and starts the read & write loops for the connection.
    -49    pub async fn register(&self, client_config: Config, metrics: Arc<Metrics>) {
    -50        let node_id = client_config.node_id;
    -51        let connection_id = self.get_connection_id();
    -52        trace!(remote_node = node_id.fmt_short(), "registering client");
    -53
    -54        let client = Client::new(client_config, connection_id, self, metrics);
    -55        if let Some(old_client) = self.0.clients.insert(node_id, client) {
    -56            debug!(
    -57                remote_node = node_id.fmt_short(),
    -58                "multiple connections found, pruning old connection",
    -59            );
    -60            old_client.shutdown().await;
    -61        }
    -62    }
    -63
    -64    fn get_connection_id(&self) -> u64 {
    -65        self.0.next_connection_id.fetch_add(1, Ordering::Relaxed)
    -66    }
    -67
    -68    /// Removes the client from the map of clients, & sends a notification
    -69    /// to each client that peers has sent data to, to let them know that
    -70    /// peer is gone from the network.
    -71    ///
    -72    /// Must be passed a matching connection_id.
    -73    pub(super) fn unregister(&self, connection_id: u64, node_id: NodeId) {
    -74        trace!(
    -75            node_id = node_id.fmt_short(),
    -76            connection_id,
    -77            "unregistering client"
    -78        );
    -79
    -80        if let Some((_, client)) = self
    -81            .0
    -82            .clients
    -83            .remove_if(&node_id, |_, c| c.connection_id() == connection_id)
    -84        {
    -85            if let Some((_, sent_to)) = self.0.sent_to.remove(&node_id) {
    -86                for key in sent_to {
    -87                    match client.try_send_peer_gone(key) {
    -88                        Ok(_) => {}
    -89                        Err(TrySendError::Full(_)) => {
    -90                            debug!(
    -91                                dst = key.fmt_short(),
    -92                                "client too busy to receive packet, dropping packet"
    -93                            );
    -94                        }
    -95                        Err(TrySendError::Closed(_)) => {
    -96                            debug!(
    -97                                dst = key.fmt_short(),
    -98                                "can no longer write to client, dropping packet"
    -99                            );
    -100                        }
    -101                    }
    -102                }
    -103            }
    -104        }
    -105    }
    -106
    -107    /// Attempt to send a packet to client with [`NodeId`] `dst`.
    -108    pub(super) fn send_packet(
    -109        &self,
    -110        dst: NodeId,
    -111        data: Bytes,
    -112        src: NodeId,
    -113        metrics: &Metrics,
    -114    ) -> Result<(), ForwardPacketError> {
    -115        let Some(client) = self.0.clients.get(&dst) else {
    -116            debug!(dst = dst.fmt_short(), "no connected client, dropped packet");
    -117            metrics.send_packets_dropped.inc();
    -118            return Ok(());
    -119        };
    -120        match client.try_send_packet(src, data) {
    -121            Ok(_) => {
    -122                // Record sent_to relationship
    -123                self.0.sent_to.entry(src).or_default().insert(dst);
    -124                Ok(())
    -125            }
    -126            Err(TrySendError::Full(_)) => {
    -127                debug!(
    -128                    dst = dst.fmt_short(),
    -129                    "client too busy to receive packet, dropping packet"
    -130                );
    -131                Err(ForwardPacketError::new(PacketScope::Data, SendError::Full))
    -132            }
    -133            Err(TrySendError::Closed(_)) => {
    -134                debug!(
    -135                    dst = dst.fmt_short(),
    -136                    "can no longer write to client, dropping message and pruning connection"
    -137                );
    -138                client.start_shutdown();
    -139                Err(ForwardPacketError::new(
    -140                    PacketScope::Data,
    -141                    SendError::Closed,
    -142                ))
    -143            }
    -144        }
    -145    }
    -146
    -147    /// Attempt to send a disco packet to client with [`NodeId`] `dst`.
    -148    pub(super) fn send_disco_packet(
    -149        &self,
    -150        dst: NodeId,
    -151        data: Bytes,
    -152        src: NodeId,
    -153        metrics: &Metrics,
    -154    ) -> Result<(), ForwardPacketError> {
    -155        let Some(client) = self.0.clients.get(&dst) else {
    -156            debug!(
    -157                dst = dst.fmt_short(),
    -158                "no connected client, dropped disco packet"
    -159            );
    -160            metrics.disco_packets_dropped.inc();
    -161            return Ok(());
    -162        };
    -163        match client.try_send_disco_packet(src, data) {
    -164            Ok(_) => {
    -165                // Record sent_to relationship
    -166                self.0.sent_to.entry(src).or_default().insert(dst);
    -167                Ok(())
    -168            }
    -169            Err(TrySendError::Full(_)) => {
    -170                debug!(
    -171                    dst = dst.fmt_short(),
    -172                    "client too busy to receive disco packet, dropping packet"
    -173                );
    -174                Err(ForwardPacketError::new(PacketScope::Disco, SendError::Full))
    -175            }
    -176            Err(TrySendError::Closed(_)) => {
    -177                debug!(
    -178                    dst = dst.fmt_short(),
    -179                    "can no longer write to client, dropping disco message and pruning connection"
    -180                );
    -181                client.start_shutdown();
    -182                Err(ForwardPacketError::new(
    -183                    PacketScope::Disco,
    -184                    SendError::Closed,
    -185                ))
    -186            }
    -187        }
    -188    }
    -189}
    -190
    -191#[cfg(test)]
    -192mod tests {
    -193    use std::time::Duration;
    -194
    -195    use bytes::Bytes;
    +12use dashmap::DashMap;
    +13use iroh_base::NodeId;
    +14use tokio::sync::mpsc::error::TrySendError;
    +15use tracing::{debug, trace};
    +16
    +17use super::client::{Client, Config, ForwardPacketError};
    +18use crate::{
    +19    protos::relay::Datagrams,
    +20    server::{
    +21        client::{PacketScope, SendError},
    +22        metrics::Metrics,
    +23    },
    +24};
    +25
    +26/// Manages the connections to all currently connected clients.
    +27#[derive(Debug, Default, Clone)]
    +28pub(super) struct Clients(Arc<Inner>);
    +29
    +30#[derive(Debug, Default)]
    +31struct Inner {
    +32    /// The list of all currently connected clients.
    +33    clients: DashMap<NodeId, Client>,
    +34    /// Map of which client has sent where
    +35    sent_to: DashMap<NodeId, HashSet<NodeId>>,
    +36    /// Connection ID Counter
    +37    next_connection_id: AtomicU64,
    +38}
    +39
    +40impl Clients {
    +41    pub async fn shutdown(&self) {
    +42        let keys: Vec<_> = self.0.clients.iter().map(|x| *x.key()).collect();
    +43        trace!("shutting down {} clients", keys.len());
    +44        let clients = keys.into_iter().filter_map(|k| self.0.clients.remove(&k));
    +45
    +46        n0_future::join_all(clients.map(|(_, client)| async move { client.shutdown().await }))
    +47            .await;
    +48    }
    +49
    +50    /// Builds the client handler and starts the read & write loops for the connection.
    +51    pub async fn register(&self, client_config: Config, metrics: Arc<Metrics>) {
    +52        let node_id = client_config.node_id;
    +53        let connection_id = self.get_connection_id();
    +54        trace!(remote_node = %node_id.fmt_short(), "registering client");
    +55
    +56        let client = Client::new(client_config, connection_id, self, metrics);
    +57        if let Some(old_client) = self.0.clients.insert(node_id, client) {
    +58            debug!(
    +59                remote_node = %node_id.fmt_short(),
    +60                "multiple connections found, pruning old connection",
    +61            );
    +62            old_client.shutdown().await;
    +63        }
    +64    }
    +65
    +66    fn get_connection_id(&self) -> u64 {
    +67        self.0.next_connection_id.fetch_add(1, Ordering::Relaxed)
    +68    }
    +69
    +70    /// Removes the client from the map of clients, & sends a notification
    +71    /// to each client that peers has sent data to, to let them know that
    +72    /// peer is gone from the network.
    +73    ///
    +74    /// Must be passed a matching connection_id.
    +75    pub(super) fn unregister(&self, connection_id: u64, node_id: NodeId) {
    +76        trace!(
    +77            node_id = %node_id.fmt_short(),
    +78            connection_id, "unregistering client"
    +79        );
    +80
    +81        if let Some((_, client)) = self
    +82            .0
    +83            .clients
    +84            .remove_if(&node_id, |_, c| c.connection_id() == connection_id)
    +85        {
    +86            if let Some((_, sent_to)) = self.0.sent_to.remove(&node_id) {
    +87                for key in sent_to {
    +88                    match client.try_send_peer_gone(key) {
    +89                        Ok(_) => {}
    +90                        Err(TrySendError::Full(_)) => {
    +91                            debug!(
    +92                                dst = %key.fmt_short(),
    +93                                "client too busy to receive packet, dropping packet"
    +94                            );
    +95                        }
    +96                        Err(TrySendError::Closed(_)) => {
    +97                            debug!(
    +98                                dst = %key.fmt_short(),
    +99                                "can no longer write to client, dropping packet"
    +100                            );
    +101                        }
    +102                    }
    +103                }
    +104            }
    +105        }
    +106    }
    +107
    +108    /// Attempt to send a packet to client with [`NodeId`] `dst`.
    +109    pub(super) fn send_packet(
    +110        &self,
    +111        dst: NodeId,
    +112        data: Datagrams,
    +113        src: NodeId,
    +114        metrics: &Metrics,
    +115    ) -> Result<(), ForwardPacketError> {
    +116        let Some(client) = self.0.clients.get(&dst) else {
    +117            debug!(dst = %dst.fmt_short(), "no connected client, dropped packet");
    +118            metrics.send_packets_dropped.inc();
    +119            return Ok(());
    +120        };
    +121        match client.try_send_packet(src, data) {
    +122            Ok(_) => {
    +123                // Record sent_to relationship
    +124                self.0.sent_to.entry(src).or_default().insert(dst);
    +125                Ok(())
    +126            }
    +127            Err(TrySendError::Full(_)) => {
    +128                debug!(
    +129                    dst = %dst.fmt_short(),
    +130                    "client too busy to receive packet, dropping packet"
    +131                );
    +132                Err(ForwardPacketError::new(PacketScope::Data, SendError::Full))
    +133            }
    +134            Err(TrySendError::Closed(_)) => {
    +135                debug!(
    +136                    dst = %dst.fmt_short(),
    +137                    "can no longer write to client, dropping message and pruning connection"
    +138                );
    +139                client.start_shutdown();
    +140                Err(ForwardPacketError::new(
    +141                    PacketScope::Data,
    +142                    SendError::Closed,
    +143                ))
    +144            }
    +145        }
    +146    }
    +147
    +148    /// Attempt to send a disco packet to client with [`NodeId`] `dst`.
    +149    pub(super) fn send_disco_packet(
    +150        &self,
    +151        dst: NodeId,
    +152        data: Datagrams,
    +153        src: NodeId,
    +154        metrics: &Metrics,
    +155    ) -> Result<(), ForwardPacketError> {
    +156        let Some(client) = self.0.clients.get(&dst) else {
    +157            debug!(
    +158                dst = %dst.fmt_short(),
    +159                "no connected client, dropped disco packet"
    +160            );
    +161            metrics.disco_packets_dropped.inc();
    +162            return Ok(());
    +163        };
    +164        match client.try_send_disco_packet(src, data) {
    +165            Ok(_) => {
    +166                // Record sent_to relationship
    +167                self.0.sent_to.entry(src).or_default().insert(dst);
    +168                Ok(())
    +169            }
    +170            Err(TrySendError::Full(_)) => {
    +171                debug!(
    +172                    dst = %dst.fmt_short(),
    +173                    "client too busy to receive disco packet, dropping packet"
    +174                );
    +175                Err(ForwardPacketError::new(PacketScope::Disco, SendError::Full))
    +176            }
    +177            Err(TrySendError::Closed(_)) => {
    +178                debug!(
    +179                    dst = %dst.fmt_short(),
    +180                    "can no longer write to client, dropping disco message and pruning connection"
    +181                );
    +182                client.start_shutdown();
    +183                Err(ForwardPacketError::new(
    +184                    PacketScope::Disco,
    +185                    SendError::Closed,
    +186                ))
    +187            }
    +188        }
    +189    }
    +190}
    +191
    +192#[cfg(test)]
    +193mod tests {
    +194    use std::time::Duration;
    +195
     196    use iroh_base::SecretKey;
    -197    use n0_snafu::{Result, ResultExt};
    -198    use tokio::io::DuplexStream;
    -199    use tokio_util::codec::{Framed, FramedRead};
    +197    use n0_future::{Stream, StreamExt};
    +198    use n0_snafu::{Result, ResultExt};
    +199    use rand::SeedableRng;
     200
     201    use super::*;
     202    use crate::{
    -203        protos::relay::{recv_frame, Frame, FrameType, RelayCodec},
    -204        server::streams::{MaybeTlsStream, RelayedStream},
    -205    };
    -206
    -207    fn test_client_builder(key: NodeId) -> (Config, FramedRead<DuplexStream, RelayCodec>) {
    -208        let (test_io, io) = tokio::io::duplex(1024);
    -209        (
    -210            Config {
    -211                node_id: key,
    -212                stream: RelayedStream::Relay(Framed::new(
    -213                    MaybeTlsStream::Test(io),
    -214                    RelayCodec::test(),
    -215                )),
    -216                write_timeout: Duration::from_secs(1),
    -217                channel_capacity: 10,
    -218                rate_limit: None,
    -219            },
    -220            FramedRead::new(test_io, RelayCodec::test()),
    -221        )
    -222    }
    -223
    -224    #[tokio::test]
    -225    async fn test_clients() -> Result {
    -226        let a_key = SecretKey::generate(rand::thread_rng()).public();
    -227        let b_key = SecretKey::generate(rand::thread_rng()).public();
    -228
    -229        let (builder_a, mut a_rw) = test_client_builder(a_key);
    +203        client::conn::Conn,
    +204        protos::{common::FrameType, relay::RelayToClientMsg},
    +205        server::streams::RelayedStream,
    +206    };
    +207
    +208    async fn recv_frame<
    +209        E: snafu::Error + Sync + Send + 'static,
    +210        S: Stream<Item = Result<RelayToClientMsg, E>> + Unpin,
    +211    >(
    +212        frame_type: FrameType,
    +213        mut stream: S,
    +214    ) -> Result<RelayToClientMsg> {
    +215        match stream.next().await {
    +216            Some(Ok(frame)) => {
    +217                if frame_type != frame.typ() {
    +218                    snafu::whatever!(
    +219                        "Unexpected frame, got {:?}, but expected {:?}",
    +220                        frame.typ(),
    +221                        frame_type
    +222                    );
    +223                }
    +224                Ok(frame)
    +225            }
    +226            Some(Err(err)) => Err(err).e(),
    +227            None => snafu::whatever!("Unexpected EOF, expected frame {frame_type:?}"),
    +228        }
    +229    }
     230
    -231        let clients = Clients::default();
    -232        let metrics = Arc::new(Metrics::default());
    -233        clients.register(builder_a, metrics.clone()).await;
    -234
    -235        // send packet
    -236        let data = b"hello world!";
    -237        clients.send_packet(a_key, Bytes::from(&data[..]), b_key, &metrics)?;
    -238        let frame = recv_frame(FrameType::RecvPacket, &mut a_rw).await?;
    -239        assert_eq!(
    -240            frame,
    -241            Frame::RecvPacket {
    -242                src_key: b_key,
    -243                content: data.to_vec().into(),
    -244            }
    -245        );
    -246
    -247        // send disco packet
    -248        clients.send_disco_packet(a_key, Bytes::from(&data[..]), b_key, &metrics)?;
    -249        let frame = recv_frame(FrameType::RecvPacket, &mut a_rw).await?;
    -250        assert_eq!(
    -251            frame,
    -252            Frame::RecvPacket {
    -253                src_key: b_key,
    -254                content: data.to_vec().into(),
    -255            }
    -256        );
    -257
    -258        {
    -259            let client = clients.0.clients.get(&a_key).unwrap();
    -260            // shutdown client a, this should trigger the removal from the clients list
    -261            client.start_shutdown();
    -262        }
    -263
    -264        // need to wait a moment for the removal to be processed
    -265        let c = clients.clone();
    -266        tokio::time::timeout(Duration::from_secs(1), async move {
    -267            loop {
    -268                if !c.0.clients.contains_key(&a_key) {
    -269                    break;
    -270                }
    -271                tokio::time::sleep(Duration::from_millis(100)).await;
    -272            }
    -273        })
    -274        .await
    -275        .context("timeout")?;
    -276        clients.shutdown().await;
    -277
    -278        Ok(())
    -279    }
    -280}
    \ No newline at end of file +231 fn test_client_builder(key: NodeId) -> (Config, Conn) { +232 let (server, client) = tokio::io::duplex(1024); +233 ( +234 Config { +235 node_id: key, +236 stream: RelayedStream::test(server), +237 write_timeout: Duration::from_secs(1), +238 channel_capacity: 10, +239 }, +240 Conn::test(client), +241 ) +242 } +243 +244 #[tokio::test] +245 async fn test_clients() -> Result { +246 let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64); +247 let a_key = SecretKey::generate(&mut rng).public(); +248 let b_key = SecretKey::generate(&mut rng).public(); +249 +250 let (builder_a, mut a_rw) = test_client_builder(a_key); +251 +252 let clients = Clients::default(); +253 let metrics = Arc::new(Metrics::default()); +254 clients.register(builder_a, metrics.clone()).await; +255 +256 // send packet +257 let data = b"hello world!"; +258 clients.send_packet(a_key, Datagrams::from(&data[..]), b_key, &metrics)?; +259 let frame = recv_frame(FrameType::RelayToClientDatagram, &mut a_rw).await?; +260 assert_eq!( +261 frame, +262 RelayToClientMsg::Datagrams { +263 remote_node_id: b_key, +264 datagrams: data.to_vec().into(), +265 } +266 ); +267 +268 // send disco packet +269 clients.send_disco_packet(a_key, Datagrams::from(&data[..]), b_key, &metrics)?; +270 let frame = recv_frame(FrameType::RelayToClientDatagram, &mut a_rw).await?; +271 assert_eq!( +272 frame, +273 RelayToClientMsg::Datagrams { +274 remote_node_id: b_key, +275 datagrams: data.to_vec().into(), +276 } +277 ); +278 +279 { +280 let client = clients.0.clients.get(&a_key).unwrap(); +281 // shutdown client a, this should trigger the removal from the clients list +282 client.start_shutdown(); +283 } +284 +285 // need to wait a moment for the removal to be processed +286 let c = clients.clone(); +287 tokio::time::timeout(Duration::from_secs(1), async move { +288 loop { +289 if !c.0.clients.contains_key(&a_key) { +290 break; +291 } +292 tokio::time::sleep(Duration::from_millis(100)).await; +293 } +294 }) +295 .await +296 .context("timeout")?; +297 clients.shutdown().await; +298 +299 Ok(()) +300 } +301}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/server/http_server.rs.html b/pr/3367/docs/src/iroh_relay/server/http_server.rs.html index b717d3d826..8205254898 100644 --- a/pr/3367/docs/src/iroh_relay/server/http_server.rs.html +++ b/pr/3367/docs/src/iroh_relay/server/http_server.rs.html @@ -1,1316 +1,1361 @@ -http_server.rs - source

    iroh_relay/server/
    http_server.rs

    1use std::{
    +http_server.rs - source

    iroh_relay/server/
    http_server.rs

    1use std::{
     2    collections::HashMap, future::Future, net::SocketAddr, pin::Pin, sync::Arc, time::Duration,
     3};
     4
     5use bytes::Bytes;
     6use derive_more::Debug;
    -7use http::{header::CONNECTION, response::Builder as ResponseBuilder};
    -8use hyper::{
    -9    body::Incoming,
    -10    header::{HeaderValue, SEC_WEBSOCKET_ACCEPT, UPGRADE},
    -11    service::Service,
    -12    upgrade::Upgraded,
    -13    HeaderMap, Method, Request, Response, StatusCode,
    -14};
    -15use iroh_base::PublicKey;
    -16use n0_future::{time::Elapsed, FutureExt, SinkExt};
    -17use nested_enum_utils::common_fields;
    -18use snafu::{Backtrace, ResultExt, Snafu};
    -19use tokio::net::{TcpListener, TcpStream};
    -20use tokio_rustls_acme::AcmeAcceptor;
    -21use tokio_util::{codec::Framed, sync::CancellationToken, task::AbortOnDropHandle};
    -22use tracing::{debug, debug_span, error, info, info_span, trace, warn, Instrument};
    -23
    -24use super::{clients::Clients, streams::StreamError, AccessConfig, SpawnError};
    -25use crate::{
    -26    defaults::{timeouts::SERVER_WRITE_TIMEOUT, DEFAULT_KEY_CACHE_CAPACITY},
    -27    http::{Protocol, LEGACY_RELAY_PATH, RELAY_PATH, SUPPORTED_WEBSOCKET_VERSION},
    -28    protos::relay::{
    -29        recv_client_key, Frame, RelayCodec, PER_CLIENT_SEND_QUEUE_DEPTH, PROTOCOL_VERSION,
    -30    },
    -31    server::{
    -32        client::Config,
    -33        metrics::Metrics,
    -34        streams::{MaybeTlsStream, RelayedStream},
    -35        BindTcpListenerSnafu, ClientRateLimit, NoLocalAddrSnafu,
    -36    },
    -37    KeyCache,
    -38};
    -39
    -40type BytesBody = http_body_util::Full<hyper::body::Bytes>;
    -41type HyperError = Box<dyn std::error::Error + Send + Sync>;
    -42type HyperResult<T> = std::result::Result<T, HyperError>;
    -43type HyperHandler = Box<
    -44    dyn Fn(Request<Incoming>, ResponseBuilder) -> HyperResult<Response<BytesBody>>
    -45        + Send
    -46        + Sync
    -47        + 'static,
    -48>;
    -49
    -50/// WebSocket GUID needed for accepting websocket connections, see RFC 6455 (<https://www.rfc-editor.org/rfc/rfc6455>) section 1.3
    -51const SEC_WEBSOCKET_ACCEPT_GUID: &[u8] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
    -52
    -53/// Derives the accept key for WebSocket handshake according to RFC 6455.
    -54/// Takes the client's Sec-WebSocket-Key value and returns the calculated accept key.
    -55fn derive_accept_key(client_key: &HeaderValue) -> String {
    -56    use sha1::Digest;
    -57
    -58    let mut sha1 = sha1::Sha1::new();
    -59    sha1.update(client_key.as_bytes());
    -60    sha1.update(SEC_WEBSOCKET_ACCEPT_GUID);
    -61    data_encoding::BASE64.encode(&sha1.finalize())
    -62}
    -63
    -64/// Creates a new [`BytesBody`] with no content.
    -65fn body_empty() -> BytesBody {
    -66    http_body_util::Full::new(hyper::body::Bytes::new())
    -67}
    -68
    -69/// Creates a new [`BytesBody`] with given content.
    -70fn body_full(content: impl Into<hyper::body::Bytes>) -> BytesBody {
    -71    http_body_util::Full::new(content.into())
    -72}
    -73
    -74#[allow(clippy::result_large_err)]
    -75fn downcast_upgrade(upgraded: Upgraded) -> Result<(MaybeTlsStream, Bytes), ConnectionHandlerError> {
    -76    match upgraded.downcast::<hyper_util::rt::TokioIo<MaybeTlsStream>>() {
    -77        Ok(parts) => Ok((parts.io.into_inner(), parts.read_buf)),
    -78        Err(_) => Err(DowncastUpgradeSnafu.build()),
    -79    }
    -80}
    -81
    -82/// The Relay HTTP server.
    -83///
    -84/// A running HTTP server serving the relay endpoint and optionally a number of additional
    -85/// HTTP services added with [`ServerBuilder::request_handler`].  If configured using
    -86/// [`ServerBuilder::tls_config`] the server will handle TLS as well.
    -87///
    -88/// Created using [`ServerBuilder::spawn`].
    -89#[derive(Debug)]
    -90pub(super) struct Server {
    -91    addr: SocketAddr,
    -92    http_server_task: AbortOnDropHandle<()>,
    -93    cancel_server_loop: CancellationToken,
    -94}
    -95
    -96impl Server {
    -97    /// Returns a handle for this server.
    -98    ///
    -99    /// The server runs in the background as several async tasks.  This allows controlling
    -100    /// the server, in particular it allows gracefully shutting down the server.
    -101    pub(super) fn handle(&self) -> ServerHandle {
    -102        ServerHandle {
    -103            cancel_token: self.cancel_server_loop.clone(),
    -104        }
    -105    }
    -106
    -107    /// Closes the underlying relay server and the HTTP(S) server tasks.
    -108    pub(super) fn shutdown(&self) {
    -109        self.cancel_server_loop.cancel();
    -110    }
    -111
    -112    /// Returns the [`AbortOnDropHandle`] for the supervisor task managing the server.
    -113    ///
    -114    /// This is the root of all the tasks for the server.  Aborting it will abort all the
    -115    /// other tasks for the server.  Awaiting it will complete when all the server tasks are
    -116    /// completed.
    -117    pub(super) fn task_handle(&mut self) -> &mut AbortOnDropHandle<()> {
    -118        &mut self.http_server_task
    -119    }
    -120
    -121    /// Returns the local address of this server.
    -122    pub(super) fn addr(&self) -> SocketAddr {
    -123        self.addr
    -124    }
    -125}
    -126
    -127/// A handle for the [`Server`].
    -128///
    -129/// This does not allow access to the task but can communicate with it.
    -130#[derive(Debug, Clone)]
    -131pub(super) struct ServerHandle {
    -132    cancel_token: CancellationToken,
    -133}
    -134
    -135impl ServerHandle {
    -136    /// Gracefully shut down the server.
    -137    pub(super) fn shutdown(&self) {
    -138        self.cancel_token.cancel()
    -139    }
    -140}
    -141
    -142/// Configuration to use for the TLS connection
    -143#[derive(Debug, Clone)]
    -144pub(super) struct TlsConfig {
    -145    /// The server config
    -146    pub(super) config: Arc<rustls::ServerConfig>,
    -147    /// The kind
    -148    pub(super) acceptor: TlsAcceptor,
    -149}
    -150
    -151/// Errors when attempting to upgrade and
    -152#[common_fields({
    -153    backtrace: Option<Backtrace>,
    -154})]
    -155#[allow(missing_docs)]
    -156#[derive(Debug, Snafu)]
    -157#[non_exhaustive]
    -158pub enum ServeConnectionError {
    -159    #[snafu(display("TLS[acme] handshake"))]
    -160    Handshake {
    -161        source: std::io::Error,
    -162        #[snafu(implicit)]
    -163        span_trace: n0_snafu::SpanTrace,
    -164    },
    -165    #[snafu(display("TLS[acme] serve connection"))]
    -166    ServeConnection {
    -167        source: hyper::Error,
    -168        #[snafu(implicit)]
    -169        span_trace: n0_snafu::SpanTrace,
    -170    },
    -171    #[snafu(display("TLS[manual] timeout"))]
    -172    Timeout {
    -173        source: Elapsed,
    -174        #[snafu(implicit)]
    -175        span_trace: n0_snafu::SpanTrace,
    -176    },
    -177    #[snafu(display("TLS[manual] accept"))]
    -178    ManualAccept {
    -179        source: std::io::Error,
    -180        #[snafu(implicit)]
    -181        span_trace: n0_snafu::SpanTrace,
    -182    },
    -183    #[snafu(display("TLS[acme] accept"))]
    -184    LetsEncryptAccept {
    -185        source: std::io::Error,
    -186        #[snafu(implicit)]
    -187        span_trace: n0_snafu::SpanTrace,
    -188    },
    -189    #[snafu(display("HTTPS connection"))]
    -190    Https {
    -191        source: hyper::Error,
    -192        #[snafu(implicit)]
    -193        span_trace: n0_snafu::SpanTrace,
    -194    },
    -195    #[snafu(display("HTTP connection"))]
    -196    Http {
    -197        source: hyper::Error,
    -198        #[snafu(implicit)]
    -199        span_trace: n0_snafu::SpanTrace,
    -200    },
    -201}
    -202
    -203/// Server accept errors.
    -204#[common_fields({
    -205    backtrace: Option<Backtrace>,
    -206})]
    -207#[allow(missing_docs)]
    -208#[derive(Debug, Snafu)]
    -209#[non_exhaustive]
    -210pub enum AcceptError {
    -211    #[snafu(display("Unable to receive client information"))]
    -212    RecvClientKey {
    -213        #[allow(clippy::result_large_err)]
    -214        source: StreamError,
    -215        #[snafu(implicit)]
    -216        span_trace: n0_snafu::SpanTrace,
    -217    },
    -218    #[snafu(display("Unexpected client version {version}, expected {expected_version}"))]
    -219    UnexpectedClientVersion {
    -220        version: usize,
    -221        expected_version: usize,
    -222        #[snafu(implicit)]
    -223        span_trace: n0_snafu::SpanTrace,
    -224    },
    -225    #[snafu(transparent)]
    -226    Io { source: std::io::Error },
    -227    #[snafu(display("Client not authenticated: {key:?}"))]
    -228    ClientNotAuthenticated {
    -229        key: PublicKey,
    -230        #[snafu(implicit)]
    -231        span_trace: n0_snafu::SpanTrace,
    -232    },
    -233}
    -234
    -235/// Server connection errors, includes errors that can happen on `accept`.
    -236#[common_fields({
    -237    backtrace: Option<Backtrace>,
    -238})]
    -239#[allow(missing_docs)]
    -240#[derive(Debug, Snafu)]
    -241#[non_exhaustive]
    -242pub enum ConnectionHandlerError {
    -243    #[snafu(transparent)]
    -244    Accept { source: AcceptError },
    -245    #[snafu(display("Could not downcast the upgraded connection to MaybeTlsStream"))]
    -246    DowncastUpgrade {
    -247        #[snafu(implicit)]
    -248        span_trace: n0_snafu::SpanTrace,
    -249    },
    -250    #[snafu(display("Cannot deal with buffered data yet: {buf:?}"))]
    -251    BufferNotEmpty {
    -252        buf: Bytes,
    -253        #[snafu(implicit)]
    -254        span_trace: n0_snafu::SpanTrace,
    -255    },
    -256}
    -257
    -258/// Builder for the Relay HTTP Server.
    -259///
    -260/// Defaults to handling relay requests on the "/relay" (and "/derp" for backwards compatibility) endpoint.
    -261/// Other HTTP endpoints can be added using [`ServerBuilder::request_handler`].
    -262#[derive(derive_more::Debug)]
    -263pub(super) struct ServerBuilder {
    -264    /// The ip + port combination for this server.
    -265    addr: SocketAddr,
    -266    /// Optional tls configuration/TlsAcceptor combination.
    -267    ///
    -268    /// When `None`, the server will serve HTTP, otherwise it will serve HTTPS.
    -269    tls_config: Option<TlsConfig>,
    -270    /// A map of request handlers to routes.
    -271    ///
    -272    /// Used when certain routes in your server should be made available at the same port as
    -273    /// the relay server, and so must be handled along side requests to the relay endpoint.
    -274    handlers: Handlers,
    -275    /// Headers to use for HTTP responses.
    -276    headers: HeaderMap,
    -277    /// Rate-limiting configuration for an individual client connection.
    -278    ///
    -279    /// Rate-limiting is enforced on received traffic from individual clients.  This
    -280    /// configuration applies to a single client connection.
    -281    client_rx_ratelimit: Option<ClientRateLimit>,
    -282    /// The capacity of the key cache.
    -283    key_cache_capacity: usize,
    -284    /// Access config for nodes.
    -285    access: AccessConfig,
    -286    metrics: Option<Arc<Metrics>>,
    -287}
    -288
    -289impl ServerBuilder {
    -290    /// Creates a new [ServerBuilder].
    -291    pub(super) fn new(addr: SocketAddr) -> Self {
    -292        Self {
    -293            addr,
    -294            tls_config: None,
    -295            handlers: Default::default(),
    -296            headers: HeaderMap::new(),
    -297            client_rx_ratelimit: None,
    -298            key_cache_capacity: DEFAULT_KEY_CACHE_CAPACITY,
    -299            access: AccessConfig::Everyone,
    -300            metrics: None,
    -301        }
    -302    }
    -303
    -304    /// Sets the metrics collector.
    -305    pub(super) fn metrics(mut self, metrics: Arc<Metrics>) -> Self {
    -306        self.metrics = Some(metrics);
    -307        self
    -308    }
    -309
    -310    /// Set the access configuration.
    -311    pub(super) fn access(mut self, access: AccessConfig) -> Self {
    -312        self.access = access;
    -313        self
    -314    }
    -315
    -316    /// Serves all requests content using TLS.
    -317    pub(super) fn tls_config(mut self, config: Option<TlsConfig>) -> Self {
    -318        self.tls_config = config;
    -319        self
    -320    }
    -321
    -322    /// Sets the per-client rate-limit configuration for incoming data.
    -323    ///
    -324    /// On each client connection the incoming data is rate-limited.  By default
    -325    /// no rate limit is enforced.
    -326    pub(super) fn client_rx_ratelimit(mut self, config: ClientRateLimit) -> Self {
    -327        self.client_rx_ratelimit = Some(config);
    -328        self
    -329    }
    -330
    -331    /// Adds a custom handler for a specific Method & URI.
    -332    pub(super) fn request_handler(
    -333        mut self,
    -334        method: Method,
    -335        uri_path: &'static str,
    -336        handler: HyperHandler,
    -337    ) -> Self {
    -338        self.handlers.insert((method, uri_path), handler);
    -339        self
    -340    }
    -341
    -342    /// Adds HTTP headers to responses.
    -343    pub(super) fn headers(mut self, headers: HeaderMap) -> Self {
    -344        for (k, v) in headers.iter() {
    -345            self.headers.insert(k.clone(), v.clone());
    -346        }
    -347        self
    -348    }
    -349
    -350    /// Set the capacity of the cache for public keys.
    -351    pub fn key_cache_capacity(mut self, capacity: usize) -> Self {
    -352        self.key_cache_capacity = capacity;
    -353        self
    -354    }
    -355
    -356    /// Builds and spawns an HTTP(S) Relay Server.
    -357    pub(super) async fn spawn(self) -> Result<Server, SpawnError> {
    -358        use snafu::ResultExt;
    +7use http::{
    +8    header::{CONNECTION, SEC_WEBSOCKET_KEY, SEC_WEBSOCKET_PROTOCOL, SEC_WEBSOCKET_VERSION},
    +9    response::Builder as ResponseBuilder,
    +10};
    +11use hyper::{
    +12    HeaderMap, Method, Request, Response, StatusCode,
    +13    body::Incoming,
    +14    header::{HeaderValue, SEC_WEBSOCKET_ACCEPT, UPGRADE},
    +15    service::Service,
    +16    upgrade::Upgraded,
    +17};
    +18use n0_future::time::Elapsed;
    +19use nested_enum_utils::common_fields;
    +20use snafu::{Backtrace, OptionExt, ResultExt, Snafu};
    +21use tokio::net::{TcpListener, TcpStream};
    +22use tokio_rustls_acme::AcmeAcceptor;
    +23use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle};
    +24use tracing::{Instrument, debug, error, info, info_span, trace, warn, warn_span};
    +25
    +26use super::{AccessConfig, SpawnError, clients::Clients, streams::InvalidBucketConfig};
    +27use crate::{
    +28    KeyCache,
    +29    defaults::{DEFAULT_KEY_CACHE_CAPACITY, timeouts::SERVER_WRITE_TIMEOUT},
    +30    http::{
    +31        CLIENT_AUTH_HEADER, RELAY_PATH, RELAY_PROTOCOL_VERSION, SUPPORTED_WEBSOCKET_VERSION,
    +32        WEBSOCKET_UPGRADE_PROTOCOL,
    +33    },
    +34    protos::{
    +35        handshake,
    +36        relay::{MAX_FRAME_SIZE, PER_CLIENT_SEND_QUEUE_DEPTH},
    +37        streams::WsBytesFramed,
    +38    },
    +39    server::{
    +40        BindTcpListenerSnafu, ClientRateLimit, NoLocalAddrSnafu,
    +41        client::Config,
    +42        metrics::Metrics,
    +43        streams::{MaybeTlsStream, RateLimited, RelayedStream},
    +44    },
    +45};
    +46
    +47type BytesBody = http_body_util::Full<hyper::body::Bytes>;
    +48type HyperError = Box<dyn std::error::Error + Send + Sync>;
    +49type HyperResult<T> = std::result::Result<T, HyperError>;
    +50type HyperHandler = Box<
    +51    dyn Fn(Request<Incoming>, ResponseBuilder) -> HyperResult<Response<BytesBody>>
    +52        + Send
    +53        + Sync
    +54        + 'static,
    +55>;
    +56
    +57/// WebSocket GUID needed for accepting websocket connections, see RFC 6455 (<https://www.rfc-editor.org/rfc/rfc6455>) section 1.3
    +58const SEC_WEBSOCKET_ACCEPT_GUID: &[u8] = b"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
    +59
    +60/// Derives the accept key for WebSocket handshake according to RFC 6455.
    +61/// Takes the client's Sec-WebSocket-Key value and returns the calculated accept key.
    +62fn derive_accept_key(client_key: &HeaderValue) -> String {
    +63    use sha1::Digest;
    +64
    +65    let mut sha1 = sha1::Sha1::new();
    +66    sha1.update(client_key.as_bytes());
    +67    sha1.update(SEC_WEBSOCKET_ACCEPT_GUID);
    +68    data_encoding::BASE64.encode(&sha1.finalize())
    +69}
    +70
    +71/// Creates a new [`BytesBody`] with given content.
    +72fn body_full(content: impl Into<hyper::body::Bytes>) -> BytesBody {
    +73    http_body_util::Full::new(content.into())
    +74}
    +75
    +76#[allow(clippy::result_large_err)]
    +77fn downcast_upgrade(upgraded: Upgraded) -> Result<(MaybeTlsStream, Bytes), ConnectionHandlerError> {
    +78    match upgraded.downcast::<hyper_util::rt::TokioIo<MaybeTlsStream>>() {
    +79        Ok(parts) => Ok((parts.io.into_inner(), parts.read_buf)),
    +80        Err(_) => Err(DowncastUpgradeSnafu.build()),
    +81    }
    +82}
    +83
    +84/// The Relay HTTP server.
    +85///
    +86/// A running HTTP server serving the relay endpoint and optionally a number of additional
    +87/// HTTP services added with [`ServerBuilder::request_handler`].  If configured using
    +88/// [`ServerBuilder::tls_config`] the server will handle TLS as well.
    +89///
    +90/// Created using [`ServerBuilder::spawn`].
    +91#[derive(Debug)]
    +92pub(super) struct Server {
    +93    addr: SocketAddr,
    +94    http_server_task: AbortOnDropHandle<()>,
    +95    cancel_server_loop: CancellationToken,
    +96}
    +97
    +98impl Server {
    +99    /// Returns a handle for this server.
    +100    ///
    +101    /// The server runs in the background as several async tasks.  This allows controlling
    +102    /// the server, in particular it allows gracefully shutting down the server.
    +103    pub(super) fn handle(&self) -> ServerHandle {
    +104        ServerHandle {
    +105            cancel_token: self.cancel_server_loop.clone(),
    +106        }
    +107    }
    +108
    +109    /// Closes the underlying relay server and the HTTP(S) server tasks.
    +110    pub(super) fn shutdown(&self) {
    +111        self.cancel_server_loop.cancel();
    +112    }
    +113
    +114    /// Returns the [`AbortOnDropHandle`] for the supervisor task managing the server.
    +115    ///
    +116    /// This is the root of all the tasks for the server.  Aborting it will abort all the
    +117    /// other tasks for the server.  Awaiting it will complete when all the server tasks are
    +118    /// completed.
    +119    pub(super) fn task_handle(&mut self) -> &mut AbortOnDropHandle<()> {
    +120        &mut self.http_server_task
    +121    }
    +122
    +123    /// Returns the local address of this server.
    +124    pub(super) fn addr(&self) -> SocketAddr {
    +125        self.addr
    +126    }
    +127}
    +128
    +129/// A handle for the [`Server`].
    +130///
    +131/// This does not allow access to the task but can communicate with it.
    +132#[derive(Debug, Clone)]
    +133pub(super) struct ServerHandle {
    +134    cancel_token: CancellationToken,
    +135}
    +136
    +137impl ServerHandle {
    +138    /// Gracefully shut down the server.
    +139    pub(super) fn shutdown(&self) {
    +140        self.cancel_token.cancel()
    +141    }
    +142}
    +143
    +144/// Configuration to use for the TLS connection
    +145#[derive(Debug, Clone)]
    +146pub(super) struct TlsConfig {
    +147    /// The server config
    +148    pub(super) config: Arc<rustls::ServerConfig>,
    +149    /// The kind
    +150    pub(super) acceptor: TlsAcceptor,
    +151}
    +152
    +153/// Errors when attempting to upgrade and
    +154#[common_fields({
    +155    backtrace: Option<Backtrace>,
    +156})]
    +157#[allow(missing_docs)]
    +158#[derive(Debug, Snafu)]
    +159#[non_exhaustive]
    +160pub enum ServeConnectionError {
    +161    #[snafu(display("TLS[acme] handshake"))]
    +162    TlsHandshake {
    +163        source: std::io::Error,
    +164        #[snafu(implicit)]
    +165        span_trace: n0_snafu::SpanTrace,
    +166    },
    +167    #[snafu(display("TLS[acme] serve connection"))]
    +168    ServeConnection {
    +169        source: hyper::Error,
    +170        #[snafu(implicit)]
    +171        span_trace: n0_snafu::SpanTrace,
    +172    },
    +173    #[snafu(display("TLS[manual] timeout"))]
    +174    Timeout {
    +175        source: Elapsed,
    +176        #[snafu(implicit)]
    +177        span_trace: n0_snafu::SpanTrace,
    +178    },
    +179    #[snafu(display("TLS[manual] accept"))]
    +180    ManualAccept {
    +181        source: std::io::Error,
    +182        #[snafu(implicit)]
    +183        span_trace: n0_snafu::SpanTrace,
    +184    },
    +185    #[snafu(display("TLS[acme] accept"))]
    +186    LetsEncryptAccept {
    +187        source: std::io::Error,
    +188        #[snafu(implicit)]
    +189        span_trace: n0_snafu::SpanTrace,
    +190    },
    +191    #[snafu(display("HTTPS connection"))]
    +192    Https {
    +193        source: hyper::Error,
    +194        #[snafu(implicit)]
    +195        span_trace: n0_snafu::SpanTrace,
    +196    },
    +197    #[snafu(display("HTTP connection"))]
    +198    Http {
    +199        source: hyper::Error,
    +200        #[snafu(implicit)]
    +201        span_trace: n0_snafu::SpanTrace,
    +202    },
    +203}
    +204
    +205/// Server accept errors.
    +206#[common_fields({
    +207    backtrace: Option<Backtrace>,
    +208})]
    +209#[allow(missing_docs)]
    +210#[derive(Debug, Snafu)]
    +211#[non_exhaustive]
    +212pub enum AcceptError {
    +213    #[snafu(transparent)]
    +214    Handshake { source: handshake::Error },
    +215    #[snafu(display("rate limiting misconfigured"))]
    +216    RateLimitingMisconfigured { source: InvalidBucketConfig },
    +217}
    +218
    +219/// Server connection errors, includes errors that can happen on `accept`.
    +220#[common_fields({
    +221    backtrace: Option<Backtrace>,
    +222})]
    +223#[allow(missing_docs)]
    +224#[derive(Debug, Snafu)]
    +225#[non_exhaustive]
    +226pub enum ConnectionHandlerError {
    +227    #[snafu(transparent)]
    +228    Accept { source: AcceptError },
    +229    #[snafu(display("Could not downcast the upgraded connection to MaybeTlsStream"))]
    +230    DowncastUpgrade {
    +231        #[snafu(implicit)]
    +232        span_trace: n0_snafu::SpanTrace,
    +233    },
    +234    #[snafu(display("Cannot deal with buffered data yet: {buf:?}"))]
    +235    BufferNotEmpty {
    +236        buf: Bytes,
    +237        #[snafu(implicit)]
    +238        span_trace: n0_snafu::SpanTrace,
    +239    },
    +240}
    +241
    +242/// Builder for the Relay HTTP Server.
    +243///
    +244/// Defaults to handling relay requests on the "/relay" (and "/derp" for backwards compatibility) endpoint.
    +245/// Other HTTP endpoints can be added using [`ServerBuilder::request_handler`].
    +246#[derive(derive_more::Debug)]
    +247pub(super) struct ServerBuilder {
    +248    /// The ip + port combination for this server.
    +249    addr: SocketAddr,
    +250    /// Optional tls configuration/TlsAcceptor combination.
    +251    ///
    +252    /// When `None`, the server will serve HTTP, otherwise it will serve HTTPS.
    +253    tls_config: Option<TlsConfig>,
    +254    /// A map of request handlers to routes.
    +255    ///
    +256    /// Used when certain routes in your server should be made available at the same port as
    +257    /// the relay server, and so must be handled along side requests to the relay endpoint.
    +258    handlers: Handlers,
    +259    /// Headers to use for HTTP responses.
    +260    headers: HeaderMap,
    +261    /// Rate-limiting configuration for an individual client connection.
    +262    ///
    +263    /// Rate-limiting is enforced on received traffic from individual clients.  This
    +264    /// configuration applies to a single client connection.
    +265    client_rx_ratelimit: Option<ClientRateLimit>,
    +266    /// The capacity of the key cache.
    +267    key_cache_capacity: usize,
    +268    /// Access config for nodes.
    +269    access: AccessConfig,
    +270    metrics: Option<Arc<Metrics>>,
    +271}
    +272
    +273impl ServerBuilder {
    +274    /// Creates a new [ServerBuilder].
    +275    pub(super) fn new(addr: SocketAddr) -> Self {
    +276        Self {
    +277            addr,
    +278            tls_config: None,
    +279            handlers: Default::default(),
    +280            headers: HeaderMap::new(),
    +281            client_rx_ratelimit: None,
    +282            key_cache_capacity: DEFAULT_KEY_CACHE_CAPACITY,
    +283            access: AccessConfig::Everyone,
    +284            metrics: None,
    +285        }
    +286    }
    +287
    +288    /// Sets the metrics collector.
    +289    pub(super) fn metrics(mut self, metrics: Arc<Metrics>) -> Self {
    +290        self.metrics = Some(metrics);
    +291        self
    +292    }
    +293
    +294    /// Set the access configuration.
    +295    pub(super) fn access(mut self, access: AccessConfig) -> Self {
    +296        self.access = access;
    +297        self
    +298    }
    +299
    +300    /// Serves all requests content using TLS.
    +301    pub(super) fn tls_config(mut self, config: Option<TlsConfig>) -> Self {
    +302        self.tls_config = config;
    +303        self
    +304    }
    +305
    +306    /// Sets the per-client rate-limit configuration for incoming data.
    +307    ///
    +308    /// On each client connection the incoming data is rate-limited.  By default
    +309    /// no rate limit is enforced.
    +310    pub(super) fn client_rx_ratelimit(mut self, config: ClientRateLimit) -> Self {
    +311        self.client_rx_ratelimit = Some(config);
    +312        self
    +313    }
    +314
    +315    /// Adds a custom handler for a specific Method & URI.
    +316    pub(super) fn request_handler(
    +317        mut self,
    +318        method: Method,
    +319        uri_path: &'static str,
    +320        handler: HyperHandler,
    +321    ) -> Self {
    +322        self.handlers.insert((method, uri_path), handler);
    +323        self
    +324    }
    +325
    +326    /// Adds HTTP headers to responses.
    +327    pub(super) fn headers(mut self, headers: HeaderMap) -> Self {
    +328        for (k, v) in headers.iter() {
    +329            self.headers.insert(k.clone(), v.clone());
    +330        }
    +331        self
    +332    }
    +333
    +334    /// Set the capacity of the cache for public keys.
    +335    pub fn key_cache_capacity(mut self, capacity: usize) -> Self {
    +336        self.key_cache_capacity = capacity;
    +337        self
    +338    }
    +339
    +340    /// Builds and spawns an HTTP(S) Relay Server.
    +341    pub(super) async fn spawn(self) -> Result<Server, SpawnError> {
    +342        use snafu::ResultExt;
    +343
    +344        let cancel_token = CancellationToken::new();
    +345
    +346        let service = RelayService::new(
    +347            self.handlers,
    +348            self.headers,
    +349            self.client_rx_ratelimit,
    +350            KeyCache::new(self.key_cache_capacity),
    +351            self.access,
    +352            self.metrics.unwrap_or_default(),
    +353        );
    +354
    +355        let addr = self.addr;
    +356        let tls_config = self.tls_config;
    +357
    +358        // Bind a TCP listener on `addr` and handles content using HTTPS.
     359
    -360        let cancel_token = CancellationToken::new();
    -361
    -362        let service = RelayService::new(
    -363            self.handlers,
    -364            self.headers,
    -365            self.client_rx_ratelimit,
    -366            KeyCache::new(self.key_cache_capacity),
    -367            self.access,
    -368            self.metrics.unwrap_or_default(),
    -369        );
    -370
    -371        let addr = self.addr;
    -372        let tls_config = self.tls_config;
    -373
    -374        // Bind a TCP listener on `addr` and handles content using HTTPS.
    -375
    -376        let listener = TcpListener::bind(&addr)
    -377            .await
    -378            .map_err(|_| BindTcpListenerSnafu { addr }.build())?;
    -379
    -380        let addr = listener.local_addr().context(NoLocalAddrSnafu)?;
    -381        let http_str = tls_config.as_ref().map_or("HTTP/WS", |_| "HTTPS/WSS");
    -382        info!("[{http_str}] relay: serving on {addr}");
    -383
    -384        let cancel = cancel_token.clone();
    -385        let task = tokio::task::spawn(
    -386            async move {
    -387                // create a join set to track all our connection tasks
    -388                let mut set = tokio::task::JoinSet::new();
    -389                loop {
    -390                    tokio::select! {
    -391                        biased;
    -392                        _ = cancel.cancelled() => {
    -393                            break;
    -394                        }
    -395                        Some(res) = set.join_next() => {
    -396                            if let Err(err) = res {
    -397                                if err.is_panic() {
    -398                                    panic!("task panicked: {:#?}", err);
    -399                                }
    +360        let listener = TcpListener::bind(&addr)
    +361            .await
    +362            .map_err(|_| BindTcpListenerSnafu { addr }.build())?;
    +363
    +364        let addr = listener.local_addr().context(NoLocalAddrSnafu)?;
    +365        let http_str = tls_config.as_ref().map_or("HTTP/WS", |_| "HTTPS/WSS");
    +366        info!("[{http_str}] relay: serving on {addr}");
    +367
    +368        let cancel = cancel_token.clone();
    +369        let task = tokio::task::spawn(
    +370            async move {
    +371                // create a join set to track all our connection tasks
    +372                let mut set = tokio::task::JoinSet::new();
    +373                loop {
    +374                    tokio::select! {
    +375                        biased;
    +376                        _ = cancel.cancelled() => {
    +377                            break;
    +378                        }
    +379                        Some(res) = set.join_next() => {
    +380                            if let Err(err) = res {
    +381                                if err.is_panic() {
    +382                                    panic!("task panicked: {err:#?}");
    +383                                }
    +384                            }
    +385                        }
    +386                        res = listener.accept() => match res {
    +387                            Ok((stream, peer_addr)) => {
    +388                                debug!("connection opened from {peer_addr}");
    +389                                let tls_config = tls_config.clone();
    +390                                let service = service.clone();
    +391                                // spawn a task to handle the connection
    +392                                set.spawn(async move {
    +393                                    service
    +394                                        .handle_connection(stream, tls_config)
    +395                                        .await
    +396                                }.instrument(info_span!("conn", peer = %peer_addr)));
    +397                            }
    +398                            Err(err) => {
    +399                                error!("failed to accept connection: {err}");
     400                            }
     401                        }
    -402                        res = listener.accept() => match res {
    -403                            Ok((stream, peer_addr)) => {
    -404                                debug!("connection opened from {peer_addr}");
    -405                                let tls_config = tls_config.clone();
    -406                                let service = service.clone();
    -407                                // spawn a task to handle the connection
    -408                                set.spawn(async move {
    -409                                    service
    -410                                        .handle_connection(stream, tls_config)
    -411                                        .await
    -412                                }.instrument(info_span!("conn", peer = %peer_addr)));
    -413                            }
    -414                            Err(err) => {
    -415                                error!("failed to accept connection: {err}");
    -416                            }
    -417                        }
    -418                    }
    -419                }
    -420                service.shutdown().await;
    -421                set.shutdown().await;
    -422                debug!("server has been shutdown.");
    -423            }
    -424            .instrument(info_span!("relay-http-serve")),
    -425        );
    -426
    -427        Ok(Server {
    -428            addr,
    -429            http_server_task: AbortOnDropHandle::new(task),
    -430            cancel_server_loop: cancel_token,
    -431        })
    -432    }
    +402                    }
    +403                }
    +404                service.shutdown().await;
    +405                set.shutdown().await;
    +406                debug!("server has been shutdown.");
    +407            }
    +408            .instrument(info_span!("relay-http-serve")),
    +409        );
    +410
    +411        Ok(Server {
    +412            addr,
    +413            http_server_task: AbortOnDropHandle::new(task),
    +414            cancel_server_loop: cancel_token,
    +415        })
    +416    }
    +417}
    +418
    +419/// The hyper Service that serves the actual relay endpoints.
    +420#[derive(Clone, Debug)]
    +421struct RelayService(Arc<Inner>);
    +422
    +423#[derive(Debug)]
    +424struct Inner {
    +425    handlers: Handlers,
    +426    headers: HeaderMap,
    +427    clients: Clients,
    +428    write_timeout: Duration,
    +429    rate_limit: Option<ClientRateLimit>,
    +430    key_cache: KeyCache,
    +431    access: AccessConfig,
    +432    metrics: Arc<Metrics>,
     433}
     434
    -435/// The hyper Service that serves the actual relay endpoints.
    -436#[derive(Clone, Debug)]
    -437struct RelayService(Arc<Inner>);
    -438
    -439#[derive(Debug)]
    -440struct Inner {
    -441    handlers: Handlers,
    -442    headers: HeaderMap,
    -443    clients: Clients,
    -444    write_timeout: Duration,
    -445    rate_limit: Option<ClientRateLimit>,
    -446    key_cache: KeyCache,
    -447    access: AccessConfig,
    -448    metrics: Arc<Metrics>,
    -449}
    -450
    -451impl RelayService {
    -452    /// Upgrades the HTTP connection to the relay protocol, runs relay client.
    -453    fn call_client_conn(
    -454        &self,
    -455        mut req: Request<Incoming>,
    -456    ) -> Pin<Box<dyn Future<Output = Result<Response<BytesBody>, hyper::Error>> + Send>> {
    -457        // TODO: soooo much cloning. See if there is an alternative
    -458        let this = self.clone();
    -459        let mut builder = Response::builder();
    +435#[derive(Debug, Snafu)]
    +436enum RelayUpgradeReqError {
    +437    #[snafu(display("missing header: {header}"))]
    +438    MissingHeader { header: http::HeaderName },
    +439    #[snafu(display("invalid header value for {header}: {details}"))]
    +440    InvalidHeader {
    +441        header: http::HeaderName,
    +442        details: String,
    +443    },
    +444    #[snafu(display(
    +445        "invalid header value for {SEC_WEBSOCKET_VERSION}: unsupported websocket version, only supporting {SUPPORTED_WEBSOCKET_VERSION}"
    +446    ))]
    +447    UnsupportedWebsocketVersion,
    +448    #[snafu(display(
    +449        "invalid header value for {SEC_WEBSOCKET_PROTOCOL}: unsupported relay version: we support {we_support} but you only provide {you_support}"
    +450    ))]
    +451    UnsupportedRelayVersion {
    +452        we_support: &'static str,
    +453        you_support: String,
    +454    },
    +455}
    +456
    +457impl RelayService {
    +458    fn build_response(&self) -> http::response::Builder {
    +459        let mut res = Response::builder();
     460        for (key, value) in self.0.headers.iter() {
    -461            builder = builder.header(key, value);
    +461            res = res.header(key, value);
     462        }
    -463
    -464        async move {
    -465            {
    -466                // Send a 400 to any request that doesn't have an `Upgrade` header.
    -467                let Some(protocol) = req.headers().get(UPGRADE).and_then(Protocol::parse_header)
    -468                else {
    -469                    return Ok(builder
    -470                        .status(StatusCode::BAD_REQUEST)
    -471                        .body(body_empty())
    -472                        .expect("valid body"));
    -473                };
    -474
    -475                let websocket_headers = if protocol == Protocol::Websocket {
    -476                    let Some(key) = req.headers().get("Sec-WebSocket-Key").cloned() else {
    -477                        warn!("missing header Sec-WebSocket-Key for websocket relay protocol");
    -478                        return Ok(builder
    -479                            .status(StatusCode::BAD_REQUEST)
    -480                            .body(body_empty())
    -481                            .expect("valid body"));
    -482                    };
    -483
    -484                    let Some(version) = req.headers().get("Sec-WebSocket-Version").cloned() else {
    -485                        warn!("missing header Sec-WebSocket-Version for websocket relay protocol");
    -486                        return Ok(builder
    -487                            .status(StatusCode::BAD_REQUEST)
    -488                            .body(body_empty())
    -489                            .expect("valid body"));
    -490                    };
    +463        res
    +464    }
    +465
    +466    /// Upgrades the HTTP connection to the relay protocol, runs relay client.
    +467    fn handle_relay_ws_upgrade(
    +468        &self,
    +469        mut req: Request<Incoming>,
    +470    ) -> Result<Response<BytesBody>, RelayUpgradeReqError> {
    +471        fn expect_header(
    +472            req: &Request<Incoming>,
    +473            header: http::HeaderName,
    +474        ) -> Result<&HeaderValue, RelayUpgradeReqError> {
    +475            req.headers()
    +476                .get(&header)
    +477                .context(MissingHeaderSnafu { header })
    +478        }
    +479
    +480        let upgrade_header = expect_header(&req, UPGRADE)?;
    +481        snafu::ensure!(
    +482            upgrade_header == HeaderValue::from_static(WEBSOCKET_UPGRADE_PROTOCOL),
    +483            InvalidHeaderSnafu {
    +484                header: UPGRADE,
    +485                details: format!("value must be {WEBSOCKET_UPGRADE_PROTOCOL}"),
    +486            }
    +487        );
    +488
    +489        let key = expect_header(&req, SEC_WEBSOCKET_KEY)?.clone();
    +490        let version = expect_header(&req, SEC_WEBSOCKET_VERSION)?.clone();
     491
    -492                    if version.as_bytes() != SUPPORTED_WEBSOCKET_VERSION.as_bytes() {
    -493                        warn!("invalid header Sec-WebSocket-Version: {:?}", version);
    -494                        return Ok(builder
    -495                            .status(StatusCode::BAD_REQUEST)
    -496                            // It's convention to send back the version(s) we *do* support
    -497                            .header("Sec-WebSocket-Version", SUPPORTED_WEBSOCKET_VERSION)
    -498                            .body(body_empty())
    -499                            .expect("valid body"));
    -500                    }
    -501
    -502                    Some((key, version))
    -503                } else {
    -504                    None
    -505                };
    -506
    -507                debug!(?protocol, "upgrading connection");
    -508
    -509                // Setup a future that will eventually receive the upgraded
    -510                // connection and talk a new protocol, and spawn the future
    -511                // into the runtime.
    -512                //
    -513                // Note: This can't possibly be fulfilled until the 101 response
    -514                // is returned below, so it's better to spawn this future instead
    -515                // waiting for it to complete to then return a response.
    -516                tokio::task::spawn(
    -517                    async move {
    -518                        match hyper::upgrade::on(&mut req).await {
    -519                            Ok(upgraded) => {
    -520                                if let Err(err) =
    -521                                    this.0.relay_connection_handler(protocol, upgraded).await
    -522                                {
    -523                                    warn!(
    -524                                        ?protocol,
    -525                                        "error accepting upgraded connection: {err:#}",
    -526                                    );
    -527                                } else {
    -528                                    debug!(?protocol, "upgraded connection completed");
    -529                                };
    -530                            }
    -531                            Err(err) => warn!("upgrade error: {err:#}"),
    -532                        }
    -533                    }
    -534                    .instrument(debug_span!("handler")),
    -535                );
    -536
    -537                // Now return a 101 Response saying we agree to the upgrade to the
    -538                // HTTP_UPGRADE_PROTOCOL
    -539                builder = builder
    -540                    .status(StatusCode::SWITCHING_PROTOCOLS)
    -541                    .header(UPGRADE, HeaderValue::from_static(protocol.upgrade_header()));
    -542
    -543                if let Some((key, _version)) = websocket_headers {
    -544                    Ok(builder
    -545                        .header(SEC_WEBSOCKET_ACCEPT, derive_accept_key(&key))
    -546                        .header(CONNECTION, "upgrade")
    -547                        .body(body_full("switching to websocket protocol"))
    -548                        .expect("valid body"))
    -549                } else {
    -550                    Ok(builder.body(body_empty()).expect("valid body"))
    -551                }
    -552            }
    -553        }
    -554        .boxed()
    -555    }
    -556}
    -557
    -558impl Service<Request<Incoming>> for RelayService {
    -559    type Response = Response<BytesBody>;
    -560    type Error = HyperError;
    -561    type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
    -562
    -563    fn call(&self, req: Request<Incoming>) -> Self::Future {
    -564        // Create a client if the request hits the relay endpoint.
    -565        if matches!(
    -566            (req.method(), req.uri().path()),
    -567            (&hyper::Method::GET, LEGACY_RELAY_PATH | RELAY_PATH)
    -568        ) {
    -569            let this = self.clone();
    -570            return Box::pin(async move { this.call_client_conn(req).await.map_err(Into::into) });
    -571        }
    -572        // Otherwise handle the relay connection as normal.
    -573
    -574        // Check all other possible endpoints.
    -575        let uri = req.uri().clone();
    -576        if let Some(res) = self.0.handlers.get(&(req.method().clone(), uri.path())) {
    -577            let f = res(req, self.0.default_response());
    -578            return Box::pin(async move { f });
    -579        }
    -580        // Otherwise return 404
    -581        let res = self.0.not_found_fn(req, self.0.default_response());
    -582        Box::pin(async move { res })
    -583    }
    -584}
    -585
    -586impl Inner {
    -587    fn default_response(&self) -> ResponseBuilder {
    -588        let mut response = Response::builder();
    -589        for (key, value) in self.headers.iter() {
    -590            response = response.header(key.clone(), value.clone());
    +492        snafu::ensure!(
    +493            version.as_bytes() == SUPPORTED_WEBSOCKET_VERSION.as_bytes(),
    +494            UnsupportedWebsocketVersionSnafu
    +495        );
    +496
    +497        let subprotocols = expect_header(&req, SEC_WEBSOCKET_PROTOCOL)?
    +498            .to_str()
    +499            .ok()
    +500            .context(InvalidHeaderSnafu {
    +501                header: SEC_WEBSOCKET_PROTOCOL,
    +502                details: "header value is not ascii".to_string(),
    +503            })?;
    +504        let supports_our_version = subprotocols
    +505            .split_whitespace()
    +506            .any(|p| p == RELAY_PROTOCOL_VERSION);
    +507        snafu::ensure!(
    +508            supports_our_version,
    +509            UnsupportedRelayVersionSnafu {
    +510                we_support: RELAY_PROTOCOL_VERSION,
    +511                you_support: subprotocols.to_string(),
    +512            }
    +513        );
    +514
    +515        let client_auth_header = req.headers().get(CLIENT_AUTH_HEADER).cloned();
    +516
    +517        // Setup a future that will eventually receive the upgraded
    +518        // connection and talk a new protocol, and spawn the future
    +519        // into the runtime.
    +520        //
    +521        // Note: This can't possibly be fulfilled until the 101 response
    +522        // is returned below, so it's better to spawn this future instead
    +523        // waiting for it to complete to then return a response.
    +524        tokio::task::spawn({
    +525            let this = self.clone();
    +526            async move {
    +527                match hyper::upgrade::on(&mut req).await {
    +528                    Ok(upgraded) => {
    +529                        if let Err(err) = this
    +530                            .0
    +531                            .relay_connection_handler(upgraded, client_auth_header)
    +532                            .await
    +533                        {
    +534                            warn!("error accepting upgraded connection: {err:#}",);
    +535                        } else {
    +536                            debug!("upgraded connection completed");
    +537                        };
    +538                    }
    +539                    Err(err) => warn!("upgrade error: {err:#}"),
    +540                }
    +541            }
    +542            .instrument(warn_span!("handler"))
    +543        });
    +544
    +545        // Now return a 101 Response saying we agree to the upgrade to the
    +546        // websocket upgrade protocol
    +547        Ok(self
    +548            .build_response()
    +549            .status(StatusCode::SWITCHING_PROTOCOLS)
    +550            .header(
    +551                UPGRADE,
    +552                HeaderValue::from_static(WEBSOCKET_UPGRADE_PROTOCOL),
    +553            )
    +554            .header(SEC_WEBSOCKET_ACCEPT, derive_accept_key(&key))
    +555            .header(
    +556                SEC_WEBSOCKET_PROTOCOL,
    +557                HeaderValue::from_static(RELAY_PROTOCOL_VERSION),
    +558            )
    +559            .header(CONNECTION, "upgrade")
    +560            .body(body_full("switching to websocket protocol"))
    +561            .expect("valid body"))
    +562    }
    +563}
    +564
    +565impl Service<Request<Incoming>> for RelayService {
    +566    type Response = Response<BytesBody>;
    +567    type Error = HyperError;
    +568    type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>;
    +569
    +570    fn call(&self, req: Request<Incoming>) -> Self::Future {
    +571        // Create a client if the request hits the relay endpoint.
    +572        if matches!(
    +573            (req.method(), req.uri().path()),
    +574            (&hyper::Method::GET, RELAY_PATH)
    +575        ) {
    +576            let res = match self.handle_relay_ws_upgrade(req) {
    +577                Ok(response) => Ok(response),
    +578                // It's convention to send back the version(s) we *do* support
    +579                Err(e @ RelayUpgradeReqError::UnsupportedWebsocketVersion) => self
    +580                    .build_response()
    +581                    .status(StatusCode::BAD_REQUEST)
    +582                    .header(SEC_WEBSOCKET_VERSION, SUPPORTED_WEBSOCKET_VERSION)
    +583                    .body(body_full(e.to_string())),
    +584                Err(e) => self
    +585                    .build_response()
    +586                    .status(StatusCode::BAD_REQUEST)
    +587                    .body(body_full(e.to_string())),
    +588            }
    +589            .map_err(Into::into);
    +590            return Box::pin(async move { res });
     591        }
    -592        response
    -593    }
    -594
    -595    fn not_found_fn(
    -596        &self,
    -597        _req: Request<Incoming>,
    -598        mut res: ResponseBuilder,
    -599    ) -> HyperResult<Response<BytesBody>> {
    -600        for (k, v) in self.headers.iter() {
    -601            res = res.header(k.clone(), v.clone());
    -602        }
    -603        let body = body_full("Not Found");
    -604        let r = res.status(StatusCode::NOT_FOUND).body(body)?;
    -605        HyperResult::Ok(r)
    -606    }
    -607
    -608    /// The server HTTP handler to do HTTP upgrades.
    -609    ///
    -610    /// This handler runs while doing the connection upgrade handshake.  Once the connection
    -611    /// is upgraded it sends the stream to the relay server which takes it over.  After
    -612    /// having sent off the connection this handler returns.
    -613    async fn relay_connection_handler(
    -614        &self,
    -615        protocol: Protocol,
    -616        upgraded: Upgraded,
    -617    ) -> Result<(), ConnectionHandlerError> {
    -618        debug!(?protocol, "relay_connection upgraded");
    -619        let (io, read_buf) = downcast_upgrade(upgraded)?;
    -620        if !read_buf.is_empty() {
    -621            return Err(BufferNotEmptySnafu { buf: read_buf }.build());
    +592        // Otherwise handle the relay connection as normal.
    +593
    +594        // Check all other possible endpoints.
    +595        let uri = req.uri().clone();
    +596        if let Some(res) = self.0.handlers.get(&(req.method().clone(), uri.path())) {
    +597            let f = res(req, self.0.default_response());
    +598            return Box::pin(async move { f });
    +599        }
    +600        // Otherwise return 404
    +601        let res = self.0.not_found_fn(req, self.0.default_response());
    +602        Box::pin(async move { res })
    +603    }
    +604}
    +605
    +606impl Inner {
    +607    fn default_response(&self) -> ResponseBuilder {
    +608        let mut response = Response::builder();
    +609        for (key, value) in self.headers.iter() {
    +610            response = response.header(key.clone(), value.clone());
    +611        }
    +612        response
    +613    }
    +614
    +615    fn not_found_fn(
    +616        &self,
    +617        _req: Request<Incoming>,
    +618        mut res: ResponseBuilder,
    +619    ) -> HyperResult<Response<BytesBody>> {
    +620        for (k, v) in self.headers.iter() {
    +621            res = res.header(k.clone(), v.clone());
     622        }
    -623
    -624        self.accept(protocol, io).await?;
    -625        Ok(())
    +623        let body = body_full("Not Found");
    +624        let r = res.status(StatusCode::NOT_FOUND).body(body)?;
    +625        HyperResult::Ok(r)
     626    }
     627
    -628    /// Adds a new connection to the server and serves it.
    +628    /// The server HTTP handler to do HTTP upgrades.
     629    ///
    -630    /// Will error if it takes too long (10 sec) to write or read to the connection, if there is
    -631    /// some read or write error to the connection,  if the server is meant to verify clients,
    -632    /// and is unable to verify this one, or if there is some issue communicating with the server.
    -633    ///
    -634    /// The provided [`AsyncRead`] and [`AsyncWrite`] must be already connected to the connection.
    -635    ///
    -636    /// [`AsyncRead`]: tokio::io::AsyncRead
    -637    /// [`AsyncWrite`]: tokio::io::AsyncWrite
    -638    async fn accept(&self, protocol: Protocol, io: MaybeTlsStream) -> Result<(), AcceptError> {
    -639        use snafu::ResultExt;
    -640
    -641        trace!(?protocol, "accept: start");
    -642        let mut io = match protocol {
    -643            Protocol::Relay => {
    -644                self.metrics.relay_accepts.inc();
    -645                RelayedStream::Relay(Framed::new(io, RelayCodec::new(self.key_cache.clone())))
    -646            }
    -647            Protocol::Websocket => {
    -648                self.metrics.websocket_accepts.inc();
    -649                // Since we already did the HTTP upgrade in the previous step,
    -650                // we use tokio-websockets to handle this connection
    -651                // Create a server builder with default config
    -652                let builder = tokio_websockets::ServerBuilder::new();
    -653                // Serve will create a WebSocketStream on an already upgraded connection
    -654                let websocket = builder.serve(io);
    -655                RelayedStream::Ws(websocket, self.key_cache.clone())
    -656            }
    -657        };
    -658        trace!("accept: recv client key");
    -659        let (client_key, info) = recv_client_key(&mut io).await.context(RecvClientKeySnafu)?;
    -660
    -661        trace!("accept: checking access: {:?}", self.access);
    -662        if !self.access.is_allowed(client_key).await {
    -663            io.send(Frame::Health {
    -664                problem: Bytes::from_static(b"not authenticated"),
    -665            })
    -666            .await?;
    -667            io.flush().await?;
    -668
    -669            return Err(ClientNotAuthenticatedSnafu { key: client_key }.build());
    -670        }
    -671
    -672        if info.version != PROTOCOL_VERSION {
    -673            return Err(UnexpectedClientVersionSnafu {
    -674                version: info.version,
    -675                expected_version: PROTOCOL_VERSION,
    -676            }
    -677            .build());
    -678        }
    +630    /// This handler runs while doing the connection upgrade handshake.  Once the connection
    +631    /// is upgraded it sends the stream to the relay server which takes it over.  After
    +632    /// having sent off the connection this handler returns.
    +633    async fn relay_connection_handler(
    +634        &self,
    +635        upgraded: Upgraded,
    +636        client_auth_header: Option<HeaderValue>,
    +637    ) -> Result<(), ConnectionHandlerError> {
    +638        debug!("relay_connection upgraded");
    +639        let (io, read_buf) = downcast_upgrade(upgraded)?;
    +640        if !read_buf.is_empty() {
    +641            return Err(BufferNotEmptySnafu { buf: read_buf }.build());
    +642        }
    +643
    +644        self.accept(io, client_auth_header).await?;
    +645        Ok(())
    +646    }
    +647
    +648    /// Adds a new connection to the server and serves it.
    +649    ///
    +650    /// Will error if it takes too long (10 sec) to write or read to the connection, if there is
    +651    /// some read or write error to the connection,  if the server is meant to verify clients,
    +652    /// and is unable to verify this one, or if there is some issue communicating with the server.
    +653    ///
    +654    /// The provided [`AsyncRead`] and [`AsyncWrite`] must be already connected to the connection.
    +655    ///
    +656    /// [`AsyncRead`]: tokio::io::AsyncRead
    +657    /// [`AsyncWrite`]: tokio::io::AsyncWrite
    +658    async fn accept(
    +659        &self,
    +660        io: MaybeTlsStream,
    +661        client_auth_header: Option<HeaderValue>,
    +662    ) -> Result<(), AcceptError> {
    +663        trace!("accept: start");
    +664
    +665        let io = RateLimited::from_cfg(self.rate_limit, io, self.metrics.clone())
    +666            .context(RateLimitingMisconfiguredSnafu)?;
    +667
    +668        // Create a server builder with default config
    +669        let websocket = tokio_websockets::ServerBuilder::new()
    +670            .limits(tokio_websockets::Limits::default().max_payload_len(Some(MAX_FRAME_SIZE)))
    +671            // Serve will create a WebSocketStream on an already upgraded connection
    +672            .serve(io);
    +673
    +674        let mut io = WsBytesFramed { io: websocket };
    +675
    +676        let authentication = handshake::serverside(&mut io, client_auth_header).await?;
    +677
    +678        trace!(?authentication.mechanism, "accept: verified authentication");
     679
    -680        trace!("accept: build client conn");
    -681        let client_conn_builder = Config {
    -682            node_id: client_key,
    -683            stream: io,
    -684            write_timeout: self.write_timeout,
    -685            channel_capacity: PER_CLIENT_SEND_QUEUE_DEPTH,
    -686            rate_limit: self.rate_limit,
    -687        };
    -688        trace!("accept: create client");
    -689        let node_id = client_conn_builder.node_id;
    -690        trace!(node_id = node_id.fmt_short(), "create client");
    -691
    -692        // build and register client, starting up read & write loops for the client
    -693        // connection
    -694        self.clients
    -695            .register(client_conn_builder, self.metrics.clone())
    -696            .await;
    -697        Ok(())
    -698    }
    -699}
    +680        let is_authorized = self.access.is_allowed(authentication.client_key).await;
    +681        let client_key = authentication.authorize_if(is_authorized, &mut io).await?;
    +682
    +683        trace!("accept: verified authorization");
    +684
    +685        let io = RelayedStream {
    +686            inner: io,
    +687            key_cache: self.key_cache.clone(),
    +688        };
    +689
    +690        trace!("accept: build client conn");
    +691        let client_conn_builder = Config {
    +692            node_id: client_key,
    +693            stream: io,
    +694            write_timeout: self.write_timeout,
    +695            channel_capacity: PER_CLIENT_SEND_QUEUE_DEPTH,
    +696        };
    +697        trace!("accept: create client");
    +698        let node_id = client_conn_builder.node_id;
    +699        trace!(node_id = %node_id.fmt_short(), "create client");
     700
    -701/// TLS Certificate Authority acceptor.
    -702#[derive(Clone, derive_more::Debug)]
    -703pub(super) enum TlsAcceptor {
    -704    /// Uses Let's Encrypt as the Certificate Authority. This is used in production.
    -705    LetsEncrypt(#[debug("tokio_rustls_acme::AcmeAcceptor")] AcmeAcceptor),
    -706    /// Manually added tls acceptor. Generally used for tests or for when we've passed in
    -707    /// a certificate via a file.
    -708    Manual(#[debug("tokio_rustls::TlsAcceptor")] tokio_rustls::TlsAcceptor),
    -709}
    -710
    -711impl RelayService {
    -712    fn new(
    -713        handlers: Handlers,
    -714        headers: HeaderMap,
    -715        rate_limit: Option<ClientRateLimit>,
    -716        key_cache: KeyCache,
    -717        access: AccessConfig,
    -718        metrics: Arc<Metrics>,
    -719    ) -> Self {
    -720        Self(Arc::new(Inner {
    -721            handlers,
    -722            headers,
    -723            clients: Clients::default(),
    -724            write_timeout: SERVER_WRITE_TIMEOUT,
    -725            rate_limit,
    -726            key_cache,
    -727            access,
    -728            metrics,
    -729        }))
    -730    }
    -731
    -732    async fn shutdown(&self) {
    -733        self.0.clients.shutdown().await;
    -734    }
    -735
    -736    /// Handle the incoming connection.
    -737    ///
    -738    /// If a `tls_config` is given, will serve the connection using HTTPS.
    -739    async fn handle_connection(self, stream: TcpStream, tls_config: Option<TlsConfig>) {
    -740        let res = match tls_config {
    -741            Some(tls_config) => {
    -742                debug!("HTTPS: serve connection");
    -743                self.tls_serve_connection(stream, tls_config).await
    -744            }
    -745            None => {
    -746                debug!("HTTP: serve connection");
    -747                self.serve_connection(MaybeTlsStream::Plain(stream))
    -748                    .await
    -749                    .context(HttpSnafu)
    -750            }
    -751        };
    -752        match res {
    -753            Ok(()) => {}
    -754            Err(error) => match error {
    -755                ServeConnectionError::ManualAccept { source, .. }
    -756                | ServeConnectionError::LetsEncryptAccept { source, .. }
    -757                    if source.kind() == std::io::ErrorKind::UnexpectedEof =>
    -758                {
    -759                    debug!(reason=?source, "peer disconnected");
    -760                }
    -761                // From hyper: <https://github.com/hyperium/hyper/commit/271bba16672ff54a44e043c5cc1ae6b9345bb172>
    -762                // `hyper::Error::IncompleteMessage` is hyper's equivalent of UnexpectedEof
    -763                ServeConnectionError::Https { source, .. }
    -764                | ServeConnectionError::Http { source, .. }
    -765                    if source.is_incomplete_message() =>
    -766                {
    -767                    debug!(reason=?source, "peer disconnected");
    -768                }
    -769                _ => {
    -770                    error!(?error, "failed to handle connection");
    -771                }
    -772            },
    -773        }
    -774    }
    -775
    -776    /// Serve the tls connection
    -777    async fn tls_serve_connection(
    -778        self,
    -779        stream: TcpStream,
    -780        tls_config: TlsConfig,
    -781    ) -> Result<(), ServeConnectionError> {
    -782        let TlsConfig { acceptor, config } = tls_config;
    -783        match acceptor {
    -784            TlsAcceptor::LetsEncrypt(a) => {
    -785                match a.accept(stream).await.context(LetsEncryptAcceptSnafu)? {
    -786                    None => {
    -787                        info!("TLS[acme]: received TLS-ALPN-01 validation request");
    -788                    }
    -789                    Some(start_handshake) => {
    -790                        debug!("TLS[acme]: start handshake");
    -791                        let tls_stream = start_handshake
    -792                            .into_stream(config)
    -793                            .await
    -794                            .context(HandshakeSnafu)?;
    -795                        self.serve_connection(MaybeTlsStream::Tls(tls_stream))
    -796                            .await
    -797                            .context(HttpsSnafu)?;
    -798                    }
    -799                }
    -800            }
    -801            TlsAcceptor::Manual(a) => {
    -802                debug!("TLS[manual]: accept");
    -803                let tls_stream = tokio::time::timeout(Duration::from_secs(30), a.accept(stream))
    -804                    .await
    -805                    .context(TimeoutSnafu)?
    -806                    .context(ManualAcceptSnafu)?;
    -807
    -808                self.serve_connection(MaybeTlsStream::Tls(tls_stream))
    -809                    .await
    -810                    .context(ServeConnectionSnafu)?;
    -811            }
    -812        }
    -813        Ok(())
    -814    }
    -815
    -816    /// Wrapper for the actual http connection (with upgrades)
    -817    async fn serve_connection<I>(self, io: I) -> Result<(), hyper::Error>
    -818    where
    -819        I: tokio::io::AsyncRead + tokio::io::AsyncWrite + Unpin + Send + Sync + 'static,
    -820    {
    -821        hyper::server::conn::http1::Builder::new()
    -822            .serve_connection(hyper_util::rt::TokioIo::new(io), self)
    -823            .with_upgrades()
    -824            .await
    -825    }
    -826}
    -827
    -828#[derive(Default)]
    -829struct Handlers(HashMap<(Method, &'static str), HyperHandler>);
    -830
    -831impl std::fmt::Debug for Handlers {
    -832    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    -833        let s = self.0.keys().fold(String::new(), |curr, next| {
    -834            let (method, uri) = next;
    -835            format!("{curr}\n({method},{uri}): Box<Fn(ResponseBuilder) -> Result<Response<Body>> + Send + Sync + 'static>")
    -836        });
    -837        write!(f, "HashMap<{s}>")
    -838    }
    -839}
    -840
    -841impl std::ops::Deref for Handlers {
    -842    type Target = HashMap<(Method, &'static str), HyperHandler>;
    -843
    -844    fn deref(&self) -> &Self::Target {
    -845        &self.0
    -846    }
    -847}
    -848
    -849impl std::ops::DerefMut for Handlers {
    -850    fn deref_mut(&mut self) -> &mut Self::Target {
    -851        &mut self.0
    -852    }
    -853}
    -854
    -855#[cfg(test)]
    -856mod tests {
    -857    use std::sync::Arc;
    -858
    -859    use bytes::Bytes;
    -860    use iroh_base::{PublicKey, SecretKey};
    -861    use n0_future::{SinkExt, StreamExt};
    -862    use n0_snafu::{Result, ResultExt};
    -863    use reqwest::Url;
    -864    use snafu::whatever;
    -865    use tracing::info;
    -866    use tracing_test::traced_test;
    +701        // build and register client, starting up read & write loops for the client
    +702        // connection
    +703        self.clients
    +704            .register(client_conn_builder, self.metrics.clone())
    +705            .await;
    +706        Ok(())
    +707    }
    +708}
    +709
    +710/// TLS Certificate Authority acceptor.
    +711#[derive(Clone, derive_more::Debug)]
    +712pub(super) enum TlsAcceptor {
    +713    /// Uses Let's Encrypt as the Certificate Authority. This is used in production.
    +714    LetsEncrypt(#[debug("tokio_rustls_acme::AcmeAcceptor")] AcmeAcceptor),
    +715    /// Manually added tls acceptor. Generally used for tests or for when we've passed in
    +716    /// a certificate via a file.
    +717    Manual(#[debug("tokio_rustls::TlsAcceptor")] tokio_rustls::TlsAcceptor),
    +718}
    +719
    +720impl RelayService {
    +721    fn new(
    +722        handlers: Handlers,
    +723        headers: HeaderMap,
    +724        rate_limit: Option<ClientRateLimit>,
    +725        key_cache: KeyCache,
    +726        access: AccessConfig,
    +727        metrics: Arc<Metrics>,
    +728    ) -> Self {
    +729        Self(Arc::new(Inner {
    +730            handlers,
    +731            headers,
    +732            clients: Clients::default(),
    +733            write_timeout: SERVER_WRITE_TIMEOUT,
    +734            rate_limit,
    +735            key_cache,
    +736            access,
    +737            metrics,
    +738        }))
    +739    }
    +740
    +741    async fn shutdown(&self) {
    +742        self.0.clients.shutdown().await;
    +743    }
    +744
    +745    /// Handle the incoming connection.
    +746    ///
    +747    /// If a `tls_config` is given, will serve the connection using HTTPS.
    +748    async fn handle_connection(self, stream: TcpStream, tls_config: Option<TlsConfig>) {
    +749        let res = match tls_config {
    +750            Some(tls_config) => {
    +751                debug!("HTTPS: serve connection");
    +752                self.tls_serve_connection(stream, tls_config).await
    +753            }
    +754            None => {
    +755                debug!("HTTP: serve connection");
    +756                self.serve_connection(MaybeTlsStream::Plain(stream))
    +757                    .await
    +758                    .context(HttpSnafu)
    +759            }
    +760        };
    +761        match res {
    +762            Ok(()) => {}
    +763            Err(error) => match error {
    +764                ServeConnectionError::ManualAccept { source, .. }
    +765                | ServeConnectionError::LetsEncryptAccept { source, .. }
    +766                    if source.kind() == std::io::ErrorKind::UnexpectedEof =>
    +767                {
    +768                    debug!(reason=?source, "peer disconnected");
    +769                }
    +770                // From hyper: <https://github.com/hyperium/hyper/commit/271bba16672ff54a44e043c5cc1ae6b9345bb172>
    +771                // `hyper::Error::IncompleteMessage` is hyper's equivalent of UnexpectedEof
    +772                ServeConnectionError::Https { source, .. }
    +773                | ServeConnectionError::Http { source, .. }
    +774                    if source.is_incomplete_message() =>
    +775                {
    +776                    debug!(reason=?source, "peer disconnected");
    +777                }
    +778                _ => {
    +779                    error!(?error, "failed to handle connection");
    +780                }
    +781            },
    +782        }
    +783    }
    +784
    +785    /// Serve the tls connection
    +786    async fn tls_serve_connection(
    +787        self,
    +788        stream: TcpStream,
    +789        tls_config: TlsConfig,
    +790    ) -> Result<(), ServeConnectionError> {
    +791        let TlsConfig { acceptor, config } = tls_config;
    +792        match acceptor {
    +793            TlsAcceptor::LetsEncrypt(a) => {
    +794                match a.accept(stream).await.context(LetsEncryptAcceptSnafu)? {
    +795                    None => {
    +796                        info!("TLS[acme]: received TLS-ALPN-01 validation request");
    +797                    }
    +798                    Some(start_handshake) => {
    +799                        debug!("TLS[acme]: start handshake");
    +800                        let tls_stream = start_handshake
    +801                            .into_stream(config)
    +802                            .await
    +803                            .context(TlsHandshakeSnafu)?;
    +804                        self.serve_connection(MaybeTlsStream::Tls(tls_stream))
    +805                            .await
    +806                            .context(HttpsSnafu)?;
    +807                    }
    +808                }
    +809            }
    +810            TlsAcceptor::Manual(a) => {
    +811                debug!("TLS[manual]: accept");
    +812                let tls_stream = tokio::time::timeout(Duration::from_secs(30), a.accept(stream))
    +813                    .await
    +814                    .context(TimeoutSnafu)?
    +815                    .context(ManualAcceptSnafu)?;
    +816
    +817                self.serve_connection(MaybeTlsStream::Tls(tls_stream))
    +818                    .await
    +819                    .context(ServeConnectionSnafu)?;
    +820            }
    +821        }
    +822        Ok(())
    +823    }
    +824
    +825    /// Wrapper for the actual http connection (with upgrades)
    +826    async fn serve_connection<I>(self, io: I) -> Result<(), hyper::Error>
    +827    where
    +828        I: tokio::io::AsyncRead + tokio::io::AsyncWrite + Unpin + Send + Sync + 'static,
    +829    {
    +830        hyper::server::conn::http1::Builder::new()
    +831            .serve_connection(hyper_util::rt::TokioIo::new(io), self)
    +832            .with_upgrades()
    +833            .await
    +834    }
    +835}
    +836
    +837#[derive(Default)]
    +838struct Handlers(HashMap<(Method, &'static str), HyperHandler>);
    +839
    +840impl std::fmt::Debug for Handlers {
    +841    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
    +842        let s = self.0.keys().fold(String::new(), |curr, next| {
    +843            let (method, uri) = next;
    +844            format!("{curr}\n({method},{uri}): Box<Fn(ResponseBuilder) -> Result<Response<Body>> + Send + Sync + 'static>")
    +845        });
    +846        write!(f, "HashMap<{s}>")
    +847    }
    +848}
    +849
    +850impl std::ops::Deref for Handlers {
    +851    type Target = HashMap<(Method, &'static str), HyperHandler>;
    +852
    +853    fn deref(&self) -> &Self::Target {
    +854        &self.0
    +855    }
    +856}
    +857
    +858impl std::ops::DerefMut for Handlers {
    +859    fn deref_mut(&mut self) -> &mut Self::Target {
    +860        &mut self.0
    +861    }
    +862}
    +863
    +864#[cfg(test)]
    +865mod tests {
    +866    use std::sync::Arc;
     867
    -868    use super::*;
    -869    use crate::{
    -870        client::{
    -871            conn::{Conn, ReceivedMessage, SendMessage},
    -872            streams::MaybeTlsStreamChained,
    -873            Client, ClientBuilder, ConnectError,
    -874        },
    -875        dns::DnsResolver,
    -876    };
    -877
    -878    pub(crate) fn make_tls_config() -> TlsConfig {
    -879        let subject_alt_names = vec!["localhost".to_string()];
    -880
    -881        let cert = rcgen::generate_simple_self_signed(subject_alt_names).unwrap();
    -882        let rustls_certificate = cert.cert.der().clone();
    -883        let rustls_key = rustls::pki_types::PrivatePkcs8KeyDer::from(cert.key_pair.serialize_der());
    -884        let config = rustls::ServerConfig::builder_with_provider(Arc::new(
    -885            rustls::crypto::ring::default_provider(),
    -886        ))
    -887        .with_safe_default_protocol_versions()
    -888        .expect("protocols supported by ring")
    -889        .with_no_client_auth()
    -890        .with_single_cert(vec![(rustls_certificate)], rustls_key.into())
    -891        .expect("cert is right");
    -892
    -893        let config = Arc::new(config);
    -894        let acceptor = tokio_rustls::TlsAcceptor::from(config.clone());
    -895
    -896        TlsConfig {
    -897            config,
    -898            acceptor: TlsAcceptor::Manual(acceptor),
    -899        }
    -900    }
    -901
    -902    #[tokio::test]
    -903    #[traced_test]
    -904    async fn test_http_clients_and_server() -> Result {
    -905        let a_key = SecretKey::generate(rand::thread_rng());
    -906        let b_key = SecretKey::generate(rand::thread_rng());
    -907
    -908        // start server
    -909        let server = ServerBuilder::new("127.0.0.1:0".parse().unwrap())
    -910            .spawn()
    -911            .await?;
    -912
    -913        let addr = server.addr();
    -914
    -915        // get dial info
    -916        let port = addr.port();
    -917        let addr = if let std::net::IpAddr::V4(ipv4_addr) = addr.ip() {
    -918            ipv4_addr
    -919        } else {
    -920            whatever!("cannot get ipv4 addr from socket addr {addr:?}");
    -921        };
    -922
    -923        info!("addr: {addr}:{port}");
    -924        let relay_addr: Url = format!("http://{addr}:{port}").parse().unwrap();
    -925
    -926        // create clients
    -927        let (a_key, mut client_a) = create_test_client(a_key, relay_addr.clone()).await?;
    -928        info!("created client {a_key:?}");
    -929        let (b_key, mut client_b) = create_test_client(b_key, relay_addr).await?;
    -930        info!("created client {b_key:?}");
    +868    use iroh_base::{PublicKey, SecretKey};
    +869    use n0_future::{SinkExt, StreamExt};
    +870    use n0_snafu::{Result, ResultExt};
    +871    use rand::SeedableRng;
    +872    use reqwest::Url;
    +873    use snafu::whatever;
    +874    use tracing::info;
    +875    use tracing_test::traced_test;
    +876
    +877    use super::*;
    +878    use crate::{
    +879        client::{Client, ClientBuilder, ConnectError, conn::Conn},
    +880        dns::DnsResolver,
    +881        protos::relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg},
    +882    };
    +883
    +884    pub(crate) fn make_tls_config() -> TlsConfig {
    +885        let subject_alt_names = vec!["localhost".to_string()];
    +886
    +887        let cert = rcgen::generate_simple_self_signed(subject_alt_names).unwrap();
    +888        let rustls_certificate = cert.cert.der().clone();
    +889        let rustls_key =
    +890            rustls::pki_types::PrivatePkcs8KeyDer::from(cert.signing_key.serialize_der());
    +891        let config = rustls::ServerConfig::builder_with_provider(Arc::new(
    +892            rustls::crypto::ring::default_provider(),
    +893        ))
    +894        .with_safe_default_protocol_versions()
    +895        .expect("protocols supported by ring")
    +896        .with_no_client_auth()
    +897        .with_single_cert(vec![(rustls_certificate)], rustls_key.into())
    +898        .expect("cert is right");
    +899
    +900        let config = Arc::new(config);
    +901        let acceptor = tokio_rustls::TlsAcceptor::from(config.clone());
    +902
    +903        TlsConfig {
    +904            config,
    +905            acceptor: TlsAcceptor::Manual(acceptor),
    +906        }
    +907    }
    +908
    +909    #[tokio::test]
    +910    #[traced_test]
    +911    async fn test_http_clients_and_server() -> Result {
    +912        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +913
    +914        let a_key = SecretKey::generate(&mut rng);
    +915        let b_key = SecretKey::generate(&mut rng);
    +916
    +917        // start server
    +918        let server = ServerBuilder::new("127.0.0.1:0".parse().unwrap())
    +919            .spawn()
    +920            .await?;
    +921
    +922        let addr = server.addr();
    +923
    +924        // get dial info
    +925        let port = addr.port();
    +926        let addr = if let std::net::IpAddr::V4(ipv4_addr) = addr.ip() {
    +927            ipv4_addr
    +928        } else {
    +929            whatever!("cannot get ipv4 addr from socket addr {addr:?}");
    +930        };
     931
    -932        info!("ping a");
    -933        client_a.send(SendMessage::Ping([1u8; 8])).await?;
    -934        let pong = client_a.next().await.expect("eos")?;
    -935        assert!(matches!(pong, ReceivedMessage::Pong(_)));
    -936
    -937        info!("ping b");
    -938        client_b.send(SendMessage::Ping([2u8; 8])).await?;
    -939        let pong = client_b.next().await.expect("eos")?;
    -940        assert!(matches!(pong, ReceivedMessage::Pong(_)));
    -941
    -942        info!("sending message from a to b");
    -943        let msg = Bytes::from_static(b"hi there, client b!");
    -944        client_a
    -945            .send(SendMessage::SendPacket(b_key, msg.clone()))
    -946            .await?;
    -947        info!("waiting for message from a on b");
    -948        let (got_key, got_msg) =
    -949            process_msg(client_b.next().await).expect("expected message from client_a");
    -950        assert_eq!(a_key, got_key);
    -951        assert_eq!(msg, got_msg);
    -952
    -953        info!("sending message from b to a");
    -954        let msg = Bytes::from_static(b"right back at ya, client b!");
    -955        client_b
    -956            .send(SendMessage::SendPacket(a_key, msg.clone()))
    -957            .await?;
    -958        info!("waiting for message b on a");
    -959        let (got_key, got_msg) =
    -960            process_msg(client_a.next().await).expect("expected message from client_b");
    -961        assert_eq!(b_key, got_key);
    -962        assert_eq!(msg, got_msg);
    -963
    -964        // Close before shutting down, otherwise we'll try to send close frames on broken pipes
    -965        client_a.close().await?;
    -966        client_b.close().await?;
    -967        server.shutdown();
    -968
    -969        Ok(())
    -970    }
    -971
    -972    async fn create_test_client(
    -973        key: SecretKey,
    -974        server_url: Url,
    -975    ) -> Result<(PublicKey, Client), ConnectError> {
    -976        let public_key = key.public();
    -977        let client =
    -978            ClientBuilder::new(server_url, key, DnsResolver::new()).insecure_skip_cert_verify(true);
    -979        let client = client.connect().await?;
    -980
    -981        Ok((public_key, client))
    -982    }
    +932        info!("addr: {addr}:{port}");
    +933        let relay_addr: Url = format!("http://{addr}:{port}").parse().unwrap();
    +934
    +935        // create clients
    +936        let (a_key, mut client_a) = create_test_client(a_key, relay_addr.clone()).await?;
    +937        info!("created client {a_key:?}");
    +938        let (b_key, mut client_b) = create_test_client(b_key, relay_addr).await?;
    +939        info!("created client {b_key:?}");
    +940
    +941        info!("ping a");
    +942        client_a.send(ClientToRelayMsg::Ping([1u8; 8])).await?;
    +943        let pong = client_a.next().await.expect("eos")?;
    +944        assert!(matches!(pong, RelayToClientMsg::Pong { .. }));
    +945
    +946        info!("ping b");
    +947        client_b.send(ClientToRelayMsg::Ping([2u8; 8])).await?;
    +948        let pong = client_b.next().await.expect("eos")?;
    +949        assert!(matches!(pong, RelayToClientMsg::Pong { .. }));
    +950
    +951        info!("sending message from a to b");
    +952        let msg = Datagrams::from(b"hi there, client b!");
    +953        client_a
    +954            .send(ClientToRelayMsg::Datagrams {
    +955                dst_node_id: b_key,
    +956                datagrams: msg.clone(),
    +957            })
    +958            .await?;
    +959        info!("waiting for message from a on b");
    +960        let (got_key, got_msg) =
    +961            process_msg(client_b.next().await).expect("expected message from client_a");
    +962        assert_eq!(a_key, got_key);
    +963        assert_eq!(msg, got_msg);
    +964
    +965        info!("sending message from b to a");
    +966        let msg = Datagrams::from(b"right back at ya, client b!");
    +967        client_b
    +968            .send(ClientToRelayMsg::Datagrams {
    +969                dst_node_id: a_key,
    +970                datagrams: msg.clone(),
    +971            })
    +972            .await?;
    +973        info!("waiting for message b on a");
    +974        let (got_key, got_msg) =
    +975            process_msg(client_a.next().await).expect("expected message from client_b");
    +976        assert_eq!(b_key, got_key);
    +977        assert_eq!(msg, got_msg);
    +978
    +979        // Close before shutting down, otherwise we'll try to send close frames on broken pipes
    +980        client_a.close().await?;
    +981        client_b.close().await?;
    +982        server.shutdown();
     983
    -984    fn process_msg(
    -985        msg: Option<Result<ReceivedMessage, crate::client::RecvError>>,
    -986    ) -> Option<(PublicKey, Bytes)> {
    -987        match msg {
    -988            Some(Err(e)) => {
    -989                info!("client `recv` error {e}");
    -990                None
    -991            }
    -992            Some(Ok(msg)) => {
    -993                info!("got message on: {msg:?}");
    -994                if let ReceivedMessage::ReceivedPacket {
    -995                    remote_node_id: source,
    -996                    data,
    -997                } = msg
    -998                {
    -999                    Some((source, data))
    -1000                } else {
    -1001                    None
    -1002                }
    -1003            }
    -1004            None => {
    -1005                info!("client end of stream");
    -1006                None
    -1007            }
    -1008        }
    -1009    }
    -1010
    -1011    #[tokio::test]
    -1012    #[traced_test]
    -1013    async fn test_https_clients_and_server() -> Result {
    -1014        let a_key = SecretKey::generate(rand::thread_rng());
    -1015        let b_key = SecretKey::generate(rand::thread_rng());
    -1016
    -1017        // create tls_config
    -1018        let tls_config = make_tls_config();
    -1019
    -1020        // start server
    -1021        let mut server = ServerBuilder::new("127.0.0.1:0".parse().unwrap())
    -1022            .tls_config(Some(tls_config))
    -1023            .spawn()
    -1024            .await?;
    +984        Ok(())
    +985    }
    +986
    +987    async fn create_test_client(
    +988        key: SecretKey,
    +989        server_url: Url,
    +990    ) -> Result<(PublicKey, Client), ConnectError> {
    +991        let public_key = key.public();
    +992        let client =
    +993            ClientBuilder::new(server_url, key, DnsResolver::new()).insecure_skip_cert_verify(true);
    +994        let client = client.connect().await?;
    +995
    +996        Ok((public_key, client))
    +997    }
    +998
    +999    fn process_msg(
    +1000        msg: Option<Result<RelayToClientMsg, crate::client::RecvError>>,
    +1001    ) -> Option<(PublicKey, Datagrams)> {
    +1002        match msg {
    +1003            Some(Err(e)) => {
    +1004                info!("client `recv` error {e}");
    +1005                None
    +1006            }
    +1007            Some(Ok(msg)) => {
    +1008                info!("got message on: {msg:?}");
    +1009                if let RelayToClientMsg::Datagrams {
    +1010                    remote_node_id: source,
    +1011                    datagrams,
    +1012                } = msg
    +1013                {
    +1014                    Some((source, datagrams))
    +1015                } else {
    +1016                    None
    +1017                }
    +1018            }
    +1019            None => {
    +1020                info!("client end of stream");
    +1021                None
    +1022            }
    +1023        }
    +1024    }
     1025
    -1026        let addr = server.addr();
    -1027
    -1028        // get dial info
    -1029        let port = addr.port();
    -1030        let addr = if let std::net::IpAddr::V4(ipv4_addr) = addr.ip() {
    -1031            ipv4_addr
    -1032        } else {
    -1033            whatever!("cannot get ipv4 addr from socket addr {addr:?}");
    -1034        };
    -1035
    -1036        info!("Relay listening on: {addr}:{port}");
    -1037
    -1038        let url: Url = format!("https://localhost:{port}").parse().unwrap();
    -1039
    -1040        // create clients
    -1041        let (a_key, mut client_a) = create_test_client(a_key, url.clone()).await?;
    -1042        info!("created client {a_key:?}");
    -1043        let (b_key, mut client_b) = create_test_client(b_key, url).await?;
    -1044        info!("created client {b_key:?}");
    -1045
    -1046        info!("ping a");
    -1047        client_a.send(SendMessage::Ping([1u8; 8])).await?;
    -1048        let pong = client_a.next().await.expect("eos")?;
    -1049        assert!(matches!(pong, ReceivedMessage::Pong(_)));
    -1050
    -1051        info!("ping b");
    -1052        client_b.send(SendMessage::Ping([2u8; 8])).await?;
    -1053        let pong = client_b.next().await.expect("eos")?;
    -1054        assert!(matches!(pong, ReceivedMessage::Pong(_)));
    -1055
    -1056        info!("sending message from a to b");
    -1057        let msg = Bytes::from_static(b"hi there, client b!");
    -1058        client_a
    -1059            .send(SendMessage::SendPacket(b_key, msg.clone()))
    -1060            .await?;
    -1061        info!("waiting for message from a on b");
    -1062        let (got_key, got_msg) =
    -1063            process_msg(client_b.next().await).expect("expected message from client_a");
    -1064        assert_eq!(a_key, got_key);
    -1065        assert_eq!(msg, got_msg);
    -1066
    -1067        info!("sending message from b to a");
    -1068        let msg = Bytes::from_static(b"right back at ya, client b!");
    -1069        client_b
    -1070            .send(SendMessage::SendPacket(a_key, msg.clone()))
    -1071            .await?;
    -1072        info!("waiting for message b on a");
    -1073        let (got_key, got_msg) =
    -1074            process_msg(client_a.next().await).expect("expected message from client_b");
    -1075        assert_eq!(b_key, got_key);
    -1076        assert_eq!(msg, got_msg);
    -1077
    -1078        // Close before shutting down, otherwise we'll try to send close frames on broken pipes
    -1079        client_a.close().await?;
    -1080        client_b.close().await?;
    -1081        server.shutdown();
    -1082        server.task_handle().await.context("join")?;
    -1083
    -1084        Ok(())
    -1085    }
    +1026    #[tokio::test]
    +1027    #[traced_test]
    +1028    async fn test_https_clients_and_server() -> Result {
    +1029        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1030
    +1031        let a_key = SecretKey::generate(&mut rng);
    +1032        let b_key = SecretKey::generate(&mut rng);
    +1033
    +1034        // create tls_config
    +1035        let tls_config = make_tls_config();
    +1036
    +1037        // start server
    +1038        let mut server = ServerBuilder::new("127.0.0.1:0".parse().unwrap())
    +1039            .tls_config(Some(tls_config))
    +1040            .spawn()
    +1041            .await?;
    +1042
    +1043        let addr = server.addr();
    +1044
    +1045        // get dial info
    +1046        let port = addr.port();
    +1047        let addr = if let std::net::IpAddr::V4(ipv4_addr) = addr.ip() {
    +1048            ipv4_addr
    +1049        } else {
    +1050            whatever!("cannot get ipv4 addr from socket addr {addr:?}");
    +1051        };
    +1052
    +1053        info!("Relay listening on: {addr}:{port}");
    +1054
    +1055        let url: Url = format!("https://localhost:{port}").parse().unwrap();
    +1056
    +1057        // create clients
    +1058        let (a_key, mut client_a) = create_test_client(a_key, url.clone()).await?;
    +1059        info!("created client {a_key:?}");
    +1060        let (b_key, mut client_b) = create_test_client(b_key, url).await?;
    +1061        info!("created client {b_key:?}");
    +1062
    +1063        info!("ping a");
    +1064        client_a.send(ClientToRelayMsg::Ping([1u8; 8])).await?;
    +1065        let pong = client_a.next().await.expect("eos")?;
    +1066        assert!(matches!(pong, RelayToClientMsg::Pong { .. }));
    +1067
    +1068        info!("ping b");
    +1069        client_b.send(ClientToRelayMsg::Ping([2u8; 8])).await?;
    +1070        let pong = client_b.next().await.expect("eos")?;
    +1071        assert!(matches!(pong, RelayToClientMsg::Pong { .. }));
    +1072
    +1073        info!("sending message from a to b");
    +1074        let msg = Datagrams::from(b"hi there, client b!");
    +1075        client_a
    +1076            .send(ClientToRelayMsg::Datagrams {
    +1077                dst_node_id: b_key,
    +1078                datagrams: msg.clone(),
    +1079            })
    +1080            .await?;
    +1081        info!("waiting for message from a on b");
    +1082        let (got_key, got_msg) =
    +1083            process_msg(client_b.next().await).expect("expected message from client_a");
    +1084        assert_eq!(a_key, got_key);
    +1085        assert_eq!(msg, got_msg);
     1086
    -1087    async fn make_test_client(client: tokio::io::DuplexStream, key: &SecretKey) -> Result<Conn> {
    -1088        let client = MaybeTlsStreamChained::Mem(client);
    -1089        let client = Conn::new_relay(client, KeyCache::test(), key).await?;
    -1090        Ok(client)
    -1091    }
    -1092
    -1093    #[tokio::test]
    -1094    #[traced_test]
    -1095    async fn test_server_basic() -> Result {
    -1096        info!("Create the server.");
    -1097        let service = RelayService::new(
    -1098            Default::default(),
    -1099            Default::default(),
    -1100            None,
    -1101            KeyCache::test(),
    -1102            AccessConfig::Everyone,
    -1103            Default::default(),
    -1104        );
    -1105
    -1106        info!("Create client A and connect it to the server.");
    -1107        let key_a = SecretKey::generate(rand::thread_rng());
    -1108        let public_key_a = key_a.public();
    -1109        let (client_a, rw_a) = tokio::io::duplex(10);
    -1110        let s = service.clone();
    -1111        let handler_task = tokio::spawn(async move {
    -1112            s.0.accept(Protocol::Relay, MaybeTlsStream::Test(rw_a))
    -1113                .await
    -1114        });
    -1115        let mut client_a = make_test_client(client_a, &key_a).await?;
    -1116        handler_task.await.context("join")??;
    -1117
    -1118        info!("Create client B and connect it to the server.");
    -1119        let key_b = SecretKey::generate(rand::thread_rng());
    -1120        let public_key_b = key_b.public();
    -1121        let (client_b, rw_b) = tokio::io::duplex(10);
    -1122        let s = service.clone();
    -1123        let handler_task = tokio::spawn(async move {
    -1124            s.0.accept(Protocol::Relay, MaybeTlsStream::Test(rw_b))
    -1125                .await
    -1126        });
    -1127        let mut client_b = make_test_client(client_b, &key_b).await?;
    -1128        handler_task.await.context("join")??;
    -1129
    -1130        info!("Send message from A to B.");
    -1131        let msg = Bytes::from_static(b"hello client b!!");
    -1132        client_a
    -1133            .send(SendMessage::SendPacket(public_key_b, msg.clone()))
    -1134            .await?;
    -1135        match client_b.next().await.unwrap()? {
    -1136            ReceivedMessage::ReceivedPacket {
    -1137                remote_node_id,
    -1138                data,
    -1139            } => {
    -1140                assert_eq!(public_key_a, remote_node_id);
    -1141                assert_eq!(&msg[..], data);
    -1142            }
    -1143            msg => {
    -1144                whatever!("expected ReceivedPacket msg, got {msg:?}");
    -1145            }
    -1146        }
    -1147
    -1148        info!("Send message from B to A.");
    -1149        let msg = Bytes::from_static(b"nice to meet you client a!!");
    -1150        client_b
    -1151            .send(SendMessage::SendPacket(public_key_a, msg.clone()))
    -1152            .await?;
    -1153        match client_a.next().await.unwrap()? {
    -1154            ReceivedMessage::ReceivedPacket {
    -1155                remote_node_id,
    -1156                data,
    -1157            } => {
    -1158                assert_eq!(public_key_b, remote_node_id);
    -1159                assert_eq!(&msg[..], data);
    -1160            }
    -1161            msg => {
    -1162                whatever!("expected ReceivedPacket msg, got {msg:?}");
    -1163            }
    -1164        }
    -1165
    -1166        info!("Close the server and clients");
    -1167        service.shutdown().await;
    -1168        tokio::time::sleep(Duration::from_secs(1)).await;
    -1169
    -1170        info!("Fail to send message from A to B.");
    -1171        let res = client_a
    -1172            .send(SendMessage::SendPacket(
    -1173                public_key_b,
    -1174                Bytes::from_static(b"try to send"),
    -1175            ))
    -1176            .await;
    -1177        assert!(res.is_err());
    -1178        assert!(client_b.next().await.is_none());
    -1179        Ok(())
    -1180    }
    -1181
    -1182    #[tokio::test]
    -1183    async fn test_server_replace_client() -> Result {
    -1184        info!("Create the server.");
    -1185        let service = RelayService::new(
    -1186            Default::default(),
    -1187            Default::default(),
    -1188            None,
    -1189            KeyCache::test(),
    -1190            AccessConfig::Everyone,
    -1191            Default::default(),
    -1192        );
    -1193
    -1194        info!("Create client A and connect it to the server.");
    -1195        let key_a = SecretKey::generate(rand::thread_rng());
    -1196        let public_key_a = key_a.public();
    -1197        let (client_a, rw_a) = tokio::io::duplex(10);
    -1198        let s = service.clone();
    -1199        let handler_task = tokio::spawn(async move {
    -1200            s.0.accept(Protocol::Relay, MaybeTlsStream::Test(rw_a))
    -1201                .await
    -1202        });
    -1203        let mut client_a = make_test_client(client_a, &key_a).await?;
    -1204        handler_task.await.context("join")??;
    -1205
    -1206        info!("Create client B and connect it to the server.");
    -1207        let key_b = SecretKey::generate(rand::thread_rng());
    -1208        let public_key_b = key_b.public();
    -1209        let (client_b, rw_b) = tokio::io::duplex(10);
    -1210        let s = service.clone();
    -1211        let handler_task = tokio::spawn(async move {
    -1212            s.0.accept(Protocol::Relay, MaybeTlsStream::Test(rw_b))
    -1213                .await
    -1214        });
    -1215        let mut client_b = make_test_client(client_b, &key_b).await?;
    -1216        handler_task.await.context("join")??;
    -1217
    -1218        info!("Send message from A to B.");
    -1219        let msg = Bytes::from_static(b"hello client b!!");
    -1220        client_a
    -1221            .send(SendMessage::SendPacket(public_key_b, msg.clone()))
    -1222            .await?;
    -1223        match client_b.next().await.expect("eos")? {
    -1224            ReceivedMessage::ReceivedPacket {
    -1225                remote_node_id,
    -1226                data,
    -1227            } => {
    -1228                assert_eq!(public_key_a, remote_node_id);
    -1229                assert_eq!(&msg[..], data);
    -1230            }
    -1231            msg => {
    -1232                whatever!("expected ReceivedPacket msg, got {msg:?}");
    -1233            }
    -1234        }
    -1235
    -1236        info!("Send message from B to A.");
    -1237        let msg = Bytes::from_static(b"nice to meet you client a!!");
    -1238        client_b
    -1239            .send(SendMessage::SendPacket(public_key_a, msg.clone()))
    -1240            .await?;
    -1241        match client_a.next().await.expect("eos")? {
    -1242            ReceivedMessage::ReceivedPacket {
    -1243                remote_node_id,
    -1244                data,
    -1245            } => {
    -1246                assert_eq!(public_key_b, remote_node_id);
    -1247                assert_eq!(&msg[..], data);
    -1248            }
    -1249            msg => {
    -1250                whatever!("expected ReceivedPacket msg, got {msg:?}");
    -1251            }
    -1252        }
    -1253
    -1254        info!("Create client B and connect it to the server");
    -1255        let (new_client_b, new_rw_b) = tokio::io::duplex(10);
    -1256        let s = service.clone();
    -1257        let handler_task = tokio::spawn(async move {
    -1258            s.0.accept(Protocol::Relay, MaybeTlsStream::Test(new_rw_b))
    -1259                .await
    -1260        });
    -1261        let mut new_client_b = make_test_client(new_client_b, &key_b).await?;
    -1262        handler_task.await.context("join")??;
    -1263
    -1264        // assert!(client_b.recv().await.is_err());
    -1265
    -1266        info!("Send message from A to B.");
    -1267        let msg = Bytes::from_static(b"are you still there, b?!");
    -1268        client_a
    -1269            .send(SendMessage::SendPacket(public_key_b, msg.clone()))
    -1270            .await?;
    -1271        match new_client_b.next().await.expect("eos")? {
    -1272            ReceivedMessage::ReceivedPacket {
    -1273                remote_node_id,
    -1274                data,
    -1275            } => {
    -1276                assert_eq!(public_key_a, remote_node_id);
    -1277                assert_eq!(&msg[..], data);
    -1278            }
    -1279            msg => {
    -1280                whatever!("expected ReceivedPacket msg, got {msg:?}");
    -1281            }
    -1282        }
    -1283
    -1284        info!("Send message from B to A.");
    -1285        let msg = Bytes::from_static(b"just had a spot of trouble but I'm back now,a!!");
    -1286        new_client_b
    -1287            .send(SendMessage::SendPacket(public_key_a, msg.clone()))
    -1288            .await?;
    -1289        match client_a.next().await.expect("eos")? {
    -1290            ReceivedMessage::ReceivedPacket {
    -1291                remote_node_id,
    -1292                data,
    -1293            } => {
    -1294                assert_eq!(public_key_b, remote_node_id);
    -1295                assert_eq!(&msg[..], data);
    -1296            }
    -1297            msg => {
    -1298                whatever!("expected ReceivedPacket msg, got {msg:?}");
    -1299            }
    -1300        }
    -1301
    -1302        info!("Close the server and clients");
    -1303        service.shutdown().await;
    +1087        info!("sending message from b to a");
    +1088        let msg = Datagrams::from(b"right back at ya, client b!");
    +1089        client_b
    +1090            .send(ClientToRelayMsg::Datagrams {
    +1091                dst_node_id: a_key,
    +1092                datagrams: msg.clone(),
    +1093            })
    +1094            .await?;
    +1095        info!("waiting for message b on a");
    +1096        let (got_key, got_msg) =
    +1097            process_msg(client_a.next().await).expect("expected message from client_b");
    +1098        assert_eq!(b_key, got_key);
    +1099        assert_eq!(msg, got_msg);
    +1100
    +1101        // Close before shutting down, otherwise we'll try to send close frames on broken pipes
    +1102        client_a.close().await?;
    +1103        client_b.close().await?;
    +1104        server.shutdown();
    +1105        server.task_handle().await.context("join")?;
    +1106
    +1107        Ok(())
    +1108    }
    +1109
    +1110    async fn make_test_client(client: tokio::io::DuplexStream, key: &SecretKey) -> Result<Conn> {
    +1111        let client = crate::client::streams::MaybeTlsStream::Test(client);
    +1112        let client = tokio_websockets::ClientBuilder::new().take_over(client);
    +1113        let client = Conn::new(client, KeyCache::test(), key).await?;
    +1114        Ok(client)
    +1115    }
    +1116
    +1117    #[tokio::test]
    +1118    #[traced_test]
    +1119    async fn test_server_basic() -> Result {
    +1120        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1121
    +1122        info!("Create the server.");
    +1123        let metrics = Arc::new(Metrics::default());
    +1124        let service = RelayService::new(
    +1125            Default::default(),
    +1126            Default::default(),
    +1127            None,
    +1128            KeyCache::test(),
    +1129            AccessConfig::Everyone,
    +1130            metrics.clone(),
    +1131        );
    +1132
    +1133        info!("Create client A and connect it to the server.");
    +1134        let key_a = SecretKey::generate(&mut rng);
    +1135        let public_key_a = key_a.public();
    +1136        let (client_a, rw_a) = tokio::io::duplex(10);
    +1137        let s = service.clone();
    +1138        let handler_task =
    +1139            tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_a), None).await });
    +1140        let mut client_a = make_test_client(client_a, &key_a).await?;
    +1141        handler_task.await.context("join")??;
    +1142
    +1143        info!("Create client B and connect it to the server.");
    +1144        let key_b = SecretKey::generate(&mut rng);
    +1145        let public_key_b = key_b.public();
    +1146        let (client_b, rw_b) = tokio::io::duplex(10);
    +1147        let s = service.clone();
    +1148        let handler_task =
    +1149            tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_b), None).await });
    +1150        let mut client_b = make_test_client(client_b, &key_b).await?;
    +1151        handler_task.await.context("join")??;
    +1152
    +1153        info!("Send message from A to B.");
    +1154        let msg = Datagrams::from(b"hello client b!!");
    +1155        client_a
    +1156            .send(ClientToRelayMsg::Datagrams {
    +1157                dst_node_id: public_key_b,
    +1158                datagrams: msg.clone(),
    +1159            })
    +1160            .await?;
    +1161        match client_b.next().await.unwrap()? {
    +1162            RelayToClientMsg::Datagrams {
    +1163                remote_node_id,
    +1164                datagrams,
    +1165            } => {
    +1166                assert_eq!(public_key_a, remote_node_id);
    +1167                assert_eq!(msg, datagrams);
    +1168            }
    +1169            msg => {
    +1170                whatever!("expected ReceivedDatagrams msg, got {msg:?}");
    +1171            }
    +1172        }
    +1173
    +1174        info!("Send message from B to A.");
    +1175        let msg = Datagrams::from(b"nice to meet you client a!!");
    +1176        client_b
    +1177            .send(ClientToRelayMsg::Datagrams {
    +1178                dst_node_id: public_key_a,
    +1179                datagrams: msg.clone(),
    +1180            })
    +1181            .await?;
    +1182        match client_a.next().await.unwrap()? {
    +1183            RelayToClientMsg::Datagrams {
    +1184                remote_node_id,
    +1185                datagrams,
    +1186            } => {
    +1187                assert_eq!(public_key_b, remote_node_id);
    +1188                assert_eq!(msg, datagrams);
    +1189            }
    +1190            msg => {
    +1191                whatever!("expected ReceivedDatagrams msg, got {msg:?}");
    +1192            }
    +1193        }
    +1194
    +1195        info!("Close the server and clients");
    +1196        service.shutdown().await;
    +1197        tokio::time::sleep(Duration::from_secs(1)).await;
    +1198
    +1199        info!("Fail to send message from A to B.");
    +1200        let res = client_a
    +1201            .send(ClientToRelayMsg::Datagrams {
    +1202                dst_node_id: public_key_b,
    +1203                datagrams: Datagrams::from(b"try to send"),
    +1204            })
    +1205            .await;
    +1206        assert!(res.is_err());
    +1207        assert!(client_b.next().await.is_none());
    +1208
    +1209        drop(client_a);
    +1210        drop(client_b);
    +1211
    +1212        service.shutdown().await;
    +1213
    +1214        assert_eq!(metrics.accepts.get(), metrics.disconnects.get());
    +1215
    +1216        Ok(())
    +1217    }
    +1218
    +1219    #[tokio::test]
    +1220    async fn test_server_replace_client() -> Result {
    +1221        let mut rng = rand_chacha::ChaCha8Rng::seed_from_u64(0u64);
    +1222
    +1223        info!("Create the server.");
    +1224        let service = RelayService::new(
    +1225            Default::default(),
    +1226            Default::default(),
    +1227            None,
    +1228            KeyCache::test(),
    +1229            AccessConfig::Everyone,
    +1230            Default::default(),
    +1231        );
    +1232
    +1233        info!("Create client A and connect it to the server.");
    +1234        let key_a = SecretKey::generate(&mut rng);
    +1235        let public_key_a = key_a.public();
    +1236        let (client_a, rw_a) = tokio::io::duplex(10);
    +1237        let s = service.clone();
    +1238        let handler_task =
    +1239            tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_a), None).await });
    +1240        let mut client_a = make_test_client(client_a, &key_a).await?;
    +1241        handler_task.await.context("join")??;
    +1242
    +1243        info!("Create client B and connect it to the server.");
    +1244        let key_b = SecretKey::generate(&mut rng);
    +1245        let public_key_b = key_b.public();
    +1246        let (client_b, rw_b) = tokio::io::duplex(10);
    +1247        let s = service.clone();
    +1248        let handler_task =
    +1249            tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_b), None).await });
    +1250        let mut client_b = make_test_client(client_b, &key_b).await?;
    +1251        handler_task.await.context("join")??;
    +1252
    +1253        info!("Send message from A to B.");
    +1254        let msg = Datagrams::from(b"hello client b!!");
    +1255        client_a
    +1256            .send(ClientToRelayMsg::Datagrams {
    +1257                dst_node_id: public_key_b,
    +1258                datagrams: msg.clone(),
    +1259            })
    +1260            .await?;
    +1261        match client_b.next().await.expect("eos")? {
    +1262            RelayToClientMsg::Datagrams {
    +1263                remote_node_id,
    +1264                datagrams,
    +1265            } => {
    +1266                assert_eq!(public_key_a, remote_node_id);
    +1267                assert_eq!(msg, datagrams);
    +1268            }
    +1269            msg => {
    +1270                whatever!("expected ReceivedDatagrams msg, got {msg:?}");
    +1271            }
    +1272        }
    +1273
    +1274        info!("Send message from B to A.");
    +1275        let msg = Datagrams::from(b"nice to meet you client a!!");
    +1276        client_b
    +1277            .send(ClientToRelayMsg::Datagrams {
    +1278                dst_node_id: public_key_a,
    +1279                datagrams: msg.clone(),
    +1280            })
    +1281            .await?;
    +1282        match client_a.next().await.expect("eos")? {
    +1283            RelayToClientMsg::Datagrams {
    +1284                remote_node_id,
    +1285                datagrams,
    +1286            } => {
    +1287                assert_eq!(public_key_b, remote_node_id);
    +1288                assert_eq!(msg, datagrams);
    +1289            }
    +1290            msg => {
    +1291                whatever!("expected ReceivedDatagrams msg, got {msg:?}");
    +1292            }
    +1293        }
    +1294
    +1295        info!("Create client B and connect it to the server");
    +1296        let (new_client_b, new_rw_b) = tokio::io::duplex(10);
    +1297        let s = service.clone();
    +1298        let handler_task =
    +1299            tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(new_rw_b), None).await });
    +1300        let mut new_client_b = make_test_client(new_client_b, &key_b).await?;
    +1301        handler_task.await.context("join")??;
    +1302
    +1303        // assert!(client_b.recv().await.is_err());
     1304
    -1305        info!("Sending message from A to B fails");
    -1306        let res = client_a
    -1307            .send(SendMessage::SendPacket(
    -1308                public_key_b,
    -1309                Bytes::from_static(b"try to send"),
    -1310            ))
    -1311            .await;
    -1312        assert!(res.is_err());
    -1313        assert!(new_client_b.next().await.is_none());
    -1314        Ok(())
    -1315    }
    -1316}
    \ No newline at end of file +1305 info!("Send message from A to B."); +1306 let msg = Datagrams::from(b"are you still there, b?!"); +1307 client_a +1308 .send(ClientToRelayMsg::Datagrams { +1309 dst_node_id: public_key_b, +1310 datagrams: msg.clone(), +1311 }) +1312 .await?; +1313 match new_client_b.next().await.expect("eos")? { +1314 RelayToClientMsg::Datagrams { +1315 remote_node_id, +1316 datagrams, +1317 } => { +1318 assert_eq!(public_key_a, remote_node_id); +1319 assert_eq!(msg, datagrams); +1320 } +1321 msg => { +1322 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1323 } +1324 } +1325 +1326 info!("Send message from B to A."); +1327 let msg = Datagrams::from(b"just had a spot of trouble but I'm back now,a!!"); +1328 new_client_b +1329 .send(ClientToRelayMsg::Datagrams { +1330 dst_node_id: public_key_a, +1331 datagrams: msg.clone(), +1332 }) +1333 .await?; +1334 match client_a.next().await.expect("eos")? { +1335 RelayToClientMsg::Datagrams { +1336 remote_node_id, +1337 datagrams, +1338 } => { +1339 assert_eq!(public_key_b, remote_node_id); +1340 assert_eq!(msg, datagrams); +1341 } +1342 msg => { +1343 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1344 } +1345 } +1346 +1347 info!("Close the server and clients"); +1348 service.shutdown().await; +1349 +1350 info!("Sending message from A to B fails"); +1351 let res = client_a +1352 .send(ClientToRelayMsg::Datagrams { +1353 dst_node_id: public_key_b, +1354 datagrams: Datagrams::from(b"try to send"), +1355 }) +1356 .await; +1357 assert!(res.is_err()); +1358 assert!(new_client_b.next().await.is_none()); +1359 Ok(()) +1360 } +1361}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/server/metrics.rs.html b/pr/3367/docs/src/iroh_relay/server/metrics.rs.html index 8638a1d0e6..b6c708fb0b 100644 --- a/pr/3367/docs/src/iroh_relay/server/metrics.rs.html +++ b/pr/3367/docs/src/iroh_relay/server/metrics.rs.html @@ -1,4 +1,4 @@ -metrics.rs - source

    iroh_relay/server/
    metrics.rs

    1use std::sync::Arc;
    +metrics.rs - source

    iroh_relay/server/
    metrics.rs

    1use std::sync::Arc;
     2
     3use iroh_metrics::{Counter, MetricsGroup, MetricsGroupSet};
     4
    @@ -56,8 +56,8 @@
     56    #[metrics(help = "Number of unknown frames sent to this server.")]
     57    pub unknown_frames: Counter,
     58
    -59    /// Number of frames received from client connection which have been rate-limited.
    -60    pub frames_rx_ratelimited_total: Counter,
    +59    /// Number of bytes received from client connection which have been rate-limited.
    +60    pub bytes_rx_ratelimited_total: Counter,
     61    /// Number of client connections which have had any frames rate-limited.
     62    pub conns_rx_ratelimited_total: Counter,
     63
    @@ -72,22 +72,17 @@
     72
     73    /// Number of unique client keys per day
     74    pub unique_client_keys: Counter,
    -75
    -76    /// Number of accepted websocket connections
    -77    pub websocket_accepts: Counter,
    -78    /// Number of accepted 'iroh derp http' connection upgrades
    -79    pub relay_accepts: Counter,
    -80    // TODO: enable when we can have multiple connections for one node id
    -81    // pub duplicate_client_keys: Counter,
    -82    // pub duplicate_client_conns: Counter,
    -83    // TODO: only important stat that we cannot track right now
    -84    // pub average_queue_duration:
    -85}
    -86
    -87/// All metrics tracked in the relay server.
    -88#[derive(Debug, Default, Clone, MetricsGroupSet)]
    -89#[metrics(name = "relay")]
    -90pub struct RelayMetrics {
    -91    /// Metrics tracked for the relay server.
    -92    pub server: Arc<Metrics>,
    -93}
    \ No newline at end of file +75 // TODO: enable when we can have multiple connections for one node id +76 // pub duplicate_client_keys: Counter, +77 // pub duplicate_client_conns: Counter, +78 // TODO: only important stat that we cannot track right now +79 // pub average_queue_duration: +80} +81 +82/// All metrics tracked in the relay server. +83#[derive(Debug, Default, Clone, MetricsGroupSet)] +84#[metrics(name = "relay")] +85pub struct RelayMetrics { +86 /// Metrics tracked for the relay server. +87 pub server: Arc<Metrics>, +88}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/server/resolver.rs.html b/pr/3367/docs/src/iroh_relay/server/resolver.rs.html index 67d12bfcc4..64d29b95e7 100644 --- a/pr/3367/docs/src/iroh_relay/server/resolver.rs.html +++ b/pr/3367/docs/src/iroh_relay/server/resolver.rs.html @@ -1,4 +1,4 @@ -resolver.rs - source

    iroh_relay/server/
    resolver.rs

    1use std::sync::Arc;
    +resolver.rs - source

    iroh_relay/server/
    resolver.rs

    1use std::sync::Arc;
     2
     3use n0_future::{
     4    task::{self, AbortOnDropHandle},
    diff --git a/pr/3367/docs/src/iroh_relay/server/streams.rs.html b/pr/3367/docs/src/iroh_relay/server/streams.rs.html
    index fc6dff57d4..e98f9af311 100644
    --- a/pr/3367/docs/src/iroh_relay/server/streams.rs.html
    +++ b/pr/3367/docs/src/iroh_relay/server/streams.rs.html
    @@ -1,193 +1,565 @@
    -streams.rs - source

    iroh_relay/server/
    streams.rs

    1//! Streams used in the server-side implementation of iroh relays.
    +streams.rs - source

    iroh_relay/server/
    streams.rs

    1//! Streams used in the server-side implementation of iroh relays.
     2
     3use std::{
     4    pin::Pin,
    -5    task::{Context, Poll},
    -6};
    -7
    -8use n0_future::{Sink, Stream};
    -9use snafu::Snafu;
    -10use tokio::io::{AsyncRead, AsyncWrite};
    -11use tokio_util::codec::Framed;
    -12use tokio_websockets::WebSocketStream;
    +5    sync::Arc,
    +6    task::{Context, Poll},
    +7};
    +8
    +9use n0_future::{FutureExt, Sink, Stream, ready, time};
    +10use snafu::{Backtrace, Snafu};
    +11use tokio::io::{AsyncRead, AsyncWrite};
    +12use tracing::instrument;
     13
    -14use crate::{
    -15    protos::relay::{Frame, RecvError, RelayCodec},
    -16    KeyCache,
    -17};
    -18
    -19/// A Stream and Sink for [`Frame`]s connected to a single relay client.
    -20///
    -21/// The stream receives message from the client while the sink sends them to the client.
    -22#[derive(Debug)]
    -23pub(crate) enum RelayedStream {
    -24    Relay(Framed<MaybeTlsStream, RelayCodec>),
    -25    Ws(WebSocketStream<MaybeTlsStream>, KeyCache),
    -26}
    -27
    -28fn ws_to_io_err(e: tokio_websockets::Error) -> std::io::Error {
    -29    match e {
    -30        tokio_websockets::Error::Io(io_err) => io_err,
    -31        _ => std::io::Error::other(e.to_string()),
    -32    }
    -33}
    -34
    -35impl Sink<Frame> for RelayedStream {
    -36    type Error = std::io::Error;
    -37
    -38    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -39        match *self {
    -40            Self::Relay(ref mut framed) => Pin::new(framed).poll_ready(cx),
    -41            Self::Ws(ref mut ws, _) => Pin::new(ws).poll_ready(cx).map_err(ws_to_io_err),
    -42        }
    -43    }
    -44
    -45    fn start_send(mut self: Pin<&mut Self>, item: Frame) -> Result<(), Self::Error> {
    -46        match *self {
    -47            Self::Relay(ref mut framed) => Pin::new(framed).start_send(item),
    -48            Self::Ws(ref mut ws, _) => Pin::new(ws)
    -49                .start_send(tokio_websockets::Message::binary(
    -50                    tokio_websockets::Payload::from(item.encode_for_ws_msg()),
    -51                ))
    -52                .map_err(ws_to_io_err),
    -53        }
    -54    }
    -55
    -56    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -57        match *self {
    -58            Self::Relay(ref mut framed) => Pin::new(framed).poll_flush(cx),
    -59            Self::Ws(ref mut ws, _) => Pin::new(ws).poll_flush(cx).map_err(ws_to_io_err),
    -60        }
    -61    }
    -62
    -63    fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    -64        match *self {
    -65            Self::Relay(ref mut framed) => Pin::new(framed).poll_close(cx),
    -66            Self::Ws(ref mut ws, _) => Pin::new(ws).poll_close(cx).map_err(ws_to_io_err),
    -67        }
    -68    }
    -69}
    +14use super::{ClientRateLimit, Metrics};
    +15use crate::{
    +16    ExportKeyingMaterial, KeyCache, MAX_PACKET_SIZE,
    +17    protos::{
    +18        relay::{ClientToRelayMsg, Error as ProtoError, RelayToClientMsg},
    +19        streams::{StreamError, WsBytesFramed},
    +20    },
    +21};
    +22
    +23/// The relay's connection to a client.
    +24///
    +25/// This implements
    +26/// - a [`Stream`] of [`ClientToRelayMsg`]s that are received from the client,
    +27/// - a [`Sink`] of [`RelayToClientMsg`]s that can be sent to the client.
    +28#[derive(Debug)]
    +29pub(crate) struct RelayedStream {
    +30    pub(crate) inner: WsBytesFramed<RateLimited<MaybeTlsStream>>,
    +31    pub(crate) key_cache: KeyCache,
    +32}
    +33
    +34#[cfg(test)]
    +35impl RelayedStream {
    +36    pub(crate) fn test(stream: tokio::io::DuplexStream) -> Self {
    +37        let stream = MaybeTlsStream::Test(stream);
    +38        let stream = RateLimited::unlimited(stream, Arc::new(Metrics::default()));
    +39        Self {
    +40            inner: WsBytesFramed {
    +41                io: tokio_websockets::ServerBuilder::new()
    +42                    .limits(Self::limits())
    +43                    .serve(stream),
    +44            },
    +45            key_cache: KeyCache::test(),
    +46        }
    +47    }
    +48
    +49    pub(crate) fn test_limited(
    +50        stream: tokio::io::DuplexStream,
    +51        max_burst_bytes: u32,
    +52        bytes_per_second: u32,
    +53    ) -> Result<Self, InvalidBucketConfig> {
    +54        let stream = MaybeTlsStream::Test(stream);
    +55        let stream = RateLimited::new(
    +56            stream,
    +57            max_burst_bytes,
    +58            bytes_per_second,
    +59            Arc::new(Metrics::default()),
    +60        )?;
    +61        Ok(Self {
    +62            inner: WsBytesFramed {
    +63                io: tokio_websockets::ServerBuilder::new()
    +64                    .limits(Self::limits())
    +65                    .serve(stream),
    +66            },
    +67            key_cache: KeyCache::test(),
    +68        })
    +69    }
     70
    -71/// Relay stream errors
    -72#[derive(Debug, Snafu)]
    -73#[non_exhaustive]
    -74pub enum StreamError {
    -75    #[snafu(transparent)]
    -76    Proto { source: RecvError },
    -77    #[snafu(transparent)]
    -78    Ws { source: tokio_websockets::Error },
    -79}
    -80
    -81impl Stream for RelayedStream {
    -82    type Item = Result<Frame, StreamError>;
    -83
    -84    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    -85        match *self {
    -86            Self::Relay(ref mut framed) => Pin::new(framed).poll_next(cx).map_err(Into::into),
    -87            Self::Ws(ref mut ws, ref cache) => match Pin::new(ws).poll_next(cx) {
    -88                Poll::Ready(Some(Ok(msg))) => {
    -89                    if msg.is_close() {
    -90                        // Indicate the stream is done when we receive a close message.
    -91                        // Note: We don't have to poll the stream to completion for it to close gracefully.
    -92                        return Poll::Ready(None);
    -93                    }
    -94                    if !msg.is_binary() {
    -95                        tracing::warn!(
    -96                            ?msg,
    -97                            "Got websocket message of unsupported type, skipping."
    -98                        );
    -99                        return Poll::Pending;
    -100                    }
    -101                    let frame = Frame::decode_from_ws_msg(msg.into_payload().into(), cache)
    -102                        .map_err(Into::into);
    -103                    Poll::Ready(Some(frame))
    -104                }
    -105                Poll::Ready(Some(Err(e))) => Poll::Ready(Some(Err(e.into()))),
    -106                Poll::Ready(None) => Poll::Ready(None),
    -107                Poll::Pending => Poll::Pending,
    -108            },
    -109        }
    +71    fn limits() -> tokio_websockets::Limits {
    +72        tokio_websockets::Limits::default()
    +73            .max_payload_len(Some(crate::protos::relay::MAX_FRAME_SIZE))
    +74    }
    +75}
    +76
    +77/// Relay send errors
    +78#[derive(Debug, Snafu)]
    +79#[non_exhaustive]
    +80pub enum SendError {
    +81    #[snafu(transparent)]
    +82    StreamError { source: StreamError },
    +83    #[snafu(display("Packet exceeds max packet size"))]
    +84    ExceedsMaxPacketSize { size: usize },
    +85    #[snafu(display("Attempted to send empty packet"))]
    +86    EmptyPacket {},
    +87}
    +88
    +89impl Sink<RelayToClientMsg> for RelayedStream {
    +90    type Error = SendError;
    +91
    +92    fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +93        Pin::new(&mut self.inner).poll_ready(cx).map_err(Into::into)
    +94    }
    +95
    +96    fn start_send(mut self: Pin<&mut Self>, item: RelayToClientMsg) -> Result<(), Self::Error> {
    +97        let size = item.encoded_len();
    +98        snafu::ensure!(size <= MAX_PACKET_SIZE, ExceedsMaxPacketSizeSnafu { size });
    +99        if let RelayToClientMsg::Datagrams { datagrams, .. } = &item {
    +100            snafu::ensure!(!datagrams.contents.is_empty(), EmptyPacketSnafu);
    +101        }
    +102
    +103        Pin::new(&mut self.inner)
    +104            .start_send(item.to_bytes().freeze())
    +105            .map_err(Into::into)
    +106    }
    +107
    +108    fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +109        Pin::new(&mut self.inner).poll_flush(cx).map_err(Into::into)
     110    }
    -111}
    -112
    -113/// The main underlying IO stream type used for the relay server.
    -114///
    -115/// Allows choosing whether or not the underlying [`tokio::net::TcpStream`] is served over Tls
    -116#[derive(Debug)]
    -117#[allow(clippy::large_enum_variant)]
    -118pub enum MaybeTlsStream {
    -119    /// A plain non-Tls [`tokio::net::TcpStream`]
    -120    Plain(tokio::net::TcpStream),
    -121    /// A Tls wrapped [`tokio::net::TcpStream`]
    -122    Tls(tokio_rustls::server::TlsStream<tokio::net::TcpStream>),
    -123    /// An in-memory bidirectional pipe.
    -124    #[cfg(test)]
    -125    Test(tokio::io::DuplexStream),
    -126}
    -127
    -128impl AsyncRead for MaybeTlsStream {
    -129    fn poll_read(
    -130        mut self: Pin<&mut Self>,
    -131        cx: &mut Context<'_>,
    -132        buf: &mut tokio::io::ReadBuf<'_>,
    -133    ) -> Poll<std::io::Result<()>> {
    -134        match &mut *self {
    -135            MaybeTlsStream::Plain(ref mut s) => Pin::new(s).poll_read(cx, buf),
    -136            MaybeTlsStream::Tls(ref mut s) => Pin::new(s).poll_read(cx, buf),
    -137            #[cfg(test)]
    -138            MaybeTlsStream::Test(ref mut s) => Pin::new(s).poll_read(cx, buf),
    -139        }
    -140    }
    -141}
    -142
    -143impl AsyncWrite for MaybeTlsStream {
    -144    fn poll_flush(
    -145        mut self: Pin<&mut Self>,
    -146        cx: &mut Context<'_>,
    -147    ) -> Poll<std::result::Result<(), std::io::Error>> {
    -148        match &mut *self {
    -149            MaybeTlsStream::Plain(ref mut s) => Pin::new(s).poll_flush(cx),
    -150            MaybeTlsStream::Tls(ref mut s) => Pin::new(s).poll_flush(cx),
    -151            #[cfg(test)]
    -152            MaybeTlsStream::Test(ref mut s) => Pin::new(s).poll_flush(cx),
    -153        }
    -154    }
    +111
    +112    fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
    +113        Pin::new(&mut self.inner).poll_close(cx).map_err(Into::into)
    +114    }
    +115}
    +116
    +117/// Relay receive errors
    +118#[derive(Debug, Snafu)]
    +119#[non_exhaustive]
    +120pub enum RecvError {
    +121    #[snafu(transparent)]
    +122    Proto { source: ProtoError },
    +123    #[snafu(transparent)]
    +124    StreamError { source: StreamError },
    +125}
    +126
    +127impl Stream for RelayedStream {
    +128    type Item = Result<ClientToRelayMsg, RecvError>;
    +129
    +130    fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
    +131        Poll::Ready(match ready!(Pin::new(&mut self.inner).poll_next(cx)) {
    +132            Some(Ok(msg)) => {
    +133                Some(ClientToRelayMsg::from_bytes(msg, &self.key_cache).map_err(Into::into))
    +134            }
    +135            Some(Err(e)) => Some(Err(e.into())),
    +136            None => None,
    +137        })
    +138    }
    +139}
    +140
    +141/// The main underlying IO stream type used for the relay server.
    +142///
    +143/// Allows choosing whether or not the underlying [`tokio::net::TcpStream`] is served over Tls
    +144#[derive(Debug)]
    +145#[allow(clippy::large_enum_variant)]
    +146pub enum MaybeTlsStream {
    +147    /// A plain non-Tls [`tokio::net::TcpStream`]
    +148    Plain(tokio::net::TcpStream),
    +149    /// A Tls wrapped [`tokio::net::TcpStream`]
    +150    Tls(tokio_rustls::server::TlsStream<tokio::net::TcpStream>),
    +151    /// An in-memory bidirectional pipe.
    +152    #[cfg(test)]
    +153    Test(tokio::io::DuplexStream),
    +154}
     155
    -156    fn poll_shutdown(
    -157        mut self: Pin<&mut Self>,
    -158        cx: &mut Context<'_>,
    -159    ) -> Poll<std::result::Result<(), std::io::Error>> {
    -160        match &mut *self {
    -161            MaybeTlsStream::Plain(ref mut s) => Pin::new(s).poll_shutdown(cx),
    -162            MaybeTlsStream::Tls(ref mut s) => Pin::new(s).poll_shutdown(cx),
    -163            #[cfg(test)]
    -164            MaybeTlsStream::Test(ref mut s) => Pin::new(s).poll_shutdown(cx),
    -165        }
    -166    }
    -167
    -168    fn poll_write(
    -169        mut self: Pin<&mut Self>,
    -170        cx: &mut Context<'_>,
    -171        buf: &[u8],
    -172    ) -> Poll<std::result::Result<usize, std::io::Error>> {
    -173        match &mut *self {
    -174            MaybeTlsStream::Plain(ref mut s) => Pin::new(s).poll_write(cx, buf),
    -175            MaybeTlsStream::Tls(ref mut s) => Pin::new(s).poll_write(cx, buf),
    -176            #[cfg(test)]
    -177            MaybeTlsStream::Test(ref mut s) => Pin::new(s).poll_write(cx, buf),
    -178        }
    -179    }
    -180
    -181    fn poll_write_vectored(
    -182        mut self: Pin<&mut Self>,
    -183        cx: &mut Context<'_>,
    -184        bufs: &[std::io::IoSlice<'_>],
    -185    ) -> Poll<std::result::Result<usize, std::io::Error>> {
    -186        match &mut *self {
    -187            MaybeTlsStream::Plain(ref mut s) => Pin::new(s).poll_write_vectored(cx, bufs),
    -188            MaybeTlsStream::Tls(ref mut s) => Pin::new(s).poll_write_vectored(cx, bufs),
    -189            #[cfg(test)]
    -190            MaybeTlsStream::Test(ref mut s) => Pin::new(s).poll_write_vectored(cx, bufs),
    -191        }
    -192    }
    -193}
    \ No newline at end of file +156impl ExportKeyingMaterial for MaybeTlsStream { +157 fn export_keying_material<T: AsMut<[u8]>>( +158 &self, +159 output: T, +160 label: &[u8], +161 context: Option<&[u8]>, +162 ) -> Option<T> { +163 let Self::Tls(tls) = self else { +164 return None; +165 }; +166 +167 tls.get_ref() +168 .1 +169 .export_keying_material(output, label, context) +170 .ok() +171 } +172} +173 +174impl AsyncRead for MaybeTlsStream { +175 fn poll_read( +176 mut self: Pin<&mut Self>, +177 cx: &mut Context<'_>, +178 buf: &mut tokio::io::ReadBuf<'_>, +179 ) -> Poll<std::io::Result<()>> { +180 match &mut *self { +181 MaybeTlsStream::Plain(s) => Pin::new(s).poll_read(cx, buf), +182 MaybeTlsStream::Tls(s) => Pin::new(s).poll_read(cx, buf), +183 #[cfg(test)] +184 MaybeTlsStream::Test(s) => Pin::new(s).poll_read(cx, buf), +185 } +186 } +187} +188 +189impl AsyncWrite for MaybeTlsStream { +190 fn poll_flush( +191 mut self: Pin<&mut Self>, +192 cx: &mut Context<'_>, +193 ) -> Poll<std::result::Result<(), std::io::Error>> { +194 match &mut *self { +195 MaybeTlsStream::Plain(s) => Pin::new(s).poll_flush(cx), +196 MaybeTlsStream::Tls(s) => Pin::new(s).poll_flush(cx), +197 #[cfg(test)] +198 MaybeTlsStream::Test(s) => Pin::new(s).poll_flush(cx), +199 } +200 } +201 +202 fn poll_shutdown( +203 mut self: Pin<&mut Self>, +204 cx: &mut Context<'_>, +205 ) -> Poll<std::result::Result<(), std::io::Error>> { +206 match &mut *self { +207 MaybeTlsStream::Plain(s) => Pin::new(s).poll_shutdown(cx), +208 MaybeTlsStream::Tls(s) => Pin::new(s).poll_shutdown(cx), +209 #[cfg(test)] +210 MaybeTlsStream::Test(s) => Pin::new(s).poll_shutdown(cx), +211 } +212 } +213 +214 fn poll_write( +215 mut self: Pin<&mut Self>, +216 cx: &mut Context<'_>, +217 buf: &[u8], +218 ) -> Poll<std::result::Result<usize, std::io::Error>> { +219 match &mut *self { +220 MaybeTlsStream::Plain(s) => Pin::new(s).poll_write(cx, buf), +221 MaybeTlsStream::Tls(s) => Pin::new(s).poll_write(cx, buf), +222 #[cfg(test)] +223 MaybeTlsStream::Test(s) => Pin::new(s).poll_write(cx, buf), +224 } +225 } +226 +227 fn poll_write_vectored( +228 mut self: Pin<&mut Self>, +229 cx: &mut Context<'_>, +230 bufs: &[std::io::IoSlice<'_>], +231 ) -> Poll<std::result::Result<usize, std::io::Error>> { +232 match &mut *self { +233 MaybeTlsStream::Plain(s) => Pin::new(s).poll_write_vectored(cx, bufs), +234 MaybeTlsStream::Tls(s) => Pin::new(s).poll_write_vectored(cx, bufs), +235 #[cfg(test)] +236 MaybeTlsStream::Test(s) => Pin::new(s).poll_write_vectored(cx, bufs), +237 } +238 } +239 +240 fn is_write_vectored(&self) -> bool { +241 match self { +242 MaybeTlsStream::Plain(s) => s.is_write_vectored(), +243 MaybeTlsStream::Tls(s) => s.is_write_vectored(), +244 #[cfg(test)] +245 MaybeTlsStream::Test(s) => s.is_write_vectored(), +246 } +247 } +248} +249 +250/// Rate limiter for reading from a [`RelayedStream`]. +251/// +252/// The writes to the sink are not rate limited. +253/// +254/// This potentially buffers one frame if the rate limiter does not allows this frame. +255/// While the frame is buffered the undernlying stream is no longer polled. +256#[derive(Debug)] +257pub(crate) struct RateLimited<S> { +258 inner: S, +259 bucket: Option<Bucket>, +260 bucket_refilled: Option<Pin<Box<time::Sleep>>>, +261 /// Keeps track if this stream was ever rate-limited. +262 limited_once: bool, +263 metrics: Arc<Metrics>, +264} +265 +266#[derive(Debug)] +267struct Bucket { +268 // The current bucket fill +269 fill: i64, +270 // The maximum bucket fill +271 max: i64, +272 // The bucket's last fill time +273 last_fill: time::Instant, +274 // Interval length of one refill +275 refill_period: time::Duration, +276 // How much we re-fill per refill period +277 refill: i64, +278} +279 +280#[allow(missing_docs)] +281#[derive(Debug, Snafu)] +282pub struct InvalidBucketConfig { +283 backtrace: Option<Backtrace>, +284 #[snafu(implicit)] +285 span_trace: n0_snafu::SpanTrace, +286 max: i64, +287 bytes_per_second: i64, +288 refill_period: time::Duration, +289} +290 +291impl Bucket { +292 fn new( +293 max: i64, +294 bytes_per_second: i64, +295 refill_period: time::Duration, +296 ) -> Result<Self, InvalidBucketConfig> { +297 // milliseconds is the tokio timer resolution +298 let refill = bytes_per_second.saturating_mul(refill_period.as_millis() as i64) / 1000; +299 snafu::ensure!( +300 max > 0 && bytes_per_second > 0 && refill_period.as_millis() as u32 > 0 && refill > 0, +301 InvalidBucketConfigSnafu { +302 max, +303 bytes_per_second, +304 refill_period, +305 }, +306 ); +307 Ok(Self { +308 fill: max, +309 max, +310 last_fill: time::Instant::now(), +311 refill_period, +312 refill, +313 }) +314 } +315 +316 fn update_state(&mut self) { +317 let now = time::Instant::now(); +318 // div safety: self.refill_period.as_millis() is checked to be non-null in constructor +319 let refill_periods = now.saturating_duration_since(self.last_fill).as_millis() as u32 +320 / self.refill_period.as_millis() as u32; +321 if refill_periods == 0 { +322 // Nothing to do - we won't refill yet +323 return; +324 } +325 +326 self.fill = self +327 .fill +328 .saturating_add(refill_periods as i64 * self.refill); +329 self.fill = std::cmp::min(self.fill, self.max); +330 self.last_fill += self.refill_period * refill_periods; +331 } +332 +333 fn consume(&mut self, bytes: usize) -> Result<(), time::Instant> { +334 let bytes = i64::try_from(bytes).unwrap_or(i64::MAX); +335 self.update_state(); +336 +337 self.fill = self.fill.saturating_sub(bytes); +338 +339 if self.fill > 0 { +340 return Ok(()); +341 } +342 +343 let missing = self.fill.saturating_neg(); +344 +345 let periods_needed = (missing / self.refill) + 1; +346 let periods_needed = u32::try_from(periods_needed).unwrap_or(u32::MAX); +347 +348 Err(self.last_fill + periods_needed * self.refill_period) +349 } +350} +351 +352impl<S> RateLimited<S> { +353 pub(crate) fn from_cfg( +354 cfg: Option<ClientRateLimit>, +355 io: S, +356 metrics: Arc<Metrics>, +357 ) -> Result<Self, InvalidBucketConfig> { +358 match cfg { +359 Some(cfg) => { +360 let bytes_per_second = cfg.bytes_per_second.into(); +361 let max_burst_bytes = cfg.max_burst_bytes.map_or(bytes_per_second / 10, u32::from); +362 Self::new(io, max_burst_bytes, bytes_per_second, metrics) +363 } +364 None => Ok(Self::unlimited(io, metrics)), +365 } +366 } +367 +368 pub(crate) fn new( +369 inner: S, +370 max_burst_bytes: u32, +371 bytes_per_second: u32, +372 metrics: Arc<Metrics>, +373 ) -> Result<Self, InvalidBucketConfig> { +374 Ok(Self { +375 inner, +376 bucket: Some(Bucket::new( +377 max_burst_bytes as i64, +378 bytes_per_second as i64, +379 time::Duration::from_millis(100), +380 )?), +381 bucket_refilled: None, +382 limited_once: false, +383 metrics, +384 }) +385 } +386 +387 pub(crate) fn unlimited(inner: S, metrics: Arc<Metrics>) -> Self { +388 Self { +389 inner, +390 bucket: None, +391 bucket_refilled: None, +392 limited_once: false, +393 metrics, +394 } +395 } +396 +397 /// Records metrics about being rate-limited. +398 fn record_rate_limited(&mut self, bytes: usize) { +399 // TODO: add a label for the frame type. +400 self.metrics.bytes_rx_ratelimited_total.inc_by(bytes as u64); +401 if !self.limited_once { +402 self.metrics.conns_rx_ratelimited_total.inc(); +403 self.limited_once = true; +404 } +405 } +406} +407 +408impl<S: ExportKeyingMaterial> ExportKeyingMaterial for RateLimited<S> { +409 fn export_keying_material<T: AsMut<[u8]>>( +410 &self, +411 output: T, +412 label: &[u8], +413 context: Option<&[u8]>, +414 ) -> Option<T> { +415 self.inner.export_keying_material(output, label, context) +416 } +417} +418 +419impl<S: AsyncRead + Unpin> AsyncRead for RateLimited<S> { +420 #[instrument(name = "rate_limited_poll_read", skip_all)] +421 fn poll_read( +422 mut self: Pin<&mut Self>, +423 cx: &mut std::task::Context<'_>, +424 buf: &mut tokio::io::ReadBuf<'_>, +425 ) -> Poll<std::io::Result<()>> { +426 let this = &mut *self; +427 let Some(bucket) = &mut this.bucket else { +428 // If there is no rate-limiter, then directly poll the inner. +429 return Pin::new(&mut this.inner).poll_read(cx, buf); +430 }; +431 +432 // If we're currently limited, wait until we've got some bucket space again +433 if let Some(bucket_refilled) = &mut this.bucket_refilled { +434 ready!(bucket_refilled.poll(cx)); +435 this.bucket_refilled = None; +436 } +437 +438 // We're not currently limited, let's read +439 +440 // Poll inner for a new item. +441 let bytes_before = buf.remaining(); +442 ready!(Pin::new(&mut this.inner).poll_read(cx, buf))?; +443 let bytes_read = bytes_before - buf.remaining(); +444 +445 // Record how much we've read, rate limit accordingly, if need be. +446 if let Err(refill_time) = bucket.consume(bytes_read) { +447 this.record_rate_limited(bytes_read); +448 this.bucket_refilled = Some(Box::pin(time::sleep_until(refill_time))); +449 } +450 +451 Poll::Ready(Ok(())) +452 } +453} +454 +455impl<S: AsyncWrite + Unpin> AsyncWrite for RateLimited<S> { +456 fn poll_write( +457 mut self: Pin<&mut Self>, +458 cx: &mut std::task::Context<'_>, +459 buf: &[u8], +460 ) -> Poll<Result<usize, std::io::Error>> { +461 Pin::new(&mut self.inner).poll_write(cx, buf) +462 } +463 +464 fn poll_flush( +465 mut self: Pin<&mut Self>, +466 cx: &mut std::task::Context<'_>, +467 ) -> Poll<Result<(), std::io::Error>> { +468 Pin::new(&mut self.inner).poll_flush(cx) +469 } +470 +471 fn poll_shutdown( +472 mut self: Pin<&mut Self>, +473 cx: &mut std::task::Context<'_>, +474 ) -> Poll<Result<(), std::io::Error>> { +475 Pin::new(&mut self.inner).poll_shutdown(cx) +476 } +477} +478 +479#[cfg(test)] +480mod tests { +481 use std::sync::Arc; +482 +483 use n0_future::time; +484 use n0_snafu::{Result, ResultExt}; +485 use tokio::io::{AsyncReadExt, AsyncWriteExt}; +486 use tracing_test::traced_test; +487 +488 use super::Bucket; +489 use crate::server::{Metrics, streams::RateLimited}; +490 +491 #[tokio::test(start_paused = true)] +492 #[traced_test] +493 async fn test_ratelimiter() -> Result { +494 let (read, mut write) = tokio::io::duplex(4096); +495 +496 let send_total = 10 * 1024 * 1024; // 10MiB +497 let send_data = vec![42u8; send_total]; +498 +499 let bytes_per_second = 12_345; +500 +501 let mut rate_limited = RateLimited::new( +502 read, +503 bytes_per_second / 10, +504 bytes_per_second, +505 Arc::new(Metrics::default()), +506 )?; +507 +508 let before = time::Instant::now(); +509 n0_future::future::try_zip( +510 async { +511 let mut remaining = send_total; +512 let mut buf = [0u8; 4096]; +513 while remaining > 0 { +514 remaining -= rate_limited.read(&mut buf).await?; +515 } +516 Ok(()) +517 }, +518 async { +519 write.write_all(&send_data).await?; +520 write.flush().await +521 }, +522 ) +523 .await +524 .e()?; +525 +526 let duration = time::Instant::now().duration_since(before); +527 assert_ne!(duration.as_millis(), 0); +528 +529 let actual_bytes_per_second = send_total as f64 / duration.as_secs_f64(); +530 println!("{actual_bytes_per_second}"); +531 assert_eq!(actual_bytes_per_second.round() as u32, bytes_per_second); +532 +533 Ok(()) +534 } +535 +536 #[tokio::test(start_paused = true)] +537 async fn test_bucket_high_refill() -> Result { +538 let bytes_per_second = i64::MAX; +539 let mut bucket = Bucket::new(i64::MAX, bytes_per_second, time::Duration::from_millis(100))?; +540 for _ in 0..100 { +541 time::sleep(time::Duration::from_millis(100)).await; +542 assert!(bucket.consume(1_000_000).is_ok()); +543 } +544 +545 Ok(()) +546 } +547 +548 #[tokio::test(start_paused = true)] +549 async fn smoke_test_bucket_high_consume() -> Result { +550 let bytes_per_second = 123_456; +551 let mut bucket = Bucket::new( +552 bytes_per_second / 10, +553 bytes_per_second, +554 time::Duration::from_millis(100), +555 )?; +556 for _ in 0..100 { +557 let Err(until) = bucket.consume(usize::MAX) else { +558 panic!("i64::MAX shouldn't be within limits"); +559 }; +560 time::sleep_until(until).await; +561 } +562 +563 Ok(()) +564 } +565}
    \ No newline at end of file diff --git a/pr/3367/docs/src/iroh_relay/server/testing.rs.html b/pr/3367/docs/src/iroh_relay/server/testing.rs.html index efd49d8d01..60936e2af2 100644 --- a/pr/3367/docs/src/iroh_relay/server/testing.rs.html +++ b/pr/3367/docs/src/iroh_relay/server/testing.rs.html @@ -1,4 +1,4 @@ -testing.rs - source

    iroh_relay/server/
    testing.rs

    1//! Exposes functions to quickly configure a server suitable for testing.
    +testing.rs - source

    iroh_relay/server/
    testing.rs

    1//! Exposes functions to quickly configure a server suitable for testing.
     2use std::net::Ipv4Addr;
     3
     4use super::{AccessConfig, CertConfig, QuicConfig, RelayConfig, ServerConfig, TlsConfig};
    @@ -17,7 +17,7 @@
     17    ])
     18    .expect("valid");
     19    let rustls_cert = cert.cert.der();
    -20    let private_key = rustls::pki_types::PrivatePkcs8KeyDer::from(cert.key_pair.serialize_der());
    +20    let private_key = rustls::pki_types::PrivatePkcs8KeyDer::from(cert.signing_key.serialize_der());
     21    let private_key = rustls::pki_types::PrivateKeyDer::from(private_key);
     22    let certs = vec![rustls_cert.clone()];
     23    let server_config = rustls::ServerConfig::builder_with_provider(std::sync::Arc::new(
    diff --git a/pr/3367/docs/static.files/COPYRIGHT-565f0803.txt b/pr/3367/docs/static.files/COPYRIGHT-7fb11f4e.txt
    similarity index 67%
    rename from pr/3367/docs/static.files/COPYRIGHT-565f0803.txt
    rename to pr/3367/docs/static.files/COPYRIGHT-7fb11f4e.txt
    index 111340298c..752dab0a34 100644
    --- a/pr/3367/docs/static.files/COPYRIGHT-565f0803.txt
    +++ b/pr/3367/docs/static.files/COPYRIGHT-7fb11f4e.txt
    @@ -45,6 +45,27 @@ included, and carry their own copyright notices and license terms:
         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/pr/3367/docs/static.files/favicon-32x32-6580c154.png b/pr/3367/docs/static.files/favicon-32x32-6580c154.png
    deleted file mode 100644
    index 69b8613ce1506e1c92b864f91cc46df06348c62b..0000000000000000000000000000000000000000
    GIT binary patch
    literal 0
    HcmV?d00001
    
    literal 1125
    zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE0wix1Z>k4UEa{HEjtmSN`?>!lvVtU&J%W50
    z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10f+@+{-G$+Qd;gjJKptm-
    zM`SV3z!DH1*13q>1OJmp-&A)3@J_A;A0V7u0bkfJ)-`Krrb
    zGey1(YybBo_r#8#3kPrfo#tA4xb3R$F4j$a9H~9huUPE$JQDstTM~O>^@Ps(;>UH<3Fx0=LBZUre@8723HjVToWun1;~KVtGY7SF1E7liM5<
    zHa%KaZ1y+v;MF5PX0dXM#bh1)zI}?P`JCclPp)GktoyD%Uv%1HzQp-VwViVJr}FN4
    zBVAi3pdsabJ2zzio=sD>mtWX++u%m3k>>5t|1&=?+*B*EnLW)#$^O=9J{D1Fvz#4w
    zCmkrSML-}_v8Imc2?OP1;|%KWmLM+u&^dKy+fI{C57UY0UhRg-3U_
    zKl;3k)jRBCi*uZh#-8L8Gwj!FXV37syULEeYD%&1+S-jgUC&wB|>?y4oO5hW>!C8<`)MX5lF!N|bKNY}tn*U&h`
    z(Adh*+{(a0+rYrez#!Wq{4a`z-29Zxv`X9>q*C7l^C^QQ$cEtjw370~qEv?R@^Zb*
    zyzJuS#DY}4{G#;P?`))iio&ZxB1(c1%M}WW^3yVNQWZ)n3sMy_3rdn17%JvG{=~yk
    z7^b0d%K!8k&!<5Q%*xz)$=t%q!rqfbn1vNw8cYtSFe`5kQ8<0$%84Uqj>sHgKi%N5
    cz)O$emAGKZCnwXXKr0wLUHx3vIVCg!0EmFw6951J
    
    diff --git a/pr/3367/docs/static.files/favicon-32x32-eab170b8.png b/pr/3367/docs/static.files/favicon-32x32-eab170b8.png
    new file mode 100644
    index 0000000000000000000000000000000000000000..0670c4dabb0f844105d193c3c9dbf66b687fc709
    GIT binary patch
    literal 690
    zcmV;j0!{siP)kdg00009a7bBm000DZ
    z000DZ0m8#+P5=M`WJyFpRCwB@)dP$zW)KD7Z)=-zZCj6VYTLGrpbF|nwS61aZXbf$
    z=Ckd+cRNY`Omew8XLV-h&aZ*C*wYYP5oAcHeqdKOS>7m%U2JLaVvCKkyqoN*S8Rjp
    z)r?owBdKb42Xy<--|~Y_45l*CINjP{9Yd{VX*$pGsby{sF7v55Xns&v)MULpuKyD(DlrKYv@^v7xUv-8jp`UPh_jFG$b3xm>BNOaH!fS@9LRoAGTq1-|twmjch2{ua
    zA`f7H2+z-ib_rZ=X^ITcl2Z)6BN!#mK&Ch!B63a728hO=A!7tMJYoU$AU1{q!*0<&F@{BBR
    zT!(XCfJ0jTXPo6Tm3s-WlHcmBnaWvA6HA``*2Gi5IlfdZrJ!fYVv^;&$U(Mum`%09
    zrVg{cAr@yj*EN(SnSb3XTA`x5^nz?Cty${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}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 SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}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)}const settingsButton=getSettingsButton();if(settingsButton){settingsButton.onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"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...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().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 outputElement=window.searchState.outputElement();return outputElement&&outputElement.parentElement&&outputElement.parentElement.id===ALTERNATIVE_DISPLAY_ID},focus:()=>{window.searchState.input&&window.searchState.input.focus()},defocus:()=>{window.searchState.input&&window.searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=window.searchState.outputElement()}switchDisplayedElement(search);window.searchState.mouseMovedAfterSearch=false;document.title=window.searchState.title},removeQueryParameters:()=>{document.title=window.searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);window.searchState.removeQueryParameters()},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:()=>{const search_input=window.searchState.input;if(!search_input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{window.searchState.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=window.searchState.getQueryStringParams();if(params.search!==undefined){window.searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=window.searchState.outputElement();if(!search){return}search.innerHTML="

    "+window.searchState.loadingText+"

    ";window.searchState.showResults(search)},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.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();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.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();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();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("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=null;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(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(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(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(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=()=>{if(document.querySelector(".rustdoc.src")){return}onEachLazy(document.querySelectorAll(":not(.scraped-example) > .example-wrap > pre:not(.example-line-numbers)",),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.querySelectorAll(".example-wrap > .example-line-numbers"),x=>{x.parentNode.removeChild(x)})};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.tagName!=="SUMMARY"&&e.target.tagName!=="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=document.createElement("div");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;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;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=null}}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){if(!getHelpButton().contains(document.activeElement)&&!getHelpButton().contains(event.relatedTarget)&&!getSettingsButton().contains(document.activeElement)&&!getSettingsButton().contains(event.relatedTarget)){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"],].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"}container.id="help";container.style.display="none";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);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll("rustdoc-toolbar .popover"),elem=>{elem.style.display="none"});const button=getHelpButton();if(button){removeClass(button,"help-open")}};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){const button=getHelpButton();addClass(button,"help-open");button.querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}const helpLink=document.querySelector(`#${HELP_BUTTON_ID} > a`);if(isHelpPage){buildHelpMenu()}else if(helpLink){helpLink.addEventListener("click",event=>{if(!helpLink.contains(helpLink)||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);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;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){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)})}()) \ No newline at end of file diff --git a/pr/3367/docs/static.files/main-ce535bd0.js b/pr/3367/docs/static.files/main-ce535bd0.js new file mode 100644 index 0000000000..05e945d05b --- /dev/null +++ b/pr/3367/docs/static.files/main-ce535bd0.js @@ -0,0 +1,24 @@ +"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"+":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/pr/3367/docs/static.files/noscript-263c88ec.css b/pr/3367/docs/static.files/noscript-263c88ec.css new file mode 100644 index 0000000000..e41db77dc5 --- /dev/null +++ b/pr/3367/docs/static.files/noscript-263c88ec.css @@ -0,0 +1 @@ + #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/pr/3367/docs/static.files/noscript-893ab5e7.css b/pr/3367/docs/static.files/noscript-893ab5e7.css deleted file mode 100644 index a6c18ecaf6..0000000000 --- a/pr/3367/docs/static.files/noscript-893ab5e7.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;--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;--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;--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;--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/pr/3367/docs/static.files/rustdoc-6c3ea77c.css b/pr/3367/docs/static.files/rustdoc-6c3ea77c.css deleted file mode 100644 index 006f4b078b..0000000000 --- a/pr/3367/docs/static.files/rustdoc-6c3ea77c.css +++ /dev/null @@ -1,63 +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;--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,');}: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;}.rustdoc-breadcrumbs{grid-area:main-heading-breadcrumbs;line-height:1.25;padding-top:5px;position:relative;z-index:1;}.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,.mobile-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,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,.mobile-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);}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);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.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:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.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:var(--desktop-sidebar-width);border-left:solid 1px 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-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-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;}.mobile-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 .example-wrap>.example-line-numbers,.rustdoc .scraped-example .src-line-numbers,.rustdoc .scraped-example .src-line-numbers>pre{border-top-right-radius:0;border-bottom-right-radius:0;}.rustdoc .example-wrap>.example-line-numbers+pre,.rustdoc .scraped-example .rust{border-top-left-radius:0;border-bottom-left-radius:0;}.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;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap .src-line-numbers{min-width:fit-content;flex-grow:0;text-align:right;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding:14px 8px;padding-right:2px;color:var(--src-line-numbers-span-color);}.example-wrap.digits-1 [data-nosnippet]{width:calc(1ch + var(--line-number-padding) * 2);}.example-wrap.digits-2 [data-nosnippet]{width:calc(2ch + var(--line-number-padding) * 2);}.example-wrap.digits-3 [data-nosnippet]{width:calc(3ch + var(--line-number-padding) * 2);}.example-wrap.digits-4 [data-nosnippet]{width:calc(4ch + var(--line-number-padding) * 2);}.example-wrap.digits-5 [data-nosnippet]{width:calc(5ch + var(--line-number-padding) * 2);}.example-wrap.digits-6 [data-nosnippet]{width:calc(6ch + var(--line-number-padding) * 2);}.example-wrap.digits-7 [data-nosnippet]{width:calc(7ch + var(--line-number-padding) * 2);}.example-wrap.digits-8 [data-nosnippet]{width:calc(8ch + var(--line-number-padding) * 2);}.example-wrap.digits-9 [data-nosnippet]{width:calc(9ch + var(--line-number-padding) * 2);}.example-wrap [data-nosnippet]{color:var(--src-line-numbers-span-color);text-align:right;display:inline-block;margin-right:20px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;padding:0 4px;}.example-wrap [data-nosnippet]:target{border-right:none;}.example-wrap .line-highlighted[data-nosnippet]{background-color:var(--src-line-number-highlighted-background-color);}.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;margin:4px 0 0 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;margin-bottom:4px;}.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;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}.search-results-title+.sub-heading{color:var(--main-color);display:flex;align-items:baseline;white-space:nowrap;}#crate-search-div{position:relative;min-width:0;}#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);}.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-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:202px;top:calc(100% - 16px);}#help.popover{max-width:600px;--popover-arrow-offset:118px;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);}.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);}#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);}#settings-menu,#help-button,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;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a,button#toggle-all-docs{display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid transparent;border-radius:var(--button-border-radius);color:var(--main-color);}#settings-menu>a,#help-button>a,button#toggle-all-docs{width:80px;border-radius:var(--toolbar-button-border-radius);}#settings-menu>a,#help-button>a{min-width:0;}#sidebar-button>a{background-color:var(--button-background-color);border-color:var(--border-color);width:33px;}#settings-menu>a:hover,#settings-menu>a:focus-visible,#help-button>a:hover,#help-button>a:focus-visible,#sidebar-button>a:hover,#sidebar-button>a:focus-visible,button#toggle-all-docs:hover,button#toggle-all-docs:focus-visible{border-color:var(--settings-button-border-focus);text-decoration:none;}#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);}button#toggle-all-docs.will-expand:before{content:url('data:image/svg+xml,\ - ');}#help-button>a:before{content:url('data:image/svg+xml,\ - \ - ?');width:18px;height:18px;filter:var(--settings-menu-filter);}button#toggle-all-docs:before,#help-button>a:before,#settings-menu>a:before{filter:var(--settings-menu-filter);margin:8px;}@media not (pointer:coarse){button#toggle-all-docs:hover:before,#help-button>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:0;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){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:url('data:image/svg+xml,\ - ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ - \ - \ - ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}.side-by-side{flex-direction:column-reverse;}.side-by-side>div{width:auto;}}@media (max-width:700px){:root{--impl-items-indent:0.7em;}*[id]{scroll-margin-top:45px;}#copy-path{width:0;visibility:hidden;}rustdoc-toolbar span.label{display:none;}#settings-menu>a,#help-button>a,button#toggle-all-docs{width:33px;}#settings.popover{--popover-arrow-offset:86px;}#help.popover{--popover-arrow-offset:48px;}.rustdoc{display:block;}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);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border: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;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;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:before{filter:var(--mobile-sidebar-menu-filter);}.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);}}@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;--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;--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;--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;--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);--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;--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/pr/3367/docs/static.files/rustdoc-ca0dd0c4.css b/pr/3367/docs/static.files/rustdoc-ca0dd0c4.css new file mode 100644 index 0000000000..7e6df69c21 --- /dev/null +++ b/pr/3367/docs/static.files/rustdoc-ca0dd0c4.css @@ -0,0 +1,86 @@ + :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/pr/3367/docs/static.files/scrape-examples-2bbcccac.js b/pr/3367/docs/static.files/scrape-examples-2bbcccac.js new file mode 100644 index 0000000000..c90f297f96 --- /dev/null +++ b/pr/3367/docs/static.files/scrape-examples-2bbcccac.js @@ -0,0 +1 @@ +"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/pr/3367/docs/static.files/scrape-examples-5e967b76.js b/pr/3367/docs/static.files/scrape-examples-5e967b76.js deleted file mode 100644 index d34361fe09..0000000000 --- a/pr/3367/docs/static.files/scrape-examples-5e967b76.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}lines[0].parentElement.scrollTo(0,scrollOffset);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=example.querySelector(".scraped-example-title a");let expandButton=null;if(!example.classList.contains("expanded")){expandButton=createScrapeButton(buttonHolder,"expand","Show all")}const isHidden=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){example.locs=JSON.parse(example.attributes.getNamedItem("data-locs").textContent);scrollToLoc(example,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/pr/3367/docs/static.files/search-8d3311b9.js b/pr/3367/docs/static.files/search-8d3311b9.js new file mode 100644 index 0000000000..5da8debd83 --- /dev/null +++ b/pr/3367/docs/static.files/search-8d3311b9.js @@ -0,0 +1,5 @@ +"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=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic","attribute",];const TY_PRIMITIVE=1;const TY_GENERIC=26;const TY_IMPORT=4;const TY_TRAIT=10;const TY_FN=7;const TY_METHOD=13;const TY_TYMETHOD=12;const TY_ASSOCTYPE=17;const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\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===TY_FN||ty===TY_METHOD||ty===TY_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.findIndex(i=>i===typename);if(index<0){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,TY_ASSOCTYPE,"");const typeNameIdOfFnPtr=await first(fn,TY_PRIMITIVE,"");const typeNameIdOfFn=await first(fn,TY_TRAIT,"core::ops");const typeNameIdOfFnMut=await first(fnMut,TY_TRAIT,"core::ops");const typeNameIdOfFnOnce=await first(fnOnce,TY_TRAIT,"core::ops");const typeNameIdOfArray=await first(array,TY_PRIMITIVE,"");const typeNameIdOfSlice=await first(slice,TY_PRIMITIVE,"");const typeNameIdOfArrayOrSlice=await first(arrayOrSlice,TY_PRIMITIVE,"");const typeNameIdOfTuple=await first(tuple,TY_PRIMITIVE,"");const typeNameIdOfUnit=await first(unit,TY_PRIMITIVE,"");const typeNameIdOfTupleOrUnit=await first(tupleOrUnit,TY_PRIMITIVE,"");const typeNameIdOfReference=await first(reference,TY_PRIMITIVE,"");const typeNameIdOfPointer=await first(pointer,TY_PRIMITIVE,"");const typeNameIdOfHof=await first(hof,TY_PRIMITIVE,"");const typeNameIdOfNever=await first(never,TY_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===TY_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:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,};}else if(id===0){result={id:null,name:"",ty:TY_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:TY_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=itemTypes[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=itemTypes[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===TY_PRIMITIVE){if(await writeSpecialPrimitive(fnType,result)){return;}}else if(fnType.ty===TY_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===TY_TYMETHOD){ty=TY_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===TY_IMPORT&&duplicates.has(res[2])){continue;}if(duplicates.has(res[2]+"|"+TY_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<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;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias";}return false;}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)=>{return{id:alias,dist,path_dist:0,index,alias:name,is_alias:true,elems:[],returned:[],item:nonnull(await this.getRow(alias,false)),};};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!==TY_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!==TY_ASSOCTYPE&&(elem.pathWithoutLast.length===0||checkPath(elem.pathWithoutLast,path.modulePath.split("::"),)===0),);if(types.length===0){const areGenericsAllowed=typeFilter===TY_GENERIC||(typeFilter===-1&&(parsedQuery.totalElems>1||parsedQuery.hasReturnArrow)&&elem.pathWithoutLast.length===0&&elem.generics.length===0&&elem.bindings.size===0);if(typeFilter!==TY_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!==TY_ASSOCTYPE){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=itemTypes[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;correctionOutput="

    "+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

    `;}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 previous=document.activeElement.previousElementSibling;if(previous){previous.focus();}else{searchState.focus();}e.preventDefault();}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus();}const rect=document.activeElement.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/pr/3367/docs/static.files/search-f7327375.js b/pr/3367/docs/static.files/search-f7327375.js deleted file mode 100644 index 96859fe4bd..0000000000 --- a/pr/3367/docs/static.files/search-f7327375.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}function onEachBtwn(arr,func,funcBtwn){let skipped=true;for(const value of arr){if(!skipped){funcBtwn(value)}skipped=func(value)}}const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const TY_PRIMITIVE=itemTypes.indexOf("primitive");const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const TY_TRAIT=itemTypes.indexOf("trait");const TY_FN=itemTypes.indexOf("fn");const TY_METHOD=itemTypes.indexOf("method");const TY_TYMETHOD=itemTypes.indexOf("tymethod");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;const REGEX_IDENT=/\p{ID_Start}\p{ID_Continue}*|_\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===TY_FN||ty===TY_METHOD||ty===TY_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=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){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]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&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){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: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===" "}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==125){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){let n=0;let c=this.string.charCodeAt(this.offset);if(c===123){this.offset+=1;return this.decodeList()}while(c<96){n=(n<<4)|(c&0xF);this.offset+=1;c=this.string.charCodeAt(this.offset)}n=(n<<4)|(c&0xF);const[sign,value]=[n&1,n>>1];this.offset+=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}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=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,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;let left=0;let right=this.keys.length-1;while(left<=right){const mid=Math.floor((left+right)/2);const x=this.keys[mid];if(xkey){right=mid-1}else{return this.containers[mid].contains(value)}}return false}}class RoaringBitmapRun{constructor(runcount,array){this.runcount=runcount;this.array=array}contains(value){let left=0;let right=this.runcount-1;while(left<=right){const mid=Math.floor((left+right)/2);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}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){let left=0;let right=this.cardinality-1;while(left<=right){const mid=Math.floor((left+right)/2);const i=mid*2;const x=this.array[i]|(this.array[i+1]<<8);if(xvalue){right=mid-1}else{return true}}return false}}class RoaringBitmapBits{constructor(array){this.array=array}contains(value){return!!(this.array[value>>3]&(1<<(value&7)))}}class NameTrie{constructor(){this.children=[];this.matches=[]}insert(name,id,tailTable){this.insertSubstring(name,0,id,tailTable)}insertSubstring(name,substart,id,tailTable){const l=name.length;if(substart===l){this.matches.push(id)}else{const sb=name.charCodeAt(substart);let child;if(this.children[sb]!==undefined){child=this.children[sb]}else{child=new NameTrie();this.children[sb]=child;let sste;if(substart>=2){const tail=name.substring(substart-2,substart+1);if(tailTable.has(tail)){sste=tailTable.get(tail)}else{sste=[];tailTable.set(tail,sste)}sste.push(child)}}child.insertSubstring(name,substart+1,id,tailTable)}}search(name,tailTable){const results=new Set();this.searchSubstringPrefix(name,0,results);if(results.size=3){const levParams=name.length>=6?new Lev2TParametricDescription(name.length):new Lev1TParametricDescription(name.length);this.searchLev(name,0,levParams,results);const tail=name.substring(0,3);if(tailTable.has(tail)){for(const entry of tailTable.get(tail)){entry.searchSubstringPrefix(name,3,results)}}}return[...results]}searchSubstringPrefix(name,substart,results){const l=name.length;if(substart===l){for(const match of this.matches){results.add(match)}let unprocessedChildren=[];for(const child of this.children){if(child){unprocessedChildren.push(child)}}let nextSet=[];while(unprocessedChildren.length!==0){const next=unprocessedChildren.pop();for(const child of next.children){if(child){nextSet.push(child)}}for(const match of next.matches){results.add(match)}if(unprocessedChildren.length===0){const tmp=unprocessedChildren;unprocessedChildren=nextSet;nextSet=tmp}}}else{const sb=name.charCodeAt(substart);if(this.children[sb]!==undefined){this.children[sb].searchSubstringPrefix(name,substart+1,results)}}}searchLev(name,substart,levParams,results){const stack=[[this,0]];const n=levParams.n;while(stack.length!==0){const[trie,levState]=stack.pop();for(const[charCode,child]of trie.children.entries()){if(!child){continue}const levPos=levParams.getPosition(levState);const vector=levParams.getVector(name,charCode,levPos,Math.min(name.length,levPos+(2*n)+1),);const newLevState=levParams.transition(levState,levPos,vector,);if(newLevState>=0){stack.push([child,newLevState]);if(levParams.isAccept(newLevState)){for(const match of child.matches){results.add(match)}}}}}}}class DocSearch{constructor(rawSearchIndex,rootPath,searchState){this.searchIndexDeprecated=new Map();this.searchIndexEmptyDesc=new Map();this.functionTypeFingerprint=new Uint32Array(0);this.typeNameIdMap=new Map();this.assocTypeIdNameMap=new Map();this.ALIASES=new Map();this.rootPath=rootPath;this.searchState=searchState;this.typeNameIdOfArray=this.buildTypeMapIndex("array");this.typeNameIdOfSlice=this.buildTypeMapIndex("slice");this.typeNameIdOfArrayOrSlice=this.buildTypeMapIndex("[]");this.typeNameIdOfTuple=this.buildTypeMapIndex("tuple");this.typeNameIdOfUnit=this.buildTypeMapIndex("unit");this.typeNameIdOfTupleOrUnit=this.buildTypeMapIndex("()");this.typeNameIdOfFn=this.buildTypeMapIndex("fn");this.typeNameIdOfFnMut=this.buildTypeMapIndex("fnmut");this.typeNameIdOfFnOnce=this.buildTypeMapIndex("fnonce");this.typeNameIdOfHof=this.buildTypeMapIndex("->");this.typeNameIdOfOutput=this.buildTypeMapIndex("output",true);this.typeNameIdOfReference=this.buildTypeMapIndex("reference");this.EMPTY_BINDINGS_MAP=new Map();this.EMPTY_GENERICS_ARRAY=[];this.TYPES_POOL=new Map();this.nameTrie=new NameTrie();this.tailTable=new Map();this.searchIndex=this.buildIndex(rawSearchIndex)}buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(this.typeNameIdMap.has(name)){const obj=this.typeNameIdMap.get(name);obj.assocOnly=!!(isAssocType&&obj.assocOnly);return obj.id}else{const id=this.typeNameIdMap.size;this.typeNameIdMap.set(name,{id,assocOnly:!!isAssocType});return id}}buildItemSearchTypeAll(types,paths,lowercasePaths){return types&&types.length>0?types.map(type=>this.buildItemSearchType(type,paths,lowercasePaths)):this.EMPTY_GENERICS_ARRAY}buildItemSearchType(type,paths,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=this.EMPTY_GENERICS_ARRAY;bindings=this.EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=this.buildItemSearchTypeAll(type[GENERICS_DATA],paths,lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[this.buildItemSearchType(assocType,paths,lowercasePaths,true).id,this.buildItemSearchTypeAll(constraints,paths,lowercasePaths),]}))}else{bindings=this.EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,name:"",ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,unboxFlag:true,}}else if(pathIndex===0){result={id:null,name:"",ty:null,path:null,exactPath:null,generics,bindings,unboxFlag:true,}}else{const item=lowercasePaths[pathIndex-1];const id=this.buildTypeMapIndex(item.name,isAssocType);if(isAssocType&&id!==null){this.assocTypeIdNameMap.set(id,paths[pathIndex-1].name)}result={id,name:paths[pathIndex-1].name,ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,unboxFlag:item.unboxFlag,}}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(v);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}buildFunctionTypeFingerprint(type,output){let input=type.id;if(input===this.typeNameIdOfArray||input===this.typeNameIdOfSlice){input=this.typeNameIdOfArrayOrSlice}if(input===this.typeNameIdOfTuple||input===this.typeNameIdOfUnit){input=this.typeNameIdOfTupleOrUnit}if(input===this.typeNameIdOfFn||input===this.typeNameIdOfFnMut||input===this.typeNameIdOfFnOnce){input=this.typeNameIdOfHof}const hashint1=k=>{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));output[3]+=1}for(const g of type.generics){this.buildFunctionTypeFingerprint(g,output)}const fb={id:null,ty:0,generics:this.EMPTY_GENERICS_ARRAY,bindings:this.EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;this.buildFunctionTypeFingerprint(fb,output)}}buildIndex(rawSearchIndex){const buildFunctionSearchTypeCallback=(paths,lowercasePaths)=>{const cb=functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs;let output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[this.buildItemSearchType(functionSearchType[INPUTS_DATA],paths,lowercasePaths,),]}else{inputs=this.buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],paths,lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[this.buildItemSearchType(functionSearchType[OUTPUT_DATA],paths,lowercasePaths,),]}else{output=this.buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],paths,lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{const n=noop;return n});let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];this.searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));this.searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;let lastParamNames=[];let normalizedName=crate.indexOf("_")===-1?crate:crate.replace(/_/g,"");const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,paramNames:lastParamNames,id,word:crate,normalizedName,bitIndex:0,implDisambiguator:null,};this.nameTrie.insert(normalizedName,id,this.tailTable);id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!this.searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxDecoder=new VlqHexDecoder(crateCorpus.i,noop=>noop);const implDisambiguator=new Map(crateCorpus.b);const rawPaths=crateCorpus.p;const aliases=crateCorpus.a;const itemParamNames=new Map(crateCorpus.P);const lowercasePaths=[];const paths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(paths,lowercasePaths),);let len=rawPaths.length;let lastPath=itemPaths.get(0);for(let i=0;i2&&elem[2]!==null){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}let exactPath=elem.length>3&&elem[3]!==null?itemPaths.get(elem[3]):path;const unboxFlag=elem.length>4&&!!elem[4];if(path===undefined){path=null}if(exactPath===undefined){exactPath=null}lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath,unboxFlag});paths[i]={ty,name,path,exactPath,unboxFlag}}lastPath="";len=itemTypes.length;let lastName="";let lastWord="";for(let i=0;i=descShard.len&&!this.searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}const name=itemNames[i]===""?lastName:itemNames[i];const word=itemNames[i]===""?lastWord:itemNames[i].toLowerCase();const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const paramNames=itemParamNames.has(i)?itemParamNames.get(i).split(","):lastParamNames;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=this.functionTypeFingerprint.subarray(id*4,(id+1)*4);for(const t of type.inputs){this.buildFunctionTypeFingerprint(t,fp)}for(const t of type.output){this.buildFunctionTypeFingerprint(t,fp)}for(const w of type.where_clause){for(const t of w){this.buildFunctionTypeFingerprint(t,fp)}}}}const itemParentIdx=itemParentIdxDecoder.next();normalizedName=word.indexOf("_")===-1?word:word.replace(/_/g,"");const row={crate,ty:itemTypes.charCodeAt(i)-65,name,path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdx>0?paths[itemParentIdx-1]:undefined,type,paramNames,id,word,normalizedName,bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};this.nameTrie.insert(normalizedName,id,this.tailTable);id+=1;searchIndex.push(row);lastPath=row.path;lastParamNames=row.paramNames;if(!this.searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}lastName=name;lastWord=word}if(aliases){const currentCrateAliases=new Map();this.ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;this.searchState.descShards.set(crate,descShardList)}this.TYPES_POOL=new Map();return searchIndex}static parseQuery(userQuery){function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}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="";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.pos1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}async execQuery(origParsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();const parsedQuery=origParsedQuery;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 genericSymbols=new Map();const convertNameToId=(elem,isAssocType)=>{const loweredName=elem.pathLast.toLowerCase();if(this.typeNameIdMap.has(loweredName)&&(isAssocType||!this.typeNameIdMap.get(loweredName).assocOnly)){elem.id=this.typeNameIdMap.get(loweredName).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of this.typeNameIdMap){const dist=Math.min(editDistance(name,loweredName,maxEditDistance),editDistance(name,elem.normalizedPathLast,maxEditDistance),);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.normalizedPathLast)){elem.id=genericSymbols.get(elem.normalizedPathLast)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.normalizedPathLast,elem.id)}if(elem.typeFilter===-1&&elem.normalizedPathLast.length>=3){const maxPartDistance=Math.floor(elem.normalizedPathLast.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of this.typeNameIdMap.keys()){const dist=editDistance(name,elem.normalizedPathLast,maxPartDistance,);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!this.typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[0,[]]}for(const elem2 of constraints){convertNameToId(elem2,false)}return[this.typeNameIdMap.get(name).id,constraints]}),)};for(const elem of parsedQuery.elems){convertNameToId(elem,false);this.buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint)}for(const elem of parsedQuery.returned){convertNameToId(elem,false);this.buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint)}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}const buildHrefAndPath=item=>{let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=this.rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=this.rootPath+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){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!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::";exactPath=myparent.name}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.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.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=this.rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=this.rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]};function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}const transformResults=(results,typeInfo)=>{const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const res=buildHrefAndPath(this.searchIndex[result.id]);const obj=Object.assign({dist:result.dist,displayPath:pathSplitter(res[0]),},this.searchIndex[result.id]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);if(typeInfo!==null){obj.displayTypeSignature=this.formatDisplayTypeSignature(obj,typeInfo)}obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out};this.formatDisplayTypeSignature=async(obj,typeInfo)=>{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,parsedQuery.elems,objType.where_clause,null,mgensScratch=>{fnOutput=unifyFunctionTypes(objType.output,parsedQuery.returned,objType.where_clause,mgensScratch,mgensOut=>{mgens=mgensOut;return true},0,);return!!fnOutput},0,)}else{const arr=typeInfo==="elems"?objType.inputs:objType.output;const highlighted=unifyFunctionTypes(arr,parsedQuery.elems,objType.where_clause,null,mgensOut=>{mgens=mgensOut;return true},0,);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)}};parsedQuery.elems.forEach(remapQuery);parsedQuery.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=(fnType,result)=>{const hofOutput=fnType.bindings.get(this.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;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;writeFn(fnType,result)}if(hofOutput.length>1){pushText({name:")",highlighted:false},result)}};const writeSpecialPrimitive=(fnType,result)=>{if(fnType.id===this.typeNameIdOfArray||fnType.id===this.typeNameIdOfSlice||fnType.id===this.typeNameIdOfTuple||fnType.id===this.typeNameIdOfUnit){const[ob,sb]=fnType.id===this.typeNameIdOfArray||fnType.id===this.typeNameIdOfSlice?["[","]"]:["(",")"];pushText({name:ob,highlighted:fnType.highlighted},result);onEachBtwn(fnType.generics,nested=>writeFn(nested,result),()=>pushText({name:", ",highlighted:false},result),);pushText({name:sb,highlighted:fnType.highlighted},result);return true}else if(fnType.id===this.typeNameIdOfReference){pushText({name:"&",highlighted:fnType.highlighted},result);let prevHighlighted=false;onEachBtwn(fnType.generics,value=>{prevHighlighted=!!value.highlighted;writeFn(value,result)},value=>pushText({name:" ",highlighted:prevHighlighted&&value.highlighted,},result),);return true}else if(fnType.id===this.typeNameIdOfFn){writeHof(fnType,result);return true}return false};const writeFn=(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){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=[];onEachBtwn(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===TY_PRIMITIVE){if(writeSpecialPrimitive(fnType,result)){return}}else if(fnType.ty===TY_TRAIT&&(fnType.id===this.typeNameIdOfFn||fnType.id===this.typeNameIdOfFnMut||fnType.id===this.typeNameIdOfFnOnce)){writeHof(fnType,result);return}pushText(fnType,result);let hasBindings=false;if(fnType.bindings.size>0){onEachBtwn(fnType.bindings,([key,values])=>{const name=this.assocTypeIdNameMap.get(key);if(values.length===1&&values[0].id<0&&`${fnType.name}::${name}`===fnParamNames[-1-values[0].id]){for(const value of values){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);onEachBtwn(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)}onEachBtwn(fnType.generics,value=>writeFn(value,result),()=>pushText({name:", ",highlighted:false},result),);if(hasBindings||fnType.generics.length>0){pushText({name:">",highlighted:false},result)}}};const type=[];onEachBtwn(fnInputs,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);pushText({name:" -> ",highlighted:false},type);onEachBtwn(fnOutput,fnType=>writeFn(fnType,type),()=>pushText({name:", ",highlighted:false},type),);return{type,mappedNames,whereClause}};const sortResults=async(results,typeInfo,preferredCrate)=>{const userQuery=parsedQuery.userQuery;const normalizedUserQuery=parsedQuery.userQuery.toLowerCase();const isMixedCase=normalizedUserQuery!==userQuery;const result_list=[];const isReturnTypeQuery=parsedQuery.elems.length===0||typeInfo==="returned";for(const result of results.values()){result.item=this.searchIndex[result.id];result.word=this.searchIndex[result.id].word;if(isReturnTypeQuery){const resultItemType=result.item&&result.item.type;if(!resultItemType){continue}const inputs=resultItemType.inputs;const where_clause=resultItemType.where_clause;if(containsTypeFromQuery(inputs,where_clause)){result.path_dist*=100;result.dist*=100}}result_list.push(result)}result_list.sort((aaa,bbb)=>{let a;let b;if(isMixedCase){a=Number(aaa.item.name!==userQuery);b=Number(bbb.item.name!==userQuery);if(a!==b){return a-b}}a=Number(aaa.word!==normalizedUserQuery);b=Number(bbb.word!==normalizedUserQuery);if(a!==b){return a-b}a=Number(aaa.index<0);b=Number(bbb.index<0);if(a!==b){return a-b}if(parsedQuery.hasReturnArrow){a=Number(!isFnLikeTy(aaa.item.ty));b=Number(!isFnLikeTy(bbb.item.ty));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(this.searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex),);b=Number(this.searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex),);if(a!==b){return a-b}a=Number(aaa.item.crate!==preferredCrate);b=Number(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=Number(aaa.word.length);b=Number(bbb.word.length);if(a!==b){return a-b}let aw=aaa.word;let bw=bbb.word;if(aw!==bw){return(aw>bw?+1:-1)}a=Number(this.searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex),);b=Number(this.searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex),);if(a!==b){return a-b}a=Number(aaa.item.ty);b=Number(bbb.item.ty);if(a!==b){return a-b}aw=aaa.item.path;bw=bbb.item.path;if(aw!==bw){return(aw>bw?+1:-1)}return 0});return transformResults(result_list,typeInfo)};function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){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)){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,)||fnType.generics,});return highlighted}}for(const[i,fnType]of fnTypesIn.entries()){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){const highlightedGenerics=unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgens,solutionCb,unboxingDepth+1,);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,);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 false}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)){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,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(unifiedGenerics!==null){unifiedGenericsMgens=simplifiedMgens;return true}}return false},unboxingDepth,);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,):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,)){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,);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,){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)){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,);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,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){unifiedGenerics=unifyGenericTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(unifiedGenerics!==null){return true}}},unboxingDepth,);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,)){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,);if(hl){highlightedRemaining=hl}return hl},unboxingDepth+1,);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,);if(hl){highlightedRemaining=hl}return hl},unboxingDepth+1,);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)=>{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===this.typeNameIdOfArrayOrSlice&&(fnType.id===this.typeNameIdOfSlice||fnType.id===this.typeNameIdOfArray)){}else if(queryElem.id===this.typeNameIdOfTupleOrUnit&&(fnType.id===this.typeNameIdOfTuple||fnType.id===this.typeNameIdOfUnit)){}else if(queryElem.id===this.typeNameIdOfHof&&(fnType.id===this.typeNameIdOfFn||fnType.id===this.typeNameIdOfFnMut||fnType.id===this.typeNameIdOfFnOnce)){}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,);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,){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,)}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,)}return false}function containsTypeFromQuery(list,where_clause){if(!list)return false;for(const ty of parsedQuery.returned){if(ty.id!==null&&ty.id<0){continue}if(checkIfInList(list,ty,where_clause,null,0)){return true}}for(const ty of parsedQuery.elems){if(ty.id!==null&&ty.id<0){continue}if(checkIfInList(list,ty,where_clause,null,0)){return true}}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}const checkType=(row,elem,whereClause,mgens,unboxingDepth)=>{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!==this.typeNameIdOfArrayOrSlice&&elem.id!==this.typeNameIdOfHof&&elem.id!==this.typeNameIdOfTupleOrUnit){return row.id===elem.id&&typePassesFilter(elem.typeFilter,row.ty)}else{return unifyFunctionTypes([row],[elem],whereClause,mgens,()=>true,unboxingDepth,)}};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,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}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 typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}const handleAliases=async(ret,query,filterCrates,currentCrate)=>{const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(this.ALIASES.has(filterCrates)&&this.ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=this.ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(this.searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of this.ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(this.searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{return this.searchIndexEmptyDesc.get(alias.crate).contains(alias.bitIndex)?"":this.searchState.loadDesc(alias)};const[crateDescs,descs]=await Promise.all([Promise.all(crateAliases.map(fetchDesc)),Promise.all(aliases.map(fetchDesc)),]);const pushFunc=alias=>{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach((alias,i)=>{alias.desc=descs[i]});aliases.forEach(pushFunc);crateAliases.forEach((alias,i)=>{alias.desc=crateDescs[i]});crateAliases.forEach(pushFunc)};function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}const rowType=row.type;if(!rowType){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(rowType.inputs,parsedQuery.elems,rowType.where_clause,null,mgens=>{return unifyFunctionTypes(rowType.output,parsedQuery.returned,rowType.where_clause,mgens,checkTypeMgensForConflict,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id.toString(),pos,0,tfpDist,0,Number.MAX_VALUE)}const compareTypeFingerprints=(fullId,queryFingerprint)=>{const fh0=this.functionTypeFingerprint[fullId*4];const fh1=this.functionTypeFingerprint[(fullId*4)+1];const fh2=this.functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return this.functionTypeFingerprint[(fullId*4)+3]};const innerRunQuery=()=>{if(parsedQuery.foundElems===1&&!parsedQuery.hasReturnArrow){const elem=parsedQuery.elems[0];const handleNameSearch=id=>{const row=this.searchIndex[id];if(!typePassesFilter(elem.typeFilter,row.ty)||(filterCrates!==null&&row.crate!==filterCrates)){return}let pathDist=0;if(elem.fullPath.length>1){pathDist=checkPath(elem.pathWithoutLast,row);if(pathDist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,row.id,id,0,0,pathDist)}}else{addIntoResults(results_others,row.id,id,row.normalizedName.indexOf(elem.normalizedPathLast),editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance,),pathDist,maxEditDistance,)}};if(elem.normalizedPathLast!==""){const last=elem.normalizedPathLast;for(const id of this.nameTrie.search(last,this.tailTable)){handleNameSearch(id)}}const length=this.searchIndex.length;for(let i=0,nSearchIndex=length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=this.searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return this.searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":this.searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}}let rawSearchIndex;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",];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}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"&&window.searchIndex.has(elem.value)){return elem.value}return null}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;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.focus()}}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement(array.length===0&&query.error===null?"div":"ul",);if(array.length>0){output.className="search-results "+extraClass;const lis=Promise.all(array.map(async item=>{const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("span");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
    \ -${item.alias} - see \ -
    `}resultName.insertAdjacentHTML("beforeend",`
    ${alias}\ -${item.displayPath}${name}\ -
    `);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);if(item.displayTypeSignature){const{type,mappedNames,whereClause}=await item.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);return link}));lis.then(lis=>{for(const li of lis){output.appendChild(li)}})}else if(query.error===null){const dlroChannel=`https://doc.rust-lang.org/${getVar("channel")}`;output.className="search-failed"+extraClass;output.innerHTML="No results :(
    "+"Try on DuckDuckGo?

    "+"Or try looking in one of these:"}return output}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=DocSearch.parseQuery(searchState.input.value)}currentResults=results.query.userQuery;let currentTab=searchState.currentTab;if((currentTab===0&&results.others.length===0)||(currentTab===1&&results.in_args.length===0)||(currentTab===2&&results.returned.length===0)){if(results.others.length!==0){currentTab=0}else if(results.in_args.length){currentTab=1}else if(results.returned.length){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates="
    in 
    "+"
    "}let output=`
    \ -

    Results

    ${crates}
    `;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

    Query parser error: "${error.join("")}".

    `;output+="
    "+makeTabHeader(0,"In Names",results.others.length)+"
    ";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
    "+makeTabHeader(0,"In Names",results.others.length)+makeTabHeader(1,"In Parameters",results.in_args.length)+makeTabHeader(2,"In Return Types",results.returned.length)+"
    "}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
    "+makeTabHeader(0,signatureTabTitle,results.others.length)+"
    ";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

    "+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

    `}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

    "+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

    `}const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,currentTab===0),addTab(results.in_args,results.query,currentTab===1),addTab(results.returned,results.query,currentTab===2),]);const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others);resultsElem.appendChild(ret_in_args);resultsElem.appendChild(ret_returned);search.innerHTML=output;if(searchState.rustdocToolbar){search.querySelector(".main-heading").appendChild(searchState.rustdocToolbar)}const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=DocSearch.parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="\""+query.userQuery+"\" Search - Rust";updateSearchHistory(buildUrl(query.userQuery,filterCrates));await showResults(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=searchState.input;if(!searchState.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();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{if(window.searchState.input){window.searchState.input.placeholder=window.searchState.origPlaceholder}});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}function initSearch(searchIndx){rawSearchIndex=searchIndx;if(typeof window!=="undefined"){docSearch=new DocSearch(rawSearchIndex,ROOT_PATH,searchState);registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}else if(typeof exports!=="undefined"){docSearch=new DocSearch(rawSearchIndex,ROOT_PATH,searchState);exports.docSearch=docSearch;exports.parseQuery=DocSearch.parseQuery}}if(typeof exports!=="undefined"){exports.initSearch=initSearch}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}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])<{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",ev=>{changeSetting(ev.target.name,ev.target.value)})})}function buildSettingsPageSections(settings){let output="";for(const setting of settings){if(setting==="hr"){output+="
    ";continue}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_names=getVar("themes").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,},];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){document.getElementById(MAIN_ID).appendChild(el)}else{el.setAttribute("tabindex","-1");getSettingsButton().appendChild(el)}return el}const settingsMenu=buildSettingsPage();function displaySettings(){settingsMenu.style.display="";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){if(!getHelpButton().contains(document.activeElement)&&!getHelpButton().contains(event.relatedTarget)&&!getSettingsButton().contains(document.activeElement)&&!getSettingsButton().contains(event.relatedTarget)){window.hidePopoverMenus()}}if(!isSettingsPage){const settingsButton=getSettingsButton();const settingsMenu=document.getElementById("settings");settingsButton.onclick=event=>{if(settingsMenu.contains(event.target)){return}event.preventDefault();const shouldDisplaySettings=settingsMenu.style.display==="none";window.hideAllModals();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()}removeClass(getSettingsButton(),"rotate")},0)})() \ No newline at end of file diff --git a/pr/3367/docs/static.files/settings-c38705f0.js b/pr/3367/docs/static.files/settings-c38705f0.js new file mode 100644 index 0000000000..7e4939e5c4 --- /dev/null +++ b/pr/3367/docs/static.files/settings-c38705f0.js @@ -0,0 +1,17 @@ +"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/pr/3367/docs/static.files/src-script-813739b1.js b/pr/3367/docs/static.files/src-script-813739b1.js new file mode 100644 index 0000000000..bf546257ca --- /dev/null +++ b/pr/3367/docs/static.files/src-script-813739b1.js @@ -0,0 +1 @@ +"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/pr/3367/docs/static.files/src-script-b8d3f215.js b/pr/3367/docs/static.files/src-script-b8d3f215.js deleted file mode 100644 index 08c1160297..0000000000 --- a/pr/3367/docs/static.files/src-script-b8d3f215.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(){const container=document.querySelector("nav.sidebar");const sidebar=document.createElement("div");sidebar.id="src-sidebar";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,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/pr/3367/docs/static.files/storage-3a5871a4.js b/pr/3367/docs/static.files/storage-3a5871a4.js deleted file mode 100644 index 0f15a182c8..0000000000 --- a/pr/3367/docs/static.files/storage-3a5871a4.js +++ /dev/null @@ -1,23 +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 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(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){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")}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 RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement);class RustdocToolbarElement extends HTMLElement{constructor(){super()}connectedCallback(){if(this.firstElementChild){return}const rootPath=getVar("root-path");this.innerHTML=` -
    - Settings -
    -
    - Help -
    - `}}window.customElements.define("rustdoc-toolbar",RustdocToolbarElement) \ No newline at end of file diff --git a/pr/3367/docs/static.files/storage-e2aeef58.js b/pr/3367/docs/static.files/storage-e2aeef58.js new file mode 100644 index 0000000000..fb76ad5e9e --- /dev/null +++ b/pr/3367/docs/static.files/storage-e2aeef58.js @@ -0,0 +1,27 @@ +"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/pr/3367/docs/static.files/stringdex-828709d0.js b/pr/3367/docs/static.files/stringdex-828709d0.js new file mode 100644 index 0000000000..b8268d530a --- /dev/null +++ b/pr/3367/docs/static.files/stringdex-828709d0.js @@ -0,0 +1,2 @@ +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 node of current_layer){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 node of current_layer){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 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(i1){const is_long_compressed=(compression_tag&0x04)!==0;const is_data_compressed=(compression_tag&0x08)!==0;i+=1;if(is_long_compressed){compression_tag|=input[i]<<8;i+=1;compression_tag|=input[i]<<16;i+=1;}let dlen=input[i]&0x7F;no_leaves_flag=input[i]&0x80;i+=1;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 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=(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 for ConnectionType"],["impl Clone for ControlMsg"],["impl Clone for DirectAddrType"],["impl Clone for PathSelection"],["impl Clone for RelayMode"],["impl Clone for Source"],["impl Clone for Probe"],["impl Clone for DhtDiscovery"],["impl Clone for PkarrPublisher"],["impl Clone for PkarrRelayClient"],["impl Clone for PkarrResolver"],["impl Clone for StaticProvider"],["impl Clone for DiscoveryItem"],["impl Clone for ConnectOptions"],["impl Clone for Connection"],["impl Clone for DirectAddr"],["impl Clone for DirectAddrInfo"],["impl Clone for Endpoint"],["impl Clone for RemoteInfo"],["impl Clone for EndpointMetrics"],["impl Clone for Options"],["impl Clone for QuicConfig"],["impl Clone for RelayLatencies"],["impl Clone for Report"],["impl Clone for Router"],["impl<P: Clone + ProtocolHandler + Clone> Clone for AccessLimit<P>"]]],["iroh_base",[["impl Clone for NodeAddr"],["impl Clone for PublicKey"],["impl Clone for RelayUrl"],["impl Clone for SecretKey"],["impl Clone for NodeTicket"]]],["iroh_bench",[["impl Clone for Commands"],["impl Clone for Opt"],["impl Clone for Opt"]]],["iroh_dns_server",[["impl Clone for CertMode"],["impl Clone for RateLimitConfig"],["impl Clone for StoreConfig"],["impl Clone for DnsConfig"],["impl Clone for DnsHandler"],["impl Clone for Handle"],["impl Clone for HttpConfig"],["impl Clone for HttpsConfig"],["impl Clone for AppState"],["impl Clone for ZoneStore"]]],["iroh_relay",[["impl Clone for ReceivedMessage"],["impl Clone for Protocol"],["impl Clone for FrameType"],["impl Clone for Access"],["impl Clone for ClientBuilder"],["impl Clone for DnsResolver"],["impl Clone for TXT"],["impl Clone for TxtLookup"],["impl Clone for NodeData"],["impl Clone for NodeInfo"],["impl Clone for UserData"],["impl Clone for QuicClient"],["impl Clone for ClientRateLimit"],["impl Clone for RelayMetrics"],["impl Clone for RelayMap"],["impl Clone for RelayNode"],["impl Clone for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Clone for DiscoveryEvent"],["impl Clone for ConnectionType"],["impl Clone for ControlMsg"],["impl Clone for DirectAddrType"],["impl Clone for PathSelection"],["impl Clone for RelayMode"],["impl Clone for Source"],["impl Clone for Probe"],["impl Clone for MdnsDiscovery"],["impl Clone for DhtDiscovery"],["impl Clone for PkarrPublisher"],["impl Clone for PkarrRelayClient"],["impl Clone for PkarrResolver"],["impl Clone for StaticProvider"],["impl Clone for ConcurrentDiscovery"],["impl Clone for DiscoveryItem"],["impl Clone for ConnectOptions"],["impl Clone for Connection"],["impl Clone for DirectAddr"],["impl Clone for DirectAddrInfo"],["impl Clone for Endpoint"],["impl Clone for EndpointMetrics"],["impl Clone for Options"],["impl Clone for QuicConfig"],["impl Clone for RelayLatencies"],["impl Clone for Report"],["impl Clone for Router"],["impl<P: Clone + ProtocolHandler + Clone> Clone for AccessLimit<P>"]]],["iroh_base",[["impl Clone for NodeAddr"],["impl Clone for PublicKey"],["impl Clone for RelayUrl"],["impl Clone for SecretKey"],["impl Clone for NodeTicket"]]],["iroh_bench",[["impl Clone for Commands"],["impl Clone for Opt"],["impl Clone for Opt"]]],["iroh_dns_server",[["impl Clone for CertMode"],["impl Clone for RateLimitConfig"],["impl Clone for StoreConfig"],["impl Clone for DnsConfig"],["impl Clone for DnsHandler"],["impl Clone for Handle"],["impl Clone for HttpConfig"],["impl Clone for HttpsConfig"],["impl Clone for AppState"],["impl Clone for ZoneStore"]]],["iroh_relay",[["impl Clone for DnsProtocol"],["impl Clone for FrameType"],["impl Clone for ClientToRelayMsg"],["impl Clone for RelayToClientMsg"],["impl Clone for Access"],["impl Clone for ClientBuilder"],["impl Clone for Builder"],["impl Clone for DnsResolver"],["impl Clone for TxtRecordData"],["impl Clone for NodeData"],["impl Clone for NodeInfo"],["impl Clone for UserData"],["impl Clone for Datagrams"],["impl Clone for QuicClient"],["impl Clone for ClientRateLimit"],["impl Clone for RelayMetrics"],["impl Clone for RelayMap"],["impl Clone for RelayNode"],["impl Clone for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[7704,1333,770,2860,4721]} \ No newline at end of file +//{"start":57,"fragment_lengths":[8320,1333,770,2860,5367]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/cmp/trait.Eq.js b/pr/3367/docs/trait.impl/core/cmp/trait.Eq.js index 803a0cd298..693ea67196 100644 --- a/pr/3367/docs/trait.impl/core/cmp/trait.Eq.js +++ b/pr/3367/docs/trait.impl/core/cmp/trait.Eq.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Eq for ConnectionType"],["impl Eq for ControlMsg"],["impl Eq for DirectAddrType"],["impl Eq for PathSelection"],["impl Eq for RelayMode"],["impl Eq for Source"],["impl Eq for Probe"],["impl Eq for DirectAddr"],["impl Eq for DirectAddrInfo"],["impl Eq for RemoteInfo"],["impl Eq for RelayLatencies"],["impl Eq for Report"]]],["iroh_base",[["impl Eq for NodeAddr"],["impl Eq for PublicKey"],["impl Eq for RelayUrl"],["impl Eq for NodeTicket"]]],["iroh_dns_server",[["impl Eq for CertMode"]]],["iroh_relay",[["impl Eq for Protocol"],["impl Eq for FrameType"],["impl Eq for Access"],["impl Eq for NodeData"],["impl Eq for NodeInfo"],["impl Eq for UserData"],["impl Eq for RelayMap"],["impl Eq for RelayNode"],["impl Eq for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Eq for DiscoveryEvent"],["impl Eq for ConnectionType"],["impl Eq for ControlMsg"],["impl Eq for DirectAddrType"],["impl Eq for PathSelection"],["impl Eq for RelayMode"],["impl Eq for Source"],["impl Eq for Probe"],["impl Eq for DiscoveryItem"],["impl Eq for DirectAddr"],["impl Eq for DirectAddrInfo"],["impl Eq for RelayLatencies"],["impl Eq for Report"]]],["iroh_base",[["impl Eq for NodeAddr"],["impl Eq for PublicKey"],["impl Eq for RelayUrl"],["impl Eq for NodeTicket"]]],["iroh_dns_server",[["impl Eq for CertMode"]]],["iroh_relay",[["impl Eq for DnsProtocol"],["impl Eq for FrameType"],["impl Eq for ClientToRelayMsg"],["impl Eq for RelayToClientMsg"],["impl Eq for Access"],["impl Eq for NodeData"],["impl Eq for NodeInfo"],["impl Eq for UserData"],["impl Eq for Datagrams"],["impl Eq for RelayMap"],["impl Eq for RelayNode"],["impl Eq for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[3115,1020,284,2360]} \ No newline at end of file +//{"start":57,"fragment_lengths":[3405,1020,284,3233]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/cmp/trait.PartialEq.js b/pr/3367/docs/trait.impl/core/cmp/trait.PartialEq.js index aaa6c18e58..02046b3c7c 100644 --- a/pr/3367/docs/trait.impl/core/cmp/trait.PartialEq.js +++ b/pr/3367/docs/trait.impl/core/cmp/trait.PartialEq.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl PartialEq for ConnectionType"],["impl PartialEq for ControlMsg"],["impl PartialEq for DirectAddrType"],["impl PartialEq for PathSelection"],["impl PartialEq for RelayMode"],["impl PartialEq for Source"],["impl PartialEq for Probe"],["impl PartialEq for DirectAddr"],["impl PartialEq for DirectAddrInfo"],["impl PartialEq for RemoteInfo"],["impl PartialEq for RelayLatencies"],["impl PartialEq for Report"]]],["iroh_base",[["impl PartialEq for NodeAddr"],["impl PartialEq for PublicKey"],["impl PartialEq for RelayUrl"],["impl PartialEq for NodeTicket"]]],["iroh_dns_server",[["impl PartialEq for CertMode"]]],["iroh_relay",[["impl PartialEq for Protocol"],["impl PartialEq for FrameType"],["impl PartialEq for Access"],["impl PartialEq for NodeData"],["impl PartialEq for NodeInfo"],["impl PartialEq for UserData"],["impl PartialEq for RelayMap"],["impl PartialEq for RelayNode"],["impl PartialEq for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl PartialEq for DiscoveryEvent"],["impl PartialEq for ConnectionType"],["impl PartialEq for ControlMsg"],["impl PartialEq for DirectAddrType"],["impl PartialEq for PathSelection"],["impl PartialEq for RelayMode"],["impl PartialEq for Source"],["impl PartialEq for Probe"],["impl PartialEq for DiscoveryItem"],["impl PartialEq for DirectAddr"],["impl PartialEq for DirectAddrInfo"],["impl PartialEq for RelayLatencies"],["impl PartialEq for Report"]]],["iroh_base",[["impl PartialEq for NodeAddr"],["impl PartialEq for PublicKey"],["impl PartialEq for RelayUrl"],["impl PartialEq for NodeTicket"]]],["iroh_dns_server",[["impl PartialEq for CertMode"]]],["iroh_relay",[["impl PartialEq for DnsProtocol"],["impl PartialEq for FrameType"],["impl PartialEq for ClientToRelayMsg"],["impl PartialEq for RelayToClientMsg"],["impl PartialEq for Access"],["impl PartialEq for NodeData"],["impl PartialEq for NodeInfo"],["impl PartialEq for UserData"],["impl PartialEq for Datagrams"],["impl PartialEq for RelayMap"],["impl PartialEq for RelayNode"],["impl PartialEq for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[3367,1104,305,2549]} \ No newline at end of file +//{"start":57,"fragment_lengths":[3678,1104,305,3485]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/convert/trait.From.js b/pr/3367/docs/trait.impl/core/convert/trait.From.js index 301235bb2d..a83a0d9d12 100644 --- a/pr/3367/docs/trait.impl/core/convert/trait.From.js +++ b/pr/3367/docs/trait.impl/core/convert/trait.From.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl From<IntoDiscoveryError> for BindError"],["impl From<PkarrError> for DiscoveryError"],["impl From<AddNodeAddrError> for ConnectWithOptsError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for AcceptError"],["impl From<Box<dyn Error + Send + Sync>> for AcceptError"],["impl From<Error> for AcceptError"],["impl From<DiscoveryItem> for NodeInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteInfo> for NodeAddr"],["impl From<RemoteNodeIdError> for AcceptError"],["impl<T> From<T> for ConcurrentDiscovery
    where\n T: IntoIterator<Item = Box<dyn Discovery>>,
    "],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<Url> for RelayUrl"],["impl From<NodeAddr> for NodeTicket"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<DecodeError> for KeyParsingError"],["impl From<DecodeError> for ParseError"],["impl From<Error> for KeyParsingError"],["impl From<Error> for ParseError"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<DialError> for ConnectError"],["impl From<SendError> for SendError"],["impl From<DnsError> for DialError"],["impl From<DecodingError> for ParseError"],["impl From<FrameType> for u8"],["impl From<RecvError> for RecvError"],["impl From<SendError> for ConnectError"],["impl From<SendError> for RecvError"],["impl From<u8> for FrameType"],["impl From<Error> for DialError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<NodeAddr> for NodeData"],["impl From<NodeAddr> for NodeInfo"],["impl From<RelayUrl> for RelayMap"],["impl From<RelayUrl> for RelayNode"],["impl From<NodeInfo> for NodeAddr"],["impl From<RelayNode> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Elapsed> for RecvError"],["impl From<Elapsed> for SendError"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for RecvError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<JoinError> for SupervisorError"],["impl From<RecvError> for Error"],["impl From<ResolveError> for DnsError"],["impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver"],["impl From<SignedPacketBuildError> for EncodingError"],["impl From<TxtLookup> for TxtLookup"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl From<PkarrError> for DiscoveryError"],["impl From<AddNodeAddrError> for ConnectWithOptsError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for AcceptError"],["impl From<Box<dyn Error + Send + Sync>> for AcceptError"],["impl From<Error> for AcceptError"],["impl From<DiscoveryItem> for NodeInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteNodeIdError> for AcceptError"],["impl<T> From<T> for ConcurrentDiscovery
    where\n T: IntoIterator<Item = Box<dyn Discovery>>,
    "],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<Url> for RelayUrl"],["impl From<NodeAddr> for NodeTicket"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<DecodeError> for KeyParsingError"],["impl From<DecodeError> for ParseError"],["impl From<Error> for KeyParsingError"],["impl From<Error> for ParseError"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<DialError> for ConnectError"],["impl From<DnsError> for DialError"],["impl From<DecodingError> for ParseError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Vec<Box<[u8]>>> for TxtRecordData"],["impl From<Error> for DialError"],["impl From<NodeInfo> for NodeAddr"],["impl From<RelayNode> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<NodeAddr> for NodeData"],["impl From<NodeAddr> for NodeInfo"],["impl From<RecvError> for Error"],["impl From<RelayUrl> for RelayMap"],["impl From<RelayUrl> for RelayNode"],["impl From<ResolveError> for DnsError"],["impl From<SignedPacketBuildError> for EncodingError"],["impl<T: AsRef<[u8]>> From<T> for Datagrams"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[7257,4938,13608]} \ No newline at end of file +//{"start":57,"fragment_lengths":[6459,4938,10893]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/convert/trait.TryFrom.js b/pr/3367/docs/trait.impl/core/convert/trait.TryFrom.js index 357981b23c..cfecc1ab82 100644 --- a/pr/3367/docs/trait.impl/core/convert/trait.TryFrom.js +++ b/pr/3367/docs/trait.impl/core/convert/trait.TryFrom.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh_base",[["impl TryFrom<&[u8; 32]> for PublicKey"],["impl TryFrom<&[u8]> for PublicKey"],["impl TryFrom<&[u8]> for SecretKey"]]],["iroh_relay",[["impl TryFrom<String> for UserData"]]]]); + var implementors = Object.fromEntries([["iroh_base",[["impl TryFrom<&[u8; 32]> for PublicKey"],["impl TryFrom<&[u8]> for PublicKey"],["impl TryFrom<&[u8]> for SecretKey"]]],["iroh_relay",[["impl TryFrom<u32> for FrameType"],["impl TryFrom<String> for UserData"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[1254,460]} \ No newline at end of file +//{"start":57,"fragment_lengths":[1254,861]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/default/trait.Default.js b/pr/3367/docs/trait.impl/core/default/trait.Default.js index c4e8a54272..3259c41dda 100644 --- a/pr/3367/docs/trait.impl/core/default/trait.Default.js +++ b/pr/3367/docs/trait.impl/core/default/trait.Default.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Default for ConnectionType"],["impl Default for PathSelection"],["impl Default for Builder"],["impl Default for DhtDiscovery"],["impl Default for StaticProvider"],["impl Default for ConcurrentDiscovery"],["impl Default for Builder"],["impl Default for ConnectOptions"],["impl Default for EndpointMetrics"],["impl Default for Metrics"],["impl Default for Metrics"],["impl Default for Options"],["impl Default for RelayLatencies"],["impl Default for Report"]]],["iroh_bench",[["impl Default for Stats"],["impl Default for StreamStats"],["impl Default for ClientStats"]]],["iroh_dns_server",[["impl Default for &RateLimitConfig"],["impl Default for BootstrapOption"],["impl Default for RateLimitConfig"],["impl Default for Config"],["impl Default for MainlineConfig"],["impl Default for StoreConfig"],["impl Default for Metrics"]]],["iroh_relay",[["impl Default for Protocol"],["impl Default for DnsResolver"],["impl Default for NodeData"],["impl Default for Limits"],["impl Default for Metrics"],["impl Default for RelayMetrics"],["impl Default for PingTracker"],["impl Default for RelayQuicConfig"],["impl<EC: Default + Debug, EA: Default + Debug> Default for ServerConfig<EC, EA>"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Default for ConnectionType"],["impl Default for PathSelection"],["impl Default for MdnsDiscoveryBuilder"],["impl Default for Builder"],["impl Default for DhtDiscovery"],["impl Default for StaticProvider"],["impl Default for ConcurrentDiscovery"],["impl Default for Builder"],["impl Default for ConnectOptions"],["impl Default for EndpointMetrics"],["impl Default for Metrics"],["impl Default for Metrics"],["impl Default for Options"],["impl Default for RelayLatencies"],["impl Default for Report"]]],["iroh_bench",[["impl Default for Stats"],["impl Default for StreamStats"],["impl Default for ClientStats"]]],["iroh_dns_server",[["impl Default for &RateLimitConfig"],["impl Default for BootstrapOption"],["impl Default for RateLimitConfig"],["impl Default for Config"],["impl Default for MainlineConfig"],["impl Default for StoreConfig"],["impl Default for Metrics"]]],["iroh_relay",[["impl Default for DnsProtocol"],["impl Default for Builder"],["impl Default for DnsResolver"],["impl Default for NodeData"],["impl Default for Limits"],["impl Default for Metrics"],["impl Default for RelayMetrics"],["impl Default for PingTracker"],["impl Default for RelayQuicConfig"],["impl<EC: Default + Debug, EA: Default + Debug> Default for ServerConfig<EC, EA>"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[4123,862,2149,3182]} \ No newline at end of file +//{"start":57,"fragment_lengths":[4449,862,2149,3465]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/error/trait.Error.js b/pr/3367/docs/trait.impl/core/error/trait.Error.js index 9122212177..2d35ba8502 100644 --- a/pr/3367/docs/trait.impl/core/error/trait.Error.js +++ b/pr/3367/docs/trait.impl/core/error/trait.Error.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Error for DiscoveryError
    where\n Self: Debug + Display,
    "],["impl Error for IntoDiscoveryError
    where\n Self: Debug + Display,
    "],["impl Error for PkarrError
    where\n Self: Debug + Display,
    "],["impl Error for AddNodeAddrError
    where\n Self: Debug + Display,
    "],["impl Error for AlpnError
    where\n Self: Debug + Display,
    "],["impl Error for BindError
    where\n Self: Debug + Display,
    "],["impl Error for ConnectError
    where\n Self: Debug + Display,
    "],["impl Error for ConnectWithOptsError
    where\n Self: Debug + Display,
    "],["impl Error for GetMappingAddressError
    where\n Self: Debug + Display,
    "],["impl Error for AcceptError
    where\n Self: Debug + Display,
    "],["impl Error for Lagged
    where\n Self: Debug + Display,
    "],["impl Error for RemoteNodeIdError
    where\n Self: Debug + Display,
    "]]],["iroh_base",[["impl Error for KeyParsingError
    where\n Self: Debug + Display,
    "],["impl Error for ParseError
    where\n Self: Debug + Display,
    "],["impl Error for RelayUrlParseError
    where\n Self: Debug + Display,
    "]]],["iroh_relay",[["impl Error for ConnectError
    where\n Self: Debug + Display,
    "],["impl Error for DialError
    where\n Self: Debug + Display,
    "],["impl Error for RecvError
    where\n Self: Debug + Display,
    "],["impl Error for SendError
    where\n Self: Debug + Display,
    "],["impl Error for DnsError
    where\n Self: Debug + Display,
    "],["impl Error for DecodingError
    where\n Self: Debug + Display,
    "],["impl Error for EncodingError
    where\n Self: Debug + Display,
    "],["impl Error for LookupError
    where\n Self: Debug + Display,
    "],["impl Error for ParseError
    where\n Self: Debug + Display,
    "],["impl Error for RecvError
    where\n Self: Debug + Display,
    "],["impl Error for SendError
    where\n Self: Debug + Display,
    "],["impl Error for Error
    where\n Self: Debug + Display,
    "],["impl Error for SpawnError
    where\n Self: Debug + Display,
    "],["impl Error for SupervisorError
    where\n Self: Debug + Display,
    "],["impl Error for MaxLengthExceededError
    where\n Self: Debug + Display,
    "],["impl<E: Debug + Display> Error for StaggeredError<E>
    where\n Self: Debug + Display,
    "]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Error for DiscoveryError
    where\n Self: Debug + Display,
    "],["impl Error for IntoDiscoveryError
    where\n Self: Debug + Display,
    "],["impl Error for PkarrError
    where\n Self: Debug + Display,
    "],["impl Error for AddNodeAddrError
    where\n Self: Debug + Display,
    "],["impl Error for AlpnError
    where\n Self: Debug + Display,
    "],["impl Error for BindError
    where\n Self: Debug + Display,
    "],["impl Error for ConnectError
    where\n Self: Debug + Display,
    "],["impl Error for ConnectWithOptsError
    where\n Self: Debug + Display,
    "],["impl Error for GetMappingAddressError
    where\n Self: Debug + Display,
    "],["impl Error for AcceptError
    where\n Self: Debug + Display,
    "],["impl Error for RemoteNodeIdError
    where\n Self: Debug + Display,
    "]]],["iroh_base",[["impl Error for KeyParsingError
    where\n Self: Debug + Display,
    "],["impl Error for ParseError
    where\n Self: Debug + Display,
    "],["impl Error for RelayUrlParseError
    where\n Self: Debug + Display,
    "]]],["iroh_relay",[["impl Error for ConnectError
    where\n Self: Debug + Display,
    "],["impl Error for DialError
    where\n Self: Debug + Display,
    "],["impl Error for RecvError
    where\n Self: Debug + Display,
    "],["impl Error for SendError
    where\n Self: Debug + Display,
    "],["impl Error for DnsError
    where\n Self: Debug + Display,
    "],["impl Error for LookupError
    where\n Self: Debug + Display,
    "],["impl Error for DecodingError
    where\n Self: Debug + Display,
    "],["impl Error for EncodingError
    where\n Self: Debug + Display,
    "],["impl Error for ParseError
    where\n Self: Debug + Display,
    "],["impl Error for FrameTypeError
    where\n Self: Debug + Display,
    "],["impl Error for Error
    where\n Self: Debug + Display,
    "],["impl Error for Error
    where\n Self: Debug + Display,
    "],["impl Error for Error
    where\n Self: Debug + Display,
    "],["impl Error for SpawnError
    where\n Self: Debug + Display,
    "],["impl Error for SupervisorError
    where\n Self: Debug + Display,
    "],["impl Error for MaxLengthExceededError
    where\n Self: Debug + Display,
    "],["impl<E: Debug + Display> Error for StaggeredError<E>
    where\n Self: Debug + Display,
    "]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[7147,1792,9836]} \ No newline at end of file +//{"start":57,"fragment_lengths":[6570,1792,10424]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/fmt/trait.Debug.js b/pr/3367/docs/trait.impl/core/fmt/trait.Debug.js index de6dcb4bae..2aa00dac1e 100644 --- a/pr/3367/docs/trait.impl/core/fmt/trait.Debug.js +++ b/pr/3367/docs/trait.impl/core/fmt/trait.Debug.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Debug for DiscoveryError"],["impl Debug for IntoDiscoveryError"],["impl Debug for PkarrError"],["impl Debug for AddNodeAddrError"],["impl Debug for AlpnError"],["impl Debug for BindError"],["impl Debug for ConnectError"],["impl Debug for ConnectWithOptsError"],["impl Debug for ConnectionType"],["impl Debug for ControlMsg"],["impl Debug for DirectAddrType"],["impl Debug for GetMappingAddressError"],["impl Debug for PathSelection"],["impl Debug for RelayMode"],["impl Debug for Source"],["impl Debug for Probe"],["impl Debug for AcceptError"],["impl Debug for DnsDiscovery"],["impl Debug for DnsDiscoveryBuilder"],["impl Debug for MdnsDiscovery"],["impl Debug for MdnsDiscoveryBuilder"],["impl Debug for Builder"],["impl Debug for DhtDiscovery"],["impl Debug for PkarrPublisher"],["impl Debug for PkarrPublisherBuilder"],["impl Debug for PkarrRelayClient"],["impl Debug for PkarrResolver"],["impl Debug for PkarrResolverBuilder"],["impl Debug for StaticProvider"],["impl Debug for ConcurrentDiscovery"],["impl Debug for DiscoveryItem"],["impl Debug for Lagged"],["impl Debug for Builder"],["impl Debug for ConnectOptions"],["impl Debug for Connecting"],["impl Debug for Connection"],["impl Debug for DirectAddr"],["impl Debug for DirectAddrInfo"],["impl Debug for Endpoint"],["impl Debug for Incoming"],["impl Debug for IncomingFuture"],["impl Debug for RemoteInfo"],["impl Debug for RemoteNodeIdError"],["impl Debug for ZeroRttAccepted"],["impl Debug for EndpointMetrics"],["impl Debug for Metrics"],["impl Debug for Metrics"],["impl Debug for Options"],["impl Debug for QuicConfig"],["impl Debug for RelayLatencies"],["impl Debug for Report"],["impl Debug for Router"],["impl Debug for RouterBuilder"],["impl Debug for CleanupDropGuard"],["impl Debug for DnsPkarrServer"],["impl<'a> Debug for DiscoveryContext<'a>"],["impl<'a> Debug for Accept<'a>"],["impl<P> Debug for AccessLimit<P>
    where\n P: Debug + ProtocolHandler + Clone,
    "]]],["iroh_base",[["impl Debug for KeyParsingError"],["impl Debug for ParseError"],["impl Debug for NodeAddr"],["impl Debug for PublicKey"],["impl Debug for RelayUrl"],["impl Debug for RelayUrlParseError"],["impl Debug for SecretKey"],["impl Debug for NodeTicket"]]],["iroh_bench",[["impl Debug for Commands"],["impl Debug for Opt"],["impl Debug for Stats"],["impl Debug for StreamStats"],["impl Debug for TransferResult"],["impl Debug for Opt"]]],["iroh_dns_server",[["impl Debug for BootstrapOption"],["impl Debug for CertMode"],["impl Debug for RateLimitConfig"],["impl Debug for Config"],["impl Debug for MainlineConfig"],["impl Debug for MetricsConfig"],["impl Debug for StoreConfig"],["impl Debug for DnsConfig"],["impl Debug for DnsHandler"],["impl Debug for Handle"],["impl Debug for HttpConfig"],["impl Debug for HttpsConfig"],["impl Debug for Metrics"],["impl Debug for ZoneStore"]]],["iroh_relay",[["impl Debug for ConnectError"],["impl Debug for DialError"],["impl Debug for ReceivedMessage"],["impl Debug for RecvError"],["impl Debug for SendError"],["impl Debug for SendMessage"],["impl Debug for DnsError"],["impl Debug for Protocol"],["impl Debug for DecodingError"],["impl Debug for EncodingError"],["impl Debug for LookupError"],["impl Debug for ParseError"],["impl Debug for FrameType"],["impl Debug for RecvError"],["impl Debug for SendError"],["impl Debug for Error"],["impl Debug for Access"],["impl Debug for AccessConfig"],["impl Debug for SpawnError"],["impl Debug for SupervisorError"],["impl Debug for Client"],["impl Debug for ClientBuilder"],["impl Debug for ClientSink"],["impl Debug for ClientStream"],["impl Debug for DnsResolver"],["impl Debug for TXT"],["impl Debug for TxtLookup"],["impl Debug for MaxLengthExceededError"],["impl Debug for NodeData"],["impl Debug for NodeInfo"],["impl Debug for UserData"],["impl Debug for QuicClient"],["impl Debug for ClientRateLimit"],["impl Debug for Limits"],["impl Debug for Metrics"],["impl Debug for QuicConfig"],["impl Debug for RelayMetrics"],["impl Debug for Server"],["impl Debug for PingTracker"],["impl Debug for RelayMap"],["impl Debug for RelayNode"],["impl Debug for RelayQuicConfig"],["impl<E: Debug + Debug + Display> Debug for StaggeredError<E>"],["impl<EC: Debug, EA: Debug> Debug for CertConfig<EC, EA>"],["impl<EC: Debug, EA: Debug> Debug for RelayConfig<EC, EA>
    where\n Option<TlsConfig<EC, EA>>: Debug,
    "],["impl<EC: Debug, EA: Debug> Debug for ServerConfig<EC, EA>
    where\n Option<RelayConfig<EC, EA>>: Debug,
    "],["impl<EC: Debug, EA: Debug> Debug for TlsConfig<EC, EA>
    where\n CertConfig<EC, EA>: Debug,
    "],["impl<Loader: Debug + Send + 'static> Debug for ReloadingResolver<Loader>"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Debug for DiscoveryError"],["impl Debug for IntoDiscoveryError"],["impl Debug for DiscoveryEvent"],["impl Debug for PkarrError"],["impl Debug for AddNodeAddrError"],["impl Debug for AlpnError"],["impl Debug for BindError"],["impl Debug for ConnectError"],["impl Debug for ConnectWithOptsError"],["impl Debug for ConnectionType"],["impl Debug for ControlMsg"],["impl Debug for DirectAddrType"],["impl Debug for GetMappingAddressError"],["impl Debug for PathSelection"],["impl Debug for RelayMode"],["impl Debug for Source"],["impl Debug for Probe"],["impl Debug for AcceptError"],["impl Debug for DnsDiscovery"],["impl Debug for DnsDiscoveryBuilder"],["impl Debug for MdnsDiscovery"],["impl Debug for MdnsDiscoveryBuilder"],["impl Debug for Builder"],["impl Debug for DhtDiscovery"],["impl Debug for PkarrPublisher"],["impl Debug for PkarrPublisherBuilder"],["impl Debug for PkarrRelayClient"],["impl Debug for PkarrResolver"],["impl Debug for PkarrResolverBuilder"],["impl Debug for StaticProvider"],["impl Debug for ConcurrentDiscovery"],["impl Debug for DiscoveryItem"],["impl Debug for Builder"],["impl Debug for ConnectOptions"],["impl Debug for Connecting"],["impl Debug for Connection"],["impl Debug for DirectAddr"],["impl Debug for DirectAddrInfo"],["impl Debug for Endpoint"],["impl Debug for Incoming"],["impl Debug for IncomingFuture"],["impl Debug for RemoteNodeIdError"],["impl Debug for ZeroRttAccepted"],["impl Debug for EndpointMetrics"],["impl Debug for Metrics"],["impl Debug for Metrics"],["impl Debug for Options"],["impl Debug for QuicConfig"],["impl Debug for RelayLatencies"],["impl Debug for Report"],["impl Debug for Router"],["impl Debug for RouterBuilder"],["impl Debug for CleanupDropGuard"],["impl Debug for DnsPkarrServer"],["impl<'a> Debug for DiscoveryContext<'a>"],["impl<'a> Debug for Accept<'a>"],["impl<P> Debug for AccessLimit<P>
    where\n P: Debug + ProtocolHandler + Clone,
    "]]],["iroh_base",[["impl Debug for KeyParsingError"],["impl Debug for ParseError"],["impl Debug for NodeAddr"],["impl Debug for PublicKey"],["impl Debug for RelayUrl"],["impl Debug for RelayUrlParseError"],["impl Debug for SecretKey"],["impl Debug for NodeTicket"]]],["iroh_bench",[["impl Debug for Commands"],["impl Debug for Opt"],["impl Debug for Stats"],["impl Debug for StreamStats"],["impl Debug for TransferResult"],["impl Debug for Opt"]]],["iroh_dns_server",[["impl Debug for BootstrapOption"],["impl Debug for CertMode"],["impl Debug for RateLimitConfig"],["impl Debug for Config"],["impl Debug for MainlineConfig"],["impl Debug for MetricsConfig"],["impl Debug for StoreConfig"],["impl Debug for DnsConfig"],["impl Debug for DnsHandler"],["impl Debug for Handle"],["impl Debug for HttpConfig"],["impl Debug for HttpsConfig"],["impl Debug for Metrics"],["impl Debug for ZoneStore"]]],["iroh_relay",[["impl Debug for ConnectError"],["impl Debug for DialError"],["impl Debug for RecvError"],["impl Debug for SendError"],["impl Debug for DnsError"],["impl Debug for DnsProtocol"],["impl Debug for LookupError"],["impl Debug for DecodingError"],["impl Debug for EncodingError"],["impl Debug for ParseError"],["impl Debug for FrameType"],["impl Debug for FrameTypeError"],["impl Debug for Error"],["impl Debug for ClientToRelayMsg"],["impl Debug for Error"],["impl Debug for RelayToClientMsg"],["impl Debug for Error"],["impl Debug for Access"],["impl Debug for AccessConfig"],["impl Debug for SpawnError"],["impl Debug for SupervisorError"],["impl Debug for Client"],["impl Debug for ClientBuilder"],["impl Debug for ClientSink"],["impl Debug for ClientStream"],["impl Debug for Builder"],["impl Debug for DnsResolver"],["impl Debug for TxtRecordData"],["impl Debug for MaxLengthExceededError"],["impl Debug for NodeData"],["impl Debug for NodeInfo"],["impl Debug for UserData"],["impl Debug for Datagrams"],["impl Debug for QuicClient"],["impl Debug for ClientRateLimit"],["impl Debug for Limits"],["impl Debug for Metrics"],["impl Debug for QuicConfig"],["impl Debug for RelayMetrics"],["impl Debug for Server"],["impl Debug for PingTracker"],["impl Debug for RelayMap"],["impl Debug for RelayNode"],["impl Debug for RelayQuicConfig"],["impl<E: Debug + Debug + Display> Debug for StaggeredError<E>"],["impl<EC: Debug, EA: Debug> Debug for CertConfig<EC, EA>"],["impl<EC: Debug, EA: Debug> Debug for RelayConfig<EC, EA>
    where\n Option<TlsConfig<EC, EA>>: Debug,
    "],["impl<EC: Debug, EA: Debug> Debug for ServerConfig<EC, EA>
    where\n Option<RelayConfig<EC, EA>>: Debug,
    "],["impl<EC: Debug, EA: Debug> Debug for TlsConfig<EC, EA>
    where\n CertConfig<EC, EA>: Debug,
    "],["impl<Loader: Debug + Send + 'static> Debug for ReloadingResolver<Loader>"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[16703,2135,1583,3987,16346]} \ No newline at end of file +//{"start":57,"fragment_lengths":[16463,2135,1583,3987,16980]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/fmt/trait.Display.js b/pr/3367/docs/trait.impl/core/fmt/trait.Display.js index 912cf76956..7c9c67b265 100644 --- a/pr/3367/docs/trait.impl/core/fmt/trait.Display.js +++ b/pr/3367/docs/trait.impl/core/fmt/trait.Display.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Display for DiscoveryError"],["impl Display for IntoDiscoveryError"],["impl Display for PkarrError"],["impl Display for AddNodeAddrError"],["impl Display for AlpnError"],["impl Display for BindError"],["impl Display for ConnectError"],["impl Display for ConnectWithOptsError"],["impl Display for ConnectionType"],["impl Display for ControlMsg"],["impl Display for DirectAddrType"],["impl Display for GetMappingAddressError"],["impl Display for Source"],["impl Display for Probe"],["impl Display for AcceptError"],["impl Display for Lagged"],["impl Display for RemoteNodeIdError"],["impl Display for Report"]]],["iroh_base",[["impl Display for KeyParsingError"],["impl Display for ParseError"],["impl Display for PublicKey"],["impl Display for RelayUrl"],["impl Display for RelayUrlParseError"],["impl Display for NodeTicket"]]],["iroh_dns_server",[["impl Display for CertMode"]]],["iroh_relay",[["impl Display for ConnectError"],["impl Display for DialError"],["impl Display for RecvError"],["impl Display for SendError"],["impl Display for DnsError"],["impl Display for DecodingError"],["impl Display for EncodingError"],["impl Display for LookupError"],["impl Display for ParseError"],["impl Display for FrameType"],["impl Display for RecvError"],["impl Display for SendError"],["impl Display for Error"],["impl Display for SpawnError"],["impl Display for SupervisorError"],["impl Display for TXT"],["impl Display for MaxLengthExceededError"],["impl Display for UserData"],["impl Display for RelayMap"],["impl Display for RelayNode"],["impl<E: Debug + Display> Display for StaggeredError<E>"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Display for DiscoveryError"],["impl Display for IntoDiscoveryError"],["impl Display for PkarrError"],["impl Display for AddNodeAddrError"],["impl Display for AlpnError"],["impl Display for BindError"],["impl Display for ConnectError"],["impl Display for ConnectWithOptsError"],["impl Display for ConnectionType"],["impl Display for ControlMsg"],["impl Display for DirectAddrType"],["impl Display for GetMappingAddressError"],["impl Display for Source"],["impl Display for Probe"],["impl Display for AcceptError"],["impl Display for RemoteNodeIdError"],["impl Display for Report"]]],["iroh_base",[["impl Display for KeyParsingError"],["impl Display for ParseError"],["impl Display for PublicKey"],["impl Display for RelayUrl"],["impl Display for RelayUrlParseError"],["impl Display for NodeTicket"]]],["iroh_dns_server",[["impl Display for CertMode"]]],["iroh_relay",[["impl Display for ConnectError"],["impl Display for DialError"],["impl Display for RecvError"],["impl Display for SendError"],["impl Display for DnsError"],["impl Display for LookupError"],["impl Display for DecodingError"],["impl Display for EncodingError"],["impl Display for ParseError"],["impl Display for FrameTypeError"],["impl Display for Error"],["impl Display for Error"],["impl Display for Error"],["impl Display for SpawnError"],["impl Display for SupervisorError"],["impl Display for TxtRecordData"],["impl Display for MaxLengthExceededError"],["impl Display for UserData"],["impl Display for RelayMap"],["impl Display for RelayNode"],["impl<E: Debug + Display> Display for StaggeredError<E>"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[5016,1660,299,6197]} \ No newline at end of file +//{"start":57,"fragment_lengths":[4751,1660,299,6216]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/hash/trait.Hash.js b/pr/3367/docs/trait.impl/core/hash/trait.Hash.js index b3b79d070a..9a67b12d1c 100644 --- a/pr/3367/docs/trait.impl/core/hash/trait.Hash.js +++ b/pr/3367/docs/trait.impl/core/hash/trait.Hash.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Hash for DirectAddrType"],["impl Hash for Source"],["impl Hash for DirectAddr"]]],["iroh_base",[["impl Hash for PublicKey"],["impl Hash for RelayUrl"]]],["iroh_relay",[["impl Hash for UserData"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Hash for DirectAddrType"],["impl Hash for Source"],["impl Hash for DirectAddr"]]],["iroh_base",[["impl Hash for NodeAddr"],["impl Hash for PublicKey"],["impl Hash for RelayUrl"]]],["iroh_relay",[["impl Hash for UserData"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[802,525,293]} \ No newline at end of file +//{"start":57,"fragment_lengths":[802,778,293]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js b/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js index 8cd585bc9e..bdc1bf6fa3 100644 --- a/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js +++ b/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.FromIterator.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh_relay",[["impl FromIterator<RelayUrl> for RelayMap"],["impl FromIterator<RelayNode> for RelayMap"]]]]); + var implementors = Object.fromEntries([["iroh_relay",[["impl FromIterator<Box<[u8]>> for TxtRecordData"],["impl FromIterator<RelayNode> for RelayMap"],["impl FromIterator<RelayUrl> for RelayMap"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[898]} \ No newline at end of file +//{"start":57,"fragment_lengths":[1356]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.IntoIterator.js b/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.IntoIterator.js deleted file mode 100644 index dcdfb1e369..0000000000 --- a/pr/3367/docs/trait.impl/core/iter/traits/collect/trait.IntoIterator.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["iroh_relay",[["impl IntoIterator for TxtLookup"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[339]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.Copy.js b/pr/3367/docs/trait.impl/core/marker/trait.Copy.js index a18eaffcb1..ed4dacc8e4 100644 --- a/pr/3367/docs/trait.impl/core/marker/trait.Copy.js +++ b/pr/3367/docs/trait.impl/core/marker/trait.Copy.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Copy for ControlMsg"],["impl Copy for DirectAddrType"],["impl Copy for PathSelection"],["impl Copy for Probe"]]],["iroh_base",[["impl Copy for PublicKey"]]],["iroh_bench",[["impl Copy for Commands"],["impl Copy for Opt"],["impl Copy for Opt"]]],["iroh_relay",[["impl Copy for Protocol"],["impl Copy for FrameType"],["impl Copy for Access"],["impl Copy for ClientRateLimit"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Copy for ControlMsg"],["impl Copy for DirectAddrType"],["impl Copy for PathSelection"],["impl Copy for Probe"]]],["iroh_base",[["impl Copy for PublicKey"]]],["iroh_bench",[["impl Copy for Commands"],["impl Copy for Opt"],["impl Copy for Opt"]]],["iroh_relay",[["impl Copy for DnsProtocol"],["impl Copy for FrameType"],["impl Copy for Access"],["impl Copy for ClientRateLimit"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[1084,276,767,1122]} \ No newline at end of file +//{"start":57,"fragment_lengths":[1084,276,767,1131]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.Freeze.js b/pr/3367/docs/trait.impl/core/marker/trait.Freeze.js index 603269c436..d1607ca0a1 100644 --- a/pr/3367/docs/trait.impl/core/marker/trait.Freeze.js +++ b/pr/3367/docs/trait.impl/core/marker/trait.Freeze.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl !Freeze for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !Freeze for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !Freeze for Incoming",1,["iroh::endpoint::Incoming"]],["impl !Freeze for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !Freeze for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl !Freeze for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Freeze for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Freeze for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Freeze for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Freeze for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Freeze for BindError",1,["iroh::endpoint::BindError"]],["impl Freeze for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Freeze for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Freeze for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Freeze for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Freeze for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Freeze for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Freeze for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Freeze for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Freeze for Source",1,["iroh::magicsock::node_map::Source"]],["impl Freeze for Probe",1,["iroh::net_report::probes::Probe"]],["impl Freeze for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Freeze for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Freeze for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Freeze for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Freeze for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Freeze for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Freeze for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Freeze for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Freeze for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Freeze for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Freeze for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Freeze for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Freeze for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Freeze for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Freeze for Lagged",1,["iroh::discovery::Lagged"]],["impl Freeze for Builder",1,["iroh::endpoint::Builder"]],["impl Freeze for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Freeze for Connecting",1,["iroh::endpoint::Connecting"]],["impl Freeze for Connection",1,["iroh::endpoint::Connection"]],["impl Freeze for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Freeze for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Freeze for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Freeze for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Freeze for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Freeze for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Freeze for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Freeze for Options",1,["iroh::net_report::options::imp::Options"]],["impl Freeze for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Freeze for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Freeze for Report",1,["iroh::net_report::report::Report"]],["impl Freeze for Router",1,["iroh::protocol::Router"]],["impl Freeze for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Freeze for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Freeze for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> !Freeze for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<'a> Freeze for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<P> Freeze for AccessLimit<P>
    where\n P: Freeze,
    ",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Freeze for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Freeze for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Freeze for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Freeze for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Freeze for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Freeze for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Freeze for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Freeze for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Freeze for Commands",1,["iroh_bench::Commands"]],["impl Freeze for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Freeze for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Freeze for Opt",1,["iroh_bench::s2n::Opt"]],["impl Freeze for Stats",1,["iroh_bench::stats::Stats"]],["impl Freeze for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Freeze for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Freeze for ClientStats",1,["iroh_bench::ClientStats"]],["impl Freeze for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !Freeze for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Freeze for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Freeze for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Freeze for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Freeze for Config",1,["iroh_dns_server::config::Config"]],["impl Freeze for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Freeze for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Freeze for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Freeze for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Freeze for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Freeze for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Freeze for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Freeze for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Freeze for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Freeze for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Freeze for Server",1,["iroh_dns_server::server::Server"]],["impl Freeze for AppState",1,["iroh_dns_server::state::AppState"]],["impl Freeze for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl !Freeze for ReceivedMessage",1,["iroh_relay::client::conn::ReceivedMessage"]],["impl !Freeze for SendMessage",1,["iroh_relay::client::conn::SendMessage"]],["impl !Freeze for Error",1,["iroh_relay::quic::Error"]],["impl !Freeze for Client",1,["iroh_relay::client::Client"]],["impl !Freeze for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !Freeze for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Freeze for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Freeze for DialError",1,["iroh_relay::client::DialError"]],["impl Freeze for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Freeze for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Freeze for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Freeze for Protocol",1,["iroh_relay::http::Protocol"]],["impl Freeze for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Freeze for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Freeze for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Freeze for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Freeze for FrameType",1,["iroh_relay::protos::relay::FrameType"]],["impl Freeze for RecvError",1,["iroh_relay::protos::relay::RecvError"]],["impl Freeze for SendError",1,["iroh_relay::protos::relay::SendError"]],["impl Freeze for Access",1,["iroh_relay::server::Access"]],["impl Freeze for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Freeze for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Freeze for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Freeze for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Freeze for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Freeze for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Freeze for TXT",1,["iroh_relay::dns::TXT"]],["impl Freeze for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Freeze for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Freeze for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Freeze for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Freeze for UserData",1,["iroh_relay::node_info::UserData"]],["impl Freeze for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Freeze for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Freeze for Limits",1,["iroh_relay::server::Limits"]],["impl Freeze for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Freeze for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Freeze for Server",1,["iroh_relay::server::Server"]],["impl Freeze for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Freeze for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Freeze for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Freeze for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Freeze for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Freeze for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Freeze for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Freeze for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Freeze for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Freeze for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl !Freeze for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !Freeze for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !Freeze for Incoming",1,["iroh::endpoint::Incoming"]],["impl !Freeze for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !Freeze for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl !Freeze for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Freeze for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Freeze for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Freeze for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl Freeze for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Freeze for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Freeze for BindError",1,["iroh::endpoint::BindError"]],["impl Freeze for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Freeze for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Freeze for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Freeze for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Freeze for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Freeze for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Freeze for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Freeze for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Freeze for Source",1,["iroh::magicsock::node_map::Source"]],["impl Freeze for Probe",1,["iroh::net_report::probes::Probe"]],["impl Freeze for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Freeze for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Freeze for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Freeze for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Freeze for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Freeze for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Freeze for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Freeze for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Freeze for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Freeze for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Freeze for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Freeze for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Freeze for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Freeze for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Freeze for Builder",1,["iroh::endpoint::Builder"]],["impl Freeze for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Freeze for Connecting",1,["iroh::endpoint::Connecting"]],["impl Freeze for Connection",1,["iroh::endpoint::Connection"]],["impl Freeze for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Freeze for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Freeze for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Freeze for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Freeze for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Freeze for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Freeze for Options",1,["iroh::net_report::options::imp::Options"]],["impl Freeze for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Freeze for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Freeze for Report",1,["iroh::net_report::report::Report"]],["impl Freeze for Router",1,["iroh::protocol::Router"]],["impl Freeze for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Freeze for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Freeze for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> !Freeze for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<'a> Freeze for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<P> Freeze for AccessLimit<P>
    where\n P: Freeze,
    ",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Freeze for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Freeze for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Freeze for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Freeze for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Freeze for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Freeze for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Freeze for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Freeze for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Freeze for Commands",1,["iroh_bench::Commands"]],["impl Freeze for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Freeze for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Freeze for Opt",1,["iroh_bench::s2n::Opt"]],["impl Freeze for Stats",1,["iroh_bench::stats::Stats"]],["impl Freeze for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Freeze for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Freeze for ClientStats",1,["iroh_bench::ClientStats"]],["impl Freeze for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !Freeze for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Freeze for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Freeze for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Freeze for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Freeze for Config",1,["iroh_dns_server::config::Config"]],["impl Freeze for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Freeze for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Freeze for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Freeze for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Freeze for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Freeze for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Freeze for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Freeze for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Freeze for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Freeze for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Freeze for Server",1,["iroh_dns_server::server::Server"]],["impl Freeze for AppState",1,["iroh_dns_server::state::AppState"]],["impl Freeze for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl !Freeze for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !Freeze for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !Freeze for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl !Freeze for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl !Freeze for Error",1,["iroh_relay::quic::Error"]],["impl !Freeze for Client",1,["iroh_relay::client::Client"]],["impl !Freeze for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !Freeze for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl !Freeze for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Freeze for DialError",1,["iroh_relay::client::DialError"]],["impl Freeze for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Freeze for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Freeze for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Freeze for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl Freeze for LookupError",1,["iroh_relay::dns::LookupError"]],["impl Freeze for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Freeze for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Freeze for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Freeze for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Freeze for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Freeze for Error",1,["iroh_relay::protos::relay::Error"]],["impl Freeze for Access",1,["iroh_relay::server::Access"]],["impl Freeze for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Freeze for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Freeze for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Freeze for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Freeze for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Freeze for Builder",1,["iroh_relay::dns::Builder"]],["impl Freeze for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Freeze for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl Freeze for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Freeze for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Freeze for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Freeze for UserData",1,["iroh_relay::node_info::UserData"]],["impl Freeze for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Freeze for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Freeze for Limits",1,["iroh_relay::server::Limits"]],["impl Freeze for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Freeze for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Freeze for Server",1,["iroh_relay::server::Server"]],["impl Freeze for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Freeze for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Freeze for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Freeze for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Freeze for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Freeze for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Freeze for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Freeze for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Freeze for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Freeze for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[19351,2508,2769,6015,15695]} \ No newline at end of file +//{"start":57,"fragment_lengths":[19060,2508,2769,6015,16451]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.Send.js b/pr/3367/docs/trait.impl/core/marker/trait.Send.js index dc2ab978fd..d74d861412 100644 --- a/pr/3367/docs/trait.impl/core/marker/trait.Send.js +++ b/pr/3367/docs/trait.impl/core/marker/trait.Send.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Send for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Send for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Send for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Send for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Send for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Send for BindError",1,["iroh::endpoint::BindError"]],["impl Send for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Send for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Send for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Send for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Send for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Send for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Send for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Send for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Send for Source",1,["iroh::magicsock::node_map::Source"]],["impl Send for Probe",1,["iroh::net_report::probes::Probe"]],["impl Send for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Send for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Send for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Send for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Send for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Send for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Send for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Send for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Send for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Send for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Send for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Send for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Send for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Send for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Send for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Send for Lagged",1,["iroh::discovery::Lagged"]],["impl Send for Builder",1,["iroh::endpoint::Builder"]],["impl Send for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Send for Connecting",1,["iroh::endpoint::Connecting"]],["impl Send for Connection",1,["iroh::endpoint::Connection"]],["impl Send for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Send for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Send for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Send for Incoming",1,["iroh::endpoint::Incoming"]],["impl Send for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Send for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Send for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Send for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Send for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Send for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Send for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Send for Options",1,["iroh::net_report::options::imp::Options"]],["impl Send for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Send for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Send for Report",1,["iroh::net_report::report::Report"]],["impl Send for Router",1,["iroh::protocol::Router"]],["impl Send for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Send for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Send for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Send for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Send for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Send for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Send for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Send for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Send for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Send for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Send for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Send for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Send for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Send for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Send for Commands",1,["iroh_bench::Commands"]],["impl Send for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Send for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Send for Opt",1,["iroh_bench::s2n::Opt"]],["impl Send for Stats",1,["iroh_bench::stats::Stats"]],["impl Send for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Send for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Send for ClientStats",1,["iroh_bench::ClientStats"]],["impl Send for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Send for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Send for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Send for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Send for Config",1,["iroh_dns_server::config::Config"]],["impl Send for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Send for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Send for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Send for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Send for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Send for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Send for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Send for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Send for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Send for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Send for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Send for Server",1,["iroh_dns_server::server::Server"]],["impl Send for AppState",1,["iroh_dns_server::state::AppState"]],["impl Send for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Send for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Send for DialError",1,["iroh_relay::client::DialError"]],["impl Send for ReceivedMessage",1,["iroh_relay::client::conn::ReceivedMessage"]],["impl Send for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Send for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Send for SendMessage",1,["iroh_relay::client::conn::SendMessage"]],["impl Send for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Send for Protocol",1,["iroh_relay::http::Protocol"]],["impl Send for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Send for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Send for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Send for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Send for FrameType",1,["iroh_relay::protos::relay::FrameType"]],["impl Send for RecvError",1,["iroh_relay::protos::relay::RecvError"]],["impl Send for SendError",1,["iroh_relay::protos::relay::SendError"]],["impl Send for Error",1,["iroh_relay::quic::Error"]],["impl Send for Access",1,["iroh_relay::server::Access"]],["impl Send for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Send for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Send for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Send for Client",1,["iroh_relay::client::Client"]],["impl Send for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Send for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Send for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Send for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Send for TXT",1,["iroh_relay::dns::TXT"]],["impl Send for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Send for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Send for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Send for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Send for UserData",1,["iroh_relay::node_info::UserData"]],["impl Send for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Send for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Send for Limits",1,["iroh_relay::server::Limits"]],["impl Send for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Send for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Send for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Send for Server",1,["iroh_relay::server::Server"]],["impl Send for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Send for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Send for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Send for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Send for StaggeredError<E>
    where\n E: Send,
    ",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Send for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Send for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Send for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Send for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Send for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Send for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Send for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Send for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl Send for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Send for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Send for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Send for BindError",1,["iroh::endpoint::BindError"]],["impl Send for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Send for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Send for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Send for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Send for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Send for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Send for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Send for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Send for Source",1,["iroh::magicsock::node_map::Source"]],["impl Send for Probe",1,["iroh::net_report::probes::Probe"]],["impl Send for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Send for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Send for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Send for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Send for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Send for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Send for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Send for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Send for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Send for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Send for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Send for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Send for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Send for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Send for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Send for Builder",1,["iroh::endpoint::Builder"]],["impl Send for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Send for Connecting",1,["iroh::endpoint::Connecting"]],["impl Send for Connection",1,["iroh::endpoint::Connection"]],["impl Send for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Send for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Send for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Send for Incoming",1,["iroh::endpoint::Incoming"]],["impl Send for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Send for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Send for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Send for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Send for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Send for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Send for Options",1,["iroh::net_report::options::imp::Options"]],["impl Send for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Send for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Send for Report",1,["iroh::net_report::report::Report"]],["impl Send for Router",1,["iroh::protocol::Router"]],["impl Send for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Send for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Send for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Send for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Send for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Send for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Send for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Send for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Send for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Send for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Send for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Send for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Send for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Send for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Send for Commands",1,["iroh_bench::Commands"]],["impl Send for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Send for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Send for Opt",1,["iroh_bench::s2n::Opt"]],["impl Send for Stats",1,["iroh_bench::stats::Stats"]],["impl Send for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Send for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Send for ClientStats",1,["iroh_bench::ClientStats"]],["impl Send for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Send for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Send for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Send for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Send for Config",1,["iroh_dns_server::config::Config"]],["impl Send for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Send for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Send for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Send for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Send for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Send for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Send for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Send for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Send for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Send for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Send for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Send for Server",1,["iroh_dns_server::server::Server"]],["impl Send for AppState",1,["iroh_dns_server::state::AppState"]],["impl Send for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Send for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Send for DialError",1,["iroh_relay::client::DialError"]],["impl Send for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Send for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Send for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Send for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl Send for LookupError",1,["iroh_relay::dns::LookupError"]],["impl Send for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Send for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Send for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Send for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Send for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Send for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Send for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Send for Error",1,["iroh_relay::protos::relay::Error"]],["impl Send for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Send for Error",1,["iroh_relay::quic::Error"]],["impl Send for Access",1,["iroh_relay::server::Access"]],["impl Send for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Send for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Send for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Send for Client",1,["iroh_relay::client::Client"]],["impl Send for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Send for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Send for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Send for Builder",1,["iroh_relay::dns::Builder"]],["impl Send for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Send for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl Send for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Send for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Send for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Send for UserData",1,["iroh_relay::node_info::UserData"]],["impl Send for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl Send for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Send for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Send for Limits",1,["iroh_relay::server::Limits"]],["impl Send for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Send for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Send for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Send for Server",1,["iroh_relay::server::Server"]],["impl Send for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Send for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Send for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Send for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Send for StaggeredError<E>
    where\n E: Send,
    ",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Send for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Send for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Send for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Send for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Send for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[18815,2460,2715,5906,15576]} \ No newline at end of file +//{"start":57,"fragment_lengths":[18530,2460,2715,5906,16317]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.StructuralPartialEq.js b/pr/3367/docs/trait.impl/core/marker/trait.StructuralPartialEq.js index 0475ca9ce2..c17a6f19d1 100644 --- a/pr/3367/docs/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/pr/3367/docs/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl StructuralPartialEq for ConnectionType"],["impl StructuralPartialEq for ControlMsg"],["impl StructuralPartialEq for DirectAddrType"],["impl StructuralPartialEq for PathSelection"],["impl StructuralPartialEq for RelayMode"],["impl StructuralPartialEq for Source"],["impl StructuralPartialEq for Probe"],["impl StructuralPartialEq for DirectAddr"],["impl StructuralPartialEq for DirectAddrInfo"],["impl StructuralPartialEq for RemoteInfo"],["impl StructuralPartialEq for RelayLatencies"],["impl StructuralPartialEq for Report"]]],["iroh_base",[["impl StructuralPartialEq for NodeAddr"],["impl StructuralPartialEq for PublicKey"],["impl StructuralPartialEq for RelayUrl"],["impl StructuralPartialEq for NodeTicket"]]],["iroh_dns_server",[["impl StructuralPartialEq for CertMode"]]],["iroh_relay",[["impl StructuralPartialEq for Protocol"],["impl StructuralPartialEq for FrameType"],["impl StructuralPartialEq for Access"],["impl StructuralPartialEq for NodeData"],["impl StructuralPartialEq for NodeInfo"],["impl StructuralPartialEq for UserData"],["impl StructuralPartialEq for RelayMap"],["impl StructuralPartialEq for RelayNode"],["impl StructuralPartialEq for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl StructuralPartialEq for DiscoveryEvent"],["impl StructuralPartialEq for ConnectionType"],["impl StructuralPartialEq for ControlMsg"],["impl StructuralPartialEq for DirectAddrType"],["impl StructuralPartialEq for PathSelection"],["impl StructuralPartialEq for RelayMode"],["impl StructuralPartialEq for Source"],["impl StructuralPartialEq for Probe"],["impl StructuralPartialEq for DiscoveryItem"],["impl StructuralPartialEq for DirectAddr"],["impl StructuralPartialEq for DirectAddrInfo"],["impl StructuralPartialEq for RelayLatencies"],["impl StructuralPartialEq for Report"]]],["iroh_base",[["impl StructuralPartialEq for NodeAddr"],["impl StructuralPartialEq for PublicKey"],["impl StructuralPartialEq for RelayUrl"],["impl StructuralPartialEq for NodeTicket"]]],["iroh_dns_server",[["impl StructuralPartialEq for CertMode"]]],["iroh_relay",[["impl StructuralPartialEq for DnsProtocol"],["impl StructuralPartialEq for FrameType"],["impl StructuralPartialEq for ClientToRelayMsg"],["impl StructuralPartialEq for RelayToClientMsg"],["impl StructuralPartialEq for Access"],["impl StructuralPartialEq for NodeData"],["impl StructuralPartialEq for NodeInfo"],["impl StructuralPartialEq for UserData"],["impl StructuralPartialEq for Datagrams"],["impl StructuralPartialEq for RelayMap"],["impl StructuralPartialEq for RelayNode"],["impl StructuralPartialEq for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[3799,1248,341,2873]} \ No newline at end of file +//{"start":57,"fragment_lengths":[4146,1248,341,3917]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.Sync.js b/pr/3367/docs/trait.impl/core/marker/trait.Sync.js index d388002bc4..5bccdb4f15 100644 --- a/pr/3367/docs/trait.impl/core/marker/trait.Sync.js +++ b/pr/3367/docs/trait.impl/core/marker/trait.Sync.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Sync for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Sync for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Sync for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Sync for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Sync for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Sync for BindError",1,["iroh::endpoint::BindError"]],["impl Sync for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Sync for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Sync for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Sync for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Sync for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Sync for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Sync for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Sync for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Sync for Source",1,["iroh::magicsock::node_map::Source"]],["impl Sync for Probe",1,["iroh::net_report::probes::Probe"]],["impl Sync for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Sync for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Sync for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Sync for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Sync for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Sync for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Sync for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Sync for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Sync for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Sync for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Sync for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Sync for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Sync for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Sync for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Sync for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Sync for Lagged",1,["iroh::discovery::Lagged"]],["impl Sync for Builder",1,["iroh::endpoint::Builder"]],["impl Sync for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Sync for Connecting",1,["iroh::endpoint::Connecting"]],["impl Sync for Connection",1,["iroh::endpoint::Connection"]],["impl Sync for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Sync for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Sync for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Sync for Incoming",1,["iroh::endpoint::Incoming"]],["impl Sync for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Sync for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Sync for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Sync for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Sync for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Sync for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Sync for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Sync for Options",1,["iroh::net_report::options::imp::Options"]],["impl Sync for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Sync for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Sync for Report",1,["iroh::net_report::report::Report"]],["impl Sync for Router",1,["iroh::protocol::Router"]],["impl Sync for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Sync for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Sync for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Sync for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Sync for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Sync for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Sync for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Sync for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Sync for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Sync for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Sync for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Sync for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Sync for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Sync for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Sync for Commands",1,["iroh_bench::Commands"]],["impl Sync for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Sync for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Sync for Opt",1,["iroh_bench::s2n::Opt"]],["impl Sync for Stats",1,["iroh_bench::stats::Stats"]],["impl Sync for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Sync for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Sync for ClientStats",1,["iroh_bench::ClientStats"]],["impl Sync for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Sync for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Sync for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Sync for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Sync for Config",1,["iroh_dns_server::config::Config"]],["impl Sync for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Sync for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Sync for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Sync for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Sync for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Sync for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Sync for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Sync for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Sync for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Sync for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Sync for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Sync for Server",1,["iroh_dns_server::server::Server"]],["impl Sync for AppState",1,["iroh_dns_server::state::AppState"]],["impl Sync for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Sync for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Sync for DialError",1,["iroh_relay::client::DialError"]],["impl Sync for ReceivedMessage",1,["iroh_relay::client::conn::ReceivedMessage"]],["impl Sync for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Sync for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Sync for SendMessage",1,["iroh_relay::client::conn::SendMessage"]],["impl Sync for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Sync for Protocol",1,["iroh_relay::http::Protocol"]],["impl Sync for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Sync for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Sync for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Sync for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Sync for FrameType",1,["iroh_relay::protos::relay::FrameType"]],["impl Sync for RecvError",1,["iroh_relay::protos::relay::RecvError"]],["impl Sync for SendError",1,["iroh_relay::protos::relay::SendError"]],["impl Sync for Error",1,["iroh_relay::quic::Error"]],["impl Sync for Access",1,["iroh_relay::server::Access"]],["impl Sync for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Sync for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Sync for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Sync for Client",1,["iroh_relay::client::Client"]],["impl Sync for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Sync for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Sync for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Sync for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Sync for TXT",1,["iroh_relay::dns::TXT"]],["impl Sync for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Sync for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Sync for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Sync for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Sync for UserData",1,["iroh_relay::node_info::UserData"]],["impl Sync for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Sync for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Sync for Limits",1,["iroh_relay::server::Limits"]],["impl Sync for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Sync for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Sync for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Sync for Server",1,["iroh_relay::server::Server"]],["impl Sync for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Sync for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Sync for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Sync for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Sync for StaggeredError<E>
    where\n E: Sync,
    ",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !Sync for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !Sync for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !Sync for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !Sync for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Sync for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Sync for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Sync for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Sync for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl Sync for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Sync for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Sync for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Sync for BindError",1,["iroh::endpoint::BindError"]],["impl Sync for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Sync for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Sync for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Sync for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Sync for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Sync for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Sync for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Sync for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Sync for Source",1,["iroh::magicsock::node_map::Source"]],["impl Sync for Probe",1,["iroh::net_report::probes::Probe"]],["impl Sync for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Sync for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Sync for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Sync for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Sync for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Sync for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Sync for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Sync for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Sync for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Sync for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Sync for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Sync for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Sync for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Sync for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Sync for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Sync for Builder",1,["iroh::endpoint::Builder"]],["impl Sync for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Sync for Connecting",1,["iroh::endpoint::Connecting"]],["impl Sync for Connection",1,["iroh::endpoint::Connection"]],["impl Sync for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Sync for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Sync for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Sync for Incoming",1,["iroh::endpoint::Incoming"]],["impl Sync for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Sync for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Sync for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Sync for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Sync for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Sync for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Sync for Options",1,["iroh::net_report::options::imp::Options"]],["impl Sync for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Sync for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Sync for Report",1,["iroh::net_report::report::Report"]],["impl Sync for Router",1,["iroh::protocol::Router"]],["impl Sync for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Sync for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Sync for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Sync for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Sync for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Sync for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Sync for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Sync for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Sync for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Sync for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Sync for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Sync for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Sync for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Sync for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Sync for Commands",1,["iroh_bench::Commands"]],["impl Sync for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Sync for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Sync for Opt",1,["iroh_bench::s2n::Opt"]],["impl Sync for Stats",1,["iroh_bench::stats::Stats"]],["impl Sync for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Sync for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Sync for ClientStats",1,["iroh_bench::ClientStats"]],["impl Sync for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Sync for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Sync for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Sync for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Sync for Config",1,["iroh_dns_server::config::Config"]],["impl Sync for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Sync for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Sync for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Sync for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Sync for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Sync for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Sync for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Sync for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Sync for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Sync for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Sync for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Sync for Server",1,["iroh_dns_server::server::Server"]],["impl Sync for AppState",1,["iroh_dns_server::state::AppState"]],["impl Sync for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Sync for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Sync for DialError",1,["iroh_relay::client::DialError"]],["impl Sync for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Sync for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Sync for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Sync for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl Sync for LookupError",1,["iroh_relay::dns::LookupError"]],["impl Sync for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Sync for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Sync for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Sync for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Sync for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Sync for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Sync for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Sync for Error",1,["iroh_relay::protos::relay::Error"]],["impl Sync for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Sync for Error",1,["iroh_relay::quic::Error"]],["impl Sync for Access",1,["iroh_relay::server::Access"]],["impl Sync for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Sync for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Sync for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Sync for Client",1,["iroh_relay::client::Client"]],["impl Sync for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Sync for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Sync for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Sync for Builder",1,["iroh_relay::dns::Builder"]],["impl Sync for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Sync for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl Sync for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Sync for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Sync for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Sync for UserData",1,["iroh_relay::node_info::UserData"]],["impl Sync for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl Sync for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Sync for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Sync for Limits",1,["iroh_relay::server::Limits"]],["impl Sync for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Sync for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Sync for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Sync for Server",1,["iroh_relay::server::Server"]],["impl Sync for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Sync for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Sync for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Sync for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Sync for StaggeredError<E>
    where\n E: Sync,
    ",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !Sync for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !Sync for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !Sync for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !Sync for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Sync for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[18815,2460,2715,5906,15600]} \ No newline at end of file +//{"start":57,"fragment_lengths":[18530,2460,2715,5906,16341]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.Unpin.js b/pr/3367/docs/trait.impl/core/marker/trait.Unpin.js index fa02dcc82d..8cd2a619f3 100644 --- a/pr/3367/docs/trait.impl/core/marker/trait.Unpin.js +++ b/pr/3367/docs/trait.impl/core/marker/trait.Unpin.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Unpin for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Unpin for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Unpin for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Unpin for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Unpin for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Unpin for BindError",1,["iroh::endpoint::BindError"]],["impl Unpin for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Unpin for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Unpin for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Unpin for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Unpin for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Unpin for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Unpin for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Unpin for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Unpin for Source",1,["iroh::magicsock::node_map::Source"]],["impl Unpin for Probe",1,["iroh::net_report::probes::Probe"]],["impl Unpin for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Unpin for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Unpin for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Unpin for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Unpin for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Unpin for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Unpin for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Unpin for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Unpin for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Unpin for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Unpin for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Unpin for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Unpin for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Unpin for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Unpin for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Unpin for Lagged",1,["iroh::discovery::Lagged"]],["impl Unpin for Builder",1,["iroh::endpoint::Builder"]],["impl Unpin for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Unpin for Connection",1,["iroh::endpoint::Connection"]],["impl Unpin for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Unpin for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Unpin for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Unpin for Incoming",1,["iroh::endpoint::Incoming"]],["impl Unpin for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Unpin for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Unpin for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Unpin for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Unpin for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Unpin for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Unpin for Options",1,["iroh::net_report::options::imp::Options"]],["impl Unpin for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Unpin for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Unpin for Report",1,["iroh::net_report::report::Report"]],["impl Unpin for Router",1,["iroh::protocol::Router"]],["impl Unpin for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Unpin for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Unpin for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Unpin for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'pin> Unpin for Connecting
    where\n PinnedFieldsOf<__Connecting<'pin>>: Unpin,
    "],["impl<'pin> Unpin for IncomingFuture
    where\n PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
    "],["impl<'pin, 'a> Unpin for Accept<'a>
    where\n PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
    "],["impl<P> Unpin for AccessLimit<P>
    where\n P: Unpin,
    ",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Unpin for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Unpin for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Unpin for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Unpin for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Unpin for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Unpin for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Unpin for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Unpin for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Unpin for Commands",1,["iroh_bench::Commands"]],["impl Unpin for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Unpin for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Unpin for Opt",1,["iroh_bench::s2n::Opt"]],["impl Unpin for Stats",1,["iroh_bench::stats::Stats"]],["impl Unpin for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Unpin for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Unpin for ClientStats",1,["iroh_bench::ClientStats"]],["impl Unpin for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Unpin for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Unpin for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Unpin for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Unpin for Config",1,["iroh_dns_server::config::Config"]],["impl Unpin for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Unpin for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Unpin for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Unpin for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Unpin for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Unpin for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Unpin for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Unpin for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Unpin for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Unpin for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Unpin for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Unpin for Server",1,["iroh_dns_server::server::Server"]],["impl Unpin for AppState",1,["iroh_dns_server::state::AppState"]],["impl Unpin for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Unpin for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Unpin for DialError",1,["iroh_relay::client::DialError"]],["impl Unpin for ReceivedMessage",1,["iroh_relay::client::conn::ReceivedMessage"]],["impl Unpin for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Unpin for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Unpin for SendMessage",1,["iroh_relay::client::conn::SendMessage"]],["impl Unpin for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Unpin for Protocol",1,["iroh_relay::http::Protocol"]],["impl Unpin for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Unpin for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Unpin for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Unpin for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Unpin for FrameType",1,["iroh_relay::protos::relay::FrameType"]],["impl Unpin for RecvError",1,["iroh_relay::protos::relay::RecvError"]],["impl Unpin for SendError",1,["iroh_relay::protos::relay::SendError"]],["impl Unpin for Error",1,["iroh_relay::quic::Error"]],["impl Unpin for Access",1,["iroh_relay::server::Access"]],["impl Unpin for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Unpin for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Unpin for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Unpin for Client",1,["iroh_relay::client::Client"]],["impl Unpin for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Unpin for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Unpin for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Unpin for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Unpin for TXT",1,["iroh_relay::dns::TXT"]],["impl Unpin for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Unpin for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Unpin for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Unpin for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Unpin for UserData",1,["iroh_relay::node_info::UserData"]],["impl Unpin for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Unpin for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Unpin for Limits",1,["iroh_relay::server::Limits"]],["impl Unpin for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Unpin for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Unpin for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Unpin for Server",1,["iroh_relay::server::Server"]],["impl Unpin for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Unpin for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Unpin for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Unpin for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Unpin for StaggeredError<E>
    where\n E: Unpin,
    ",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Unpin for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Unpin for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Unpin for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Unpin for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Unpin for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Unpin for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Unpin for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Unpin for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl Unpin for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Unpin for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Unpin for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Unpin for BindError",1,["iroh::endpoint::BindError"]],["impl Unpin for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Unpin for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Unpin for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Unpin for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Unpin for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Unpin for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Unpin for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Unpin for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Unpin for Source",1,["iroh::magicsock::node_map::Source"]],["impl Unpin for Probe",1,["iroh::net_report::probes::Probe"]],["impl Unpin for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Unpin for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Unpin for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Unpin for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Unpin for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Unpin for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Unpin for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Unpin for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Unpin for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Unpin for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Unpin for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Unpin for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Unpin for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Unpin for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Unpin for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Unpin for Builder",1,["iroh::endpoint::Builder"]],["impl Unpin for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Unpin for Connection",1,["iroh::endpoint::Connection"]],["impl Unpin for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Unpin for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Unpin for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Unpin for Incoming",1,["iroh::endpoint::Incoming"]],["impl Unpin for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Unpin for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Unpin for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Unpin for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Unpin for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Unpin for Options",1,["iroh::net_report::options::imp::Options"]],["impl Unpin for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Unpin for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Unpin for Report",1,["iroh::net_report::report::Report"]],["impl Unpin for Router",1,["iroh::protocol::Router"]],["impl Unpin for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Unpin for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Unpin for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Unpin for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'pin> Unpin for Connecting
    where\n PinnedFieldsOf<__Connecting<'pin>>: Unpin,
    "],["impl<'pin> Unpin for IncomingFuture
    where\n PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
    "],["impl<'pin, 'a> Unpin for Accept<'a>
    where\n PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
    "],["impl<P> Unpin for AccessLimit<P>
    where\n P: Unpin,
    ",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Unpin for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Unpin for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Unpin for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Unpin for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Unpin for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Unpin for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Unpin for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Unpin for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Unpin for Commands",1,["iroh_bench::Commands"]],["impl Unpin for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Unpin for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Unpin for Opt",1,["iroh_bench::s2n::Opt"]],["impl Unpin for Stats",1,["iroh_bench::stats::Stats"]],["impl Unpin for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Unpin for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Unpin for ClientStats",1,["iroh_bench::ClientStats"]],["impl Unpin for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Unpin for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Unpin for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Unpin for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Unpin for Config",1,["iroh_dns_server::config::Config"]],["impl Unpin for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Unpin for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Unpin for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Unpin for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Unpin for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Unpin for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Unpin for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Unpin for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Unpin for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Unpin for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Unpin for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Unpin for Server",1,["iroh_dns_server::server::Server"]],["impl Unpin for AppState",1,["iroh_dns_server::state::AppState"]],["impl Unpin for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Unpin for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Unpin for DialError",1,["iroh_relay::client::DialError"]],["impl Unpin for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Unpin for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Unpin for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Unpin for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl Unpin for LookupError",1,["iroh_relay::dns::LookupError"]],["impl Unpin for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Unpin for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Unpin for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Unpin for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Unpin for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Unpin for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Unpin for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Unpin for Error",1,["iroh_relay::protos::relay::Error"]],["impl Unpin for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Unpin for Error",1,["iroh_relay::quic::Error"]],["impl Unpin for Access",1,["iroh_relay::server::Access"]],["impl Unpin for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Unpin for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Unpin for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Unpin for Client",1,["iroh_relay::client::Client"]],["impl Unpin for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Unpin for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Unpin for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Unpin for Builder",1,["iroh_relay::dns::Builder"]],["impl Unpin for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Unpin for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl Unpin for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Unpin for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Unpin for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Unpin for UserData",1,["iroh_relay::node_info::UserData"]],["impl Unpin for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl Unpin for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Unpin for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Unpin for Limits",1,["iroh_relay::server::Limits"]],["impl Unpin for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Unpin for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Unpin for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Unpin for Server",1,["iroh_relay::server::Server"]],["impl Unpin for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Unpin for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Unpin for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Unpin for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Unpin for StaggeredError<E>
    where\n E: Unpin,
    ",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Unpin for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Unpin for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Unpin for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Unpin for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Unpin for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[19771,2484,2742,5960,15723]} \ No newline at end of file +//{"start":57,"fragment_lengths":[19483,2484,2742,5960,16470]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/marker/trait.UnsafeUnpin.js b/pr/3367/docs/trait.impl/core/marker/trait.UnsafeUnpin.js new file mode 100644 index 0000000000..f558987430 --- /dev/null +++ b/pr/3367/docs/trait.impl/core/marker/trait.UnsafeUnpin.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["iroh",[["impl UnsafeUnpin for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl UnsafeUnpin for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl UnsafeUnpin for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl UnsafeUnpin for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl UnsafeUnpin for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl UnsafeUnpin for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl UnsafeUnpin for BindError",1,["iroh::endpoint::BindError"]],["impl UnsafeUnpin for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl UnsafeUnpin for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl UnsafeUnpin for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl UnsafeUnpin for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl UnsafeUnpin for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl UnsafeUnpin for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl UnsafeUnpin for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl UnsafeUnpin for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl UnsafeUnpin for Source",1,["iroh::magicsock::node_map::Source"]],["impl UnsafeUnpin for Probe",1,["iroh::net_report::probes::Probe"]],["impl UnsafeUnpin for AcceptError",1,["iroh::protocol::AcceptError"]],["impl UnsafeUnpin for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl UnsafeUnpin for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl UnsafeUnpin for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl UnsafeUnpin for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl UnsafeUnpin for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl UnsafeUnpin for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl UnsafeUnpin for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl UnsafeUnpin for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl UnsafeUnpin for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl UnsafeUnpin for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl UnsafeUnpin for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl UnsafeUnpin for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl UnsafeUnpin for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl UnsafeUnpin for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl UnsafeUnpin for Builder",1,["iroh::endpoint::Builder"]],["impl UnsafeUnpin for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl UnsafeUnpin for Connecting",1,["iroh::endpoint::Connecting"]],["impl UnsafeUnpin for Connection",1,["iroh::endpoint::Connection"]],["impl UnsafeUnpin for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl UnsafeUnpin for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl UnsafeUnpin for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl UnsafeUnpin for Incoming",1,["iroh::endpoint::Incoming"]],["impl UnsafeUnpin for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl UnsafeUnpin for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl UnsafeUnpin for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl UnsafeUnpin for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl UnsafeUnpin for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl UnsafeUnpin for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl UnsafeUnpin for Options",1,["iroh::net_report::options::imp::Options"]],["impl UnsafeUnpin for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl UnsafeUnpin for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl UnsafeUnpin for Report",1,["iroh::net_report::report::Report"]],["impl UnsafeUnpin for Router",1,["iroh::protocol::Router"]],["impl UnsafeUnpin for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl UnsafeUnpin for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl UnsafeUnpin for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> !UnsafeUnpin for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<'a> UnsafeUnpin for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<P> UnsafeUnpin for AccessLimit<P>
    where\n P: UnsafeUnpin,
    ",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl UnsafeUnpin for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl UnsafeUnpin for ParseError",1,["iroh_base::ticket::ParseError"]],["impl UnsafeUnpin for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl UnsafeUnpin for PublicKey",1,["iroh_base::key::PublicKey"]],["impl UnsafeUnpin for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl UnsafeUnpin for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl UnsafeUnpin for SecretKey",1,["iroh_base::key::SecretKey"]],["impl UnsafeUnpin for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl UnsafeUnpin for Commands",1,["iroh_bench::Commands"]],["impl UnsafeUnpin for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl UnsafeUnpin for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl UnsafeUnpin for Opt",1,["iroh_bench::s2n::Opt"]],["impl UnsafeUnpin for Stats",1,["iroh_bench::stats::Stats"]],["impl UnsafeUnpin for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl UnsafeUnpin for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl UnsafeUnpin for ClientStats",1,["iroh_bench::ClientStats"]],["impl UnsafeUnpin for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl UnsafeUnpin for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl UnsafeUnpin for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl UnsafeUnpin for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl UnsafeUnpin for Config",1,["iroh_dns_server::config::Config"]],["impl UnsafeUnpin for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl UnsafeUnpin for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl UnsafeUnpin for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl UnsafeUnpin for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl UnsafeUnpin for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl UnsafeUnpin for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl UnsafeUnpin for Handle",1,["iroh_dns_server::dns::Handle"]],["impl UnsafeUnpin for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl UnsafeUnpin for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl UnsafeUnpin for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl UnsafeUnpin for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl UnsafeUnpin for Server",1,["iroh_dns_server::server::Server"]],["impl UnsafeUnpin for AppState",1,["iroh_dns_server::state::AppState"]],["impl UnsafeUnpin for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl UnsafeUnpin for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl UnsafeUnpin for DialError",1,["iroh_relay::client::DialError"]],["impl UnsafeUnpin for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl UnsafeUnpin for SendError",1,["iroh_relay::client::conn::SendError"]],["impl UnsafeUnpin for DnsError",1,["iroh_relay::dns::DnsError"]],["impl UnsafeUnpin for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl UnsafeUnpin for LookupError",1,["iroh_relay::dns::LookupError"]],["impl UnsafeUnpin for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl UnsafeUnpin for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl UnsafeUnpin for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl UnsafeUnpin for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl UnsafeUnpin for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl UnsafeUnpin for Error",1,["iroh_relay::protos::handshake::Error"]],["impl UnsafeUnpin for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl UnsafeUnpin for Error",1,["iroh_relay::protos::relay::Error"]],["impl UnsafeUnpin for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl UnsafeUnpin for Error",1,["iroh_relay::quic::Error"]],["impl UnsafeUnpin for Access",1,["iroh_relay::server::Access"]],["impl UnsafeUnpin for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl UnsafeUnpin for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl UnsafeUnpin for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl UnsafeUnpin for Client",1,["iroh_relay::client::Client"]],["impl UnsafeUnpin for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl UnsafeUnpin for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl UnsafeUnpin for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl UnsafeUnpin for Builder",1,["iroh_relay::dns::Builder"]],["impl UnsafeUnpin for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl UnsafeUnpin for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl UnsafeUnpin for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl UnsafeUnpin for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl UnsafeUnpin for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl UnsafeUnpin for UserData",1,["iroh_relay::node_info::UserData"]],["impl UnsafeUnpin for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl UnsafeUnpin for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl UnsafeUnpin for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl UnsafeUnpin for Limits",1,["iroh_relay::server::Limits"]],["impl UnsafeUnpin for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl UnsafeUnpin for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl UnsafeUnpin for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl UnsafeUnpin for Server",1,["iroh_relay::server::Server"]],["impl UnsafeUnpin for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl UnsafeUnpin for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl UnsafeUnpin for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl UnsafeUnpin for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> UnsafeUnpin for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> UnsafeUnpin for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> UnsafeUnpin for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> UnsafeUnpin for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> UnsafeUnpin for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> UnsafeUnpin for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[11630,1484,1617,3710,10042]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/ops/deref/trait.Deref.js b/pr/3367/docs/trait.impl/core/ops/deref/trait.Deref.js index 9aec385353..5f934656e6 100644 --- a/pr/3367/docs/trait.impl/core/ops/deref/trait.Deref.js +++ b/pr/3367/docs/trait.impl/core/ops/deref/trait.Deref.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Deref for DiscoveryItem"]]],["iroh_base",[["impl Deref for RelayUrl"]]],["iroh_relay",[["impl Deref for NodeInfo"],["impl<Loader: Send> Deref for ReloadingResolver<Loader>"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Deref for DiscoveryItem"]]],["iroh_base",[["impl Deref for PublicKey"],["impl Deref for RelayUrl"]]],["iroh_relay",[["impl Deref for NodeInfo"],["impl<Loader: Send> Deref for ReloadingResolver<Loader>"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[303,283,781]} \ No newline at end of file +//{"start":57,"fragment_lengths":[303,553,781]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index 0b3291c858..2cfd6ef3c4 100644 --- a/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl !RefUnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !RefUnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !RefUnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !RefUnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !RefUnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !RefUnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !RefUnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !RefUnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !RefUnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !RefUnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !RefUnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !RefUnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !RefUnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !RefUnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !RefUnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !RefUnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !RefUnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !RefUnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !RefUnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl !RefUnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !RefUnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !RefUnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !RefUnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !RefUnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !RefUnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !RefUnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !RefUnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !RefUnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !RefUnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !RefUnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !RefUnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl RefUnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl RefUnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl RefUnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl RefUnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl RefUnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl RefUnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl RefUnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl RefUnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl RefUnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl RefUnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl RefUnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl RefUnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl RefUnwindSafe for Lagged",1,["iroh::discovery::Lagged"]],["impl RefUnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl RefUnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl RefUnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl RefUnwindSafe for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl RefUnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl RefUnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl RefUnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl RefUnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !RefUnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !RefUnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !RefUnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !RefUnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl RefUnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl RefUnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl RefUnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl RefUnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl RefUnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl RefUnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !RefUnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl RefUnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl RefUnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl RefUnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl RefUnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl RefUnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl RefUnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !RefUnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !RefUnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !RefUnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !RefUnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !RefUnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !RefUnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !RefUnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl RefUnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl RefUnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl RefUnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl RefUnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl RefUnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl RefUnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl RefUnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl RefUnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl RefUnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl RefUnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl RefUnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !RefUnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !RefUnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !RefUnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !RefUnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !RefUnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !RefUnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !RefUnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !RefUnwindSafe for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !RefUnwindSafe for RecvError",1,["iroh_relay::protos::relay::RecvError"]],["impl !RefUnwindSafe for SendError",1,["iroh_relay::protos::relay::SendError"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !RefUnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !RefUnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !RefUnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !RefUnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !RefUnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !RefUnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !RefUnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !RefUnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !RefUnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !RefUnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl RefUnwindSafe for ReceivedMessage",1,["iroh_relay::client::conn::ReceivedMessage"]],["impl RefUnwindSafe for SendMessage",1,["iroh_relay::client::conn::SendMessage"]],["impl RefUnwindSafe for Protocol",1,["iroh_relay::http::Protocol"]],["impl RefUnwindSafe for FrameType",1,["iroh_relay::protos::relay::FrameType"]],["impl RefUnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl RefUnwindSafe for TXT",1,["iroh_relay::dns::TXT"]],["impl RefUnwindSafe for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl RefUnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl RefUnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl RefUnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl RefUnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl RefUnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl RefUnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl RefUnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl RefUnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl RefUnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl RefUnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl RefUnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl RefUnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !RefUnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !RefUnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !RefUnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl !RefUnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !RefUnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !RefUnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !RefUnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !RefUnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !RefUnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !RefUnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !RefUnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !RefUnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !RefUnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !RefUnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !RefUnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !RefUnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !RefUnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !RefUnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !RefUnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !RefUnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !RefUnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !RefUnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !RefUnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !RefUnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !RefUnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !RefUnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !RefUnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !RefUnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !RefUnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !RefUnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !RefUnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !RefUnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !RefUnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl RefUnwindSafe for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl RefUnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl RefUnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl RefUnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl RefUnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl RefUnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl RefUnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl RefUnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl RefUnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl RefUnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl RefUnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl RefUnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl RefUnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl RefUnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl RefUnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl RefUnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl RefUnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl RefUnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl RefUnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl RefUnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl RefUnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !RefUnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !RefUnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !RefUnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !RefUnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl RefUnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl RefUnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl RefUnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl RefUnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl RefUnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl RefUnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !RefUnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl RefUnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl RefUnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl RefUnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl RefUnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl RefUnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl RefUnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !RefUnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !RefUnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !RefUnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !RefUnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !RefUnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !RefUnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !RefUnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl RefUnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl RefUnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl RefUnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl RefUnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl RefUnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl RefUnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl RefUnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl RefUnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl RefUnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl RefUnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl RefUnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !RefUnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !RefUnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !RefUnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !RefUnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !RefUnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !RefUnwindSafe for LookupError",1,["iroh_relay::dns::LookupError"]],["impl !RefUnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !RefUnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !RefUnwindSafe for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::protos::relay::Error"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !RefUnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !RefUnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !RefUnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !RefUnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !RefUnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !RefUnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !RefUnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !RefUnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !RefUnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !RefUnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl RefUnwindSafe for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl RefUnwindSafe for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl RefUnwindSafe for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl RefUnwindSafe for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl RefUnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl RefUnwindSafe for Builder",1,["iroh_relay::dns::Builder"]],["impl RefUnwindSafe for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl RefUnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl RefUnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl RefUnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl RefUnwindSafe for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl RefUnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl RefUnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl RefUnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl RefUnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl RefUnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl RefUnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl RefUnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl RefUnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl RefUnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !RefUnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !RefUnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !RefUnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[21750,2862,3166,6813,17850]} \ No newline at end of file +//{"start":57,"fragment_lengths":[21414,2862,3166,6813,18692]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index 0562f35cd0..d2274700e1 100644 --- a/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/pr/3367/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl !UnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !UnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !UnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !UnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !UnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !UnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !UnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !UnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !UnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !UnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !UnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !UnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !UnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !UnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !UnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !UnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !UnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !UnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !UnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl !UnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !UnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !UnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !UnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !UnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !UnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !UnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !UnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !UnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !UnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !UnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !UnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !UnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl UnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl UnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl UnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl UnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl UnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl UnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl UnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl UnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl UnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl UnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl UnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl UnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl UnwindSafe for Lagged",1,["iroh::discovery::Lagged"]],["impl UnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl UnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl UnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl UnwindSafe for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl UnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl UnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl UnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl UnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl UnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl UnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !UnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !UnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !UnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !UnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !UnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl UnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl UnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl UnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl UnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl UnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl UnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !UnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl UnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl UnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl UnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl UnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl UnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl UnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl UnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl UnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !UnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !UnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !UnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !UnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !UnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !UnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !UnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl UnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl UnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl UnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl UnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl UnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl UnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl UnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl UnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl UnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl UnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl UnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !UnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !UnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !UnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !UnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !UnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !UnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !UnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !UnwindSafe for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl !UnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !UnwindSafe for RecvError",1,["iroh_relay::protos::relay::RecvError"]],["impl !UnwindSafe for SendError",1,["iroh_relay::protos::relay::SendError"]],["impl !UnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !UnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !UnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !UnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !UnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !UnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !UnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !UnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !UnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !UnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !UnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !UnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl UnwindSafe for ReceivedMessage",1,["iroh_relay::client::conn::ReceivedMessage"]],["impl UnwindSafe for SendMessage",1,["iroh_relay::client::conn::SendMessage"]],["impl UnwindSafe for Protocol",1,["iroh_relay::http::Protocol"]],["impl UnwindSafe for FrameType",1,["iroh_relay::protos::relay::FrameType"]],["impl UnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl UnwindSafe for TXT",1,["iroh_relay::dns::TXT"]],["impl UnwindSafe for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl UnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl UnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl UnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl UnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl UnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl UnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl UnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl UnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl UnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl UnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl UnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl UnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !UnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !UnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !UnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !UnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !UnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !UnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl !UnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !UnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !UnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !UnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !UnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !UnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !UnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !UnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !UnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !UnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !UnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !UnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !UnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !UnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !UnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !UnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !UnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !UnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !UnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !UnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !UnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !UnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !UnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !UnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !UnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !UnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !UnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !UnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !UnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !UnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !UnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl UnwindSafe for DiscoveryEvent",1,["iroh::discovery::mdns::DiscoveryEvent"]],["impl UnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl UnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl UnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl UnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl UnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl UnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl UnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl UnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl UnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl UnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl UnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl UnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl UnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl UnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl UnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl UnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl UnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl UnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl UnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl UnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl UnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl UnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !UnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !UnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !UnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !UnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !UnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl UnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl UnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl UnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl UnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl UnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl UnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !UnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl UnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl UnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl UnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl UnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl UnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl UnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl UnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl UnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !UnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !UnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !UnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !UnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !UnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !UnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !UnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl UnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl UnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl UnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl UnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl UnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl UnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl UnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl UnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl UnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl UnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl UnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !UnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !UnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !UnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !UnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !UnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !UnwindSafe for LookupError",1,["iroh_relay::dns::LookupError"]],["impl !UnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !UnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !UnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !UnwindSafe for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl !UnwindSafe for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !UnwindSafe for Error",1,["iroh_relay::protos::relay::Error"]],["impl !UnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !UnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !UnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !UnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !UnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !UnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !UnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !UnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !UnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !UnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !UnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !UnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl UnwindSafe for DnsProtocol",1,["iroh_relay::dns::DnsProtocol"]],["impl UnwindSafe for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl UnwindSafe for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl UnwindSafe for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl UnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl UnwindSafe for Builder",1,["iroh_relay::dns::Builder"]],["impl UnwindSafe for TxtRecordData",1,["iroh_relay::dns::TxtRecordData"]],["impl UnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl UnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl UnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl UnwindSafe for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl UnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl UnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl UnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl UnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl UnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl UnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl UnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl UnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl UnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !UnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !UnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !UnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !UnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !UnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !UnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[21228,2790,3085,6651,17418]} \ No newline at end of file +//{"start":57,"fragment_lengths":[20901,2790,3085,6651,18242]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/futures_sink/trait.Sink.js b/pr/3367/docs/trait.impl/futures_sink/trait.Sink.js index 9cf086ef20..daa1ad4f5c 100644 --- a/pr/3367/docs/trait.impl/futures_sink/trait.Sink.js +++ b/pr/3367/docs/trait.impl/futures_sink/trait.Sink.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh_relay",[["impl Sink<SendMessage> for Client"],["impl Sink<SendMessage> for ClientSink"]]]]); + var implementors = Object.fromEntries([["iroh_relay",[["impl Sink<ClientToRelayMsg> for Client"],["impl Sink<ClientToRelayMsg> for ClientSink"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[580]} \ No newline at end of file +//{"start":57,"fragment_lengths":[636]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/num_enum/trait.FromPrimitive.js b/pr/3367/docs/trait.impl/num_enum/trait.TryFromPrimitive.js similarity index 54% rename from pr/3367/docs/trait.impl/num_enum/trait.FromPrimitive.js rename to pr/3367/docs/trait.impl/num_enum/trait.TryFromPrimitive.js index cd2eeafd46..cf0df3f059 100644 --- a/pr/3367/docs/trait.impl/num_enum/trait.FromPrimitive.js +++ b/pr/3367/docs/trait.impl/num_enum/trait.TryFromPrimitive.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh_relay",[["impl FromPrimitive for FrameType"]]]]); + var implementors = Object.fromEntries([["iroh_relay",[["impl TryFromPrimitive for FrameType"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[180]} \ No newline at end of file +//{"start":57,"fragment_lengths":[185]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/serde/de/trait.Deserialize.js b/pr/3367/docs/trait.impl/serde/de/trait.Deserialize.js deleted file mode 100644 index 67b8707275..0000000000 --- a/pr/3367/docs/trait.impl/serde/de/trait.Deserialize.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["iroh",[["impl<'de> Deserialize<'de> for ConnectionType"],["impl<'de> Deserialize<'de> for ControlMsg"],["impl<'de> Deserialize<'de> for Source"],["impl<'de> Deserialize<'de> for DirectAddrInfo"],["impl<'de> Deserialize<'de> for RemoteInfo"],["impl<'de> Deserialize<'de> for EndpointMetrics"],["impl<'de> Deserialize<'de> for Metrics"],["impl<'de> Deserialize<'de> for Metrics"]]],["iroh_base",[["impl<'de> Deserialize<'de> for NodeAddr"],["impl<'de> Deserialize<'de> for PublicKey"],["impl<'de> Deserialize<'de> for RelayUrl"],["impl<'de> Deserialize<'de> for SecretKey"],["impl<'de> Deserialize<'de> for NodeTicket"]]],["iroh_dns_server",[["impl<'de> Deserialize<'de> for BootstrapOption"],["impl<'de> Deserialize<'de> for CertMode"],["impl<'de> Deserialize<'de> for RateLimitConfig"],["impl<'de> Deserialize<'de> for Config"],["impl<'de> Deserialize<'de> for MainlineConfig"],["impl<'de> Deserialize<'de> for MetricsConfig"],["impl<'de> Deserialize<'de> for StoreConfig"],["impl<'de> Deserialize<'de> for DnsConfig"],["impl<'de> Deserialize<'de> for HttpConfig"],["impl<'de> Deserialize<'de> for HttpsConfig"]]],["iroh_relay",[["impl<'de> Deserialize<'de> for RelayNode"],["impl<'de> Deserialize<'de> for RelayQuicConfig"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[2459,1493,3248,625]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/serde/ser/trait.Serialize.js b/pr/3367/docs/trait.impl/serde/ser/trait.Serialize.js deleted file mode 100644 index 55c554b5b5..0000000000 --- a/pr/3367/docs/trait.impl/serde/ser/trait.Serialize.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - var implementors = Object.fromEntries([["iroh",[["impl Serialize for ConnectionType"],["impl Serialize for ControlMsg"],["impl Serialize for Source"],["impl Serialize for DirectAddrInfo"],["impl Serialize for RemoteInfo"],["impl Serialize for EndpointMetrics"],["impl Serialize for Metrics"],["impl Serialize for Metrics"]]],["iroh_base",[["impl Serialize for NodeAddr"],["impl Serialize for PublicKey"],["impl Serialize for RelayUrl"],["impl Serialize for SecretKey"],["impl Serialize for NodeTicket"]]],["iroh_dns_server",[["impl Serialize for BootstrapOption"],["impl Serialize for CertMode"],["impl Serialize for RateLimitConfig"],["impl Serialize for Config"],["impl Serialize for MainlineConfig"],["impl Serialize for MetricsConfig"],["impl Serialize for StoreConfig"],["impl Serialize for DnsConfig"],["impl Serialize for HttpConfig"],["impl Serialize for HttpsConfig"]]],["iroh_relay",[["impl Serialize for RelayNode"],["impl Serialize for RelayQuicConfig"]]]]); - if (window.register_implementors) { - window.register_implementors(implementors); - } else { - window.pending_implementors = implementors; - } -})() -//{"start":57,"fragment_lengths":[2251,1363,2988,573]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/serde_core/de/trait.Deserialize.js b/pr/3367/docs/trait.impl/serde_core/de/trait.Deserialize.js new file mode 100644 index 0000000000..08defe0d10 --- /dev/null +++ b/pr/3367/docs/trait.impl/serde_core/de/trait.Deserialize.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["iroh",[["impl<'de> Deserialize<'de> for ConnectionType"],["impl<'de> Deserialize<'de> for ControlMsg"],["impl<'de> Deserialize<'de> for Source"],["impl<'de> Deserialize<'de> for DirectAddrInfo"],["impl<'de> Deserialize<'de> for EndpointMetrics"],["impl<'de> Deserialize<'de> for Metrics"],["impl<'de> Deserialize<'de> for Metrics"],["impl<'de> Deserialize<'de> for RelayLatencies"],["impl<'de> Deserialize<'de> for Report"]]],["iroh_base",[["impl<'de> Deserialize<'de> for NodeAddr"],["impl<'de> Deserialize<'de> for PublicKey"],["impl<'de> Deserialize<'de> for RelayUrl"],["impl<'de> Deserialize<'de> for SecretKey"],["impl<'de> Deserialize<'de> for NodeTicket"]]],["iroh_dns_server",[["impl<'de> Deserialize<'de> for BootstrapOption"],["impl<'de> Deserialize<'de> for CertMode"],["impl<'de> Deserialize<'de> for RateLimitConfig"],["impl<'de> Deserialize<'de> for Config"],["impl<'de> Deserialize<'de> for MainlineConfig"],["impl<'de> Deserialize<'de> for MetricsConfig"],["impl<'de> Deserialize<'de> for StoreConfig"],["impl<'de> Deserialize<'de> for DnsConfig"],["impl<'de> Deserialize<'de> for HttpConfig"],["impl<'de> Deserialize<'de> for HttpsConfig"]]],["iroh_relay",[["impl<'de> Deserialize<'de> for RelayNode"],["impl<'de> Deserialize<'de> for RelayQuicConfig"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2907,1568,3398,655]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/serde_core/ser/trait.Serialize.js b/pr/3367/docs/trait.impl/serde_core/ser/trait.Serialize.js new file mode 100644 index 0000000000..c8aacab71c --- /dev/null +++ b/pr/3367/docs/trait.impl/serde_core/ser/trait.Serialize.js @@ -0,0 +1,9 @@ +(function() { + var implementors = Object.fromEntries([["iroh",[["impl Serialize for ConnectionType"],["impl Serialize for ControlMsg"],["impl Serialize for Source"],["impl Serialize for DirectAddrInfo"],["impl Serialize for EndpointMetrics"],["impl Serialize for Metrics"],["impl Serialize for Metrics"],["impl Serialize for RelayLatencies"],["impl Serialize for Report"]]],["iroh_base",[["impl Serialize for NodeAddr"],["impl Serialize for PublicKey"],["impl Serialize for RelayUrl"],["impl Serialize for SecretKey"],["impl Serialize for NodeTicket"]]],["iroh_dns_server",[["impl Serialize for BootstrapOption"],["impl Serialize for CertMode"],["impl Serialize for RateLimitConfig"],["impl Serialize for Config"],["impl Serialize for MainlineConfig"],["impl Serialize for MetricsConfig"],["impl Serialize for StoreConfig"],["impl Serialize for DnsConfig"],["impl Serialize for HttpConfig"],["impl Serialize for HttpsConfig"]]],["iroh_relay",[["impl Serialize for RelayNode"],["impl Serialize for RelayQuicConfig"]]]]); + if (window.register_implementors) { + window.register_implementors(implementors); + } else { + window.pending_implementors = implementors; + } +})() +//{"start":57,"fragment_lengths":[2673,1438,3138,603]} \ No newline at end of file diff --git a/pr/3367/docs/trait.impl/snafu/trait.ErrorCompat.js b/pr/3367/docs/trait.impl/snafu/trait.ErrorCompat.js index eef49ec32c..b8ce584c3b 100644 --- a/pr/3367/docs/trait.impl/snafu/trait.ErrorCompat.js +++ b/pr/3367/docs/trait.impl/snafu/trait.ErrorCompat.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl ErrorCompat for DiscoveryError"],["impl ErrorCompat for IntoDiscoveryError"],["impl ErrorCompat for PkarrError"],["impl ErrorCompat for AddNodeAddrError"],["impl ErrorCompat for AlpnError"],["impl ErrorCompat for BindError"],["impl ErrorCompat for ConnectError"],["impl ErrorCompat for ConnectWithOptsError"],["impl ErrorCompat for GetMappingAddressError"],["impl ErrorCompat for AcceptError"],["impl ErrorCompat for Lagged"],["impl ErrorCompat for RemoteNodeIdError"]]],["iroh_base",[["impl ErrorCompat for KeyParsingError"],["impl ErrorCompat for ParseError"],["impl ErrorCompat for RelayUrlParseError"]]],["iroh_relay",[["impl ErrorCompat for ConnectError"],["impl ErrorCompat for DialError"],["impl ErrorCompat for RecvError"],["impl ErrorCompat for SendError"],["impl ErrorCompat for DnsError"],["impl ErrorCompat for DecodingError"],["impl ErrorCompat for EncodingError"],["impl ErrorCompat for LookupError"],["impl ErrorCompat for ParseError"],["impl ErrorCompat for RecvError"],["impl ErrorCompat for SendError"],["impl ErrorCompat for Error"],["impl ErrorCompat for SpawnError"],["impl ErrorCompat for SupervisorError"],["impl ErrorCompat for MaxLengthExceededError"],["impl<E: Debug + Display> ErrorCompat for StaggeredError<E>"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl ErrorCompat for DiscoveryError"],["impl ErrorCompat for IntoDiscoveryError"],["impl ErrorCompat for PkarrError"],["impl ErrorCompat for AddNodeAddrError"],["impl ErrorCompat for AlpnError"],["impl ErrorCompat for BindError"],["impl ErrorCompat for ConnectError"],["impl ErrorCompat for ConnectWithOptsError"],["impl ErrorCompat for GetMappingAddressError"],["impl ErrorCompat for AcceptError"],["impl ErrorCompat for RemoteNodeIdError"]]],["iroh_base",[["impl ErrorCompat for KeyParsingError"],["impl ErrorCompat for ParseError"],["impl ErrorCompat for RelayUrlParseError"]]],["iroh_relay",[["impl ErrorCompat for ConnectError"],["impl ErrorCompat for DialError"],["impl ErrorCompat for RecvError"],["impl ErrorCompat for SendError"],["impl ErrorCompat for DnsError"],["impl ErrorCompat for LookupError"],["impl ErrorCompat for DecodingError"],["impl ErrorCompat for EncodingError"],["impl ErrorCompat for ParseError"],["impl ErrorCompat for FrameTypeError"],["impl ErrorCompat for Error"],["impl ErrorCompat for Error"],["impl ErrorCompat for Error"],["impl ErrorCompat for SpawnError"],["impl ErrorCompat for SupervisorError"],["impl ErrorCompat for MaxLengthExceededError"],["impl<E: Debug + Display> ErrorCompat for StaggeredError<E>"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[1903,481,2844]} \ No newline at end of file +//{"start":57,"fragment_lengths":[1763,481,2995]} \ No newline at end of file diff --git a/pr/3367/docs/type.impl/alloc/boxed/struct.Box.js b/pr/3367/docs/type.impl/alloc/boxed/struct.Box.js new file mode 100644 index 0000000000..b2f6b01adf --- /dev/null +++ b/pr/3367/docs/type.impl/alloc/boxed/struct.Box.js @@ -0,0 +1,9 @@ +(function() { + var type_impls = Object.fromEntries([["iroh_relay",[["
    §

    impl<T> AsBacktrace for Box<T>
    where\n T: AsBacktrace,

    §

    fn as_backtrace(&self) -> Option<&Backtrace>

    Retrieve the optional backtrace
    ","AsBacktrace","iroh_relay::dns::BoxIter"],["
    1.64.0 · Source§

    impl<T> AsFd for Box<T>
    where\n T: AsFd + ?Sized,

    Source§

    fn as_fd(&self) -> BorrowedFd<'_>

    Borrows the file descriptor. Read more
    ","AsFd","iroh_relay::dns::BoxIter"],["
    1.5.0 · Source§

    impl<T, A> AsMut<T> for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn as_mut(&mut self) -> &mut T

    Converts this type into a mutable reference of the (usually inferred) input type.
    ","AsMut","iroh_relay::dns::BoxIter"],["
    1.63.0 · Source§

    impl<T> AsRawFd for Box<T>
    where\n T: AsRawFd,

    Source§

    fn as_raw_fd(&self) -> i32

    Extracts the raw file descriptor. Read more
    ","AsRawFd","iroh_relay::dns::BoxIter"],["
    1.5.0 · Source§

    impl<T, A> AsRef<T> for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn as_ref(&self) -> &T

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncBufRead for Box<T>
    where\n T: AsyncBufRead + Unpin + ?Sized,

    §

    fn poll_fill_buf(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

    Attempt to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
    §

    fn consume(self: Pin<&mut Box<T>>, amt: usize)

    Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
    ","AsyncBufRead","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncBufRead for Box<T>
    where\n T: AsyncBufRead + Unpin + ?Sized,

    §

    fn poll_fill_buf(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<&[u8], Error>>

    Attempts to return the contents of the internal buffer, filling it with more data\nfrom the inner reader if it is empty. Read more
    §

    fn consume(self: Pin<&mut Box<T>>, amt: usize)

    Tells this buffer that amt bytes have been consumed from the buffer,\nso they should no longer be returned in calls to poll_read. Read more
    ","AsyncBufRead","iroh_relay::dns::BoxIter"],["
    1.85.0 · Source§

    impl<Args, F, A> AsyncFn<Args> for Box<F, A>
    where\n Args: Tuple,\n F: AsyncFn<Args> + ?Sized,\n A: Allocator,

    Source§

    extern "rust-call" fn async_call(\n &self,\n args: Args,\n) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>

    🔬This is a nightly-only experimental API. (async_fn_traits)
    Call the AsyncFn, returning a future which may borrow from the called closure.
    ","AsyncFn","iroh_relay::dns::BoxIter"],["
    1.85.0 · Source§

    impl<Args, F, A> AsyncFnMut<Args> for Box<F, A>
    where\n Args: Tuple,\n F: AsyncFnMut<Args> + ?Sized,\n A: Allocator,

    Source§

    type CallRefFuture<'a> = <F as AsyncFnMut<Args>>::CallRefFuture<'a>\nwhere\n Box<F, A>: 'a

    🔬This is a nightly-only experimental API. (async_fn_traits)
    Source§

    extern "rust-call" fn async_call_mut(\n &mut self,\n args: Args,\n) -> <Box<F, A> as AsyncFnMut<Args>>::CallRefFuture<'_>

    🔬This is a nightly-only experimental API. (async_fn_traits)
    Call the AsyncFnMut, returning a future which may borrow from the called closure.
    ","AsyncFnMut","iroh_relay::dns::BoxIter"],["
    1.85.0 · Source§

    impl<Args, F, A> AsyncFnOnce<Args> for Box<F, A>
    where\n Args: Tuple,\n F: AsyncFnOnce<Args> + ?Sized,\n A: Allocator,

    Source§

    type Output = <F as AsyncFnOnce<Args>>::Output

    🔬This is a nightly-only experimental API. (async_fn_traits)
    Output type of the called closure’s future.
    Source§

    type CallOnceFuture = <F as AsyncFnOnce<Args>>::CallOnceFuture

    🔬This is a nightly-only experimental API. (async_fn_traits)
    Future returned by AsyncFnOnce::async_call_once.
    Source§

    extern "rust-call" fn async_call_once(\n self,\n args: Args,\n) -> <Box<F, A> as AsyncFnOnce<Args>>::CallOnceFuture

    🔬This is a nightly-only experimental API. (async_fn_traits)
    Call the AsyncFnOnce, returning a future which may move out of the called closure.
    ","AsyncFnOnce","iroh_relay::dns::BoxIter"],["
    Source§

    impl<S> AsyncIterator for Box<S>
    where\n S: AsyncIterator + Unpin + ?Sized,

    Source§

    type Item = <S as AsyncIterator>::Item

    🔬This is a nightly-only experimental API. (async_iterator)
    The type of items yielded by the async iterator.
    Source§

    fn poll_next(\n self: Pin<&mut Box<S>>,\n cx: &mut Context<'_>,\n) -> Poll<Option<<Box<S> as AsyncIterator>::Item>>

    🔬This is a nightly-only experimental API. (async_iterator)
    Attempts to pull out the next value of this async iterator, registering the\ncurrent task for wakeup if the value is not yet available, and returning\nNone if the async iterator is exhausted. Read more
    Source§

    fn size_hint(&self) -> (usize, Option<usize>)

    🔬This is a nightly-only experimental API. (async_iterator)
    Returns the bounds on the remaining length of the async iterator. Read more
    ","AsyncIterator","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncRead for Box<T>
    where\n T: AsyncRead + Unpin + ?Sized,

    §

    fn poll_read(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n buf: &mut ReadBuf<'_>,\n) -> Poll<Result<(), Error>>

    Attempts to read from the AsyncRead into buf. Read more
    ","AsyncRead","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncRead for Box<T>
    where\n T: AsyncRead + Unpin + ?Sized,

    §

    fn poll_read(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n buf: &mut [u8],\n) -> Poll<Result<usize, Error>>

    Attempt to read from the AsyncRead into buf. Read more
    §

    fn poll_read_vectored(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n bufs: &mut [IoSliceMut<'_>],\n) -> Poll<Result<usize, Error>>

    Attempt to read from the AsyncRead into bufs using vectored\nIO operations. Read more
    ","AsyncRead","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncSeek for Box<T>
    where\n T: AsyncSeek + Unpin + ?Sized,

    §

    fn poll_seek(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n pos: SeekFrom,\n) -> Poll<Result<u64, Error>>

    Attempt to seek to an offset, in bytes, in a stream. Read more
    ","AsyncSeek","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncSeek for Box<T>
    where\n T: AsyncSeek + Unpin + ?Sized,

    §

    fn start_seek(self: Pin<&mut Box<T>>, pos: SeekFrom) -> Result<(), Error>

    Attempts to seek to an offset, in bytes, in a stream. Read more
    §

    fn poll_complete(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<u64, Error>>

    Waits for a seek operation to complete. Read more
    ","AsyncSeek","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncWrite for Box<T>
    where\n T: AsyncWrite + Unpin + ?Sized,

    §

    fn poll_write(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n buf: &[u8],\n) -> Poll<Result<usize, Error>>

    Attempt to write bytes from buf into the object. Read more
    §

    fn poll_write_vectored(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n bufs: &[IoSlice<'_>],\n) -> Poll<Result<usize, Error>>

    Attempt to write bytes from bufs into the object using vectored\nIO operations. Read more
    §

    fn poll_flush(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), Error>>

    Attempt to flush the object, ensuring that any buffered data reach\ntheir destination. Read more
    §

    fn poll_close(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), Error>>

    Attempt to close the object. Read more
    ","AsyncWrite","iroh_relay::dns::BoxIter"],["
    §

    impl<T> AsyncWrite for Box<T>
    where\n T: AsyncWrite + Unpin + ?Sized,

    §

    fn poll_write(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n buf: &[u8],\n) -> Poll<Result<usize, Error>>

    Attempt to write bytes from buf into the object. Read more
    §

    fn poll_write_vectored(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n bufs: &[IoSlice<'_>],\n) -> Poll<Result<usize, Error>>

    Like poll_write, except that it writes from a slice of buffers. Read more
    §

    fn is_write_vectored(&self) -> bool

    Determines if this writer has an efficient poll_write_vectored\nimplementation. Read more
    §

    fn poll_flush(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), Error>>

    Attempts to flush the object, ensuring that any buffered data reach\ntheir destination. Read more
    §

    fn poll_shutdown(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), Error>>

    Initiates or attempts to shut down this writer, returning success when\nthe I/O connection has completely shut down. Read more
    ","AsyncWrite","iroh_relay::dns::BoxIter"],["
    §

    impl<T> Body for Box<T>
    where\n T: Body + Unpin + ?Sized,

    §

    type Data = <T as Body>::Data

    Values yielded by the Body.
    §

    type Error = <T as Body>::Error

    The error type this Body might generate.
    §

    fn poll_frame(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Option<Result<Frame<<Box<T> as Body>::Data>, <Box<T> as Body>::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
    ","Body","iroh_relay::dns::BoxIter"],["
    1.1.0 · Source§

    impl<T, A> Borrow<T> for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn borrow(&self) -> &T

    Immutably borrows from an owned value. Read more
    ","Borrow","iroh_relay::dns::BoxIter"],["
    1.1.0 · Source§

    impl<T, A> BorrowMut<T> for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn borrow_mut(&mut self) -> &mut T

    Mutably borrows from an owned value. Read more
    ","BorrowMut","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T> Box<T>
    where\n T: ?Sized,

    1.4.0 · Source

    pub unsafe fn from_raw(raw: *mut T) -> Box<T>

    Available on crate feature server only.

    Constructs a box from a raw pointer.

    \n

    After calling this function, the raw pointer is owned by the\nresulting Box. Specifically, the Box destructor will call\nthe destructor of T and free the allocated memory. For this\nto be safe, the memory must have been allocated in accordance\nwith the memory layout used by Box .

    \n
    §Safety
    \n

    This function is unsafe because improper use may lead to\nmemory problems. For example, a double-free may occur if the\nfunction is called twice on the same raw pointer.

    \n

    The raw pointer must point to a block of memory allocated by the global allocator.

    \n

    The safety conditions are described in the memory layout section.

    \n
    §Examples
    \n

    Recreate a Box which was previously converted to a raw pointer\nusing Box::into_raw:

    \n\n
    let x = Box::new(5);\nlet ptr = Box::into_raw(x);\nlet x = unsafe { Box::from_raw(ptr) };
    \n

    Manually create a Box from scratch by using the global allocator:

    \n\n
    use std::alloc::{alloc, Layout};\n\nunsafe {\n    let ptr = alloc(Layout::new::<i32>()) as *mut i32;\n    // In general .write is required to avoid attempting to destruct\n    // the (uninitialized) previous contents of `ptr`, though for this\n    // simple example `*ptr = 5` would have worked as well.\n    ptr.write(5);\n    let x = Box::from_raw(ptr);\n}
    Source

    pub unsafe fn from_non_null(ptr: NonNull<T>) -> Box<T>

    🔬This is a nightly-only experimental API. (box_vec_non_null)
    Available on crate feature server only.

    Constructs a box from a NonNull pointer.

    \n

    After calling this function, the NonNull pointer is owned by\nthe resulting Box. Specifically, the Box destructor will call\nthe destructor of T and free the allocated memory. For this\nto be safe, the memory must have been allocated in accordance\nwith the memory layout used by Box .

    \n
    §Safety
    \n

    This function is unsafe because improper use may lead to\nmemory problems. For example, a double-free may occur if the\nfunction is called twice on the same NonNull pointer.

    \n

    The non-null pointer must point to a block of memory allocated by the global allocator.

    \n

    The safety conditions are described in the memory layout section.

    \n
    §Examples
    \n

    Recreate a Box which was previously converted to a NonNull\npointer using Box::into_non_null:

    \n\n
    #![feature(box_vec_non_null)]\n\nlet x = Box::new(5);\nlet non_null = Box::into_non_null(x);\nlet x = unsafe { Box::from_non_null(non_null) };
    \n

    Manually create a Box from scratch by using the global allocator:

    \n\n
    #![feature(box_vec_non_null)]\n\nuse std::alloc::{alloc, Layout};\nuse std::ptr::NonNull;\n\nunsafe {\n    let non_null = NonNull::new(alloc(Layout::new::<i32>()).cast::<i32>())\n        .expect(\"allocation failed\");\n    // In general .write is required to avoid attempting to destruct\n    // the (uninitialized) previous contents of `non_null`.\n    non_null.write(5);\n    let x = Box::from_non_null(non_null);\n}
    1.4.0 · Source

    pub fn into_raw(b: Box<T>) -> *mut T

    Available on crate feature server only.

    Consumes the Box, returning a wrapped raw pointer.

    \n

    The pointer will be properly aligned and non-null.

    \n

    After calling this function, the caller is responsible for the\nmemory previously managed by the Box. In particular, the\ncaller should properly destroy T and release the memory, taking\ninto account the memory layout used by Box. The easiest way to\ndo this is to convert the raw pointer back into a Box with the\nBox::from_raw function, allowing the Box destructor to perform\nthe cleanup.

    \n

    Note: this is an associated function, which means that you have\nto call it as Box::into_raw(b) instead of b.into_raw(). This\nis so that there is no conflict with a method on the inner type.

    \n
    §Examples
    \n

    Converting the raw pointer back into a Box with Box::from_raw\nfor automatic cleanup:

    \n\n
    let x = Box::new(String::from(\"Hello\"));\nlet ptr = Box::into_raw(x);\nlet x = unsafe { Box::from_raw(ptr) };
    \n

    Manual cleanup by explicitly running the destructor and deallocating\nthe memory:

    \n\n
    use std::alloc::{dealloc, Layout};\nuse std::ptr;\n\nlet x = Box::new(String::from(\"Hello\"));\nlet ptr = Box::into_raw(x);\nunsafe {\n    ptr::drop_in_place(ptr);\n    dealloc(ptr as *mut u8, Layout::new::<String>());\n}
    \n

    Note: This is equivalent to the following:

    \n\n
    let x = Box::new(String::from(\"Hello\"));\nlet ptr = Box::into_raw(x);\nunsafe {\n    drop(Box::from_raw(ptr));\n}
    Source

    pub fn into_non_null(b: Box<T>) -> NonNull<T>

    🔬This is a nightly-only experimental API. (box_vec_non_null)
    Available on crate feature server only.

    Consumes the Box, returning a wrapped NonNull pointer.

    \n

    The pointer will be properly aligned.

    \n

    After calling this function, the caller is responsible for the\nmemory previously managed by the Box. In particular, the\ncaller should properly destroy T and release the memory, taking\ninto account the memory layout used by Box. The easiest way to\ndo this is to convert the NonNull pointer back into a Box with the\nBox::from_non_null function, allowing the Box destructor to\nperform the cleanup.

    \n

    Note: this is an associated function, which means that you have\nto call it as Box::into_non_null(b) instead of b.into_non_null().\nThis is so that there is no conflict with a method on the inner type.

    \n
    §Examples
    \n

    Converting the NonNull pointer back into a Box with Box::from_non_null\nfor automatic cleanup:

    \n\n
    #![feature(box_vec_non_null)]\n\nlet x = Box::new(String::from(\"Hello\"));\nlet non_null = Box::into_non_null(x);\nlet x = unsafe { Box::from_non_null(non_null) };
    \n

    Manual cleanup by explicitly running the destructor and deallocating\nthe memory:

    \n\n
    #![feature(box_vec_non_null)]\n\nuse std::alloc::{dealloc, Layout};\n\nlet x = Box::new(String::from(\"Hello\"));\nlet non_null = Box::into_non_null(x);\nunsafe {\n    non_null.drop_in_place();\n    dealloc(non_null.as_ptr().cast::<u8>(), Layout::new::<String>());\n}
    \n

    Note: This is equivalent to the following:

    \n\n
    #![feature(box_vec_non_null)]\n\nlet x = Box::new(String::from(\"Hello\"));\nlet non_null = Box::into_non_null(x);\nunsafe {\n    drop(Box::from_non_null(non_null));\n}
    ",0,"iroh_relay::dns::BoxIter"],["
    Source§

    impl<T> Box<T>

    1.0.0 · Source

    pub fn new(x: T) -> Box<T>

    Available on crate feature server only.

    Allocates memory on the heap and then places x into it.

    \n

    This doesn’t actually allocate if T is zero-sized.

    \n
    §Examples
    \n
    let five = Box::new(5);
    1.82.0 · Source

    pub fn new_uninit() -> Box<MaybeUninit<T>>

    Available on crate feature server only.

    Constructs a new box with uninitialized contents.

    \n
    §Examples
    \n
    let mut five = Box::<u32>::new_uninit();\n// Deferred initialization:\nfive.write(5);\nlet five = unsafe { five.assume_init() };\n\nassert_eq!(*five, 5)
    1.92.0 · Source

    pub fn new_zeroed() -> Box<MaybeUninit<T>>

    Available on crate feature server only.

    Constructs a new Box with uninitialized contents, with the memory\nbeing filled with 0 bytes.

    \n

    See MaybeUninit::zeroed for examples of correct and incorrect usage\nof this method.

    \n
    §Examples
    \n
    let zero = Box::<u32>::new_zeroed();\nlet zero = unsafe { zero.assume_init() };\n\nassert_eq!(*zero, 0)
    1.33.0 · Source

    pub fn pin(x: T) -> Pin<Box<T>>

    Available on crate feature server only.

    Constructs a new Pin<Box<T>>. If T does not implement Unpin, then\nx will be pinned in memory and unable to be moved.

    \n

    Constructing and pinning of the Box can also be done in two steps: Box::pin(x)\ndoes the same as Box::into_pin(Box::new(x)). Consider using\ninto_pin if you already have a Box<T>, or if you want to\nconstruct a (pinned) Box in a different way than with Box::new.

    \n
    Source

    pub fn try_new(x: T) -> Result<Box<T>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Allocates memory on the heap then places x into it,\nreturning an error if the allocation fails

    \n

    This doesn’t actually allocate if T is zero-sized.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nlet five = Box::try_new(5)?;
    Source

    pub fn try_new_uninit() -> Result<Box<MaybeUninit<T>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new box with uninitialized contents on the heap,\nreturning an error if the allocation fails

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nlet mut five = Box::<u32>::try_new_uninit()?;\n// Deferred initialization:\nfive.write(5);\nlet five = unsafe { five.assume_init() };\n\nassert_eq!(*five, 5);
    Source

    pub fn try_new_zeroed() -> Result<Box<MaybeUninit<T>>, AllocError>

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new Box with uninitialized contents, with the memory\nbeing filled with 0 bytes on the heap

    \n

    See MaybeUninit::zeroed for examples of correct and incorrect usage\nof this method.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nlet zero = Box::<u32>::try_new_zeroed()?;\nlet zero = unsafe { zero.assume_init() };\n\nassert_eq!(*zero, 0);
    ",0,"iroh_relay::dns::BoxIter"],["
    Source§

    impl<T, A> Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source

    pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Box<T, A>

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a box from a raw pointer in the given allocator.

    \n

    After calling this function, the raw pointer is owned by the\nresulting Box. Specifically, the Box destructor will call\nthe destructor of T and free the allocated memory. For this\nto be safe, the memory must have been allocated in accordance\nwith the memory layout used by Box .

    \n
    §Safety
    \n

    This function is unsafe because improper use may lead to\nmemory problems. For example, a double-free may occur if the\nfunction is called twice on the same raw pointer.

    \n

    The raw pointer must point to a block of memory allocated by alloc.

    \n
    §Examples
    \n

    Recreate a Box which was previously converted to a raw pointer\nusing Box::into_raw_with_allocator:

    \n\n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet x = Box::new_in(5, System);\nlet (ptr, alloc) = Box::into_raw_with_allocator(x);\nlet x = unsafe { Box::from_raw_in(ptr, alloc) };
    \n

    Manually create a Box from scratch by using the system allocator:

    \n\n
    #![feature(allocator_api, slice_ptr_get)]\n\nuse std::alloc::{Allocator, Layout, System};\n\nunsafe {\n    let ptr = System.allocate(Layout::new::<i32>())?.as_mut_ptr() as *mut i32;\n    // In general .write is required to avoid attempting to destruct\n    // the (uninitialized) previous contents of `ptr`, though for this\n    // simple example `*ptr = 5` would have worked as well.\n    ptr.write(5);\n    let x = Box::from_raw_in(ptr, System);\n}
    Source

    pub unsafe fn from_non_null_in(raw: NonNull<T>, alloc: A) -> Box<T, A>

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a box from a NonNull pointer in the given allocator.

    \n

    After calling this function, the NonNull pointer is owned by\nthe resulting Box. Specifically, the Box destructor will call\nthe destructor of T and free the allocated memory. For this\nto be safe, the memory must have been allocated in accordance\nwith the memory layout used by Box .

    \n
    §Safety
    \n

    This function is unsafe because improper use may lead to\nmemory problems. For example, a double-free may occur if the\nfunction is called twice on the same raw pointer.

    \n

    The non-null pointer must point to a block of memory allocated by alloc.

    \n
    §Examples
    \n

    Recreate a Box which was previously converted to a NonNull pointer\nusing Box::into_non_null_with_allocator:

    \n\n
    #![feature(allocator_api, box_vec_non_null)]\n\nuse std::alloc::System;\n\nlet x = Box::new_in(5, System);\nlet (non_null, alloc) = Box::into_non_null_with_allocator(x);\nlet x = unsafe { Box::from_non_null_in(non_null, alloc) };
    \n

    Manually create a Box from scratch by using the system allocator:

    \n\n
    #![feature(allocator_api, box_vec_non_null, slice_ptr_get)]\n\nuse std::alloc::{Allocator, Layout, System};\n\nunsafe {\n    let non_null = System.allocate(Layout::new::<i32>())?.cast::<i32>();\n    // In general .write is required to avoid attempting to destruct\n    // the (uninitialized) previous contents of `non_null`.\n    non_null.write(5);\n    let x = Box::from_non_null_in(non_null, System);\n}
    Source

    pub fn into_raw_with_allocator(b: Box<T, A>) -> (*mut T, A)

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Consumes the Box, returning a wrapped raw pointer and the allocator.

    \n

    The pointer will be properly aligned and non-null.

    \n

    After calling this function, the caller is responsible for the\nmemory previously managed by the Box. In particular, the\ncaller should properly destroy T and release the memory, taking\ninto account the memory layout used by Box. The easiest way to\ndo this is to convert the raw pointer back into a Box with the\nBox::from_raw_in function, allowing the Box destructor to perform\nthe cleanup.

    \n

    Note: this is an associated function, which means that you have\nto call it as Box::into_raw_with_allocator(b) instead of b.into_raw_with_allocator(). This\nis so that there is no conflict with a method on the inner type.

    \n
    §Examples
    \n

    Converting the raw pointer back into a Box with Box::from_raw_in\nfor automatic cleanup:

    \n\n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet x = Box::new_in(String::from(\"Hello\"), System);\nlet (ptr, alloc) = Box::into_raw_with_allocator(x);\nlet x = unsafe { Box::from_raw_in(ptr, alloc) };
    \n

    Manual cleanup by explicitly running the destructor and deallocating\nthe memory:

    \n\n
    #![feature(allocator_api)]\n\nuse std::alloc::{Allocator, Layout, System};\nuse std::ptr::{self, NonNull};\n\nlet x = Box::new_in(String::from(\"Hello\"), System);\nlet (ptr, alloc) = Box::into_raw_with_allocator(x);\nunsafe {\n    ptr::drop_in_place(ptr);\n    let non_null = NonNull::new_unchecked(ptr);\n    alloc.deallocate(non_null.cast(), Layout::new::<String>());\n}
    Source

    pub fn into_non_null_with_allocator(b: Box<T, A>) -> (NonNull<T>, A)

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Consumes the Box, returning a wrapped NonNull pointer and the allocator.

    \n

    The pointer will be properly aligned.

    \n

    After calling this function, the caller is responsible for the\nmemory previously managed by the Box. In particular, the\ncaller should properly destroy T and release the memory, taking\ninto account the memory layout used by Box. The easiest way to\ndo this is to convert the NonNull pointer back into a Box with the\nBox::from_non_null_in function, allowing the Box destructor to\nperform the cleanup.

    \n

    Note: this is an associated function, which means that you have\nto call it as Box::into_non_null_with_allocator(b) instead of\nb.into_non_null_with_allocator(). This is so that there is no\nconflict with a method on the inner type.

    \n
    §Examples
    \n

    Converting the NonNull pointer back into a Box with\nBox::from_non_null_in for automatic cleanup:

    \n\n
    #![feature(allocator_api, box_vec_non_null)]\n\nuse std::alloc::System;\n\nlet x = Box::new_in(String::from(\"Hello\"), System);\nlet (non_null, alloc) = Box::into_non_null_with_allocator(x);\nlet x = unsafe { Box::from_non_null_in(non_null, alloc) };
    \n

    Manual cleanup by explicitly running the destructor and deallocating\nthe memory:

    \n\n
    #![feature(allocator_api, box_vec_non_null)]\n\nuse std::alloc::{Allocator, Layout, System};\n\nlet x = Box::new_in(String::from(\"Hello\"), System);\nlet (non_null, alloc) = Box::into_non_null_with_allocator(x);\nunsafe {\n    non_null.drop_in_place();\n    alloc.deallocate(non_null.cast::<u8>(), Layout::new::<String>());\n}
    Source

    pub fn as_mut_ptr(b: &mut Box<T, A>) -> *mut T

    🔬This is a nightly-only experimental API. (box_as_ptr)
    Available on crate feature server only.

    Returns a raw mutable pointer to the Box’s contents.

    \n

    The caller must ensure that the Box outlives the pointer this\nfunction returns, or else it will end up dangling.

    \n

    This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying memory, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize references to the memory\nmay still invalidate this pointer.\nSee the example below for how this guarantee can be used.

    \n
    §Examples
    \n

    Due to the aliasing guarantee, the following code is legal:

    \n\n
    #![feature(box_as_ptr)]\n\nunsafe {\n    let mut b = Box::new(0);\n    let ptr1 = Box::as_mut_ptr(&mut b);\n    ptr1.write(1);\n    let ptr2 = Box::as_mut_ptr(&mut b);\n    ptr2.write(2);\n    // Notably, the write to `ptr2` did *not* invalidate `ptr1`:\n    ptr1.write(3);\n}
    Source

    pub fn as_ptr(b: &Box<T, A>) -> *const T

    🔬This is a nightly-only experimental API. (box_as_ptr)
    Available on crate feature server only.

    Returns a raw pointer to the Box’s contents.

    \n

    The caller must ensure that the Box outlives the pointer this\nfunction returns, or else it will end up dangling.

    \n

    The caller must also ensure that the memory the pointer (non-transitively) points to\nis never written to (except inside an UnsafeCell) using this pointer or any pointer\nderived from it. If you need to mutate the contents of the Box, use as_mut_ptr.

    \n

    This method guarantees that for the purpose of the aliasing model, this method\ndoes not materialize a reference to the underlying memory, and thus the returned pointer\nwill remain valid when mixed with other calls to as_ptr and as_mut_ptr.\nNote that calling other methods that materialize mutable references to the memory,\nas well as writing to this memory, may still invalidate this pointer.\nSee the example below for how this guarantee can be used.

    \n
    §Examples
    \n

    Due to the aliasing guarantee, the following code is legal:

    \n\n
    #![feature(box_as_ptr)]\n\nunsafe {\n    let mut v = Box::new(0);\n    let ptr1 = Box::as_ptr(&v);\n    let ptr2 = Box::as_mut_ptr(&mut v);\n    let _val = ptr2.read();\n    // No write to this memory has happened yet, so `ptr1` is still valid.\n    let _val = ptr1.read();\n    // However, once we do a write...\n    ptr2.write(1);\n    // ... `ptr1` is no longer valid.\n    // This would be UB: let _val = ptr1.read();\n}
    Source

    pub fn allocator(b: &Box<T, A>) -> &A

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Returns a reference to the underlying allocator.

    \n

    Note: this is an associated function, which means that you have\nto call it as Box::allocator(&b) instead of b.allocator(). This\nis so that there is no conflict with a method on the inner type.

    \n
    1.26.0 · Source

    pub fn leak<'a>(b: Box<T, A>) -> &'a mut T
    where\n A: 'a,

    Available on crate feature server only.

    Consumes and leaks the Box, returning a mutable reference,\n&'a mut T.

    \n

    Note that the type T must outlive the chosen lifetime 'a. If the type\nhas only static references, or none at all, then this may be chosen to be\n'static.

    \n

    This function is mainly useful for data that lives for the remainder of\nthe program’s life. Dropping the returned reference will cause a memory\nleak. If this is not acceptable, the reference should first be wrapped\nwith the Box::from_raw function producing a Box. This Box can\nthen be dropped which will properly destroy T and release the\nallocated memory.

    \n

    Note: this is an associated function, which means that you have\nto call it as Box::leak(b) instead of b.leak(). This\nis so that there is no conflict with a method on the inner type.

    \n
    §Examples
    \n

    Simple usage:

    \n\n
    let x = Box::new(41);\nlet static_ref: &'static mut usize = Box::leak(x);\n*static_ref += 1;\nassert_eq!(*static_ref, 42);
    \n

    Unsized data:

    \n\n
    let x = vec![1, 2, 3].into_boxed_slice();\nlet static_ref = Box::leak(x);\nstatic_ref[0] = 4;\nassert_eq!(*static_ref, [4, 2, 3]);
    1.63.0 · Source

    pub fn into_pin(boxed: Box<T, A>) -> Pin<Box<T, A>>
    where\n A: 'static,

    Available on crate feature server only.

    Converts a Box<T> into a Pin<Box<T>>. If T does not implement Unpin, then\n*boxed will be pinned in memory and unable to be moved.

    \n

    This conversion does not allocate on the heap and happens in place.

    \n

    This is also available via From.

    \n

    Constructing and pinning a Box with Box::into_pin(Box::new(x))\ncan also be written more concisely using Box::pin(x).\nThis into_pin method is useful if you already have a Box<T>, or you are\nconstructing a (pinned) Box in a different way than with Box::new.

    \n
    §Notes
    \n

    It’s not recommended that crates add an impl like From<Box<T>> for Pin<T>,\nas it’ll introduce an ambiguity when calling Pin::from.\nA demonstration of such a poor impl is shown below.

    \n\n
    ⓘ
    struct Foo; // A type defined in this crate.\nimpl From<Box<()>> for Pin<Foo> {\n    fn from(_: Box<()>) -> Pin<Foo> {\n        Pin::new(Foo)\n    }\n}\n\nlet foo = Box::new(());\nlet bar = Pin::from(foo);
    ",0,"iroh_relay::dns::BoxIter"],["
    Source§

    impl<T, A> Box<T, A>
    where\n A: Allocator,

    Source

    pub fn new_in(x: T, alloc: A) -> Box<T, A>
    where\n A: Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Allocates memory in the given allocator then places x into it.

    \n

    This doesn’t actually allocate if T is zero-sized.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet five = Box::new_in(5, System);
    Source

    pub fn try_new_in(x: T, alloc: A) -> Result<Box<T, A>, AllocError>
    where\n A: Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Allocates memory in the given allocator then places x into it,\nreturning an error if the allocation fails

    \n

    This doesn’t actually allocate if T is zero-sized.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet five = Box::try_new_in(5, System)?;
    Source

    pub fn new_uninit_in(alloc: A) -> Box<MaybeUninit<T>, A>
    where\n A: Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new box with uninitialized contents in the provided allocator.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut five = Box::<u32, _>::new_uninit_in(System);\n// Deferred initialization:\nfive.write(5);\nlet five = unsafe { five.assume_init() };\n\nassert_eq!(*five, 5)
    Source

    pub fn try_new_uninit_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>
    where\n A: Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new box with uninitialized contents in the provided allocator,\nreturning an error if the allocation fails

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet mut five = Box::<u32, _>::try_new_uninit_in(System)?;\n// Deferred initialization:\nfive.write(5);\nlet five = unsafe { five.assume_init() };\n\nassert_eq!(*five, 5);
    Source

    pub fn new_zeroed_in(alloc: A) -> Box<MaybeUninit<T>, A>
    where\n A: Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new Box with uninitialized contents, with the memory\nbeing filled with 0 bytes in the provided allocator.

    \n

    See MaybeUninit::zeroed for examples of correct and incorrect usage\nof this method.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet zero = Box::<u32, _>::new_zeroed_in(System);\nlet zero = unsafe { zero.assume_init() };\n\nassert_eq!(*zero, 0)
    Source

    pub fn try_new_zeroed_in(alloc: A) -> Result<Box<MaybeUninit<T>, A>, AllocError>
    where\n A: Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new Box with uninitialized contents, with the memory\nbeing filled with 0 bytes in the provided allocator,\nreturning an error if the allocation fails,

    \n

    See MaybeUninit::zeroed for examples of correct and incorrect usage\nof this method.

    \n
    §Examples
    \n
    #![feature(allocator_api)]\n\nuse std::alloc::System;\n\nlet zero = Box::<u32, _>::try_new_zeroed_in(System)?;\nlet zero = unsafe { zero.assume_init() };\n\nassert_eq!(*zero, 0);
    Source

    pub fn pin_in(x: T, alloc: A) -> Pin<Box<T, A>>
    where\n A: 'static + Allocator,

    🔬This is a nightly-only experimental API. (allocator_api)
    Available on crate feature server only.

    Constructs a new Pin<Box<T, A>>. If T does not implement Unpin, then\nx will be pinned in memory and unable to be moved.

    \n

    Constructing and pinning of the Box can also be done in two steps: Box::pin_in(x, alloc)\ndoes the same as Box::into_pin(Box::new_in(x, alloc)). Consider using\ninto_pin if you already have a Box<T, A>, or if you want to\nconstruct a (pinned) Box in a different way than with Box::new_in.

    \n
    Source

    pub fn into_boxed_slice(boxed: Box<T, A>) -> Box<[T], A>

    🔬This is a nightly-only experimental API. (box_into_boxed_slice)
    Available on crate feature server only.

    Converts a Box<T> into a Box<[T]>

    \n

    This conversion does not allocate on the heap and happens in place.

    \n
    Source

    pub fn into_inner(boxed: Box<T, A>) -> T

    🔬This is a nightly-only experimental API. (box_into_inner)
    Available on crate feature server only.

    Consumes the Box, returning the wrapped value.

    \n
    §Examples
    \n
    #![feature(box_into_inner)]\n\nlet c = Box::new(5);\n\nassert_eq!(Box::into_inner(c), 5);
    Source

    pub fn take(boxed: Box<T, A>) -> (T, Box<MaybeUninit<T>, A>)

    🔬This is a nightly-only experimental API. (box_take)
    Available on crate feature server only.

    Consumes the Box without consuming its allocation, returning the wrapped value and a Box\nto the uninitialized memory where the wrapped value used to live.

    \n

    This can be used together with write to reuse the allocation for multiple\nboxed values.

    \n
    §Examples
    \n
    #![feature(box_take)]\n\nlet c = Box::new(5);\n\n// take the value out of the box\nlet (value, uninit) = Box::take(c);\nassert_eq!(value, 5);\n\n// reuse the box for a second value\nlet c = Box::write(uninit, 6);\nassert_eq!(*c, 6);
    ",0,"iroh_relay::dns::BoxIter"],["
    §

    impl<T> Buf for Box<T>
    where\n T: Buf + ?Sized,

    §

    fn remaining(&self) -> usize

    Returns the number of bytes between the current position and the end of\nthe buffer. Read more
    §

    fn chunk(&self) -> &[u8] ⓘ

    Returns a slice starting at the current position and of length between 0\nand Buf::remaining(). Note that this can return a shorter slice (this\nallows non-continuous internal representation). Read more
    §

    fn chunks_vectored<'b>(&'b self, dst: &mut [IoSlice<'b>]) -> usize

    Fills dst with potentially multiple slices starting at self’s\ncurrent position. Read more
    §

    fn advance(&mut self, cnt: usize)

    Advance the internal cursor of the Buf Read more
    §

    fn has_remaining(&self) -> bool

    Returns true if there are any more bytes to consume Read more
    §

    fn copy_to_slice(&mut self, dst: &mut [u8])

    Copies bytes from self into dst. Read more
    §

    fn get_u8(&mut self) -> u8

    Gets an unsigned 8 bit integer from self. Read more
    §

    fn get_i8(&mut self) -> i8

    Gets a signed 8 bit integer from self. Read more
    §

    fn get_u16(&mut self) -> u16

    Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
    §

    fn get_u16_le(&mut self) -> u16

    Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
    §

    fn get_u16_ne(&mut self) -> u16

    Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
    §

    fn get_i16(&mut self) -> i16

    Gets a signed 16 bit integer from self in big-endian byte order. Read more
    §

    fn get_i16_le(&mut self) -> i16

    Gets a signed 16 bit integer from self in little-endian byte order. Read more
    §

    fn get_i16_ne(&mut self) -> i16

    Gets a signed 16 bit integer from self in native-endian byte order. Read more
    §

    fn get_u32(&mut self) -> u32

    Gets an unsigned 32 bit integer from self in the big-endian byte order. Read more
    §

    fn get_u32_le(&mut self) -> u32

    Gets an unsigned 32 bit integer from self in the little-endian byte order. Read more
    §

    fn get_u32_ne(&mut self) -> u32

    Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
    §

    fn get_i32(&mut self) -> i32

    Gets a signed 32 bit integer from self in big-endian byte order. Read more
    §

    fn get_i32_le(&mut self) -> i32

    Gets a signed 32 bit integer from self in little-endian byte order. Read more
    §

    fn get_i32_ne(&mut self) -> i32

    Gets a signed 32 bit integer from self in native-endian byte order. Read more
    §

    fn get_u64(&mut self) -> u64

    Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
    §

    fn get_u64_le(&mut self) -> u64

    Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
    §

    fn get_u64_ne(&mut self) -> u64

    Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
    §

    fn get_i64(&mut self) -> i64

    Gets a signed 64 bit integer from self in big-endian byte order. Read more
    §

    fn get_i64_le(&mut self) -> i64

    Gets a signed 64 bit integer from self in little-endian byte order. Read more
    §

    fn get_i64_ne(&mut self) -> i64

    Gets a signed 64 bit integer from self in native-endian byte order. Read more
    §

    fn get_u128(&mut self) -> u128

    Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
    §

    fn get_u128_le(&mut self) -> u128

    Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
    §

    fn get_u128_ne(&mut self) -> u128

    Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
    §

    fn get_i128(&mut self) -> i128

    Gets a signed 128 bit integer from self in big-endian byte order. Read more
    §

    fn get_i128_le(&mut self) -> i128

    Gets a signed 128 bit integer from self in little-endian byte order. Read more
    §

    fn get_i128_ne(&mut self) -> i128

    Gets a signed 128 bit integer from self in native-endian byte order. Read more
    §

    fn get_uint(&mut self, nbytes: usize) -> u64

    Gets an unsigned n-byte integer from self in big-endian byte order. Read more
    §

    fn get_uint_le(&mut self, nbytes: usize) -> u64

    Gets an unsigned n-byte integer from self in little-endian byte order. Read more
    §

    fn get_uint_ne(&mut self, nbytes: usize) -> u64

    Gets an unsigned n-byte integer from self in native-endian byte order. Read more
    §

    fn get_int(&mut self, nbytes: usize) -> i64

    Gets a signed n-byte integer from self in big-endian byte order. Read more
    §

    fn get_int_le(&mut self, nbytes: usize) -> i64

    Gets a signed n-byte integer from self in little-endian byte order. Read more
    §

    fn get_int_ne(&mut self, nbytes: usize) -> i64

    Gets a signed n-byte integer from self in native-endian byte order. Read more
    §

    fn get_f32(&mut self) -> f32

    Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
    §

    fn get_f32_le(&mut self) -> f32

    Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
    §

    fn get_f32_ne(&mut self) -> f32

    Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
    §

    fn get_f64(&mut self) -> f64

    Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
    §

    fn get_f64_le(&mut self) -> f64

    Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
    §

    fn get_f64_ne(&mut self) -> f64

    Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
    §

    fn try_copy_to_slice(&mut self, dst: &mut [u8]) -> Result<(), TryGetError>

    Copies bytes from self into dst. Read more
    §

    fn try_get_u8(&mut self) -> Result<u8, TryGetError>

    Gets an unsigned 8 bit integer from self. Read more
    §

    fn try_get_i8(&mut self) -> Result<i8, TryGetError>

    Gets a signed 8 bit integer from self. Read more
    §

    fn try_get_u16(&mut self) -> Result<u16, TryGetError>

    Gets an unsigned 16 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_u16_le(&mut self) -> Result<u16, TryGetError>

    Gets an unsigned 16 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_u16_ne(&mut self) -> Result<u16, TryGetError>

    Gets an unsigned 16 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_i16(&mut self) -> Result<i16, TryGetError>

    Gets a signed 16 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_i16_le(&mut self) -> Result<i16, TryGetError>

    Gets an signed 16 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_i16_ne(&mut self) -> Result<i16, TryGetError>

    Gets a signed 16 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_u32(&mut self) -> Result<u32, TryGetError>

    Gets an unsigned 32 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_u32_le(&mut self) -> Result<u32, TryGetError>

    Gets an unsigned 32 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_u32_ne(&mut self) -> Result<u32, TryGetError>

    Gets an unsigned 32 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_i32(&mut self) -> Result<i32, TryGetError>

    Gets a signed 32 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_i32_le(&mut self) -> Result<i32, TryGetError>

    Gets a signed 32 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_i32_ne(&mut self) -> Result<i32, TryGetError>

    Gets a signed 32 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_u64(&mut self) -> Result<u64, TryGetError>

    Gets an unsigned 64 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_u64_le(&mut self) -> Result<u64, TryGetError>

    Gets an unsigned 64 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_u64_ne(&mut self) -> Result<u64, TryGetError>

    Gets an unsigned 64 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_i64(&mut self) -> Result<i64, TryGetError>

    Gets a signed 64 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_i64_le(&mut self) -> Result<i64, TryGetError>

    Gets a signed 64 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_i64_ne(&mut self) -> Result<i64, TryGetError>

    Gets a signed 64 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_u128(&mut self) -> Result<u128, TryGetError>

    Gets an unsigned 128 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_u128_le(&mut self) -> Result<u128, TryGetError>

    Gets an unsigned 128 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_u128_ne(&mut self) -> Result<u128, TryGetError>

    Gets an unsigned 128 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_i128(&mut self) -> Result<i128, TryGetError>

    Gets a signed 128 bit integer from self in big-endian byte order. Read more
    §

    fn try_get_i128_le(&mut self) -> Result<i128, TryGetError>

    Gets a signed 128 bit integer from self in little-endian byte order. Read more
    §

    fn try_get_i128_ne(&mut self) -> Result<i128, TryGetError>

    Gets a signed 128 bit integer from self in native-endian byte order. Read more
    §

    fn try_get_uint(&mut self, nbytes: usize) -> Result<u64, TryGetError>

    Gets an unsigned n-byte integer from self in big-endian byte order. Read more
    §

    fn try_get_uint_le(&mut self, nbytes: usize) -> Result<u64, TryGetError>

    Gets an unsigned n-byte integer from self in little-endian byte order. Read more
    §

    fn try_get_uint_ne(&mut self, nbytes: usize) -> Result<u64, TryGetError>

    Gets an unsigned n-byte integer from self in native-endian byte order. Read more
    §

    fn try_get_int(&mut self, nbytes: usize) -> Result<i64, TryGetError>

    Gets a signed n-byte integer from self in big-endian byte order. Read more
    §

    fn try_get_int_le(&mut self, nbytes: usize) -> Result<i64, TryGetError>

    Gets a signed n-byte integer from self in little-endian byte order. Read more
    §

    fn try_get_int_ne(&mut self, nbytes: usize) -> Result<i64, TryGetError>

    Gets a signed n-byte integer from self in native-endian byte order. Read more
    §

    fn try_get_f32(&mut self) -> Result<f32, TryGetError>

    Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in big-endian byte order. Read more
    §

    fn try_get_f32_le(&mut self) -> Result<f32, TryGetError>

    Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in little-endian byte order. Read more
    §

    fn try_get_f32_ne(&mut self) -> Result<f32, TryGetError>

    Gets an IEEE754 single-precision (4 bytes) floating point number from\nself in native-endian byte order. Read more
    §

    fn try_get_f64(&mut self) -> Result<f64, TryGetError>

    Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in big-endian byte order. Read more
    §

    fn try_get_f64_le(&mut self) -> Result<f64, TryGetError>

    Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in little-endian byte order. Read more
    §

    fn try_get_f64_ne(&mut self) -> Result<f64, TryGetError>

    Gets an IEEE754 double-precision (8 bytes) floating point number from\nself in native-endian byte order. Read more
    §

    fn copy_to_bytes(&mut self, len: usize) -> Bytes

    Consumes len bytes inside self and returns new instance of Bytes\nwith this data. Read more
    §

    fn take(self, limit: usize) -> Take<Self>
    where\n Self: Sized,

    Creates an adaptor which will read at most limit bytes from self. Read more
    §

    fn chain<U>(self, next: U) -> Chain<Self, U>
    where\n U: Buf,\n Self: Sized,

    Creates an adaptor which will chain this buffer with another. Read more
    §

    fn reader(self) -> Reader<Self>
    where\n Self: Sized,

    Creates an adaptor which implements the Read trait for self. Read more
    ","Buf","iroh_relay::dns::BoxIter"],["
    §

    impl<T> BufMut for Box<T>
    where\n T: BufMut + ?Sized,

    §

    fn remaining_mut(&self) -> usize

    Returns the number of bytes that can be written from the current\nposition until the end of the buffer is reached. Read more
    §

    fn chunk_mut(&mut self) -> &mut UninitSlice

    Returns a mutable slice starting at the current BufMut position and of\nlength between 0 and BufMut::remaining_mut(). Note that this can be shorter than the\nwhole remainder of the buffer (this allows non-continuous implementation). Read more
    §

    unsafe fn advance_mut(&mut self, cnt: usize)

    Advance the internal cursor of the BufMut Read more
    §

    fn put_slice(&mut self, src: &[u8])

    Transfer bytes into self from src and advance the cursor by the\nnumber of bytes written. Read more
    §

    fn put_u8(&mut self, n: u8)

    Writes an unsigned 8 bit integer to self. Read more
    §

    fn put_i8(&mut self, n: i8)

    Writes a signed 8 bit integer to self. Read more
    §

    fn put_u16(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in big-endian byte order. Read more
    §

    fn put_u16_le(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in little-endian byte order. Read more
    §

    fn put_u16_ne(&mut self, n: u16)

    Writes an unsigned 16 bit integer to self in native-endian byte order. Read more
    §

    fn put_i16(&mut self, n: i16)

    Writes a signed 16 bit integer to self in big-endian byte order. Read more
    §

    fn put_i16_le(&mut self, n: i16)

    Writes a signed 16 bit integer to self in little-endian byte order. Read more
    §

    fn put_i16_ne(&mut self, n: i16)

    Writes a signed 16 bit integer to self in native-endian byte order. Read more
    §

    fn put_u32(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in big-endian byte order. Read more
    §

    fn put_u32_le(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in little-endian byte order. Read more
    §

    fn put_u32_ne(&mut self, n: u32)

    Writes an unsigned 32 bit integer to self in native-endian byte order. Read more
    §

    fn put_i32(&mut self, n: i32)

    Writes a signed 32 bit integer to self in big-endian byte order. Read more
    §

    fn put_i32_le(&mut self, n: i32)

    Writes a signed 32 bit integer to self in little-endian byte order. Read more
    §

    fn put_i32_ne(&mut self, n: i32)

    Writes a signed 32 bit integer to self in native-endian byte order. Read more
    §

    fn put_u64(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in the big-endian byte order. Read more
    §

    fn put_u64_le(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in little-endian byte order. Read more
    §

    fn put_u64_ne(&mut self, n: u64)

    Writes an unsigned 64 bit integer to self in native-endian byte order. Read more
    §

    fn put_i64(&mut self, n: i64)

    Writes a signed 64 bit integer to self in the big-endian byte order. Read more
    §

    fn put_i64_le(&mut self, n: i64)

    Writes a signed 64 bit integer to self in little-endian byte order. Read more
    §

    fn put_i64_ne(&mut self, n: i64)

    Writes a signed 64 bit integer to self in native-endian byte order. Read more
    §

    fn has_remaining_mut(&self) -> bool

    Returns true if there is space in self for more bytes. Read more
    §

    fn put<T>(&mut self, src: T)
    where\n T: Buf,\n Self: Sized,

    Transfer bytes into self from src and advance the cursor by the\nnumber of bytes written. Read more
    §

    fn put_bytes(&mut self, val: u8, cnt: usize)

    Put cnt bytes val into self. Read more
    §

    fn put_u128(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in the big-endian byte order. Read more
    §

    fn put_u128_le(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in little-endian byte order. Read more
    §

    fn put_u128_ne(&mut self, n: u128)

    Writes an unsigned 128 bit integer to self in native-endian byte order. Read more
    §

    fn put_i128(&mut self, n: i128)

    Writes a signed 128 bit integer to self in the big-endian byte order. Read more
    §

    fn put_i128_le(&mut self, n: i128)

    Writes a signed 128 bit integer to self in little-endian byte order. Read more
    §

    fn put_i128_ne(&mut self, n: i128)

    Writes a signed 128 bit integer to self in native-endian byte order. Read more
    §

    fn put_uint(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in big-endian byte order. Read more
    §

    fn put_uint_le(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in the little-endian byte order. Read more
    §

    fn put_uint_ne(&mut self, n: u64, nbytes: usize)

    Writes an unsigned n-byte integer to self in the native-endian byte order. Read more
    §

    fn put_int(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in big-endian byte order. Read more
    §

    fn put_int_le(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in little-endian byte order. Read more
    §

    fn put_int_ne(&mut self, n: i64, nbytes: usize)

    Writes low nbytes of a signed integer to self in native-endian byte order. Read more
    §

    fn put_f32(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to\nself in big-endian byte order. Read more
    §

    fn put_f32_le(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to\nself in little-endian byte order. Read more
    §

    fn put_f32_ne(&mut self, n: f32)

    Writes an IEEE754 single-precision (4 bytes) floating point number to\nself in native-endian byte order. Read more
    §

    fn put_f64(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to\nself in big-endian byte order. Read more
    §

    fn put_f64_le(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to\nself in little-endian byte order. Read more
    §

    fn put_f64_ne(&mut self, n: f64)

    Writes an IEEE754 double-precision (8 bytes) floating point number to\nself in native-endian byte order. Read more
    §

    fn limit(self, limit: usize) -> Limit<Self>
    where\n Self: Sized,

    Creates an adaptor which can write at most limit bytes to self. Read more
    §

    fn writer(self) -> Writer<Self>
    where\n Self: Sized,

    Creates an adaptor which implements the Write trait for self. Read more
    §

    fn chain_mut<U>(self, next: U) -> Chain<Self, U>
    where\n U: BufMut,\n Self: Sized,

    Creates an adapter which will chain this buffer with another. Read more
    ","BufMut","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<B> BufRead for Box<B>
    where\n B: BufRead + ?Sized,

    Source§

    fn fill_buf(&mut self) -> Result<&[u8], Error>

    Returns the contents of the internal buffer, filling it with more data, via Read methods, if empty. Read more
    Source§

    fn consume(&mut self, amt: usize)

    Marks the given amount of additional bytes from the internal buffer as having been read.\nSubsequent calls to read only return bytes that have not been marked as read. Read more
    Source§

    fn has_data_left(&mut self) -> Result<bool, Error>

    🔬This is a nightly-only experimental API. (buf_read_has_data_left)
    Checks if there is any data left to be read. Read more
    Source§

    fn read_until(&mut self, byte: u8, buf: &mut Vec<u8>) -> Result<usize, Error>

    Reads all bytes into buf until the delimiter byte or EOF is reached. Read more
    Source§

    fn skip_until(&mut self, byte: u8) -> Result<usize, Error>

    Skips all bytes until the delimiter byte or EOF is reached. Read more
    Source§

    fn read_line(&mut self, buf: &mut String) -> Result<usize, Error>

    Reads all bytes until a newline (the 0xA byte) is reached, and append\nthem to the provided String buffer. Read more
    1.0.0 · Source§

    fn split(self, byte: u8) -> Split<Self>
    where\n Self: Sized,

    Returns an iterator over the contents of this reader split on the byte\nbyte. Read more
    1.0.0 · Source§

    fn lines(self) -> Lines<Self>
    where\n Self: Sized,

    Returns an iterator over the lines of this reader. Read more
    ","BufRead","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T> Clear for Box<T>
    where\n T: Clear,

    Source§

    fn clear(&mut self)

    Clear all data in self, retaining the allocated capacithy.
    ","Clear","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Clone for Box<T, A>
    where\n T: Clone,\n A: Allocator + Clone,

    Source§

    fn clone(&self) -> Box<T, A>

    Returns a new box with a clone() of this box’s contents.

    \n
    §Examples
    \n
    let x = Box::new(5);\nlet y = x.clone();\n\n// The value is the same\nassert_eq!(x, y);\n\n// But they are unique objects\nassert_ne!(&*x as *const i32, &*y as *const i32);
    Source§

    fn clone_from(&mut self, source: &Box<T, A>)

    Copies source’s contents into self without creating a new allocation.

    \n
    §Examples
    \n
    let x = Box::new(5);\nlet mut y = Box::new(10);\nlet yp: *const i32 = &*y;\n\ny.clone_from(&x);\n\n// The value is the same\nassert_eq!(x, y);\n\n// And no allocation occurred\nassert_eq!(yp, &*y);
    ","Clone","iroh_relay::dns::BoxIter"],["
    Source§

    impl<G, R, A> Coroutine<R> for Box<G, A>
    where\n G: Coroutine<R> + Unpin + ?Sized,\n A: Allocator,

    Source§

    type Yield = <G as Coroutine<R>>::Yield

    🔬This is a nightly-only experimental API. (coroutine_trait)
    The type of value this coroutine yields. Read more
    Source§

    type Return = <G as Coroutine<R>>::Return

    🔬This is a nightly-only experimental API. (coroutine_trait)
    The type of value this coroutine returns. Read more
    Source§

    fn resume(\n self: Pin<&mut Box<G, A>>,\n arg: R,\n) -> CoroutineState<<Box<G, A> as Coroutine<R>>::Yield, <Box<G, A> as Coroutine<R>>::Return>

    🔬This is a nightly-only experimental API. (coroutine_trait)
    Resumes the execution of this coroutine. Read more
    ","Coroutine","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Debug for Box<T, A>
    where\n T: Debug + ?Sized,\n A: Allocator,

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh_relay::dns::BoxIter"],["
    §

    impl<'a, T> DecodeValue<'a> for Box<T>
    where\n T: DecodeValue<'a>,

    §

    type Error = <T as DecodeValue<'a>>::Error

    Type returned in the event of a decoding error.
    §

    fn decode_value<R>(\n reader: &mut R,\n header: Header,\n) -> Result<Box<T>, <Box<T> as DecodeValue<'a>>::Error>
    where\n R: Reader<'a>,

    Attempt to decode this message using the provided [Reader].
    ","DecodeValue<'a>","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T> Default for Box<T>
    where\n T: Default,

    Source§

    fn default() -> Box<T>

    Creates a Box<T>, with the Default value for T.

    \n
    ","Default","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Deref for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    type Target = T

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &T

    Dereferences the value.
    ","Deref","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> DerefMut for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn deref_mut(&mut self) -> &mut T

    Mutably dereferences the value.
    ","DerefMut","iroh_relay::dns::BoxIter"],["
    Source§

    impl<'de, T> Deserialize<'de> for Box<T>
    where\n T: Deserialize<'de>,

    Source§

    fn deserialize<D>(\n deserializer: D,\n) -> Result<Box<T>, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Display for Box<T, A>
    where\n T: Display + ?Sized,\n A: Allocator,

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<I, A> DoubleEndedIterator for Box<I, A>
    where\n I: DoubleEndedIterator + ?Sized,\n A: Allocator,

    Source§

    fn next_back(&mut self) -> Option<<I as Iterator>::Item>

    Removes and returns an element from the end of the iterator. Read more
    Source§

    fn nth_back(&mut self, n: usize) -> Option<<I as Iterator>::Item>

    Returns the nth element from the end of the iterator. Read more
    Source§

    fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

    🔬This is a nightly-only experimental API. (iter_advance_by)
    Advances the iterator from the back by n elements. Read more
    1.27.0 · Source§

    fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
    where\n Self: Sized,\n F: FnMut(B, Self::Item) -> R,\n R: Try<Output = B>,

    This is the reverse version of Iterator::try_fold(): it takes\nelements starting from the back of the iterator. Read more
    1.27.0 · Source§

    fn rfold<B, F>(self, init: B, f: F) -> B
    where\n Self: Sized,\n F: FnMut(B, Self::Item) -> B,

    An iterator method that reduces the iterator’s elements to a single,\nfinal value, starting from the back. Read more
    1.27.0 · Source§

    fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
    where\n Self: Sized,\n P: FnMut(&Self::Item) -> bool,

    Searches for an element of an iterator from the back that satisfies a predicate. Read more
    ","DoubleEndedIterator","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Drop for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn drop(&mut self)

    Executes the destructor for this type. Read more
    ","Drop","iroh_relay::dns::BoxIter"],["
    §

    impl<T> EncodeAsVarULE<T> for Box<T>
    where\n T: VarULE + ?Sized,

    §

    fn encode_var_ule_as_slices<R>(&self, cb: impl FnOnce(&[&[u8]]) -> R) -> R

    Calls cb with a piecewise list of byte slices that when concatenated\nproduce the memory pattern of the corresponding instance of T. Read more
    §

    fn encode_var_ule_len(&self) -> usize

    Return the length, in bytes, of the corresponding [VarULE] type
    §

    fn encode_var_ule_write(&self, dst: &mut [u8])

    Write the corresponding [VarULE] type to the dst buffer. dst should\nbe the size of [Self::encode_var_ule_len()]
    ","EncodeAsVarULE","iroh_relay::dns::BoxIter"],["
    §

    impl<T> EncodeValue for Box<T>
    where\n T: EncodeValue,

    §

    fn value_len(&self) -> Result<Length, Error>

    Compute the length of this value (sans [Tag]+[Length] header) when\nencoded as ASN.1 DER.
    §

    fn encode_value(&self, writer: &mut impl Writer) -> Result<(), Error>

    Encode value (sans [Tag]+[Length] header) as ASN.1 DER using the\nprovided [Writer].
    §

    fn header(&self) -> Result<Header, Error>
    where\n Self: Tagged,

    Get the [Header] used to encode this value.
    ","EncodeValue","iroh_relay::dns::BoxIter"],["
    1.8.0 · Source§

    impl<E> Error for Box<E>
    where\n E: Error,

    Source§

    fn cause(&self) -> Option<&dyn Error>

    👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
    Source§

    fn source(&self) -> Option<&(dyn Error + 'static)>

    Returns the lower-level source of this error, if any. Read more
    Source§

    fn provide<'b>(&'b self, request: &mut Request<'b>)

    🔬This is a nightly-only experimental API. (error_generic_member_access)
    Provides type-based access to context intended for error reports. Read more
    1.0.0 · Source§

    fn description(&self) -> &str

    👎Deprecated since 1.42.0: use the Display impl or to_string()
    ","Error","iroh_relay::dns::BoxIter"],["
    §

    impl<E> ErrorCompat for Box<E>
    where\n E: ErrorCompat,

    §

    fn backtrace(&self) -> Option<&Backtrace>

    Returns a [Backtrace][] that may be printed.
    §

    fn iter_chain(&self) -> ChainCompat<'_, '_>
    where\n Self: AsErrorSource,

    Returns an iterator for traversing the chain of errors,\nstarting with the current error\nand continuing with recursive calls to Error::source. Read more
    ","ErrorCompat","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<I, A> ExactSizeIterator for Box<I, A>
    where\n I: ExactSizeIterator + ?Sized,\n A: Allocator,

    Source§

    fn len(&self) -> usize

    Returns the exact remaining length of the iterator. Read more
    Source§

    fn is_empty(&self) -> bool

    🔬This is a nightly-only experimental API. (exact_size_is_empty)
    Returns true if the iterator is empty. Read more
    ","ExactSizeIterator","iroh_relay::dns::BoxIter"],["
    1.35.0 · Source§

    impl<Args, F, A> Fn<Args> for Box<F, A>
    where\n Args: Tuple,\n F: Fn<Args> + ?Sized,\n A: Allocator,

    Source§

    extern "rust-call" fn call(\n &self,\n args: Args,\n) -> <Box<F, A> as FnOnce<Args>>::Output

    🔬This is a nightly-only experimental API. (fn_traits)
    Performs the call operation.
    ","Fn","iroh_relay::dns::BoxIter"],["
    1.35.0 · Source§

    impl<Args, F, A> FnMut<Args> for Box<F, A>
    where\n Args: Tuple,\n F: FnMut<Args> + ?Sized,\n A: Allocator,

    Source§

    extern "rust-call" fn call_mut(\n &mut self,\n args: Args,\n) -> <Box<F, A> as FnOnce<Args>>::Output

    🔬This is a nightly-only experimental API. (fn_traits)
    Performs the call operation.
    ","FnMut","iroh_relay::dns::BoxIter"],["
    1.35.0 · Source§

    impl<Args, F, A> FnOnce<Args> for Box<F, A>
    where\n Args: Tuple,\n F: FnOnce<Args> + ?Sized,\n A: Allocator,

    Source§

    type Output = <F as FnOnce<Args>>::Output

    The returned type after the call operator is used.
    Source§

    extern "rust-call" fn call_once(\n self,\n args: Args,\n) -> <Box<F, A> as FnOnce<Args>>::Output

    🔬This is a nightly-only experimental API. (fn_traits)
    Performs the call operation.
    ","FnOnce","iroh_relay::dns::BoxIter"],["
    1.6.0 · Source§

    impl<T> From<T> for Box<T>

    Source§

    fn from(t: T) -> Box<T>

    Converts a T into a Box<T>

    \n

    The conversion allocates on the heap and moves t\nfrom the stack into it.

    \n
    §Examples
    \n
    let x = 5;\nlet boxed = Box::new(5);\n\nassert_eq!(Box::from(x), boxed);
    ","From","iroh_relay::dns::BoxIter"],["
    §

    impl<F> FusedFuture for Box<F>
    where\n F: FusedFuture + Unpin + ?Sized,

    §

    fn is_terminated(&self) -> bool

    Returns true if the underlying future should no longer be polled.
    ","FusedFuture","iroh_relay::dns::BoxIter"],["
    §

    impl<S> FusedStream for Box<S>
    where\n S: FusedStream + Unpin + ?Sized,

    §

    fn is_terminated(&self) -> bool

    Returns true if the stream should no longer be polled.
    ","FusedStream","iroh_relay::dns::BoxIter"],["
    1.36.0 · Source§

    impl<F, A> Future for Box<F, A>
    where\n F: Future + Unpin + ?Sized,\n A: Allocator,

    Source§

    type Output = <F as Future>::Output

    The type of value produced on completion.
    Source§

    fn poll(\n self: Pin<&mut Box<F, A>>,\n cx: &mut Context<'_>,\n) -> Poll<<Box<F, A> as Future>::Output>

    Attempts to resolve the future to a final value, registering\nthe current task for wakeup if the value is not yet available. Read more
    ","Future","iroh_relay::dns::BoxIter"],["
    §

    impl<T> GenerateImplicitData for Box<T>
    where\n T: GenerateImplicitData,

    §

    fn generate() -> Box<T>

    Build the data.
    §

    fn generate_with_source(source: &dyn Error) -> Box<T>
    where\n Box<T>: Sized,

    Build the data using the given source
    ","GenerateImplicitData","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Hash for Box<T, A>
    where\n T: Hash + ?Sized,\n A: Allocator,

    Source§

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_relay::dns::BoxIter"],["
    1.22.0 · Source§

    impl<T, A> Hasher for Box<T, A>
    where\n T: Hasher + ?Sized,\n A: Allocator,

    Source§

    fn finish(&self) -> u64

    Returns the hash value for the values written so far. Read more
    Source§

    fn write(&mut self, bytes: &[u8])

    Writes some data into this Hasher. Read more
    Source§

    fn write_u8(&mut self, i: u8)

    Writes a single u8 into this hasher.
    Source§

    fn write_u16(&mut self, i: u16)

    Writes a single u16 into this hasher.
    Source§

    fn write_u32(&mut self, i: u32)

    Writes a single u32 into this hasher.
    Source§

    fn write_u64(&mut self, i: u64)

    Writes a single u64 into this hasher.
    Source§

    fn write_u128(&mut self, i: u128)

    Writes a single u128 into this hasher.
    Source§

    fn write_usize(&mut self, i: usize)

    Writes a single usize into this hasher.
    Source§

    fn write_i8(&mut self, i: i8)

    Writes a single i8 into this hasher.
    Source§

    fn write_i16(&mut self, i: i16)

    Writes a single i16 into this hasher.
    Source§

    fn write_i32(&mut self, i: i32)

    Writes a single i32 into this hasher.
    Source§

    fn write_i64(&mut self, i: i64)

    Writes a single i64 into this hasher.
    Source§

    fn write_i128(&mut self, i: i128)

    Writes a single i128 into this hasher.
    Source§

    fn write_isize(&mut self, i: isize)

    Writes a single isize into this hasher.
    Source§

    fn write_length_prefix(&mut self, len: usize)

    🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
    Writes a length prefix into this hasher, as part of being prefix-free. Read more
    Source§

    fn write_str(&mut self, s: &str)

    🔬This is a nightly-only experimental API. (hasher_prefixfree_extras)
    Writes a single str into this hasher. Read more
    ","Hasher","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<I, A> Iterator for Box<I, A>
    where\n I: Iterator + ?Sized,\n A: Allocator,

    Source§

    type Item = <I as Iterator>::Item

    The type of the elements being iterated over.
    Source§

    fn next(&mut self) -> Option<<I as Iterator>::Item>

    Advances the iterator and returns the next value. Read more
    Source§

    fn size_hint(&self) -> (usize, Option<usize>)

    Returns the bounds on the remaining length of the iterator. Read more
    Source§

    fn nth(&mut self, n: usize) -> Option<<I as Iterator>::Item>

    Returns the nth element of the iterator. Read more
    Source§

    fn last(self) -> Option<<I as Iterator>::Item>

    Consumes the iterator, returning the last element. Read more
    Source§

    fn next_chunk<const N: usize>(\n &mut self,\n) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
    where\n 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 count(self) -> usize
    where\n Self: Sized,

    Consumes the iterator, counting the number of iterations and returning it. 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.28.0 · Source§

    fn step_by(self, step: usize) -> StepBy<Self>
    where\n Self: Sized,

    Creates an iterator starting at the same point, but stepping by\nthe given amount at each iteration. Read more
    1.0.0 · Source§

    fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter>
    where\n Self: Sized,\n 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\n Self: Sized,\n U: IntoIterator,

    ‘Zips up’ two iterators into a single iterator of pairs. Read more
    Source§

    fn intersperse(self, separator: Self::Item) -> Intersperse<Self>
    where\n Self: Sized,\n Self::Item: Clone,

    🔬This is a nightly-only experimental API. (iter_intersperse)
    Creates a new iterator which places a copy of separator between adjacent\nitems of the original iterator. Read more
    Source§

    fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G>
    where\n Self: Sized,\n G: FnMut() -> Self::Item,

    🔬This is a nightly-only experimental API. (iter_intersperse)
    Creates a new iterator which places an item generated by separator\nbetween adjacent items of the original iterator. Read more
    1.0.0 · Source§

    fn map<B, F>(self, f: F) -> Map<Self, F>
    where\n Self: Sized,\n F: FnMut(Self::Item) -> B,

    Takes a closure and creates an iterator which calls that closure on each\nelement. Read more
    1.21.0 · Source§

    fn for_each<F>(self, f: F)
    where\n Self: Sized,\n 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\n Self: Sized,\n P: FnMut(&Self::Item) -> bool,

    Creates an iterator which uses a closure to determine if an element\nshould be yielded. Read more
    1.0.0 · Source§

    fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
    where\n Self: Sized,\n 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\n Self: Sized,

    Creates an iterator which gives the current iteration count as well as\nthe next value. Read more
    1.0.0 · Source§

    fn peekable(self) -> Peekable<Self>
    where\n Self: Sized,

    Creates an iterator which can use the peek and peek_mut methods\nto look at the next element of the iterator without consuming it. See\ntheir documentation for more information. Read more
    1.0.0 · Source§

    fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
    where\n Self: Sized,\n 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\n Self: Sized,\n 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\n Self: Sized,\n 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\n 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\n Self: Sized,

    Creates an iterator that yields the first n elements, or fewer\nif 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\n Self: Sized,\n F: FnMut(&mut St, Self::Item) -> Option<B>,

    An iterator adapter which, like fold, holds internal state, but\nunlike fold, produces a new iterator. Read more
    1.0.0 · Source§

    fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F>
    where\n Self: Sized,\n U: IntoIterator,\n 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\n Self: Sized,\n 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\n Self: Sized,\n 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\nself and returns an iterator over the outputs of f. Like slice::windows(),\nthe windows during mapping overlap as well. Read more
    1.0.0 · Source§

    fn fuse(self) -> Fuse<Self>
    where\n 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\n Self: Sized,\n 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\n Self: Sized,

    Creates a “by reference” adapter for this instance of Iterator. Read more
    1.0.0 · Source§

    fn collect<B>(self) -> B
    where\n B: FromIterator<Self::Item>,\n Self: Sized,

    Transforms an iterator into a collection. Read more
    Source§

    fn try_collect<B>(\n &mut self,\n) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
    where\n Self: Sized,\n Self::Item: Try,\n <Self::Item as Try>::Residual: Residual<B>,\n 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\na failure is encountered. Read more
    Source§

    fn collect_into<E>(self, collection: &mut E) -> &mut E
    where\n E: Extend<Self::Item>,\n 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\n Self: Sized,\n B: Default + Extend<Self::Item>,\n F: FnMut(&Self::Item) -> bool,

    Consumes an iterator, creating two collections from it. Read more
    Source§

    fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
    where\n T: 'a,\n Self: Sized + DoubleEndedIterator<Item = &'a mut T>,\n P: FnMut(&T) -> bool,

    🔬This is a nightly-only experimental API. (iter_partition_in_place)
    Reorders the elements of this iterator in-place according to the given predicate,\nsuch that all those that return true precede all those that return false.\nReturns the number of true elements found. Read more
    Source§

    fn is_partitioned<P>(self, predicate: P) -> bool
    where\n Self: Sized,\n 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,\nsuch 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\n Self: Sized,\n F: FnMut(B, Self::Item) -> R,\n R: Try<Output = B>,

    An iterator method that applies a function as long as it returns\nsuccessfully, producing a single, final value. Read more
    1.27.0 · Source§

    fn try_for_each<F, R>(&mut self, f: F) -> R
    where\n Self: Sized,\n F: FnMut(Self::Item) -> R,\n R: Try<Output = ()>,

    An iterator method that applies a fallible function to each item in the\niterator, 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\n Self: Sized,\n F: FnMut(B, Self::Item) -> B,

    Folds every element into an accumulator by applying an operation,\nreturning the final result. Read more
    1.51.0 · Source§

    fn reduce<F>(self, f: F) -> Option<Self::Item>
    where\n Self: Sized,\n F: FnMut(Self::Item, Self::Item) -> Self::Item,

    Reduces the elements to a single one, by repeatedly applying a reducing\noperation. Read more
    Source§

    fn try_reduce<R>(\n &mut self,\n f: impl FnMut(Self::Item, Self::Item) -> R,\n) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
    where\n Self: Sized,\n R: Try<Output = Self::Item>,\n <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\nclosure 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\n Self: Sized,\n 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\n Self: Sized,\n 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\n Self: Sized,\n 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\n Self: Sized,\n F: FnMut(Self::Item) -> Option<B>,

    Applies function to the elements of iterator and returns\nthe first non-none result. Read more
    Source§

    fn try_find<R>(\n &mut self,\n f: impl FnMut(&Self::Item) -> R,\n) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
    where\n Self: Sized,\n R: Try<Output = bool>,\n <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\nthe first true result or the first error. Read more
    1.0.0 · Source§

    fn position<P>(&mut self, predicate: P) -> Option<usize>
    where\n Self: Sized,\n P: FnMut(Self::Item) -> bool,

    Searches for an element in an iterator, returning its index. Read more
    1.0.0 · Source§

    fn rposition<P>(&mut self, predicate: P) -> Option<usize>
    where\n P: FnMut(Self::Item) -> bool,\n Self: Sized + ExactSizeIterator + DoubleEndedIterator,

    Searches for an element in an iterator from the right, returning its\nindex. Read more
    1.0.0 · Source§

    fn max(self) -> Option<Self::Item>
    where\n Self: Sized,\n Self::Item: Ord,

    Returns the maximum element of an iterator. Read more
    1.0.0 · Source§

    fn min(self) -> Option<Self::Item>
    where\n Self: Sized,\n 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\n B: Ord,\n Self: Sized,\n F: FnMut(&Self::Item) -> B,

    Returns the element that gives the maximum value from the\nspecified function. Read more
    1.15.0 · Source§

    fn max_by<F>(self, compare: F) -> Option<Self::Item>
    where\n Self: Sized,\n F: FnMut(&Self::Item, &Self::Item) -> Ordering,

    Returns the element that gives the maximum value with respect to the\nspecified comparison function. Read more
    1.6.0 · Source§

    fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
    where\n B: Ord,\n Self: Sized,\n F: FnMut(&Self::Item) -> B,

    Returns the element that gives the minimum value from the\nspecified function. Read more
    1.15.0 · Source§

    fn min_by<F>(self, compare: F) -> Option<Self::Item>
    where\n Self: Sized,\n F: FnMut(&Self::Item, &Self::Item) -> Ordering,

    Returns the element that gives the minimum value with respect to the\nspecified comparison function. Read more
    1.0.0 · Source§

    fn rev(self) -> Rev<Self>
    where\n Self: Sized + DoubleEndedIterator,

    Reverses an iterator’s direction. Read more
    1.0.0 · Source§

    fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
    where\n FromA: Default + Extend<A>,\n FromB: Default + Extend<B>,\n 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\n T: Copy + 'a,\n 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\n T: Clone + 'a,\n Self: Sized + Iterator<Item = &'a T>,

    Creates an iterator which clones all of its elements. Read more
    1.0.0 · Source§

    fn cycle(self) -> Cycle<Self>
    where\n Self: Sized + Clone,

    Repeats an iterator endlessly. Read more
    Source§

    fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
    where\n 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\n Self: Sized,\n S: Sum<Self::Item>,

    Sums the elements of an iterator. Read more
    1.11.0 · Source§

    fn product<P>(self) -> P
    where\n Self: Sized,\n 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\n I: IntoIterator<Item = Self::Item>,\n Self::Item: Ord,\n Self: Sized,

    Lexicographically compares the elements of this Iterator with those\nof another. Read more
    Source§

    fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
    where\n Self: Sized,\n I: IntoIterator,\n 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\nof another with respect to the specified comparison function. Read more
    1.5.0 · Source§

    fn partial_cmp<I>(self, other: I) -> Option<Ordering>
    where\n I: IntoIterator,\n Self::Item: PartialOrd<<I as IntoIterator>::Item>,\n Self: Sized,

    Lexicographically compares the PartialOrd elements of\nthis Iterator with those of another. The comparison works like short-circuit\nevaluation, returning a result without comparing the remaining elements.\nAs 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\n Self: Sized,\n I: IntoIterator,\n 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\nof another with respect to the specified comparison function. Read more
    1.5.0 · Source§

    fn eq<I>(self, other: I) -> bool
    where\n I: IntoIterator,\n Self::Item: PartialEq<<I as IntoIterator>::Item>,\n Self: Sized,

    Determines if the elements of this Iterator are equal to those of\nanother. Read more
    Source§

    fn eq_by<I, F>(self, other: I, eq: F) -> bool
    where\n Self: Sized,\n I: IntoIterator,\n 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\nanother with respect to the specified equality function. Read more
    1.5.0 · Source§

    fn ne<I>(self, other: I) -> bool
    where\n I: IntoIterator,\n Self::Item: PartialEq<<I as IntoIterator>::Item>,\n Self: Sized,

    Determines if the elements of this Iterator are not equal to those of\nanother. Read more
    1.5.0 · Source§

    fn lt<I>(self, other: I) -> bool
    where\n I: IntoIterator,\n Self::Item: PartialOrd<<I as IntoIterator>::Item>,\n Self: Sized,

    Determines if the elements of this Iterator are lexicographically\nless than those of another. Read more
    1.5.0 · Source§

    fn le<I>(self, other: I) -> bool
    where\n I: IntoIterator,\n Self::Item: PartialOrd<<I as IntoIterator>::Item>,\n Self: Sized,

    Determines if the elements of this Iterator are lexicographically\nless or equal to those of another. Read more
    1.5.0 · Source§

    fn gt<I>(self, other: I) -> bool
    where\n I: IntoIterator,\n Self::Item: PartialOrd<<I as IntoIterator>::Item>,\n Self: Sized,

    Determines if the elements of this Iterator are lexicographically\ngreater than those of another. Read more
    1.5.0 · Source§

    fn ge<I>(self, other: I) -> bool
    where\n I: IntoIterator,\n Self::Item: PartialOrd<<I as IntoIterator>::Item>,\n Self: Sized,

    Determines if the elements of this Iterator are lexicographically\ngreater than or equal to those of another. Read more
    1.82.0 · Source§

    fn is_sorted(self) -> bool
    where\n Self: Sized,\n 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\n Self: Sized,\n 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\n Self: Sized,\n F: FnMut(Self::Item) -> K,\n K: PartialOrd,

    Checks if the elements of this iterator are sorted using the given key extraction\nfunction. Read more
    ","Iterator","iroh_relay::dns::BoxIter"],["
    §

    impl<L, S> Layer<S> for Box<L>
    where\n L: Layer<S>,\n S: Subscriber,

    §

    fn on_register_dispatch(&self, subscriber: &Dispatch)

    Performs late initialization when installing this layer as a\nSubscriber. Read more
    §

    fn on_layer(&mut self, subscriber: &mut S)

    Performs late initialization when attaching a Layer to a\n[Subscriber]. Read more
    §

    fn on_new_span(&self, attrs: &Attributes<'_>, id: &Id, ctx: Context<'_, S>)

    Notifies this layer that a new span was constructed with the given\nAttributes and Id.
    §

    fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest

    Registers a new callsite with this layer, returning whether or not\nthe layer is interested in being notified about the callsite, similarly\nto Subscriber::register_callsite. Read more
    §

    fn enabled(&self, metadata: &Metadata<'_>, ctx: Context<'_, S>) -> bool

    Returns true if this layer is interested in a span or event with the\ngiven metadata in the current [Context], similarly to\nSubscriber::enabled. Read more
    §

    fn on_record(&self, span: &Id, values: &Record<'_>, ctx: Context<'_, S>)

    Notifies this layer that a span with the given Id recorded the given\nvalues.
    §

    fn on_follows_from(&self, span: &Id, follows: &Id, ctx: Context<'_, S>)

    Notifies this layer that a span with the ID span recorded that it\nfollows from the span with the ID follows.
    §

    fn event_enabled(&self, event: &Event<'_>, ctx: Context<'_, S>) -> bool

    Called before on_event, to determine if on_event should be called. Read more
    §

    fn on_event(&self, event: &Event<'_>, ctx: Context<'_, S>)

    Notifies this layer that an event has occurred.
    §

    fn on_enter(&self, id: &Id, ctx: Context<'_, S>)

    Notifies this layer that a span with the given ID was entered.
    §

    fn on_exit(&self, id: &Id, ctx: Context<'_, S>)

    Notifies this layer that the span with the given ID was exited.
    §

    fn on_close(&self, id: Id, ctx: Context<'_, S>)

    Notifies this layer that the span with the given ID has been closed.
    §

    fn on_id_change(&self, old: &Id, new: &Id, ctx: Context<'_, S>)

    Notifies this layer that a span ID has been cloned, and that the\nsubscriber returned a different ID.
    §

    fn and_then<L>(self, layer: L) -> Layered<L, Self, S>
    where\n L: Layer<S>,\n Self: Sized,

    Composes this layer around the given Layer, returning a Layered\nstruct implementing Layer. Read more
    §

    fn with_subscriber(self, inner: S) -> Layered<Self, S>
    where\n Self: Sized,

    Composes this Layer with the given Subscriber, returning a\nLayered struct that implements Subscriber. Read more
    §

    fn with_filter<F>(self, filter: F) -> Filtered<Self, F, S>
    where\n Self: Sized,\n F: Filter<S>,

    Combines self with a [Filter], returning a Filtered layer. Read more
    §

    fn boxed(self) -> Box<dyn Layer<S> + Send + Sync>
    where\n Self: Sized + Layer<S> + Send + Sync + 'static,\n S: Subscriber,

    Erases the type of this [Layer], returning a Boxed dyn Layer trait object. Read more
    ","Layer","iroh_relay::dns::BoxIter"],["
    §

    impl<Sp> LocalSpawn for Box<Sp>
    where\n Sp: LocalSpawn + ?Sized,

    §

    fn spawn_local_obj(\n &self,\n future: LocalFutureObj<'static, ()>,\n) -> Result<(), SpawnError>

    Spawns a future that will be run to completion. Read more
    §

    fn status_local(&self) -> Result<(), SpawnError>

    Determines whether the executor is able to spawn new tasks. Read more
    ","LocalSpawn","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T> Log for Box<T>
    where\n T: Log + ?Sized,

    Source§

    fn enabled(&self, metadata: &Metadata<'_>) -> bool

    Determines if a log message with the specified metadata would be\nlogged. Read more
    Source§

    fn log(&self, record: &Record<'_>)

    Logs the Record. Read more
    Source§

    fn flush(&self)

    Flushes any buffered records. Read more
    ","Log","iroh_relay::dns::BoxIter"],["
    §

    impl<T> MaxSize for Box<T>
    where\n T: MaxSize,

    §

    const POSTCARD_MAX_SIZE: usize = T::POSTCARD_MAX_SIZE

    The maximum possible size that the serialization of this\ntype can have, in bytes.
    ","MaxSize","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Ord for Box<T, A>
    where\n T: Ord + ?Sized,\n A: Allocator,

    Source§

    fn cmp(&self, other: &Box<T, A>) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> PartialEq for Box<T, A>
    where\n T: PartialEq + ?Sized,\n A: Allocator,

    Source§

    fn eq(&self, other: &Box<T, A>) -> bool

    Tests for self and other values to be equal, and is used by ==.
    Source§

    fn ne(&self, other: &Box<T, A>) -> bool

    Tests for !=. The default implementation is almost always sufficient,\nand should not be overridden without very good reason.
    ","PartialEq","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> PartialOrd for Box<T, A>
    where\n T: PartialOrd + ?Sized,\n A: Allocator,

    Source§

    fn partial_cmp(&self, other: &Box<T, A>) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    Source§

    fn lt(&self, other: &Box<T, A>) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    Source§

    fn le(&self, other: &Box<T, A>) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    Source§

    fn ge(&self, other: &Box<T, A>) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    Source§

    fn gt(&self, other: &Box<T, A>) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    ","PartialOrd","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Pointer for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Pointer","iroh_relay::dns::BoxIter"],["
    §

    impl<B, E, P> Policy<B, E> for Box<P>
    where\n P: Policy<B, E> + ?Sized,

    §

    fn redirect(&mut self, attempt: &Attempt<'_>) -> Result<Action, E>

    Invoked when the service received a response with a redirection status code (3xx). Read more
    §

    fn on_request(&mut self, request: &mut Request<B>)

    Invoked right before the service makes a request, regardless of whether it is redirected\nor not. Read more
    §

    fn clone_body(&self, body: &B) -> Option<B>

    Try to clone a request body before the service makes a redirected request. Read more
    ","Policy","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<R> Read for Box<R>
    where\n R: Read + ?Sized,

    Source§

    fn read(&mut self, buf: &mut [u8]) -> Result<usize, Error>

    Pull some bytes from this source into the specified buffer, returning\nhow many bytes were read. Read more
    Source§

    fn read_buf(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

    🔬This is a nightly-only experimental API. (read_buf)
    Pull some bytes from this source into the specified buffer. Read more
    Source§

    fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>

    Like read, except that it reads into a slice of buffers. Read more
    Source§

    fn is_read_vectored(&self) -> bool

    🔬This is a nightly-only experimental API. (can_vector)
    Determines if this Reader has an efficient read_vectored\nimplementation. Read more
    Source§

    fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>

    Reads all bytes until EOF in this source, placing them into buf. Read more
    Source§

    fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

    Reads all bytes until EOF in this source, appending them to buf. Read more
    Source§

    fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

    Reads the exact number of bytes required to fill buf. Read more
    Source§

    fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>

    🔬This is a nightly-only experimental API. (read_buf)
    Reads the exact number of bytes required to fill cursor. Read more
    1.0.0 · Source§

    fn by_ref(&mut self) -> &mut Self
    where\n Self: Sized,

    Creates a “by reference” adapter for this instance of Read. Read more
    1.0.0 · Source§

    fn bytes(self) -> Bytes<Self>
    where\n Self: Sized,

    Transforms this Read instance to an Iterator over its bytes. Read more
    1.0.0 · Source§

    fn chain<R>(self, next: R) -> Chain<Self, R>
    where\n R: Read,\n Self: Sized,

    Creates an adapter which will chain this stream with another. Read more
    1.0.0 · Source§

    fn take(self, limit: u64) -> Take<Self>
    where\n Self: Sized,

    Creates an adapter which will read at most limit bytes from it. Read more
    ","Read","iroh_relay::dns::BoxIter"],["
    §

    impl<T> Read for Box<T>
    where\n T: Read + Unpin + ?Sized,

    §

    fn poll_read(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n buf: ReadBufCursor<'_>,\n) -> Poll<Result<(), Error>>

    Attempts to read bytes into the buf. Read more
    ","Read","iroh_relay::dns::BoxIter"],["
    §

    impl<R> Rng for Box<R>
    where\n R: Rng + ?Sized,

    §

    fn next_u64(&mut self) -> u64

    Generate a random u64.
    §

    fn next_f64(&mut self) -> f64

    Generate a random f64 between [0, 1).
    §

    fn next_range(&mut self, range: Range<u64>) -> u64

    Randomly pick a value within the range. Read more
    ","Rng","iroh_relay::dns::BoxIter"],["
    Source§

    impl<R> RngCore for Box<R>
    where\n R: RngCore + ?Sized,

    Source§

    fn next_u32(&mut self) -> u32

    Return the next random u32. Read more
    Source§

    fn next_u64(&mut self) -> u64

    Return the next random u64. Read more
    Source§

    fn fill_bytes(&mut self, dest: &mut [u8])

    Fill dest with random data. Read more
    Source§

    fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), Error>

    Fill dest entirely with random data. Read more
    ","RngCore","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<S> Seek for Box<S>
    where\n S: Seek + ?Sized,

    Source§

    fn seek(&mut self, pos: SeekFrom) -> Result<u64, Error>

    Seek to an offset, in bytes, in a stream. Read more
    Source§

    fn rewind(&mut self) -> Result<(), Error>

    Rewind to the beginning of a stream. Read more
    Source§

    fn stream_len(&mut self) -> Result<u64, Error>

    🔬This is a nightly-only experimental API. (seek_stream_len)
    Returns the length of this stream (in bytes). Read more
    Source§

    fn stream_position(&mut self) -> Result<u64, Error>

    Returns the current seek position from the start of the stream. Read more
    Source§

    fn seek_relative(&mut self, offset: i64) -> Result<(), Error>

    Seeks relative to the current position. Read more
    ","Seek","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T> Serialize for Box<T>
    where\n T: Serialize + ?Sized,

    Source§

    fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    ","Serialize","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T> Serialize for Box<T>
    where\n T: Serialize + ?Sized,

    Source§

    fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_relay::dns::BoxIter"],["
    §

    impl<Request, S> Service<Request> for Box<S>
    where\n S: Service<Request> + ?Sized,

    §

    type Response = <S as Service<Request>>::Response

    Responses given by the service.
    §

    type Error = <S as Service<Request>>::Error

    Errors produced by the service. Read more
    §

    type Future = <S as Service<Request>>::Future

    The future response value.
    §

    fn call(&self, req: Request) -> <Box<S> as Service<Request>>::Future

    Process the request and return the response asynchronously.\ncall takes &self instead of mut &self because: Read more
    ","Service","iroh_relay::dns::BoxIter"],["
    §

    impl<S, Request> Service<Request> for Box<S>
    where\n S: Service<Request> + ?Sized,

    §

    type Response = <S as Service<Request>>::Response

    Responses given by the service.
    §

    type Error = <S as Service<Request>>::Error

    Errors produced by the service.
    §

    type Future = <S as Service<Request>>::Future

    The future response value.
    §

    fn poll_ready(\n &mut self,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), <S as Service<Request>>::Error>>

    Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
    §

    fn call(&mut self, request: Request) -> <S as Service<Request>>::Future

    Process the request and return the response asynchronously. Read more
    ","Service","iroh_relay::dns::BoxIter"],["
    §

    impl<S, Item> Sink<Item> for Box<S>
    where\n S: Sink<Item> + Unpin + ?Sized,

    §

    type Error = <S as Sink<Item>>::Error

    The type of value produced by the sink when an error occurs.
    §

    fn poll_ready(\n self: Pin<&mut Box<S>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>

    Attempts to prepare the Sink to receive a value. Read more
    §

    fn start_send(\n self: Pin<&mut Box<S>>,\n item: Item,\n) -> Result<(), <Box<S> as Sink<Item>>::Error>

    Begin the process of sending a value to the sink.\nEach call to this function must be preceded by a successful call to\npoll_ready which returned Poll::Ready(Ok(())). Read more
    §

    fn poll_flush(\n self: Pin<&mut Box<S>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>

    Flush any remaining output from this sink. Read more
    §

    fn poll_close(\n self: Pin<&mut Box<S>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), <Box<S> as Sink<Item>>::Error>>

    Flush any remaining output and close this sink, if necessary. Read more
    ","Sink","iroh_relay::dns::BoxIter"],["
    §

    impl<T> Source for Box<T>
    where\n T: Source + ?Sized,

    §

    fn register(\n &mut self,\n registry: &Registry,\n token: Token,\n interests: Interest,\n) -> Result<(), Error>

    Register self with the given Registry instance. Read more
    §

    fn reregister(\n &mut self,\n registry: &Registry,\n token: Token,\n interests: Interest,\n) -> Result<(), Error>

    Re-register self with the given Registry instance. Read more
    §

    fn deregister(&mut self, registry: &Registry) -> Result<(), Error>

    Deregister self from the given Registry instance. Read more
    ","Source","iroh_relay::dns::BoxIter"],["
    §

    impl<Sp> Spawn for Box<Sp>
    where\n Sp: Spawn + ?Sized,

    §

    fn spawn_obj(&self, future: FutureObj<'static, ()>) -> Result<(), SpawnError>

    Spawns a future that will be run to completion. Read more
    §

    fn status(&self) -> Result<(), SpawnError>

    Determines whether the executor is able to spawn new tasks. Read more
    ","Spawn","iroh_relay::dns::BoxIter"],["
    §

    impl<S> Stream for Box<S>
    where\n S: Stream + Unpin + ?Sized,

    §

    type Item = <S as Stream>::Item

    Values yielded by the stream.
    §

    fn poll_next(\n self: Pin<&mut Box<S>>,\n cx: &mut Context<'_>,\n) -> Poll<Option<<Box<S> as Stream>::Item>>

    Attempt to pull out the next value of this stream, registering the\ncurrent task for wakeup if the value is not yet available, and returning\nNone 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
    ","Stream","iroh_relay::dns::BoxIter"],["
    §

    impl<S> Subscriber for Box<S>
    where\n S: Subscriber + ?Sized,

    §

    fn register_callsite(&self, metadata: &'static Metadata<'static>) -> Interest

    Registers a new callsite with this subscriber, returning whether or not\nthe subscriber is interested in being notified about the callsite. Read more
    §

    fn enabled(&self, metadata: &Metadata<'_>) -> bool

    Returns true if a span or event with the specified metadata would be\nrecorded. Read more
    §

    fn max_level_hint(&self) -> Option<LevelFilter>

    Returns the highest verbosity level that this Subscriber will\nenable, or None, if the subscriber does not implement level-based\nfiltering or chooses not to implement this method. Read more
    §

    fn new_span(&self, span: &Attributes<'_>) -> Id

    Visit the construction of a new span, returning a new span ID for the\nspan being constructed. Read more
    §

    fn record(&self, span: &Id, values: &Record<'_>)

    Record a set of values on a span. Read more
    §

    fn record_follows_from(&self, span: &Id, follows: &Id)

    Adds an indication that span follows from the span with the id\nfollows. Read more
    §

    fn event_enabled(&self, event: &Event<'_>) -> bool

    Determine if an [Event] should be recorded. Read more
    §

    fn event(&self, event: &Event<'_>)

    Records that an Event has occurred. Read more
    §

    fn enter(&self, span: &Id)

    Records that a span has been entered. Read more
    §

    fn exit(&self, span: &Id)

    Records that a span has been exited. Read more
    §

    fn clone_span(&self, id: &Id) -> Id

    Notifies the subscriber that a span ID has been cloned. Read more
    §

    fn try_close(&self, id: Id) -> bool

    Notifies the subscriber that a span ID has been dropped, and returns\ntrue if there are now 0 IDs that refer to that span. Read more
    §

    fn drop_span(&self, id: Id)

    👎Deprecated since 0.1.2: use Subscriber::try_close instead
    This method is deprecated. Read more
    §

    fn current_span(&self) -> Current

    Returns a type representing this subscriber’s view of the current span. Read more
    §

    unsafe fn downcast_raw(&self, id: TypeId) -> Option<*const ()>

    If self is the same type as the provided TypeId, returns an untyped\n*const pointer to that type. Otherwise, returns None. Read more
    §

    fn on_register_dispatch(&self, subscriber: &Dispatch)

    Invoked when this subscriber becomes a [Dispatch]. Read more
    ","Subscriber","iroh_relay::dns::BoxIter"],["
    §

    impl<'a, T, F> UnsafeFutureObj<'a, T> for Box<F>
    where\n F: Future<Output = T> + 'a,

    §

    fn into_raw(self) -> *mut dyn Future<Output = T> + 'a

    Convert an owned instance into a (conceptually owned) fat pointer. Read more
    §

    unsafe fn drop(ptr: *mut dyn Future<Output = T> + 'a)

    Drops the future represented by the given fat pointer. Read more
    ","UnsafeFutureObj<'a, T>","iroh_relay::dns::BoxIter"],["
    §

    impl<T> Value for Box<T>
    where\n T: Value + ?Sized,

    §

    fn record(&self, key: &Field, visitor: &mut dyn Visit)

    Visits this value with the given Visitor.
    ","Value","iroh_relay::dns::BoxIter"],["
    §

    impl<T> Write for Box<T>
    where\n T: Write + Unpin + ?Sized,

    §

    fn poll_write(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n buf: &[u8],\n) -> Poll<Result<usize, Error>>

    Attempt to write bytes from buf into the destination. Read more
    §

    fn poll_write_vectored(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n bufs: &[IoSlice<'_>],\n) -> Poll<Result<usize, Error>>

    Like poll_write, except that it writes from a slice of buffers.
    §

    fn is_write_vectored(&self) -> bool

    Returns whether this writer has an efficient poll_write_vectored\nimplementation. Read more
    §

    fn poll_flush(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), Error>>

    Attempts to flush the object. Read more
    §

    fn poll_shutdown(\n self: Pin<&mut Box<T>>,\n cx: &mut Context<'_>,\n) -> Poll<Result<(), Error>>

    Attempts to shut down this writer.
    ","Write","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<W> Write for Box<W>
    where\n W: Write + ?Sized,

    Source§

    fn write(&mut self, buf: &[u8]) -> Result<usize, Error>

    Writes a buffer into this writer, returning how many bytes were written. Read more
    Source§

    fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>

    Like write, except that it writes from a slice of buffers. Read more
    Source§

    fn is_write_vectored(&self) -> bool

    🔬This is a nightly-only experimental API. (can_vector)
    Determines if this Writer has an efficient write_vectored\nimplementation. Read more
    Source§

    fn flush(&mut self) -> Result<(), Error>

    Flushes this output stream, ensuring that all intermediately buffered\ncontents reach their destination. Read more
    Source§

    fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

    Attempts to write an entire buffer into this writer. Read more
    Source§

    fn write_all_vectored(&mut self, bufs: &mut [IoSlice<'_>]) -> Result<(), Error>

    🔬This is a nightly-only experimental API. (write_all_vectored)
    Attempts to write multiple buffers into this writer. Read more
    Source§

    fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

    Writes a formatted string into this writer, returning any error\nencountered. Read more
    1.0.0 · Source§

    fn by_ref(&mut self) -> &mut Self
    where\n Self: Sized,

    Creates a “by reference” adapter for this instance of Write. Read more
    ","Write","iroh_relay::dns::BoxIter"],["
    §

    impl<T> WriteColor for Box<T>
    where\n T: WriteColor + ?Sized,

    §

    fn supports_color(&self) -> bool

    Returns true if and only if the underlying writer supports colors.
    §

    fn supports_hyperlinks(&self) -> bool

    Returns true if and only if the underlying writer supports hyperlinks. Read more
    §

    fn set_color(&mut self, spec: &ColorSpec) -> Result<(), Error>

    Set the color settings of the writer. Read more
    §

    fn set_hyperlink(&mut self, link: &HyperlinkSpec<'_>) -> Result<(), Error>

    Set the current hyperlink of the writer. Read more
    §

    fn reset(&mut self) -> Result<(), Error>

    Reset the current color settings to their original settings. Read more
    §

    fn is_synchronous(&self) -> bool

    Returns true if and only if the underlying writer must synchronously\ninteract with an end user’s device in order to control colors. By\ndefault, this always returns false. Read more
    ","WriteColor","iroh_relay::dns::BoxIter"],["
    §

    impl<'a, T> Writeable for Box<T>
    where\n T: Writeable + ?Sized,

    §

    fn write_to<W>(&self, sink: &mut W) -> Result<(), Error>
    where\n W: Write + ?Sized,

    Writes a string to the given sink. Errors from the sink are bubbled up.\nThe default implementation delegates to write_to_parts, and discards any\nPart annotations.
    §

    fn write_to_parts<W>(&self, sink: &mut W) -> Result<(), Error>
    where\n W: PartsWrite + ?Sized,

    Write bytes and Part annotations to the given sink. Errors from the\nsink are bubbled up. The default implementation delegates to write_to,\nand doesn’t produce any Part annotations.
    §

    fn writeable_length_hint(&self) -> LengthHint

    Returns a hint for the number of UTF-8 bytes that will be written to the sink. Read more
    §

    fn write_to_string(&self) -> Cow<'_, str>

    Creates a new String with the data from this Writeable. Like ToString,\nbut smaller and faster. Read more
    ","Writeable","iroh_relay::dns::BoxIter"],["
    §

    impl<T> CartablePointerLike for Box<T>

    ","CartablePointerLike","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T, U, A> CoerceUnsized<Box<U, A>> for Box<T, A>
    where\n T: Unsize<U> + ?Sized,\n A: Allocator,\n U: ?Sized,

    ","CoerceUnsized>","iroh_relay::dns::BoxIter"],["
    Source§

    impl<R> CryptoRng for Box<R>
    where\n R: CryptoRng + ?Sized,

    ","CryptoRng","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T, A> DerefPure for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    ","DerefPure","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T, U> DispatchFromDyn<Box<U>> for Box<T>
    where\n T: Unsize<U> + ?Sized,\n U: ?Sized,

    ","DispatchFromDyn>","iroh_relay::dns::BoxIter"],["
    1.0.0 · Source§

    impl<T, A> Eq for Box<T, A>
    where\n T: Eq + ?Sized,\n A: Allocator,

    ","Eq","iroh_relay::dns::BoxIter"],["
    1.26.0 · Source§

    impl<I, A> FusedIterator for Box<I, A>
    where\n I: FusedIterator + ?Sized,\n A: Allocator,

    ","FusedIterator","iroh_relay::dns::BoxIter"],["
    Source§

    impl<T, A> PinCoerceUnsized for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    ","PinCoerceUnsized","iroh_relay::dns::BoxIter"],["
    §

    impl<'a, T> Sequence<'a> for Box<T>
    where\n T: Sequence<'a>,

    ","Sequence<'a>","iroh_relay::dns::BoxIter"],["
    §

    impl<T> StableDeref for Box<T>
    where\n T: ?Sized,

    ","StableDeref","iroh_relay::dns::BoxIter"],["
    1.33.0 · Source§

    impl<T, A> Unpin for Box<T, A>
    where\n A: Allocator,\n T: ?Sized,

    ","Unpin","iroh_relay::dns::BoxIter"]]]]); + if (window.register_type_impls) { + window.register_type_impls(type_impls); + } else { + window.pending_type_impls = type_impls; + } +})() +//{"start":55,"fragment_lengths":[624148]} \ No newline at end of file diff --git a/pr/3367/docs/type.impl/iroh/struct.PublicKey.js b/pr/3367/docs/type.impl/iroh/struct.PublicKey.js index 9df281dfd4..b6dd49a726 100644 --- a/pr/3367/docs/type.impl/iroh/struct.PublicKey.js +++ b/pr/3367/docs/type.impl/iroh/struct.PublicKey.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["iroh",[["
    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh::NodeId"],["
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    ","Borrow<[u8; 32]>","iroh::NodeId"],["
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    ","Clone","iroh::NodeId"],["
    Source§

    impl Debug for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh::NodeId"],["
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Source§

    fn deserialize<D>(\n deserializer: D,\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh::NodeId"],["
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh::NodeId"],["
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    ","From","iroh::NodeId"],["
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh::NodeId"],["
    Source§

    impl Hash for PublicKey

    Source§

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh::NodeId"],["
    Source§

    impl NodeIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a NodeId in [z-base-32] encoding.
    Source§

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from [z-base-32] encoding.
    ","NodeIdExt","iroh::NodeId"],["
    Source§

    impl Ord for PublicKey

    Source§

    fn cmp(&self, other: &PublicKey) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh::NodeId"],["
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> 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,\nand should not be overridden without very good reason.
    ","PartialEq","iroh::NodeId"],["
    Source§

    impl PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    ","PartialOrd","iroh::NodeId"],["
    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    \n
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    \n
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n
    Source

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n
    Source

    pub fn fmt_short(&self) -> String

    Convert to a hex string limited to the first 5 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh::NodeId"],["
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh::NodeId"],["
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(\n bytes: &[u8],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh::NodeId"],["
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(\n bytes: &[u8; 32],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh::NodeId"],["
    Source§

    impl Copy for PublicKey

    ","Copy","iroh::NodeId"],["
    Source§

    impl Eq for PublicKey

    ","Eq","iroh::NodeId"],["
    Source§

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh::NodeId"]]]]); + var type_impls = Object.fromEntries([["iroh",[["
    §

    impl AsRef<[u8]> for PublicKey

    §

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh::NodeId"],["
    §

    impl Borrow<[u8; 32]> for PublicKey

    §

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    ","Borrow<[u8; 32]>","iroh::NodeId"],["
    §

    impl Clone for PublicKey

    §

    fn clone(&self) -> PublicKey

    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
    ","Clone","iroh::NodeId"],["
    §

    impl Debug for PublicKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh::NodeId"],["
    §

    impl Deref for PublicKey

    §

    type Target = [u8; 32]

    The resulting type after dereferencing.
    §

    fn deref(&self) -> &<PublicKey as Deref>::Target

    Dereferences the value.
    ","Deref","iroh::NodeId"],["
    §

    impl<'de> Deserialize<'de> for PublicKey

    §

    fn deserialize<D>(\n deserializer: D,\n) -> Result<PublicKey, <D as Deserializer<'de>>::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh::NodeId"],["
    §

    impl Display for PublicKey

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh::NodeId"],["
    §

    impl From<VerifyingKey> for PublicKey

    §

    fn from(verifying_key: VerifyingKey) -> PublicKey

    Converts to this type from the input type.
    ","From","iroh::NodeId"],["
    §

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    §

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    §

    fn from_str(s: &str) -> Result<PublicKey, <PublicKey as FromStr>::Err>

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh::NodeId"],["
    §

    impl Hash for PublicKey

    §

    fn hash<H>(&self, state: &mut H)
    where\n H: Hasher,

    Feeds this value into the given Hasher. Read more
    1.3.0 · Source§

    fn hash_slice<H>(data: &[Self], state: &mut H)
    where\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh::NodeId"],["
    Source§

    impl NodeIdExt for PublicKey

    Source§

    fn to_z32(&self) -> String

    Encodes a NodeId in z-base-32 encoding.
    Source§

    fn from_z32(s: &str) -> Result<PublicKey, DecodingError>

    Parses a NodeId from z-base-32 encoding.
    ","NodeIdExt","iroh::NodeId"],["
    §

    impl Ord for PublicKey

    §

    fn cmp(&self, other: &PublicKey) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh::NodeId"],["
    §

    impl PartialEq for PublicKey

    §

    fn eq(&self, other: &PublicKey) -> 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,\nand should not be overridden without very good reason.
    ","PartialEq","iroh::NodeId"],["
    §

    impl PartialOrd for PublicKey

    §

    fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    ","PartialOrd","iroh::NodeId"],["
    §

    impl PublicKey

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    \n

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    \n

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<PublicKey, Error>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a [SignatureError] if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n

    pub fn verify(&self, message: &[u8], signature: &Signature) -> Result<(), Error>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n

    pub fn fmt_short(&self) -> impl Display + 'static

    Convert to a hex string limited to the first 5 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh::NodeId"],["
    §

    impl Serialize for PublicKey

    §

    fn serialize<S>(\n &self,\n serializer: S,\n) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh::NodeId"],["
    §

    impl TryFrom<&[u8]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(\n bytes: &[u8],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh::NodeId"],["
    §

    impl TryFrom<&[u8; 32]> for PublicKey

    §

    type Error = Error

    The type returned in the event of a conversion error.
    §

    fn try_from(\n bytes: &[u8; 32],\n) -> Result<PublicKey, <PublicKey as TryFrom<&[u8; 32]>>::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh::NodeId"],["
    §

    impl Copy for PublicKey

    ","Copy","iroh::NodeId"],["
    §

    impl Eq for PublicKey

    ","Eq","iroh::NodeId"],["
    §

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh::NodeId"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[47943]} \ No newline at end of file +//{"start":55,"fragment_lengths":[47106]} \ No newline at end of file diff --git a/pr/3367/docs/type.impl/iroh_base/struct.PublicKey.js b/pr/3367/docs/type.impl/iroh_base/struct.PublicKey.js index 814cee0ce3..93a1a3d380 100644 --- a/pr/3367/docs/type.impl/iroh_base/struct.PublicKey.js +++ b/pr/3367/docs/type.impl/iroh_base/struct.PublicKey.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["iroh_base",[["
    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh_base::key::NodeId"],["
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    ","Borrow<[u8; 32]>","iroh_base::key::NodeId"],["
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    Returns a copy of the value. Read more
    1.0.0 · Source§

    fn clone_from(&mut self, source: &Self)

    Performs copy-assignment from source. Read more
    ","Clone","iroh_base::key::NodeId"],["
    Source§

    impl Debug for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    ","Debug","iroh_base::key::NodeId"],["
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Source§

    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_base::key::NodeId"],["
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    ","Display","iroh_base::key::NodeId"],["
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> Self

    Converts to this type from the input type.
    ","From","iroh_base::key::NodeId"],["
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh_base::key::NodeId"],["
    Source§

    impl Hash for PublicKey

    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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_base::key::NodeId"],["
    Source§

    impl Ord for PublicKey

    Source§

    fn cmp(&self, other: &Self) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_base::key::NodeId"],["
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> 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,\nand should not be overridden without very good reason.
    ","PartialEq","iroh_base::key::NodeId"],["
    Source§

    impl PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &Self) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    ","PartialOrd","iroh_base::key::NodeId"],["
    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    \n
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    \n
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a SignatureError if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n
    Source

    pub fn verify(\n &self,\n message: &[u8],\n signature: &Signature,\n) -> Result<(), SignatureError>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n
    Source

    pub fn fmt_short(&self) -> String

    Convert to a hex string limited to the first 5 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh_base::key::NodeId"],["
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_base::key::NodeId"],["
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh_base::key::NodeId"],["
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8; 32]) -> Result<Self, Self::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh_base::key::NodeId"],["
    Source§

    impl Copy for PublicKey

    ","Copy","iroh_base::key::NodeId"],["
    Source§

    impl Eq for PublicKey

    ","Eq","iroh_base::key::NodeId"],["
    Source§

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh_base::key::NodeId"]]]]); + var type_impls = Object.fromEntries([["iroh_base",[["
    Source§

    impl AsRef<[u8]> for PublicKey

    Source§

    fn as_ref(&self) -> &[u8] ⓘ

    Converts this type into a shared reference of the (usually inferred) input type.
    ","AsRef<[u8]>","iroh_base::key::NodeId"],["
    Source§

    impl Borrow<[u8; 32]> for PublicKey

    Source§

    fn borrow(&self) -> &[u8; 32]

    Immutably borrows from an owned value. Read more
    ","Borrow<[u8; 32]>","iroh_base::key::NodeId"],["
    Source§

    impl Clone for PublicKey

    Source§

    fn clone(&self) -> PublicKey

    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
    ","Clone","iroh_base::key::NodeId"],["
    Source§

    impl Debug for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    ","Debug","iroh_base::key::NodeId"],["
    Source§

    impl Deref for PublicKey

    Source§

    type Target = [u8; 32]

    The resulting type after dereferencing.
    Source§

    fn deref(&self) -> &Self::Target

    Dereferences the value.
    ","Deref","iroh_base::key::NodeId"],["
    Source§

    impl<'de> Deserialize<'de> for PublicKey

    Source§

    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where\n D: Deserializer<'de>,

    Deserialize this value from the given Serde deserializer. Read more
    ","Deserialize<'de>","iroh_base::key::NodeId"],["
    Source§

    impl Display for PublicKey

    Source§

    fn fmt(&self, f: &mut Formatter<'_>) -> Result

    Formats the value using the given formatter. Read more
    ","Display","iroh_base::key::NodeId"],["
    Source§

    impl From<VerifyingKey> for PublicKey

    Source§

    fn from(verifying_key: VerifyingKey) -> Self

    Converts to this type from the input type.
    ","From","iroh_base::key::NodeId"],["
    Source§

    impl FromStr for PublicKey

    Deserialises the PublicKey from it’s base32 encoding.

    \n

    Display is capable of serialising this format.

    \n
    Source§

    type Err = KeyParsingError

    The associated error which can be returned from parsing.
    Source§

    fn from_str(s: &str) -> Result<Self, Self::Err>

    Parses a string s to return a value of this type. Read more
    ","FromStr","iroh_base::key::NodeId"],["
    Source§

    impl Hash for PublicKey

    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\n H: Hasher,\n Self: Sized,

    Feeds a slice of this type into the given Hasher. Read more
    ","Hash","iroh_base::key::NodeId"],["
    Source§

    impl Ord for PublicKey

    Source§

    fn cmp(&self, other: &Self) -> Ordering

    This method returns an Ordering between self and other. Read more
    1.21.0 · Source§

    fn max(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the maximum of two values. Read more
    1.21.0 · Source§

    fn min(self, other: Self) -> Self
    where\n Self: Sized,

    Compares and returns the minimum of two values. Read more
    1.50.0 · Source§

    fn clamp(self, min: Self, max: Self) -> Self
    where\n Self: Sized,

    Restrict a value to a certain interval. Read more
    ","Ord","iroh_base::key::NodeId"],["
    Source§

    impl PartialEq for PublicKey

    Source§

    fn eq(&self, other: &PublicKey) -> 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,\nand should not be overridden without very good reason.
    ","PartialEq","iroh_base::key::NodeId"],["
    Source§

    impl PartialOrd for PublicKey

    Source§

    fn partial_cmp(&self, other: &Self) -> Option<Ordering>

    This method returns an ordering between self and other values if one exists. Read more
    1.0.0 · Source§

    fn lt(&self, other: &Rhs) -> bool

    Tests less than (for self and other) and is used by the < operator. Read more
    1.0.0 · Source§

    fn le(&self, other: &Rhs) -> bool

    Tests less than or equal to (for self and other) and is used by the\n<= operator. Read more
    1.0.0 · Source§

    fn gt(&self, other: &Rhs) -> bool

    Tests greater than (for self and other) and is used by the >\noperator. Read more
    1.0.0 · Source§

    fn ge(&self, other: &Rhs) -> bool

    Tests greater than or equal to (for self and other) and is used by\nthe >= operator. Read more
    ","PartialOrd","iroh_base::key::NodeId"],["
    Source§

    impl PublicKey

    Source

    pub const LENGTH: usize = 32usize

    The length of an ed25519 PublicKey, in bytes.

    \n
    Source

    pub fn as_bytes(&self) -> &[u8; 32]

    Get this public key as a byte array.

    \n
    Source

    pub fn public(&self) -> VerifyingKey

    Returns the [VerifyingKey] for this PublicKey.

    \n
    Source

    pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>

    Construct a PublicKey from a slice of bytes.

    \n
    §Warning
    \n

    This will return a SignatureError if the bytes passed into this method do not represent\na valid ed25519_dalek curve point. Will never fail for bytes return from Self::as_bytes.\nSee [VerifyingKey::from_bytes] for details.

    \n
    Source

    pub fn verify(\n &self,\n message: &[u8],\n signature: &Signature,\n) -> Result<(), SignatureError>

    Verify a signature on a message with this secret key’s public key.

    \n
    §Return
    \n

    Returns Ok(()) if the signature is valid, and Err otherwise.

    \n
    Source

    pub fn fmt_short(&self) -> impl Display + 'static

    Convert to a hex string limited to the first 5 bytes for a friendly string\nrepresentation of the key.

    \n
    ",0,"iroh_base::key::NodeId"],["
    Source§

    impl Serialize for PublicKey

    Source§

    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where\n S: Serializer,

    Serialize this value into the given Serde serializer. Read more
    ","Serialize","iroh_base::key::NodeId"],["
    Source§

    impl TryFrom<&[u8]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8]) -> Result<Self, Self::Error>

    Performs the conversion.
    ","TryFrom<&[u8]>","iroh_base::key::NodeId"],["
    Source§

    impl TryFrom<&[u8; 32]> for PublicKey

    Source§

    type Error = Error

    The type returned in the event of a conversion error.
    Source§

    fn try_from(bytes: &[u8; 32]) -> Result<Self, Self::Error>

    Performs the conversion.
    ","TryFrom<&[u8; 32]>","iroh_base::key::NodeId"],["
    Source§

    impl Copy for PublicKey

    ","Copy","iroh_base::key::NodeId"],["
    Source§

    impl Eq for PublicKey

    ","Eq","iroh_base::key::NodeId"],["
    Source§

    impl StructuralPartialEq for PublicKey

    ","StructuralPartialEq","iroh_base::key::NodeId"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[43640]} \ No newline at end of file +//{"start":55,"fragment_lengths":[45849]} \ No newline at end of file diff --git a/pr/3367/docs/type.impl/signature/error/struct.Error.js b/pr/3367/docs/type.impl/signature/error/struct.Error.js index f614506caa..caa6f033af 100644 --- a/pr/3367/docs/type.impl/signature/error/struct.Error.js +++ b/pr/3367/docs/type.impl/signature/error/struct.Error.js @@ -1,9 +1,9 @@ (function() { - var type_impls = Object.fromEntries([["iroh_base",[["
    §

    impl Debug for Error

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh_base::SignatureError"],["
    §

    impl Default for Error

    §

    fn default() -> Error

    Returns the “default value” for a type. Read more
    ","Default","iroh_base::SignatureError"],["
    §

    impl Display for Error

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh_base::SignatureError"],["
    §

    impl Error for Error

    Available on crate feature std only.
    §

    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
    ","Error","iroh_base::SignatureError"],["
    §

    impl Error

    pub fn new() -> Error

    Create a new error with no associated source

    \n

    pub fn from_source(source: impl Into<Box<dyn Error + Send + Sync>>) -> Error

    Available on crate feature std only.

    Create a new error with an associated source.

    \n

    NOTE: The “source” should NOT be used to propagate cryptographic\nerrors e.g. signature parsing or verification errors. The intended use\ncases are for propagating errors related to external signers, e.g.\ncommunication/authentication errors with HSMs, KMS, etc.

    \n
    ",0,"iroh_base::SignatureError"],["
    §

    impl From<Box<dyn Error + Send + Sync>> for Error

    Available on crate feature std only.
    §

    fn from(source: Box<dyn Error + Send + Sync>) -> Error

    Converts to this type from the input type.
    ","From>","iroh_base::SignatureError"],["
    §

    impl From<InternalError> for Error

    §

    fn from(err: InternalError) -> Error

    Converts to this type from the input type.
    ","From","iroh_base::SignatureError"]]]]); + var type_impls = Object.fromEntries([["iroh_base",[["
    §

    impl Debug for Error

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Debug","iroh_base::SignatureError"],["
    §

    impl Default for Error

    §

    fn default() -> Error

    Returns the “default value” for a type. Read more
    ","Default","iroh_base::SignatureError"],["
    §

    impl Display for Error

    §

    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

    Formats the value using the given formatter. Read more
    ","Display","iroh_base::SignatureError"],["
    §

    impl Error for Error

    §

    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
    ","Error","iroh_base::SignatureError"],["
    §

    impl Error

    pub fn new() -> Error

    Create a new error with no associated source

    \n

    pub fn from_source(source: impl Into<Box<dyn Error + Send + Sync>>) -> Error

    Create a new error with an associated source.

    \n

    NOTE: The “source” should NOT be used to propagate cryptographic\nerrors e.g. signature parsing or verification errors. The intended use\ncases are for propagating errors related to external signers, e.g.\ncommunication/authentication errors with HSMs, KMS, etc.

    \n
    ",0,"iroh_base::SignatureError"],["
    §

    impl From<Box<dyn Error + Send + Sync>> for Error

    §

    fn from(source: Box<dyn Error + Send + Sync>) -> Error

    Converts to this type from the input type.
    ","From>","iroh_base::SignatureError"],["
    §

    impl From<InternalError> for Error

    §

    fn from(err: InternalError) -> Error

    Converts to this type from the input type.
    ","From","iroh_base::SignatureError"]]]]); if (window.register_type_impls) { window.register_type_impls(type_impls); } else { window.pending_type_impls = type_impls; } })() -//{"start":55,"fragment_lengths":[13780]} \ No newline at end of file +//{"start":55,"fragment_lengths":[13369]} \ No newline at end of file