We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4f41157 + 34c8dc9 commit d16a9cdCopy full SHA for d16a9cd
postgres-types/src/lib.rs
@@ -1035,6 +1035,18 @@ impl<T: ToSql> ToSql for Box<[T]> {
1035
to_sql_checked!();
1036
}
1037
1038
+impl<'a> ToSql for Cow<'a, [u8]> {
1039
+ fn to_sql(&self, ty: &Type, w: &mut BytesMut) -> Result<IsNull, Box<dyn Error + Sync + Send>> {
1040
+ <&[u8] as ToSql>::to_sql(&self.as_ref(), ty, w)
1041
+ }
1042
+
1043
+ fn accepts(ty: &Type) -> bool {
1044
+ <&[u8] as ToSql>::accepts(ty)
1045
1046
1047
+ to_sql_checked!();
1048
+}
1049
1050
impl ToSql for Vec<u8> {
1051
fn to_sql(&self, ty: &Type, w: &mut BytesMut) -> Result<IsNull, Box<dyn Error + Sync + Send>> {
1052
<&[u8] as ToSql>::to_sql(&&**self, ty, w)
0 commit comments