1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use getset::{Getters, MutGetters};
use std::{borrow::Cow, path::PathBuf};

#[cfg(not(feature = "highlight"))]
use std::marker::PhantomData;

mod from;

#[derive(Getters, MutGetters, Debug, Default)]
#[getset(
    get = "pub with_prefix",
    get_mut = "pub with_prefix",
    // set = "pub with_prefix"
)]
pub struct Generator<'ver, 'p, 'res> {
    l10n_path: PathBuf,
    version: Cow<'ver, str>,
    #[cfg(feature = "highlight")]
    highlight: Option<crate::highlight::HighLight<'res, 'p>>,
    #[cfg(not(feature = "highlight"))]
    highlight: Option<PhantomData<(&'res String, &'p PathBuf)>>,
}