Skip to main content

git_async/object_store/
mod.rs

1use alloc::vec::Vec;
2
3pub(crate) mod cache;
4mod index;
5pub(crate) mod lookup;
6mod loose;
7mod pack;
8pub(crate) mod page_read;
9
10/// The type of a git object, as a plain (fieldless) enum
11#[derive(Debug, PartialEq, Eq, Clone, Copy)]
12pub enum ObjectType {
13    #[expect(missing_docs)]
14    Commit,
15    #[expect(missing_docs)]
16    Tag,
17    #[expect(missing_docs)]
18    Blob,
19    #[expect(missing_docs)]
20    Tree,
21}
22
23/// The size of a git object; a newtype wrapper around a [`u64`]
24#[derive(Debug, Clone, Copy, PartialEq, Eq)]
25pub struct ObjectSize(pub u64);
26
27#[derive(Debug)]
28pub(crate) struct RawObject {
29    pub object_type: ObjectType,
30    pub body: Vec<u8>,
31}