pub struct DocSpec {
pub path: String,
pub source_root: String,
pub prefixes: BTreeMap<String, String>,
}Expand description
A requirements document and the source tree that unprefixed src/ and
tests/ references inside it resolve to.
Fields§
§path: StringWorkspace-relative document path.
source_root: StringRepository-relative owning package or workspace source root.
prefixes: BTreeMap<String, String>Optional path-span prefix to repository-relative source-root mappings.
Implementations§
Source§impl DocSpec
impl DocSpec
pub fn new( path: impl Into<String>, source_root: impl Into<String>, prefixes: BTreeMap<String, String>, ) -> Self
Sourcepub fn source_roots(&self) -> BTreeSet<&str>
pub fn source_roots(&self) -> BTreeSet<&str>
Source roots that can contain anchors referenced by this document.
Sourcepub fn scan_roots(&self) -> BTreeSet<String>
pub fn scan_roots(&self) -> BTreeSet<String>
Rust source directories beneath every configured source root.
Trait Implementations§
impl Eq for DocSpec
impl StructuralPartialEq for DocSpec
Auto Trait Implementations§
impl Freeze for DocSpec
impl RefUnwindSafe for DocSpec
impl Send for DocSpec
impl Sync for DocSpec
impl Unpin for DocSpec
impl UnsafeUnpin for DocSpec
impl UnwindSafe for DocSpec
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