Add docs for rename_all attribute for Type derive macro (#1212)

* add missing closing bracket in doctest

* document rename_all attribute for Type derive
This commit is contained in:
Rafael Epplée 2021-05-22 01:12:16 +02:00 committed by GitHub
parent 8f1d8c7e2f
commit 0acb0e5eff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -117,6 +117,7 @@ pub use json::Json;
/// `<SQL type name>` instead. May trigger errors or unexpected behavior if the encoding of the
/// given type is different than that of the inferred type (e.g. if you rename the above to
/// `VARCHAR`). Affects Postgres only.
/// * `#[sqlx(rename_all = "<strategy>")]` on struct definition: See [`derive docs in FromRow`](crate::from_row::FromRow#rename_all)
///
/// ### Enumeration
///

View File

@ -245,7 +245,7 @@
/// # async fn main() {
/// # let mut conn = panic!();
/// #[derive(sqlx::Type)]
/// #[sqlx(transparent)
/// #[sqlx(transparent)]
/// struct MyInt4(i32);
///
/// let my_int = MyInt4(1);