pub struct ProgramDirectory { /* private fields */ }Available on crate feature
fs only.Expand description
A program directory stored on a file system (e.g., $HOME/.asimov/libexec/).
Implementations§
Source§impl ProgramDirectory
impl ProgramDirectory
Sourcepub fn home() -> Result<Self>
pub fn home() -> Result<Self>
Opens the default program directory in the user’s home directory.
On Unix platforms, including macOS and Linux, this is $HOME/.asimov/libexec/.
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Opens a program directory from a file system path.
pub fn join(&self, path: impl AsRef<Utf8Path>) -> Utf8PathBuf
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl AsRef<Path> for ProgramDirectory
impl AsRef<Path> for ProgramDirectory
Source§impl AsRef<Utf8Path> for ProgramDirectory
Available on crate feature camino only.
impl AsRef<Utf8Path> for ProgramDirectory
Available on crate feature
camino only.Source§impl AsRef<Utf8PathBuf> for ProgramDirectory
impl AsRef<Utf8PathBuf> for ProgramDirectory
Source§fn as_ref(&self) -> &Utf8PathBuf
fn as_ref(&self) -> &Utf8PathBuf
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<str> for ProgramDirectory
impl AsRef<str> for ProgramDirectory
Source§impl Debug for ProgramDirectory
impl Debug for ProgramDirectory
Source§impl Display for ProgramDirectory
impl Display for ProgramDirectory
impl ProgramDirectory for ProgramDirectory
Auto Trait Implementations§
impl Freeze for ProgramDirectory
impl RefUnwindSafe for ProgramDirectory
impl Send for ProgramDirectory
impl Sync for ProgramDirectory
impl Unpin for ProgramDirectory
impl UnsafeUnpin for ProgramDirectory
impl UnwindSafe for ProgramDirectory
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.