pub struct DiscussionThreadManager { /* private fields */ }Expand description
Discussion thread manager.
Implementations§
Source§impl DiscussionThreadManager
impl DiscussionThreadManager
Sourcepub fn create_thread(
&mut self,
project_id: String,
title: String,
context: String,
created_by: String,
tags: Vec<String>,
) -> DiscussionThread
pub fn create_thread( &mut self, project_id: String, title: String, context: String, created_by: String, tags: Vec<String>, ) -> DiscussionThread
Creates a new discussion thread.
Sourcepub fn add_comment(
&mut self,
thread_id: &str,
author_id: String,
text: String,
parent_id: Option<String>,
) -> Option<ThreadComment>
pub fn add_comment( &mut self, thread_id: &str, author_id: String, text: String, parent_id: Option<String>, ) -> Option<ThreadComment>
Adds a comment to a thread.
Sourcepub fn upvote_comment(
&mut self,
thread_id: &str,
comment_id: &str,
user_id: String,
) -> Option<()>
pub fn upvote_comment( &mut self, thread_id: &str, comment_id: &str, user_id: String, ) -> Option<()>
Upvotes a comment.
Sourcepub fn resolve_thread(
&mut self,
thread_id: &str,
resolved_by: String,
) -> Option<()>
pub fn resolve_thread( &mut self, thread_id: &str, resolved_by: String, ) -> Option<()>
Resolves a thread.
Sourcepub fn get_thread(&self, thread_id: &str) -> Option<&DiscussionThread>
pub fn get_thread(&self, thread_id: &str) -> Option<&DiscussionThread>
Gets a thread.
Sourcepub fn list_threads(&self, project_id: &str) -> Vec<&DiscussionThread>
pub fn list_threads(&self, project_id: &str) -> Vec<&DiscussionThread>
Lists all threads for a project.
Trait Implementations§
Source§impl Debug for DiscussionThreadManager
impl Debug for DiscussionThreadManager
Auto Trait Implementations§
impl Freeze for DiscussionThreadManager
impl RefUnwindSafe for DiscussionThreadManager
impl Send for DiscussionThreadManager
impl Sync for DiscussionThreadManager
impl Unpin for DiscussionThreadManager
impl UnwindSafe for DiscussionThreadManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more