diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-06-08 07:59:03 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-06-08 08:06:11 +0300 |
commit | 163ec445c2474698ba073333c11140be6bb4fddc (patch) | |
tree | be240f8bdcd829e9ac1b22049d3f645455f0a636 | |
parent | c337d1d59526fb8dfe569d49bfd355c64bbf07eb (diff) | |
download | subplot-163ec445c2474698ba073333c11140be6bb4fddc.tar.gz |
refactor: export DataFile so programs can use embedded files
This will be used soon by a program to extract data files from
subplots, but I expect it to be more generally useful in the future.
-rw-r--r-- | src/ast.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -980,10 +980,12 @@ impl DataFile { DataFile { filename, contents } } + /// Return name of embedded file. pub fn filename(&self) -> &str { &self.filename } + /// Return contents of embedded file. pub fn contents(&self) -> &str { &self.contents } @@ -14,6 +14,7 @@ pub use graphmarkup::{DotMarkup, GraphMarkup, PlantumlMarkup}; mod ast; pub use ast::get_basedir_from; +pub use ast::DataFile; pub use ast::Document; mod scenarios; |