Skip to main content

FindExt

Trait FindExt 

Source
pub trait FindExt: Find {
    // Provided methods
    fn find<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<Data<'a>, Error> { ... }
    fn find_blob<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<BlobRef<'a>, Error> { ... }
    fn find_tree<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<TreeRef<'a>, Error> { ... }
    fn find_commit<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<CommitRef<'a>, Error> { ... }
    fn find_tag<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<TagRef<'a>, Error> { ... }
    fn find_commit_iter<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<CommitRefIter<'a>, Error> { ... }
    fn find_tree_iter<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<TreeRefIter<'a>, Error> { ... }
    fn find_tag_iter<'a>(
        &self,
        id: &oid,
        buffer: &'a mut Vec<u8>,
    ) -> Result<TagRefIter<'a>, Error> { ... }
}
Expand description

An extension trait with convenience functions.

Provided Methods§

Source

fn find<'a>(&self, id: &oid, buffer: &'a mut Vec<u8>) -> Result<Data<'a>, Error>

Like try_find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error.

Source

fn find_blob<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<BlobRef<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired object type.

Source

fn find_tree<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TreeRef<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired object type.

Source

fn find_commit<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<CommitRef<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired object type.

Source

fn find_tag<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TagRef<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired object type.

Source

fn find_commit_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<CommitRefIter<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired iterator type.

Source

fn find_tree_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TreeRefIter<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired iterator type.

Source

fn find_tag_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<TagRefIter<'a>, Error>

Like find(…), but flattens the Result<Option<_>> into a single Result making a non-existing object an error while returning the desired iterator type.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Find + ?Sized> FindExt for T