pub struct FormulaTranslator { /* private fields */ }Expand description
Translates YAML row formulas to Excel cell formulas
Implementations§
Source§impl FormulaTranslator
impl FormulaTranslator
Sourcepub fn new(column_map: HashMap<String, String>) -> Self
pub fn new(column_map: HashMap<String, String>) -> Self
Create a new formula translator with column mappings (legacy, for backwards compat)
Sourcepub const fn new_with_tables(
column_map: HashMap<String, String>,
table_column_maps: HashMap<String, HashMap<String, String>>,
table_row_counts: HashMap<String, usize>,
) -> Self
pub const fn new_with_tables( column_map: HashMap<String, String>, table_column_maps: HashMap<String, HashMap<String, String>>, table_row_counts: HashMap<String, usize>, ) -> Self
Create a new formula translator with full table knowledge
Sourcepub fn translate_row_formula(
&self,
formula: &str,
excel_row: u32,
) -> ForgeResult<String>
pub fn translate_row_formula( &self, formula: &str, excel_row: u32, ) -> ForgeResult<String>
Sourcepub fn translate_scalar_formula(
&self,
formula: &str,
scalar_row_map: &HashMap<String, u32>,
) -> ForgeResult<String>
pub fn translate_scalar_formula( &self, formula: &str, scalar_row_map: &HashMap<String, u32>, ) -> ForgeResult<String>
Sourcepub fn column_index_to_letter(index: usize) -> String
pub fn column_index_to_letter(index: usize) -> String
Convert a column name to an Excel column letter
Examples:
- 0 → A
- 1 → B
- 25 → Z
- 26 → AA
Auto Trait Implementations§
impl Freeze for FormulaTranslator
impl RefUnwindSafe for FormulaTranslator
impl Send for FormulaTranslator
impl Sync for FormulaTranslator
impl Unpin for FormulaTranslator
impl UnsafeUnpin for FormulaTranslator
impl UnwindSafe for FormulaTranslator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more