pub enum FileLocation {
FirstSome(Option<PathBuf>),
}Variants§
Implementations§
Source§impl FileLocation
impl FileLocation
pub fn first_some_path() -> Self
pub fn from_file(self, file_path: Option<PathBuf>) -> Self
pub fn from_file_exists(self, file_path: Option<PathBuf>) -> Self
pub fn from_env(self, env_var: impl AsRef<OsStr>) -> Self
pub fn from_env_exists(self, env_var: impl AsRef<OsStr>) -> Self
pub fn from_home(self, relative_path: impl AsRef<Path>) -> Self
pub fn from_home_exists(self, relative_path: impl AsRef<Path>) -> Self
pub fn from_cwd(self, relative_path: impl AsRef<Path>) -> Self
pub fn from_cwd_exists(self, relative_path: impl AsRef<Path>) -> Self
pub fn from_cwd_and_parents_exists( self, relative_path: impl AsRef<Path>, ) -> Self
Trait Implementations§
Source§impl Location for FileLocation
impl Location for FileLocation
Auto Trait Implementations§
impl Freeze for FileLocation
impl RefUnwindSafe for FileLocation
impl Send for FileLocation
impl Sync for FileLocation
impl Unpin for FileLocation
impl UnwindSafe for FileLocation
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more