Struct git_object::immutable::commit::iter::Iter[][src]

pub struct Iter<'a> { /* fields omitted */ }

Like immutable::Commit, but as Iterator to support (up to) entirely allocation free parsing. It’s particularly useful to traverse the commit graph without ever allocating arrays for parents.

Implementations

impl<'a> Iter<'a>[src]

pub fn from_bytes(data: &'a [u8]) -> Iter<'a>

Notable traits for Iter<'a>

impl<'a> Iterator for Iter<'a> type Item = Result<Token<'a>, Error>;
[src]

Create a commit iterator from data.

pub fn tree_id(&mut self) -> Option<ObjectId>[src]

Returns the object id of this commits tree if it is the first function called and if there is no error in decoding the data.

Note that this method must only be called once or else will always return None while consuming a single token by calling Errors are coerced into options, hiding whether there was an error or not. THe caller should assume an error if they call the method as intended. Such a squelched error cannot be recovered unless the objects data is retrieved and parsed again. next().

Trait Implementations

impl<'a> Iterator for Iter<'a>[src]

type Item = Result<Token<'a>, Error>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'a> RefUnwindSafe for Iter<'a>

impl<'a> Send for Iter<'a>

impl<'a> Sync for Iter<'a>

impl<'a> Unpin for Iter<'a>

impl<'a> UnwindSafe for Iter<'a>

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