doc: added some basic top-level documentation.

This commit is contained in:
Kat Marchán 2019-06-05 14:00:25 +02:00
parent 22c4b3010f
commit 261f190e4e
No known key found for this signature in database
GPG Key ID: AEB529C08A3C7E9E
6 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ use chownr;
use failure::Fail;
use serde_json;
/// Error type returned by all API calls.
#[derive(Fail, Debug)]
pub enum Error {
#[fail(display = "not found")]

View File

@ -1,3 +1,4 @@
//! Functions for reading from cache.
use std::path::Path;
use ssri::Integrity;

View File

@ -18,6 +18,7 @@ use crate::errors::Error;
const INDEX_VERSION: &str = "5";
/// Represents a cache index entry, which points to content.
#[derive(PartialEq, Debug)]
pub struct Entry {
pub key: String,

View File

@ -1,3 +1,7 @@
//! cacache is a Rust library for managing local key and content address
//! caches. It's really fast, really good at concurrency, and it will never
//! give you corrupted data, even if cache files get corrupted or manipulated.
mod content;
pub mod get;
pub mod put;

View File

@ -1,3 +1,4 @@
//! Functions for writing to cache.
use std::path::{Path, PathBuf};
use nix::unistd::{Uid, Gid};

View File

@ -1,3 +1,4 @@
//! Functions for removing things from the cache.
use std::fs;
use std::path::Path;