ソースを参照

url_template: Small doc fixes

Johannes Hofmann 7 年 前
コミット
5f0777c521
共有1 個のファイルを変更した3 個の追加2 個の削除を含む
  1. 3
    2
      src/url_template.rs

+ 3
- 2
src/url_template.rs ファイルの表示

16
 }
16
 }
17
 
17
 
18
 impl Placeholder {
18
 impl Placeholder {
19
-    /// Returns maximum number of bytes that the value for a placeholder with occupy.
19
+    /// Returns maximum number of bytes that the value for a placeholder will occupy.
20
     fn max_size(&self) -> usize {
20
     fn max_size(&self) -> usize {
21
         match *self {
21
         match *self {
22
             Placeholder::X | Placeholder::Y | Placeholder::Z => 11,
22
             Placeholder::X | Placeholder::Y | Placeholder::Z => 11,
25
     }
25
     }
26
 }
26
 }
27
 
27
 
28
+/// A template for tile URLs that can be efficiently filled with values from a `TileCoord`.
28
 #[derive(Debug)]
29
 #[derive(Debug)]
29
 pub struct UrlTemplate {
30
 pub struct UrlTemplate {
30
     /// The template string that includes placeholders between static parts
31
     /// The template string that includes placeholders between static parts
31
     template_string: String,
32
     template_string: String,
32
-    /// Ranges into `template_string` for static parts
33
+    /// Ranges into `template_string` for the static parts
33
     static_parts: Vec<::std::ops::Range<usize>>,
34
     static_parts: Vec<::std::ops::Range<usize>>,
34
     /// Kinds of placeholders between the static parts
35
     /// Kinds of placeholders between the static parts
35
     placeholders: Vec<Placeholder>,
36
     placeholders: Vec<Placeholder>,