woo
parent: tbd commit: 2d48bc0
1 | use FromStr; |
2 | |
3 | use ; |
4 | use Error; |
5 | |
6 | |
7 | pub url: String, |
8 | pub public_key: String, |
9 | |
10 | |
11 | /// An instance, defined by the URL it can be reached at. |
12 | /// |
13 | /// # Textual Format |
14 | /// An instance's textual format is its URL. |
15 | /// |
16 | /// ## Examples |
17 | /// For the instance `giterated.dev`, the following [`Instance`] initialization |
18 | /// would be valid: |
19 | /// |
20 | /// ``` |
21 | /// let instance = Instance { |
22 | /// url: String::from("giterated.dev") |
23 | /// }; |
24 | /// |
25 | /// // This is correct |
26 | /// assert_eq!(Instance::from_str("giterated.dev").unwrap(), instance); |
27 | /// ``` |
28 | |
29 | |
30 | pub url: String, |
31 | |
32 | |
33 | |
34 | |
35 | self.url.clone |
36 | |
37 | |
38 | |
39 | |
40 | type Err = InstanceParseError; |
41 | |
42 | |
43 | Ok |
44 | |
45 | |
46 | |
47 | |
48 | |
49 | |
50 | InvalidFormat, |
51 | |
52 |