resource-path 0.1.0

A path representation for resource at local and remote.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::str::FromStr;

use resource_path::ResourcePath;

#[test]
fn ready() {
    println!("it works!")
}


#[test]
fn convert_path() {
    let raw = "https://api.github.com/a?local=a/b/c";
    let res = ResourcePath::from_str(raw).unwrap();
    let json = serde_json::to_string(&res).unwrap();
    let path = serde_json::from_str::<ResourcePath>(&json).unwrap();
    assert_eq!(res, path)
}