Skip to main content

Source

Trait Source 

Source
pub trait Source: Send + Sync {
    // Required method
    fn poll(&self, request: SourcePoll) -> Result<SourceBatch, ProviderError>;

    // Provided methods
    fn facts(&self) -> Result<SourceFacts, ProviderError> { ... }
    fn board_url(&self) -> Result<Option<String>, ProviderError> { ... }
    fn issue_templates(&self) -> Result<Vec<String>, ProviderError> { ... }
}
Expand description

A tracker or CI system that supplies work. What is written back to a tracker goes through the Tracker kind.

Required Methods§

Source

fn poll(&self, request: SourcePoll) -> Result<SourceBatch, ProviderError>

Returns the items that changed since request.cursor and match the filters the provider was configured with. Blocks for the duration of the network exchange.

Provided Methods§

Source

fn facts(&self) -> Result<SourceFacts, ProviderError>

What this instance’s settings say of its web page, intake labels, hosts and credential variables, with no request to the tracker. The default says nothing.

Source

fn board_url(&self) -> Result<Option<String>, ProviderError>

The page where people read this instance’s issues as a board, from its own settings and with no request to the tracker; None when the provider names none.

Source

fn issue_templates(&self) -> Result<Vec<String>, ProviderError>

The text of the project’s issue templates, read through the tracker: a hidden comment an item carries from one of them is the template’s own, and vetting does not hold it. Empty when the provider has no templates or the project has none.

Trait Implementations§

Source§

impl From<Instance<dyn Source>> for Box<dyn Source>

Source§

fn from(instance: Instance<dyn Source>) -> Self

Converts to this type from the input type.
Source§

impl From<Remote<dyn Source>> for Box<dyn Source>

Source§

fn from(remote: Remote<dyn Source>) -> Self

Converts to this type from the input type.
Source§

impl Kind for dyn Source

Source§

const NAME: &'static str = "ai6_source"

The kind’s name in a descriptor’s kinds and tables.
Source§

const FLOOR: usize

The size of [Kind::Vtable]: every slot. A table declaring less is refused; a larger one has slots appended after these.
Source§

const FLOOR_HASH: u32 = SourceVtable::FLOOR_HASH

FNV-1a over the shape and every method’s name and normalised signature, in table order. A table carrying another number was built from a different declaration of this kind. Read more
Source§

const REQUIRED: &'static [(&'static str, usize)]

Every required slot as (method name, one past its end), so a null one is refused by name.
Source§

const OBJECT: bool = false

Whether this is an object kind (#[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 more
Source§

type Vtable = SourceVtable

The repr(C) table, which starts with a [KindHeader].
Source§

fn as_dyn(remote: &Remote<Self>) -> &Self

The trait object over a proxy. The macro writes remote, because only it knows the trait.
Source§

fn as_dyn_mut(remote: &mut Remote<Self>) -> &mut Self

The same, mutably — what an [Object] hands out.
Source§

fn boxed(remote: Remote<Self>) -> Box<Self>

The same, boxed.
Source§

fn shared(remote: Remote<Self>) -> Arc<Self> ⓘ

The same, shared.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Source for Instance<dyn Source>

Source§

fn facts(&self) -> Result<SourceFacts, ProviderError>

Source§

fn poll(&self, request: SourcePoll) -> Result<SourceBatch, ProviderError>

Source§

fn board_url(&self) -> Result<Option<String>, ProviderError>

Source§

fn issue_templates(&self) -> Result<Vec<String>, ProviderError>

Source§

impl Source for Remote<dyn Source>

Source§

fn facts(&self) -> Result<SourceFacts, ProviderError>

Source§

fn poll(&self, request: SourcePoll) -> Result<SourceBatch, ProviderError>

Source§

fn board_url(&self) -> Result<Option<String>, ProviderError>

Source§

fn issue_templates(&self) -> Result<Vec<String>, ProviderError>

Implementors§