thunderstore_api/models/v2/
render_markdown.rs1#[cfg(feature = "ts-rs")]
8use ts_rs::TS;
9
10#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
11#[cfg_attr(feature = "ts-rs", derive(TS))]
12#[cfg_attr(feature = "ts-rs", ts(export))]
13pub struct RenderMarkdownParams {
14 pub markdown: String,
15}
16
17impl RenderMarkdownParams {
18 #[must_use]
19 pub fn new(markdown: String) -> RenderMarkdownParams {
20 RenderMarkdownParams { markdown }
21 }
22}
23
24#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
25#[cfg_attr(feature = "ts-rs", derive(TS))]
26#[cfg_attr(feature = "ts-rs", ts(export))]
27pub struct RenderMarkdownResponse {
28 pub html: String,
29}
30
31impl RenderMarkdownResponse {
32 #[must_use]
33 pub fn new(html: String) -> RenderMarkdownResponse {
34 RenderMarkdownResponse { html }
35 }
36}