1- //! Traits dealing with Postgres data types
2-
31use fallible_iterator:: FallibleIterator ;
42use postgres_protocol;
53use postgres_protocol:: types:: { self , ArrayDimension } ;
@@ -13,7 +11,6 @@ pub use postgres_protocol::Oid;
1311
1412pub use self :: type_gen:: Type ;
1513pub use self :: special:: { Date , Timestamp } ;
16- use { SessionInfoNew , OtherNew , WrongTypeNew , FieldNew } ;
1714
1815/// Generates a simple implementation of `ToSql::accepts` which accepts the
1916/// types passed to it.
@@ -88,8 +85,9 @@ pub struct SessionInfo<'a> {
8885 parameters : & ' a HashMap < String , String > ,
8986}
9087
91- impl < ' a > SessionInfoNew < ' a > for SessionInfo < ' a > {
92- fn new ( parameters : & ' a HashMap < String , String > ) -> SessionInfo < ' a > {
88+ impl < ' a > SessionInfo < ' a > {
89+ #[ doc( hidden) ]
90+ pub fn new ( parameters : & ' a HashMap < String , String > ) -> SessionInfo < ' a > {
9391 SessionInfo { parameters : parameters }
9492 }
9593}
@@ -142,8 +140,9 @@ impl Field {
142140 }
143141}
144142
145- impl FieldNew for Field {
146- fn new ( name : String , type_ : Type ) -> Field {
143+ impl Field {
144+ #[ doc( hidden) ]
145+ pub fn new ( name : String , type_ : Type ) -> Field {
147146 Field {
148147 name : name,
149148 type_ : type_,
@@ -174,8 +173,9 @@ struct OtherInner {
174173 schema : String ,
175174}
176175
177- impl OtherNew for Other {
178- fn new ( name : String , oid : Oid , kind : Kind , schema : String ) -> Other {
176+ impl Other {
177+ #[ doc( hidden) ]
178+ pub fn new ( name : String , oid : Oid , kind : Kind , schema : String ) -> Other {
179179 Other ( Arc :: new ( OtherInner {
180180 name : name,
181181 oid : oid,
@@ -243,8 +243,9 @@ impl Error for WrongType {
243243 }
244244}
245245
246- impl WrongTypeNew for WrongType {
247- fn new ( ty : Type ) -> WrongType {
246+ impl WrongType {
247+ #[ doc( hidden) ]
248+ pub fn new ( ty : Type ) -> WrongType {
248249 WrongType ( ty)
249250 }
250251}
0 commit comments