diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-09-29 00:10:21 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-09-29 00:10:21 +0200 |
| commit | a0065eef86685223a1bbb2f586036f7df5b36349 (patch) | |
| tree | ad28ba51ba16df7123f446c7117220449b2851dc /src/loading | |
| parent | 2760e111454bdfdaa049879edf7ccfdacc41dd3c (diff) | |
Make file system loader serializable
Diffstat (limited to 'src/loading')
| -rw-r--r-- | src/loading/fs.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/loading/fs.rs b/src/loading/fs.rs index d03df3ba..fc49d6b5 100644 --- a/src/loading/fs.rs +++ b/src/loading/fs.rs @@ -5,6 +5,7 @@ use std::rc::Rc; use memmap2::Mmap; use same_file::Handle; +use serde::{Deserialize, Serialize}; use walkdir::WalkDir; use super::{FileHash, Loader}; @@ -13,7 +14,8 @@ use crate::font::FaceInfo; /// Loads fonts and files from the local file system. /// /// _This is only available when the `fs` feature is enabled._ -#[derive(Default)] +#[derive(Default, Serialize, Deserialize)] +#[serde(transparent)] pub struct FsLoader { faces: Vec<FaceInfo>, } |
