pub struct FileSystemResolver { /* private fields */ }
Expand description
An implementation of SourceResolver
for the local file system.
This is the common case.
Implementations§
Source§impl FileSystemResolver
impl FileSystemResolver
Sourcepub fn new(project_root: PathBuf) -> Self
pub fn new(project_root: PathBuf) -> Self
Create a new resolver with the provided root directory.
If compiling from a UFO, the root directory is the UFO directory. In other cases, it is likely the directory containing the root feature file. If the path is empty (i.e. “”), the current working directory is assumed.
Trait Implementations§
Source§impl Default for FileSystemResolver
impl Default for FileSystemResolver
Source§fn default() -> FileSystemResolver
fn default() -> FileSystemResolver
Returns the “default value” for a type. Read more
Source§impl SourceResolver for FileSystemResolver
impl SourceResolver for FileSystemResolver
Source§fn get_contents(&self, path: &Path) -> Result<Arc<str>, SourceLoadError>
fn get_contents(&self, path: &Path) -> Result<Arc<str>, SourceLoadError>
Return the contents of the utf-8 encoded file at the provided path.
Source§fn resolve_raw_path(&self, path: &Path, included_from: Option<&Path>) -> PathBuf
fn resolve_raw_path(&self, path: &Path, included_from: Option<&Path>) -> PathBuf
Given a raw path (the
$path
in include($path)
), return the path to load.
The final path may differ based on which file the include statement occurs
in; the path of the including file (if this is not the root source) is
passed as the second argument. Read moreSource§fn canonicalize(&self, path: &Path) -> Result<PathBuf, SourceLoadError>
fn canonicalize(&self, path: &Path) -> Result<PathBuf, SourceLoadError>
If necessary, canonicalize this path. Read more
Auto Trait Implementations§
impl Freeze for FileSystemResolver
impl RefUnwindSafe for FileSystemResolver
impl Send for FileSystemResolver
impl Sync for FileSystemResolver
impl Unpin for FileSystemResolver
impl UnwindSafe for FileSystemResolver
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
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T
, using the provided data to resolve any offsets.