pub struct GitHubProvider { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Provider for GitHubProvider
impl Provider for GitHubProvider
Source§fn refs(&self, repo: &RepoId) -> ProviderResult<RepoRefs>
fn refs(&self, repo: &RepoId) -> ProviderResult<RepoRefs>
v1.5 (plans/0016 M1): branches + tags.
Source§fn log(
&self,
repo: &RepoId,
path: Option<&str>,
ref_: Option<&GitRef>,
limit: Option<usize>,
) -> ProviderResult<(Vec<LogEntry>, bool)>
fn log( &self, repo: &RepoId, path: Option<&str>, ref_: Option<&GitRef>, limit: Option<usize>, ) -> ProviderResult<(Vec<LogEntry>, bool)>
v1.5: commit log, newest first.
Source§fn blob_at(
&self,
repo: &RepoId,
path: &str,
ref_: Option<&GitRef>,
) -> ProviderResult<(Vec<u8>, Sha)>
fn blob_at( &self, repo: &RepoId, path: &str, ref_: Option<&GitRef>, ) -> ProviderResult<(Vec<u8>, Sha)>
v1.5: open-at-commit.
Source§fn blame(
&self,
repo: &RepoId,
path: &str,
ref_: Option<&GitRef>,
) -> ProviderResult<Vec<BlameRange>>
fn blame( &self, repo: &RepoId, path: &str, ref_: Option<&GitRef>, ) -> ProviderResult<Vec<BlameRange>>
v1.5: blame via GraphQL.
Source§fn commit(&self, repo: &RepoId, sha: &Sha) -> ProviderResult<CommitDetail>
fn commit(&self, repo: &RepoId, sha: &Sha) -> ProviderResult<CommitDetail>
v1.6 (plans/0028): one commit’s detail.
Source§fn search_code_progressive(
&self,
q: &str,
on_hits: &(dyn Fn(&[CodeMatch]) + Send + Sync),
) -> ProviderResult<SearchCodeResult>
fn search_code_progressive( &self, q: &str, on_hits: &(dyn Fn(&[CodeMatch]) + Send + Sync), ) -> ProviderResult<SearchCodeResult>
v1.3 progressive (plans/0011): stream search/code pages as
they arrive — the first 100 render while later pages fetch.
Budget: 3 pages × 100 (rate-conscious); GitHub caps code search
at 1000 anyway, and truncated says whether more exists.
fn name(&self) -> &str
Source§fn icon(&self) -> Option<String>
fn icon(&self) -> Option<String>
Modeline icon: a builtin name (“github”, “gitlab”, “bitbucket”,
“folder” — rendered as its Nerd Font glyph when nerd_font is
on) or a single literal glyph the terminal can render. The
provider declares its own (handshake
icon, protocol v1.3);
the in-tree github provider owns the one rootle hardcodes.fn capabilities(&self) -> Capabilities
Source§fn default_orgs(&self) -> Vec<String>
fn default_orgs(&self) -> Vec<String>
Suggested orgs for a cold start (no state); GitHub ships its
defaults, other providers return nothing.
Source§fn search(&self, query: &str) -> ProviderResult<Vec<SearchItem>>
fn search(&self, query: &str) -> ProviderResult<Vec<SearchItem>>
Repo + org search for the launch popup (orgs first).
Source§fn org_repos(&self, org: &str) -> ProviderResult<Vec<RepoInfo>>
fn org_repos(&self, org: &str) -> ProviderResult<Vec<RepoInfo>>
Repo names of an org/group, with listing metadata when the
backend reports it (v1.4).
Source§fn fetch_tree(
&self,
repo: &RepoId,
ref_: Option<&GitRef>,
) -> ProviderResult<TreeResult>
fn fetch_tree( &self, repo: &RepoId, ref_: Option<&GitRef>, ) -> ProviderResult<TreeResult>
Full recursive tree of a repo — at
ref (branch/tag/sha) when
given (v1.5), else the default branch.Source§fn fetch_blob(&self, repo: &RepoId, sha: &Sha) -> ProviderResult<Vec<u8>>
fn fetch_blob(&self, repo: &RepoId, sha: &Sha) -> ProviderResult<Vec<u8>>
Blob bytes by content id.
Source§fn clone_url(&self, repo: &RepoId) -> ProviderResult<String>
fn clone_url(&self, repo: &RepoId) -> ProviderResult<String>
URL
git clone accepts for a repo (clone wizard, plans/0004).Source§fn web_url(
&self,
repo: &RepoId,
path: &str,
branch: Option<&GitRef>,
line: Option<u32>,
end: Option<u32>,
is_file: bool,
) -> ProviderResult<String>
fn web_url( &self, repo: &RepoId, path: &str, branch: Option<&GitRef>, line: Option<u32>, end: Option<u32>, is_file: bool, ) -> ProviderResult<String>
Browser URL for yank (␣ y): repo root, or a path inside it.
is_file picks the grammar (GitHub: blob vs tree); line
adds a fragment when Some. branch is None for the default
branch (the provider resolves it).Source§fn search_code(&self, q: &str) -> ProviderResult<SearchCodeResult>
fn search_code(&self, q: &str) -> ProviderResult<SearchCodeResult>
Code search;
q is the full query string with qualifiers.Source§fn source_tarball(&self, repo: &RepoId) -> ProviderResult<Vec<u8>>
fn source_tarball(&self, repo: &RepoId) -> ProviderResult<Vec<u8>>
The repo’s default-branch source as a gzip tarball — fuel for
the local-grep fallback when a repo-scoped code search returns
nothing (GitHub’s index does not cover young/low-activity
repos; the tree can’t lie, the index can). Optional: the
default refuses and the fallback is simply unavailable —
external providers grow it when the wire protocol does.
Source§fn advise_cancel(&self)
fn advise_cancel(&self)
Advisory cancellation (protocol v1.1): tells the backend the
caller no longer needs the in-flight request. Best-effort —
replies may still arrive and are always handled. Default: nothing
to cancel (in-process providers drop work via generations).
Source§fn take_notice(&self) -> Option<String>
fn take_notice(&self) -> Option<String>
One-shot UI notice for the status line (plans/0008 §5) — e.g.
a stdio child’s successful restart. Drained once per route.
Default: nothing to say.
Source§fn cache_usage(&self) -> Option<u64>
fn cache_usage(&self) -> Option<u64>
Cache usage the provider reported at initialize (bytes), when
it participates in the advisory cache budget (protocol v1.2) —
surfaced in :settings next to the provider row.
Auto Trait Implementations§
impl !Freeze for GitHubProvider
impl !RefUnwindSafe for GitHubProvider
impl !UnwindSafe for GitHubProvider
impl Send for GitHubProvider
impl Sync for GitHubProvider
impl Unpin for GitHubProvider
impl UnsafeUnpin for GitHubProvider
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