|
|
@@ -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
|
|