pub struct ConfigSearchPaths {
pub searched: Vec<PathBuf>,
pub found: Option<PathBuf>,
}Expand description
Config search paths for “file not found” errors.
Fields§
§searched: Vec<PathBuf>Paths that were searched.
found: Option<PathBuf>First path found (if any).
Implementations§
Source§impl ConfigSearchPaths
impl ConfigSearchPaths
Sourcepub fn new(paths: impl IntoIterator<Item = impl Into<PathBuf>>) -> Self
pub fn new(paths: impl IntoIterator<Item = impl Into<PathBuf>>) -> Self
Create with a list of searched paths.
Sourcepub fn with_found(self, path: impl Into<PathBuf>) -> Self
pub fn with_found(self, path: impl Into<PathBuf>) -> Self
Mark one of the paths as found.
Trait Implementations§
Source§impl Clone for ConfigSearchPaths
impl Clone for ConfigSearchPaths
Source§fn clone(&self) -> ConfigSearchPaths
fn clone(&self) -> ConfigSearchPaths
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConfigSearchPaths
impl Debug for ConfigSearchPaths
Source§impl<'de> Deserialize<'de> for ConfigSearchPaths
impl<'de> Deserialize<'de> for ConfigSearchPaths
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ConfigSearchPaths
impl RefUnwindSafe for ConfigSearchPaths
impl Send for ConfigSearchPaths
impl Sync for ConfigSearchPaths
impl Unpin for ConfigSearchPaths
impl UnsafeUnpin for ConfigSearchPaths
impl UnwindSafe for ConfigSearchPaths
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