fn to_ordered_column(
        &'a self,
        name: &'a str,
        is_drag_active: Option<bool>,
        col_set: &HashSet<&Option<String>>,
    ) -> Option<OrderedColumn<'a>> {
        let dragover_col = self.is_dragover_column.as_ref();
        let cols = &self.config.columns;
        let is_active = col_set.contains(&Some(name.to_string())); // cols.iter().flatten().any(|x| x == name);
        let is_swap_over = maybe! {
            let (drop_index, _) = dragover_col?;
            let is_swap = self.renderer.metadata().is_swap(*drop_index);
            let is_over = cols.get(*drop_index)?.as_ref()? == name;
            Some(is_swap && is_over && !is_drag_active?)
        };

        if !is_active || is_swap_over.unwrap_or_default() {
            let col_type = self.session.metadata().get_column_table_type(name)?;
            let is_visible = !dragover_col.map_or(false, |(_, x)| x == name);
            Some(OrderedColumn {
                is_visible,
                name,
                col_type,
            })
        } else {
            None
        }
    }
/// Convert a column `name` into an `OrderedColumn` based on whether it is
/// active or in a drag state where an immediate drop would make it active.
Convert a column `name` into an `OrderedColumn` based on whether it is
active or in a drag state where an immediate drop would make it active.
Convert a column ` name ` into an ` OrderedColumn ` based on whether it is active or in a drag state where an immediate drop would make it active .
fn to_ordered_column(
        &'a self,
        name: &'a str,
        is_drag_active: Option<bool>,
        col_set: &HashSet<&Option<String>>,
    ) -> Option<OrderedColumn<'a>> {
        let dragover_col = self.is_dragover_column.as_ref();
        let cols = &self.config.columns;
        let is_active = col_set.contains(&Some(name.to_string())); // cols.iter().flatten().any(|x| x == name);
        let is_swap_over = maybe! {
            let (drop_index, _) = dragover_col?;
            let is_swap = self.renderer.metadata().is_swap(*drop_index);
            let is_over = cols.get(*drop_index)?.as_ref()? == name;
            Some(is_swap && is_over && !is_drag_active?)
        };
        if !is_active || is_swap_over.unwrap_or_default() {
            let col_type = self.session.metadata().get_column_table_type(name)?;
            let is_visible = !dragover_col.map_or(false, |(_, x)| x == name);
            Some(OrderedColumn {
                is_visible,
                name,
                col_type,
            })
        } else {
            None
        }
    }
fn to_ordered_column ( & ' a self , name : & ' a str , is_drag_active : Option < bool > , col_set : & HashSet < & Option < String > > , ) -> Option < OrderedColumn < ' a > > { let dragover_col = self . is_dragover_column . as_ref ( ) ; let cols = & self . config . columns ; let is_active = col_set . contains ( & Some ( name . to_string ( ) ) ) ; // cols.iter().flatten().any(|x| x == name); let is_swap_over = maybe ! { let ( drop_index ) dragover_col let is_swap self renderer metadata ( ) is_swap ( drop_index ) let is_over cols get ( drop_index ) as_ref ( ) name Some ( is_swap is_over is_drag_active ) } ; if ! is_active || is_swap_over . unwrap_or_default ( ) { let col_type = self . session . metadata ( ) . get_column_table_type ( name ) ? ; let is_visible = ! dragover_col . map_or ( false , | ( _ , x ) | x == name ) ; Some ( OrderedColumn { is_visible , name , col_type , } ) } else { None } }
Convert a column `name` into an `OrderedColumn` based on whether it is
active or in a drag state where an immediate drop would make it active.
Convert a column ` name ` into an ` OrderedColumn ` based on whether it is active or in a drag state where an immediate drop would make it active .
&'a self
name
&'a str
is_drag_active
Option<bool>
col_set
&HashSet<&Option<String>>
&'a self
name
&'a str
is_drag_active
Option<bool>
col_set
&HashSet<&Option<String>>