Skip to content

Commit 140dc08

Browse files
committed
add missing docs
1 parent ab93e30 commit 140dc08

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

src/decoder/serde.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ impl Visitor for BsonVisitor {
143143
}
144144
}
145145

146+
/// Serde Decoder
146147
pub struct Decoder {
147148
value: Option<Bson>,
148149
}

src/encoder/serde.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ impl Serialize for Bson {
5454
}
5555
}
5656

57+
/// Serde Encoder
5758
pub struct Encoder;
5859

5960
impl Encoder {

src/macros.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// Construct a BSON value
12
#[macro_export]
23
macro_rules! bson {
34
([]) => {{ $crate::Bson::Array(Vec::new()) }};
@@ -29,6 +30,7 @@ macro_rules! bson {
2930
}};
3031
}
3132

33+
/// Construct a BSON Document
3234
#[macro_export]
3335
macro_rules! doc {
3436
() => {{ $crate::Document::new() }};

src/oid.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! ObjectId
2+
13
use libc;
24

35
use std::{fmt, io, error, result};

src/ordered.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//! A BSON document represented as an associative HashMap with insertion ordering.
2+
13
use std::error;
24
use std::fmt::{self, Debug, Display, Formatter};
35
use std::iter::{FromIterator, Map};
@@ -17,10 +19,13 @@ use spec::BinarySubtype;
1719
/// type, for use with the direct getters.
1820
#[derive(PartialEq)]
1921
pub enum ValueAccessError {
22+
/// Cannot find the expected field with the specified key
2023
NotPresent,
24+
/// Found a Bson value with the specified key, but not with the expected type
2125
UnexpectedType,
2226
}
2327

28+
/// Result of accessing Bson value
2429
pub type ValueAccessResult<T> = Result<T, ValueAccessError>;
2530

2631
impl Debug for ValueAccessError {

0 commit comments

Comments
 (0)