use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct DjotImportOptions {
pub alignment: bool,
pub line_height: bool,
pub direction: bool,
pub non_breakable_lines: bool,
pub background_color: bool,
}
impl DjotImportOptions {
pub const fn all() -> Self {
Self {
alignment: true,
line_height: true,
direction: true,
non_breakable_lines: true,
background_color: true,
}
}
pub const fn none() -> Self {
Self {
alignment: false,
line_height: false,
direction: false,
non_breakable_lines: false,
background_color: false,
}
}
}
impl Default for DjotImportOptions {
fn default() -> Self {
Self::all()
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct DjotExportOptions {
pub alignment: bool,
pub line_height: bool,
pub direction: bool,
pub non_breakable_lines: bool,
pub background_color: bool,
}
impl DjotExportOptions {
pub const fn all() -> Self {
Self {
alignment: true,
line_height: true,
direction: true,
non_breakable_lines: true,
background_color: true,
}
}
pub const fn none() -> Self {
Self {
alignment: false,
line_height: false,
direction: false,
non_breakable_lines: false,
background_color: false,
}
}
}
impl Default for DjotExportOptions {
fn default() -> Self {
Self::all()
}
}