Make html sanitization types pub(crate)

Makes it more obvious when reading that they're not part of the public API.
This commit is contained in:
Jonas Platte 2023-06-14 12:20:45 +02:00
parent fe2d62a5ee
commit ba16ce40cc
No known key found for this signature in database
GPG Key ID: AAA7A61F696C3E0C
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@ use tracing::debug;
///
/// To get the serialized HTML, use its `Display` implementation.
#[derive(Debug)]
pub struct Fragment {
pub(crate) struct Fragment {
pub nodes: Vec<Node>,
}
@ -265,7 +265,7 @@ impl fmt::Display for Fragment {
/// An HTML node.
#[derive(Debug)]
pub struct Node {
pub(crate) struct Node {
pub parent: Option<usize>,
pub prev_sibling: Option<usize>,
pub next_sibling: Option<usize>,
@ -353,7 +353,7 @@ impl Node {
/// The data of a `Node`.
#[derive(Debug)]
pub enum NodeData {
pub(crate) enum NodeData {
/// The root node of the `Fragment`.
Document,
@ -369,7 +369,7 @@ pub enum NodeData {
/// The data of an HTML element.
#[derive(Debug)]
pub struct ElementData {
pub(crate) struct ElementData {
/// The qualified name of the element.
pub name: QualName,

View File

@ -11,7 +11,7 @@ use super::{
///
/// [HTML tags and attributes]: https://spec.matrix.org/latest/client-server-api/#mroommessage-msgtypes
#[derive(Debug, Clone)]
pub struct HtmlSanitizer {
pub(crate) struct HtmlSanitizer {
/// The mode of the HTML sanitizer.
mode: HtmlSanitizerMode,