@@ -106,9 +106,7 @@ impl fmt::Display for Type {
106
106
}
107
107
108
108
impl Type {
109
- // WARNING: this is not considered public API
110
- #[ doc( hidden) ]
111
- pub fn _new ( name : String , oid : Oid , kind : Kind , schema : String ) -> Type {
109
+ pub ( crate ) fn _new ( name : String , oid : Oid , kind : Kind , schema : String ) -> Type {
112
110
Type ( Inner :: Other ( Arc :: new ( Other {
113
111
name,
114
112
oid,
@@ -165,7 +163,7 @@ pub enum Kind {
165
163
/// A composite type along with information about its fields.
166
164
Composite ( Vec < Field > ) ,
167
165
#[ doc( hidden) ]
168
- __PseudoPrivateForExtensibility ,
166
+ __ForExtensibility ,
169
167
}
170
168
171
169
/// Information about a field of a composite type.
@@ -188,8 +186,7 @@ impl Field {
188
186
}
189
187
190
188
impl Field {
191
- #[ doc( hidden) ]
192
- pub fn new ( name : String , type_ : Type ) -> Field {
189
+ pub ( crate ) fn new ( name : String , type_ : Type ) -> Field {
193
190
Field { name, type_ }
194
191
}
195
192
}
@@ -201,15 +198,11 @@ pub struct WasNull;
201
198
202
199
impl fmt:: Display for WasNull {
203
200
fn fmt ( & self , fmt : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
204
- fmt. write_str ( self . description ( ) )
201
+ fmt. write_str ( "a Postgres value was `NULL`" )
205
202
}
206
203
}
207
204
208
- impl Error for WasNull {
209
- fn description ( & self ) -> & str {
210
- "a Postgres value was `NULL`"
211
- }
212
- }
205
+ impl Error for WasNull { }
213
206
214
207
/// An error indicating that a conversion was attempted between incompatible
215
208
/// Rust and Postgres types.
@@ -226,15 +219,10 @@ impl fmt::Display for WrongType {
226
219
}
227
220
}
228
221
229
- impl Error for WrongType {
230
- fn description ( & self ) -> & str {
231
- "cannot convert to or from a Postgres value"
232
- }
233
- }
222
+ impl Error for WrongType { }
234
223
235
224
impl WrongType {
236
- #[ doc( hidden) ]
237
- pub fn new ( ty : Type ) -> WrongType {
225
+ pub ( crate ) fn new ( ty : Type ) -> WrongType {
238
226
WrongType ( ty)
239
227
}
240
228
}
0 commit comments