Skip to main content

StdioProvider

Struct StdioProvider 

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

Implementations§

Source§

impl StdioProvider

Source

pub fn spawn(command: &[String], timeout: Duration) -> ProviderResult<Self>

Spawn the provider and run the initialize handshake.

Source

pub fn spawn_with_stderr( command: &[String], timeout: Duration, inherit_stderr: bool, ) -> ProviderResult<Self>

Spawn with the configured stderr policy (plans/0008 §4): Inherit passes the child’s stderr through for adapter debugging; anything else discards it.

Source

pub fn spawn_with_cache( command: &[String], timeout: Duration, inherit_stderr: bool, cache_bytes: u64, cache_dir: Option<PathBuf>, ) -> ProviderResult<Self>

Spawn with the user’s cache budget and the provider’s subtree path — both travel in every initialize (protocol v1.2, advisory).

Source

pub fn spawn_with_env( command: &[String], timeout: Duration, env: &[(&str, &str)], ) -> ProviderResult<Self>

Spawn with extra environment for the child process — the test-binary re-exec seam (fakes pick their script by env).

Trait Implementations§

Source§

impl Drop for StdioProvider

Source§

fn drop(&mut self)

rootle owns the provider lifecycle: the child dies with the app (kill first — stdin EOF alone is timing-dependent; the dead stdout then lets the reader thread exit and be joined).

Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Provider for StdioProvider

Source§

fn search_code_progressive( &self, q: &str, on_hits: &(dyn Fn(&[CodeMatch]) + Send + Sync), ) -> ProviderResult<SearchCodeResult>

v1.3 progressive search (plans/0011): partial: true opts into $/partial batches for this request’s id; the reply is metadata-only when the provider streamed (items empty, truncated authoritative).

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>, on_entries: &mut dyn FnMut(Vec<LogEntry>), ) -> ProviderResult<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: file bytes + content id at path@ref (open-at-commit).

Source§

fn blame( &self, repo: &RepoId, path: &str, ref_: Option<&GitRef>, ) -> ProviderResult<Vec<BlameRange>>

v1.5: blame ranges.

Source§

fn commit(&self, repo: &RepoId, sha: &Sha) -> ProviderResult<CommitDetail>

v1.6 (plans/0028): one commit’s detail — the reply deserializes straight into the seam type (it already carries the wire defaults).

Source§

fn advise_cancel(&self)

v1.1 advisory cancel: name a request currently in flight, if any. Best-effort — a racing cancel for an id that just completed is ignored by the provider by contract.

Source§

fn take_notice(&self) -> Option<String>

One-shot restart notice for the status line (plans/0008 §5).

Source§

fn cache_usage(&self) -> Option<u64>

Cache usage reported at the initialize handshake, when the provider participates in the advisory budget (v1.2).

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 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 clone_url(&self, repo: &RepoId) -> ProviderResult<String>

URL git clone accepts for a repo (clone wizard, plans/0004).
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) -> Result<Vec<u8>, ProviderError>

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.

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