Loading crates/s3s/src/lib.rs +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ mod http; mod ops; mod request; mod response; mod s3_op; mod s3_trait; mod sig_v2; mod sig_v4; Loading @@ -48,4 +49,5 @@ pub use self::error::*; pub use self::http::Body; pub use self::request::S3Request; pub use self::response::S3Response; pub use self::s3_op::S3Operation; pub use self::s3_trait::S3; crates/s3s/src/s3_op.rs 0 → 100644 +19 −0 Original line number Diff line number Diff line pub struct S3Operation { pub(crate) name: &'static str, } impl S3Operation { /// Returns the name of the operation. /// /// # Example /// ``` /// use s3s::S3Operation; /// fn is_basic_list_op(op: &S3Operation) -> bool { /// matches!(op.name(), "ListBuckets" | "ListObjects" | "ListObjectsV2") /// } /// ``` #[must_use] pub fn name(&self) -> &str { self.name } } Loading
crates/s3s/src/lib.rs +2 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ mod http; mod ops; mod request; mod response; mod s3_op; mod s3_trait; mod sig_v2; mod sig_v4; Loading @@ -48,4 +49,5 @@ pub use self::error::*; pub use self::http::Body; pub use self::request::S3Request; pub use self::response::S3Response; pub use self::s3_op::S3Operation; pub use self::s3_trait::S3;
crates/s3s/src/s3_op.rs 0 → 100644 +19 −0 Original line number Diff line number Diff line pub struct S3Operation { pub(crate) name: &'static str, } impl S3Operation { /// Returns the name of the operation. /// /// # Example /// ``` /// use s3s::S3Operation; /// fn is_basic_list_op(op: &S3Operation) -> bool { /// matches!(op.name(), "ListBuckets" | "ListObjects" | "ListObjectsV2") /// } /// ``` #[must_use] pub fn name(&self) -> &str { self.name } }