1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const NL: &[u8; 1] = b"\n";
const SPACE: &[u8; 1] = b" ";
mod convert;
mod encode;
mod tag;
pub use tag::Tag;
pub mod tree;
pub use tree::Tree;
mod commit;
pub use commit::Commit;
mod blob {
use std::io;
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
pub struct Blob {
pub data: Vec<u8>,
}
impl Blob {
pub fn write_to(&self, mut out: impl io::Write) -> io::Result<()> {
out.write_all(&self.data)
}
}
}
pub use blob::Blob;
mod object;
pub use object::Object;