diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-01-19 16:48:25 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-01-19 16:48:25 +0100 |
commit | d7f6a55911589af3c6f0c321330c59d2a3538ae6 (patch) | |
tree | 8bd799f7d552f934ab551981a1d80bb800a73be7 | |
parent | 12457cb47c4c73a864bddbf24b5c1ccda3f34c67 (diff) |
core: Improve documentation.
-rw-r--r-- | core/src/lib.rs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/core/src/lib.rs b/core/src/lib.rs index 4be59294..72de3de3 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,4 +1,22 @@ -//! Core functionality. +//! Contexts and errors. +//! +//! Sequoia tries to be useful for a wide variety of applications. +//! Therefore, we need you to provide a little information about the +//! context you are using Sequoia in. +//! +/// # Example +/// +/// A context with reasonable defaults can be created using +/// `Context::new`: +/// +/// ```no_run +/// # use sequoia_core::{Context, Result}; +/// # f().unwrap(); +/// # fn f() -> Result<()> { +/// let c = Context::new("org.example.webmail")?; +/// # Ok(()) +/// # } +/// ``` extern crate tempdir; @@ -8,7 +26,7 @@ use std::io; use std::path::{Path, PathBuf}; use tempdir::TempDir; -/// A `&Context` for Sequoia. +/// A `Context` for Sequoia. /// /// # Example /// |