pub struct GitBackend { /* private fields */ }Expand description
Pure local git backend wrapping a GitRepo.
Uses GitRepo for all operations including smart fetching.
Cannot access GitHub API, so PR/Issue queries will return Unsupported.
Implementations§
Source§impl GitBackend
impl GitBackend
Sourcepub fn set_notice_callback(&mut self, cb: NoticeCallback)
pub fn set_notice_callback(&mut self, cb: NoticeCallback)
Set the notice callback for emitting operational messages.
Trait Implementations§
Source§impl Backend for GitBackend
impl Backend for GitBackend
Source§fn find_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_commit<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find commit by hash (short or full).
Source§fn enrich_commit<'life0, 'async_trait>(
&'life0 self,
commit: CommitInfo,
) -> Pin<Box<dyn Future<Output = CommitInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enrich_commit<'life0, 'async_trait>(
&'life0 self,
commit: CommitInfo,
) -> Pin<Box<dyn Future<Output = CommitInfo> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Enrich commit with additional info (author URLs, commit URL, etc.).
Source§fn find_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
branch: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = WtgResult<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_file<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
branch: &'life1 str,
path: &'life2 str,
) -> Pin<Box<dyn Future<Output = WtgResult<FileInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find file and its history in the repository.
Source§fn find_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find a specific tag by name.
Source§fn find_previous_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<Option<TagInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_previous_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = WtgResult<Option<TagInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find the previous tag before the given tag. Read more
Source§fn disambiguate_query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ParsedQuery,
) -> Pin<Box<dyn Future<Output = WtgResult<Query>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn disambiguate_query<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 ParsedQuery,
) -> Pin<Box<dyn Future<Output = WtgResult<Query>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Disambiguate a parsed query into a concrete query.
Source§fn find_release_for_commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
commit_hash: &'life1 str,
_commit_date: Option<DateTime<Utc>>,
filter: &'life2 ReleaseFilter,
) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_release_for_commit<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
commit_hash: &'life1 str,
_commit_date: Option<DateTime<Utc>>,
filter: &'life2 ReleaseFilter,
) -> Pin<Box<dyn Future<Output = Option<TagInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find a release/tag that contains the given commit. Read more
Source§fn changelog_for_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn changelog_for_version<'life0, 'life1, 'async_trait>(
&'life0 self,
version: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Parse changelog for a specific version from repository root. Read more
Source§fn tag_url(&self, tag: &str) -> Option<String>
fn tag_url(&self, tag: &str) -> Option<String>
Generate URL to view a tag (tree view for plain git tags).
Source§fn release_tag_url(&self, tag: &str) -> Option<String>
fn release_tag_url(&self, tag: &str) -> Option<String>
Generate URL to view a release (releases page for tags with releases).
Generate author profile URL from email address.
Source§fn emit_notice(&self, _notice: Notice)
fn emit_notice(&self, _notice: Notice)
Emit a notice to the registered callback.
Used by resolution code to surface warnings to the user.
Source§fn backend_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
_pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Backend>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn backend_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
_pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Backend>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a backend for fetching PR data if the PR is from a different repository.
Returns None if same repo or cross-project not supported.
Source§fn find_commit_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_commit_for_pr<'life0, 'life1, 'async_trait>(
&'life0 self,
pr: &'life1 PullRequestInfo,
) -> Pin<Box<dyn Future<Output = WtgResult<CommitInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Find commit info from a PR (using merge commit SHA).
Source§fn fetch_release_body<'life0, 'life1, 'async_trait>(
&'life0 self,
_tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_release_body<'life0, 'life1, 'async_trait>(
&'life0 self,
_tag_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the body/description of a GitHub release by tag name.
Source§fn fetch_issue<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<ExtendedIssueInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn fetch_issue<'life0, 'async_trait>(
&'life0 self,
_number: u64,
) -> Pin<Box<dyn Future<Output = WtgResult<ExtendedIssueInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch issue details including closing PRs.
Auto Trait Implementations§
impl !Freeze for GitBackend
impl !RefUnwindSafe for GitBackend
impl Send for GitBackend
impl Sync for GitBackend
impl Unpin for GitBackend
impl UnsafeUnpin for GitBackend
impl !UnwindSafe for GitBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more