pub struct Response {
pub spec_name: String,
pub effective: String,
pub spec_effective_from: Option<DateTimeValue>,
pub spec_effective_to: Option<DateTimeValue>,
pub results: IndexMap<String, RuleResult>,
pub rows: Vec<RowResult>,
}Expand description
Response from evaluating a Lemma spec
Fields§
§spec_name: String§effective: String§spec_effective_from: Option<DateTimeValue>Declared temporal window [spec_effective_from, spec_effective_to) of the
resolved spec version. Set by crate::Engine::evaluate after evaluation;
None here (evaluation-internal construction) until that assignment.
spec_effective_to: Option<DateTimeValue>§results: IndexMap<String, RuleResult>§rows: Vec<RowResult>Rows reached by results, indexed by RowReference::index.
Implementations§
Source§impl Response
impl Response
Sourcepub fn get(&self, rule_name: &str) -> Result<&RuleResult, Error>
pub fn get(&self, rule_name: &str) -> Result<&RuleResult, Error>
Looks up a rule result by name.
Returns an error if the rule is not found.
pub fn add_result(&mut self, result: RuleResult)
Trait Implementations§
Auto Trait Implementations§
impl Forget for Response
impl Freeze for Responsewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, RuleResult>>: Freeze,
PhantomData<RowResult>: Freeze,
impl Move for Response
impl RefUnwindSafe for Response
impl Send for Responsewhere
RawVecInner: Send,
RawTable<usize>: Send,
Arc<str>: Send,
Arc<PathBuf>: Send,
Arc<LemmaType>: Send,
NodeRef<Owned, String, Decimal, LeafOrInternal>: Send,
BoxRaw<(String, Decimal)>: Send,
BoxRaw<RangeResult>: Send,
BoxRaw<SpecResult>: Send,
BoxRaw<TypedLiteral>: Send,
Arc<RowInstance>: Send,
BoxRaw<InstanceKey>: Send,
Arc<[TypedLiteral]>: Send,
Arc<RowStore>: Send,
Arc<KeyIndex>: Send,
Arc<InstanceFactors>: Send,
Arc<FamilyUnitCatalog>: Send,
RawTable<(String, RationalInteger)>: Send,
impl Sync for Responsewhere
RawVecInner: Sync,
RawTable<usize>: Sync,
Arc<str>: Sync,
Arc<PathBuf>: Sync,
Arc<LemmaType>: Sync,
NodeRef<Owned, String, Decimal, LeafOrInternal>: Sync,
BoxRaw<(String, Decimal)>: Sync,
BoxRaw<RangeResult>: Sync,
BoxRaw<SpecResult>: Sync,
BoxRaw<TypedLiteral>: Sync,
Arc<RowInstance>: Sync,
BoxRaw<InstanceKey>: Sync,
Arc<[TypedLiteral]>: Sync,
Arc<RowStore>: Sync,
Arc<KeyIndex>: Sync,
Arc<InstanceFactors>: Sync,
Arc<FamilyUnitCatalog>: Sync,
RawTable<(String, RationalInteger)>: Sync,
impl Unpin for Responsewhere
*const u8 is !null: Unpin,
Arc<str>: Unpin,
Arc<PathBuf>: Unpin,
Arc<LemmaType>: Unpin,
*const LeafNode<String, Decimal> is !null: Unpin,
Box<(String, Decimal)>: Unpin,
Box<RangeResult>: Unpin,
Box<SpecResult>: Unpin,
Box<TypedLiteral>: Unpin,
Arc<RowInstance>: Unpin,
Box<InstanceKey>: Unpin,
Arc<[TypedLiteral]>: Unpin,
Arc<RowStore>: Unpin,
Arc<KeyIndex>: Unpin,
Arc<InstanceFactors>: Unpin,
Arc<FamilyUnitCatalog>: Unpin,
impl UnsafeUnpin for Responsewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, RuleResult>>: UnsafeUnpin,
PhantomData<RowResult>: UnsafeUnpin,
impl UnwindSafe for Responsewhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<PathBuf>: UnwindSafe,
Arc<LemmaType>: UnwindSafe,
BTreeMap<String, Decimal>: UnwindSafe,
BoxRaw<RangeResult>: UnwindSafe,
BoxRaw<SpecResult>: UnwindSafe,
BoxRaw<TypedLiteral>: UnwindSafe,
Arc<RowInstance>: UnwindSafe,
BoxRaw<InstanceKey>: UnwindSafe,
Arc<[TypedLiteral]>: UnwindSafe,
Arc<RowStore>: UnwindSafe,
Arc<KeyIndex>: UnwindSafe,
Arc<InstanceFactors>: UnwindSafe,
Arc<FamilyUnitCatalog>: UnwindSafe,
HashMap<String, RationalInteger>: 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