aws-arn 0.3.1

Provides types, builders, and other helpers to manipulate AWS Amazon Resource Name (ARN) strings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use aws_arn::ResourceName;
use std::str::FromStr;

const EXAMPLES: &str = include_str!("examples.txt");

#[test]
fn test_examples_from_file() {
    for (line, arn_str) in EXAMPLES.lines().enumerate() {
        if !arn_str.starts_with("#") {
            println!("{:0>4}: {}", line + 1, arn_str);
            let parsed = ResourceName::from_str(arn_str);
            println!("{:#?}", parsed);
            assert!(parsed.is_ok());
        } else {
            println!("{:0>4}: IGNORE {}", line + 1, &arn_str[1..]);
        }
    }
}