├── examples ├── axum │ ├── .gitignore │ ├── rust.db │ ├── Cargo.toml │ └── src │ │ └── main.rs └── serenity │ ├── sqlite.db │ ├── Cargo.toml │ └── src │ └── main.rs ├── .gitignore ├── sqlx-crud-macros ├── .gitignore ├── Cargo.toml └── src │ └── lib.rs ├── src ├── schema.rs ├── lib.rs └── traits.rs ├── MILESTONES ├── LICENSE ├── Cargo.toml ├── README.md └── Cargo.lock /examples/axum/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /rusty-tags.vi 3 | -------------------------------------------------------------------------------- /sqlx-crud-macros/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /examples/axum/rust.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treydempsey/sqlx-crud/HEAD/examples/axum/rust.db -------------------------------------------------------------------------------- /examples/serenity/sqlite.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/treydempsey/sqlx-crud/HEAD/examples/serenity/sqlite.db -------------------------------------------------------------------------------- /src/schema.rs: -------------------------------------------------------------------------------- 1 | pub struct Metadata<'s, const C: usize> { 2 | pub table_name: &'s str, 3 | pub id_column: &'s str, 4 | pub columns: [&'s str; C], 5 | pub select_sql: &'s str, 6 | pub select_by_id_sql: &'s str, 7 | pub insert_sql: &'s str, 8 | pub update_by_id_sql: &'s str, 9 | pub delete_by_id_sql: &'s str, 10 | } 11 | -------------------------------------------------------------------------------- /examples/serenity/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "issue-9" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | tokio = { version = "1", features = ["macros"]} 10 | serenity = "0.11" 11 | sqlx = { version = "*", features = ["runtime-tokio-rustls", "sqlite"] } 12 | sqlx-crud = { path = "../..", features = ["runtime-tokio-rustls"] } 13 | -------------------------------------------------------------------------------- /MILESTONES: -------------------------------------------------------------------------------- 1 | # Roadmap and Major Milestones 2 | 3 | - [x] Use absolute namespaces in the proc_macro 4 | - [x] Add documentation 5 | - [x] Add working doctest examples 6 | - [x] Add readme, license and other support files 7 | - [x] Package and release to crates.io 8 | - [x] Allow database assigned primary keys 9 | - [x] Crud::create() should return the assigned ID 10 | - [x] Remove doctest feature flag workaround 11 | - [x] Axum Support (Send Futures) 12 | - [ ] Add a field attribute to ignore fields 13 | - [ ] Remove SQLx feature flag duplication 14 | - [ ] Break down the sqlx-crud-macros crate in to simpler units 15 | -------------------------------------------------------------------------------- /examples/axum/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "axum" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | anyhow = { version = "1.0.70", features = ["backtrace"] } 10 | axum = "0.6.12" 11 | serde = { version = "1.0.159", features = ["derive"] } 12 | serde_json = "1.0.95" 13 | sqlx = { version = "0.6.3", features = ["macros", "migrate", "runtime-tokio-rustls", "sqlite"] } 14 | sqlx-crud = { path = "../..", features = ["runtime-tokio-rustls"] } 15 | tokio = { version = "1.27.0", features = ["macros", "rt-multi-thread"] } 16 | -------------------------------------------------------------------------------- /sqlx-crud-macros/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sqlx-crud-macros" 3 | version = "0.4.0" 4 | edition = "2021" 5 | repository = "https://github.com/treydempsey/sqlx-crud" 6 | documentation = "https://docs.rs/sqlx-crud" 7 | description = "Proc macro implemtation for sqlx-crud to implement Create, Read, Update, and Delete (CRUD) methods on SQLx for you 🪄 📖 📝 ❌" 8 | license = "MIT" 9 | keywords = ["sqlx", "orm", "crud", "database"] 10 | categories = ["database", "asynchronous", "web-programming"] 11 | authors = ["Trey Dempsey "] 12 | 13 | [lib] 14 | proc-macro = true 15 | 16 | [dependencies] 17 | Inflector = "0.11" 18 | proc-macro2 = "1.0" 19 | quote = "1.0" 20 | syn = { version = "2.0", features = ["full"] } 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Trey Dempsey 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | ".", 4 | "sqlx-crud-macros", 5 | "examples/axum", 6 | "examples/serenity", 7 | ] 8 | 9 | [package] 10 | name = "sqlx-crud" 11 | version = "0.4.0" 12 | edition = "2021" 13 | readme = "README.md" 14 | repository = "https://github.com/treydempsey/sqlx-crud" 15 | documentation = "https://docs.rs/sqlx-crud" 16 | description = "Derive macro for SQLx to implement Create, Read, Update, and Delete (CRUD) methods for you." 17 | license = "MIT" 18 | keywords = ["sqlx", "orm", "crud", "database"] 19 | categories = ["database", "asynchronous", "web-programming"] 20 | authors = ["Trey Dempsey "] 21 | 22 | [features] 23 | default = ["runtime-tokio-rustls"] 24 | runtime-actix-native-tls = ["sqlx/runtime-actix-native-tls"] 25 | runtime-async-std-native-tls = ["sqlx/runtime-async-std-native-tls"] 26 | runtime-tokio-native-tls = ["sqlx/runtime-tokio-native-tls"] 27 | runtime-actix-rustls = ["sqlx/runtime-actix-rustls"] 28 | runtime-async-std-rustls = ["sqlx/runtime-async-std-rustls"] 29 | runtime-tokio-rustls = ["sqlx/runtime-tokio-rustls"] 30 | 31 | [dependencies] 32 | futures = "0.3" 33 | sqlx = { version = "0.6" } 34 | sqlx-crud-macros = { version = "0.4", path = "sqlx-crud-macros" } 35 | thiserror = "1" 36 | 37 | [dev-dependencies] 38 | sqlx = { version = "0.6", features = ["runtime-tokio-rustls", "sqlite"] } 39 | tokio-test = "0" 40 | -------------------------------------------------------------------------------- /examples/serenity/src/main.rs: -------------------------------------------------------------------------------- 1 | use serenity::async_trait; 2 | use serenity::prelude::*; 3 | use sqlx::{FromRow, Pool, Sqlite, SqlitePool}; 4 | use sqlx_crud::SqlxCrud; 5 | 6 | struct Handler { 7 | db: Pool, 8 | } 9 | 10 | #[derive(FromRow, SqlxCrud)] 11 | struct User { 12 | id: i64, 13 | name: String, 14 | } 15 | 16 | #[async_trait] 17 | impl EventHandler for Handler { 18 | async fn message(&self, _ctx: Context, _msg: serenity::model::channel::Message) { 19 | use sqlx_crud::Crud; 20 | 21 | // Taken from https://github.com/treydempsey/sqlx-crud/issues/9#issuecomment-1509718232 22 | 23 | let r = User { 24 | id: 1, 25 | name: "test".to_owned(), 26 | } 27 | .create(&self.db) 28 | .await; 29 | 30 | assert!(r.is_ok()); 31 | let user = r.unwrap(); 32 | assert_eq!(1, user.id); 33 | assert_eq!("test", user.name); 34 | 35 | let r = User::by_id(&self.db, 1).await; 36 | assert!(r.is_ok()); 37 | let o = r.unwrap(); 38 | assert!(o.is_some()); 39 | let user = o.unwrap(); 40 | assert_eq!(1, user.id); 41 | assert_eq!("test", user.name); 42 | 43 | let mut user = user; 44 | user.name = "vogon".to_string(); 45 | let r = user.update(&self.db).await; 46 | assert!(r.is_ok()); 47 | let user = r.unwrap(); 48 | assert_eq!(1, user.id); 49 | assert_eq!("vogon", user.name); 50 | 51 | let r = User::by_id(&self.db, 1).await; 52 | assert!(r.is_ok()); 53 | let o = r.unwrap(); 54 | assert!(o.is_some()); 55 | let user = o.unwrap(); 56 | assert_eq!(1, user.id); 57 | assert_eq!("vogon", user.name); 58 | 59 | let r = user.delete(&self.db).await; 60 | assert!(r.is_ok()); 61 | 62 | let r = User::by_id(&self.db, 1).await; 63 | assert!(r.is_ok()); 64 | let o = r.unwrap(); 65 | assert!(o.is_none()); 66 | } 67 | } 68 | 69 | #[tokio::main] 70 | async fn main() { 71 | let db = SqlitePool::connect("sqlite:sqlite.db").await.unwrap(); 72 | 73 | let _ = Handler { db }; 74 | } 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sqlx-crud 2 | 3 | sqlx-crud is an extension to [SQLx](https://github.com/launchbadge/sqlx) to 4 | derive Create, Read, Update, and Delete (CRUD) methods for a struct 5 | representing a table in a sqlx database. 6 | 7 | ```rust 8 | use sqlx::FromRow; 9 | use sqlx_crud::SqlxCrud; 10 | 11 | #[derive(Debug, FromRow, SqlxCrud)] 12 | struct User { 13 | user_id: i32, 14 | name: String, 15 | } 16 | 17 | if let Some(user) = User::by_id(&pool, 42) { 18 | println!("Found user user_id=42: {:?}", user); 19 | } 20 | ``` 21 | 22 | ### Notable Features 23 | 24 | * **Single Derive Macro for Structs** 25 | 26 | * **Methods to Create, Read, Update, and Delete Records** 27 | 28 | * **Primary Key and Table Name Inference** 29 | 30 | * **Table Metadata for Reuse** 31 | 32 | * **Internal and External Database ID Assignment** 33 | 34 | This removes much of the common, repetitive code needed when dealing with 35 | the typical CRUD operations. 36 | 37 | sqlx-crud strives to do a few, narrowly defined things well in an effort 38 | to reduce 80% of the redundant code you might write for a database 39 | application when operating on a single table at a time. It provides 40 | mechanisms: [Schema](./src/traits.rs) and [Crud](./src/traits.rs), to access 41 | and reuse the generated id, column, and query metadata. This can help with 42 | writing more complex queries outside of the single table CRUD paradigm, but 43 | its primary use case is for CRUD. 44 | 45 | ## Installation 46 | 47 | Installing sqlx-crud is similar to installing SQLx. 48 | 49 | ```toml 50 | # Cargo.toml 51 | [dependencies] 52 | sqlx-crud = { version = "0", features = ["runtime-tokio-rustls"] } 53 | ``` 54 | 55 | See the [documentation](https://docs.rs/sqlx-crud/latest) for full usage 56 | instructions. 57 | 58 | ## Features 59 | 60 | sqlx-crud uses the same features as SQLx `runtime-*` flags and are required because of 61 | the dependency on SQLx. 62 | 63 | ## Examples 64 | 65 | You can find real-world examples under the [examples](./examples) directory. 66 | 67 | ## Source code 68 | 69 | Source code for sqlx-crud is available at 70 | [https://www.github.com/treydempsey/sqlx-crud](https://www.github.com/treydempsey/sqlx-crud). 71 | 72 | ## Tests 73 | 74 | The doctests depend on `SQLx` and it's `runtime-tokio-rustls` and `sqlite` 75 | features. 76 | 77 | The tests can be run with: 78 | 79 | ```sh 80 | $ cargo test 81 | ``` 82 | 83 | ## Documentation 84 | 85 | Documentation is hosted at [sqlx-crud docs](https://docs.rs/sqlx-crud/latest). 86 | 87 | ## Roadmap 88 | 89 | sqlx-crud does most of what I need it to do, however while packaging it for 90 | release to others I realized there are several improvements that could be made. 91 | Planned updates and major achievements are listed in [MILESTONES](./MILESTONES). 92 | 93 | ## License 94 | 95 | sqlx-crud is licensed under the MIT license (see: [LICENSE](./LICENSE)). 96 | -------------------------------------------------------------------------------- /examples/axum/src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Context; 2 | use axum::extract::Path; 3 | use axum::http::StatusCode; 4 | use axum::response::{IntoResponse, Response}; 5 | use axum::routing; 6 | use axum::Extension; 7 | use axum::Json; 8 | use axum::Router; 9 | use axum::Server; 10 | use serde::Deserialize; 11 | use serde::Serialize; 12 | use sqlx::sqlite::SqlitePool; 13 | use sqlx::sqlite::SqlitePoolOptions; 14 | use sqlx::FromRow; 15 | use sqlx_crud::Crud; 16 | use sqlx_crud::SqlxCrud; 17 | 18 | use std::net::{IpAddr, Ipv4Addr, SocketAddr}; 19 | 20 | #[derive(FromRow, Deserialize, Serialize, SqlxCrud)] 21 | struct Task { 22 | pub id: i64, 23 | pub task: String, 24 | } 25 | 26 | async fn tasks(Extension(pool): Extension) -> Response { 27 | match Task::all(&pool).await { 28 | Ok(tasks) => (StatusCode::OK, Json(tasks)).into_response(), 29 | Err(_) => (StatusCode::INTERNAL_SERVER_ERROR).into_response(), 30 | } 31 | } 32 | 33 | async fn new_task(Extension(pool): Extension, Json(new_task): Json) -> Response { 34 | match new_task.create(&pool).await { 35 | Ok(r) => (StatusCode::OK, Json(r)).into_response(), 36 | Err(_) => (StatusCode::INTERNAL_SERVER_ERROR).into_response(), 37 | } 38 | } 39 | 40 | async fn task(Path(task_id): Path, Extension(pool): Extension) -> Response { 41 | match Task::by_id(&pool, task_id).await { 42 | Ok(Some(task)) => (StatusCode::OK, Json(task)).into_response(), 43 | Ok(None) => (StatusCode::NOT_FOUND).into_response(), 44 | Err(_) => (StatusCode::INTERNAL_SERVER_ERROR).into_response(), 45 | } 46 | } 47 | 48 | async fn update_task( 49 | Path(task_id): Path, 50 | Extension(pool): Extension, 51 | Json(mut task): Json, 52 | ) -> Response { 53 | if let Ok(Some(_)) = Task::by_id(&pool, task_id).await { 54 | task.id = task_id; 55 | match task.update(&pool).await { 56 | Ok(r) => (StatusCode::OK, Json(r)).into_response(), 57 | Err(_) => (StatusCode::INTERNAL_SERVER_ERROR).into_response(), 58 | } 59 | } else { 60 | (StatusCode::NOT_ACCEPTABLE).into_response() 61 | } 62 | } 63 | 64 | #[tokio::main] 65 | async fn main() -> anyhow::Result<()> { 66 | let pool = SqlitePoolOptions::new() 67 | .connect("sqlite://rust.db") 68 | .await 69 | .context("could not connect to database")?; 70 | 71 | let app = Router::new() 72 | .route("/tasks", routing::get(tasks)) 73 | .route("/tasks", routing::post(new_task)) 74 | .route("/tasks/:id", routing::put(update_task)) 75 | .route("/tasks/:id", routing::get(task)) 76 | .layer(Extension(pool)); 77 | 78 | let addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 3000); 79 | Server::bind(&addr).serve(app.into_make_service()).await?; 80 | 81 | Ok(()) 82 | } 83 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | //! sqlx-crud is an extension to [sqlx] to derive Create, Read, Update, and 2 | //! Delete (CRUD) methods for a struct representing a table in a sqlx database. 3 | //! 4 | //! This removes much of the common, repetitive code needed when dealing with 5 | //! the typical CRUD operations. 6 | //! 7 | //! This library strives to do a few, narrowly defined things well in an effort 8 | //! to reduce 80% of the redundant code you might write for a database 9 | //! application when operating on a single table at a time. It provides 10 | //! mechanisms: [Schema] and [Crud], to access and reuse the generated id, 11 | //! column, and query metadata. This can help with writing more complex queries 12 | //! outside of the single table CRUD paradigm. 13 | //! 14 | //! [sqlx]: https://github.com/launchbadge/sqlx 15 | //! 16 | //! # Design Considerations 17 | //! 18 | //! The code currently assumes identifiers are assigned outside of the database. 19 | //! This likely means the identifier is a UUID. Database generated IDs will be 20 | //! added in a subsequent release. 21 | //! 22 | //! The primary key for the table can be indicated by use of the [sqlx_crud_macros::SqlxCrud] 23 | //! `#[id]` field attribute. If no field is tagged as the [sqlx_crud_macros::SqlxCrud] `#[id]` 24 | //! then the first field in the struct is assumed to be the ID. 25 | //! 26 | //! The ordering of the columns used by queries and which columns are present 27 | //! is controlled by the field order of the struct. Ignored fields are not 28 | //! currently supported but will be added. 29 | //! 30 | //! # Features 31 | //! 32 | //! Because sqlx-crud depends on sqlx you need to use the same executor and TLS 33 | //! feature pair as you did with sqlx. If for example you used `tokio-rustls` 34 | //! with sqlx you should also use the same feature with sqlx-crud. 35 | //! 36 | //! Hopefully I can figure out a way to remove this requirement. I think 37 | //! I might need to use a build.rs script and interrogate the sqlx features that way. 38 | //! 39 | //! # Examples 40 | //! 41 | //! Given a table `users` defined as: 42 | //! 43 | //! ```sql 44 | //! CREATE TABLE users ( 45 | //! id INTEGER PRIMARY KEY NOT NULL, 46 | //! username TEXT NOT NULL 47 | //! ); 48 | //! ``` 49 | //! 50 | //! To define a `User` struct with generated [Crud] methods: 51 | //! 52 | //! ```rust 53 | //! use sqlx::FromRow; 54 | //! use sqlx_crud::SqlxCrud; 55 | //! 56 | //! #[derive(Debug, FromRow, SqlxCrud)] 57 | //! pub struct User { 58 | //! pub user_id: i32, 59 | //! pub name: String, 60 | //! } 61 | //! ``` 62 | //! 63 | //! [Crud]: traits/trait.Crud.html 64 | //! 65 | //! To create a new `User` in the database: 66 | //! 67 | //! ```rust 68 | //! # sqlx_crud::doctest_setup! { |pool| { 69 | //! use sqlx_crud::Crud; 70 | //! 71 | //! let new_user = User { user_id: 2, name: "new_user".to_string() }; 72 | //! new_user.create(&pool).await?; 73 | //! # }} 74 | //! ``` 75 | //! 76 | //! To query for a `User` where `user_id = 1`: 77 | //! 78 | //! ```rust 79 | //! # sqlx_crud::doctest_setup! { |pool| { 80 | //! use sqlx_crud::Crud; 81 | //! 82 | //! if let Some(user) = User::by_id(&pool, 1).await? { 83 | //! println!("User: {:?}", user); 84 | //! } 85 | //! # }} 86 | //! ``` 87 | //! 88 | //! To update an existing record: 89 | //! 90 | //! ```rust 91 | //! # sqlx_crud::doctest_setup! { |pool| { 92 | //! use sqlx_crud::Crud; 93 | //! 94 | //! if let Some(mut user) = User::by_id(&pool, 1).await? { 95 | //! user.name = "something else".to_string(); 96 | //! user.update(&pool).await?; 97 | //! } 98 | //! # }} 99 | //! ``` 100 | //! 101 | //! To delete a record: 102 | //! 103 | //! ```rust 104 | //! # sqlx_crud::doctest_setup! { |pool| { 105 | //! use sqlx_crud::Crud; 106 | //! 107 | //! if let Some(mut user) = User::by_id(&pool, 1).await? { 108 | //! user.delete(&pool).await?; 109 | //! } 110 | //! # }} 111 | //! ``` 112 | //! 113 | //! Reusing and modifying the [select_sql] query string: 114 | //! 115 | //! ```rust 116 | //! # sqlx_crud::doctest_setup! { |pool| { 117 | //! use futures::stream::TryStreamExt; 118 | //! use sqlx_crud::{Schema, SqlxCrud}; 119 | //! 120 | //! #[derive(Debug, FromRow, SqlxCrud)] 121 | //! pub struct User { 122 | //! pub user_id: i32, 123 | //! pub name: String, 124 | //! } 125 | //! 126 | //! impl User { 127 | //! pub async fn all_limit(pool: &SqlitePool, limit: i32) -> Result, sqlx::Error> { 128 | //! let query = format!( 129 | //! "{} ORDER BY users.id ASC LIMIT ?", 130 | //! ::select_sql() 131 | //! ); 132 | //! 133 | //! let mut users = Vec::new(); 134 | //! let mut stream = sqlx::query_as::<_, Self>(&query) 135 | //! .bind(limit) 136 | //! .fetch(pool); 137 | //! 138 | //! while let Some(user) = stream.try_next().await? { 139 | //! users.push(user); 140 | //! } 141 | //! 142 | //! Ok(users) 143 | //! } 144 | //! } 145 | //! # }} 146 | //! ``` 147 | //! 148 | //! # Planned Future Improvements 149 | //! 150 | //! Subsequent updates will extend the library to be more useful in a larger 151 | //! variety of situations. 152 | //! 153 | //! * Allow database assigned primary keys 154 | //! * Crud::create() should return the assigned ID 155 | //! * Add a field attribute to ignore fields 156 | 157 | pub mod schema; 158 | pub mod traits; 159 | 160 | pub use sqlx_crud_macros::SqlxCrud; 161 | pub use traits::{Crud, Schema}; 162 | 163 | #[macro_export] 164 | #[doc(hidden)] 165 | macro_rules! doctest_setup { 166 | (|$pool:ident| $($t:tt)*) => { 167 | use sqlx::FromRow; 168 | use sqlx::SqlitePool; 169 | use sqlx_crud::SqlxCrud; 170 | 171 | #[derive(Debug, FromRow, SqlxCrud)] 172 | pub struct User { 173 | pub user_id: i32, 174 | pub name: String, 175 | } 176 | 177 | fn main() -> Result<(), sqlx::Error> { 178 | tokio_test::block_on(async { 179 | let $pool = SqlitePool::connect(":memory:") 180 | .await?; 181 | sqlx::query("CREATE TABLE users (user_id INTEGER NOT NULL, name TEXT NOT NULL)") 182 | .execute(&$pool) 183 | .await?; 184 | sqlx::query("INSERT INTO users (user_id, name) VALUES(?, ?)") 185 | .bind::(1) 186 | .bind("test") 187 | .execute(&$pool) 188 | .await?; 189 | 190 | $($t)*; 191 | 192 | Ok::<(), sqlx::Error>(()) 193 | }); 194 | Ok::<(), sqlx::Error>(()) 195 | } 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /src/traits.rs: -------------------------------------------------------------------------------- 1 | use std::pin::Pin; 2 | 3 | use futures::stream::Stream; 4 | use futures::stream::TryCollect; 5 | use futures::Future; 6 | use futures::{future, TryFutureExt, TryStreamExt}; 7 | use sqlx::database::HasArguments; 8 | use sqlx::{Database, Encode, Executor, FromRow, IntoArguments, Type}; 9 | 10 | /// Type alias for methods returning a single element. The future resolves to and 11 | /// `Result`. 12 | pub type CrudFut<'e, T> = Pin> + Send + 'e>>; 13 | 14 | /// Type alias for a [`Stream`] returning items of type `Result`. 15 | pub type CrudStream<'e, T> = 16 | Pin> + std::marker::Send + 'e>>; 17 | 18 | /// Type alias for a [`TryCollect`] future that resolves to `Result, sqlx::Error>`. 19 | pub type TryCollectFut<'e, T> = TryCollect, Vec>; 20 | 21 | /// Database schema information about a struct implementing sqlx [FromRow]. 22 | /// [Schema] defines methods for accessing the derived database schema 23 | /// and query information. 24 | /// 25 | /// This trait is implemented by the [SqlxCrud] derive macro. 26 | /// 27 | /// # Example 28 | /// 29 | /// ```rust 30 | /// use sqlx::FromRow; 31 | /// use sqlx_crud::SqlxCrud; 32 | /// 33 | /// #[derive(FromRow, SqlxCrud)] 34 | /// pub struct User { 35 | /// user_id: i32, 36 | /// name: String, 37 | /// } 38 | /// ``` 39 | /// 40 | /// [FromRow]: https://docs.rs/sqlx/latest/sqlx/trait.FromRow.html 41 | pub trait Schema { 42 | /// Type of the table primary key column. 43 | type Id: Copy + Send + Sync; 44 | 45 | /// Database name of the table. Used by the query generation code and 46 | /// available for introspection. This is generated by taking the plural 47 | /// _snake_case_ of the struct's name. See: [Inflector to_table_case]. 48 | /// 49 | /// ```rust 50 | /// use sqlx::FromRow; 51 | /// use sqlx_crud::{Schema, SqlxCrud}; 52 | /// 53 | /// #[derive(FromRow, SqlxCrud)] 54 | /// struct GoogleIdToken { 55 | /// id: i32, 56 | /// audience: String, 57 | /// } 58 | /// 59 | /// assert_eq!("google_id_tokens", GoogleIdToken::table_name()); 60 | /// ``` 61 | /// 62 | /// [Inflector to_table_case]: https://docs.rs/Inflector/latest/inflector/cases/tablecase/fn.to_table_case.html 63 | fn table_name() -> &'static str; 64 | 65 | /// Returns the id of the current instance. 66 | fn id(&self) -> Self::Id; 67 | 68 | /// Returns the column name of the primary key. 69 | fn id_column() -> &'static str; 70 | 71 | /// Returns an array of column names. 72 | fn columns() -> &'static [&'static str]; 73 | 74 | /// Returns the SQL string for a SELECT query against the table. 75 | /// 76 | /// # Example 77 | /// 78 | /// ```rust 79 | /// # sqlx_crud::doctest_setup! { |pool| { 80 | /// use sqlx_crud::Schema; 81 | /// 82 | /// assert_eq!(r#"SELECT "users"."user_id", "users"."name" FROM "users""#, User::select_sql()); 83 | /// # }} 84 | /// ``` 85 | fn select_sql() -> &'static str; 86 | 87 | /// Returns the SQL string for a SELECT query against the table with a 88 | /// WHERE clause for the primary key. 89 | /// 90 | /// # Example 91 | /// 92 | /// ```rust 93 | /// # sqlx_crud::doctest_setup! { |pool| { 94 | /// use sqlx_crud::Schema; 95 | /// 96 | /// assert_eq!( 97 | /// r#"SELECT "users"."user_id", "users"."name" FROM "users" WHERE "users"."user_id" = ? LIMIT 1"#, 98 | /// User::select_by_id_sql() 99 | /// ); 100 | /// # }} 101 | /// ``` 102 | fn select_by_id_sql() -> &'static str; 103 | 104 | /// Returns the SQL for inserting a new record in to the database. The 105 | /// `#[external_id]` attribute may be used to specify IDs are assigned 106 | /// outside of the database. 107 | /// 108 | /// 109 | /// # Example 110 | /// 111 | /// ```rust 112 | /// # sqlx_crud::doctest_setup! { |pool| { 113 | /// use sqlx::FromRow; 114 | /// use sqlx_crud::{Schema, SqlxCrud}; 115 | /// 116 | /// #[derive(Debug, FromRow, SqlxCrud)] 117 | /// #[external_id] 118 | /// pub struct UserExternalId { 119 | /// pub user_id: i32, 120 | /// pub name: String, 121 | /// } 122 | /// 123 | /// assert_eq!(r#"INSERT INTO "users" ("name") VALUES (?) RETURNING "users"."user_id", "users"."name""#, User::insert_sql()); 124 | /// assert_eq!(r#"INSERT INTO "user_external_ids" ("user_id", "name") VALUES (?, ?) RETURNING "user_external_ids"."user_id", "user_external_ids"."name""#, UserExternalId::insert_sql()); 125 | /// # }} 126 | /// ``` 127 | fn insert_sql() -> &'static str; 128 | 129 | /// Returns the SQL for updating an existing record in the database. 130 | /// 131 | /// # Example 132 | /// 133 | /// ```rust 134 | /// # sqlx_crud::doctest_setup! { |pool| { 135 | /// use sqlx_crud::Schema; 136 | /// 137 | /// assert_eq!(r#"UPDATE "users" SET "name" = ? WHERE "users"."user_id" = ? RETURNING "users"."user_id", "users"."name""#, User::update_by_id_sql()); 138 | /// # }} 139 | /// ``` 140 | fn update_by_id_sql() -> &'static str; 141 | 142 | /// Returns the SQL for deleting an existing record by ID from the database. 143 | /// 144 | /// # Example 145 | /// 146 | /// ```rust 147 | /// # sqlx_crud::doctest_setup! { |pool| { 148 | /// use sqlx_crud::Schema; 149 | /// 150 | /// assert_eq!(r#"DELETE FROM "users" WHERE "users"."user_id" = ?"#, User::delete_by_id_sql()); 151 | /// # }} 152 | /// ``` 153 | fn delete_by_id_sql() -> &'static str; 154 | } 155 | 156 | /// Common Create, Read, Update, and Delete behaviors. This trait requires that 157 | /// [Schema] and [FromRow] are implemented for Self. 158 | /// 159 | /// This trait is implemented by the [SqlxCrud] derive macro. Implementors 160 | /// define how to assign query insert and update bindings. 161 | /// 162 | /// [FromRow]: https://docs.rs/sqlx/latest/sqlx/trait.FromRow.html 163 | /// [Schema]: trait.Schema.html 164 | /// [SqlxCrud]: ../derive.SqlxCrud.html 165 | pub trait Crud<'e, E> 166 | where 167 | Self: 'e + Sized + Send + Unpin + for<'r> FromRow<'r, ::Row> + Schema, 168 | ::Id: 169 | Encode<'e, >::Database> + Type<>::Database>, 170 | E: Executor<'e> + 'e, 171 | >::Arguments: IntoArguments<'e, >::Database>, 172 | { 173 | /// Returns an owned instance of [sqlx::Arguments]. self is consumed. 174 | /// Values in the fields are moved in to the `Arguments` instance. 175 | /// 176 | fn insert_args(self) -> >::Arguments; 177 | 178 | /// Returns an owned instance of [sqlx::Arguments]. self is consumed. 179 | /// Values in the fields are moved in to the `Arguments` instance. 180 | /// 181 | fn update_args(self) -> >::Arguments; 182 | 183 | /// Returns a future that resolves to an insert or `sqlx::Error` of the 184 | /// current instance. 185 | /// 186 | /// # Example 187 | /// 188 | /// ```rust 189 | /// # sqlx_crud::doctest_setup! { |pool| { 190 | /// use sqlx_crud::{Crud, Schema}; 191 | /// 192 | /// let user = User { user_id: 1, name: "test".to_string() }; 193 | /// let user = user.create(&pool).await?; 194 | /// assert_eq!("test", user.name); 195 | /// # }} 196 | /// ``` 197 | fn create(self, pool: E) -> CrudFut<'e, Self> { 198 | Box::pin({ 199 | let args = self.insert_args(); 200 | ::sqlx::query_with::(Self::insert_sql(), args) 201 | .try_map(|r| Self::from_row(&r)) 202 | .fetch_one(pool) 203 | }) 204 | } 205 | 206 | /// Queries all records from the table and returns a future that returns 207 | /// to a [try_collect] stream, which resolves to a `Vec` or a 208 | /// `sqlx::Error` on error. 209 | /// 210 | /// # Example 211 | /// 212 | /// ```rust 213 | /// # sqlx_crud::doctest_setup! { |pool| { 214 | /// use sqlx_crud::Crud; 215 | /// 216 | /// let all_users: Vec = User::all(&pool).await?; 217 | /// # }} 218 | /// ``` 219 | /// 220 | /// [try_collect]: https://docs.rs/futures/latest/futures/stream/trait.TryStreamExt.html#method.try_collect 221 | fn all(pool: E) -> TryCollectFut<'e, Self> { 222 | let stream = 223 | sqlx::query_as::(::select_sql()).fetch(pool); 224 | stream.try_collect() 225 | } 226 | 227 | #[doc(hidden)] 228 | fn paged(_pool: E) -> TryCollectFut<'e, Self> { 229 | unimplemented!() 230 | } 231 | 232 | /// Looks up a row by ID and returns a future that resolves an 233 | /// `Option`. Returns `None` if and a record with the corresponding ID 234 | /// cannot be found and `Some` if it exists. 235 | /// 236 | /// # Example 237 | /// 238 | /// ```rust 239 | /// # sqlx_crud::doctest_setup! { |pool| { 240 | /// use sqlx_crud::Crud; 241 | /// 242 | /// let user: Option = User::by_id(&pool, 1).await?; 243 | /// assert!(user.is_some()); 244 | /// # }} 245 | /// ``` 246 | fn by_id(pool: E, id: ::Id) -> CrudFut<'e, Option> { 247 | Box::pin({ 248 | use ::sqlx::Arguments as _; 249 | let arg0 = id; 250 | let mut args = >::Arguments::default(); 251 | args.reserve( 252 | 1usize, 253 | ::sqlx::encode::Encode::::size_hint(&arg0), 254 | ); 255 | args.add(arg0); 256 | ::sqlx::query_with::(Self::select_by_id_sql(), args) 257 | .try_map(|r| Self::from_row(&r)) 258 | .fetch_optional(pool) 259 | }) 260 | } 261 | 262 | /// Updates the database with the current instance state and returns a 263 | /// future that resolves to the new `Self` returned from the database. 264 | /// 265 | /// # Example 266 | /// 267 | /// ```rust 268 | /// # sqlx_crud::doctest_setup! { |pool| { 269 | /// use sqlx_crud::Crud; 270 | /// 271 | /// if let Some(mut user) = User::by_id(&pool, 1).await? { 272 | /// assert_eq!("test", user.name); 273 | /// 274 | /// // Update the record 275 | /// user.name = "Harry".to_string(); 276 | /// let user = user.update(&pool).await?; 277 | /// 278 | /// // Confirm the name changed 279 | /// assert_eq!("Harry", user.name); 280 | /// } 281 | /// # }} 282 | /// ``` 283 | fn update(self, pool: E) -> CrudFut<'e, Self> { 284 | Box::pin({ 285 | let args = self.update_args(); 286 | ::sqlx::query_with::(Self::update_by_id_sql(), args) 287 | .try_map(|r| Self::from_row(&r)) 288 | .fetch_one(pool) 289 | }) 290 | } 291 | 292 | /// Deletes a record from the database by ID and returns a future that 293 | /// resolves to `()` on success or `sqlx::Error` on failure. 294 | /// 295 | /// # Example 296 | /// 297 | /// ```rust 298 | /// # sqlx_crud::doctest_setup! { |pool| { 299 | /// use sqlx_crud::Crud; 300 | /// 301 | /// if let Some(user) = User::by_id(&pool, 1).await? { 302 | /// user.delete(&pool).await?; 303 | /// } 304 | /// assert!(User::by_id(&pool, 1).await?.is_none()); 305 | /// # }} 306 | /// ``` 307 | fn delete(self, pool: E) -> CrudFut<'e, ()> { 308 | let query = sqlx::query(::delete_by_id_sql()).bind(self.id()); 309 | Box::pin(query.execute(pool).and_then(|_| future::ok(()))) 310 | } 311 | } 312 | -------------------------------------------------------------------------------- /sqlx-crud-macros/src/lib.rs: -------------------------------------------------------------------------------- 1 | use inflector::Inflector; 2 | use proc_macro::{self, TokenStream}; 3 | use proc_macro2::TokenStream as TokenStream2; 4 | use quote::{format_ident, quote}; 5 | use syn::punctuated::Punctuated; 6 | use syn::token::Comma; 7 | use syn::{ 8 | parse_macro_input, Attribute, Data, DataStruct, DeriveInput, Expr, Field, Fields, FieldsNamed, Ident, 9 | LitStr, Meta, MetaNameValue, Lit, ExprLit, 10 | }; 11 | 12 | #[proc_macro_derive(SqlxCrud, attributes(database, external_id, id))] 13 | pub fn derive(input: TokenStream) -> TokenStream { 14 | let DeriveInput { 15 | ident, data, attrs, .. 16 | } = parse_macro_input!(input); 17 | match data { 18 | Data::Struct(DataStruct { 19 | fields: Fields::Named(FieldsNamed { named, .. }), 20 | .. 21 | }) => { 22 | let config = Config::new(&attrs, &ident, &named); 23 | let static_model_schema = build_static_model_schema(&config); 24 | let sqlx_crud_impl = build_sqlx_crud_impl(&config); 25 | 26 | quote! { 27 | #static_model_schema 28 | #sqlx_crud_impl 29 | } 30 | .into() 31 | } 32 | _ => panic!("this derive macro only works on structs with named fields"), 33 | } 34 | } 35 | 36 | fn build_static_model_schema(config: &Config) -> TokenStream2 { 37 | let crate_name = &config.crate_name; 38 | let model_schema_ident = &config.model_schema_ident; 39 | let table_name = &config.table_name; 40 | 41 | let id_column = config.id_column_ident.to_string(); 42 | let columns_len = config.named.iter().count(); 43 | let columns = config 44 | .named 45 | .iter() 46 | .flat_map(|f| &f.ident) 47 | .map(|f| LitStr::new(format!("{}", f).as_str(), f.span())); 48 | 49 | let sql_queries = build_sql_queries(config); 50 | 51 | quote! { 52 | #[automatically_derived] 53 | static #model_schema_ident: #crate_name::schema::Metadata<'static, #columns_len> = #crate_name::schema::Metadata { 54 | table_name: #table_name, 55 | id_column: #id_column, 56 | columns: [#(#columns),*], 57 | #sql_queries 58 | }; 59 | } 60 | } 61 | 62 | fn build_sql_queries(config: &Config) -> TokenStream2 { 63 | let table_name = config.quote_ident(&config.table_name); 64 | let id_column = format!( 65 | "{}.{}", 66 | &table_name, 67 | config.quote_ident(&config.id_column_ident.to_string()) 68 | ); 69 | 70 | let insert_bind_cnt = if config.external_id { 71 | config.named.iter().count() 72 | } else { 73 | config.named.iter().count() - 1 74 | }; 75 | let insert_sql_binds = (0..insert_bind_cnt) 76 | .map(|_| "?") 77 | .collect::>() 78 | .join(", "); 79 | 80 | let update_sql_binds = config 81 | .named 82 | .iter() 83 | .flat_map(|f| &f.ident) 84 | .filter(|i| *i != &config.id_column_ident) 85 | .map(|i| format!("{} = ?", config.quote_ident(&i.to_string()))) 86 | .collect::>() 87 | .join(", "); 88 | 89 | let insert_column_list = config 90 | .named 91 | .iter() 92 | .flat_map(|f| &f.ident) 93 | .filter(|i| config.external_id || *i != &config.id_column_ident) 94 | .map(|i| config.quote_ident(&i.to_string())) 95 | .collect::>() 96 | .join(", "); 97 | let column_list = config 98 | .named 99 | .iter() 100 | .flat_map(|f| &f.ident) 101 | .map(|i| format!("{}.{}", &table_name, config.quote_ident(&i.to_string()))) 102 | .collect::>() 103 | .join(", "); 104 | 105 | let select_sql = format!("SELECT {} FROM {}", column_list, table_name); 106 | let select_by_id_sql = format!( 107 | "SELECT {} FROM {} WHERE {} = ? LIMIT 1", 108 | column_list, table_name, id_column 109 | ); 110 | let insert_sql = format!( 111 | "INSERT INTO {} ({}) VALUES ({}) RETURNING {}", 112 | table_name, insert_column_list, insert_sql_binds, column_list 113 | ); 114 | let update_by_id_sql = format!( 115 | "UPDATE {} SET {} WHERE {} = ? RETURNING {}", 116 | table_name, update_sql_binds, id_column, column_list 117 | ); 118 | let delete_by_id_sql = format!("DELETE FROM {} WHERE {} = ?", table_name, id_column); 119 | 120 | quote! { 121 | select_sql: #select_sql, 122 | select_by_id_sql: #select_by_id_sql, 123 | insert_sql: #insert_sql, 124 | update_by_id_sql: #update_by_id_sql, 125 | delete_by_id_sql: #delete_by_id_sql, 126 | } 127 | } 128 | 129 | fn build_sqlx_crud_impl(config: &Config) -> TokenStream2 { 130 | let crate_name = &config.crate_name; 131 | let ident = &config.ident; 132 | let model_schema_ident = &config.model_schema_ident; 133 | let db_ty = config.db_ty.sqlx_db(); 134 | let id_column_ident = &config.id_column_ident; 135 | 136 | let id_ty = config 137 | .named 138 | .iter() 139 | .find(|f| f.ident.as_ref() == Some(id_column_ident)) 140 | .map(|f| &f.ty) 141 | .expect("the id type"); 142 | 143 | let insert_query_args = config 144 | .named 145 | .iter() 146 | .flat_map(|f| &f.ident) 147 | .filter(|i| config.external_id || *i != &config.id_column_ident) 148 | .map(|i| quote! { args.add(self.#i); }); 149 | 150 | let insert_query_size = config 151 | .named 152 | .iter() 153 | .flat_map(|f| &f.ident) 154 | .filter(|i| config.external_id || *i != &config.id_column_ident) 155 | .map(|i| quote! { ::sqlx::encode::Encode::<#db_ty>::size_hint(&self.#i) }); 156 | 157 | let update_query_args = config 158 | .named 159 | .iter() 160 | .flat_map(|f| &f.ident) 161 | .filter(|i| *i != &config.id_column_ident) 162 | .map(|i| quote! { args.add(self.#i); }); 163 | 164 | let update_query_args_id = quote! { args.add(self.#id_column_ident); }; 165 | 166 | let update_query_size = config 167 | .named 168 | .iter() 169 | .flat_map(|f| &f.ident) 170 | .map(|i| quote! { ::sqlx::encode::Encode::<#db_ty>::size_hint(&self.#i) }); 171 | 172 | quote! { 173 | #[automatically_derived] 174 | impl #crate_name::traits::Schema for #ident { 175 | type Id = #id_ty; 176 | 177 | fn table_name() -> &'static str { 178 | #model_schema_ident.table_name 179 | } 180 | 181 | fn id(&self) -> Self::Id { 182 | self.#id_column_ident 183 | } 184 | 185 | fn id_column() -> &'static str { 186 | #model_schema_ident.id_column 187 | } 188 | 189 | fn columns() -> &'static [&'static str] { 190 | &#model_schema_ident.columns 191 | } 192 | 193 | fn select_sql() -> &'static str { 194 | #model_schema_ident.select_sql 195 | } 196 | 197 | fn select_by_id_sql() -> &'static str { 198 | #model_schema_ident.select_by_id_sql 199 | } 200 | 201 | fn insert_sql() -> &'static str { 202 | #model_schema_ident.insert_sql 203 | } 204 | 205 | fn update_by_id_sql() -> &'static str { 206 | #model_schema_ident.update_by_id_sql 207 | } 208 | 209 | fn delete_by_id_sql() -> &'static str { 210 | #model_schema_ident.delete_by_id_sql 211 | } 212 | } 213 | 214 | #[automatically_derived] 215 | impl<'e> #crate_name::traits::Crud<'e, &'e ::sqlx::pool::Pool<#db_ty>> for #ident { 216 | fn insert_args(self) -> <#db_ty as ::sqlx::database::HasArguments<'e>>::Arguments { 217 | use ::sqlx::Arguments as _; 218 | let mut args = <#db_ty as ::sqlx::database::HasArguments<'e>>::Arguments::default(); 219 | args.reserve(1usize, #(#insert_query_size)+*); 220 | #(#insert_query_args)* 221 | args 222 | } 223 | 224 | fn update_args(self) -> <#db_ty as ::sqlx::database::HasArguments<'e>>::Arguments { 225 | use ::sqlx::Arguments as _; 226 | let mut args = <#db_ty as ::sqlx::database::HasArguments<'e>>::Arguments::default(); 227 | args.reserve(1usize, #(#update_query_size)+*); 228 | #(#update_query_args)* 229 | #update_query_args_id 230 | args 231 | } 232 | } 233 | } 234 | } 235 | 236 | #[allow(dead_code)] // Usage in quote macros aren't flagged as used 237 | struct Config<'a> { 238 | ident: &'a Ident, 239 | named: &'a Punctuated, 240 | crate_name: TokenStream2, 241 | db_ty: DbType, 242 | model_schema_ident: Ident, 243 | table_name: String, 244 | id_column_ident: Ident, 245 | external_id: bool, 246 | } 247 | 248 | impl<'a> Config<'a> { 249 | fn new(attrs: &[Attribute], ident: &'a Ident, named: &'a Punctuated) -> Self { 250 | let crate_name = std::env::var("CARGO_PKG_NAME").unwrap(); 251 | let is_doctest = std::env::vars() 252 | .any(|(k, _)| k == "UNSTABLE_RUSTDOC_TEST_LINE" || k == "UNSTABLE_RUSTDOC_TEST_PATH"); 253 | let crate_name = if !is_doctest && crate_name == "sqlx-crud" { 254 | quote! { crate } 255 | } else { 256 | quote! { ::sqlx_crud } 257 | }; 258 | 259 | let db_ty = DbType::new(attrs); 260 | 261 | let model_schema_ident = 262 | format_ident!("{}_SCHEMA", ident.to_string().to_screaming_snake_case()); 263 | 264 | let table_name = ident.to_string().to_table_case(); 265 | 266 | // Search for a field with the #[id] attribute 267 | let id_attr = &named 268 | .iter() 269 | .find(|f| f.attrs.iter().any(|a| a.path().is_ident("id"))) 270 | .and_then(|f| f.ident.as_ref()); 271 | // Otherwise default to the first field as the "id" column 272 | let id_column_ident = id_attr 273 | .unwrap_or_else(|| { 274 | named 275 | .iter() 276 | .flat_map(|f| &f.ident) 277 | .next() 278 | .expect("the first field") 279 | }) 280 | .clone(); 281 | 282 | let external_id = attrs.iter().any(|a| a.path().is_ident("external_id")); 283 | 284 | Self { 285 | ident, 286 | named, 287 | crate_name, 288 | db_ty, 289 | model_schema_ident, 290 | table_name, 291 | id_column_ident, 292 | external_id, 293 | } 294 | } 295 | 296 | fn quote_ident(&self, ident: &str) -> String { 297 | self.db_ty.quote_ident(ident) 298 | } 299 | } 300 | 301 | enum DbType { 302 | Any, 303 | Mssql, 304 | MySql, 305 | Postgres, 306 | Sqlite, 307 | } 308 | 309 | impl From<&str> for DbType { 310 | fn from(db_type: &str) -> Self { 311 | match db_type { 312 | "Any" => Self::Any, 313 | "Mssql" => Self::Mssql, 314 | "MySql" => Self::MySql, 315 | "Postgres" => Self::Postgres, 316 | "Sqlite" => Self::Sqlite, 317 | _ => panic!("unknown #[database] type {}", db_type), 318 | } 319 | } 320 | } 321 | 322 | impl DbType { 323 | fn new(attrs: &[Attribute]) -> Self { 324 | let mut db_type = DbType::Sqlite; 325 | attrs.iter() 326 | .find(|a| a.path().is_ident("database")) 327 | .map(|a| a.parse_nested_meta(|m| { 328 | if let Some(path) = m.path.get_ident() { 329 | db_type = DbType::from(path.to_string().as_str()); 330 | } 331 | Ok(()) 332 | })); 333 | 334 | db_type 335 | } 336 | 337 | fn sqlx_db(&self) -> TokenStream2 { 338 | match self { 339 | Self::Any => quote! { ::sqlx::Any }, 340 | Self::Mssql => quote! { ::sqlx::Mssql }, 341 | Self::MySql => quote! { ::sqlx::MySql }, 342 | Self::Postgres => quote! { ::sqlx::Postgres }, 343 | Self::Sqlite => quote! { ::sqlx::Sqlite }, 344 | } 345 | } 346 | 347 | fn quote_ident(&self, ident: &str) -> String { 348 | match self { 349 | Self::Any => format!(r#""{}""#, &ident), 350 | Self::Mssql => format!(r#""{}""#, &ident), 351 | Self::MySql => format!("`{}`", &ident), 352 | Self::Postgres => format!(r#""{}""#, &ident), 353 | Self::Sqlite => format!(r#""{}""#, &ident), 354 | } 355 | } 356 | } 357 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "Inflector" 7 | version = "0.11.4" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" 10 | dependencies = [ 11 | "lazy_static", 12 | "regex", 13 | ] 14 | 15 | [[package]] 16 | name = "addr2line" 17 | version = "0.19.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" 20 | dependencies = [ 21 | "gimli", 22 | ] 23 | 24 | [[package]] 25 | name = "adler" 26 | version = "1.0.2" 27 | source = "registry+https://github.com/rust-lang/crates.io-index" 28 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 29 | 30 | [[package]] 31 | name = "ahash" 32 | version = "0.7.6" 33 | source = "registry+https://github.com/rust-lang/crates.io-index" 34 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 35 | dependencies = [ 36 | "getrandom", 37 | "once_cell", 38 | "version_check", 39 | ] 40 | 41 | [[package]] 42 | name = "aho-corasick" 43 | version = "0.7.18" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 46 | dependencies = [ 47 | "memchr", 48 | ] 49 | 50 | [[package]] 51 | name = "android_system_properties" 52 | version = "0.1.5" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 55 | dependencies = [ 56 | "libc", 57 | ] 58 | 59 | [[package]] 60 | name = "anyhow" 61 | version = "1.0.70" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" 64 | dependencies = [ 65 | "backtrace", 66 | ] 67 | 68 | [[package]] 69 | name = "async-channel" 70 | version = "1.6.1" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" 73 | dependencies = [ 74 | "concurrent-queue", 75 | "event-listener", 76 | "futures-core", 77 | ] 78 | 79 | [[package]] 80 | name = "async-executor" 81 | version = "1.4.1" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" 84 | dependencies = [ 85 | "async-task", 86 | "concurrent-queue", 87 | "fastrand", 88 | "futures-lite", 89 | "once_cell", 90 | "slab", 91 | ] 92 | 93 | [[package]] 94 | name = "async-global-executor" 95 | version = "2.0.3" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "c026b7e44f1316b567ee750fea85103f87fcb80792b860e979f221259796ca0a" 98 | dependencies = [ 99 | "async-channel", 100 | "async-executor", 101 | "async-io", 102 | "async-mutex", 103 | "blocking", 104 | "futures-lite", 105 | "num_cpus", 106 | "once_cell", 107 | ] 108 | 109 | [[package]] 110 | name = "async-io" 111 | version = "1.6.0" 112 | source = "registry+https://github.com/rust-lang/crates.io-index" 113 | checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" 114 | dependencies = [ 115 | "concurrent-queue", 116 | "futures-lite", 117 | "libc", 118 | "log", 119 | "once_cell", 120 | "parking", 121 | "polling", 122 | "slab", 123 | "socket2", 124 | "waker-fn", 125 | "winapi", 126 | ] 127 | 128 | [[package]] 129 | name = "async-lock" 130 | version = "2.5.0" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6" 133 | dependencies = [ 134 | "event-listener", 135 | ] 136 | 137 | [[package]] 138 | name = "async-mutex" 139 | version = "1.4.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" 142 | dependencies = [ 143 | "event-listener", 144 | ] 145 | 146 | [[package]] 147 | name = "async-native-tls" 148 | version = "0.4.0" 149 | source = "registry+https://github.com/rust-lang/crates.io-index" 150 | checksum = "d57d4cec3c647232e1094dc013546c0b33ce785d8aeb251e1f20dfaf8a9a13fe" 151 | dependencies = [ 152 | "futures-util", 153 | "native-tls", 154 | "thiserror", 155 | "url", 156 | ] 157 | 158 | [[package]] 159 | name = "async-process" 160 | version = "1.3.0" 161 | source = "registry+https://github.com/rust-lang/crates.io-index" 162 | checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" 163 | dependencies = [ 164 | "async-io", 165 | "blocking", 166 | "cfg-if", 167 | "event-listener", 168 | "futures-lite", 169 | "libc", 170 | "once_cell", 171 | "signal-hook", 172 | "winapi", 173 | ] 174 | 175 | [[package]] 176 | name = "async-std" 177 | version = "1.10.0" 178 | source = "registry+https://github.com/rust-lang/crates.io-index" 179 | checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" 180 | dependencies = [ 181 | "async-channel", 182 | "async-global-executor", 183 | "async-io", 184 | "async-lock", 185 | "async-process", 186 | "crossbeam-utils", 187 | "futures-channel", 188 | "futures-core", 189 | "futures-io", 190 | "futures-lite", 191 | "gloo-timers", 192 | "kv-log-macro", 193 | "log", 194 | "memchr", 195 | "num_cpus", 196 | "once_cell", 197 | "pin-project-lite", 198 | "pin-utils", 199 | "slab", 200 | "wasm-bindgen-futures", 201 | ] 202 | 203 | [[package]] 204 | name = "async-stream" 205 | version = "0.3.2" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" 208 | dependencies = [ 209 | "async-stream-impl", 210 | "futures-core", 211 | ] 212 | 213 | [[package]] 214 | name = "async-stream-impl" 215 | version = "0.3.2" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" 218 | dependencies = [ 219 | "proc-macro2", 220 | "quote", 221 | "syn 1.0.109", 222 | ] 223 | 224 | [[package]] 225 | name = "async-task" 226 | version = "4.2.0" 227 | source = "registry+https://github.com/rust-lang/crates.io-index" 228 | checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" 229 | 230 | [[package]] 231 | name = "async-trait" 232 | version = "0.1.68" 233 | source = "registry+https://github.com/rust-lang/crates.io-index" 234 | checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" 235 | dependencies = [ 236 | "proc-macro2", 237 | "quote", 238 | "syn 2.0.15", 239 | ] 240 | 241 | [[package]] 242 | name = "async-tungstenite" 243 | version = "0.17.2" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | checksum = "a1b71b31561643aa8e7df3effe284fa83ab1a840e52294c5f4bd7bfd8b2becbb" 246 | dependencies = [ 247 | "futures-io", 248 | "futures-util", 249 | "log", 250 | "pin-project-lite", 251 | "tokio", 252 | "tokio-rustls", 253 | "tungstenite", 254 | "webpki-roots", 255 | ] 256 | 257 | [[package]] 258 | name = "atoi" 259 | version = "1.0.0" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" 262 | dependencies = [ 263 | "num-traits", 264 | ] 265 | 266 | [[package]] 267 | name = "atomic-waker" 268 | version = "1.0.0" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" 271 | 272 | [[package]] 273 | name = "autocfg" 274 | version = "1.1.0" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 277 | 278 | [[package]] 279 | name = "axum" 280 | version = "0.1.0" 281 | dependencies = [ 282 | "anyhow", 283 | "axum 0.6.15", 284 | "serde", 285 | "serde_json", 286 | "sqlx", 287 | "sqlx-crud", 288 | "tokio", 289 | ] 290 | 291 | [[package]] 292 | name = "axum" 293 | version = "0.6.15" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | checksum = "3b32c5ea3aabaf4deb5f5ced2d688ec0844c881c9e6c696a8b769a05fc691e62" 296 | dependencies = [ 297 | "async-trait", 298 | "axum-core", 299 | "bitflags", 300 | "bytes", 301 | "futures-util", 302 | "http", 303 | "http-body", 304 | "hyper", 305 | "itoa", 306 | "matchit", 307 | "memchr", 308 | "mime", 309 | "percent-encoding", 310 | "pin-project-lite", 311 | "rustversion", 312 | "serde", 313 | "serde_json", 314 | "serde_path_to_error", 315 | "serde_urlencoded", 316 | "sync_wrapper", 317 | "tokio", 318 | "tower", 319 | "tower-layer", 320 | "tower-service", 321 | ] 322 | 323 | [[package]] 324 | name = "axum-core" 325 | version = "0.3.4" 326 | source = "registry+https://github.com/rust-lang/crates.io-index" 327 | checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" 328 | dependencies = [ 329 | "async-trait", 330 | "bytes", 331 | "futures-util", 332 | "http", 333 | "http-body", 334 | "mime", 335 | "rustversion", 336 | "tower-layer", 337 | "tower-service", 338 | ] 339 | 340 | [[package]] 341 | name = "backtrace" 342 | version = "0.3.67" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" 345 | dependencies = [ 346 | "addr2line", 347 | "cc", 348 | "cfg-if", 349 | "libc", 350 | "miniz_oxide", 351 | "object", 352 | "rustc-demangle", 353 | ] 354 | 355 | [[package]] 356 | name = "base64" 357 | version = "0.13.0" 358 | source = "registry+https://github.com/rust-lang/crates.io-index" 359 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 360 | 361 | [[package]] 362 | name = "base64" 363 | version = "0.21.0" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" 366 | 367 | [[package]] 368 | name = "bitflags" 369 | version = "1.3.2" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 372 | 373 | [[package]] 374 | name = "block-buffer" 375 | version = "0.10.3" 376 | source = "registry+https://github.com/rust-lang/crates.io-index" 377 | checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" 378 | dependencies = [ 379 | "generic-array", 380 | ] 381 | 382 | [[package]] 383 | name = "blocking" 384 | version = "1.1.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" 387 | dependencies = [ 388 | "async-channel", 389 | "async-task", 390 | "atomic-waker", 391 | "fastrand", 392 | "futures-lite", 393 | "once_cell", 394 | ] 395 | 396 | [[package]] 397 | name = "bumpalo" 398 | version = "3.9.1" 399 | source = "registry+https://github.com/rust-lang/crates.io-index" 400 | checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" 401 | 402 | [[package]] 403 | name = "byteorder" 404 | version = "1.4.3" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 407 | 408 | [[package]] 409 | name = "bytes" 410 | version = "1.1.0" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 413 | 414 | [[package]] 415 | name = "cache-padded" 416 | version = "1.2.0" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" 419 | 420 | [[package]] 421 | name = "cc" 422 | version = "1.0.73" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" 425 | 426 | [[package]] 427 | name = "cfg-if" 428 | version = "1.0.0" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 431 | 432 | [[package]] 433 | name = "chrono" 434 | version = "0.4.24" 435 | source = "registry+https://github.com/rust-lang/crates.io-index" 436 | checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" 437 | dependencies = [ 438 | "iana-time-zone", 439 | "num-integer", 440 | "num-traits", 441 | "serde", 442 | "winapi", 443 | ] 444 | 445 | [[package]] 446 | name = "codespan-reporting" 447 | version = "0.11.1" 448 | source = "registry+https://github.com/rust-lang/crates.io-index" 449 | checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" 450 | dependencies = [ 451 | "termcolor", 452 | "unicode-width", 453 | ] 454 | 455 | [[package]] 456 | name = "command_attr" 457 | version = "0.4.1" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "4d999d4e7731150ee14aee8f619c7a9aa9a4385bca0606c4fa95aa2f36a05d9a" 460 | dependencies = [ 461 | "proc-macro2", 462 | "quote", 463 | "syn 1.0.109", 464 | ] 465 | 466 | [[package]] 467 | name = "concurrent-queue" 468 | version = "1.2.2" 469 | source = "registry+https://github.com/rust-lang/crates.io-index" 470 | checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" 471 | dependencies = [ 472 | "cache-padded", 473 | ] 474 | 475 | [[package]] 476 | name = "core-foundation" 477 | version = "0.9.3" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" 480 | dependencies = [ 481 | "core-foundation-sys", 482 | "libc", 483 | ] 484 | 485 | [[package]] 486 | name = "core-foundation-sys" 487 | version = "0.8.3" 488 | source = "registry+https://github.com/rust-lang/crates.io-index" 489 | checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" 490 | 491 | [[package]] 492 | name = "cpufeatures" 493 | version = "0.2.1" 494 | source = "registry+https://github.com/rust-lang/crates.io-index" 495 | checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" 496 | dependencies = [ 497 | "libc", 498 | ] 499 | 500 | [[package]] 501 | name = "crc" 502 | version = "3.0.0" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "53757d12b596c16c78b83458d732a5d1a17ab3f53f2f7412f6fb57cc8a140ab3" 505 | dependencies = [ 506 | "crc-catalog", 507 | ] 508 | 509 | [[package]] 510 | name = "crc-catalog" 511 | version = "2.1.0" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "2d0165d2900ae6778e36e80bbc4da3b5eefccee9ba939761f9c2882a5d9af3ff" 514 | 515 | [[package]] 516 | name = "crc32fast" 517 | version = "1.3.2" 518 | source = "registry+https://github.com/rust-lang/crates.io-index" 519 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 520 | dependencies = [ 521 | "cfg-if", 522 | ] 523 | 524 | [[package]] 525 | name = "crossbeam-queue" 526 | version = "0.3.4" 527 | source = "registry+https://github.com/rust-lang/crates.io-index" 528 | checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce" 529 | dependencies = [ 530 | "cfg-if", 531 | "crossbeam-utils", 532 | ] 533 | 534 | [[package]] 535 | name = "crossbeam-utils" 536 | version = "0.8.7" 537 | source = "registry+https://github.com/rust-lang/crates.io-index" 538 | checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" 539 | dependencies = [ 540 | "cfg-if", 541 | "lazy_static", 542 | ] 543 | 544 | [[package]] 545 | name = "crypto-common" 546 | version = "0.1.6" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 549 | dependencies = [ 550 | "generic-array", 551 | "typenum", 552 | ] 553 | 554 | [[package]] 555 | name = "ctor" 556 | version = "0.1.21" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" 559 | dependencies = [ 560 | "quote", 561 | "syn 1.0.109", 562 | ] 563 | 564 | [[package]] 565 | name = "cxx" 566 | version = "1.0.94" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" 569 | dependencies = [ 570 | "cc", 571 | "cxxbridge-flags", 572 | "cxxbridge-macro", 573 | "link-cplusplus", 574 | ] 575 | 576 | [[package]] 577 | name = "cxx-build" 578 | version = "1.0.94" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" 581 | dependencies = [ 582 | "cc", 583 | "codespan-reporting", 584 | "once_cell", 585 | "proc-macro2", 586 | "quote", 587 | "scratch", 588 | "syn 2.0.15", 589 | ] 590 | 591 | [[package]] 592 | name = "cxxbridge-flags" 593 | version = "1.0.94" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" 596 | 597 | [[package]] 598 | name = "cxxbridge-macro" 599 | version = "1.0.94" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" 602 | dependencies = [ 603 | "proc-macro2", 604 | "quote", 605 | "syn 2.0.15", 606 | ] 607 | 608 | [[package]] 609 | name = "dashmap" 610 | version = "5.2.0" 611 | source = "registry+https://github.com/rust-lang/crates.io-index" 612 | checksum = "4c8858831f7781322e539ea39e72449c46b059638250c14344fec8d0aa6e539c" 613 | dependencies = [ 614 | "cfg-if", 615 | "num_cpus", 616 | "parking_lot 0.12.1", 617 | "serde", 618 | ] 619 | 620 | [[package]] 621 | name = "digest" 622 | version = "0.10.6" 623 | source = "registry+https://github.com/rust-lang/crates.io-index" 624 | checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" 625 | dependencies = [ 626 | "block-buffer", 627 | "crypto-common", 628 | "subtle", 629 | ] 630 | 631 | [[package]] 632 | name = "dirs" 633 | version = "4.0.0" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" 636 | dependencies = [ 637 | "dirs-sys", 638 | ] 639 | 640 | [[package]] 641 | name = "dirs-sys" 642 | version = "0.3.7" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" 645 | dependencies = [ 646 | "libc", 647 | "redox_users", 648 | "winapi", 649 | ] 650 | 651 | [[package]] 652 | name = "dotenvy" 653 | version = "0.15.3" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "da3db6fcad7c1fc4abdd99bf5276a4db30d6a819127903a709ed41e5ff016e84" 656 | dependencies = [ 657 | "dirs", 658 | ] 659 | 660 | [[package]] 661 | name = "either" 662 | version = "1.6.1" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 665 | 666 | [[package]] 667 | name = "encoding_rs" 668 | version = "0.8.32" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" 671 | dependencies = [ 672 | "cfg-if", 673 | ] 674 | 675 | [[package]] 676 | name = "event-listener" 677 | version = "2.5.2" 678 | source = "registry+https://github.com/rust-lang/crates.io-index" 679 | checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" 680 | 681 | [[package]] 682 | name = "fastrand" 683 | version = "1.7.0" 684 | source = "registry+https://github.com/rust-lang/crates.io-index" 685 | checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" 686 | dependencies = [ 687 | "instant", 688 | ] 689 | 690 | [[package]] 691 | name = "flate2" 692 | version = "1.0.25" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" 695 | dependencies = [ 696 | "crc32fast", 697 | "miniz_oxide", 698 | ] 699 | 700 | [[package]] 701 | name = "flume" 702 | version = "0.10.11" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "0b279436a715a9de95dcd26b151db590a71961cc06e54918b24fe0dd5b7d3fc4" 705 | dependencies = [ 706 | "futures-core", 707 | "futures-sink", 708 | "pin-project", 709 | "spin 0.9.2", 710 | ] 711 | 712 | [[package]] 713 | name = "fnv" 714 | version = "1.0.7" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 717 | 718 | [[package]] 719 | name = "foreign-types" 720 | version = "0.3.2" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 723 | dependencies = [ 724 | "foreign-types-shared", 725 | ] 726 | 727 | [[package]] 728 | name = "foreign-types-shared" 729 | version = "0.1.1" 730 | source = "registry+https://github.com/rust-lang/crates.io-index" 731 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 732 | 733 | [[package]] 734 | name = "form_urlencoded" 735 | version = "1.0.1" 736 | source = "registry+https://github.com/rust-lang/crates.io-index" 737 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 738 | dependencies = [ 739 | "matches", 740 | "percent-encoding", 741 | ] 742 | 743 | [[package]] 744 | name = "futures" 745 | version = "0.3.21" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "f73fe65f54d1e12b726f517d3e2135ca3125a437b6d998caf1962961f7172d9e" 748 | dependencies = [ 749 | "futures-channel", 750 | "futures-core", 751 | "futures-executor", 752 | "futures-io", 753 | "futures-sink", 754 | "futures-task", 755 | "futures-util", 756 | ] 757 | 758 | [[package]] 759 | name = "futures-channel" 760 | version = "0.3.21" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "c3083ce4b914124575708913bca19bfe887522d6e2e6d0952943f5eac4a74010" 763 | dependencies = [ 764 | "futures-core", 765 | "futures-sink", 766 | ] 767 | 768 | [[package]] 769 | name = "futures-core" 770 | version = "0.3.21" 771 | source = "registry+https://github.com/rust-lang/crates.io-index" 772 | checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" 773 | 774 | [[package]] 775 | name = "futures-executor" 776 | version = "0.3.21" 777 | source = "registry+https://github.com/rust-lang/crates.io-index" 778 | checksum = "9420b90cfa29e327d0429f19be13e7ddb68fa1cccb09d65e5706b8c7a749b8a6" 779 | dependencies = [ 780 | "futures-core", 781 | "futures-task", 782 | "futures-util", 783 | ] 784 | 785 | [[package]] 786 | name = "futures-intrusive" 787 | version = "0.4.0" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" 790 | dependencies = [ 791 | "futures-core", 792 | "lock_api", 793 | "parking_lot 0.11.2", 794 | ] 795 | 796 | [[package]] 797 | name = "futures-io" 798 | version = "0.3.21" 799 | source = "registry+https://github.com/rust-lang/crates.io-index" 800 | checksum = "fc4045962a5a5e935ee2fdedaa4e08284547402885ab326734432bed5d12966b" 801 | 802 | [[package]] 803 | name = "futures-lite" 804 | version = "1.12.0" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" 807 | dependencies = [ 808 | "fastrand", 809 | "futures-core", 810 | "futures-io", 811 | "memchr", 812 | "parking", 813 | "pin-project-lite", 814 | "waker-fn", 815 | ] 816 | 817 | [[package]] 818 | name = "futures-macro" 819 | version = "0.3.21" 820 | source = "registry+https://github.com/rust-lang/crates.io-index" 821 | checksum = "33c1e13800337f4d4d7a316bf45a567dbcb6ffe087f16424852d97e97a91f512" 822 | dependencies = [ 823 | "proc-macro2", 824 | "quote", 825 | "syn 1.0.109", 826 | ] 827 | 828 | [[package]] 829 | name = "futures-rustls" 830 | version = "0.22.2" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "d2411eed028cdf8c8034eaf21f9915f956b6c3abec4d4c7949ee67f0721127bd" 833 | dependencies = [ 834 | "futures-io", 835 | "rustls", 836 | "webpki", 837 | ] 838 | 839 | [[package]] 840 | name = "futures-sink" 841 | version = "0.3.21" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" 844 | 845 | [[package]] 846 | name = "futures-task" 847 | version = "0.3.21" 848 | source = "registry+https://github.com/rust-lang/crates.io-index" 849 | checksum = "57c66a976bf5909d801bbef33416c41372779507e7a6b3a5e25e4749c58f776a" 850 | 851 | [[package]] 852 | name = "futures-util" 853 | version = "0.3.21" 854 | source = "registry+https://github.com/rust-lang/crates.io-index" 855 | checksum = "d8b7abd5d659d9b90c8cba917f6ec750a74e2dc23902ef9cd4cc8c8b22e6036a" 856 | dependencies = [ 857 | "futures-channel", 858 | "futures-core", 859 | "futures-io", 860 | "futures-macro", 861 | "futures-sink", 862 | "futures-task", 863 | "memchr", 864 | "pin-project-lite", 865 | "pin-utils", 866 | "slab", 867 | ] 868 | 869 | [[package]] 870 | name = "generic-array" 871 | version = "0.14.5" 872 | source = "registry+https://github.com/rust-lang/crates.io-index" 873 | checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" 874 | dependencies = [ 875 | "typenum", 876 | "version_check", 877 | ] 878 | 879 | [[package]] 880 | name = "getrandom" 881 | version = "0.2.5" 882 | source = "registry+https://github.com/rust-lang/crates.io-index" 883 | checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" 884 | dependencies = [ 885 | "cfg-if", 886 | "libc", 887 | "wasi 0.10.2+wasi-snapshot-preview1", 888 | ] 889 | 890 | [[package]] 891 | name = "gimli" 892 | version = "0.27.2" 893 | source = "registry+https://github.com/rust-lang/crates.io-index" 894 | checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" 895 | 896 | [[package]] 897 | name = "gloo-timers" 898 | version = "0.2.3" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | checksum = "4d12a7f4e95cfe710f1d624fb1210b7d961a5fb05c4fd942f4feab06e61f590e" 901 | dependencies = [ 902 | "futures-channel", 903 | "futures-core", 904 | "js-sys", 905 | "wasm-bindgen", 906 | ] 907 | 908 | [[package]] 909 | name = "h2" 910 | version = "0.3.17" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f" 913 | dependencies = [ 914 | "bytes", 915 | "fnv", 916 | "futures-core", 917 | "futures-sink", 918 | "futures-util", 919 | "http", 920 | "indexmap", 921 | "slab", 922 | "tokio", 923 | "tokio-util", 924 | "tracing", 925 | ] 926 | 927 | [[package]] 928 | name = "hashbrown" 929 | version = "0.11.2" 930 | source = "registry+https://github.com/rust-lang/crates.io-index" 931 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 932 | 933 | [[package]] 934 | name = "hashbrown" 935 | version = "0.12.3" 936 | source = "registry+https://github.com/rust-lang/crates.io-index" 937 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 938 | dependencies = [ 939 | "ahash", 940 | ] 941 | 942 | [[package]] 943 | name = "hashlink" 944 | version = "0.8.0" 945 | source = "registry+https://github.com/rust-lang/crates.io-index" 946 | checksum = "d452c155cb93fecdfb02a73dd57b5d8e442c2063bd7aac72f1bc5e4263a43086" 947 | dependencies = [ 948 | "hashbrown 0.12.3", 949 | ] 950 | 951 | [[package]] 952 | name = "heck" 953 | version = "0.4.0" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" 956 | dependencies = [ 957 | "unicode-segmentation", 958 | ] 959 | 960 | [[package]] 961 | name = "hermit-abi" 962 | version = "0.1.19" 963 | source = "registry+https://github.com/rust-lang/crates.io-index" 964 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 965 | dependencies = [ 966 | "libc", 967 | ] 968 | 969 | [[package]] 970 | name = "hex" 971 | version = "0.4.3" 972 | source = "registry+https://github.com/rust-lang/crates.io-index" 973 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 974 | 975 | [[package]] 976 | name = "hkdf" 977 | version = "0.12.3" 978 | source = "registry+https://github.com/rust-lang/crates.io-index" 979 | checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" 980 | dependencies = [ 981 | "hmac", 982 | ] 983 | 984 | [[package]] 985 | name = "hmac" 986 | version = "0.12.1" 987 | source = "registry+https://github.com/rust-lang/crates.io-index" 988 | checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 989 | dependencies = [ 990 | "digest", 991 | ] 992 | 993 | [[package]] 994 | name = "http" 995 | version = "0.2.9" 996 | source = "registry+https://github.com/rust-lang/crates.io-index" 997 | checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" 998 | dependencies = [ 999 | "bytes", 1000 | "fnv", 1001 | "itoa", 1002 | ] 1003 | 1004 | [[package]] 1005 | name = "http-body" 1006 | version = "0.4.5" 1007 | source = "registry+https://github.com/rust-lang/crates.io-index" 1008 | checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" 1009 | dependencies = [ 1010 | "bytes", 1011 | "http", 1012 | "pin-project-lite", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "httparse" 1017 | version = "1.8.0" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 1020 | 1021 | [[package]] 1022 | name = "httpdate" 1023 | version = "1.0.2" 1024 | source = "registry+https://github.com/rust-lang/crates.io-index" 1025 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 1026 | 1027 | [[package]] 1028 | name = "hyper" 1029 | version = "0.14.26" 1030 | source = "registry+https://github.com/rust-lang/crates.io-index" 1031 | checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" 1032 | dependencies = [ 1033 | "bytes", 1034 | "futures-channel", 1035 | "futures-core", 1036 | "futures-util", 1037 | "h2", 1038 | "http", 1039 | "http-body", 1040 | "httparse", 1041 | "httpdate", 1042 | "itoa", 1043 | "pin-project-lite", 1044 | "socket2", 1045 | "tokio", 1046 | "tower-service", 1047 | "tracing", 1048 | "want", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "hyper-rustls" 1053 | version = "0.23.2" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" 1056 | dependencies = [ 1057 | "http", 1058 | "hyper", 1059 | "rustls", 1060 | "tokio", 1061 | "tokio-rustls", 1062 | ] 1063 | 1064 | [[package]] 1065 | name = "iana-time-zone" 1066 | version = "0.1.56" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" 1069 | dependencies = [ 1070 | "android_system_properties", 1071 | "core-foundation-sys", 1072 | "iana-time-zone-haiku", 1073 | "js-sys", 1074 | "wasm-bindgen", 1075 | "windows", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "iana-time-zone-haiku" 1080 | version = "0.1.1" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" 1083 | dependencies = [ 1084 | "cxx", 1085 | "cxx-build", 1086 | ] 1087 | 1088 | [[package]] 1089 | name = "idna" 1090 | version = "0.2.3" 1091 | source = "registry+https://github.com/rust-lang/crates.io-index" 1092 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 1093 | dependencies = [ 1094 | "matches", 1095 | "unicode-bidi", 1096 | "unicode-normalization", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "indexmap" 1101 | version = "1.8.0" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" 1104 | dependencies = [ 1105 | "autocfg", 1106 | "hashbrown 0.11.2", 1107 | ] 1108 | 1109 | [[package]] 1110 | name = "instant" 1111 | version = "0.1.12" 1112 | source = "registry+https://github.com/rust-lang/crates.io-index" 1113 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 1114 | dependencies = [ 1115 | "cfg-if", 1116 | ] 1117 | 1118 | [[package]] 1119 | name = "ipnet" 1120 | version = "2.7.2" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" 1123 | 1124 | [[package]] 1125 | name = "issue-9" 1126 | version = "0.1.0" 1127 | dependencies = [ 1128 | "serenity", 1129 | "sqlx", 1130 | "sqlx-crud", 1131 | "tokio", 1132 | ] 1133 | 1134 | [[package]] 1135 | name = "itertools" 1136 | version = "0.10.3" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" 1139 | dependencies = [ 1140 | "either", 1141 | ] 1142 | 1143 | [[package]] 1144 | name = "itoa" 1145 | version = "1.0.6" 1146 | source = "registry+https://github.com/rust-lang/crates.io-index" 1147 | checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" 1148 | 1149 | [[package]] 1150 | name = "js-sys" 1151 | version = "0.3.56" 1152 | source = "registry+https://github.com/rust-lang/crates.io-index" 1153 | checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" 1154 | dependencies = [ 1155 | "wasm-bindgen", 1156 | ] 1157 | 1158 | [[package]] 1159 | name = "kv-log-macro" 1160 | version = "1.0.7" 1161 | source = "registry+https://github.com/rust-lang/crates.io-index" 1162 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 1163 | dependencies = [ 1164 | "log", 1165 | ] 1166 | 1167 | [[package]] 1168 | name = "lazy_static" 1169 | version = "1.4.0" 1170 | source = "registry+https://github.com/rust-lang/crates.io-index" 1171 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1172 | 1173 | [[package]] 1174 | name = "levenshtein" 1175 | version = "1.0.5" 1176 | source = "registry+https://github.com/rust-lang/crates.io-index" 1177 | checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" 1178 | 1179 | [[package]] 1180 | name = "libc" 1181 | version = "0.2.141" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" 1184 | 1185 | [[package]] 1186 | name = "libsqlite3-sys" 1187 | version = "0.24.2" 1188 | source = "registry+https://github.com/rust-lang/crates.io-index" 1189 | checksum = "898745e570c7d0453cc1fbc4a701eb6c662ed54e8fec8b7d14be137ebeeb9d14" 1190 | dependencies = [ 1191 | "cc", 1192 | "pkg-config", 1193 | "vcpkg", 1194 | ] 1195 | 1196 | [[package]] 1197 | name = "link-cplusplus" 1198 | version = "1.0.8" 1199 | source = "registry+https://github.com/rust-lang/crates.io-index" 1200 | checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" 1201 | dependencies = [ 1202 | "cc", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "lock_api" 1207 | version = "0.4.6" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" 1210 | dependencies = [ 1211 | "scopeguard", 1212 | ] 1213 | 1214 | [[package]] 1215 | name = "log" 1216 | version = "0.4.17" 1217 | source = "registry+https://github.com/rust-lang/crates.io-index" 1218 | checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" 1219 | dependencies = [ 1220 | "cfg-if", 1221 | "value-bag", 1222 | ] 1223 | 1224 | [[package]] 1225 | name = "matches" 1226 | version = "0.1.9" 1227 | source = "registry+https://github.com/rust-lang/crates.io-index" 1228 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 1229 | 1230 | [[package]] 1231 | name = "matchit" 1232 | version = "0.7.0" 1233 | source = "registry+https://github.com/rust-lang/crates.io-index" 1234 | checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" 1235 | 1236 | [[package]] 1237 | name = "md-5" 1238 | version = "0.10.5" 1239 | source = "registry+https://github.com/rust-lang/crates.io-index" 1240 | checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" 1241 | dependencies = [ 1242 | "digest", 1243 | ] 1244 | 1245 | [[package]] 1246 | name = "memchr" 1247 | version = "2.4.1" 1248 | source = "registry+https://github.com/rust-lang/crates.io-index" 1249 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 1250 | 1251 | [[package]] 1252 | name = "mime" 1253 | version = "0.3.17" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1256 | 1257 | [[package]] 1258 | name = "mime_guess" 1259 | version = "2.0.4" 1260 | source = "registry+https://github.com/rust-lang/crates.io-index" 1261 | checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" 1262 | dependencies = [ 1263 | "mime", 1264 | "unicase", 1265 | ] 1266 | 1267 | [[package]] 1268 | name = "minimal-lexical" 1269 | version = "0.2.1" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1272 | 1273 | [[package]] 1274 | name = "miniz_oxide" 1275 | version = "0.6.2" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" 1278 | dependencies = [ 1279 | "adler", 1280 | ] 1281 | 1282 | [[package]] 1283 | name = "mio" 1284 | version = "0.8.6" 1285 | source = "registry+https://github.com/rust-lang/crates.io-index" 1286 | checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" 1287 | dependencies = [ 1288 | "libc", 1289 | "log", 1290 | "wasi 0.11.0+wasi-snapshot-preview1", 1291 | "windows-sys", 1292 | ] 1293 | 1294 | [[package]] 1295 | name = "native-tls" 1296 | version = "0.2.8" 1297 | source = "registry+https://github.com/rust-lang/crates.io-index" 1298 | checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" 1299 | dependencies = [ 1300 | "lazy_static", 1301 | "libc", 1302 | "log", 1303 | "openssl", 1304 | "openssl-probe", 1305 | "openssl-sys", 1306 | "schannel", 1307 | "security-framework", 1308 | "security-framework-sys", 1309 | "tempfile", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "nom" 1314 | version = "7.1.0" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" 1317 | dependencies = [ 1318 | "memchr", 1319 | "minimal-lexical", 1320 | "version_check", 1321 | ] 1322 | 1323 | [[package]] 1324 | name = "num-integer" 1325 | version = "0.1.45" 1326 | source = "registry+https://github.com/rust-lang/crates.io-index" 1327 | checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" 1328 | dependencies = [ 1329 | "autocfg", 1330 | "num-traits", 1331 | ] 1332 | 1333 | [[package]] 1334 | name = "num-traits" 1335 | version = "0.2.14" 1336 | source = "registry+https://github.com/rust-lang/crates.io-index" 1337 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1338 | dependencies = [ 1339 | "autocfg", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "num_cpus" 1344 | version = "1.13.1" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" 1347 | dependencies = [ 1348 | "hermit-abi", 1349 | "libc", 1350 | ] 1351 | 1352 | [[package]] 1353 | name = "object" 1354 | version = "0.30.3" 1355 | source = "registry+https://github.com/rust-lang/crates.io-index" 1356 | checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" 1357 | dependencies = [ 1358 | "memchr", 1359 | ] 1360 | 1361 | [[package]] 1362 | name = "once_cell" 1363 | version = "1.17.1" 1364 | source = "registry+https://github.com/rust-lang/crates.io-index" 1365 | checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" 1366 | 1367 | [[package]] 1368 | name = "openssl" 1369 | version = "0.10.38" 1370 | source = "registry+https://github.com/rust-lang/crates.io-index" 1371 | checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" 1372 | dependencies = [ 1373 | "bitflags", 1374 | "cfg-if", 1375 | "foreign-types", 1376 | "libc", 1377 | "once_cell", 1378 | "openssl-sys", 1379 | ] 1380 | 1381 | [[package]] 1382 | name = "openssl-probe" 1383 | version = "0.1.5" 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" 1385 | checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 1386 | 1387 | [[package]] 1388 | name = "openssl-sys" 1389 | version = "0.9.72" 1390 | source = "registry+https://github.com/rust-lang/crates.io-index" 1391 | checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" 1392 | dependencies = [ 1393 | "autocfg", 1394 | "cc", 1395 | "libc", 1396 | "pkg-config", 1397 | "vcpkg", 1398 | ] 1399 | 1400 | [[package]] 1401 | name = "ordered-float" 1402 | version = "2.10.0" 1403 | source = "registry+https://github.com/rust-lang/crates.io-index" 1404 | checksum = "7940cf2ca942593318d07fcf2596cdca60a85c9e7fab408a5e21a4f9dcd40d87" 1405 | dependencies = [ 1406 | "num-traits", 1407 | ] 1408 | 1409 | [[package]] 1410 | name = "parking" 1411 | version = "2.0.0" 1412 | source = "registry+https://github.com/rust-lang/crates.io-index" 1413 | checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" 1414 | 1415 | [[package]] 1416 | name = "parking_lot" 1417 | version = "0.11.2" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1420 | dependencies = [ 1421 | "instant", 1422 | "lock_api", 1423 | "parking_lot_core 0.8.5", 1424 | ] 1425 | 1426 | [[package]] 1427 | name = "parking_lot" 1428 | version = "0.12.1" 1429 | source = "registry+https://github.com/rust-lang/crates.io-index" 1430 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1431 | dependencies = [ 1432 | "lock_api", 1433 | "parking_lot_core 0.9.7", 1434 | ] 1435 | 1436 | [[package]] 1437 | name = "parking_lot_core" 1438 | version = "0.8.5" 1439 | source = "registry+https://github.com/rust-lang/crates.io-index" 1440 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 1441 | dependencies = [ 1442 | "cfg-if", 1443 | "instant", 1444 | "libc", 1445 | "redox_syscall", 1446 | "smallvec", 1447 | "winapi", 1448 | ] 1449 | 1450 | [[package]] 1451 | name = "parking_lot_core" 1452 | version = "0.9.7" 1453 | source = "registry+https://github.com/rust-lang/crates.io-index" 1454 | checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" 1455 | dependencies = [ 1456 | "cfg-if", 1457 | "libc", 1458 | "redox_syscall", 1459 | "smallvec", 1460 | "windows-sys", 1461 | ] 1462 | 1463 | [[package]] 1464 | name = "paste" 1465 | version = "1.0.6" 1466 | source = "registry+https://github.com/rust-lang/crates.io-index" 1467 | checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" 1468 | 1469 | [[package]] 1470 | name = "percent-encoding" 1471 | version = "2.1.0" 1472 | source = "registry+https://github.com/rust-lang/crates.io-index" 1473 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1474 | 1475 | [[package]] 1476 | name = "pin-project" 1477 | version = "1.0.10" 1478 | source = "registry+https://github.com/rust-lang/crates.io-index" 1479 | checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" 1480 | dependencies = [ 1481 | "pin-project-internal", 1482 | ] 1483 | 1484 | [[package]] 1485 | name = "pin-project-internal" 1486 | version = "1.0.10" 1487 | source = "registry+https://github.com/rust-lang/crates.io-index" 1488 | checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" 1489 | dependencies = [ 1490 | "proc-macro2", 1491 | "quote", 1492 | "syn 1.0.109", 1493 | ] 1494 | 1495 | [[package]] 1496 | name = "pin-project-lite" 1497 | version = "0.2.9" 1498 | source = "registry+https://github.com/rust-lang/crates.io-index" 1499 | checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" 1500 | 1501 | [[package]] 1502 | name = "pin-utils" 1503 | version = "0.1.0" 1504 | source = "registry+https://github.com/rust-lang/crates.io-index" 1505 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1506 | 1507 | [[package]] 1508 | name = "pkg-config" 1509 | version = "0.3.24" 1510 | source = "registry+https://github.com/rust-lang/crates.io-index" 1511 | checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" 1512 | 1513 | [[package]] 1514 | name = "polling" 1515 | version = "2.2.0" 1516 | source = "registry+https://github.com/rust-lang/crates.io-index" 1517 | checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" 1518 | dependencies = [ 1519 | "cfg-if", 1520 | "libc", 1521 | "log", 1522 | "wepoll-ffi", 1523 | "winapi", 1524 | ] 1525 | 1526 | [[package]] 1527 | name = "ppv-lite86" 1528 | version = "0.2.17" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1531 | 1532 | [[package]] 1533 | name = "proc-macro2" 1534 | version = "1.0.56" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 1537 | dependencies = [ 1538 | "unicode-ident", 1539 | ] 1540 | 1541 | [[package]] 1542 | name = "quote" 1543 | version = "1.0.26" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 1546 | dependencies = [ 1547 | "proc-macro2", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "rand" 1552 | version = "0.8.5" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1555 | dependencies = [ 1556 | "libc", 1557 | "rand_chacha", 1558 | "rand_core", 1559 | ] 1560 | 1561 | [[package]] 1562 | name = "rand_chacha" 1563 | version = "0.3.1" 1564 | source = "registry+https://github.com/rust-lang/crates.io-index" 1565 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1566 | dependencies = [ 1567 | "ppv-lite86", 1568 | "rand_core", 1569 | ] 1570 | 1571 | [[package]] 1572 | name = "rand_core" 1573 | version = "0.6.4" 1574 | source = "registry+https://github.com/rust-lang/crates.io-index" 1575 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1576 | dependencies = [ 1577 | "getrandom", 1578 | ] 1579 | 1580 | [[package]] 1581 | name = "redox_syscall" 1582 | version = "0.2.11" 1583 | source = "registry+https://github.com/rust-lang/crates.io-index" 1584 | checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" 1585 | dependencies = [ 1586 | "bitflags", 1587 | ] 1588 | 1589 | [[package]] 1590 | name = "redox_users" 1591 | version = "0.4.3" 1592 | source = "registry+https://github.com/rust-lang/crates.io-index" 1593 | checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" 1594 | dependencies = [ 1595 | "getrandom", 1596 | "redox_syscall", 1597 | "thiserror", 1598 | ] 1599 | 1600 | [[package]] 1601 | name = "regex" 1602 | version = "1.5.4" 1603 | source = "registry+https://github.com/rust-lang/crates.io-index" 1604 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 1605 | dependencies = [ 1606 | "aho-corasick", 1607 | "memchr", 1608 | "regex-syntax", 1609 | ] 1610 | 1611 | [[package]] 1612 | name = "regex-syntax" 1613 | version = "0.6.25" 1614 | source = "registry+https://github.com/rust-lang/crates.io-index" 1615 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 1616 | 1617 | [[package]] 1618 | name = "remove_dir_all" 1619 | version = "0.5.3" 1620 | source = "registry+https://github.com/rust-lang/crates.io-index" 1621 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1622 | dependencies = [ 1623 | "winapi", 1624 | ] 1625 | 1626 | [[package]] 1627 | name = "reqwest" 1628 | version = "0.11.16" 1629 | source = "registry+https://github.com/rust-lang/crates.io-index" 1630 | checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" 1631 | dependencies = [ 1632 | "base64 0.21.0", 1633 | "bytes", 1634 | "encoding_rs", 1635 | "futures-core", 1636 | "futures-util", 1637 | "h2", 1638 | "http", 1639 | "http-body", 1640 | "hyper", 1641 | "hyper-rustls", 1642 | "ipnet", 1643 | "js-sys", 1644 | "log", 1645 | "mime", 1646 | "mime_guess", 1647 | "once_cell", 1648 | "percent-encoding", 1649 | "pin-project-lite", 1650 | "rustls", 1651 | "rustls-pemfile", 1652 | "serde", 1653 | "serde_json", 1654 | "serde_urlencoded", 1655 | "tokio", 1656 | "tokio-rustls", 1657 | "tokio-util", 1658 | "tower-service", 1659 | "url", 1660 | "wasm-bindgen", 1661 | "wasm-bindgen-futures", 1662 | "wasm-streams", 1663 | "web-sys", 1664 | "webpki-roots", 1665 | "winreg", 1666 | ] 1667 | 1668 | [[package]] 1669 | name = "ring" 1670 | version = "0.16.20" 1671 | source = "registry+https://github.com/rust-lang/crates.io-index" 1672 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1673 | dependencies = [ 1674 | "cc", 1675 | "libc", 1676 | "once_cell", 1677 | "spin 0.5.2", 1678 | "untrusted", 1679 | "web-sys", 1680 | "winapi", 1681 | ] 1682 | 1683 | [[package]] 1684 | name = "rustc-demangle" 1685 | version = "0.1.23" 1686 | source = "registry+https://github.com/rust-lang/crates.io-index" 1687 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 1688 | 1689 | [[package]] 1690 | name = "rustls" 1691 | version = "0.20.6" 1692 | source = "registry+https://github.com/rust-lang/crates.io-index" 1693 | checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" 1694 | dependencies = [ 1695 | "log", 1696 | "ring", 1697 | "sct", 1698 | "webpki", 1699 | ] 1700 | 1701 | [[package]] 1702 | name = "rustls-pemfile" 1703 | version = "1.0.1" 1704 | source = "registry+https://github.com/rust-lang/crates.io-index" 1705 | checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" 1706 | dependencies = [ 1707 | "base64 0.13.0", 1708 | ] 1709 | 1710 | [[package]] 1711 | name = "rustversion" 1712 | version = "1.0.12" 1713 | source = "registry+https://github.com/rust-lang/crates.io-index" 1714 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 1715 | 1716 | [[package]] 1717 | name = "ryu" 1718 | version = "1.0.13" 1719 | source = "registry+https://github.com/rust-lang/crates.io-index" 1720 | checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" 1721 | 1722 | [[package]] 1723 | name = "schannel" 1724 | version = "0.1.19" 1725 | source = "registry+https://github.com/rust-lang/crates.io-index" 1726 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 1727 | dependencies = [ 1728 | "lazy_static", 1729 | "winapi", 1730 | ] 1731 | 1732 | [[package]] 1733 | name = "scopeguard" 1734 | version = "1.1.0" 1735 | source = "registry+https://github.com/rust-lang/crates.io-index" 1736 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1737 | 1738 | [[package]] 1739 | name = "scratch" 1740 | version = "1.0.5" 1741 | source = "registry+https://github.com/rust-lang/crates.io-index" 1742 | checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" 1743 | 1744 | [[package]] 1745 | name = "sct" 1746 | version = "0.7.0" 1747 | source = "registry+https://github.com/rust-lang/crates.io-index" 1748 | checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" 1749 | dependencies = [ 1750 | "ring", 1751 | "untrusted", 1752 | ] 1753 | 1754 | [[package]] 1755 | name = "security-framework" 1756 | version = "2.6.1" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" 1759 | dependencies = [ 1760 | "bitflags", 1761 | "core-foundation", 1762 | "core-foundation-sys", 1763 | "libc", 1764 | "security-framework-sys", 1765 | ] 1766 | 1767 | [[package]] 1768 | name = "security-framework-sys" 1769 | version = "2.6.1" 1770 | source = "registry+https://github.com/rust-lang/crates.io-index" 1771 | checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" 1772 | dependencies = [ 1773 | "core-foundation-sys", 1774 | "libc", 1775 | ] 1776 | 1777 | [[package]] 1778 | name = "serde" 1779 | version = "1.0.160" 1780 | source = "registry+https://github.com/rust-lang/crates.io-index" 1781 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 1782 | dependencies = [ 1783 | "serde_derive", 1784 | ] 1785 | 1786 | [[package]] 1787 | name = "serde-value" 1788 | version = "0.7.0" 1789 | source = "registry+https://github.com/rust-lang/crates.io-index" 1790 | checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" 1791 | dependencies = [ 1792 | "ordered-float", 1793 | "serde", 1794 | ] 1795 | 1796 | [[package]] 1797 | name = "serde_derive" 1798 | version = "1.0.160" 1799 | source = "registry+https://github.com/rust-lang/crates.io-index" 1800 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 1801 | dependencies = [ 1802 | "proc-macro2", 1803 | "quote", 1804 | "syn 2.0.15", 1805 | ] 1806 | 1807 | [[package]] 1808 | name = "serde_json" 1809 | version = "1.0.96" 1810 | source = "registry+https://github.com/rust-lang/crates.io-index" 1811 | checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" 1812 | dependencies = [ 1813 | "itoa", 1814 | "ryu", 1815 | "serde", 1816 | ] 1817 | 1818 | [[package]] 1819 | name = "serde_path_to_error" 1820 | version = "0.1.11" 1821 | source = "registry+https://github.com/rust-lang/crates.io-index" 1822 | checksum = "f7f05c1d5476066defcdfacce1f52fc3cae3af1d3089727100c02ae92e5abbe0" 1823 | dependencies = [ 1824 | "serde", 1825 | ] 1826 | 1827 | [[package]] 1828 | name = "serde_urlencoded" 1829 | version = "0.7.1" 1830 | source = "registry+https://github.com/rust-lang/crates.io-index" 1831 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1832 | dependencies = [ 1833 | "form_urlencoded", 1834 | "itoa", 1835 | "ryu", 1836 | "serde", 1837 | ] 1838 | 1839 | [[package]] 1840 | name = "serenity" 1841 | version = "0.11.5" 1842 | source = "registry+https://github.com/rust-lang/crates.io-index" 1843 | checksum = "82fd5e7b5858ad96e99d440138f34f5b98e1b959ebcd3a1036203b30e78eb788" 1844 | dependencies = [ 1845 | "async-trait", 1846 | "async-tungstenite", 1847 | "base64 0.13.0", 1848 | "bitflags", 1849 | "bytes", 1850 | "cfg-if", 1851 | "chrono", 1852 | "command_attr", 1853 | "dashmap", 1854 | "flate2", 1855 | "futures", 1856 | "levenshtein", 1857 | "mime", 1858 | "mime_guess", 1859 | "parking_lot 0.12.1", 1860 | "percent-encoding", 1861 | "reqwest", 1862 | "serde", 1863 | "serde-value", 1864 | "serde_json", 1865 | "static_assertions", 1866 | "time", 1867 | "tokio", 1868 | "tracing", 1869 | "typemap_rev", 1870 | "url", 1871 | "uwl", 1872 | ] 1873 | 1874 | [[package]] 1875 | name = "sha-1" 1876 | version = "0.10.1" 1877 | source = "registry+https://github.com/rust-lang/crates.io-index" 1878 | checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" 1879 | dependencies = [ 1880 | "cfg-if", 1881 | "cpufeatures", 1882 | "digest", 1883 | ] 1884 | 1885 | [[package]] 1886 | name = "sha1" 1887 | version = "0.10.5" 1888 | source = "registry+https://github.com/rust-lang/crates.io-index" 1889 | checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" 1890 | dependencies = [ 1891 | "cfg-if", 1892 | "cpufeatures", 1893 | "digest", 1894 | ] 1895 | 1896 | [[package]] 1897 | name = "sha2" 1898 | version = "0.10.5" 1899 | source = "registry+https://github.com/rust-lang/crates.io-index" 1900 | checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" 1901 | dependencies = [ 1902 | "cfg-if", 1903 | "cpufeatures", 1904 | "digest", 1905 | ] 1906 | 1907 | [[package]] 1908 | name = "signal-hook" 1909 | version = "0.3.13" 1910 | source = "registry+https://github.com/rust-lang/crates.io-index" 1911 | checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" 1912 | dependencies = [ 1913 | "libc", 1914 | "signal-hook-registry", 1915 | ] 1916 | 1917 | [[package]] 1918 | name = "signal-hook-registry" 1919 | version = "1.4.0" 1920 | source = "registry+https://github.com/rust-lang/crates.io-index" 1921 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 1922 | dependencies = [ 1923 | "libc", 1924 | ] 1925 | 1926 | [[package]] 1927 | name = "slab" 1928 | version = "0.4.5" 1929 | source = "registry+https://github.com/rust-lang/crates.io-index" 1930 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" 1931 | 1932 | [[package]] 1933 | name = "smallvec" 1934 | version = "1.10.0" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" 1937 | 1938 | [[package]] 1939 | name = "socket2" 1940 | version = "0.4.9" 1941 | source = "registry+https://github.com/rust-lang/crates.io-index" 1942 | checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" 1943 | dependencies = [ 1944 | "libc", 1945 | "winapi", 1946 | ] 1947 | 1948 | [[package]] 1949 | name = "spin" 1950 | version = "0.5.2" 1951 | source = "registry+https://github.com/rust-lang/crates.io-index" 1952 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 1953 | 1954 | [[package]] 1955 | name = "spin" 1956 | version = "0.9.2" 1957 | source = "registry+https://github.com/rust-lang/crates.io-index" 1958 | checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" 1959 | dependencies = [ 1960 | "lock_api", 1961 | ] 1962 | 1963 | [[package]] 1964 | name = "sqlformat" 1965 | version = "0.2.1" 1966 | source = "registry+https://github.com/rust-lang/crates.io-index" 1967 | checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" 1968 | dependencies = [ 1969 | "itertools", 1970 | "nom", 1971 | "unicode_categories", 1972 | ] 1973 | 1974 | [[package]] 1975 | name = "sqlx" 1976 | version = "0.6.3" 1977 | source = "registry+https://github.com/rust-lang/crates.io-index" 1978 | checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" 1979 | dependencies = [ 1980 | "sqlx-core", 1981 | "sqlx-macros", 1982 | ] 1983 | 1984 | [[package]] 1985 | name = "sqlx-core" 1986 | version = "0.6.3" 1987 | source = "registry+https://github.com/rust-lang/crates.io-index" 1988 | checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" 1989 | dependencies = [ 1990 | "ahash", 1991 | "atoi", 1992 | "base64 0.13.0", 1993 | "bitflags", 1994 | "byteorder", 1995 | "bytes", 1996 | "crc", 1997 | "crossbeam-queue", 1998 | "dirs", 1999 | "dotenvy", 2000 | "either", 2001 | "event-listener", 2002 | "flume", 2003 | "futures-channel", 2004 | "futures-core", 2005 | "futures-executor", 2006 | "futures-intrusive", 2007 | "futures-util", 2008 | "hashlink", 2009 | "hex", 2010 | "hkdf", 2011 | "hmac", 2012 | "indexmap", 2013 | "itoa", 2014 | "libc", 2015 | "libsqlite3-sys", 2016 | "log", 2017 | "md-5", 2018 | "memchr", 2019 | "once_cell", 2020 | "paste", 2021 | "percent-encoding", 2022 | "rand", 2023 | "rustls", 2024 | "rustls-pemfile", 2025 | "serde", 2026 | "serde_json", 2027 | "sha1", 2028 | "sha2", 2029 | "smallvec", 2030 | "sqlformat", 2031 | "sqlx-rt", 2032 | "stringprep", 2033 | "thiserror", 2034 | "tokio-stream", 2035 | "url", 2036 | "webpki-roots", 2037 | "whoami", 2038 | ] 2039 | 2040 | [[package]] 2041 | name = "sqlx-crud" 2042 | version = "0.4.0" 2043 | dependencies = [ 2044 | "futures", 2045 | "sqlx", 2046 | "sqlx-crud-macros", 2047 | "thiserror", 2048 | "tokio-test", 2049 | ] 2050 | 2051 | [[package]] 2052 | name = "sqlx-crud-macros" 2053 | version = "0.4.0" 2054 | dependencies = [ 2055 | "Inflector", 2056 | "proc-macro2", 2057 | "quote", 2058 | "syn 2.0.15", 2059 | ] 2060 | 2061 | [[package]] 2062 | name = "sqlx-macros" 2063 | version = "0.6.3" 2064 | source = "registry+https://github.com/rust-lang/crates.io-index" 2065 | checksum = "9966e64ae989e7e575b19d7265cb79d7fc3cbbdf179835cb0d716f294c2049c9" 2066 | dependencies = [ 2067 | "dotenvy", 2068 | "either", 2069 | "heck", 2070 | "once_cell", 2071 | "proc-macro2", 2072 | "quote", 2073 | "sha2", 2074 | "sqlx-core", 2075 | "sqlx-rt", 2076 | "syn 1.0.109", 2077 | "url", 2078 | ] 2079 | 2080 | [[package]] 2081 | name = "sqlx-rt" 2082 | version = "0.6.3" 2083 | source = "registry+https://github.com/rust-lang/crates.io-index" 2084 | checksum = "804d3f245f894e61b1e6263c84b23ca675d96753b5abfd5cc8597d86806e8024" 2085 | dependencies = [ 2086 | "async-native-tls", 2087 | "async-std", 2088 | "futures-rustls", 2089 | "native-tls", 2090 | "once_cell", 2091 | "tokio", 2092 | "tokio-native-tls", 2093 | "tokio-rustls", 2094 | ] 2095 | 2096 | [[package]] 2097 | name = "static_assertions" 2098 | version = "1.1.0" 2099 | source = "registry+https://github.com/rust-lang/crates.io-index" 2100 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2101 | 2102 | [[package]] 2103 | name = "stringprep" 2104 | version = "0.1.2" 2105 | source = "registry+https://github.com/rust-lang/crates.io-index" 2106 | checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" 2107 | dependencies = [ 2108 | "unicode-bidi", 2109 | "unicode-normalization", 2110 | ] 2111 | 2112 | [[package]] 2113 | name = "subtle" 2114 | version = "2.4.1" 2115 | source = "registry+https://github.com/rust-lang/crates.io-index" 2116 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 2117 | 2118 | [[package]] 2119 | name = "syn" 2120 | version = "1.0.109" 2121 | source = "registry+https://github.com/rust-lang/crates.io-index" 2122 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2123 | dependencies = [ 2124 | "proc-macro2", 2125 | "quote", 2126 | "unicode-ident", 2127 | ] 2128 | 2129 | [[package]] 2130 | name = "syn" 2131 | version = "2.0.15" 2132 | source = "registry+https://github.com/rust-lang/crates.io-index" 2133 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 2134 | dependencies = [ 2135 | "proc-macro2", 2136 | "quote", 2137 | "unicode-ident", 2138 | ] 2139 | 2140 | [[package]] 2141 | name = "sync_wrapper" 2142 | version = "0.1.2" 2143 | source = "registry+https://github.com/rust-lang/crates.io-index" 2144 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 2145 | 2146 | [[package]] 2147 | name = "tempfile" 2148 | version = "3.3.0" 2149 | source = "registry+https://github.com/rust-lang/crates.io-index" 2150 | checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" 2151 | dependencies = [ 2152 | "cfg-if", 2153 | "fastrand", 2154 | "libc", 2155 | "redox_syscall", 2156 | "remove_dir_all", 2157 | "winapi", 2158 | ] 2159 | 2160 | [[package]] 2161 | name = "termcolor" 2162 | version = "1.2.0" 2163 | source = "registry+https://github.com/rust-lang/crates.io-index" 2164 | checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" 2165 | dependencies = [ 2166 | "winapi-util", 2167 | ] 2168 | 2169 | [[package]] 2170 | name = "thiserror" 2171 | version = "1.0.30" 2172 | source = "registry+https://github.com/rust-lang/crates.io-index" 2173 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 2174 | dependencies = [ 2175 | "thiserror-impl", 2176 | ] 2177 | 2178 | [[package]] 2179 | name = "thiserror-impl" 2180 | version = "1.0.30" 2181 | source = "registry+https://github.com/rust-lang/crates.io-index" 2182 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 2183 | dependencies = [ 2184 | "proc-macro2", 2185 | "quote", 2186 | "syn 1.0.109", 2187 | ] 2188 | 2189 | [[package]] 2190 | name = "time" 2191 | version = "0.3.20" 2192 | source = "registry+https://github.com/rust-lang/crates.io-index" 2193 | checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" 2194 | dependencies = [ 2195 | "itoa", 2196 | "serde", 2197 | "time-core", 2198 | "time-macros", 2199 | ] 2200 | 2201 | [[package]] 2202 | name = "time-core" 2203 | version = "0.1.0" 2204 | source = "registry+https://github.com/rust-lang/crates.io-index" 2205 | checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" 2206 | 2207 | [[package]] 2208 | name = "time-macros" 2209 | version = "0.2.8" 2210 | source = "registry+https://github.com/rust-lang/crates.io-index" 2211 | checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" 2212 | dependencies = [ 2213 | "time-core", 2214 | ] 2215 | 2216 | [[package]] 2217 | name = "tinyvec" 2218 | version = "1.5.1" 2219 | source = "registry+https://github.com/rust-lang/crates.io-index" 2220 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" 2221 | dependencies = [ 2222 | "tinyvec_macros", 2223 | ] 2224 | 2225 | [[package]] 2226 | name = "tinyvec_macros" 2227 | version = "0.1.0" 2228 | source = "registry+https://github.com/rust-lang/crates.io-index" 2229 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2230 | 2231 | [[package]] 2232 | name = "tokio" 2233 | version = "1.27.0" 2234 | source = "registry+https://github.com/rust-lang/crates.io-index" 2235 | checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" 2236 | dependencies = [ 2237 | "autocfg", 2238 | "bytes", 2239 | "libc", 2240 | "mio", 2241 | "num_cpus", 2242 | "pin-project-lite", 2243 | "socket2", 2244 | "tokio-macros", 2245 | "windows-sys", 2246 | ] 2247 | 2248 | [[package]] 2249 | name = "tokio-macros" 2250 | version = "2.0.0" 2251 | source = "registry+https://github.com/rust-lang/crates.io-index" 2252 | checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" 2253 | dependencies = [ 2254 | "proc-macro2", 2255 | "quote", 2256 | "syn 2.0.15", 2257 | ] 2258 | 2259 | [[package]] 2260 | name = "tokio-native-tls" 2261 | version = "0.3.0" 2262 | source = "registry+https://github.com/rust-lang/crates.io-index" 2263 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 2264 | dependencies = [ 2265 | "native-tls", 2266 | "tokio", 2267 | ] 2268 | 2269 | [[package]] 2270 | name = "tokio-rustls" 2271 | version = "0.23.4" 2272 | source = "registry+https://github.com/rust-lang/crates.io-index" 2273 | checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" 2274 | dependencies = [ 2275 | "rustls", 2276 | "tokio", 2277 | "webpki", 2278 | ] 2279 | 2280 | [[package]] 2281 | name = "tokio-stream" 2282 | version = "0.1.8" 2283 | source = "registry+https://github.com/rust-lang/crates.io-index" 2284 | checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" 2285 | dependencies = [ 2286 | "futures-core", 2287 | "pin-project-lite", 2288 | "tokio", 2289 | ] 2290 | 2291 | [[package]] 2292 | name = "tokio-test" 2293 | version = "0.4.2" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "53474327ae5e166530d17f2d956afcb4f8a004de581b3cae10f12006bc8163e3" 2296 | dependencies = [ 2297 | "async-stream", 2298 | "bytes", 2299 | "futures-core", 2300 | "tokio", 2301 | "tokio-stream", 2302 | ] 2303 | 2304 | [[package]] 2305 | name = "tokio-util" 2306 | version = "0.7.7" 2307 | source = "registry+https://github.com/rust-lang/crates.io-index" 2308 | checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" 2309 | dependencies = [ 2310 | "bytes", 2311 | "futures-core", 2312 | "futures-sink", 2313 | "pin-project-lite", 2314 | "tokio", 2315 | "tracing", 2316 | ] 2317 | 2318 | [[package]] 2319 | name = "tower" 2320 | version = "0.4.13" 2321 | source = "registry+https://github.com/rust-lang/crates.io-index" 2322 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2323 | dependencies = [ 2324 | "futures-core", 2325 | "futures-util", 2326 | "pin-project", 2327 | "pin-project-lite", 2328 | "tokio", 2329 | "tower-layer", 2330 | "tower-service", 2331 | "tracing", 2332 | ] 2333 | 2334 | [[package]] 2335 | name = "tower-layer" 2336 | version = "0.3.2" 2337 | source = "registry+https://github.com/rust-lang/crates.io-index" 2338 | checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" 2339 | 2340 | [[package]] 2341 | name = "tower-service" 2342 | version = "0.3.2" 2343 | source = "registry+https://github.com/rust-lang/crates.io-index" 2344 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 2345 | 2346 | [[package]] 2347 | name = "tracing" 2348 | version = "0.1.37" 2349 | source = "registry+https://github.com/rust-lang/crates.io-index" 2350 | checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" 2351 | dependencies = [ 2352 | "cfg-if", 2353 | "log", 2354 | "pin-project-lite", 2355 | "tracing-attributes", 2356 | "tracing-core", 2357 | ] 2358 | 2359 | [[package]] 2360 | name = "tracing-attributes" 2361 | version = "0.1.23" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" 2364 | dependencies = [ 2365 | "proc-macro2", 2366 | "quote", 2367 | "syn 1.0.109", 2368 | ] 2369 | 2370 | [[package]] 2371 | name = "tracing-core" 2372 | version = "0.1.30" 2373 | source = "registry+https://github.com/rust-lang/crates.io-index" 2374 | checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" 2375 | dependencies = [ 2376 | "once_cell", 2377 | ] 2378 | 2379 | [[package]] 2380 | name = "try-lock" 2381 | version = "0.2.4" 2382 | source = "registry+https://github.com/rust-lang/crates.io-index" 2383 | checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" 2384 | 2385 | [[package]] 2386 | name = "tungstenite" 2387 | version = "0.17.3" 2388 | source = "registry+https://github.com/rust-lang/crates.io-index" 2389 | checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" 2390 | dependencies = [ 2391 | "base64 0.13.0", 2392 | "byteorder", 2393 | "bytes", 2394 | "http", 2395 | "httparse", 2396 | "log", 2397 | "rand", 2398 | "rustls", 2399 | "sha-1", 2400 | "thiserror", 2401 | "url", 2402 | "utf-8", 2403 | "webpki", 2404 | ] 2405 | 2406 | [[package]] 2407 | name = "typemap_rev" 2408 | version = "0.1.5" 2409 | source = "registry+https://github.com/rust-lang/crates.io-index" 2410 | checksum = "ed5b74f0a24b5454580a79abb6994393b09adf0ab8070f15827cb666255de155" 2411 | 2412 | [[package]] 2413 | name = "typenum" 2414 | version = "1.15.0" 2415 | source = "registry+https://github.com/rust-lang/crates.io-index" 2416 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 2417 | 2418 | [[package]] 2419 | name = "unicase" 2420 | version = "2.6.0" 2421 | source = "registry+https://github.com/rust-lang/crates.io-index" 2422 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 2423 | dependencies = [ 2424 | "version_check", 2425 | ] 2426 | 2427 | [[package]] 2428 | name = "unicode-bidi" 2429 | version = "0.3.7" 2430 | source = "registry+https://github.com/rust-lang/crates.io-index" 2431 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" 2432 | 2433 | [[package]] 2434 | name = "unicode-ident" 2435 | version = "1.0.8" 2436 | source = "registry+https://github.com/rust-lang/crates.io-index" 2437 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 2438 | 2439 | [[package]] 2440 | name = "unicode-normalization" 2441 | version = "0.1.19" 2442 | source = "registry+https://github.com/rust-lang/crates.io-index" 2443 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 2444 | dependencies = [ 2445 | "tinyvec", 2446 | ] 2447 | 2448 | [[package]] 2449 | name = "unicode-segmentation" 2450 | version = "1.9.0" 2451 | source = "registry+https://github.com/rust-lang/crates.io-index" 2452 | checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" 2453 | 2454 | [[package]] 2455 | name = "unicode-width" 2456 | version = "0.1.10" 2457 | source = "registry+https://github.com/rust-lang/crates.io-index" 2458 | checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" 2459 | 2460 | [[package]] 2461 | name = "unicode_categories" 2462 | version = "0.1.1" 2463 | source = "registry+https://github.com/rust-lang/crates.io-index" 2464 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 2465 | 2466 | [[package]] 2467 | name = "untrusted" 2468 | version = "0.7.1" 2469 | source = "registry+https://github.com/rust-lang/crates.io-index" 2470 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2471 | 2472 | [[package]] 2473 | name = "url" 2474 | version = "2.2.2" 2475 | source = "registry+https://github.com/rust-lang/crates.io-index" 2476 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 2477 | dependencies = [ 2478 | "form_urlencoded", 2479 | "idna", 2480 | "matches", 2481 | "percent-encoding", 2482 | "serde", 2483 | ] 2484 | 2485 | [[package]] 2486 | name = "utf-8" 2487 | version = "0.7.6" 2488 | source = "registry+https://github.com/rust-lang/crates.io-index" 2489 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 2490 | 2491 | [[package]] 2492 | name = "uwl" 2493 | version = "0.6.0" 2494 | source = "registry+https://github.com/rust-lang/crates.io-index" 2495 | checksum = "f4bf03e0ca70d626ecc4ba6b0763b934b6f2976e8c744088bb3c1d646fbb1ad0" 2496 | 2497 | [[package]] 2498 | name = "value-bag" 2499 | version = "1.0.0-alpha.9" 2500 | source = "registry+https://github.com/rust-lang/crates.io-index" 2501 | checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" 2502 | dependencies = [ 2503 | "ctor", 2504 | "version_check", 2505 | ] 2506 | 2507 | [[package]] 2508 | name = "vcpkg" 2509 | version = "0.2.15" 2510 | source = "registry+https://github.com/rust-lang/crates.io-index" 2511 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2512 | 2513 | [[package]] 2514 | name = "version_check" 2515 | version = "0.9.4" 2516 | source = "registry+https://github.com/rust-lang/crates.io-index" 2517 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2518 | 2519 | [[package]] 2520 | name = "waker-fn" 2521 | version = "1.1.0" 2522 | source = "registry+https://github.com/rust-lang/crates.io-index" 2523 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 2524 | 2525 | [[package]] 2526 | name = "want" 2527 | version = "0.3.0" 2528 | source = "registry+https://github.com/rust-lang/crates.io-index" 2529 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 2530 | dependencies = [ 2531 | "log", 2532 | "try-lock", 2533 | ] 2534 | 2535 | [[package]] 2536 | name = "wasi" 2537 | version = "0.10.2+wasi-snapshot-preview1" 2538 | source = "registry+https://github.com/rust-lang/crates.io-index" 2539 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 2540 | 2541 | [[package]] 2542 | name = "wasi" 2543 | version = "0.11.0+wasi-snapshot-preview1" 2544 | source = "registry+https://github.com/rust-lang/crates.io-index" 2545 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2546 | 2547 | [[package]] 2548 | name = "wasm-bindgen" 2549 | version = "0.2.79" 2550 | source = "registry+https://github.com/rust-lang/crates.io-index" 2551 | checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" 2552 | dependencies = [ 2553 | "cfg-if", 2554 | "wasm-bindgen-macro", 2555 | ] 2556 | 2557 | [[package]] 2558 | name = "wasm-bindgen-backend" 2559 | version = "0.2.79" 2560 | source = "registry+https://github.com/rust-lang/crates.io-index" 2561 | checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" 2562 | dependencies = [ 2563 | "bumpalo", 2564 | "lazy_static", 2565 | "log", 2566 | "proc-macro2", 2567 | "quote", 2568 | "syn 1.0.109", 2569 | "wasm-bindgen-shared", 2570 | ] 2571 | 2572 | [[package]] 2573 | name = "wasm-bindgen-futures" 2574 | version = "0.4.29" 2575 | source = "registry+https://github.com/rust-lang/crates.io-index" 2576 | checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" 2577 | dependencies = [ 2578 | "cfg-if", 2579 | "js-sys", 2580 | "wasm-bindgen", 2581 | "web-sys", 2582 | ] 2583 | 2584 | [[package]] 2585 | name = "wasm-bindgen-macro" 2586 | version = "0.2.79" 2587 | source = "registry+https://github.com/rust-lang/crates.io-index" 2588 | checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" 2589 | dependencies = [ 2590 | "quote", 2591 | "wasm-bindgen-macro-support", 2592 | ] 2593 | 2594 | [[package]] 2595 | name = "wasm-bindgen-macro-support" 2596 | version = "0.2.79" 2597 | source = "registry+https://github.com/rust-lang/crates.io-index" 2598 | checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" 2599 | dependencies = [ 2600 | "proc-macro2", 2601 | "quote", 2602 | "syn 1.0.109", 2603 | "wasm-bindgen-backend", 2604 | "wasm-bindgen-shared", 2605 | ] 2606 | 2607 | [[package]] 2608 | name = "wasm-bindgen-shared" 2609 | version = "0.2.79" 2610 | source = "registry+https://github.com/rust-lang/crates.io-index" 2611 | checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" 2612 | 2613 | [[package]] 2614 | name = "wasm-streams" 2615 | version = "0.2.3" 2616 | source = "registry+https://github.com/rust-lang/crates.io-index" 2617 | checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" 2618 | dependencies = [ 2619 | "futures-util", 2620 | "js-sys", 2621 | "wasm-bindgen", 2622 | "wasm-bindgen-futures", 2623 | "web-sys", 2624 | ] 2625 | 2626 | [[package]] 2627 | name = "web-sys" 2628 | version = "0.3.56" 2629 | source = "registry+https://github.com/rust-lang/crates.io-index" 2630 | checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" 2631 | dependencies = [ 2632 | "js-sys", 2633 | "wasm-bindgen", 2634 | ] 2635 | 2636 | [[package]] 2637 | name = "webpki" 2638 | version = "0.22.0" 2639 | source = "registry+https://github.com/rust-lang/crates.io-index" 2640 | checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" 2641 | dependencies = [ 2642 | "ring", 2643 | "untrusted", 2644 | ] 2645 | 2646 | [[package]] 2647 | name = "webpki-roots" 2648 | version = "0.22.4" 2649 | source = "registry+https://github.com/rust-lang/crates.io-index" 2650 | checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" 2651 | dependencies = [ 2652 | "webpki", 2653 | ] 2654 | 2655 | [[package]] 2656 | name = "wepoll-ffi" 2657 | version = "0.1.2" 2658 | source = "registry+https://github.com/rust-lang/crates.io-index" 2659 | checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" 2660 | dependencies = [ 2661 | "cc", 2662 | ] 2663 | 2664 | [[package]] 2665 | name = "whoami" 2666 | version = "1.4.0" 2667 | source = "registry+https://github.com/rust-lang/crates.io-index" 2668 | checksum = "2c70234412ca409cc04e864e89523cb0fc37f5e1344ebed5a3ebf4192b6b9f68" 2669 | dependencies = [ 2670 | "wasm-bindgen", 2671 | "web-sys", 2672 | ] 2673 | 2674 | [[package]] 2675 | name = "winapi" 2676 | version = "0.3.9" 2677 | source = "registry+https://github.com/rust-lang/crates.io-index" 2678 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2679 | dependencies = [ 2680 | "winapi-i686-pc-windows-gnu", 2681 | "winapi-x86_64-pc-windows-gnu", 2682 | ] 2683 | 2684 | [[package]] 2685 | name = "winapi-i686-pc-windows-gnu" 2686 | version = "0.4.0" 2687 | source = "registry+https://github.com/rust-lang/crates.io-index" 2688 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2689 | 2690 | [[package]] 2691 | name = "winapi-util" 2692 | version = "0.1.5" 2693 | source = "registry+https://github.com/rust-lang/crates.io-index" 2694 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2695 | dependencies = [ 2696 | "winapi", 2697 | ] 2698 | 2699 | [[package]] 2700 | name = "winapi-x86_64-pc-windows-gnu" 2701 | version = "0.4.0" 2702 | source = "registry+https://github.com/rust-lang/crates.io-index" 2703 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2704 | 2705 | [[package]] 2706 | name = "windows" 2707 | version = "0.48.0" 2708 | source = "registry+https://github.com/rust-lang/crates.io-index" 2709 | checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" 2710 | dependencies = [ 2711 | "windows-targets 0.48.0", 2712 | ] 2713 | 2714 | [[package]] 2715 | name = "windows-sys" 2716 | version = "0.45.0" 2717 | source = "registry+https://github.com/rust-lang/crates.io-index" 2718 | checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" 2719 | dependencies = [ 2720 | "windows-targets 0.42.2", 2721 | ] 2722 | 2723 | [[package]] 2724 | name = "windows-targets" 2725 | version = "0.42.2" 2726 | source = "registry+https://github.com/rust-lang/crates.io-index" 2727 | checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" 2728 | dependencies = [ 2729 | "windows_aarch64_gnullvm 0.42.2", 2730 | "windows_aarch64_msvc 0.42.2", 2731 | "windows_i686_gnu 0.42.2", 2732 | "windows_i686_msvc 0.42.2", 2733 | "windows_x86_64_gnu 0.42.2", 2734 | "windows_x86_64_gnullvm 0.42.2", 2735 | "windows_x86_64_msvc 0.42.2", 2736 | ] 2737 | 2738 | [[package]] 2739 | name = "windows-targets" 2740 | version = "0.48.0" 2741 | source = "registry+https://github.com/rust-lang/crates.io-index" 2742 | checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" 2743 | dependencies = [ 2744 | "windows_aarch64_gnullvm 0.48.0", 2745 | "windows_aarch64_msvc 0.48.0", 2746 | "windows_i686_gnu 0.48.0", 2747 | "windows_i686_msvc 0.48.0", 2748 | "windows_x86_64_gnu 0.48.0", 2749 | "windows_x86_64_gnullvm 0.48.0", 2750 | "windows_x86_64_msvc 0.48.0", 2751 | ] 2752 | 2753 | [[package]] 2754 | name = "windows_aarch64_gnullvm" 2755 | version = "0.42.2" 2756 | source = "registry+https://github.com/rust-lang/crates.io-index" 2757 | checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" 2758 | 2759 | [[package]] 2760 | name = "windows_aarch64_gnullvm" 2761 | version = "0.48.0" 2762 | source = "registry+https://github.com/rust-lang/crates.io-index" 2763 | checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" 2764 | 2765 | [[package]] 2766 | name = "windows_aarch64_msvc" 2767 | version = "0.42.2" 2768 | source = "registry+https://github.com/rust-lang/crates.io-index" 2769 | checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" 2770 | 2771 | [[package]] 2772 | name = "windows_aarch64_msvc" 2773 | version = "0.48.0" 2774 | source = "registry+https://github.com/rust-lang/crates.io-index" 2775 | checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" 2776 | 2777 | [[package]] 2778 | name = "windows_i686_gnu" 2779 | version = "0.42.2" 2780 | source = "registry+https://github.com/rust-lang/crates.io-index" 2781 | checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" 2782 | 2783 | [[package]] 2784 | name = "windows_i686_gnu" 2785 | version = "0.48.0" 2786 | source = "registry+https://github.com/rust-lang/crates.io-index" 2787 | checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" 2788 | 2789 | [[package]] 2790 | name = "windows_i686_msvc" 2791 | version = "0.42.2" 2792 | source = "registry+https://github.com/rust-lang/crates.io-index" 2793 | checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" 2794 | 2795 | [[package]] 2796 | name = "windows_i686_msvc" 2797 | version = "0.48.0" 2798 | source = "registry+https://github.com/rust-lang/crates.io-index" 2799 | checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" 2800 | 2801 | [[package]] 2802 | name = "windows_x86_64_gnu" 2803 | version = "0.42.2" 2804 | source = "registry+https://github.com/rust-lang/crates.io-index" 2805 | checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" 2806 | 2807 | [[package]] 2808 | name = "windows_x86_64_gnu" 2809 | version = "0.48.0" 2810 | source = "registry+https://github.com/rust-lang/crates.io-index" 2811 | checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" 2812 | 2813 | [[package]] 2814 | name = "windows_x86_64_gnullvm" 2815 | version = "0.42.2" 2816 | source = "registry+https://github.com/rust-lang/crates.io-index" 2817 | checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" 2818 | 2819 | [[package]] 2820 | name = "windows_x86_64_gnullvm" 2821 | version = "0.48.0" 2822 | source = "registry+https://github.com/rust-lang/crates.io-index" 2823 | checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" 2824 | 2825 | [[package]] 2826 | name = "windows_x86_64_msvc" 2827 | version = "0.42.2" 2828 | source = "registry+https://github.com/rust-lang/crates.io-index" 2829 | checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" 2830 | 2831 | [[package]] 2832 | name = "windows_x86_64_msvc" 2833 | version = "0.48.0" 2834 | source = "registry+https://github.com/rust-lang/crates.io-index" 2835 | checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" 2836 | 2837 | [[package]] 2838 | name = "winreg" 2839 | version = "0.10.1" 2840 | source = "registry+https://github.com/rust-lang/crates.io-index" 2841 | checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" 2842 | dependencies = [ 2843 | "winapi", 2844 | ] 2845 | --------------------------------------------------------------------------------