Skip to content

Commit

Permalink
Renamed EtlWorker trait to EtlBufReader
Browse files Browse the repository at this point in the history
  • Loading branch information
bobozaur committed Sep 12, 2023
1 parent 16869e9 commit 9b489b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/connection/etl/export/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use pin_project::pin_project;

use crate::{
connection::websocket::socket::ExaSocket,
etl::{error::ExaEtlError, traits::EtlWorker},
etl::{error::ExaEtlError, traits::EtlBufReader},
};

/// Low-level async reader used to read chunked HTTP data from Exasol.
Expand Down
2 changes: 1 addition & 1 deletion src/connection/etl/import/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use pin_project::pin_project;

use crate::{
connection::websocket::socket::ExaSocket,
etl::{error::ExaEtlError, traits::EtlWorker},
etl::{error::ExaEtlError, traits::EtlBufReader},
};

/// Low-level async writer used to send chunked HTTP data to Exasol.
Expand Down
2 changes: 1 addition & 1 deletion src/connection/etl/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ mod worker;

pub use job::EtlJob;
pub use with_socket_maker::WithSocketMaker;
pub use worker::EtlWorker;
pub use worker::EtlBufReader;
8 changes: 4 additions & 4 deletions src/connection/etl/traits/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ use futures_util::io::BufReader;

use crate::{connection::websocket::socket::ExaSocket, etl::error::ExaEtlError};

impl EtlWorker for BufReader<ExaSocket> {}
impl EtlBufReader for BufReader<ExaSocket> {}

/// Trait implemented for ETL IO workers, providing common methods
/// useful for both IMPORT and EXPORT operations.
pub trait EtlWorker: AsyncBufRead + AsyncRead + AsyncWrite {
/// Trait to extend the [`BufReader`] type, providing common methods useful
/// for both IMPORT and EXPORT operations.
pub trait EtlBufReader: AsyncBufRead + AsyncRead + AsyncWrite {
const DOUBLE_CR_LF: &'static [u8; 4] = b"\r\n\r\n";
const CR: u8 = b'\r';
const LF: u8 = b'\n';
Expand Down

0 comments on commit 9b489b0

Please sign in to comment.