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:
parent
fe2d62a5ee
commit
ba16ce40cc
@ -13,7 +13,7 @@ use tracing::debug;
|
|||||||
///
|
///
|
||||||
/// To get the serialized HTML, use its `Display` implementation.
|
/// To get the serialized HTML, use its `Display` implementation.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Fragment {
|
pub(crate) struct Fragment {
|
||||||
pub nodes: Vec<Node>,
|
pub nodes: Vec<Node>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ impl fmt::Display for Fragment {
|
|||||||
|
|
||||||
/// An HTML node.
|
/// An HTML node.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Node {
|
pub(crate) struct Node {
|
||||||
pub parent: Option<usize>,
|
pub parent: Option<usize>,
|
||||||
pub prev_sibling: Option<usize>,
|
pub prev_sibling: Option<usize>,
|
||||||
pub next_sibling: Option<usize>,
|
pub next_sibling: Option<usize>,
|
||||||
@ -353,7 +353,7 @@ impl Node {
|
|||||||
|
|
||||||
/// The data of a `Node`.
|
/// The data of a `Node`.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum NodeData {
|
pub(crate) enum NodeData {
|
||||||
/// The root node of the `Fragment`.
|
/// The root node of the `Fragment`.
|
||||||
Document,
|
Document,
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ pub enum NodeData {
|
|||||||
|
|
||||||
/// The data of an HTML element.
|
/// The data of an HTML element.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct ElementData {
|
pub(crate) struct ElementData {
|
||||||
/// The qualified name of the element.
|
/// The qualified name of the element.
|
||||||
pub name: QualName,
|
pub name: QualName,
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ use super::{
|
|||||||
///
|
///
|
||||||
/// [HTML tags and attributes]: https://spec.matrix.org/latest/client-server-api/#mroommessage-msgtypes
|
/// [HTML tags and attributes]: https://spec.matrix.org/latest/client-server-api/#mroommessage-msgtypes
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct HtmlSanitizer {
|
pub(crate) struct HtmlSanitizer {
|
||||||
/// The mode of the HTML sanitizer.
|
/// The mode of the HTML sanitizer.
|
||||||
mode: HtmlSanitizerMode,
|
mode: HtmlSanitizerMode,
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user