pub struct LemmaRepository {
pub name: Option<String>,
pub dependency: Option<String>,
pub start_line: usize,
pub source_type: Option<SourceType>,
}Expand description
A Lemma repository header. Identity carrier; never owns specs.
name includes the @ prefix when present (e.g. Some("@jack/finance")).
None for the workspace-global anonymous grouping. Identity (used by
PartialEq, Eq, Hash, and Ord for BTreeMap keying) is just name.
dependency, start_line and source_type are metadata excluded from identity.
dependency is the provenance guard: None for workspace-loaded repos,
Some(id) for repos introduced by a dependency. All specs in a repo must
share the same dependency value — the engine rejects mismatches at load time.
The parser fills LemmaRepository for each repo section before grouping specs in
[ParseResult]; loaders set dependency when inserting dependency bundles.
Fields§
§name: Option<String>Repository name, including @ when present. None for anonymous repositories.
dependency: Option<String>Dependency provenance: None for workspace repos, Some(id) for dependency repos.
Not part of identity — used as an isolation guard at load time.
start_line: usize§source_type: Option<SourceType>Implementations§
Source§impl LemmaRepository
impl LemmaRepository
pub fn new(name: Option<String>) -> Self
pub fn with_start_line(self, start_line: usize) -> Self
pub fn with_source_type(self, source_type: SourceType) -> Self
pub fn with_dependency(self, dependency_id: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for LemmaRepository
impl Clone for LemmaRepository
Source§fn clone(&self) -> LemmaRepository
fn clone(&self) -> LemmaRepository
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LemmaRepository
impl Debug for LemmaRepository
Source§impl<'de> Deserialize<'de> for LemmaRepository
impl<'de> Deserialize<'de> for LemmaRepository
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>,
Source§impl Hash for LemmaRepository
impl Hash for LemmaRepository
Source§impl Ord for LemmaRepository
impl Ord for LemmaRepository
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LemmaRepository
impl PartialEq for LemmaRepository
Source§impl PartialOrd for LemmaRepository
impl PartialOrd for LemmaRepository
Source§impl Serialize for LemmaRepository
impl Serialize for LemmaRepository
impl Eq for LemmaRepository
Auto Trait Implementations§
impl Freeze for LemmaRepository
impl RefUnwindSafe for LemmaRepository
impl Send for LemmaRepository
impl Sync for LemmaRepository
impl Unpin for LemmaRepository
impl UnsafeUnpin for LemmaRepository
impl UnwindSafe for LemmaRepository
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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>
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