pub trait FindExt: Find {
// Provided methods
fn find<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<Data<'a>, Error<Self::Error>> { ... }
fn find_commit<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<CommitRef<'a>, Error<Self::Error>> { ... }
fn find_tree<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<TreeRef<'a>, Error<Self::Error>> { ... }
fn find_tag<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<TagRef<'a>, Error<Self::Error>> { ... }
fn find_blob<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<BlobRef<'a>, Error<Self::Error>> { ... }
fn find_commit_iter<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<CommitRefIter<'a>, Error<Self::Error>> { ... }
fn find_tree_iter<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<TreeRefIter<'a>, Error<Self::Error>> { ... }
fn find_tag_iter<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<TagRefIter<'a>, Error<Self::Error>> { ... }
}
Expand description
An extension trait with convenience functions.
Provided Methods§
sourcefn find<'a>(
&self,
id: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<Data<'a>, Error<Self::Error>>
fn find<'a>( &self, id: impl AsRef<oid>, buffer: &'a mut Vec<u8> ) -> Result<Data<'a>, Error<Self::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: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<CommitRef<'a>, Error<Self::Error>>
fn find_commit<'a>( &self, id: impl AsRef<oid>, buffer: &'a mut Vec<u8> ) -> Result<CommitRef<'a>, Error<Self::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: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<TreeRef<'a>, Error<Self::Error>>
fn find_tree<'a>( &self, id: impl AsRef<oid>, buffer: &'a mut Vec<u8> ) -> Result<TreeRef<'a>, Error<Self::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: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<TagRef<'a>, Error<Self::Error>>
fn find_tag<'a>( &self, id: impl AsRef<oid>, buffer: &'a mut Vec<u8> ) -> Result<TagRef<'a>, Error<Self::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: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<BlobRef<'a>, Error<Self::Error>>
fn find_blob<'a>( &self, id: impl AsRef<oid>, buffer: &'a mut Vec<u8> ) -> Result<BlobRef<'a>, Error<Self::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: impl AsRef<oid>,
buffer: &'a mut Vec<u8>
) -> Result<CommitRefIter<'a>, Error<Self::Error>>
fn find_commit_iter<'a>( &self, id: impl AsRef<oid>, buffer: &'a mut Vec<u8> ) -> Result<CommitRefIter<'a>, Error<Self::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.