pub struct PostsCommentsResource<'a> { /* private fields */ }Expand description
client.posts().comments()
Implementations§
Source§impl<'a> PostsCommentsResource<'a>
impl<'a> PostsCommentsResource<'a>
pub fn reactions(&self) -> PostsCommentsReactionsResource<'a>
Sourcepub fn create(
&self,
post_id: impl Display,
body: &PostCommentCreate,
) -> Result<PostComment>
pub fn create( &self, post_id: impl Display, body: &PostCommentCreate, ) -> Result<PostComment>
POST /posts/{postId}/comments
Create a new comment for a post.
§Example
let body = models::PostCommentCreate {
content: "Hallo zusammen".into(),
post_id: 42,
..Default::default()
};
let result = client.posts().comments().create(42, &body)?;
println!("{}", result.id);Trait Implementations§
Source§impl<'a> Clone for PostsCommentsResource<'a>
impl<'a> Clone for PostsCommentsResource<'a>
impl<'a> Copy for PostsCommentsResource<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PostsCommentsResource<'a>
impl<'a> !UnwindSafe for PostsCommentsResource<'a>
impl<'a> Freeze for PostsCommentsResource<'a>
impl<'a> Send for PostsCommentsResource<'a>
impl<'a> Sync for PostsCommentsResource<'a>
impl<'a> Unpin for PostsCommentsResource<'a>
impl<'a> UnsafeUnpin for PostsCommentsResource<'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