Browse Source

Add small doc improvements in blob.rs, dense.rs

Johannes Hofmann 8 years ago
parent
commit
506293ac1e
2 changed files with 11 additions and 1 deletions
  1. 10
    0
      src/blob.rs
  2. 1
    1
      src/dense.rs

+ 10
- 0
src/blob.rs View File

@@ -18,17 +18,27 @@ use flate2::read::ZlibDecoder;
18 18
 use inflate::DeflateDecoder;
19 19
 
20 20
 
21
+/// The content type of a blob.
21 22
 #[derive(Debug, Eq, PartialEq)]
22 23
 pub enum BlobType<'a> {
24
+    /// Blob contains a `HeaderBlock`.
23 25
     OsmHeader,
26
+    /// Blob contains a `PrimitiveBlock`.
24 27
     OsmData,
28
+    /// An unknown blob type with the given string identifier.
29
+    /// Parsers should ignore unknown blobs they do not expect.
25 30
     Unknown(&'a str),
26 31
 }
27 32
 
28 33
 //TODO rename variants to fit proto files
34
+/// The decoded content of a blob (analogous to `BlobType`).
29 35
 pub enum BlobDecode<'a> {
36
+    /// Blob contains a `HeaderBlock`.
30 37
     OsmHeader(HeaderBlock),
38
+    /// Blob contains a `PrimitiveBlock`.
31 39
     OsmData(PrimitiveBlock),
40
+    /// An unknown blob type with the given string identifier.
41
+    /// Parsers should ignore unknown blobs they do not expect.
32 42
     Unknown(&'a str),
33 43
 }
34 44
 

+ 1
- 1
src/dense.rs View File

@@ -7,7 +7,7 @@ use std;
7 7
 
8 8
 
9 9
 //TODO Add getter functions for id, version, uid, ...
10
-/// An OpenStreetMap node element from a compressed array of DenseNodes (See [OSM wiki](http://wiki.openstreetmap.org/wiki/Node)).
10
+/// An OpenStreetMap node element from a compressed array of dense nodes (See [OSM wiki](http://wiki.openstreetmap.org/wiki/Node)).
11 11
 pub struct DenseNode<'a> {
12 12
     block: &'a osmformat::PrimitiveBlock,
13 13