From 9bfd3c25379dda9b4956d3e54da5cdf2480bdb59 Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Mon, 25 Nov 2024 15:55:59 +1100 Subject: [PATCH] Make fields of ConnectionSetupRequestError public. This allows user to match on the error and handle the error accordingly. --- scylla/src/transport/errors.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scylla/src/transport/errors.rs b/scylla/src/transport/errors.rs index 778f33f29..634e2a91b 100644 --- a/scylla/src/transport/errors.rs +++ b/scylla/src/transport/errors.rs @@ -695,9 +695,10 @@ pub enum TranslationError { /// It indicates that request needed to initiate a connection failed. #[derive(Error, Debug, Clone)] #[error("Failed to perform a connection setup request. Request: {request_kind}, reason: {error}")] +#[non_exhaustive] pub struct ConnectionSetupRequestError { - request_kind: CqlRequestKind, - error: ConnectionSetupRequestErrorKind, + pub request_kind: CqlRequestKind, + pub error: ConnectionSetupRequestErrorKind, } #[derive(Error, Debug, Clone)]