Trait ComputeRepresentationService

Source
pub trait ComputeRepresentationService {
    // Required methods
    fn compute_to_expression(
        &self,
        auth_: BearerToken,
        request: CompiledNode,
    ) -> Result<ComputeExpression, Error>;
    fn batch_compute_to_expression(
        &self,
        auth_: BearerToken,
        request: BTreeMap<String, CompiledNode>,
    ) -> Result<BTreeMap<String, ComputeExpression>, Error>;
    fn expression_to_compute(
        &self,
        auth_: BearerToken,
        request: ExpressionToComputeRequest,
    ) -> Result<ExpressionToComputeResult, Error>;
    fn batch_expression_to_compute(
        &self,
        auth_: BearerToken,
        request: BatchExpressionToComputeRequest,
    ) -> Result<BTreeMap<ComputeExpression, ExpressionToComputeResult>, Error>;
}
Expand description

The Compute Representation Service provides the ability to translate between a human-readable expression language and a compute graph. Bidirectional translation is supported.

Required Methods§

Source

fn compute_to_expression( &self, auth_: BearerToken, request: CompiledNode, ) -> Result<ComputeExpression, Error>

Converts a compute graph and its context into a its expression language representation.

Source

fn batch_compute_to_expression( &self, auth_: BearerToken, request: BTreeMap<String, CompiledNode>, ) -> Result<BTreeMap<String, ComputeExpression>, Error>

Converts a batch of compute graphs and their contexts into their expression language representation. Requires a string key reference to be provided for each graph.

Source

fn expression_to_compute( &self, auth_: BearerToken, request: ExpressionToComputeRequest, ) -> Result<ExpressionToComputeResult, Error>

Converts an expression language representation into a compute graph. The outputted graph can be passed to the compute service or checks service for execution.

Source

fn batch_expression_to_compute( &self, auth_: BearerToken, request: BatchExpressionToComputeRequest, ) -> Result<BTreeMap<ComputeExpression, ExpressionToComputeResult>, Error>

Converts a batch of expressions into their compute graph representation.

Implementors§