Skip to content

Commit c751eb3

Browse files
committed
Make macros public to allow easily implementing traits outside of diesel
This makes the expression_impls!, queryable_impls!, and primitive_impls! public, so programs (or other crates) can more easily implement the Expression, Queriable, and QueryId traits without duplicating the code from the macros. These may change before diesel 1.0, so as discussed in diesel-rs#562, they are hidden from the documentation for now.
1 parent 1886987 commit c751eb3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

diesel/src/types/impls/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ macro_rules! not_none {
99
}
1010
}
1111

12+
#[doc(hidden)]
13+
#[macro_export]
1214
macro_rules! expression_impls {
1315
($($Source:ident -> $Target:ty),+,) => {
1416
$(
@@ -56,6 +58,8 @@ macro_rules! expression_impls {
5658
}
5759
}
5860

61+
#[doc(hidden)]
62+
#[macro_export]
5963
macro_rules! queryable_impls {
6064
($($Source:ident -> $Target:ty),+,) => {$(
6165
impl<DB> $crate::types::FromSqlRow<types::$Source, DB> for $Target where
@@ -90,6 +94,8 @@ macro_rules! queryable_impls {
9094
)+}
9195
}
9296

97+
#[doc(hidden)]
98+
#[macro_export]
9399
macro_rules! primitive_impls {
94100
($Source:ident -> ($Target:ty, pg: ($oid:expr, $array_oid:expr), sqlite: ($tpe:ident))) => {
95101
#[cfg(feature = "sqlite")]

0 commit comments

Comments
 (0)