pub trait Refer {
    fn dereference_self(self, path: &TCPathBuf) -> Self;
    fn is_conditional(&self) -> bool;
    fn is_inter_service_write(&self, cluster_path: &[PathSegment]) -> bool;
    fn reference_self(self, path: &TCPathBuf) -> Self;
    fn requires(&self, deps: &mut HashSet<Id>);
    fn resolve<'a, 'async_trait, T>(
        self,
        context: &'a Scope<'a, T>,
        txn: &'a Txn
    ) -> Pin<Box<dyn Future<Output = TCResult<State>> + Send + 'async_trait>>
    where
        'a: 'async_trait,
        T: 'async_trait + ToState + Public + Instance,
        Self: 'async_trait
; }
Expand description

Trait defining dependencies and a resolution method for a TCRef.

Required Methods

Replace references to “$self” with the given relative path.

This is used to control whether or not an OpDef will be replicated.

Return true if this is a conditional reference (e.g. If or Case).

Return true if this references a write operation to a cluster other than the path given.

Replace the given relative path with “$self”.

This is used to control whether or not an OpDef will be replicated.

Add the dependency [Id]s of this reference to the given set.

Resolve this reference with respect to the given context.

Implementors