Trait sindra::inference::InferTypesBinary
[−]
[src]
pub trait InferTypesBinary { type Operand: Type; fn infer_types(
&self,
left: Self::Operand,
right: Self::Operand
) -> Option<BinaryOpTypes<Self::Operand>>; }
Trait for determining the result type of a binary operation.
Associated Types
Required Methods
fn infer_types(
&self,
left: Self::Operand,
right: Self::Operand
) -> Option<BinaryOpTypes<Self::Operand>>
&self,
left: Self::Operand,
right: Self::Operand
) -> Option<BinaryOpTypes<Self::Operand>>
When the operation is possible, returns Some(...)
containing the required operand
coercions and result type.
When the operation is not possible with the given operand types, returns None
.