pub struct LemmaSpec {
pub name: String,
pub effective_from: EffectiveDate,
pub source_type: Option<SourceType>,
pub start_line: usize,
pub commentary: Option<String>,
pub data: Vec<LemmaData>,
pub rules: Vec<LemmaRule>,
pub meta_fields: Vec<MetaField>,
}Expand description
A Lemma spec containing data and rules.
Owning repository is carried by crate::engine::Context, not fields here.
Context identity is (repository, name, EffectiveDate) or std::ptr::eq on a
Context-owned row — not PartialEq. PartialEq is full AST equality
(including statement Source spans) for crate::Engine::update skip only.
Fields§
§name: String§effective_from: EffectiveDate§source_type: Option<SourceType>§start_line: usize§commentary: Option<String>§data: Vec<LemmaData>§rules: Vec<LemmaRule>§meta_fields: Vec<MetaField>Implementations§
Source§impl LemmaSpec
impl LemmaSpec
pub fn new(name: String) -> Self
Sourcepub fn effective_from(&self) -> Option<&DateTimeValue>
pub fn effective_from(&self) -> Option<&DateTimeValue>
Temporal range start. Origin (None) means −∞.
pub fn with_source_type(self, source_type: SourceType) -> Self
pub fn with_start_line(self, start_line: usize) -> Self
pub fn set_commentary(self, commentary: String) -> Self
pub fn add_data(self, data: LemmaData) -> Self
pub fn add_rule(self, rule: LemmaRule) -> Self
pub fn add_meta_field(self, meta: MetaField) -> Self
Trait Implementations§
impl StructuralPartialEq for LemmaSpec
Auto Trait Implementations§
impl Forget for LemmaSpec
impl Freeze for LemmaSpecwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<PathBuf> is !null: Freeze,
PhantomData<ArcInner<PathBuf>>: Freeze,
PhantomData<LemmaData>: Freeze,
PhantomData<LemmaRule>: Freeze,
PhantomData<MetaField>: Freeze,
impl Move for LemmaSpec
impl RefUnwindSafe for LemmaSpec
impl Send for LemmaSpec
impl Sync for LemmaSpec
impl Unpin for LemmaSpec
impl UnsafeUnpin for LemmaSpecwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<PathBuf> is !null: UnsafeUnpin,
PhantomData<ArcInner<PathBuf>>: UnsafeUnpin,
PhantomData<LemmaData>: UnsafeUnpin,
PhantomData<LemmaRule>: UnsafeUnpin,
PhantomData<MetaField>: UnsafeUnpin,
impl UnwindSafe for LemmaSpecwhere
RawVecInner: UnwindSafe,
Arc<PathBuf>: UnwindSafe,
BoxRaw<ParentType>: UnwindSafe,
BoxRaw<Value>: UnwindSafe,
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