libvctrl 0.3.0

A robust, content-addressed version control engine for arbitrary data, designed for embedding into applications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub mod binary;
pub use binary::*;

use crate::domain::commit::Commit;
use crate::domain::tag::Tag;
use crate::domain::tree::Tree;
use crate::error::VctrlError;

pub trait Encoder {
    fn encode_tree(&self, tree: &Tree, buf: &mut Vec<u8>) -> Result<(), VctrlError>;
    fn encode_commit(&self, commit: &Commit, buf: &mut Vec<u8>) -> Result<(), VctrlError>;
    fn encode_tag(&self, tag: &Tag, buf: &mut Vec<u8>) -> Result<(), VctrlError>;
}