1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#[cfg(not(target_arch = "wasm32"))]
use std::path::PathBuf;

use crate::quotes::QuoteStyle;

#[derive(Debug, Default, Clone, PartialEq)]
pub struct Config {
    pub heading_anchor: HeadingAnchor,
    pub quote_style: QuoteStyle,
    pub retrieve_spans: bool,

    pub unsafe_config: Option<UnsafeConfig>,
}

#[derive(Debug, Default, Clone, PartialEq)]
pub struct UnsafeConfig {
    #[cfg(not(target_arch = "wasm32"))]
    pub root: Option<PathBuf>,
}

#[derive(Debug, Clone, Copy, PartialEq)]
pub enum HeadingAnchor {
    None,
    Start,
    End,
}

impl Default for HeadingAnchor {
    fn default() -> Self {
        HeadingAnchor::None
    }
}