Files
tycho-execution/src/encoding/strategy_encoder.rs
2025-01-30 21:17:25 +05:30

15 lines
419 B
Rust

use tycho_core::Bytes;
use crate::encoding::{errors::EncodingError, models::Solution};
#[allow(dead_code)]
pub trait StrategyEncoder {
fn encode_strategy(&self, to_encode: Solution) -> Result<(Vec<u8>, Bytes), EncodingError>;
fn selector(&self, exact_out: bool) -> &str;
}
pub trait StrategySelector {
#[allow(dead_code)]
fn select_strategy(&self, solution: &Solution) -> Box<dyn StrategyEncoder>;
}