Skip to main content

BeOperator

Trait BeOperator 

Source
pub trait BeOperator<Value> {
    // Required methods
    fn operand(&self) -> usize;
    fn operate(&self, values: &mut dyn Iterator<Item = Value>) -> Option<Value>;

    // Provided method
    fn short_circuit(
        &self,
        values: &mut dyn Iterator<Item = &Value>,
    ) -> Option<(Value, usize)> { ... }
}

Required Methods§

Source

fn operand(&self) -> usize

Source

fn operate(&self, values: &mut dyn Iterator<Item = Value>) -> Option<Value>

Provided Methods§

Source

fn short_circuit( &self, values: &mut dyn Iterator<Item = &Value>, ) -> Option<(Value, usize)>

Dyn-compatible?

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§