s3-path 0.0.1

Describe paths inside an S3 bucket like working with std's Path and PathBuf.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::fmt::Formatter;

#[derive(Debug)]
pub struct InvalidS3PathComponent {
    pub component: String,
    pub reason: String,
}

impl std::fmt::Display for InvalidS3PathComponent {
    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
        write!(f, "Invalid S3 path component '{}': {}", self.component, self.reason)
    }
}

impl std::error::Error for InvalidS3PathComponent {}