pub struct Comment {
pub comment_id: String,
pub user_id: String,
pub create_time: i64,
pub update_time: i64,
pub is_solved: bool,
pub solved_time: Option<i64>,
pub solver_user_id: Option<String>,
pub has_more: bool,
pub page_token: Option<String>,
pub reply_list: Option<Vec<Reply>>,
pub is_whole: Option<bool>,
pub quote: Option<String>,
}Expand description
评论信息
Fields§
§comment_id: String评论ID
user_id: String用户ID
create_time: i64创建时间(毫秒时间戳)
update_time: i64更新时间(毫秒时间戳)
is_solved: bool是否解决
solved_time: Option<i64>已解决时间(毫秒时间戳)
solver_user_id: Option<String>解决者用户ID
has_more: bool是否有更多回复
page_token: Option<String>分页标记
reply_list: Option<Vec<Reply>>回复列表
is_whole: Option<bool>是否是全文评论
quote: Option<String>引用内容
Implementations§
Source§impl Comment
impl Comment
Sourcepub fn get_text_content(&self) -> String
pub fn get_text_content(&self) -> String
获取评论的文本内容
Sourcepub fn has_replies(&self) -> bool
pub fn has_replies(&self) -> bool
是否有回复
Sourcepub fn reply_count(&self) -> usize
pub fn reply_count(&self) -> usize
获取回复数量
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