[][src]Struct git_odb::pack::Bundle

pub struct Bundle {
    pub pack: File,
    pub index: File,
}

A packfile with an index

Fields

pack: Fileindex: File

Implementations

impl Bundle[src]

pub fn locate<'a>(
    &self,
    id: Id,
    out: &'a mut Vec<u8>,
    cache: &mut impl DecodeEntry
) -> Option<Result<Object<'a>, Error>>
[src]

id is a 20 byte SHA1 of the object to locate in the pack

Note that ref deltas are automatically resolved within this pack only, which makes this implementation unusable for thin packs. For the latter, pack streams are required.

impl Bundle[src]

pub fn write_to_directory<P>(
    pack: impl Read + Send + 'static,
    pack_size: Option<u64>,
    directory: Option<impl AsRef<Path>>,
    progress: P,
    Options { thread_limit: thread_limit, iteration_mode: iteration_mode, index_kind: index_kind }: Options
) -> Result<Outcome, Error> where
    P: Progress,
    <P as Progress>::SubProgress: Send + 'static,
    <<P as Progress>::SubProgress as Progress>::SubProgress: Send
[src]

If directory is None, the output will be written to a sink

impl Bundle[src]

pub fn at(path: impl AsRef<Path>) -> Result<Self, Error>[src]

path is either a pack file or an index file

Trait Implementations

impl<'_> TryFrom<&'_ Path> for Bundle[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Bundle

impl Send for Bundle

impl Sync for Bundle

impl Unpin for Bundle

impl UnwindSafe for Bundle

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,