From be90d0e848c0be8a6461127b81c7ad966c828ad0 Mon Sep 17 00:00:00 2001 From: xxchan Date: Wed, 7 Dec 2022 12:29:28 +0100 Subject: [PATCH] derive Debug for SimpleQueryMessage --- postgres-protocol/src/message/backend.rs | 1 + tokio-postgres/src/lib.rs | 1 + tokio-postgres/src/row.rs | 1 + tokio-postgres/src/simple_query.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/postgres-protocol/src/message/backend.rs b/postgres-protocol/src/message/backend.rs index 45e5c407..3f5374d6 100644 --- a/postgres-protocol/src/message/backend.rs +++ b/postgres-protocol/src/message/backend.rs @@ -524,6 +524,7 @@ impl CopyOutResponseBody { } } +#[derive(Debug)] pub struct DataRowBody { storage: Bytes, len: u16, diff --git a/tokio-postgres/src/lib.rs b/tokio-postgres/src/lib.rs index bd4d7b8c..a9ecba4f 100644 --- a/tokio-postgres/src/lib.rs +++ b/tokio-postgres/src/lib.rs @@ -239,6 +239,7 @@ pub enum AsyncMessage { } /// Message returned by the `SimpleQuery` stream. +#[derive(Debug)] #[non_exhaustive] pub enum SimpleQueryMessage { /// A row of data. diff --git a/tokio-postgres/src/row.rs b/tokio-postgres/src/row.rs index e3ed696c..db179b43 100644 --- a/tokio-postgres/src/row.rs +++ b/tokio-postgres/src/row.rs @@ -196,6 +196,7 @@ impl AsName for SimpleColumn { } /// A row of data returned from the database by a simple query. +#[derive(Debug)] pub struct SimpleQueryRow { columns: Arc<[SimpleColumn]>, body: DataRowBody, diff --git a/tokio-postgres/src/simple_query.rs b/tokio-postgres/src/simple_query.rs index 19cb1023..7c266e40 100644 --- a/tokio-postgres/src/simple_query.rs +++ b/tokio-postgres/src/simple_query.rs @@ -15,6 +15,7 @@ use std::sync::Arc; use std::task::{Context, Poll}; /// Information about a column of a single query row. +#[derive(Debug)] pub struct SimpleColumn { name: String, }