pub struct DataDir { /* private fields */ }Expand description
Configures where the Mapper looks for DataBundle files.
Bundle files follow the naming convention edifact-data-{FV}.bin
(e.g., edifact-data-FV2504.bin).
§Resolution order for DataDir::auto
$EDIFACT_DATA_DIRenvironment variable (if set)$HOME/.edifact/data(Unix) or%USERPROFILE%\.edifact\data(Windows)./data(current working directory fallback)
Implementations§
Source§impl DataDir
impl DataDir
Sourcepub fn auto() -> Self
pub fn auto() -> Self
Auto-detect the data directory from the environment.
See struct-level docs for resolution order.
Sourcepub fn eager(self, fvs: &[&str]) -> Self
pub fn eager(self, fvs: &[&str]) -> Self
Mark format versions to be eagerly loaded when the Mapper
is created (rather than lazy-loaded on first access).
Sourcepub fn bundle_path(&self, fv: &str) -> PathBuf
pub fn bundle_path(&self, fv: &str) -> PathBuf
Path to the bundle file for a specific format version.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataDir
impl RefUnwindSafe for DataDir
impl Send for DataDir
impl Sync for DataDir
impl Unpin for DataDir
impl UnsafeUnpin for DataDir
impl UnwindSafe for DataDir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more