//! Squirrel away SBD messages and retrieve them later.

mod filesystem;
mod memory;

pub use self::filesystem::Storage as FilesystemStorage;
pub use self::memory::Storage as MemoryStorage;

use Result;
use mo::Message;

/// Basic storage operations.
pub trait Storage {
    /// Place a message into this storage.
    ///
    /// # Examples
    ///
    /// ```
    /// # use sbd::mo::Message;
    /// # use sbd::storage::{Storage, MemoryStorage};
    /// let message = Message::from_path("data/0-mo.sbd").unwrap();
    /// let mut storage = MemoryStorage::new();
    /// storage.store(&message);
    /// ```
    fn store(&mut self, message: &Message) -> Result<()>;
}

//! SBD message storage.
//!
//! We can store messages in one of several backends, provided as submodules here. Storages
//! implement the `Storage` trait.

mod filesystem;
mod memory;

pub use self::filesystem::Storage as FilesystemStorage;
pub use self::memory::Storage as MemoryStorage;

use Result;
use mo::Message;

/// Trait for all backend SBD storages.
pub trait Storage {
    /// Stores message in this storage.
    fn store(&mut self, message: &Message) -> Result<()>;
}

--- 
+++ 
@@ -1,4 +1,7 @@
-//! Squirrel away SBD messages and retrieve them later.
+//! SBD message storage.
+//!
+//! We can store messages in one of several backends, provided as submodules here. Storages
+//! implement the `Storage` trait.
 
 mod filesystem;
 mod memory;
@@ -9,18 +12,8 @@
 use Result;
 use mo::Message;
 
-/// Basic storage operations.
+/// Trait for all backend SBD storages.
 pub trait Storage {
-    /// Place a message into this storage.
-    ///
-    /// # Examples
-    ///
-    /// ```
-    /// # use sbd::mo::Message;
-    /// # use sbd::storage::{Storage, MemoryStorage};
-    /// let message = Message::from_path("data/0-mo.sbd").unwrap();
-    /// let mut storage = MemoryStorage::new();
-    /// storage.store(&message);
-    /// ```
+    /// Stores message in this storage.
     fn store(&mut self, message: &Message) -> Result<()>;
 }
Add doc test for store
