pub struct Comments { /* private fields */ }
Implementations§
Source§impl Comments
impl Comments
Sourcepub fn create(&self, issue: i64, body: impl ToString) -> CreateCommentBuilder
pub fn create(&self, issue: i64, body: impl ToString) -> CreateCommentBuilder
Create a comment on an issue.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let comment = client
.issues("owner", "repo")
.comments()
.create(1, "This is a comment")
.send(&client)
.await
.unwrap();
Sourcepub fn list(&self, issue: i64) -> ListCommentsBuilder
pub fn list(&self, issue: i64) -> ListCommentsBuilder
List an issue’s comments.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let comments = client
.issues("owner", "repo")
.comments()
.list(1)
.send(&client)
.await
.unwrap();
Sourcepub fn list_all(&self) -> ListAllCommentsBuilder
pub fn list_all(&self) -> ListAllCommentsBuilder
List all comments in a repository. This will return a list of all comments in the repository.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let comments = client
.issues("owner", "repo")
.comments()
.list_all()
.send(&client)
.await
.unwrap();
Sourcepub fn edit(&self, comment: i64, body: impl ToString) -> EditCommentBuilder
pub fn edit(&self, comment: i64, body: impl ToString) -> EditCommentBuilder
Edit a comment on an issue.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
let comment = client
.issues("owner", "repo")
.comments()
.edit(1, "This is an edited comment")
.send(&client)
.await
.unwrap();
Sourcepub fn delete(&self, comment: i64) -> DeleteCommentBuilder
pub fn delete(&self, comment: i64) -> DeleteCommentBuilder
Delete a comment on an issue.
§Example
let client = Client::new(
"https://gitea.example.com",
Auth::Token("your-token")
);
client
.issues("owner", "repo")
.comments()
.delete(1)
.send(&client)
.await
.unwrap();
Auto Trait Implementations§
impl Freeze for Comments
impl RefUnwindSafe for Comments
impl Send for Comments
impl Sync for Comments
impl Unpin for Comments
impl UnwindSafe for Comments
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