1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
use ;
use TS;
use crateFileMetaId;
/// A content segment within a post that can be either text or a file reference
///
/// - Used within [`Post`](crate::post::Post) content arrays
/// - References [`FileMeta`](crate::file_meta::FileMeta) through FileMetaId
///
/// # Variants:
/// - Text: Contains markdown-formatted text content
/// - File: References external file content via FileMetaId
///
/// # Processing:
/// - Text content should be rendered as markdown
/// - File content requires metadata lookup and appropriate handling
///
/// # Examples
/// ```rust
/// use post_archiver::{Content, FileMetaId};
///
/// // Text content with markdown
/// let text = Content::Text("# Heading\n\nSome **bold** text".to_string());
///
/// // File reference
/// let image = Content::File(FileMetaId::new(1));
///
/// // Mixed content post
/// let contents = vec![
/// Content::Text("Introduction:".to_string()),
/// Content::File(FileMetaId::new(1)),
/// Content::Text("*Caption for the above image*".to_string())
/// ];
/// ```