pub struct SearchPath { /* private fields */ }
Implementations§
Source§impl SearchPath
impl SearchPath
pub fn new(paths: Vec<PathBuf>) -> SearchPath
Sourcepub fn from_string(s: &str) -> Result<SearchPath>
pub fn from_string(s: &str) -> Result<SearchPath>
Sets the search path used for import
The string must be a colon separated list of paths.
§Errors
An error will be returned if any of the parsed paths do not exist. If the search path string contains a mix of paths that do and do not exist, none of the paths will be added to the internal search path.
pub fn find(&self, path: &Path) -> Result<PathBuf>
Trait Implementations§
Source§impl Clone for SearchPath
impl Clone for SearchPath
Source§fn clone(&self) -> SearchPath
fn clone(&self) -> SearchPath
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 SearchPath
impl Debug for SearchPath
Source§impl Default for SearchPath
impl Default for SearchPath
Source§fn default() -> SearchPath
fn default() -> SearchPath
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SearchPath
impl RefUnwindSafe for SearchPath
impl Send for SearchPath
impl Sync for SearchPath
impl Unpin for SearchPath
impl UnwindSafe for SearchPath
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