pub struct Dir<'w> { /* private fields */ }
Trait Implementations§
Source§impl<'w> WorkspaceDirectory for Dir<'w>
impl<'w> WorkspaceDirectory for Dir<'w>
Source§fn my_workspace(&self) -> &Workspace
fn my_workspace(&self) -> &Workspace
Gets the workspace this directory is part of.
Source§fn file(&self, file: &str) -> Result<RegularFile, WorkspaceError>
fn file(&self, file: &str) -> Result<RegularFile, WorkspaceError>
Creates a file within this directory Read more
Source§fn dir(&self, name: &str) -> Result<Dir<'_>, WorkspaceError>
fn dir(&self, name: &str) -> Result<Dir<'_>, WorkspaceError>
Creates a directory within this directory Read more
Source§fn protected_dir(&self, name: &str) -> Result<Dir<'_>, WorkspaceError>
fn protected_dir(&self, name: &str) -> Result<Dir<'_>, WorkspaceError>
Creates a protected directory in this directory Read more
Source§fn protected_file(&self, name: &str) -> Result<RegularFile, WorkspaceError>
fn protected_file(&self, name: &str) -> Result<RegularFile, WorkspaceError>
Creates a protected file in this directory Read more
Source§fn new_workspace<P>(&self, path: P) -> Workspace
fn new_workspace<P>(&self, path: P) -> Workspace
Create a workspace that’s relative to this workspace. Shares proteced paths with parent workspace
and other created workspaces. Read more
Source§fn absolute_path(&self) -> PathBuf
fn absolute_path(&self) -> PathBuf
Gets the absolute path of this directory
Source§impl WorkspaceEntry for Dir<'_>
impl WorkspaceEntry for Dir<'_>
fn into_absolute_path(self) -> Result<PathBuf, WorkspaceError>
Auto Trait Implementations§
impl<'w> Freeze for Dir<'w>
impl<'w> RefUnwindSafe for Dir<'w>
impl<'w> Send for Dir<'w>
impl<'w> Sync for Dir<'w>
impl<'w> Unpin for Dir<'w>
impl<'w> UnwindSafe for Dir<'w>
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