pub trait Host {
// Required methods
fn forge(&self) -> Forge;
fn lacks(&mut self, feature: Feature) -> Option<String>;
fn fetch(&mut self, lookups: Vec<Lookup>) -> Result<FetchResult, String>;
fn threads(
&mut self,
target: &Target,
extra: bool,
bots: &[String],
) -> Result<Option<PrThreads>, String>;
fn pushed_at(&mut self, pr: &PrThreads, sha: &str) -> Result<Pushed, Lookup>;
fn files(
&mut self,
pr: &PrThreads,
oid: &str,
paths: &[String],
) -> Result<Vec<(String, String)>, String>;
fn merge_base(&mut self, pr: &PrThreads) -> Result<String, String>;
fn on_branch(&mut self, pr: &PrThreads, head: &str) -> Result<bool, String>;
fn reply(
&mut self,
pr: &PrThreads,
thread: &Thread,
body: &str,
) -> Result<String, String>;
fn set_resolved(
&mut self,
pr: &PrThreads,
thread: &Thread,
resolved: bool,
) -> Result<(), String>;
}Required Methods§
fn forge(&self) -> Forge
Sourcefn lacks(&mut self, feature: Feature) -> Option<String>
fn lacks(&mut self, feature: Feature) -> Option<String>
Why the forge cannot do feature, or None when it can.
Sourcefn fetch(&mut self, lookups: Vec<Lookup>) -> Result<FetchResult, String>
fn fetch(&mut self, lookups: Vec<Lookup>) -> Result<FetchResult, String>
The PRs the lookups name, in the order named, as pr status
reports them before attention codes are derived.
Sourcefn threads(
&mut self,
target: &Target,
extra: bool,
bots: &[String],
) -> Result<Option<PrThreads>, String>
fn threads( &mut self, target: &Target, extra: bool, bots: &[String], ) -> Result<Option<PrThreads>, String>
A PR’s review threads, and with extra its reviews and conversation
comments. None when there is no such PR.
Sourcefn pushed_at(&mut self, pr: &PrThreads, sha: &str) -> Result<Pushed, Lookup>
fn pushed_at(&mut self, pr: &PrThreads, sha: &str) -> Result<Pushed, Lookup>
When sha (a prefix) was pushed to the PR.
Sourcefn files(
&mut self,
pr: &PrThreads,
oid: &str,
paths: &[String],
) -> Result<Vec<(String, String)>, String>
fn files( &mut self, pr: &PrThreads, oid: &str, paths: &[String], ) -> Result<Vec<(String, String)>, String>
Files at commit oid, as (path, text); a file that cannot be read
is left out.
Sourcefn merge_base(&mut self, pr: &PrThreads) -> Result<String, String>
fn merge_base(&mut self, pr: &PrThreads) -> Result<String, String>
The commit the PR’s diff is taken against.
Sourcefn on_branch(&mut self, pr: &PrThreads, head: &str) -> Result<bool, String>
fn on_branch(&mut self, pr: &PrThreads, head: &str) -> Result<bool, String>
Whether head is on the PR’s branch, for a head this clone cannot
place.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".