pub struct WorkspaceIndex {
root: PathBuf,
files: Arc<BTreeMap<PathBuf, Option<Box<str>>>>,
directories: Arc<BTreeSet<PathBuf>>,
metadata: Arc<BTreeMap<PathBuf, Metadata>>,
dependency_graph: Arc<str>,
tidy_rules: Option<Value>,
}Fields§
§root: PathBuf§files: Arc<BTreeMap<PathBuf, Option<Box<str>>>>§directories: Arc<BTreeSet<PathBuf>>§metadata: Arc<BTreeMap<PathBuf, Metadata>>§dependency_graph: Arc<str>§tidy_rules: Option<Value>Implementations§
Source§impl WorkspaceIndex
impl WorkspaceIndex
pub fn new(root: PathBuf, entries: Vec<WorkspaceFile>) -> Self
pub fn with_dependency_graph(self, graph: String) -> Self
pub fn with_tidy_rules(self, rules: Option<Value>) -> Self
pub fn root(&self) -> &Path
pub fn contains(&self, path: &Path) -> bool
pub fn is_dir(&self, path: &Path) -> bool
pub fn contents(&self, path: &Path) -> Option<&str>
pub fn metadata(&self, dir: &Path) -> Option<&Metadata>
pub fn child_dirs(&self, dir: &Path) -> impl Iterator<Item = &Path>
pub fn files_in(&self, dir: &Path) -> impl Iterator<Item = &Path>
pub fn templates(&self, filters: &[Box<str>]) -> Vec<PathBuf>
pub fn dependency_graph(&self) -> &str
pub fn tidy_rules(&self) -> Option<&Value>
pub fn has_files_below(&self, dir: &Path) -> bool
Trait Implementations§
Source§impl Clone for WorkspaceIndex
impl Clone for WorkspaceIndex
Source§fn clone(&self) -> WorkspaceIndex
fn clone(&self) -> WorkspaceIndex
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkspaceIndex
impl !RefUnwindSafe for WorkspaceIndex
impl Send for WorkspaceIndex
impl Sync for WorkspaceIndex
impl Unpin for WorkspaceIndex
impl UnsafeUnpin for WorkspaceIndex
impl !UnwindSafe for WorkspaceIndex
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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