15 releases
0.25.3 | Apr 10, 2023 |
---|---|
0.25.1 | Jul 22, 2022 |
0.23.5 | Feb 12, 2022 |
0.23.3 | Nov 11, 2021 |
0.20.0 | Mar 28, 2020 |
#590 in Network programming
52,122 downloads per month
Used in 23 crates
(2 directly)
13KB
247 lines
AWS S3 region identifier, passing in custom values is also possible, in that case it is up to you to pass a valid endpoint, otherwise boom will happen :)
Example
use std::str::FromStr;
use awsregion::Region;
// Parse from a string
let region: Region = "us-east-1".parse().unwrap();
// Choose region directly
let region = Region::EuWest2;
// Custom region requires valid region name and endpoint
let region_name = "nl-ams".to_string();
let endpoint = "https://s3.nl-ams.scw.cloud".to_string();
let region = Region::Custom { region: region_name, endpoint };
Dependencies
~0.5–1MB
~23K SLoC