pub struct ExperienceRelation {
pub id: RelationId,
pub source_id: ExperienceId,
pub target_id: ExperienceId,
pub relation_type: RelationType,
pub strength: f32,
pub metadata: Option<String>,
pub created_at: Timestamp,
}Expand description
A stored relationship between two experiences.
Relations are always within the same collective and are directed
from source_id to target_id. The relation_type describes
the semantic meaning of the connection.
§Uniqueness
The combination (source_id, target_id, relation_type) must be
unique — you cannot have two “Supports” relations between the
same pair of experiences.
Fields§
§id: RelationIdUnique identifier for this relation.
source_id: ExperienceIdThe experience this relation originates from.
target_id: ExperienceIdThe experience this relation points to.
relation_type: RelationTypeThe type of relationship.
strength: f32Strength of the relation (0.0 = weak, 1.0 = strong).
metadata: Option<String>Optional JSON metadata (max 10KB).
created_at: TimestampWhen this relation was created.
Trait Implementations§
Source§impl Clone for ExperienceRelation
impl Clone for ExperienceRelation
Source§fn clone(&self) -> ExperienceRelation
fn clone(&self) -> ExperienceRelation
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 moreSource§impl Debug for ExperienceRelation
impl Debug for ExperienceRelation
Source§impl<'de> Deserialize<'de> for ExperienceRelation
impl<'de> Deserialize<'de> for ExperienceRelation
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExperienceRelation
impl RefUnwindSafe for ExperienceRelation
impl Send for ExperienceRelation
impl Sync for ExperienceRelation
impl Unpin for ExperienceRelation
impl UnsafeUnpin for ExperienceRelation
impl UnwindSafe for ExperienceRelation
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