pub struct Content {
pub path: PathBuf,
pub meta: ContentMeta,
pub content_file: PathBuf,
pub source_format: ContentFormat,
pub slides_file: Option<PathBuf>,
pub assets: Vec<PathBuf>,
}Expand description
Represents a single content post
Fields§
§path: PathBufPath to the post directory
meta: ContentMetaParsed metadata from meta.toml
content_file: PathBufPath to the main content file (content.typ or content.md)
source_format: ContentFormatSource format of the content
slides_file: Option<PathBuf>Optional path to slides file (slides.typ)
assets: Vec<PathBuf>List of asset files
Implementations§
Source§impl Content
impl Content
Sourcepub fn discover_all(content_dir: &Path) -> Result<DiscoverResult>
pub fn discover_all(content_dir: &Path) -> Result<DiscoverResult>
Discover all content posts in a directory.
Returns a DiscoverResult containing both successfully loaded posts
and any errors encountered. The caller can decide how to handle errors
(e.g., log them in verbose mode, display warnings).
Sourcepub fn platform_config(&self, platform: &str) -> Option<&PostPlatformConfig>
pub fn platform_config(&self, platform: &str) -> Option<&PostPlatformConfig>
Get platform-specific config, if any
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
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