Skip to main content

Conversation

Trait Conversation 

Source
pub trait Conversation: Send + Sync {
    // Required method
    fn post_comment<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        id: &'life1 ExternalId,
        body: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;

    // Provided methods
    fn get_authenticated_user<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn get_mentions<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _since: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Mention>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn list_issue_comments<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _id: &'life1 ExternalId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Mention>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn acknowledge_issue<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _id: &'life1 ExternalId,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn acknowledge_mention<'life0, 'life1, 'async_trait>(
        &'life0 self,
        _comment_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn post_comment_in_repo<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        _repo: &'life1 str,
        id: &'life2 ExternalId,
        body: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
}
Expand description

Comments and mentions

Required Methods§

Source

fn post_comment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 ExternalId, body: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Post a comment / activity note.

Provided Methods§

Source

fn get_authenticated_user<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the authenticated user’s username.

Returns None by default (backends that don’t support user identity).

Source

fn get_mentions<'life0, 'life1, 'async_trait>( &'life0 self, _since: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Mention>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get recent mentions/comments since a given timestamp.

Returns empty by default (backends that don’t support mention scanning).

Source

fn list_issue_comments<'life0, 'life1, 'async_trait>( &'life0 self, _id: &'life1 ExternalId, ) -> Pin<Box<dyn Future<Output = Result<Vec<Mention>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all comments for a specific task/issue.

Returns empty by default (backends that don’t support per-issue comment listing).

Source

fn acknowledge_issue<'life0, 'life1, 'async_trait>( &'life0 self, _id: &'life1 ExternalId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Acknowledge a newly detected issue (e.g., add a reaction emoji).

Called when an issue is first ingested into the store. Default is a no-op; GitHub backend adds an eyes emoji reaction.

Source

fn acknowledge_mention<'life0, 'life1, 'async_trait>( &'life0 self, _comment_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Acknowledge a mention (comment) by reacting with the eyes emoji.

Called when a new @mention is detected in an issue or PR comment. Default is a no-op; GitHub backend adds an eyes emoji reaction to the comment.

Source

fn post_comment_in_repo<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, _repo: &'life1 str, id: &'life2 ExternalId, body: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Post a comment on an issue in repo, which may differ from this backend’s repo.

The default posts through post_comment, which uses the backend repo

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§