diff --git a/iroh-relay/src/protos/relay.rs b/iroh-relay/src/protos/relay.rs index 0f5aecaee3..de3e1f3b1c 100644 --- a/iroh-relay/src/protos/relay.rs +++ b/iroh-relay/src/protos/relay.rs @@ -289,6 +289,7 @@ impl Frame { /// Serialized length with frame header. #[cfg(feature = "server")] + #[cfg_attr(iroh_docsrs, doc(cfg(feature = "server")))] pub(crate) fn len_with_header(&self) -> usize { self.len() + HEADER_LEN } diff --git a/iroh-relay/src/quic.rs b/iroh-relay/src/quic.rs index a2fb91f22e..36aee227ec 100644 --- a/iroh-relay/src/quic.rs +++ b/iroh-relay/src/quic.rs @@ -13,6 +13,7 @@ pub const QUIC_ADDR_DISC_CLOSE_CODE: VarInt = VarInt::from_u32(1); pub const QUIC_ADDR_DISC_CLOSE_REASON: &[u8] = b"finished"; #[cfg(feature = "server")] +#[cfg_attr(iroh_docsrs, doc(cfg(feature = "server")))] pub(crate) mod server { use quinn::{crypto::rustls::QuicServerConfig, ApplicationClose}; use tokio::task::JoinSet; diff --git a/iroh-relay/src/server.rs b/iroh-relay/src/server.rs index 7d14b6befb..a54f4441ce 100644 --- a/iroh-relay/src/server.rs +++ b/iroh-relay/src/server.rs @@ -48,6 +48,7 @@ mod http_server; mod metrics; pub(crate) mod streams; #[cfg(feature = "test-utils")] +#[cfg_attr(iroh_docsrs, doc(cfg(feature = "test-utils")))] pub mod testing; pub use self::{ @@ -447,6 +448,7 @@ impl Server { /// /// This uses [`Self::https_addr`] so it's mostly useful for local development. #[cfg(feature = "test-utils")] + #[cfg_attr(iroh_docsrs, doc(cfg(feature = "test-utils")))] pub fn https_url(&self) -> Option { self.https_addr.map(|addr| { url::Url::parse(&format!("https://{addr}")) @@ -459,6 +461,7 @@ impl Server { /// /// This uses [`Self::http_addr`] so it's mostly useful for local development. #[cfg(feature = "test-utils")] + #[cfg_attr(iroh_docsrs, doc(cfg(feature = "test-utils")))] pub fn http_url(&self) -> Option { self.http_addr.map(|addr| { url::Url::parse(&format!("http://{addr}")) diff --git a/iroh/src/endpoint.rs b/iroh/src/endpoint.rs index f97b169684..e568fa5939 100644 --- a/iroh/src/endpoint.rs +++ b/iroh/src/endpoint.rs @@ -307,6 +307,7 @@ impl Builder { } #[cfg(feature = "discovery-pkarr-dht")] + #[cfg_attr(iroh_docsrs, doc(cfg(feature = "discovery-pkarr-dht")))] /// Configures the endpoint to also use the mainline DHT with default settings. /// /// This is equivalent to adding a [`crate::discovery::pkarr::dht::DhtDiscovery`] @@ -327,6 +328,7 @@ impl Builder { } #[cfg(feature = "discovery-local-network")] + #[cfg_attr(iroh_docsrs, doc(cfg(feature = "discovery-local-network")))] /// Configures the endpoint to also use local network discovery. /// /// This is equivalent to adding a [`crate::discovery::local_swarm_discovery::LocalSwarmDiscovery`] @@ -620,21 +622,6 @@ impl Endpoint { conn } - /// Connects to a remote endpoint, using just the nodes's [`NodeId`]. - /// - /// This is a convenience function for [`Endpoint::connect`]. It relies on addressing - /// information being provided by either the discovery service or using - /// [`Endpoint::add_node_addr`]. See [`Endpoint::connect`] for the details of how it - /// uses the discovery service to establish a connection to a remote node. - #[deprecated( - since = "0.27.0", - note = "Please use `connect` directly with a NodeId. This fn will be removed in 0.28.0." - )] - pub async fn connect_by_node_id(&self, node_id: NodeId, alpn: &[u8]) -> Result { - let addr = NodeAddr::new(node_id); - self.connect(addr, alpn).await - } - #[instrument( skip_all, fields(remote_node = node_id.fmt_short(), alpn = %String::from_utf8_lossy(alpn))