From ccafc5722f24484d26956fc42768e663079b5463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Hornick=C3=BD?= Date: Wed, 4 Jan 2023 21:57:32 +0100 Subject: [PATCH] Make some fields public It is impossible to move values from parsed messages, since everything is available only by a reference --- postgres-protocol/src/message/backend.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/postgres-protocol/src/message/backend.rs b/postgres-protocol/src/message/backend.rs index 6cb577400..a437b1b62 100644 --- a/postgres-protocol/src/message/backend.rs +++ b/postgres-protocol/src/message/backend.rs @@ -1154,7 +1154,7 @@ impl LogicalReplicationMessage { /// A row as it appears in the replication stream #[derive(Debug)] -pub struct Tuple(Vec); +pub struct Tuple(pub Vec); impl Tuple { #[inline] @@ -1367,7 +1367,7 @@ pub struct RelationBody { namespace: Bytes, name: Bytes, replica_identity: ReplicaIdentity, - columns: Vec, + pub columns: Vec, } impl RelationBody { @@ -1434,7 +1434,7 @@ impl TypeBody { #[derive(Debug)] pub struct InsertBody { rel_id: u32, - tuple: Tuple, + pub tuple: Tuple, } impl InsertBody { @@ -1455,9 +1455,9 @@ impl InsertBody { #[derive(Debug)] pub struct UpdateBody { rel_id: u32, - old_tuple: Option, - key_tuple: Option, - new_tuple: Tuple, + pub old_tuple: Option, + pub key_tuple: Option, + pub new_tuple: Tuple, } impl UpdateBody { @@ -1492,8 +1492,8 @@ impl UpdateBody { #[derive(Debug)] pub struct DeleteBody { rel_id: u32, - old_tuple: Option, - key_tuple: Option, + pub old_tuple: Option, + pub key_tuple: Option, } impl DeleteBody {