pub struct CommentsService<'a> { /* private fields */ }Expand description
The Comments operations.
Implementations§
Source§impl<'a> CommentsService<'a>
impl<'a> CommentsService<'a>
Sourcepub async fn create(
&self,
card_number: i32,
body: &CreateCommentRequestContent,
) -> Result<Comment, Error>
pub async fn create( &self, card_number: i32, body: &CreateCommentRequestContent, ) -> Result<Comment, Error>
CreateComment — POST /{accountId}/cards/{cardNumber}/comments.json.
Sent once and never resent.
Sourcepub async fn delete(
&self,
card_number: i32,
comment_id: &str,
) -> Result<(), Error>
pub async fn delete( &self, card_number: i32, comment_id: &str, ) -> Result<(), Error>
DeleteComment — DELETE /{accountId}/cards/{cardNumber}/comments/{commentId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn get(
&self,
card_number: i32,
comment_id: &str,
) -> Result<Comment, Error>
pub async fn get( &self, card_number: i32, comment_id: &str, ) -> Result<Comment, Error>
GetComment — GET /{accountId}/cards/{cardNumber}/comments/{commentId}.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Sourcepub async fn list(&self, card_number: i32) -> Result<Page<Vec<Comment>>, Error>
pub async fn list(&self, card_number: i32) -> Result<Page<Vec<Comment>>, Error>
ListComments — GET /{accountId}/cards/{cardNumber}/comments.json.
Sent up to 3 times, backing off from 1000 ms, when the answer is 429, 500 or 503.
Paginated: the answer is a page with page as its cursor, and the next one is read with next_page.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CommentsService<'a>
impl<'a> !UnwindSafe for CommentsService<'a>
impl<'a> Freeze for CommentsService<'a>
impl<'a> Send for CommentsService<'a>
impl<'a> Sync for CommentsService<'a>
impl<'a> Unpin for CommentsService<'a>
impl<'a> UnsafeUnpin for CommentsService<'a>
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