pub enum FactData {
Value {
value: LiteralValue,
source: Source,
is_default: bool,
},
TypeDeclaration {
resolved_type: LemmaType,
source: Source,
},
SpecRef {
spec: Arc<LemmaSpec>,
source: Source,
resolved_plan_hash: Option<String>,
},
}Expand description
Resolved fact value for the execution plan: aligned with FactValue but with source per variant.
Variants§
Value
Value-holding fact: current value (literal or default); type is on the value.
When is_default is true, the value came from a type -> default constraint
rather than an explicit literal in the spec.
TypeDeclaration
Type-only fact: schema known, value to be supplied (e.g. via with_values).
SpecRef
Spec reference fact: holds the resolved spec and the dependency’s plan hash for this slice.
Implementations§
Source§impl FactData
impl FactData
Sourcepub fn schema_type(&self) -> Option<&LemmaType>
pub fn schema_type(&self) -> Option<&LemmaType>
Returns the schema type for value and type-declaration facts; None for spec references.
Sourcepub fn value(&self) -> Option<&LiteralValue>
pub fn value(&self) -> Option<&LiteralValue>
Returns the literal value for value facts; None for type-declaration and spec references.
Sourcepub fn explicit_value(&self) -> Option<&LiteralValue>
pub fn explicit_value(&self) -> Option<&LiteralValue>
Returns the literal value only if it was explicitly defined in the spec
(not from a type -> default constraint). Used by schema methods to decide
which facts need user input.
Sourcepub fn resolved_plan_hash(&self) -> Option<&str>
pub fn resolved_plan_hash(&self) -> Option<&str>
Returns the resolved dependency plan hash for spec reference facts; None for other fact kinds.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FactData
impl<'de> Deserialize<'de> for FactData
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>,
impl Eq for FactData
impl StructuralPartialEq for FactData
Auto Trait Implementations§
impl Freeze for FactData
impl RefUnwindSafe for FactData
impl Send for FactData
impl Sync for FactData
impl Unpin for FactData
impl UnsafeUnpin for FactData
impl UnwindSafe for FactData
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> 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