git-box 0.1.1

git-box executable implementation
Documentation
use error::GitBoxError;

#[cfg(feature = "artifactory")]
pub mod art;
#[cfg(feature = "file")]
pub mod file;
#[cfg(feature = "ssh2")]
pub mod ssh2;

/// General result type for git-box operations.
pub type GitBoxFilterResult = Result<usize, GitBoxError>;

/// Clean trait used by the clean filter.
pub trait Clean {
    /// Run the clean operation.
    fn clean(&self, buf: &mut Vec<u8>, sha1: &str, size: usize) -> GitBoxFilterResult;
}

/// Smudge trait used by the smudge filter.
pub trait Smudge {
    /// Run the smudge operation.
    fn smudge(&self, buf: &mut Vec<u8>, sha1: &str, size: usize) -> GitBoxFilterResult;
}

/// A git-box filter must implement both Clean & Smudge.
pub trait Filter: Clean + Smudge {}