pub struct ParsedContent {
pub content_type: ContentType,
pub raw_content: String,
pub structured_data: Option<Value>,
pub frontmatter: Option<String>,
pub source_path: String,
}Expand description
Parsed content from a file.
Fields§
§content_type: ContentTypeThe detected content type.
raw_content: StringThe raw file content.
structured_data: Option<Value>Parsed structured data (if applicable).
frontmatter: Option<String>Extracted frontmatter (for markdown files).
source_path: StringSource file path.
Implementations§
Source§impl ParsedContent
impl ParsedContent
Sourcepub fn new(
content_type: ContentType,
raw_content: String,
source_path: String,
) -> Self
pub fn new( content_type: ContentType, raw_content: String, source_path: String, ) -> Self
Create a new ParsedContent with minimal data.
Sourcepub fn with_structured_data(self, data: Value) -> Self
pub fn with_structured_data(self, data: Value) -> Self
Add structured data to the parsed content.
Sourcepub fn with_frontmatter(self, frontmatter: String) -> Self
pub fn with_frontmatter(self, frontmatter: String) -> Self
Add frontmatter to the parsed content.
Trait Implementations§
Source§impl Clone for ParsedContent
impl Clone for ParsedContent
Source§fn clone(&self) -> ParsedContent
fn clone(&self) -> ParsedContent
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 ParsedContent
impl RefUnwindSafe for ParsedContent
impl Send for ParsedContent
impl Sync for ParsedContent
impl Unpin for ParsedContent
impl UnwindSafe for ParsedContent
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