pub trait ReviewSource: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn fetch_queue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Review>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn checkout_spec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
review: &'life1 Review,
canonical_repo: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<Checkout>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn fetch_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Lifecycle)>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn is_commit_for(&self, _review: &ReviewKey, _message: &str) -> bool { ... }
}Required Methods§
Sourcefn name(&self) -> &str
fn name(&self) -> &str
Instance name from config, e.g. “moz” - distinguishes multiple configured instances of
the same source type and forms the source half of a ReviewKey.
fn fetch_queue<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Review>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn checkout_spec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
review: &'life1 Review,
canonical_repo: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<Checkout>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkout_spec<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
review: &'life1 Review,
canonical_repo: &'life2 Path,
) -> Pin<Box<dyn Future<Output = Result<Checkout>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
canonical_repo is the already-resolved local repo this review’s workspace will be built
from - most sources ignore it, but one that needs to prepare local repo state first (e.g.
moz_phab writing .git/.arcconfig so moz-phab can find the right Phabricator
instance) needs it before it can build the Checkout.
Sourcefn fetch_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Lifecycle)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_status<'life0, 'life1, 'async_trait>(
&'life0 self,
ids: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<(String, Lifecycle)>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Refresh the lifecycle of reviews that are no longer in the queue (e.g. changes were
requested, or the reviewer was removed) so sync knows whether to keep the workspace.
Provided Methods§
Sourcefn is_commit_for(&self, _review: &ReviewKey, _message: &str) -> bool
fn is_commit_for(&self, _review: &ReviewKey, _message: &str) -> bool
Whether message (a commit message from a workspace built for a stack containing
review) is the commit that carries review’s patch. Lets a stack workspace be
positioned at one member’s patch. Sources that don’t stack reviews never need this.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".