Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion cot-core/src/html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ use std::fmt::Write;

use askama::filters::Escaper;
use derive_more::{Deref, Display, From};
use serde::{Deserialize, Serialize};

/// A type that represents HTML content as a string.
///
Expand All @@ -65,7 +66,22 @@ use derive_more::{Deref, Display, From};
/// let html = Html::new("<div>Hello</div>");
/// assert_eq!(html.as_str(), "<div>Hello</div>");
/// ```
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default, Deref, From, Display)]
#[derive(
Debug,
Clone,
PartialEq,
Eq,
PartialOrd,
Ord,
Hash,
Default,
Deref,
From,
Display,
Serialize,
Deserialize,
)]
#[serde(transparent)]
pub struct Html(pub String);

impl Html {
Expand Down
Loading