pub struct ModuleDirectory { /* private fields */ }Available on crate feature
fs only.Expand description
A module directory stored on a file system (e.g., $HOME/.asimov/modules/).
Implementations§
Source§impl ModuleDirectory
impl ModuleDirectory
Sourcepub fn home() -> Result<Self>
pub fn home() -> Result<Self>
Opens the default module directory in the user’s home directory.
On Unix platforms, including macOS and Linux, this is $HOME/.asimov/modules/.
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Opens a module directory from a file system path.
pub async fn iter_enabled(&self) -> Result<ModuleNameIterator>
pub async fn iter_installed(&self) -> Result<ModuleNameIterator>
pub async fn iter_manifests(&self) -> Result<ModuleManifestIterator>
pub fn join(&self, path: impl AsRef<Utf8Path>) -> Utf8PathBuf
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl AsRef<Path> for ModuleDirectory
impl AsRef<Path> for ModuleDirectory
Source§impl AsRef<Utf8Path> for ModuleDirectory
Available on crate feature camino only.
impl AsRef<Utf8Path> for ModuleDirectory
Available on crate feature
camino only.Source§impl AsRef<Utf8PathBuf> for ModuleDirectory
impl AsRef<Utf8PathBuf> for ModuleDirectory
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 ModuleDirectory
impl AsRef<str> for ModuleDirectory
Source§impl Debug for ModuleDirectory
impl Debug for ModuleDirectory
Source§impl Display for ModuleDirectory
impl Display for ModuleDirectory
Source§impl ModuleDirectory for ModuleDirectory
impl ModuleDirectory for ModuleDirectory
Auto Trait Implementations§
impl Freeze for ModuleDirectory
impl RefUnwindSafe for ModuleDirectory
impl Send for ModuleDirectory
impl Sync for ModuleDirectory
impl Unpin for ModuleDirectory
impl UnsafeUnpin for ModuleDirectory
impl UnwindSafe for ModuleDirectory
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.