pub trait CalculatorProxyInterface: Send + Sync {
type AddResponseFut: Future<Output = Result<f64, Error>> + Send;
type SubtractResponseFut: Future<Output = Result<f64, Error>> + Send;
type MultiplyResponseFut: Future<Output = Result<f64, Error>> + Send;
type DivideResponseFut: Future<Output = Result<f64, Error>> + Send;
type PowResponseFut: Future<Output = Result<f64, Error>> + Send;
// Required methods
fn add(&self, a: f64, b: f64) -> Self::AddResponseFut;
fn subtract(&self, a: f64, b: f64) -> Self::SubtractResponseFut;
fn multiply(&self, a: f64, b: f64) -> Self::MultiplyResponseFut;
fn divide(&self, dividend: f64, divisor: f64) -> Self::DivideResponseFut;
fn pow(&self, base: f64, exponent: f64) -> Self::PowResponseFut;
}Required Associated Types§
type AddResponseFut: Future<Output = Result<f64, Error>> + Send
type SubtractResponseFut: Future<Output = Result<f64, Error>> + Send
type MultiplyResponseFut: Future<Output = Result<f64, Error>> + Send
type DivideResponseFut: Future<Output = Result<f64, Error>> + Send
type PowResponseFut: Future<Output = Result<f64, Error>> + Send
Required Methods§
fn add(&self, a: f64, b: f64) -> Self::AddResponseFut
fn subtract(&self, a: f64, b: f64) -> Self::SubtractResponseFut
fn multiply(&self, a: f64, b: f64) -> Self::MultiplyResponseFut
fn divide(&self, dividend: f64, divisor: f64) -> Self::DivideResponseFut
fn pow(&self, base: f64, exponent: f64) -> Self::PowResponseFut
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".