Struct git_odb::pack::data::EntriesToBytesIter[][src]

pub struct EntriesToBytesIter<I, W> {
    pub input: I,
    // some fields omitted
}

An implementation of Iterator to write encoded entries to an inner implementation each time next() is called.

Fields

input: I

An iterator for input output::Entry instances

Implementations

impl<I, W, E> EntriesToBytesIter<I, W> where
    I: Iterator<Item = Result<Vec<Entry>, E>>,
    W: Write,
    E: Error + 'static, 
[src]

pub fn new(
    input: I,
    output: W,
    num_entries: u32,
    version: Version,
    hash_kind: Kind
) -> Self
[src]

Create a new instance reading entries from an input iterator and write pack data bytes to output writer, resembling a pack of version with exactly num_entries amount of objects contained in it. hash_kind is the kind of hash to use for the pack checksum and maybe other places, depending on the version.

Panics

Not all combinations of hash_kind and version are supported currently triggering assertion errors.

pub fn into_write(self) -> W[src]

Consume this instance and return the output implementation.

Note that the input can be moved out of this instance beforehand.

Trait Implementations

impl<I, W, E> Iterator for EntriesToBytesIter<I, W> where
    I: Iterator<Item = Result<Vec<Entry>, E>>,
    W: Write,
    E: Error + 'static, 
[src]

type Item = Result<u64, Error<E>>

The amount of bytes written to out if Ok or the error E received from the input.

Auto Trait Implementations

impl<I, W> RefUnwindSafe for EntriesToBytesIter<I, W> where
    I: RefUnwindSafe,
    W: RefUnwindSafe

impl<I, W> Send for EntriesToBytesIter<I, W> where
    I: Send,
    W: Send

impl<I, W> Sync for EntriesToBytesIter<I, W> where
    I: Sync,
    W: Sync

impl<I, W> Unpin for EntriesToBytesIter<I, W> where
    I: Unpin,
    W: Unpin

impl<I, W> UnwindSafe for EntriesToBytesIter<I, W> where
    I: UnwindSafe,
    W: UnwindSafe

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> TryConv for T

impl<T> TryConv for T

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>,