mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
hide and comment on the existence of TyCons[Ext]
This commit is contained in:
parent
0e137e107a
commit
c993e4eee0
1 changed files with 5 additions and 1 deletions
|
@ -65,8 +65,11 @@ pub use uuid::Uuid;
|
|||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
pub type Param<T> = PhantomData<T>;
|
||||
// These types allow the `sqlx_macros::sql!()` macro to polymorphically compare a
|
||||
// given parameter's type to an expected parameter type even if the former
|
||||
// is behind a reference or in `Option`
|
||||
|
||||
#[doc(hidden)]
|
||||
pub struct TyCons<T>(PhantomData<T>);
|
||||
|
||||
impl<T> TyCons<T> {
|
||||
|
@ -75,6 +78,7 @@ impl<T> TyCons<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub trait TyConsExt: Sized {
|
||||
type Cons;
|
||||
fn ty_cons(self) -> Self::Cons {
|
||||
|
|
Loading…
Reference in a new issue