#[non_exhaustive]pub struct Paragraph {
pub metadata: BlockMetadata,
pub title: Title,
pub content: Vec<InlineNode>,
pub location: Location,
}Expand description
A Paragraph represents a paragraph in a document.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.metadata: BlockMetadata§title: Title§content: Vec<InlineNode>§location: LocationImplementations§
Source§impl Paragraph
impl Paragraph
Sourcepub fn new(content: Vec<InlineNode>, location: Location) -> Self
pub fn new(content: Vec<InlineNode>, location: Location) -> Self
Create a new paragraph with the given content and location.
Sourcepub fn with_metadata(self, metadata: BlockMetadata) -> Self
pub fn with_metadata(self, metadata: BlockMetadata) -> Self
Set the metadata.
Sourcepub fn with_title(self, title: Title) -> Self
pub fn with_title(self, title: Title) -> Self
Set the title.
Trait Implementations§
impl StructuralPartialEq for Paragraph
Auto Trait Implementations§
impl Freeze for Paragraph
impl RefUnwindSafe for Paragraph
impl Send for Paragraph
impl Sync for Paragraph
impl Unpin for Paragraph
impl UnwindSafe for Paragraph
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