Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: fix doc links #387

Merged
merged 2 commits into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/engineioxide/src/service/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! ## A tower [`Service`](tower::Service) for engine.io so it can be used with frameworks supporting tower services
//! ## A tower [`Service`](tower_service::Service) for engine.io so it can be used with frameworks supporting tower services
//!
//!
//! #### Example with a `hyper` standalone service :
Expand Down
2 changes: 1 addition & 1 deletion crates/socketioxide/src/extract/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
//! that it is dropped at least when the socket is disconnected.
//! Otherwise it will create a memory leak. It is why the [`SocketRef`] extractor is used instead of cloning
//! the socket for common usage.
//! If you want to deserialize the [`Value`] data you must manually call the `Data` extractor to deserialize it.
//! If you want to deserialize the [`Value`](socketioxide_core::Value) data you must manually call the `Data` extractor to deserialize it.
//!
//! [`FromConnectParts`]: crate::handler::FromConnectParts
//! [`FromMessageParts`]: crate::handler::FromMessageParts
Expand Down
8 changes: 4 additions & 4 deletions crates/socketioxide/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl Default for SocketIoConfig {

/// A builder to create a [`SocketIo`] instance.
/// It contains everything to configure the socket.io server with a [`SocketIoConfig`].
/// It can be used to build either a Tower [`Layer`](tower::layer::Layer) or a [`Service`](tower::Service).
/// It can be used to build either a Tower [`Layer`](tower_layer::Layer) or a [`Service`](tower_service::Service).
pub struct SocketIoBuilder<A: Adapter = LocalAdapter> {
config: SocketIoConfig,
engine_config_builder: EngineIoConfigBuilder,
Expand Down Expand Up @@ -291,21 +291,21 @@ impl SocketIo<LocalAdapter> {

/// Creates a new [`SocketIoService`] and a [`SocketIo`] instance with a default config.
/// This service will be a _standalone_ service that return a 404 error for every non-socket.io request.
/// It can be used as a [`Service`](tower::Service) (see hyper example)
/// It can be used as a [`Service`](tower_service::Service) (see hyper example)
#[inline(always)]
pub fn new_svc() -> (SocketIoService<NotFoundService>, SocketIo) {
Self::builder().build_svc()
}

/// Creates a new [`SocketIoService`] and a [`SocketIo`] instance with a default config.
/// It can be used as a [`Service`](tower::Service) with an inner service
/// It can be used as a [`Service`](tower_service::Service) with an inner service
#[inline(always)]
pub fn new_inner_svc<S: Clone>(svc: S) -> (SocketIoService<S>, SocketIo) {
Self::builder().build_with_inner_svc(svc)
}

/// Builds a [`SocketIoLayer`] and a [`SocketIo`] instance with a default config.
/// It can be used as a tower [`Layer`](tower::layer::Layer) (see axum example)
/// It can be used as a tower [`Layer`](tower_layer::Layer) (see axum example)
#[inline(always)]
pub fn new_layer() -> (SocketIoLayer, SocketIo) {
Self::builder().build_layer()
Expand Down
8 changes: 4 additions & 4 deletions crates/socketioxide/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
nonstandard_style,
missing_docs
)]
//! Socketioxide is a socket.io server implementation that works as a [`tower`] layer/service.
//! It integrates nicely with the rest of the [`tower`]/[`tokio`]/[`hyper`](https://docs.rs/hyper/latest/hyper/) ecosystem.
//! Socketioxide is a socket.io server implementation that works as a tower layer/service.
//! It integrates nicely with the rest of the [`tower`](https://docs.rs/tower/latest/tower/)/[`tokio`]/[`hyper`](https://docs.rs/hyper/latest/hyper/) ecosystem.
//!
//! ## Table of contents
//! * [Features](#features)
Expand Down Expand Up @@ -60,7 +60,7 @@
//! * Polling & Websocket transports
//!
//! ## Compatibility
//! Because it works as a tower [`layer`](tower::layer)/[`service`](tower::Service) or an hyper [`service`](hyper::service::Service)
//! Because it works as a tower [`layer`](tower_layer::Layer)/[`service`](tower_service::Service) or an hyper [`service`](hyper::service::Service)
//! you can use it with any http server frameworks that works with tower/hyper:
//! * [Axum](https://docs.rs/axum/latest/axum/)
//! * [Warp](https://docs.rs/warp/latest/warp/) (Not supported with socketioxide >= 0.9.0 as long as warp doesn't migrate to hyper v1)
Expand Down Expand Up @@ -105,7 +105,7 @@
//! }
//! ```
//! ## Initialisation
//! The [`SocketIo`] struct is the main entry point of the library. It is used to create a [`Layer`](tower::layer) or a [`Service`](tower::Service).
//! The [`SocketIo`] struct is the main entry point of the library. It is used to create a [`Layer`](tower_layer::Layer) or a [`Service`](tower_service::Service).
//! Later it can be used as the equivalent of the `io` object in the JS API.
//!
//! When creating your [`SocketIo`] instance, you can use the builder pattern to configure it with the [`SocketIoBuilder`] struct.
Expand Down
2 changes: 1 addition & 1 deletion crates/socketioxide/src/service.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! ## A Tower [`Service`](tower::Service) and Hyper [`Service`](hyper::service::Service) for socket.io so it
//! ## A Tower [`Service`](tower_service::Service) and Hyper [`Service`](hyper::service::Service) for socket.io so it
//! can be used with frameworks supporting tower and hyper services.
//!
//! #### Example with a raw `hyper` standalone service (most of the time it easier to use a framework like `axum` or `salvo`):
Expand Down