pub struct Pack<'a> { /* private fields */ }Expand description
解析済みの packfile。data は pack 全体 (header と trailer を含む)。
Implementations§
Source§impl<'a> Pack<'a>
impl<'a> Pack<'a>
pub fn parse(data: &'a [u8]) -> Result<Self>
Sourcepub fn parse_with_cache(data: &'a [u8], cache_bytes: usize) -> Result<Self>
pub fn parse_with_cache(data: &'a [u8], cache_bytes: usize) -> Result<Self>
Pack::parse の base cache 予算を指定する版。0 で cache を無効化する
(メモリの厳しい環境向け。解析時間は delta chain の重複分だけ延びる)。
pub fn is_empty(&self) -> bool
pub fn contains(&self, oid: &Oid) -> bool
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Pack<'a>
impl<'a> RefUnwindSafe for Pack<'a>
impl<'a> Send for Pack<'a>
impl<'a> Sync for Pack<'a>
impl<'a> Unpin for Pack<'a>
impl<'a> UnsafeUnpin for Pack<'a>
impl<'a> UnwindSafe for Pack<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more