#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub struct SerialiseOptions {
pub indent: Option<Indent>,
pub empty_elements: EmptyElement,
pub newline: Newline,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Indent {
Spaces(u8),
Tab,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum EmptyElement {
#[default]
SelfClosing,
SelfClosingSpaced,
Expanded,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum Newline {
#[default]
Lf,
CrLf,
}
impl Newline {
pub(super) const fn as_str(self) -> &'static str {
match self {
Self::Lf => "\n",
Self::CrLf => "\r\n",
}
}
}