Skip to main content

GitHubProvider

Struct GitHubProvider 

Source
pub struct GitHubProvider { /* private fields */ }

Implementations§

Source§

impl GitHubProvider

Source

pub fn new(max_mb: u64) -> Self

Source

pub fn anonymous() -> Self

Token-less provider (tests, offline defaults). Token-less, no hardening (tests and offline defaults).

Trait Implementations§

Source§

impl Provider for GitHubProvider

Source§

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)>

v1.5: commit log, newest first.

Source§

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>>

v1.5: blame via GraphQL.

Source§

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>

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.

Source§

fn name(&self) -> &str

Source§

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.
Source§

fn capabilities(&self) -> Capabilities

Source§

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>>

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>

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>>

Blob bytes by content id.
Source§

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>

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 org_url(&self, org: &str) -> ProviderResult<String>

Browser URL for an org/group page.
Source§

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>>

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)

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>

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>

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more