From 07c5176bd0178c138dc10a1ef14c04520764f21d Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Thu, 21 Jul 2022 03:07:06 +0100 Subject: [PATCH] align descriptions --- README.md | 12 ++++++------ actix-cors/README.md | 2 +- actix-identity/Cargo.toml | 2 +- actix-identity/README.md | 6 +++--- actix-protobuf/Cargo.toml | 2 +- actix-protobuf/README.md | 5 +++-- actix-protobuf/src/lib.rs | 2 ++ actix-redis/Cargo.toml | 2 +- actix-redis/README.md | 2 +- actix-redis/src/lib.rs | 19 +++++++++---------- actix-redis/src/redis.rs | 22 ++++++++++++---------- actix-session/Cargo.toml | 2 +- actix-session/README.md | 2 +- actix-web-httpauth/README.md | 5 +++-- 14 files changed, 45 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 24ed51409..028519067 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ | Crate | | | | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| [actix-cors] | [![crates.io](https://img.shields.io/crates/v/actix-cors?label=latest)](https://crates.io/crates/actix-cors) [![dependency status](https://deps.rs/crate/actix-cors/0.6.1/status.svg)](https://deps.rs/crate/actix-cors/0.6.1) | Cross-origin resource sharing (CORS) for actix-web applications. | -| [actix-identity] | [![crates.io](https://img.shields.io/crates/v/actix-identity?label=latest)](https://crates.io/crates/actix-identity) [![dependency status](https://deps.rs/crate/actix-identity/0.4.0/status.svg)](https://deps.rs/crate/actix-identity/0.4.0) | Identity service for actix-web framework. | +| [actix-cors] | [![crates.io](https://img.shields.io/crates/v/actix-cors?label=latest)](https://crates.io/crates/actix-cors) [![dependency status](https://deps.rs/crate/actix-cors/0.6.1/status.svg)](https://deps.rs/crate/actix-cors/0.6.1) | Cross-Origin Resource Sharing (CORS) controls. | +| [actix-identity] | [![crates.io](https://img.shields.io/crates/v/actix-identity?label=latest)](https://crates.io/crates/actix-identity) [![dependency status](https://deps.rs/crate/actix-identity/0.4.0/status.svg)](https://deps.rs/crate/actix-identity/0.4.0) | Identity management. | | [actix-limitation] | [![crates.io](https://img.shields.io/crates/v/actix-limitation?label=latest)](https://crates.io/crates/actix-limitation) [![dependency status](https://deps.rs/crate/actix-limitation/0.3.0/status.svg)](https://deps.rs/crate/actix-limitation/0.3.0) | Rate-limiting using a fixed window counter for arbitrary keys, backed by Redis. | -| [actix-protobuf] | [![crates.io](https://img.shields.io/crates/v/actix-protobuf?label=latest)](https://crates.io/crates/actix-protobuf) [![dependency status](https://deps.rs/crate/actix-protobuf/0.8.0/status.svg)](https://deps.rs/crate/actix-protobuf/0.8.0) | Protobuf support for actix-web framework. | -| [actix-redis] | [![crates.io](https://img.shields.io/crates/v/actix-redis?label=latest)](https://crates.io/crates/actix-redis) [![dependency status](https://deps.rs/crate/actix-redis/0.12.0/status.svg)](https://deps.rs/crate/actix-redis/0.12.0) | Redis integration for actix framework. | -| [actix-session] | [![crates.io](https://img.shields.io/crates/v/actix-session?label=latest)](https://crates.io/crates/actix-session) [![dependency status](https://deps.rs/crate/actix-session/0.7.0/status.svg)](https://deps.rs/crate/actix-session/0.7.0) | Session for actix-web framework. | -| [actix-web-httpauth] | [![crates.io](https://img.shields.io/crates/v/actix-web-httpauth?label=latest)](https://crates.io/crates/actix-web-httpauth) [![dependency status](https://deps.rs/crate/actix-web-httpauth/0.8.0/status.svg)](https://deps.rs/crate/actix-web-httpauth/0.8.0) | HTTP authentication schemes for actix-web. | +| [actix-protobuf] | [![crates.io](https://img.shields.io/crates/v/actix-protobuf?label=latest)](https://crates.io/crates/actix-protobuf) [![dependency status](https://deps.rs/crate/actix-protobuf/0.8.0/status.svg)](https://deps.rs/crate/actix-protobuf/0.8.0) | Protobuf payload extractor. | +| [actix-redis] | [![crates.io](https://img.shields.io/crates/v/actix-redis?label=latest)](https://crates.io/crates/actix-redis) [![dependency status](https://deps.rs/crate/actix-redis/0.12.0/status.svg)](https://deps.rs/crate/actix-redis/0.12.0) | Actor-based Redis client. | +| [actix-session] | [![crates.io](https://img.shields.io/crates/v/actix-session?label=latest)](https://crates.io/crates/actix-session) [![dependency status](https://deps.rs/crate/actix-session/0.7.0/status.svg)](https://deps.rs/crate/actix-session/0.7.0) | Session management. | +| [actix-web-httpauth] | [![crates.io](https://img.shields.io/crates/v/actix-web-httpauth?label=latest)](https://crates.io/crates/actix-web-httpauth) [![dependency status](https://deps.rs/crate/actix-web-httpauth/0.8.0/status.svg)](https://deps.rs/crate/actix-web-httpauth/0.8.0) | HTTP authentication schemes. | --- diff --git a/actix-cors/README.md b/actix-cors/README.md index dc6f4d112..e0e91f6f5 100644 --- a/actix-cors/README.md +++ b/actix-cors/README.md @@ -1,6 +1,6 @@ # actix-cors -> Cross-origin resource sharing (CORS) for Actix Web. +> Cross-Origin Resource Sharing (CORS) controls for Actix Web. [![crates.io](https://img.shields.io/crates/v/actix-cors?label=latest)](https://crates.io/crates/actix-cors) [![Documentation](https://docs.rs/actix-cors/badge.svg?version=0.6.1)](https://docs.rs/actix-cors/0.6.1) diff --git a/actix-identity/Cargo.toml b/actix-identity/Cargo.toml index fd82e024e..54994dd63 100644 --- a/actix-identity/Cargo.toml +++ b/actix-identity/Cargo.toml @@ -5,7 +5,7 @@ authors = [ "Nikolay Kim ", "Luca Palmieri ", ] -description = "Identity service for Actix Web" +description = "Identity management for Actix Web" keywords = ["actix", "auth", "identity", "web", "security"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-extras.git" diff --git a/actix-identity/README.md b/actix-identity/README.md index 53386d936..c3a7792b0 100644 --- a/actix-identity/README.md +++ b/actix-identity/README.md @@ -1,6 +1,6 @@ # actix-identity -> Identity service for actix-web framework. +> Identity management for Actix Web. [![crates.io](https://img.shields.io/crates/v/actix-identity?label=latest)](https://crates.io/crates/actix-identity) [![Documentation](https://docs.rs/actix-identity/badge.svg?version=0.5.2)](https://docs.rs/actix-identity/0.5.2) @@ -9,5 +9,5 @@ ## Documentation & community resources -* [API Documentation](https://docs.rs/actix-identity) -* Minimum Supported Rust Version (MSRV): 1.57 +- [API Documentation](https://docs.rs/actix-identity) +- Minimum Supported Rust Version (MSRV): 1.57 diff --git a/actix-protobuf/Cargo.toml b/actix-protobuf/Cargo.toml index 439e28592..6a5d3a44a 100644 --- a/actix-protobuf/Cargo.toml +++ b/actix-protobuf/Cargo.toml @@ -6,7 +6,7 @@ authors = [ "kingxsp ", "Yuki Okushi ", ] -description = "Protobuf support for Actix Web" +description = "Protobuf payload extractor for Actix Web" keywords = ["actix", "web", "protobuf", "protocol", "rpc"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-extras.git" diff --git a/actix-protobuf/README.md b/actix-protobuf/README.md index 9ca0a444f..6588bdb5e 100644 --- a/actix-protobuf/README.md +++ b/actix-protobuf/README.md @@ -1,6 +1,6 @@ # actix-protobuf -> Protobuf support for Actix Web. +> Protobuf payload extractor for Actix Web. [![crates.io](https://img.shields.io/crates/v/actix-protobuf?label=latest)](https://crates.io/crates/actix-protobuf) [![Documentation](https://docs.rs/actix-protobuf/badge.svg?version=0.8.0)](https://docs.rs/actix-protobuf/0.8.0) @@ -23,6 +23,7 @@ use actix_web::*; pub struct MyObj { #[prost(int32, tag = "1")] pub number: i32, + #[prost(string, tag = "2")] pub name: String, } @@ -33,7 +34,7 @@ async fn index(msg: ProtoBuf) -> Result { } ``` -See [here](https://github.com/actix/actix-extras/tree/master/actix-protobuf/examples/prost-example) for the complete example. +See [here](https://github.com/actix/examples/tree/master/protobuf) for the complete example. ## License diff --git a/actix-protobuf/src/lib.rs b/actix-protobuf/src/lib.rs index 2592a6875..8f13f9c8f 100644 --- a/actix-protobuf/src/lib.rs +++ b/actix-protobuf/src/lib.rs @@ -1,3 +1,5 @@ +//! Protobuf payload extractor for Actix Web. + #![forbid(unsafe_code)] #![deny(rust_2018_idioms, nonstandard_style)] #![warn(future_incompatible)] diff --git a/actix-redis/Cargo.toml b/actix-redis/Cargo.toml index 3fdfd1518..0128f50ad 100644 --- a/actix-redis/Cargo.toml +++ b/actix-redis/Cargo.toml @@ -2,7 +2,7 @@ name = "actix-redis" version = "0.12.0" authors = ["Nikolay Kim "] -description = "Redis integration for Actix" +description = "Actor-based Redis client" license = "MIT OR Apache-2.0" keywords = ["actix", "redis", "async"] homepage = "https://actix.rs" diff --git a/actix-redis/README.md b/actix-redis/README.md index c3dcd2234..deacdc857 100644 --- a/actix-redis/README.md +++ b/actix-redis/README.md @@ -1,6 +1,6 @@ # actix-redis -> Redis integration for Actix. +> Actor-based Redis client. [![crates.io](https://img.shields.io/crates/v/actix-redis?label=latest)](https://crates.io/crates/actix-redis) [![Documentation](https://docs.rs/actix-redis/badge.svg?version=0.12.0)](https://docs.rs/actix-redis/0.12.0) diff --git a/actix-redis/src/lib.rs b/actix-redis/src/lib.rs index 1c183fa81..e7cd980c8 100644 --- a/actix-redis/src/lib.rs +++ b/actix-redis/src/lib.rs @@ -4,27 +4,26 @@ #![deny(rust_2018_idioms, nonstandard_style)] #![warn(future_incompatible)] -mod redis; use derive_more::{Display, Error, From}; -pub use redis::{Command, RedisActor}; +pub use redis_async::{error::Error as RespError, resp::RespValue, resp_array}; + +mod redis; +pub use self::redis::{Command, RedisActor}; /// General purpose `actix-redis` error. #[derive(Debug, Display, Error, From)] pub enum Error { - #[display(fmt = "Redis error {}", _0)] + #[display(fmt = "Redis error: {}", _0)] Redis(redis_async::error::Error), - /// Receiving message during reconnecting + + /// Receiving message during reconnecting. #[display(fmt = "Redis: Not connected")] NotConnected, - /// Cancel all waters when connection get dropped + + /// Cancel all waiters when connection is dropped. #[display(fmt = "Redis: Disconnected")] Disconnected, } #[cfg(feature = "web")] impl actix_web::ResponseError for Error {} - -// re-export -pub use redis_async::error::Error as RespError; -pub use redis_async::resp::RespValue; -pub use redis_async::resp_array; diff --git a/actix-redis/src/redis.rs b/actix-redis/src/redis.rs index 979a941f0..5f59ea00f 100644 --- a/actix-redis/src/redis.rs +++ b/actix-redis/src/redis.rs @@ -1,22 +1,24 @@ -use std::collections::VecDeque; -use std::io; +use std::{collections::VecDeque, io}; use actix::prelude::*; use actix_rt::net::TcpStream; use actix_service::boxed::{self, BoxService}; use actix_tls::connect::{ConnectError, ConnectInfo, Connection, ConnectorService}; -use backoff::backoff::Backoff; -use backoff::ExponentialBackoff; +use backoff::{backoff::Backoff, ExponentialBackoff}; use log::{error, info, warn}; -use redis_async::error::Error as RespError; -use redis_async::resp::{RespCodec, RespValue}; -use tokio::io::{split, WriteHalf}; -use tokio::sync::oneshot; +use redis_async::{ + error::Error as RespError, + resp::{RespCodec, RespValue}, +}; +use tokio::{ + io::{split, WriteHalf}, + sync::oneshot, +}; use tokio_util::codec::FramedRead; use crate::Error; -/// Command for send data to Redis +/// Command for sending data to Redis. #[derive(Debug)] pub struct Command(pub RespValue); @@ -24,7 +26,7 @@ impl Message for Command { type Result = Result; } -/// Redis communication actor +/// Redis communication actor. pub struct RedisActor { addr: String, connector: BoxService, Connection, ConnectError>, diff --git a/actix-session/Cargo.toml b/actix-session/Cargo.toml index fdbf9a6d7..147406458 100644 --- a/actix-session/Cargo.toml +++ b/actix-session/Cargo.toml @@ -5,7 +5,7 @@ authors = [ "Nikolay Kim ", "Luca Palmieri ", ] -description = "Session management for Actix Web" +description = "Session management for Actix We" keywords = ["http", "web", "framework", "async", "session"] homepage = "https://actix.rs" repository = "https://github.com/actix/actix-extras.git" diff --git a/actix-session/README.md b/actix-session/README.md index c9aceceb9..99acdc561 100644 --- a/actix-session/README.md +++ b/actix-session/README.md @@ -1,6 +1,6 @@ # actix-session -> Session management for Actix Web applications. +> Session management for Actix Web. [![crates.io](https://img.shields.io/crates/v/actix-session?label=latest)](https://crates.io/crates/actix-session) [![Documentation](https://docs.rs/actix-session/badge.svg?version=0.7.0)](https://docs.rs/actix-session/0.7.0) diff --git a/actix-web-httpauth/README.md b/actix-web-httpauth/README.md index 82e59c806..55dd7a0a5 100644 --- a/actix-web-httpauth/README.md +++ b/actix-web-httpauth/README.md @@ -1,6 +1,6 @@ # actix-web-httpauth -> HTTP authentication schemes for [actix-web](https://github.com/actix/actix-web). +> HTTP authentication schemes for [Actix Web](https://actix.rs). [![crates.io](https://img.shields.io/crates/v/actix-web-httpauth?label=latest)](https://crates.io/crates/actix-web-httpauth) [![Documentation](https://docs.rs/actix-web-httpauth/badge.svg?version=0.8.0)](https://docs.rs/actix-web-httpauth/0.8.0) @@ -13,6 +13,7 @@ - Minimum Supported Rust Version (MSRV): 1.57 ## Features + - Typed [Authorization] and [WWW-Authenticate] headers - [Extractors] for authorization headers - [Middleware] for easier authorization checking @@ -20,10 +21,10 @@ All supported schemas can be used in both middleware and request handlers. ## Supported Schemes + - [HTTP Basic](https://tools.ietf.org/html/rfc7617) - [OAuth Bearer](https://tools.ietf.org/html/rfc6750) - [Authorization]: https://docs.rs/actix-web-httpauth/*/actix_web_httpauth/headers/authorization/index.html