pub struct FsResolver { /* private fields */ }Expand description
Loads layers from the local filesystem. Requires the fs feature.
An import uri is a file path. A relative path resolves against the
directory of the importing layer, and the main layer’s against the current
directory. Keys are canonical paths where the file exists, so a layer
reached by different relative paths loads once.
URIs with a scheme (scheme://...) are rejected with
FsError::UnsupportedUri unless map_prefix maps
them to a local directory, for example an offline mirror of ifcx.dev:
use openbim_ifcx::layers::{FsResolver, LayerStackBuilder};
let resolver = FsResolver::new().map_prefix("https://ifcx.dev/", "mirror/ifcx.dev");
let stack = LayerStackBuilder::new(resolver).build("model.ifcx")?;Implementations§
Source§impl FsResolver
impl FsResolver
Trait Implementations§
Source§impl Clone for FsResolver
impl Clone for FsResolver
Source§fn clone(&self) -> FsResolver
fn clone(&self) -> FsResolver
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FsResolver
impl Debug for FsResolver
Source§impl Default for FsResolver
impl Default for FsResolver
Source§fn default() -> FsResolver
fn default() -> FsResolver
Returns the “default value” for a type. Read more
Source§impl LayerResolver for FsResolver
impl LayerResolver for FsResolver
Auto Trait Implementations§
impl Freeze for FsResolver
impl RefUnwindSafe for FsResolver
impl Send for FsResolver
impl Sync for FsResolver
impl Unpin for FsResolver
impl UnwindSafe for FsResolver
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