pub struct FileCommentHandler { /* private fields */ }
Expand description
Handler for file comment operations
Implementations§
Source§impl FileCommentHandler
impl FileCommentHandler
Sourcepub fn new(client: FilesClient) -> Self
pub fn new(client: FilesClient) -> Self
Creates a new FileCommentHandler
Sourcepub async fn list(&self, path: &str) -> Result<Vec<FileCommentEntity>>
pub async fn list(&self, path: &str) -> Result<Vec<FileCommentEntity>>
List comments for a file
§Arguments
path
- Path to the file
§Examples
let client = FilesClient::builder().api_key("key").build()?;
let handler = FileCommentHandler::new(client);
let comments = handler.list("/path/to/file.txt").await?;
for comment in comments {
println!("{}", comment.body.unwrap_or_default());
}
Sourcepub async fn add_reaction(
&self,
file_comment_id: i64,
emoji: &str,
) -> Result<FileCommentReactionEntity>
pub async fn add_reaction( &self, file_comment_id: i64, emoji: &str, ) -> Result<FileCommentReactionEntity>
Add a reaction to a file comment
§Arguments
file_comment_id
- ID of the comment to react toemoji
- Emoji for the reaction
Trait Implementations§
Source§impl Clone for FileCommentHandler
impl Clone for FileCommentHandler
Source§fn clone(&self) -> FileCommentHandler
fn clone(&self) -> FileCommentHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FileCommentHandler
impl !RefUnwindSafe for FileCommentHandler
impl Send for FileCommentHandler
impl Sync for FileCommentHandler
impl Unpin for FileCommentHandler
impl !UnwindSafe for FileCommentHandler
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