pub struct ContentItem {
pub content_type: ContentType,
pub text: String,
pub attributes: Vec<(String, String)>,
pub children: Vec<ContentItem>,
}Expand description
解析后的内容项
Fields§
§content_type: ContentType内容类型
text: String文本内容
attributes: Vec<(String, String)>属性 (例如图片的 src, 链接的 href 等)
children: Vec<ContentItem>子内容
Implementations§
Source§impl ContentItem
impl ContentItem
Trait Implementations§
Source§impl Clone for ContentItem
impl Clone for ContentItem
Source§fn clone(&self) -> ContentItem
fn clone(&self) -> ContentItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContentItem
impl RefUnwindSafe for ContentItem
impl Send for ContentItem
impl Sync for ContentItem
impl Unpin for ContentItem
impl UnwindSafe for ContentItem
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