pub struct CreateRelation<'a> {Show 13 fields
pub id: Id,
pub relation_type: Id,
pub from: Id,
pub from_is_value_ref: bool,
pub from_space: Option<Id>,
pub from_version: Option<Id>,
pub to: Id,
pub to_is_value_ref: bool,
pub to_space: Option<Id>,
pub to_version: Option<Id>,
pub entity: Option<Id>,
pub position: Option<Cow<'a, str>>,
pub context: Option<Context>,
}Expand description
Creates a new relation (spec Section 3.3).
Also implicitly creates the reified entity if it doesn’t exist.
Fields§
§id: IdThe relation’s unique identifier.
relation_type: IdThe relation type entity ID.
from: IdSource entity or value ref ID.
from_is_value_ref: boolIf true, from is a value ref ID (inline encoding).
If false, from is an entity ID (ObjectRef encoding).
from_space: Option<Id>Optional space pin for source entity.
from_version: Option<Id>Optional version (edit ID) to pin source entity.
to: IdTarget entity or value ref ID.
to_is_value_ref: boolIf true, to is a value ref ID (inline encoding).
If false, to is an entity ID (ObjectRef encoding).
to_space: Option<Id>Optional space pin for target entity.
to_version: Option<Id>Optional version (edit ID) to pin target entity.
entity: Option<Id>Explicit reified entity ID. If None, entity ID is auto-derived from the relation ID.
position: Option<Cow<'a, str>>Optional ordering position (fractional indexing).
context: Option<Context>Optional context for grouping changes (spec Section 4.5).
Implementations§
Source§impl CreateRelation<'_>
impl CreateRelation<'_>
Trait Implementations§
Source§impl<'a> Clone for CreateRelation<'a>
impl<'a> Clone for CreateRelation<'a>
Source§fn clone(&self) -> CreateRelation<'a>
fn clone(&self) -> CreateRelation<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more