pub trait ChainableOperation {
type Operand;
type Operator;
// Required methods
fn operands(&self) -> Vec<&Self::Operand>;
fn operators(&self) -> Vec<&Self::Operator>;
fn generate_chained_rust(
&self,
ctx: CodeGenContext,
options: PythonOptions,
symbols: SymbolTableScopes,
) -> Result<TokenStream, Box<dyn Error>>;
}
Expand description
Trait for operations that can be chained (like comparison operations).
Required Associated Types§
Required Methods§
Sourcefn generate_chained_rust(
&self,
ctx: CodeGenContext,
options: PythonOptions,
symbols: SymbolTableScopes,
) -> Result<TokenStream, Box<dyn Error>>
fn generate_chained_rust( &self, ctx: CodeGenContext, options: PythonOptions, symbols: SymbolTableScopes, ) -> Result<TokenStream, Box<dyn Error>>
Generate chained Rust code.