pub struct Comment {
pub object: String,
pub id: String,
pub parent: Option<Parent>,
pub discussion_id: Option<String>,
pub created_time: OffsetDateTime,
pub last_edited_time: OffsetDateTime,
pub created_by: Option<User>,
pub rich_text: Vec<RichText>,
}
Expand description
When creating a new comment, either the parent.page_id or discussion_id parameter must be provided — not both.
Fields§
§object: String
Always "comment"
,
id: String
§parent: Option<Parent>
§discussion_id: Option<String>
§created_time: OffsetDateTime
§last_edited_time: OffsetDateTime
§created_by: Option<User>
§rich_text: Vec<RichText>
Implementations§
Source§impl Comment
impl Comment
Sourcepub fn discussion_id<T>(self, discussion_id: T) -> Self
pub fn discussion_id<T>(self, discussion_id: T) -> Self
Set the value of the discussion_id
field.
Sourcepub fn created_time(self, created_time: OffsetDateTime) -> Self
pub fn created_time(self, created_time: OffsetDateTime) -> Self
Set the value of the created_time
field.
Sourcepub fn last_edited_time(self, last_edited_time: OffsetDateTime) -> Self
pub fn last_edited_time(self, last_edited_time: OffsetDateTime) -> Self
Set the value of the last_edited_time
field.
Sourcepub fn created_by(self, created_by: User) -> Self
pub fn created_by(self, created_by: User) -> Self
Set the value of the created_by
field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Comment
impl<'de> Deserialize<'de> for Comment
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnwindSafe for Comment
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