Loading crates/s3s/src/keep_alive_body.rs→crates/s3s/src/http/keep_alive_body.rs +7 −9 Original line number Diff line number Diff line use std::{ future::Future, pin::Pin, task::{Context, Poll}, time::Duration, }; use crate::{http::Response, StdError}; use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; use std::time::Duration; use bytes::Bytes; use http_body::{Body, Frame}; use tokio::time::Interval; use crate::{http::Response, StdError}; // sends whitespace while the future is pending pin_project_lite::pin_project! { Loading Loading @@ -145,7 +143,7 @@ mod tests { async fn keep_alive_body_fill_withespace() { let body = KeepAliveBody::new( async { tokio::time::sleep(Duration::from_millis(50)).await; tokio::time::sleep(Duration::from_millis(45)).await; let mut res = Response::with_status(StatusCode::OK); res.body = Bytes::from_static(b"hello world").into(); Loading crates/s3s/src/http/mod.rs +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ pub use self::multipart::*; mod body; pub use self::body::*; mod keep_alive_body; pub use self::keep_alive_body::KeepAliveBody; mod request; pub use self::request::Request; Loading crates/s3s/src/http/ser.rs +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use crate::dto::SelectObjectContentEventStream; use crate::dto::{Metadata, StreamingBlob, Timestamp, TimestampFormat}; use crate::error::{S3Error, S3Result}; use crate::http::{HeaderName, HeaderValue}; use crate::keep_alive_body::KeepAliveBody; use crate::http::KeepAliveBody; use crate::utils::format::fmt_timestamp; use crate::xml; use crate::StdError; Loading crates/s3s/src/lib.rs +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ pub mod service; pub mod stream; pub mod checksum; pub mod keep_alive_body; pub use self::error::*; pub use self::http::Body; Loading Loading
crates/s3s/src/keep_alive_body.rs→crates/s3s/src/http/keep_alive_body.rs +7 −9 Original line number Diff line number Diff line use std::{ future::Future, pin::Pin, task::{Context, Poll}, time::Duration, }; use crate::{http::Response, StdError}; use std::future::Future; use std::pin::Pin; use std::task::{Context, Poll}; use std::time::Duration; use bytes::Bytes; use http_body::{Body, Frame}; use tokio::time::Interval; use crate::{http::Response, StdError}; // sends whitespace while the future is pending pin_project_lite::pin_project! { Loading Loading @@ -145,7 +143,7 @@ mod tests { async fn keep_alive_body_fill_withespace() { let body = KeepAliveBody::new( async { tokio::time::sleep(Duration::from_millis(50)).await; tokio::time::sleep(Duration::from_millis(45)).await; let mut res = Response::with_status(StatusCode::OK); res.body = Bytes::from_static(b"hello world").into(); Loading
crates/s3s/src/http/mod.rs +3 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ pub use self::multipart::*; mod body; pub use self::body::*; mod keep_alive_body; pub use self::keep_alive_body::KeepAliveBody; mod request; pub use self::request::Request; Loading
crates/s3s/src/http/ser.rs +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ use crate::dto::SelectObjectContentEventStream; use crate::dto::{Metadata, StreamingBlob, Timestamp, TimestampFormat}; use crate::error::{S3Error, S3Result}; use crate::http::{HeaderName, HeaderValue}; use crate::keep_alive_body::KeepAliveBody; use crate::http::KeepAliveBody; use crate::utils::format::fmt_timestamp; use crate::xml; use crate::StdError; Loading
crates/s3s/src/lib.rs +0 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,6 @@ pub mod service; pub mod stream; pub mod checksum; pub mod keep_alive_body; pub use self::error::*; pub use self::http::Body; Loading