pub struct LemmaDoc {
pub name: String,
pub source: Option<String>,
pub start_line: usize,
pub commentary: Option<String>,
pub facts: Vec<LemmaFact>,
pub rules: Vec<LemmaRule>,
}Expand description
A Lemma document containing facts, rules
Fields§
§name: String§source: Option<String>§start_line: usize§commentary: Option<String>§facts: Vec<LemmaFact>§rules: Vec<LemmaRule>Implementations§
Source§impl LemmaDoc
impl LemmaDoc
pub fn new(name: String) -> Self
pub fn with_source(self, source: String) -> Self
pub fn with_start_line(self, start_line: usize) -> Self
pub fn set_commentary(self, commentary: String) -> Self
pub fn add_fact(self, fact: LemmaFact) -> Self
pub fn add_rule(self, rule: LemmaRule) -> Self
Sourcepub fn get_fact_type(&self, fact_ref: &FactReference) -> Option<LemmaType>
pub fn get_fact_type(&self, fact_ref: &FactReference) -> Option<LemmaType>
Get the expected type for a fact by path Returns None if the fact is not found in this document or if the fact is a document reference
Trait Implementations§
impl StructuralPartialEq for LemmaDoc
Auto Trait Implementations§
impl Freeze for LemmaDoc
impl RefUnwindSafe for LemmaDoc
impl Send for LemmaDoc
impl Sync for LemmaDoc
impl Unpin for LemmaDoc
impl UnwindSafe for LemmaDoc
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,
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