pub enum CorpusScope {
Production,
Test,
Fixture,
Example,
Generated,
Vendor,
Docs,
}Expand description
Repository role of a source file and every graph node declared in it.
Scope is persisted per file by the store rather than repeated in every node blob. The path classifier is deliberately conservative: repositories can override an exceptional path, while an uncertain path remains production instead of disappearing from the default agent corpus.
Variants§
Implementations§
Source§impl CorpusScope
impl CorpusScope
pub const ALL: [Self; 7]
pub fn as_str(self) -> &'static str
pub fn from_str_opt(value: &str) -> Option<Self>
Sourcepub fn classify_path(file: &str) -> Self
pub fn classify_path(file: &str) -> Self
Conservative path-only classification used when a repository has no
explicit override. Rules operate on complete path components and
well-known generated suffixes to avoid hiding ordinary source whose
name merely contains words such as test or example.
Trait Implementations§
Source§impl Clone for CorpusScope
impl Clone for CorpusScope
Source§fn clone(&self) -> CorpusScope
fn clone(&self) -> CorpusScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CorpusScope
Source§impl Debug for CorpusScope
impl Debug for CorpusScope
Source§impl<'de> Deserialize<'de> for CorpusScope
impl<'de> Deserialize<'de> for CorpusScope
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for CorpusScope
impl Display for CorpusScope
impl Eq for CorpusScope
Source§impl FromStr for CorpusScope
impl FromStr for CorpusScope
Source§impl Hash for CorpusScope
impl Hash for CorpusScope
Source§impl Ord for CorpusScope
impl Ord for CorpusScope
Source§fn cmp(&self, other: &CorpusScope) -> Ordering
fn cmp(&self, other: &CorpusScope) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for CorpusScope
impl PartialEq for CorpusScope
Source§impl PartialOrd for CorpusScope
impl PartialOrd for CorpusScope
Source§impl Serialize for CorpusScope
impl Serialize for CorpusScope
impl StructuralPartialEq for CorpusScope
Auto Trait Implementations§
impl Freeze for CorpusScope
impl RefUnwindSafe for CorpusScope
impl Send for CorpusScope
impl Sync for CorpusScope
impl Unpin for CorpusScope
impl UnsafeUnpin for CorpusScope
impl UnwindSafe for CorpusScope
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