pub trait ReviewFacade: Send + Sync {
// Required methods
fn resolve_scope<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
scope: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewScope, ScopeError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn list(&self, scope: &ReviewScope) -> Result<Vec<ReviewSummary>, String>;
fn branches_with_reviews(&self, scope: &ReviewScope) -> Vec<String>;
fn get(
&self,
scope: &ReviewScope,
review_id: &str,
) -> Result<Option<ReviewDetail>, String>;
fn reply(
&self,
scope: &ReviewScope,
comment_id: &str,
text: &str,
at: &str,
) -> Result<CommentAnchorView, String>;
fn resolve(
&self,
scope: &ReviewScope,
comment_id: &str,
) -> Result<CommentAnchorView, String>;
}Expand description
Narrow surface the review-conversation tools depend on. resolve_scope
is async (it shells out to git for the branch); the store ops are
synchronous over the resolved scope.
Required Methods§
Sourcefn resolve_scope<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
scope: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewScope, ScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn resolve_scope<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
caller: &'life1 SessionSlot,
scope: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<ReviewScope, ScopeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Resolve the caller to its review scope, or the step that failed.
scope overrides the branch: an explicit scope (a document’s, from
a hand-off) needs no checkout, so the git step is skipped and only
the caller’s project still has to resolve.
Sourcefn list(&self, scope: &ReviewScope) -> Result<Vec<ReviewSummary>, String>
fn list(&self, scope: &ReviewScope) -> Result<Vec<ReviewSummary>, String>
review__list rows for the scope’s branch, newest review first.
Sourcefn branches_with_reviews(&self, scope: &ReviewScope) -> Vec<String>
fn branches_with_reviews(&self, scope: &ReviewScope) -> Vec<String>
Branches in the scope’s project that hold submitted reviews. Tells
Self::list’s branch-scoped answer apart from the project’s
whole set, on an empty result and a populated one alike.
Sourcefn get(
&self,
scope: &ReviewScope,
review_id: &str,
) -> Result<Option<ReviewDetail>, String>
fn get( &self, scope: &ReviewScope, review_id: &str, ) -> Result<Option<ReviewDetail>, String>
review__get detail for one review, or None when it isn’t on the
scope’s branch.
Sourcefn reply(
&self,
scope: &ReviewScope,
comment_id: &str,
text: &str,
at: &str,
) -> Result<CommentAnchorView, String>
fn reply( &self, scope: &ReviewScope, comment_id: &str, text: &str, at: &str, ) -> Result<CommentAnchorView, String>
Append a reply to comment_id; returns the comment’s anchor and
the status after the append. Err when comment_id isn’t in this
scope.
Sourcefn resolve(
&self,
scope: &ReviewScope,
comment_id: &str,
) -> Result<CommentAnchorView, String>
fn resolve( &self, scope: &ReviewScope, comment_id: &str, ) -> Result<CommentAnchorView, String>
Mark comment_id Resolved; returns the comment’s anchor and its
new status. Err when it isn’t in this scope.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".