Trait AsyncComputeService

Source
pub trait AsyncComputeService {
    // Required methods
    fn compute(
        &self,
        auth_: BearerToken,
        request: ComputeNodeRequest,
    ) -> impl Future<Output = Result<ComputeNodeResponse, Error>> + Send;
    fn parameterized_compute(
        &self,
        auth_: BearerToken,
        request: ParameterizedComputeNodeRequest,
    ) -> impl Future<Output = Result<ParameterizedComputeNodeResponse, Error>> + Send;
    fn compute_units(
        &self,
        auth_: BearerToken,
        request: ComputeUnitsRequest,
    ) -> impl Future<Output = Result<ComputeUnitResult, Error>> + Send;
    fn batch_compute_with_units(
        &self,
        auth_: BearerToken,
        request: BatchComputeWithUnitsRequest,
    ) -> impl Future<Output = Result<BatchComputeWithUnitsResponse, Error>> + Send;
    fn batch_compute_units(
        &self,
        auth_: BearerToken,
        request: BatchComputeUnitsRequest,
    ) -> impl Future<Output = Result<BatchComputeUnitResult, Error>> + Send;
    fn compute_with_units(
        &self,
        auth_: BearerToken,
        request: ComputeWithUnitsRequest,
    ) -> impl Future<Output = Result<ComputeWithUnitsResponse, Error>> + Send;
}
Expand description

The Compute Service provides the ability to compute the output of compute graphs.

Required Methods§

Source

fn compute( &self, auth_: BearerToken, request: ComputeNodeRequest, ) -> impl Future<Output = Result<ComputeNodeResponse, Error>> + Send

Computes the output of the compute graph specified by a ComputeNodeRequest.

Source

fn parameterized_compute( &self, auth_: BearerToken, request: ParameterizedComputeNodeRequest, ) -> impl Future<Output = Result<ParameterizedComputeNodeResponse, Error>> + Send

Computes the output of the compute graph specified by a ParameterizedComputeNodeRequest. A parameterized compute request supports multiple values for a single variable, supplied by the ParameterizedContext. Results are returned in the same order of the request.

Source

fn compute_units( &self, auth_: BearerToken, request: ComputeUnitsRequest, ) -> impl Future<Output = Result<ComputeUnitResult, Error>> + Send

Returns the resulting unit for the output of a compute graph. If the resulting unit is equivalent to exactly one existing unit in the system, it will be returned (for example, a series in Coulombs divided by a series in Volts will return an output of Farads). If the output does not have units (for example, a range output,) the unit result will return noUnitAvailable, and if the computation was not successful, corresponding errors are returned.

Source

fn batch_compute_with_units( &self, auth_: BearerToken, request: BatchComputeWithUnitsRequest, ) -> impl Future<Output = Result<BatchComputeWithUnitsResponse, Error>> + Send

Computes the output of compute graphs specified by BatchComputeNodeRequest. Results are returned in the same order as the request.

Source

fn batch_compute_units( &self, auth_: BearerToken, request: BatchComputeUnitsRequest, ) -> impl Future<Output = Result<BatchComputeUnitResult, Error>> + Send

Same as computeUnits, however this endpoint functions on a batch of requests for wire efficiency purposes. An extra note is that this method will serialize underlying conjure errors into the BatchComputeUnitResult type, meaning callers are required to check for errors explicitly (rather than relying on exceptions being thrown).

Source

fn compute_with_units( &self, auth_: BearerToken, request: ComputeWithUnitsRequest, ) -> impl Future<Output = Result<ComputeWithUnitsResponse, Error>> + Send

Computes the output of the compute graph specified by a ComputeNodeRequest, as well as providing the resulting unit for the output of a compute graph. If the resulting unit is equivalent to exactly one existing unit in the system, it will be returned (for example, a series in Coulombs divided by a series in Volts will return an output of Farads). If the output does not have units (for example, a range output,) the unit result will return noUnitAvailable, and if the computation was not successful, corresponding errors are returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§