Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit79151c5

Browse files
committed
Docs: make sure it's hard to miss that type name has to match
Some people (me) doesn't read the full page or just gloss over thenaming section. It's a lot of wasted time debugging the issue when thetype name is not matching, adding name attribute to the examplesmakes it really hard to miss.
1 parent71668b7 commit79151c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎postgres-types/src/lib.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
//!
3232
//! # #[cfg(feature = "derive")]
3333
//! #[derive(Debug, ToSql, FromSql)]
34+
//! #[postgres(name = "Mood")]
3435
//! enum Mood {
3536
//! Sad,
3637
//! Ok,
@@ -52,6 +53,7 @@
5253
//!
5354
//! # #[cfg(feature = "derive")]
5455
//! #[derive(Debug, ToSql, FromSql)]
56+
//! #[postgres(name = "SessionId")]
5557
//! struct SessionId(Vec<u8>);
5658
//! ```
5759
//!
@@ -88,6 +90,7 @@
8890
//!
8991
//! # #[cfg(feature = "derive")]
9092
//! #[derive(Debug, ToSql, FromSql)]
93+
//! #[postgres(name = "InventoryItem")]
9194
//! struct InventoryItem {
9295
//! name: String,
9396
//! supplier_id: i32,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp