Trait git_ref::file::ReferenceExt[][src]

pub trait ReferenceExt: Sealed {
    fn log_iter_rev<'b>(
        &self,
        store: &Store,
        buf: &'b mut [u8]
    ) -> Result<Option<Reverse<'b, File>>>;
fn log_iter<'a, 'b: 'a>(
        &'a self,
        store: &Store,
        buf: &'b mut Vec<u8>
    ) -> Result<Option<Forward<'b>>>;
fn log_exists(&self, store: &Store) -> bool;
fn peel_to_id_in_place<E: Error + Send + Sync + 'static>(
        &mut self,
        store: &Store,
        packed: Option<&Buffer>,
        find: impl FnMut(ObjectId, &mut Vec<u8>) -> Result<Option<(Kind, &[u8])>, E>
    ) -> Result<ObjectId, Error>;
fn follow(
        &self,
        store: &Store,
        packed: Option<&Buffer>
    ) -> Option<Result<Reference, Error>>; }
Expand description

A trait to extend Reference with functionality requiring a file::Store.

Required methods

Obtain a reverse iterator over logs of this reference. See crate::file::loose::Reference::log_iter_rev() for details.

Obtain an iterator over logs of this reference. See crate::file::loose::Reference::log_iter() for details.

For details, see Reference::log_exists().

Follow this symbolic reference one level and return the ref it refers to, possibly providing access to packed references for lookup if it contains the referent.

Returns None if this is not a symbolic reference, hence the leaf of the chain.

Implementors