pub struct ContentBuilder { /* private fields */ }Expand description
内容构建器,用于构建复杂的评论内容
Implementations§
Source§impl ContentBuilder
impl ContentBuilder
pub fn new() -> Self
Sourcepub fn add_styled_text(self, text: impl ToString, style: Value) -> Self
pub fn add_styled_text(self, text: impl ToString, style: Value) -> Self
添加带样式的文本
Sourcepub fn add_italic(self, text: impl ToString) -> Self
pub fn add_italic(self, text: impl ToString) -> Self
添加斜体文本
Sourcepub fn add_underline(self, text: impl ToString) -> Self
pub fn add_underline(self, text: impl ToString) -> Self
添加下划线文本
Sourcepub fn build(self) -> ReplyContent
pub fn build(self) -> ReplyContent
构建回复内容
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ContentBuilder
impl RefUnwindSafe for ContentBuilder
impl Send for ContentBuilder
impl Sync for ContentBuilder
impl Unpin for ContentBuilder
impl UnwindSafe for ContentBuilder
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