pub trait FindExt: Find {
// Provided methods
fn find<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(Data<'a>, Option<Location>), Error> { ... }
fn find_commit<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(CommitRef<'a>, Option<Location>), Error> { ... }
fn find_tree<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(TreeRef<'a>, Option<Location>), Error> { ... }
fn find_tag<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(TagRef<'a>, Option<Location>), Error> { ... }
fn find_blob<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(BlobRef<'a>, Option<Location>), Error> { ... }
fn find_commit_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(CommitRefIter<'a>, Option<Location>), Error> { ... }
fn find_tree_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(TreeRefIter<'a>, Option<Location>), Error> { ... }
fn find_tag_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(TagRefIter<'a>, Option<Location>), Error> { ... }
}
Expand description
An extension trait with convenience functions.
Provided Methods§
Sourcefn find<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(Data<'a>, Option<Location>), Error>
fn find<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<(Data<'a>, Option<Location>), Error>
Like try_find(…)
, but flattens the Result<Option<_>>
into a single Result
making a non-existing object an error.
Sourcefn find_commit<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(CommitRef<'a>, Option<Location>), Error>
fn find_commit<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<(CommitRef<'a>, Option<Location>), 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.
Sourcefn find_tree<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(TreeRef<'a>, Option<Location>), Error>
fn find_tree<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<(TreeRef<'a>, Option<Location>), 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.
Sourcefn find_tag<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(TagRef<'a>, Option<Location>), Error>
fn find_tag<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<(TagRef<'a>, Option<Location>), 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.
Sourcefn find_blob<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(BlobRef<'a>, Option<Location>), Error>
fn find_blob<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<(BlobRef<'a>, Option<Location>), 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.
Sourcefn find_commit_iter<'a>(
&self,
id: &oid,
buffer: &'a mut Vec<u8>,
) -> Result<(CommitRefIter<'a>, Option<Location>), Error>
fn find_commit_iter<'a>( &self, id: &oid, buffer: &'a mut Vec<u8>, ) -> Result<(CommitRefIter<'a>, Option<Location>), 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.