pub trait Tracker: Send + Sync {
// Required methods
fn capabilities(
&self,
item: Option<String>,
) -> Result<TrackerCapabilities, ProviderError>;
fn issue(&self, item: String) -> Result<TrackerIssue, ProviderError>;
fn replies(&self, request: ReplyPoll) -> Result<ReplyBatch, ProviderError>;
fn post(&self, post: TrackerPost) -> Result<PostedComment, ProviderError>;
fn update(&self, update: TrackerUpdate) -> Result<(), ProviderError>;
fn create(&self, spec: IssueSpec) -> Result<TrackerIssue, ProviderError>;
fn link(&self, link: TrackerLink) -> Result<(), ProviderError>;
// Provided method
fn pull_for_branch(
&self,
branch: String,
) -> Result<Option<String>, ProviderError> { ... }
}Expand description
An issue tracker that is read, commented on and written to on demand.
A call the instance cannot make fails with GUATIAO_ERR_UNSUPPORTED and a message
naming what it can do; an item outside the instance’s repository or project fails with
GUATIAO_ERR_BAD_VALUE and a message that starts foreign item.
Required Methods§
Sourcefn capabilities(
&self,
item: Option<String>,
) -> Result<TrackerCapabilities, ProviderError>
fn capabilities( &self, item: Option<String>, ) -> Result<TrackerCapabilities, ProviderError>
Returns what the instance can do; item adds the answers that depend on one issue.
Sourcefn issue(&self, item: String) -> Result<TrackerIssue, ProviderError>
fn issue(&self, item: String) -> Result<TrackerIssue, ProviderError>
Reads one issue.
Sourcefn replies(&self, request: ReplyPoll) -> Result<ReplyBatch, ProviderError>
fn replies(&self, request: ReplyPoll) -> Result<ReplyBatch, ProviderError>
Lists the comments made after request.since on the issues it names.
Sourcefn post(&self, post: TrackerPost) -> Result<PostedComment, ProviderError>
fn post(&self, post: TrackerPost) -> Result<PostedComment, ProviderError>
Posts a comment, or edits the one post.edit names.
Sourcefn update(&self, update: TrackerUpdate) -> Result<(), ProviderError>
fn update(&self, update: TrackerUpdate) -> Result<(), ProviderError>
Changes labels, workflow state or assignees.
Sourcefn create(&self, spec: IssueSpec) -> Result<TrackerIssue, ProviderError>
fn create(&self, spec: IssueSpec) -> Result<TrackerIssue, ProviderError>
Creates an issue and returns it, with its parent when one was attached.
Sourcefn link(&self, link: TrackerLink) -> Result<(), ProviderError>
fn link(&self, link: TrackerLink) -> Result<(), ProviderError>
Links two issues, or an issue and an address elsewhere.
Provided Methods§
Trait Implementations§
Source§impl Kind for dyn Tracker
impl Kind for dyn Tracker
Source§const FLOOR: usize
const FLOOR: usize
Kind::Vtable]: every slot. A table declaring less is
refused; a larger one has slots appended after these.Source§const FLOOR_HASH: u32 = TrackerVtable::FLOOR_HASH
const FLOOR_HASH: u32 = TrackerVtable::FLOOR_HASH
Source§const REQUIRED: &'static [(&'static str, usize)]
const REQUIRED: &'static [(&'static str, usize)]
(method name, one past its end), so a
null one is refused by name.Source§const OBJECT: bool = false
const OBJECT: bool = false
#[guatiao::kind(object)]): a
handle one caller owns, with a destroy slot first and &mut self
methods, never offered by a registry. See [Object]. Read moreSource§fn as_dyn(remote: &Remote<Self>) -> &Self
fn as_dyn(remote: &Remote<Self>) -> &Self
remote, because
only it knows the trait.Source§fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self
fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self
Object] hands out.Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".