From d7f6a55911589af3c6f0c321330c59d2a3538ae6 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Fri, 19 Jan 2018 16:48:25 +0100 Subject: core: Improve documentation. --- core/src/lib.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'core') 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 /// -- cgit v1.2.3