pub struct CausalStep {
pub source: EntityId,
pub target: EntityId,
pub relation_type: String,
pub temporal_type: Option<TemporalRelationType>,
pub temporal_range: Option<TemporalRange>,
pub confidence: f32,
pub causal_strength: Option<f32>,
}Expand description
A single step in a causal chain
Represents one causal relationship in a chain.
Fields§
§source: EntityIdSource entity of this step
target: EntityIdTarget entity of this step
relation_type: StringType of causal relationship
temporal_type: Option<TemporalRelationType>Temporal type (Caused, Enabled, etc.)
temporal_range: Option<TemporalRange>When this step occurred
confidence: f32Confidence of this causal link
causal_strength: Option<f32>Strength of causality (0.0-1.0)
Implementations§
Source§impl CausalStep
impl CausalStep
Sourcepub fn from_relationship(rel: &Relationship) -> Self
pub fn from_relationship(rel: &Relationship) -> Self
Create a causal step from a relationship
Sourcepub fn has_temporal_info(&self) -> bool
pub fn has_temporal_info(&self) -> bool
Check if this step has temporal information
Sourcepub fn get_timestamp(&self) -> Option<i64>
pub fn get_timestamp(&self) -> Option<i64>
Get the midpoint timestamp of this step (for ordering)
Trait Implementations§
Source§impl Clone for CausalStep
impl Clone for CausalStep
Source§fn clone(&self) -> CausalStep
fn clone(&self) -> CausalStep
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CausalStep
impl RefUnwindSafe for CausalStep
impl Send for CausalStep
impl Sync for CausalStep
impl Unpin for CausalStep
impl UnsafeUnpin for CausalStep
impl UnwindSafe for CausalStep
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> 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>
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