pub struct AssembleHome(/* private fields */);
Expand description
Provide access to the Home workspace of the assemble application. This value
is determined by the environment variable ASSEMBLE_HOME
. If this variable is not set,
$HOME/.assemble
is used.
Methods from Deref<Target = Workspace>§
Sourcepub fn resolve_path(&self, path: &Path) -> PathBuf
pub fn resolve_path(&self, path: &Path) -> PathBuf
Resolves a path relative to this workspace.
‘/’ is treated as the workspace root.
§Panic
- Will panic if
..
present at root. - Will also panic if prefix is present (only on windows)
pub fn is_protected(&self, path: &Path) -> bool
pub fn create_file(&self, path: &Path) -> Result<RegularFile, WorkspaceError>
pub fn as_dir(&self) -> Dir<'_>
pub fn join<P>(&self, path: P) -> PathBuf
Trait Implementations§
Source§impl Debug for AssembleHome
impl Debug for AssembleHome
Source§impl Deref for AssembleHome
impl Deref for AssembleHome
Source§impl DerefMut for AssembleHome
impl DerefMut for AssembleHome
Auto Trait Implementations§
impl Freeze for AssembleHome
impl RefUnwindSafe for AssembleHome
impl Send for AssembleHome
impl Sync for AssembleHome
impl Unpin for AssembleHome
impl UnwindSafe for AssembleHome
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> InstanceOf for T
impl<T> InstanceOf for T
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 more